Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:05:45

0001 #include "CUDADataFormats/PortableTestObjects/interface/TestHostCollection.h"
0002 
0003 #include "TestAlgo.h"
0004 
0005 namespace cudatest {
0006 
0007   static void testAlgoKernel(cudatest::TestHostCollection::View view, int32_t size) {
0008     const cudatest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
0009 
0010     view.r() = 1.;
0011 
0012     for (auto i = 0; i < size; ++i) {
0013       view[i] = {0., 0., 0., i, matrix * i};
0014     }
0015   }
0016 
0017   void TestAlgo::fill(cudatest::TestHostCollection& collection) const {
0018     testAlgoKernel(collection.view(), collection->metadata().size());
0019   }
0020 
0021 }  // namespace cudatest