File indexing completed on 2024-09-08 23:51:35
0001
0002
0003
0004
0005
0006
0007 #include "DataFormats/PortableTestObjects/interface/TestHostCollection.h"
0008 #include "DataFormats/PortableTestObjects/interface/TestSoA.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/host.h"
0010
0011 int main() {
0012 constexpr const int size = 42;
0013 portabletest::TestHostCollection collection(size, cms::alpakatools::host());
0014
0015 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
0016 const portabletest::Array flags = {{6, 4, 2, 0}};
0017
0018 collection.zeroInitialise();
0019
0020 collection.view().r() = 1.;
0021
0022 for (int i = 0; i < size; ++i) {
0023 collection.view()[i] = {0.568, 0.823, 0., i, flags, matrix * i};
0024 }
0025
0026 return 0;
0027 }