1- // Copyright (C) 2020-2023 CERN and UCLouvain.
1+ // Copyright (C) 2020-2024 CERN and UCLouvain.
22// Licensed under the GNU Lesser General Public License (version 3 or later).
33// Created by: A. Valassi (Jan 2022) for the MG5aMC CUDACPP plugin.
4- // Further modified by: A. Valassi (2022-2023 ) for the MG5aMC CUDACPP plugin.
4+ // Further modified by: A. Valassi (2022-2024 ) for the MG5aMC CUDACPP plugin.
55
66#ifndef MemoryAccessMatrixElements_H
77#define MemoryAccessMatrixElements_H 1
@@ -107,12 +107,12 @@ namespace mg5amcCpu
107107 MemoryAccessHelper<MemoryAccessMatrixElementsBase>::template decodeRecordConst<int >;
108108
109109 // Locate a field (output) in a memory buffer (input) from the given event number (input) and the given field indexes (input)
110- // [Signature (non-const) ===> fptype& ieventAccess ( fptype* buffer, const ievt, const ihel ) <===]
110+ // [Signature (non-const) ===> fptype& ieventAccessIhel ( fptype* buffer, const ievt, const ihel ) <===]
111111 static constexpr auto ieventAccessIhel =
112112 MemoryAccessHelper<MemoryAccessMatrixElementsBase>::template ieventAccessField<int >;
113113
114114 // Locate a field (output) in a memory buffer (input) from the given event number (input) and the given field indexes (input)
115- // [Signature (const) ===> const fptype& ieventAccessConst ( const fptype* buffer, const ievt, const ihel ) <===]
115+ // [Signature (const) ===> const fptype& ieventAccessIhelConst ( const fptype* buffer, const ievt, const ihel ) <===]
116116 static constexpr auto ieventAccessIhelConst =
117117 MemoryAccessHelper<MemoryAccessMatrixElementsBase>::template ieventAccessFieldConst<int >;
118118 };
@@ -130,16 +130,16 @@ namespace mg5amcCpu
130130 static constexpr auto ieventAccessRecord = MemoryAccessMatrixElements::ieventAccessRecord;
131131
132132 // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input)
133- // [Signature (non-const, SCALAR) ===> fptype& kernelAccess_s ( fptype* buffer, const int ihel ) <===]
133+ // [Signature (non-const, SCALAR) ===> fptype& kernelAccessIhel_s ( fptype* buffer, const int ihel ) <===]
134134 static constexpr auto kernelAccessIhel_s =
135135 KernelAccessHelper<MemoryAccessMatrixElementsBase, onDevice>::template kernelAccessField<int >; // requires cuda 11.4
136136
137137 // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal)
138- // [Signature (non const, SCALAR OR VECTOR) ===> fptype_sv& kernelAccess ( const fptype* buffer, const int ihel ) <===]
138+ // [Signature (non const, SCALAR OR VECTOR) ===> fptype_sv& kernelAccessIhel ( const fptype* buffer, const int ihel ) <===]
139139 static __host__ __device__ inline fptype_sv&
140- kernelAccessIhel ( fptype* buffer )
140+ kernelAccessIhel ( fptype* buffer, const int ihel )
141141 {
142- fptype& out = kernelAccessIhel_s ( buffer );
142+ fptype& out = kernelAccessIhel_s ( buffer, ihel );
143143#ifndef MGONGPU_CPPSIMD
144144 return out;
145145#else
@@ -151,7 +151,7 @@ namespace mg5amcCpu
151151 }
152152
153153 // Locate a field (output) in a memory buffer (input) from a kernel event-indexing mechanism (internal) and the given field indexes (input)
154- // [Signature (const) ===> const fptype& kernelAccessConst ( const fptype* buffer, const int ihel ) <===]
154+ // [Signature (const) ===> const fptype& kernelAccessIhelConst ( const fptype* buffer, const int ihel ) <===]
155155 static constexpr auto kernelAccessIhelConst =
156156 KernelAccessHelper<MemoryAccessMatrixElementsBase, onDevice>::template kernelAccessFieldConst<int >; // requires cuda 11.4
157157 };
0 commit comments