CMS 3D CMS Logo

List of all members | Static Public Member Functions
ALPAKA_ACCELERATOR_NAMESPACE::SiPixelMappingUtilities Struct Reference

#include <SiPixelMappingUtilities.h>

Static Public Member Functions

ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC static ALPAKA_FN_INLINE 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)
 
ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC static ALPAKA_FN_INLINE bool hasQuality (const SiPixelMappingSoAConstView &view)
 

Detailed Description

Definition at line 20 of file SiPixelMappingUtilities.h.

Member Function Documentation

◆ getModToUnpRegionalAsync()

ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC static ALPAKA_FN_INLINE cms::alpakatools::device_buffer<Device, unsigned char[]> ALPAKA_ACCELERATOR_NAMESPACE::SiPixelMappingUtilities::getModToUnpRegionalAsync ( std::set< unsigned int > const &  modules,
const SiPixelFedCablingTree cabling,
std::vector< unsigned int > const &  fedIds,
Queue &  queue 
)
inlinestatic

Definition at line 26 of file SiPixelMappingUtilities.h.

References L1TStage2BMTF_cff::fedIds, SiPixelFedCablingTree::findItem(), pixelgpudetails::MAX_LINK, pixelgpudetails::MAX_ROC, pixelgpudetails::MAX_SIZE, castor_dqm_sourceclient_file_cfg::path, createBeamHaloJobs::queue, sipixelobjects::PixelROC::rawId(), and PixelMapPlotter::roc.

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::SiPixelRawToCluster< TrackerTraits >::acquire().

29  {
30  auto modToUnpDevice = cms::alpakatools::make_device_buffer<unsigned char[]>(queue, pixelgpudetails::MAX_SIZE);
31  auto modToUnpHost = cms::alpakatools::make_host_buffer<unsigned char[]>(queue, pixelgpudetails::MAX_SIZE);
32 
33  unsigned int startFed = fedIds.front();
34  unsigned int endFed = fedIds.back() - 1;
35 
37  int index = 1;
38 
39  for (unsigned int fed = startFed; fed <= endFed; fed++) {
40  for (unsigned int link = 1; link <= pixelgpudetails::MAX_LINK; link++) {
41  for (unsigned int roc = 1; roc <= pixelgpudetails::MAX_ROC; roc++) {
42  path = {fed, link, roc};
43  const sipixelobjects::PixelROC* pixelRoc = cabling->findItem(path);
44  if (pixelRoc != nullptr) {
45  modToUnpHost[index] = (not modules.empty()) and (modules.find(pixelRoc->rawId()) == modules.end());
46  } else { // store some dummy number
47  modToUnpHost[index] = true;
48  }
49  index++;
50  }
51  }
52  }
53 
54  alpaka::memcpy(queue, modToUnpDevice, modToUnpHost);
55 
56  return modToUnpDevice;
57  }
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
constexpr unsigned int MAX_ROC
constexpr unsigned int MAX_SIZE
constexpr unsigned int MAX_LINK
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
Definition: PixelROC.h:34

◆ hasQuality()

ALPAKA_FN_HOST_ACC ALPAKA_FN_ACC static ALPAKA_FN_INLINE bool ALPAKA_ACCELERATOR_NAMESPACE::SiPixelMappingUtilities::hasQuality ( const SiPixelMappingSoAConstView view)
inlinestatic

Definition at line 21 of file SiPixelMappingUtilities.h.

21  {
22  return view.hasQuality();
23  }