File size: 429 Bytes
be11144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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);