CMS 3D CMS Logo

SiPixelDigiErrorsSoACollection.h
Go to the documentation of this file.
1 #ifndef DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h
2 #define DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h
3 
4 #include <cstdint>
5 
6 #include <alpaka/alpaka.hpp>
7 
14 
16 
18  std::conditional_t<std::is_same_v<Device, alpaka::DevCpu>, SiPixelDigiErrorsHost, SiPixelDigiErrorsDevice<Device>>;
19 
20 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
21 
22 namespace cms::alpakatools {
23  template <typename TDevice>
25  template <typename TQueue>
26  static auto copyAsync(TQueue& queue, SiPixelDigiErrorsDevice<TDevice> const& srcData) {
27  SiPixelDigiErrorsHost dstData(srcData.maxFedWords(), queue);
28  alpaka::memcpy(queue, dstData.buffer(), srcData.buffer());
29 #ifdef GPU_DEBUG
30  printf("SiPixelDigiErrorsSoACollection: I'm copying to host.\n");
31 #endif
32  return dstData;
33  }
34  };
35 } // namespace cms::alpakatools
36 
38 
39 #endif // DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h
#define ASSERT_DEVICE_MATCHES_HOST_COLLECTION(DEVICE_COLLECTION, HOST_COLLECTION)
static auto copyAsync(TQueue &queue, SiPixelDigiErrorsDevice< TDevice > const &srcData)
std::conditional_t< std::is_same_v< Device, alpaka::DevCpu >, SiPixelDigiErrorsHost, SiPixelDigiErrorsDevice< Device > > SiPixelDigiErrorsSoACollection