Skip to content

Commit 9dd1256

Browse files
mconcasdavidrohr
authored andcommitted
Add GPUhdDefault() to suppress cuda warnings
1 parent 3d288bd commit 9dd1256

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

DataFormats/Reconstruction/include/ReconstructionDataFormats/Vertex.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class VertexBase
4040
kCovYZ,
4141
kCovZZ };
4242
static constexpr int kNCov = 6;
43-
GPUhd() VertexBase() = default;
44-
GPUhd() ~VertexBase() = default;
43+
GPUhdDefault() VertexBase() = default;
44+
GPUhdDefault() ~VertexBase() = default;
4545
GPUd() VertexBase(const math_utils::Point3D<float>& pos, const gpu::gpustd::array<float, kNCov>& cov) : mPos(pos), mCov(cov)
4646
{
4747
}
@@ -119,8 +119,8 @@ class Vertex : public VertexBase
119119
FlagsMask = 0xffff
120120
};
121121

122-
GPUhd() Vertex() = default;
123-
GPUhd() ~Vertex() = default;
122+
GPUhdDefault() Vertex() = default;
123+
GPUhdDefault() ~Vertex() = default;
124124
GPUd() Vertex(const math_utils::Point3D<float>& pos, const gpu::gpustd::array<float, kNCov>& cov, ushort nCont, float chi2)
125125
: VertexBase(pos, cov), mNContributors(nCont), mChi2(chi2)
126126
{

DataFormats/common/include/CommonDataFormat/TimeStamp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ template <typename T>
2525
class TimeStamp
2626
{
2727
public:
28-
GPUhd() TimeStamp() CON_DEFAULT;
29-
GPUhd() ~TimeStamp() CON_DEFAULT;
28+
GPUhdDefault() TimeStamp() CON_DEFAULT;
29+
GPUhdDefault() ~TimeStamp() CON_DEFAULT;
3030
GPUdi() TimeStamp(T time) { mTimeStamp = time; }
3131
GPUdi() T getTimeStamp() const { return mTimeStamp; }
3232
GPUdi() void setTimeStamp(T t) { mTimeStamp = t; }

GPU/Common/GPUCommonDefAPI.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#if !defined(GPUCA_GPUCODE) || defined(__OPENCL_HOST__) // For host / ROOT dictionary
2727
#define GPUd() // device function
2828
#define GPUdDefault() // default (constructor / operator) device function
29+
#define GPUhdDefault() // default (constructor / operator) host device function
2930
#define GPUdi() inline // to-be-inlined device function
3031
#define GPUdii() // Only on GPU to-be-inlined (forced) device function
3132
#define GPUdni() // Device function, not-to-be-inlined
@@ -72,6 +73,7 @@
7273
#elif defined(__OPENCL__) // Defines for OpenCL
7374
#define GPUd()
7475
#define GPUdDefault()
76+
#define GPUhdDefault()
7577
#define GPUdi() inline
7678
#define GPUdii() inline
7779
#define GPUdni()
@@ -129,6 +131,7 @@
129131
#elif defined(__HIPCC__) //Defines for HIP
130132
#define GPUd() __device__
131133
#define GPUdDefault() __device__
134+
#define GPUhdDefault() __host__ __device__
132135
#define GPUdi() __device__ inline
133136
#define GPUdii() __device__ __forceinline__
134137
#define GPUdni() __device__ __attribute__((noinline))

0 commit comments

Comments
 (0)