#include #if THRUST_CPP_DIALECT >= 2014 #include #include template > struct simple_invoker : testing::async::mixin::input::device_vector , testing::async::mixin::output::device_vector , testing::async::exclusive_scan::mixin::postfix_args:: all_overloads , testing::async::exclusive_scan::mixin::invoke_reference:: host_synchronous , testing::async::exclusive_scan::mixin::invoke_async::simple , testing::async::mixin::compare_outputs::assert_almost_equal_if_fp_quiet { static std::string description() { return "simple invocation with device vectors"; } }; template struct test_simple { void operator()(std::size_t num_values) const { testing::async::test_policy_overloads>::run(num_values); } }; DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_simple, NumericTypes); // Testing the in-place algorithm uses the exact same instantiations of the // underlying scan implementation as above. Test them here to avoid compiling // them twice. template > struct simple_inplace_invoker : testing::async::mixin::input::device_vector , testing::async::mixin::output::device_vector_reuse_input , testing::async::exclusive_scan::mixin::postfix_args:: all_overloads , testing::async::exclusive_scan::mixin::invoke_reference::host_synchronous< input_value_type> , testing::async::exclusive_scan::mixin::invoke_async::simple , testing::async::mixin::compare_outputs::assert_almost_equal_if_fp_quiet { static std::string description() { return "simple in-place invocation with device vectors"; } }; template struct test_simple_in_place { void operator()(std::size_t num_values) const { using invoker = simple_inplace_invoker; testing::async::test_policy_overloads::run(num_values); } }; DECLARE_GENERIC_SIZED_UNITTEST_WITH_TYPES(test_simple_in_place, NumericTypes); #endif // C++14