44 #if defined(__CUDACC__)
46 #include <thrust/device_vector.h>
48 #include <thrust/system/cuda/vector.h>
52 #include <thrust/system/tbb/vector.h>
53 #include <thrust/execution_policy.h>
57 template <target_system system>
65 typedef thrust::system::cuda::tag
tag;
67 static inline decltype(thrust::cuda::par) execution_policy(
void)
69 return thrust::cuda::par;
76 typedef thrust::system::tbb::tag
tag;
78 static inline decltype(thrust::tbb::par) execution_policy(
void)
80 return thrust::tbb::par;
88 #define __FUNC_CUDA(fun) void *ptr_cuda = (void *)fun<lift::cuda>;
89 #define __METHOD_CUDA(base, method) void *ptr_cuda = (void *)&base<lift::cuda>::method;
91 #define __FUNC_TBB(fun) auto *ptr_TBB= (void *)fun<lift::host>;
92 #define __METHOD_TBB(base, method) auto ptr_TBB = (void *)&base<lift::host>::method;
95 #define INSTANTIATE(fun) \
96 namespace __ ## fun ## __instantiation { \
102 #define METHOD_INSTANTIATE(base, method) \
103 namespace __ ## base ## __ ## method ## __instantiation { \
104 __METHOD_CUDA(base, method); \
105 __METHOD_TBB(base, method); \
thrust::system::tbb::tag tag
thrust::system::cuda::tag tag