Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-02-14 04:11:34

0001 #ifndef DataFormats_PortableTestObjects_interface_alpaka_TestDeviceCollection_h
0002 #define DataFormats_PortableTestObjects_interface_alpaka_TestDeviceCollection_h
0003 
0004 #include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
0005 #include "DataFormats/PortableTestObjects/interface/TestHostCollection.h"
0006 #include "DataFormats/PortableTestObjects/interface/TestSoA.h"
0007 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0008 
0009 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0010 
0011   namespace portabletest {
0012 
0013     // make the names from the top-level portabletest namespace visible for unqualified lookup
0014     // inside the ALPAKA_ACCELERATOR_NAMESPACE::portabletest namespace
0015     using namespace ::portabletest;
0016 
0017     // SoA with x, y, z, id fields in host memory
0018     using ::portabletest::TestHostCollection;
0019 
0020     // SoA with x, y, z, id fields in device global memory
0021     using TestDeviceCollection = PortableCollection<TestSoA>;
0022 
0023     using TestDeviceMultiCollection2 = PortableCollection2<TestSoA, TestSoA2>;
0024 
0025     using TestDeviceMultiCollection3 = PortableCollection3<TestSoA, TestSoA2, TestSoA3>;
0026 
0027   }  // namespace portabletest
0028 
0029 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE
0030 
0031 // check that the portable device collection for the host device is the same as the portable host collection
0032 ASSERT_DEVICE_MATCHES_HOST_COLLECTION(portabletest::TestDeviceCollection, portabletest::TestHostCollection);
0033 
0034 #endif  // DataFormats_PortableTestObjects_interface_alpaka_TestDeviceCollection_h