#include #include #include #include #include #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA #include #endif template struct test_allocator_t { }; test_allocator_t test_allocator = test_allocator_t(); const test_allocator_t const_test_allocator = test_allocator_t(); struct test_memory_resource_t THRUST_FINAL : thrust::mr::memory_resource<> { void * do_allocate(std::size_t size, std::size_t) THRUST_OVERRIDE { return reinterpret_cast(size); } void do_deallocate(void * ptr, std::size_t size, std::size_t) THRUST_OVERRIDE { ASSERT_EQUAL(ptr, reinterpret_cast(size)); } } test_memory_resource; template class CRTPBase> struct policy_info { typedef Policy policy; template