1360 int& topoId = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1361 int& nRHTopo = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1362 int& nSeeds = alpaka::declareSharedVar<int, __COUNTER__>(acc);
1365 topoId = alpaka::getIdx<alpaka::Grid, alpaka::Blocks>(acc)[0u];
1366 nRHTopo = pfClusteringVars[topoId].topoRHCount();
1367 nSeeds = pfClusteringVars[topoId].topoSeedCount();
1370 alpaka::syncBlockThreads(acc);
1372 if (topoId < nRH && nRHTopo > 0 && nSeeds > 0) {
1373 if (nRHTopo == nSeeds) {
1377 int rhIdx = pfClusteringVars[pfClusteringVars[topoId].topoSeedOffsets()].topoSeedList();
1378 int seedIdx = pfClusteringVars[rhIdx].rhIdxToSeedIdx();
1379 clusterView[seedIdx].energy() =
pfRecHits[rhIdx].energy();
1380 clusterView[seedIdx].x() =
pfRecHits[rhIdx].x();
1381 clusterView[seedIdx].y() =
pfRecHits[rhIdx].y();
1382 clusterView[seedIdx].z() =
pfRecHits[rhIdx].z();
1385 }
else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds == 1) {
1388 acc, pfClusParams,
topology, topoId, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1389 }
else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds <= 100 &&
1392 acc, pfClusParams,
topology, topoId, nSeeds, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1393 }
else if (nSeeds <= 400 && nRHTopo - nSeeds <= 1500) {
1396 acc, pfClusParams,
topology, topoId, nSeeds, nRHTopo,
pfRecHits, pfClusteringVars, clusterView, fracView);
1400 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)