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;
41 constexpr
int MAXTK = 512;
45 __shared__ uint32_t it[MAXTK];
46 __shared__
float zz[MAXTK];
47 __shared__ uint8_t newV[MAXTK];
48 __shared__
float ww[MAXTK];
50 __shared__ uint32_t nq;
56 if (
iv[
k] ==
int(kv)) {
59 newV[old] =
zz[old] < 0 ? 0 : 1;
60 ww[old] = 1.f /
ezt2[
k];
65 __shared__
float znew[2], wnew[2];
94 auto d0 = fabs(
zz[
k] - znew[0]);
95 auto d1 = fabs(
zz[
k] - znew[1]);
106 if (0 == wnew[0] || 0 == wnew[1])
110 auto dist2 = (znew[0] - znew[1]) * (znew[0] - znew[1]);
112 auto chi2Dist = dist2 / (1.f / wnew[0] + 1.f / wnew[1]);
115 printf(
"inter %d %f %f\n", 20 -
maxiter, chi2Dist, dist2 *
wv[kv]);
121 __shared__ uint32_t igv;
139 #endif // RecoPixelVertexing_PixelVertexFinding_plugins_gpuSplitVertices_h