diff --git a/examples/matrixtile.h b/examples/matrixtile.h index ee623ee4a..63c612a01 100644 --- a/examples/matrixtile.h +++ b/examples/matrixtile.h @@ -12,7 +12,8 @@ #include #if defined(TILEDARRAY_HAS_DEVICE) -#define ALLOCATOR TiledArray::device_pinned_allocator +template +using Allocator = TiledArray::device_pinned_allocator; inline void allocator_init(int argc, char **argv) { // initialize MADNESS so that TA allocators can be created @@ -26,7 +27,8 @@ inline void allocator_fini() { madness::finalize(); } #else // TILEDARRAY_HAS_DEVICE -#define ALLOCATOR std::allocator +template +using Allocator = std::allocator; inline void allocator_init(int argc, char **argv) { } @@ -34,7 +36,7 @@ inline void allocator_fini() { } #endif // TILEDARRAY_HAS_DEVICE -template +template > class MatrixTile : public ttg::TTValue> { public: using metadata_t = typename std::tuple; diff --git a/examples/potrf/potrf.h b/examples/potrf/potrf.h index 689a932e2..4e5e3c194 100644 --- a/examples/potrf/potrf.h +++ b/examples/potrf/potrf.h @@ -95,7 +95,7 @@ namespace potrf { ttg::Edge>& output_result) { using T = typename MatrixT::element_type; #if defined(ENABLE_DEVICE_KERNEL) - auto iallocator = std::make_shared>(); + auto iallocator = std::make_shared>(); //std::cout << "Creating CUDA POTRF task " << std::endl; auto f_dev = [=, iallocator = std::move(iallocator)] (const Key1& key, MatrixTile&& tile_kk,