Skip to content

Commit 3f23f52

Browse files
committed
GPU: Use GPUdi() macro instead of inline keyword
1 parent 1a27e5d commit 3f23f52

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

Common/DCAFitter/include/DCAFitter/DCAFitterN.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ GPUd() void DCAFitterN<N, Args...>::calcTrackResiduals()
753753

754754
//___________________________________________________________________
755755
template <int N, typename... Args>
756-
GPUd() inline void DCAFitterN<N, Args...>::calcTrackDerivatives()
756+
GPUdi() void DCAFitterN<N, Args...>::calcTrackDerivatives()
757757
{
758758
// calculate track derivatives over X param
759759
for (int i = N; i--;) {
@@ -763,7 +763,7 @@ GPUd() inline void DCAFitterN<N, Args...>::calcTrackDerivatives()
763763

764764
//___________________________________________________________________
765765
template <int N, typename... Args>
766-
GPUd() inline double DCAFitterN<N, Args...>::calcChi2() const
766+
GPUdi() double DCAFitterN<N, Args...>::calcChi2() const
767767
{
768768
// calculate current chi2
769769
double chi2 = 0;
@@ -777,7 +777,7 @@ GPUd() inline double DCAFitterN<N, Args...>::calcChi2() const
777777

778778
//___________________________________________________________________
779779
template <int N, typename... Args>
780-
GPUd() inline double DCAFitterN<N, Args...>::calcChi2NoErr() const
780+
GPUdi() double DCAFitterN<N, Args...>::calcChi2NoErr() const
781781
{
782782
// calculate current chi2 of abs. distance minimization
783783
double chi2 = 0;
@@ -842,7 +842,7 @@ GPUd() bool DCAFitterN<N, Args...>::propagateTracksToVertex(int icand)
842842

843843
//___________________________________________________________________
844844
template <int N, typename... Args>
845-
GPUd() inline o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int i, int icand)
845+
GPUdi() o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int i, int icand)
846846
{
847847
// propagate tracks param only to current vertex (if not already done)
848848
int ord = mOrder[icand];
@@ -858,7 +858,7 @@ GPUd() inline o2::track::TrackPar DCAFitterN<N, Args...>::getTrackParamAtPCA(int
858858

859859
//___________________________________________________________________
860860
template <int N, typename... Args>
861-
GPUd() inline double DCAFitterN<N, Args...>::getAbsMax(const VecND& v)
861+
GPUdi() double DCAFitterN<N, Args...>::getAbsMax(const VecND& v)
862862
{
863863
double mx = -1;
864864
for (int i = N; i--;) {
@@ -1075,7 +1075,7 @@ GPUd() o2::track::TrackPar DCAFitterN<N, Args...>::createParentTrackPar(int cand
10751075

10761076
//___________________________________________________________________
10771077
template <int N, typename... Args>
1078-
GPUd() inline bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar& t, float x)
1078+
GPUdi() bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar& t, float x)
10791079
{
10801080
bool res = true;
10811081
if (mUsePropagator || mMatCorr != o2::base::Propagator::MatCorrType::USEMatCorrNONE) {
@@ -1091,7 +1091,7 @@ GPUd() inline bool DCAFitterN<N, Args...>::propagateParamToX(o2::track::TrackPar
10911091

10921092
//___________________________________________________________________
10931093
template <int N, typename... Args>
1094-
GPUd() inline bool DCAFitterN<N, Args...>::propagateToX(o2::track::TrackParCov& t, float x)
1094+
GPUdi() bool DCAFitterN<N, Args...>::propagateToX(o2::track::TrackParCov& t, float x)
10951095
{
10961096
bool res = true;
10971097
if (mUsePropagator || mMatCorr != o2::base::Propagator::MatCorrType::USEMatCorrNONE) {

DataFormats/Detectors/TPC/include/DataFormatsTPC/TrackTPC.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class TrackTPC : public o2::track::TrackParCov
7979
GPUd() void setClusterRef(uint32_t entry, uint16_t ncl) { mClustersReference.set(entry, ncl); }
8080

8181
template <class T>
82-
GPUd() static inline void getClusterReference(T& clinfo, int nCluster,
82+
GPUdi() static void getClusterReference(T& clinfo, int nCluster,
8383
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex, const ClusRef& ref)
8484
{
8585
// data for given tracks starts at clinfo[ ref.getFirstEntry() ],
@@ -95,14 +95,14 @@ class TrackTPC : public o2::track::TrackParCov
9595
}
9696

9797
template <class T>
98-
GPUd() inline void getClusterReference(T& clinfo, int nCluster,
98+
GPUdi() void getClusterReference(T& clinfo, int nCluster,
9999
uint8_t& sectorIndex, uint8_t& rowIndex, uint32_t& clusterIndex) const
100100
{
101101
getClusterReference<T>(clinfo, nCluster, sectorIndex, rowIndex, clusterIndex, mClustersReference);
102102
}
103103

104104
template <class T>
105-
GPUd() static inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
105+
GPUdi() static const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
106106
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex, const ClusRef& ref)
107107
{
108108
uint32_t clusterIndex;
@@ -111,14 +111,14 @@ class TrackTPC : public o2::track::TrackParCov
111111
}
112112

113113
template <class T>
114-
GPUd() inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
114+
GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
115115
const o2::tpc::ClusterNativeAccess& clusters, uint8_t& sectorIndex, uint8_t& rowIndex) const
116116
{
117117
return getCluster<T>(clinfo, nCluster, clusters, sectorIndex, rowIndex, mClustersReference);
118118
}
119119

120120
template <class T>
121-
GPUd() inline const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
121+
GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
122122
const o2::tpc::ClusterNativeAccess& clusters) const
123123
{
124124
uint8_t sectorIndex, rowIndex;

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ class TrackParametrization
199199
GPUd() value_t getPt() const;
200200
GPUd() value_t getE2() const;
201201
GPUd() value_t getE() const;
202-
GPUd() static inline value_t getdEdxBB(value_t betagamma) { return BetheBlochSolid(betagamma); }
203-
GPUd() static inline value_t getdEdxBBOpt(value_t betagamma) { return BetheBlochSolidOpt(betagamma); }
204-
GPUd() static inline value_t getBetheBlochSolidDerivativeApprox(value_T dedx, value_T bg) { return BetheBlochSolidDerivative(dedx, bg); }
202+
GPUdi() static value_t getdEdxBB(value_t betagamma) { return BetheBlochSolid(betagamma); }
203+
GPUdi() static value_t getdEdxBBOpt(value_t betagamma) { return BetheBlochSolidOpt(betagamma); }
204+
GPUdi() static value_t getBetheBlochSolidDerivativeApprox(value_T dedx, value_T bg) { return BetheBlochSolidDerivative(dedx, bg); }
205205

206206
GPUd() value_t getTheta() const;
207207
GPUd() value_t getEta() const;

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ GPUd() value_T BetheBlochSolidOpt(value_T bg)
190190

191191
//____________________________________________________
192192
template <typename value_T>
193-
GPUd() value_T inline BetheBlochSolidDerivative(value_T dedx, value_T bg)
193+
GPUdi() value_T BetheBlochSolidDerivative(value_T dedx, value_T bg)
194194
{
195195
//
196196
// This is approximate derivative of the BB over betagamm, NO check for the consistency of the provided dedx and bg is done

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/ClusterLinesGPU.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ClusterLinesGPU final
5757
public:
5858
GPUd() ClusterLinesGPU(const Line& firstLine, const Line& secondLine); // poor man solution to calculate duplets' centroid
5959
GPUd() void computeClusterCentroid();
60-
GPUd() inline float* getVertex() { return mVertex; }
60+
GPUdi() float* getVertex() { return mVertex; }
6161

6262
private:
6363
float mAMatrix[6]; // AX=B

GPU/GPUTracking/SliceTracker/GPUTPCTrackLinearisation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class GPUTPCTrackLinearisation
6767
float mQPt; // QPt
6868
};
6969

70-
GPUd() MEM_CLASS_PRE2() inline GPUTPCTrackLinearisation::GPUTPCTrackLinearisation(const MEM_LG2(GPUTPCTrackParam) & GPUrestrict() t) : mSinPhi(t.SinPhi()), mCosPhi(0), mDzDs(t.DzDs()), mQPt(t.QPt())
70+
MEM_CLASS_PRE2() GPUdi() GPUTPCTrackLinearisation::GPUTPCTrackLinearisation(const MEM_LG2(GPUTPCTrackParam) & GPUrestrict() t) : mSinPhi(t.SinPhi()), mCosPhi(0), mDzDs(t.DzDs()), mQPt(t.QPt())
7171
{
7272
if (mSinPhi > GPUCA_MAX_SIN_PHI) {
7373
mSinPhi = GPUCA_MAX_SIN_PHI;

GPU/GPUTracking/SliceTracker/GPUTPCTrackParam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class GPUTPCTrackParam
157157
int mNDF; // the Number of Degrees of Freedom
158158
};
159159

160-
GPUd() MEM_CLASS_PRE() inline void MEM_LG(GPUTPCTrackParam)::InitParam()
160+
MEM_CLASS_PRE() GPUdi() void MEM_LG(GPUTPCTrackParam)::InitParam()
161161
{
162162
// Initialize Tracklet Parameters using default values
163163
SetSinPhi(0);

0 commit comments

Comments
 (0)