Skip to content

Commit

Permalink
Addressing comments and adding new features
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianoDee committed Nov 21, 2023
1 parent b4dede0 commit b64e14b
Show file tree
Hide file tree
Showing 60 changed files with 432 additions and 505 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTDevice_h
#define CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTDevice_h

#include <alpaka/alpaka.hpp>
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibrationForHLTLayout.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

using SiPixelGainCalibrationForHLTDevice = PortableCollection<SiPixelGainCalibrationForHLTSoA>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE
#endif // CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTDevice_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#ifndef CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h
#define CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h

#include <cstdint>
#include <alpaka/alpaka.hpp>
#include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibrationForHLTLayout.h"

struct SiPixelGainUtilities {
ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC ALPAKA_FN_INLINE static std::pair<float, float> getPedAndGain(
const SiPixelGainCalibrationForHLTSoAConstView& view,
uint32_t moduleInd,
int col,
int row,
bool& isDeadColumn,
bool& isNoisyColumn) {
auto start = view.modStarts()[moduleInd];
auto end = view.modEnds()[moduleInd];
auto nCols = view.modCols()[moduleInd];
// determine what averaged data block we are in (there should be 1 or 2 of these depending on if plaquette is 1 by X or 2 by X
unsigned int lengthOfColumnData = (end - start) / nCols;
unsigned int lengthOfAveragedDataInEachColumn = 2; // we always only have two values per column averaged block
unsigned int numberOfDataBlocksToSkip = row / view.numberOfRowsAveragedOver();

auto offset = start + col * lengthOfColumnData + lengthOfAveragedDataInEachColumn * numberOfDataBlocksToSkip;
assert(offset < end);
assert(offset < 3088384);
assert(0 == offset % 2);

auto lp = view.v_pedestals();
auto s = lp[offset / 2];

isDeadColumn = (s.ped & 0xFF) == view.deadFlag();
isNoisyColumn = (s.ped & 0xFF) == view.noisyFlag();
float decodeGain = float(s.gain & 0xFF) * view.gainPrecision() + view.minGain();
float decodePed = float(s.ped & 0xFF) * view.pedPrecision() + view.minPed();

return std::make_pair(decodePed, decodeGain);
};
};

#endif //CondFormats_SiPixelObjects_interface_alpaka_SiPixelGainCalibrationForHLTUtilities_h
17 changes: 17 additions & 0 deletions CondFormats/SiPixelObjects/interface/alpaka/SiPixelMappingDevice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef CondFormats_SiPixelObjects_interface_alpaka_SiPixelMappingDevice_h
#define CondFormats_SiPixelObjects_interface_alpaka_SiPixelMappingDevice_h

#include <cstdint>
#include <alpaka/alpaka.hpp>
#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "CondFormats/SiPixelObjects/interface/SiPixelMappingLayout.h"
#include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESProducer.h"
#include "DataFormats/Portable/interface/PortableHostCollection.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

using SiPixelMappingDevice = PortableCollection<SiPixelMappingSoA>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

#endif // DataFormats_SiPixelMappingSoA_alpaka_SiPixelClustersDevice_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef CondFormats_SiPixelObjects_interface_alpaka_SiPixelMappingUtilities_h
#define CondFormats_SiPixelObjects_interface_alpaka_SiPixelMappingUtilities_h

#include <cstdint>
#include <alpaka/alpaka.hpp>
#include "CondFormats/SiPixelObjects/interface/SiPixelMappingLayout.h"
#include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
#include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingTree.h"
#include "HeterogeneousCore/AlpakaInterface/interface/memory.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

