Skip to content

Commit 2d2371b

Browse files
committed
MathUtils: place TransformType 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.
1 parent 5aba39f commit 2d2371b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Common/MathUtils/include/MathUtils/Cartesian.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ namespace math_utils
5252
/// The IDs must be < 32
5353

5454
struct TransformType {
55-
static constexpr int L2G = 0;
56-
static constexpr int T2L = 1;
57-
static constexpr int T2G = 2;
58-
static constexpr int T2GRot = 3;
55+
static GPUglobalconstexpr() int L2G = 0;
56+
static GPUglobalconstexpr() int T2L = 1;
57+
static GPUglobalconstexpr() int T2G = 2;
58+
static GPUglobalconstexpr() int T2GRot = 3;
5959
}; /// transformation types
6060

6161
template <typename value_T>

0 commit comments

Comments
 (0)