Skip to content

Commit 1d679bb

Browse files
committed
ReconstructionDataFormats: place the Vertex and HelixHelper constants in the constant address space
MSL requires every variable at program scope, class-scope statics included, to name an address space. GPUglobalconstexpr() expands to constexpr everywhere except Metal, so this is a no-op for host, CUDA, HIP, OpenCL and cling. These were missed by the earlier pass: the header they sit in only started being compiled once the errors ahead of it were gone.
1 parent a080b8d commit 1d679bb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎DataFormats/Reconstruction/include/ReconstructionDataFormats/HelixHelper.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct TrackAuxPar : public o2::math_utils::CircleXYf_t {
5454
//__________________________________________________________
5555
//< crossing coordinates of 2 circles
5656
struct CrossInfo {
57-
static constexpr float MaxDistXYDef = 10.;
57+
static GPUglobalconstexpr() float MaxDistXYDef = 10.;
5858
float xDCA[2] = {};
5959
float yDCA[2] = {};
6060
int nDCA = 0;

‎DataFormats/Reconstruction/include/ReconstructionDataFormats/Vertex.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class VertexBase
4242
kCovXZ,
4343
kCovYZ,
4444
kCovZZ };
45-
static constexpr int kNCov = 6;
45+
static GPUglobalconstexpr() int kNCov = 6;
4646
GPUhdDefault() VertexBase() = default;
4747
GPUhdDefault() ~VertexBase() = default;
4848
GPUhd() VertexBase(const float* pos, const float* cov)

0 commit comments

Comments
 (0)