1 #ifndef RecoParticleFlow_PFClusterProducer_plugins_alpaka_PFClusterECLCC_h 2 #define RecoParticleFlow_PFClusterProducer_plugins_alpaka_PFClusterECLCC_h 67 int curr = pfClusteringVars[
idx].pfrh_topoId();
70 while (curr > (
next = pfClusteringVars[curr].pfrh_topoId())) {
71 pfClusteringVars[prev].pfrh_topoId() =
next;
82 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
89 const int beg = pfClusteringEdgeVars[
v].pfrh_edgeIdx();
90 const int end = pfClusteringEdgeVars[
v + 1].pfrh_edgeIdx();
93 while ((
m ==
v) && (
i < end)) {
94 m =
std::min(
m, pfClusteringEdgeVars[
i].pfrh_edgeList());
97 pfClusteringVars[
v].pfrh_topoId() =
m;
106 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
114 const int vstat = pfClusteringVars[
v].pfrh_topoId();
116 const int beg = pfClusteringEdgeVars[
v].pfrh_edgeIdx();
117 const int end = pfClusteringEdgeVars[
v + 1].pfrh_edgeIdx();
119 for (
int i = beg;
i < end;
i++) {
120 const int nli = pfClusteringEdgeVars[
i].pfrh_edgeList();
126 if (vstat != ostat) {
129 if ((
ret = alpaka::atomicCas(acc, &pfClusteringVars[ostat].pfrh_topoId(), ostat, vstat)) != ostat) {
134 if ((
ret = alpaka::atomicCas(acc, &pfClusteringVars[vstat].pfrh_topoId(), vstat, ostat)) != vstat) {
151 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
159 int next, vstat = pfClusteringVars[
v].pfrh_topoId();
160 const int old = vstat;
161 while (vstat > (
next = pfClusteringVars[vstat].pfrh_topoId())) {
165 pfClusteringVars[
v].pfrh_topoId() = vstat;
ret
prodAgent to be discontinued
ALPAKA_FN_ACC int representative(const int idx, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars)
ALPAKA_FN_ACC void operator()(const TAcc &acc, reco::PFRecHitHostCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusteringEdgeVarsDeviceCollection::View pfClusteringEdgeVars) const
typename Layout::View View
typename Layout::ConstView ConstView
ALPAKA_FN_ACC void operator()(const TAcc &acc, reco::PFRecHitHostCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusteringEdgeVarsDeviceCollection::View pfClusteringEdgeVars) const
ALPAKA_FN_ACC void operator()(const TAcc &acc, reco::PFRecHitHostCollection::ConstView pfRecHits, reco::PFClusteringVarsDeviceCollection::View pfClusteringVars, reco::PFClusteringEdgeVarsDeviceCollection::View pfClusteringEdgeVars) const