1 #ifndef RecoPixelVertexing_PixelVertexFinding_plugins_gpuSplitVertices_h 2 #define RecoPixelVertexing_PixelVertexFinding_plugins_gpuSplitVertices_h 18 auto& __restrict__
data = pdata;
19 auto& __restrict__
ws =
pws;
21 float const* __restrict__
zt =
ws.zt();
22 float const* __restrict__
ezt2 =
ws.ezt2();
23 float* __restrict__
zv =
data.zv();
24 float* __restrict__
wv =
data.wv();
25 float const* __restrict__
chi2 =
data.chi2();
28 int32_t
const* __restrict__
nn =
data.ndof();
29 int32_t* __restrict__
iv =
ws.iv();
43 constexpr
int MAXTK = 512;
47 __shared__ uint32_t it[MAXTK];
48 __shared__
float zz[MAXTK];
49 __shared__ uint8_t newV[MAXTK];
50 __shared__
float ww[MAXTK];
52 __shared__ uint32_t nq;
58 if (
iv[
k] ==
int(kv)) {
61 newV[old] =
zz[old] < 0 ? 0 : 1;
62 ww[old] = 1.f /
ezt2[
k];
67 __shared__
float znew[2], wnew[2];
96 auto d0 = fabs(
zz[
k] - znew[0]);
97 auto d1 = fabs(
zz[
k] - znew[1]);
108 if (0 == wnew[0] || 0 == wnew[1])
112 auto dist2 = (znew[0] - znew[1]) * (znew[0] - znew[1]);
114 auto chi2Dist = dist2 / (1.f / wnew[0] + 1.f / wnew[1]);
117 printf(
"inter %d %f %f\n", 20 -
maxiter, chi2Dist, dist2 *
wv[kv]);
123 __shared__ uint32_t igv;
141 #endif // RecoPixelVertexing_PixelVertexFinding_plugins_gpuSplitVertices_h
__device__ WsSoAView float maxChi2
bool __syncthreads_or(bool x)
float const *__restrict__ zt
__device__ WsSoAView & pws
T1 atomicInc(T1 *a, T2 b)
static const MaxIter maxiter
float const *__restrict__ ezt2
splitVertices(pdata, pws, maxChi2ForSplit)
static constexpr float d0
gpuVertexFinder::workSpace::PixelVertexWorkSpaceSoAView WsSoAView
static constexpr float d1
zVertex::ZVertexSoAView VtxSoAView
T1 atomicAdd(T1 *a, T2 b)