Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:44

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     const cudatest::Array flags = {{6, 4, 2, 0}};
0010 
0011     view.r() = 1.;
0012 
0013     for (auto i = 0; i < size; ++i) {
0014       view[i] = {0., 0., 0., i, flags, matrix * i};
0015     }
0016   }
0017 
0018   void TestAlgo::fill(cudatest::TestHostCollection& collection) const {
0019     testAlgoKernel(collection.view(), collection->metadata().size());
0020   }
0021 
0022 }  // namespace cudatest