Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /HeterogeneousCore/CUDACore/test/test_ScopedContextKernels.cu is written in an unsupported language. File is not indexed.

0001 #include "test_ScopedContextKernels.h"
0002 
0003 namespace {
0004   __global__ void single_mul(int *d) { d[0] = d[0] * 2; }
0005 
0006   __global__ void join_add(const int *d1, const int *d2, int *d3) { d3[0] = d1[0] + d2[0]; }
0007 }  // namespace
0008 
0009 namespace cms {
0010   namespace cudatest {
0011     void testScopedContextKernels_single(int *d, cudaStream_t stream) { single_mul<<<1, 1, 0, stream>>>(d); }
0012 
0013     void testScopedContextKernels_join(const int *d1, const int *d2, int *d3, cudaStream_t stream) {
0014       join_add<<<1, 1, 0, stream>>>(d1, d2, d3);
0015     }
0016   }  // namespace cudatest
0017 }  // namespace cms