struct SiPixelMappingUtilities {
ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC ALPAKA_FN_INLINE static bool hasQuality(const SiPixelMappingSoAConstView& view) {
return view.hasQuality();
}

ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC ALPAKA_FN_INLINE static cms::alpakatools::device_buffer<Device, unsigned char[]>
getModToUnpRegionalAsync(std::set<unsigned int> const& modules,
const SiPixelFedCablingTree* cabling,
std::vector<unsigned int> const& fedIds,
Queue& queue) {
auto modToUnpDevice = cms::alpakatools::make_device_buffer<unsigned char[]>(queue, pixelgpudetails::MAX_SIZE);
auto modToUnpHost = cms::alpakatools::make_host_buffer<unsigned char[]>(queue, pixelgpudetails::MAX_SIZE);

unsigned int startFed = fedIds.front();
unsigned int endFed = fedIds.back() - 1;

sipixelobjects::CablingPathToDetUnit path;
int index = 1;

for (unsigned int fed = startFed; fed <= endFed; fed++) {
for (unsigned int link = 1; link <= pixelgpudetails::MAX_LINK; link++) {
for (unsigned int roc = 1; roc <= pixelgpudetails::MAX_ROC; roc++) {
path = {fed, link, roc};
const sipixelobjects::PixelROC* pixelRoc = cabling->findItem(path);
if (pixelRoc != nullptr) {
modToUnpHost[index] = (not modules.empty()) and (modules.find(pixelRoc->rawId()) == modules.end());
} else { // store some dummy number
modToUnpHost[index] = true;
}
index++;
}
}
}

alpaka::memcpy(queue, modToUnpDevice, modToUnpHost);

return modToUnpDevice;
}
};
} // namespace ALPAKA_ACCELERATOR_NAMESPACE
#endif //CondFormats_SiPixelObjects_interface_alpaka_SiPixelMappingUtilities_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "CondFormats/SiPixelObjects/interface/alpaka/SiPixelGainCalibrationForHLTDevice.h"
#include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h"

TYPELOOKUP_ALPAKA_DATA_REG(SiPixelGainCalibrationForHLTDevice);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "CondFormats/SiPixelObjects/interface/alpaka/SiPixelMappingDevice.h"
#include "HeterogeneousCore/AlpakaCore/interface/alpaka/typelookup.h"

TYPELOOKUP_ALPAKA_DATA_REG(SiPixelMappingDevice);
1 change: 0 additions & 1 deletion DataFormats/SiPixelClusterSoA/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!-- <use name="alpaka"/> -->
<use name="rootcore"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/Portable"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersCollection_h
#define DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersCollection_h
#ifndef DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersSoACollection_h
#define DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersSoACollection_h

#include <alpaka/alpaka.hpp>

Expand All @@ -22,10 +22,13 @@ namespace cms::alpakatools {
SiPixelClustersHost dstData(srcData->metadata().size(), queue);
alpaka::memcpy(queue, dstData.buffer(), srcData.buffer());
dstData.setNClusters(srcData.nClusters(), srcData.offsetBPIX2());
#ifdef GPU_DEBUG //keeping this untiil copies are in the Tracer
printf("SiPixelClustersSoACollection: I'm copying to host.\n");
#endif
return dstData;
}
};
} // namespace cms::alpakatools

ASSERT_DEVICE_MATCHES_HOST_COLLECTION(SiPixelClustersCollection, SiPixelClustersHost);
#endif // DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersCollection_h
ASSERT_DEVICE_MATCHES_HOST_COLLECTION(SiPixelClustersSoACollection, SiPixelClustersHost);
#endif // DataFormats_SiPixelClusterSoA_interface_alpaka_SiPixelClustersSoACollection_h
2 changes: 1 addition & 1 deletion DataFormats/SiPixelClusterSoA/src/alpaka/classes_cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/Common/interface/DeviceProduct.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersCollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersSoACollection.h"

#endif // DataFormats_SiPixelClusterSoA_src_alpaka_classes_cuda_h
6 changes: 3 additions & 3 deletions DataFormats/SiPixelClusterSoA/src/alpaka/classes_cuda_def.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<lcgdict>
<class name="alpaka_cuda_async::PortableCollection<SiPixelClustersSoA>" persistent="false"/>
<class name="alpaka_cuda_async::SiPixelClustersCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_cuda_async::SiPixelClustersCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::SiPixelClustersCollection>>" persistent="false"/>
<class name="alpaka_cuda_async::SiPixelClustersSoACollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_cuda_async::SiPixelClustersSoACollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::SiPixelClustersSoACollection>>" persistent="false"/>
</lcgdict>
2 changes: 1 addition & 1 deletion DataFormats/SiPixelClusterSoA/src/alpaka/classes_rocm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/Common/interface/DeviceProduct.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersCollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersSoACollection.h"

#endif // DataFormats_SiPixelClusterSoA_src_alpaka_classes_rocm_h
6 changes: 3 additions & 3 deletions DataFormats/SiPixelClusterSoA/src/alpaka/classes_rocm_def.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<lcgdict>
<class name="alpaka_rocm_async::PortableCollection<SiPixelClustersSoA>" persistent="false"/>
<class name="alpaka_rocm_async::SiPixelClustersCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_rocm_async::SiPixelClustersCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::SiPixelClustersCollection>>" persistent="false"/>
<class name="alpaka_rocm_async::SiPixelClustersSoACollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_rocm_async::SiPixelClustersSoACollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::SiPixelClustersSoACollection>>" persistent="false"/>
</lcgdict>
4 changes: 2 additions & 2 deletions DataFormats/SiPixelClusterSoA/test/alpaka/Clusters_test.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <alpaka/alpaka.hpp>

