1359 int& topoId = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1360 int& nRHTopo = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1361 int& nSeeds = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1364 topoId = alpaka::getIdx<alpaka::Grid, alpaka::Blocks>(acc)[0u];
1365 nRHTopo = pfClusteringVars[topoId].topoRHCount();
1366 nSeeds = pfClusteringVars[topoId].topoSeedCount();
1369 alpaka::syncBlockThreads(acc);
1371 if (topoId < nRH && nRHTopo > 0 && nSeeds > 0) {
1372 if (nRHTopo == nSeeds) {
1376 int rhIdx = pfClusteringVars[pfClusteringVars[topoId].topoSeedOffsets()].topoSeedList();
1377 int seedIdx = pfClusteringVars[rhIdx].rhIdxToSeedIdx();
1378 clusterView[seedIdx].energy() =
pfRecHits[rhIdx].energy();
1379 clusterView[seedIdx].x() =
pfRecHits[rhIdx].x();
1380 clusterView[seedIdx].y() =
pfRecHits[rhIdx].y();
1381 clusterView[seedIdx].z() =
pfRecHits[rhIdx].z();
1384 }
else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds == 1) {
1387 acc, pfClusParams,
topology, topoId, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1388 }
else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds <= 100 &&
1391 acc, pfClusParams,
topology, topoId, nSeeds, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1392 }
else if (nSeeds <= 400 && nRHTopo - nSeeds <= 1500) {
1395 acc, pfClusParams,
topology, topoId, nSeeds, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1399 printf(
"Topo cluster %d has %d seeds and %d rechits. Will be processed in next kernel.\n",
static constexpr int threadsPerBlockForClustering
static ALPAKA_FN_ACC void hcalFastCluster_multiSeedIterative(const TAcc &acc, reco::PFClusterParamsDeviceCollection::ConstView pfClusParams, const reco::PFRecHitHCALTopologyDeviceCollection::ConstView topology, int topoId, int nSeeds, int nRHTopo, reco::PFRecHitDeviceCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusterDeviceCollection::View clusterView, reco::PFRecHitFractionDeviceCollection::View fracView)
static ALPAKA_FN_ACC void hcalFastCluster_multiSeedParallel(const TAcc &acc, reco::PFClusterParamsDeviceCollection::ConstView pfClusParams, const reco::PFRecHitHCALTopologyDeviceCollection::ConstView topology, int topoId, int nSeeds, int nRHTopo, reco::PFRecHitDeviceCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusterDeviceCollection::View clusterView, reco::PFRecHitFractionDeviceCollection::View fracView)
static ALPAKA_FN_ACC void hcalFastCluster_singleSeed(const TAcc &acc, reco::PFClusterParamsDeviceCollection::ConstView pfClusParams, const reco::PFRecHitHCALTopologyDeviceCollection::ConstView topology, int topoId, int nRHTopo, reco::PFRecHitDeviceCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusterDeviceCollection::View clusterView, reco::PFRecHitFractionDeviceCollection::View fracView)