LIVE / thrust /testing /cuda /stream_per_thread.cu
Xu Ma
update
1c3c0d9
raw
history blame
429 Bytes
#include <unittest/unittest.h>
#include <thrust/execution_policy.h>
#include <thrust/system/cuda/detail/util.h>
#include <thread>
void verify_stream()
{
auto exec = thrust::device;
auto stream = thrust::cuda_cub::stream(exec);
ASSERT_EQUAL(stream, cudaStreamPerThread);
}
void TestPerThreadDefaultStream()
{
verify_stream();
std::thread t(verify_stream);
t.join();
}
DECLARE_UNITTEST(TestPerThreadDefaultStream);