src
HeterogeneousCore
CUDATest
plugins
TestAlgo.cc
Go to the documentation of this file.
1
#include "
CUDADataFormats/PortableTestObjects/interface/TestHostCollection.h
"
2
3
#include "
TestAlgo.h
"
4
5
namespace
cudatest
{
6
7
static
void
testAlgoKernel
(
cudatest::TestHostCollection::View
view
, int32_t size) {
8
const
cudatest::Matrix
matrix
{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
9
const
cudatest::Array
flags
= {{6, 4, 2, 0}};
10
11
view
.r() = 1.;
12
13
for
(
auto
i
= 0;
i
< size; ++
i
) {
14
view
[
i
] = {0., 0., 0.,
i
,
flags
,
matrix
*
i
};
15
}
16
}
17
18
void
TestAlgo::fill
(
cudatest::TestHostCollection
&
collection
)
const
{
19
testAlgoKernel
(
collection
.view(),
collection
->metadata().size());
20
}
21
22
}
// namespace cudatest
cudatest
Definition:
TestDeviceCollection.h:7
makeMuonMisalignmentScenario.matrix
list matrix
Definition:
makeMuonMisalignmentScenario.py:141
mps_fire.i
i
Definition:
mps_fire.py:429
cudatest::TestAlgo::fill
void fill(cudatest::TestDeviceCollection &collection, cudaStream_t stream) const
pv::view
view
Definition:
PreparePVTrends.h:58
TestHostCollection.h
cms::cuda::PortableHostCollection< portabletest::TestSoA >::View
typename Layout::View View
Definition:
PortableHostCollection.h:16
universalConfigTemplate.collection
collection
Definition:
universalConfigTemplate.py:81
cms::cuda::PortableHostCollection< portabletest::TestSoA >
edm::StdArray
Definition:
StdArray.h:39
HLT_2024v14_cff.flags
flags
Definition:
HLT_2024v14_cff.py:10252
TestAlgo.h
cudatest::Matrix
portabletest::Matrix Matrix
Definition:
TestDeviceCollection.h:10
cudatest::testAlgoKernel
static void testAlgoKernel(cudatest::TestHostCollection::View view, int32_t size)
Definition:
TestAlgo.cc:7
Generated for CMSSW Reference Manual by
1.8.14