Skip to content

Commit 59fb554

Browse files
committed
GPU FlatObject: Make some more functions accessible on GPU
1 parent 52e7134 commit 59fb554

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

GPU/TPCFastTransformation/TPCFastTransformGeo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TPCFastTransformGeo
8686
/// _____________ FlatObject functionality, see FlatObject class for description ____________
8787

8888
/// Gives minimal alignment in bytes required for an object of the class
89-
static constexpr size_t getClassAlignmentBytes() { return 8; }
89+
inline static constexpr size_t getClassAlignmentBytes() { return 8; }
9090

9191
/// _______________ Construction interface ________________________
9292

@@ -110,16 +110,16 @@ class TPCFastTransformGeo
110110
/// _______________ Getters _________________________________
111111

112112
/// Gives number of TPC sectors
113-
GPUdi() static constexpr int32_t getNumberOfSectors() { return NumberOfSectors; }
113+
inline static constexpr int32_t getNumberOfSectors() { return NumberOfSectors; }
114114

115115
/// Gives number of TPC sectors on the A side
116-
GPUdi() static constexpr int32_t getNumberOfSectorsA() { return NumberOfSectorsA; }
116+
inline static constexpr int32_t getNumberOfSectorsA() { return NumberOfSectorsA; }
117117

118118
/// Gives number of TPC rows
119119
GPUdi() int32_t getNumberOfRows() const { return mNumberOfRows; }
120120

121121
/// Gives number of TPC rows
122-
GPUdi() static constexpr int getMaxNumberOfRows() { return MaxNumberOfRows; }
122+
inline static constexpr int getMaxNumberOfRows() { return MaxNumberOfRows; }
123123

124124
/// Gives sector info
125125
GPUd() const SectorInfo& getSectorInfo(int32_t sector) const;

GPU/Utils/FlatObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ class FlatObject
253253
void destroy();
254254

255255
/// Gives size of the flat buffer
256-
size_t getFlatBufferSize() const { return mFlatBufferSize; }
256+
GPUdi() size_t getFlatBufferSize() const { return mFlatBufferSize; }
257257

258258
/// Gives pointer to the flat buffer
259-
const char* getFlatBufferPtr() const { return mFlatBufferPtr; }
259+
GPUdi() const char* getFlatBufferPtr() const { return mFlatBufferPtr; }
260260

261261
/// Tells if the object is constructed
262262
bool isConstructed() const { return (mConstructionMask & (uint32_t)ConstructionState::Constructed); }
@@ -274,7 +274,7 @@ class FlatObject
274274

275275
public:
276276
/// Increases given size to achieve required alignment
277-
static size_t alignSize(size_t sizeBytes, size_t alignmentBytes)
277+
static constexpr size_t alignSize(size_t sizeBytes, size_t alignmentBytes)
278278
{
279279
auto res = sizeBytes % alignmentBytes;
280280
return res ? sizeBytes + (alignmentBytes - res) : sizeBytes;

0 commit comments

Comments
 (0)