caffe2/core/context_gpu_test.cc
void TEST_GetStreamAddress(cudaStream_t* ptr) {
  CUDAContext context(0);
  *ptr = context.cuda_stream();
  // Sleep for a while so we have concurrent thread executions
  std::this_thread::sleep_for(std::chrono::seconds(1));
}
// A test function to return a stream address from a temp CUDA context. You
// should not use that stream though, because the actual stream is destroyed
// after thread exit.
A test function to return a stream address from a temp CUDA context. You
should not use that stream though, because the actual stream is destroyed
after thread exit.
A test function to return a stream address from a temp CUDA context . You should not use that stream though because the actual stream is destroyed after thread exit .
void TEST_GetStreamAddress(cudaStream_t* ptr) {
  CUDAContext context(0);
  *ptr = context.cuda_stream();
  std::this_thread::sleep_for(std::chrono::seconds(1));
}
void TEST_GetStreamAddress ( cudaStream_t * ptr ) { CUDAContext context ( 0 ) ; * ptr = context . cuda_stream ( ) ; std :: this_thread :: sleep_for ( std :: chrono :: seconds ( 1 ) ) ; }
A test function to return a stream address from a temp CUDA context.
A test function to return a stream address from a temp CUDA context .
// Sleep for a while so we have concurrent thread executions