1 #ifndef RecoTracker_LSTCore_src_alpaka_NeuralNetwork_h 2 #define RecoTracker_LSTCore_src_alpaka_NeuralNetwork_h 17 template <
typename TAcc>
25 const unsigned int* mdIndices,
26 const uint16_t* lowerModuleIndices,
27 unsigned int innerTripletIndex,
28 unsigned int outerTripletIndex,
45 unsigned int mdIndex1 = mdIndices[0];
46 unsigned int mdIndex2 = mdIndices[1];
47 unsigned int mdIndex3 = mdIndices[2];
48 unsigned int mdIndex4 = mdIndices[3];
49 unsigned int mdIndex5 = mdIndices[4];
51 uint16_t lowerModuleIndex1 = lowerModuleIndices[0];
52 uint16_t lowerModuleIndex2 = lowerModuleIndices[1];
53 uint16_t lowerModuleIndex3 = lowerModuleIndices[2];
54 uint16_t lowerModuleIndex4 = lowerModuleIndices[3];
55 uint16_t lowerModuleIndex5 = lowerModuleIndices[4];
57 short layer2_adjustment = 0;
58 if (
modules.layers()[lowerModuleIndex1] == 1) {
59 layer2_adjustment = 1;
61 unsigned int md_idx_for_t5_eta_phi =
62 segments.mdIndices()[triplets.segmentIndices()[innerTripletIndex][0]][layer2_adjustment];
63 bool is_endcap1 = (
modules.subdets()[lowerModuleIndex1] == 4);
64 bool is_endcap2 = (
modules.subdets()[lowerModuleIndex2] == 4);
65 bool is_endcap3 = (
modules.subdets()[lowerModuleIndex3] == 4);
66 bool is_endcap4 = (
modules.subdets()[lowerModuleIndex4] == 4);
67 bool is_endcap5 = (
modules.subdets()[lowerModuleIndex5] == 4);
72 mds.anchorEta()[mdIndex1],
73 mds.anchorPhi()[mdIndex1],
74 mds.anchorZ()[mdIndex1],
76 float(
modules.layers()[lowerModuleIndex1] + 6 * is_endcap1),
77 mds.anchorEta()[mdIndex2],
78 mds.anchorPhi()[mdIndex2],
79 mds.anchorZ()[mdIndex2],
81 float(
modules.layers()[lowerModuleIndex2] + 6 * is_endcap2),
82 mds.anchorEta()[mdIndex3],
83 mds.anchorPhi()[mdIndex3],
84 mds.anchorZ()[mdIndex3],
86 float(
modules.layers()[lowerModuleIndex3] + 6 * is_endcap3),
88 mds.anchorEta()[mdIndex3],
89 mds.anchorPhi()[mdIndex3],
90 mds.anchorZ()[mdIndex3],
92 float(
modules.layers()[lowerModuleIndex3] + 6 * is_endcap3),
93 mds.anchorEta()[mdIndex4],
94 mds.anchorPhi()[mdIndex4],
95 mds.anchorZ()[mdIndex4],
97 float(
modules.layers()[lowerModuleIndex4] + 6 * is_endcap4),
98 mds.anchorEta()[mdIndex5],
99 mds.anchorPhi()[mdIndex5],
100 mds.anchorZ()[mdIndex5],
102 float(
modules.layers()[lowerModuleIndex5] + 6 * is_endcap5),
104 mds.anchorEta()[md_idx_for_t5_eta_phi],
105 mds.anchorPhi()[md_idx_for_t5_eta_phi],
107 alpaka::math::log10(acc, bridgeRadius),
113 for (
unsigned int col = 0;
col < 32; ++
col) {
123 for (
unsigned int col = 0;
col < 32; ++
col) {
129 for (
unsigned int col = 0;
col < 32; ++
col) {
139 for (
unsigned int col = 0;
col < 32; ++
col) {
145 for (
unsigned int col = 0;
col < 1; ++
col) {
155 for (
unsigned int col = 0;
col < 1; ++
col) {
ALPAKA_FN_ACC ALPAKA_FN_INLINE float runInference(TAcc const &acc, ModulesConst modules, MiniDoubletsConst mds, SegmentsConst segments, TripletsConst triplets, const float *xVec, const float *yVec, const unsigned int *mdIndices, const uint16_t *lowerModuleIndices, unsigned int innerTripletIndex, unsigned int outerTripletIndex, float innerRadius, float outerRadius, float bridgeRadius)
ALPAKA_STATIC_ACC_MEM_GLOBAL constexpr float k2Rinv1GeVf
TripletsSoA::ConstView TripletsConst
ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_0[38][32]
ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_4[1]
MiniDoubletsSoA::ConstView MiniDoubletsConst
ModulesSoA::ConstView ModulesConst
ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_4[32][1]
SegmentsSoA::ConstView SegmentsConst
ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_2[32]
ALPAKA_STATIC_ACC_MEM_GLOBAL const float wgtT_2[32][32]
ALPAKA_STATIC_ACC_MEM_GLOBAL const float bias_0[32]