parent
eec306c228
commit
ee35389d22
4 changed files with 58 additions and 6 deletions
|
|
@ -45,6 +45,11 @@ public class template_default_class_parms_runme {
|
|||
foo.setTType(a);
|
||||
a = foo.method(a);
|
||||
}
|
||||
|
||||
{
|
||||
MapDefaults md = new MapDefaults();
|
||||
md.test_func(10, 20, new DefaultNodeType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,3 +31,46 @@ namespace Space {
|
|||
%template(FooAnotherType) Space::Foo<Space::AnotherType>;
|
||||
|
||||
%template() Space::ATemplate<>;
|
||||
|
||||
|
||||
// Github issue #280 segfault
|
||||
%inline %{
|
||||
namespace Teuchos {
|
||||
class Describable {};
|
||||
}
|
||||
namespace KokkosClassic {
|
||||
namespace DefaultNode {
|
||||
struct DefaultNodeType {};
|
||||
};
|
||||
}
|
||||
|
||||
namespace Tpetra {
|
||||
template <class LocalOrdinal = int,
|
||||
class GlobalOrdinal = LocalOrdinal,
|
||||
class Node = KokkosClassic::DefaultNode::DefaultNodeType>
|
||||
class Map : public Teuchos::Describable {
|
||||
public:
|
||||
typedef LocalOrdinal local_ordinal_type;
|
||||
typedef GlobalOrdinal global_ordinal_type;
|
||||
typedef Node node_type;
|
||||
void test_func(LocalOrdinal, GlobalOrdinal, Node) {}
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
%template(MapDefaults) Tpetra::Map<>;
|
||||
|
||||
%inline %{
|
||||
namespace Details {
|
||||
template < class LO = ::Tpetra::Map<>::local_ordinal_type,
|
||||
class GO = typename ::Tpetra::Map<LO>::global_ordinal_type,
|
||||
class NT = typename ::Tpetra::Map<LO, GO>::node_type >
|
||||
class Transfer : public Teuchos::Describable {
|
||||
public:
|
||||
void transfer_func(LO, GO, NT) {}
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
// Below is not resolving correctly yet
|
||||
%template(TransferDefaults) Details::Transfer<>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue