Repository navigation
Commit 7d75d71
committed
GPU: let the constant-address-space constants be built on Metal
A constructor's implicit `this` is generic in MSL 4.1, and a generic pointer does
not reach the constant address space, so a class-type constant at program scope
could not be constructed at all: gpustd::bitset for the DetID and GlobalTrackID
masks, CfChargePos for INVALID_CHARGE_POS.
MSL lets a member function be qualified with the address space of its `this`, so
each of these gains a constant-qualified overload next to the existing one,
alongside the copy constructor and the OpenCL __constant one that are already
there for the same reason. Only the members actually called on a constant object
need it.1 parent c8ce55e commit 7d75d71
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
86 | 98 | | |
87 | 99 | | |
88 | 100 | | |
| |||
0 commit comments