|
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>> |
ALPAKA_FN_ACC void | operator() (TAcc const &acc, const unsigned int numer_of_clusters, float thresholdW0, float positionDeltaRho2, const HGCalSoARecHitsDeviceCollection::ConstView input_rechits_soa, const HGCalSoARecHitsExtraDeviceCollection::ConstView input_clusters_soa, HGCalSoAClustersDeviceCollection::View outputs, HGCalSoAClustersExtraDeviceCollection::View outputs_service) const |
|
◆ operator()()
template<typename TAcc , typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
ALPAKA_FN_ACC void ALPAKA_ACCELERATOR_NAMESPACE::HGCalLayerClustersSoAAlgoKernelPositionByHits::operator() |
( |
TAcc const & |
acc, |
|
|
const unsigned int |
numer_of_clusters, |
|
|
float |
thresholdW0, |
|
|
float |
positionDeltaRho2, |
|
|
const HGCalSoARecHitsDeviceCollection::ConstView |
input_rechits_soa, |
|
|
const HGCalSoARecHitsExtraDeviceCollection::ConstView |
input_clusters_soa, |
|
|
HGCalSoAClustersDeviceCollection::View |
outputs, |
|
|
HGCalSoAClustersExtraDeviceCollection::View |
outputs_service |
|
) |
| const |
|
inline |
Definition at line 42 of file HGCalLayerClustersSoAAlgoWrapper.dev.cc.
References cms::cudacompat::atomicAdd(), f, hgcal::constants::kInvalidCluster, kInvalidIndex, fileCollector::seed, cms::alpakatools::uniform_elements(), and mps_merge::weight.
51 for (int32_t hit_index :
uniform_elements(acc, input_rechits_soa.metadata().size())) {
52 const int cluster_index = input_clusters_soa[hit_index].clusterIndex();
61 int clusterSeed = outputs_service[cluster_index].maxEnergyIndex();
62 float clusterEnergy = (clusterSeed ==
kInvalidIndex) ? 0.
f : input_rechits_soa[clusterSeed].
weight();
64 while (input_rechits_soa[hit_index].
weight() > clusterEnergy) {
69 int seed = alpaka::atomicCas(acc, &outputs_service[cluster_index].maxEnergyIndex(), clusterSeed, hit_index);
70 if (
seed == hit_index) {
constexpr auto kInvalidIndex
static constexpr int kInvalidCluster
T1 atomicAdd(T1 *a, T2 b)