#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersCollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersSoACollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersDevice.h"
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersHost.h"
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersSoA.h"
Expand Down Expand Up @@ -29,7 +29,7 @@ int main() {
{
// Instantiate tracks on device. PortableDeviceCollection allocates
// SoA on device automatically.
SiPixelClustersCollection clusters_d(100, queue);
SiPixelClustersSoACollection clusters_d(100, queue);
testClusterSoA::runKernels(clusters_d.view(), queue);

// Instantate tracks on host. This is where the data will be
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersCollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/alpaka/SiPixelClustersSoACollection.h"
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersDevice.h"
#include "DataFormats/SiPixelClusterSoA/interface/SiPixelClustersHost.h"
#include "HeterogeneousCore/AlpakaInterface/interface/workdivision.h"
Expand Down
1 change: 0 additions & 1 deletion DataFormats/SiPixelDigiSoA/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<use name="alpaka"/>
<use name="rootcore"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/Portable"/>
Expand Down
8 changes: 4 additions & 4 deletions DataFormats/SiPixelDigiSoA/interface/SiPixelDigisDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
#include <alpaka/alpaka.hpp>

#include "DataFormats/Portable/interface/PortableDeviceCollection.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisSoAv2.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisSoA.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

template <typename TDev>
class SiPixelDigisDevice : public PortableDeviceCollection<SiPixelDigisSoAv2, TDev> {
class SiPixelDigisDevice : public PortableDeviceCollection<SiPixelDigisSoA, TDev> {
public:
SiPixelDigisDevice() = default;
template <typename TQueue>
explicit SiPixelDigisDevice(size_t maxFedWords, TQueue queue)
: PortableDeviceCollection<SiPixelDigisSoAv2, TDev>(maxFedWords + 1, queue) {}
: PortableDeviceCollection<SiPixelDigisSoA, TDev>(maxFedWords + 1, queue) {}

// Constructor which specifies the SoA size
explicit SiPixelDigisDevice(size_t maxFedWords, TDev const &device)
: PortableDeviceCollection<SiPixelDigisSoAv2, TDev>(maxFedWords + 1, device) {}
: PortableDeviceCollection<SiPixelDigisSoA, TDev>(maxFedWords + 1, device) {}

void setNModulesDigis(uint32_t nModules, uint32_t nDigis) {
nModules_h = nModules;
Expand Down
6 changes: 3 additions & 3 deletions DataFormats/SiPixelDigiSoA/interface/SiPixelDigisHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#define DataFormats_SiPixelDigiSoA_interface_SiPixelDigisHost_h

#include "DataFormats/Portable/interface/PortableHostCollection.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisSoAv2.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisSoA.h"

// TODO: The class is created via inheritance of the PortableDeviceCollection.
// This is generally discouraged, and should be done via composition.
// See: https://github.com/cms-sw/cmssw/pull/40465#discussion_r1067364306
class SiPixelDigisHost : public PortableHostCollection<SiPixelDigisSoAv2> {
class SiPixelDigisHost : public PortableHostCollection<SiPixelDigisSoA> {
public:
SiPixelDigisHost() = default;
template <typename TQueue>
explicit SiPixelDigisHost(size_t maxFedWords, TQueue queue)
: PortableHostCollection<SiPixelDigisSoAv2>(maxFedWords + 1, queue) {}
: PortableHostCollection<SiPixelDigisSoA>(maxFedWords + 1, queue) {}

void setNModulesDigis(uint32_t nModules, uint32_t nDigis) {
nModules_h = nModules;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoAv2_h
#define DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoAv2_h
#ifndef DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoA_h
#define DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoA_h

#include "DataFormats/SoATemplate/interface/SoALayout.h"

Expand All @@ -12,8 +12,8 @@ GENERATE_SOA_LAYOUT(SiPixelDigisLayout,
SOA_COLUMN(uint16_t, yy),
SOA_COLUMN(uint16_t, moduleId))

using SiPixelDigisSoAv2 = SiPixelDigisLayout<>;
using SiPixelDigisSoAv2View = SiPixelDigisSoAv2::View;
using SiPixelDigisSoAv2ConstView = SiPixelDigisSoAv2::ConstView;
using SiPixelDigisSoA = SiPixelDigisLayout<>;
using SiPixelDigisSoAView = SiPixelDigisSoA::View;
using SiPixelDigisSoAConstView = SiPixelDigisSoA::ConstView;

#endif // DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoAv2_h
#endif // DataFormats_SiPixelDigiSoA_interface_SiPixelDigisSoA_h
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
#ifndef DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsCollection_h
#define DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsCollection_h
#ifndef DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h
#define DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h

#include <cstdint>

#include <alpaka/alpaka.hpp>

#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigiErrorsHost.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigiErrorsDevice.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"
#include "HeterogeneousCore/AlpakaInterface/interface/memory.h"
#include "HeterogeneousCore/AlpakaInterface/interface/CopyToHost.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {
#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
using SiPixelDigiErrorsCollection = SiPixelDigiErrorsHost;
#else
using SiPixelDigiErrorsCollection = SiPixelDigiErrorsDevice<Device>;
#endif

using SiPixelDigiErrorsSoACollection =
std::conditional_t<std::is_same_v<Device, alpaka::DevCpu>, SiPixelDigiErrorsHost, SiPixelDigiErrorsDevice<Device>>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

namespace cms::alpakatools {
template <>
struct CopyToHost<ALPAKA_ACCELERATOR_NAMESPACE::SiPixelDigiErrorsCollection> {
template <typename TDevice>
struct CopyToHost<SiPixelDigiErrorsDevice<TDevice>> {
template <typename TQueue>
static auto copyAsync(TQueue& queue, ALPAKA_ACCELERATOR_NAMESPACE::SiPixelDigiErrorsCollection const& srcData) {
static auto copyAsync(TQueue& queue, SiPixelDigiErrorsDevice<TDevice> const& srcData) {
SiPixelDigiErrorsHost dstData(srcData.maxFedWords(), queue);
alpaka::memcpy(queue, dstData.buffer(), srcData.buffer());

#ifdef GPU_DEBUG
printf("SiPixelDigiErrorsSoACollection: I'm copying to host.\n");
#endif
return dstData;
}
};
} // namespace cms::alpakatools

#endif // DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsCollection_h
ASSERT_DEVICE_MATCHES_HOST_COLLECTION(SiPixelDigiErrorsSoACollection, SiPixelDigiErrorsHost);

#endif // DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigiErrorsSoACollection_h
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
#ifndef DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisCollection_h
#define DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisCollection_h
#ifndef DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisSoACollection_h
#define DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisSoACollection_h

#include <cstdint>

#include <alpaka/alpaka.hpp>

#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisDevice.h"
#include "DataFormats/SiPixelDigiSoA/interface/SiPixelDigisHost.h"
#include "HeterogeneousCore/AlpakaInterface/interface/CopyToHost.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

#ifdef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED
using SiPixelDigisCollection = SiPixelDigisHost;
#else
using SiPixelDigisCollection = SiPixelDigisDevice<Device>;
#endif
using SiPixelDigisSoACollection =
std::conditional_t<std::is_same_v<Device, alpaka::DevCpu>, SiPixelDigisHost, SiPixelDigisDevice<Device>>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

namespace cms::alpakatools {
template <>
struct CopyToHost<ALPAKA_ACCELERATOR_NAMESPACE::SiPixelDigisCollection> {
template <typename TDevice>
struct CopyToHost<SiPixelDigisDevice<TDevice>> {
template <typename TQueue>
static auto copyAsync(TQueue &queue, ALPAKA_ACCELERATOR_NAMESPACE::SiPixelDigisCollection const &srcData) {
static auto copyAsync(TQueue &queue, SiPixelDigisDevice<TDevice> const &srcData) {
SiPixelDigisHost dstData(srcData.view().metadata().size(), queue);
alpaka::memcpy(queue, dstData.buffer(), srcData.buffer());
dstData.setNModulesDigis(srcData.nModules(), srcData.nDigis());
Expand All @@ -33,4 +31,6 @@ namespace cms::alpakatools {
};
} // namespace cms::alpakatools

#endif // DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisCollection_h
ASSERT_DEVICE_MATCHES_HOST_COLLECTION(SiPixelDigisSoACollection, SiPixelDigisHost);

#endif // DataFormats_SiPixelDigiSoA_interface_alpaka_SiPixelDigisSoACollection_h
Loading

0 comments on commit b64e14b

Please sign in to comment.