Skip to content

Commit b4a13e0

Browse files
authored
Merge branch 'AliceO2Group:dev' into new-detector4
2 parents 9158354 + 128a030 commit b4a13e0

File tree

191 files changed

+4641
-2019
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+4641
-2019
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Dependabot configuration
3+
# Reference: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
4+
5+
version: 2
6+
updates:
7+
- package-ecosystem: "github-actions" # See documentation for possible values
8+
directory: "/" # Location of package manifests
9+
schedule:
10+
interval: "weekly"

Common/DCAFitter/include/DCAFitter/DCAFitterN.h

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ class DCAFitterN
110110
using MatSymND = o2::math_utils::SMatrix<double, N, N, o2::math_utils::MatRepSym<double, N>>;
111111
using MatStdND = o2::math_utils::SMatrix<double, N, N, o2::math_utils::MatRepStd<double, N>>;
112112
using TrackCoefVtx = MatStd3D;
113-
using ArrTrack = o2::gpu::gpustd::array<Track, N>; // container for prongs (tracks) at single vertex cand.
114-
using ArrTrackCovI = o2::gpu::gpustd::array<TrackCovI, N>; // container for inv.cov.matrices at single vertex cand.
115-
using ArrTrCoef = o2::gpu::gpustd::array<TrackCoefVtx, N>; // container of TrackCoefVtx coefficients at single vertex cand.
116-
using ArrTrDer = o2::gpu::gpustd::array<TrackDeriv, N>; // container of Track 1st and 2nd derivative over their X param
117-
using ArrTrPos = o2::gpu::gpustd::array<Vec3D, N>; // container of Track positions
113+
using ArrTrack = std::array<Track, N>; // container for prongs (tracks) at single vertex cand.
114+
using ArrTrackCovI = std::array<TrackCovI, N>; // container for inv.cov.matrices at single vertex cand.
115+
using ArrTrCoef = std::array<TrackCoefVtx, N>; // container of TrackCoefVtx coefficients at single vertex cand.
116+
using ArrTrDer = std::array<TrackDeriv, N>; // container of Track 1st and 2nd derivative over their X param
117+
using ArrTrPos = std::array<Vec3D, N>; // container of Track positions
118118

119119
public:
120120
enum BadCovPolicy : uint8_t { // if encountering non-positive defined cov. matrix, the choice is:
@@ -158,7 +158,7 @@ class DCAFitterN
158158
GPUd() const auto getPCACandidatePos(int cand = 0) const
159159
{
160160
const auto& vd = mPCA[mOrder[cand]];
161-
return o2::gpu::gpustd::array<float, 3>{static_cast<float>(vd[0]), static_cast<float>(vd[1]), static_cast<float>(vd[2])};
161+
return std::array<float, 3>{static_cast<float>(vd[0]), static_cast<float>(vd[1]), static_cast<float>(vd[2])};
162162
}
163163

164164
///< return position of quality-ordered candidate in the internal structures
@@ -213,7 +213,7 @@ class DCAFitterN
213213

214214
GPUd() MatSym3D calcPCACovMatrix(int cand = 0) const;
215215

216-
o2::gpu::gpustd::array<float, 6> calcPCACovMatrixFlat(int cand = 0) const
216+
std::array<float, 6> calcPCACovMatrixFlat(int cand = 0) const
217217
{
218218
auto m = calcPCACovMatrix(cand);
219219
return {static_cast<float>(m(0, 0)), static_cast<float>(m(1, 0)), static_cast<float>(m(1, 1)), static_cast<float>(m(2, 0)), static_cast<float>(m(2, 1)), static_cast<float>(m(2, 2))};
@@ -364,39 +364,39 @@ class DCAFitterN
364364

365365
private:
366366
// vectors of 1st derivatives of track local residuals over X parameters
367-
o2::gpu::gpustd::array<o2::gpu::gpustd::array<Vec3D, N>, N> mDResidDx;
367+
std::array<std::array<Vec3D, N>, N> mDResidDx;
368368
// vectors of 1nd derivatives of track local residuals over X parameters
369369
// (cross-derivatives DR/(dx_j*dx_k) = 0 for j!=k, therefore the hessian is diagonal)
370-
o2::gpu::gpustd::array<o2::gpu::gpustd::array<Vec3D, N>, N> mD2ResidDx2;
370+
std::array<std::array<Vec3D, N>, N> mD2ResidDx2;
371371
VecND mDChi2Dx; // 1st derivatives of chi2 over tracks X params
372372
MatSymND mD2Chi2Dx2; // 2nd derivatives of chi2 over tracks X params (symmetric matrix)
373373
MatSymND mCosDif; // matrix with cos(alp_j-alp_i) for j<i
374374
MatSymND mSinDif; // matrix with sin(alp_j-alp_i) for j<i
375-
o2::gpu::gpustd::array<const Track*, N> mOrigTrPtr;
376-
o2::gpu::gpustd::array<TrackAuxPar, N> mTrAux; // Aux track info for each track at each cand. vertex
377-
CrossInfo mCrossings; // info on track crossing
378-
379-
o2::gpu::gpustd::array<ArrTrackCovI, MAXHYP> mTrcEInv; // errors for each track at each cand. vertex
380-
o2::gpu::gpustd::array<ArrTrack, MAXHYP> mCandTr; // tracks at each cond. vertex (Note: Errors are at seed XY point)
381-
o2::gpu::gpustd::array<ArrTrCoef, MAXHYP> mTrCFVT; // TrackCoefVtx for each track at each cand. vertex
382-
o2::gpu::gpustd::array<ArrTrDer, MAXHYP> mTrDer; // Track derivativse
383-
o2::gpu::gpustd::array<ArrTrPos, MAXHYP> mTrPos; // Track positions
384-
o2::gpu::gpustd::array<ArrTrPos, MAXHYP> mTrRes; // Track residuals
385-
o2::gpu::gpustd::array<Vec3D, MAXHYP> mPCA; // PCA for each vertex candidate
386-
o2::gpu::gpustd::array<float, MAXHYP> mChi2 = {0}; // Chi2 at PCA candidate
387-
o2::gpu::gpustd::array<int, MAXHYP> mNIters; // number of iterations for each seed
388-
o2::gpu::gpustd::array<bool, MAXHYP> mTrPropDone{}; // Flag that the tracks are fully propagated to PCA
389-
o2::gpu::gpustd::array<bool, MAXHYP> mPropFailed{}; // Flag that some propagation failed for this PCA candidate
375+
std::array<const Track*, N> mOrigTrPtr;
376+
std::array<TrackAuxPar, N> mTrAux; // Aux track info for each track at each cand. vertex
377+
CrossInfo mCrossings; // info on track crossing
378+
379+
std::array<ArrTrackCovI, MAXHYP> mTrcEInv; // errors for each track at each cand. vertex
380+
std::array<ArrTrack, MAXHYP> mCandTr; // tracks at each cond. vertex (Note: Errors are at seed XY point)
381+
std::array<ArrTrCoef, MAXHYP> mTrCFVT; // TrackCoefVtx for each track at each cand. vertex
382+
std::array<ArrTrDer, MAXHYP> mTrDer; // Track derivativse
383+
std::array<ArrTrPos, MAXHYP> mTrPos; // Track positions
384+
std::array<ArrTrPos, MAXHYP> mTrRes; // Track residuals
385+
std::array<Vec3D, MAXHYP> mPCA; // PCA for each vertex candidate
386+
std::array<float, MAXHYP> mChi2 = {0}; // Chi2 at PCA candidate
387+
std::array<int, MAXHYP> mNIters; // number of iterations for each seed
388+
std::array<bool, MAXHYP> mTrPropDone{}; // Flag that the tracks are fully propagated to PCA
389+
std::array<bool, MAXHYP> mPropFailed{}; // Flag that some propagation failed for this PCA candidate
390390
LogLogThrottler mLoggerBadCov{};
391391
LogLogThrottler mLoggerBadInv{};
392392
LogLogThrottler mLoggerBadProp{};
393393
MatSym3D mWeightInv; // inverse weight of single track, [sum{M^T E M}]^-1 in EQ.T
394-
o2::gpu::gpustd::array<int, MAXHYP> mOrder{0};
394+
std::array<int, MAXHYP> mOrder{0};
395395
int mCurHyp = 0;
396396
int mCrossIDCur = 0;
397397
int mCrossIDAlt = -1;
398398
BadCovPolicy mBadCovPolicy{BadCovPolicy::Discard}; // what to do in case of non-pos-def. cov. matrix, see BadCovPolicy enum
399-
o2::gpu::gpustd::array<FitStatus, MAXHYP> mFitStatus{}; // fit status of each hypothesis fit
399+
std::array<FitStatus, MAXHYP> mFitStatus{}; // fit status of each hypothesis fit
400400
bool mAllowAltPreference = true; // if the fit converges to alternative PCA seed, abandon the current one
401401
bool mUseAbsDCA = false; // use abs. distance minimization rather than chi2
402402
bool mWeightedFinalPCA = false; // recalculate PCA as a cov-matrix weighted mean, even if absDCA method was used
@@ -657,7 +657,7 @@ template <int N, typename... Args>
657657
GPUd() void DCAFitterN<N, Args...>::calcChi2Derivatives()
658658
{
659659
//< calculate 1st and 2nd derivatives of wighted DCA (chi2) over track parameters X, see EQ.Chi2 in the ref
660-
o2::gpu::gpustd::array<o2::gpu::gpustd::array<Vec3D, N>, N> covIDrDx; // tempory vectors of covI_j * dres_j/dx_i
660+
std::array<std::array<Vec3D, N>, N> covIDrDx; // tempory vectors of covI_j * dres_j/dx_i
661661

662662
// chi2 1st derivative
663663
for (int i = N; i--;) {
@@ -1175,13 +1175,13 @@ GPUd() o2::track::TrackParCov DCAFitterN<N, Args...>::createParentTrackParCov(in
11751175
{
11761176
const auto& trP = getTrack(0, cand);
11771177
const auto& trN = getTrack(1, cand);
1178-
o2::gpu::gpustd::array<float, 21> covV = {0.};
1179-
o2::gpu::gpustd::array<float, 3> pvecV = {0.};
1178+
std::array<float, 21> covV = {0.};
1179+
std::array<float, 3> pvecV = {0.};
11801180
int q = 0;
11811181
for (int it = 0; it < N; it++) {
11821182
const auto& trc = getTrack(it, cand);
1183-
o2::gpu::gpustd::array<float, 3> pvecT = {0.};
1184-
o2::gpu::gpustd::array<float, 21> covT = {0.};
1183+
std::array<float, 3> pvecT = {0.};
1184+
std::array<float, 21> covT = {0.};
11851185
trc.getPxPyPzGlo(pvecT);
11861186
trc.getCovXYZPxPyPzGlo(covT);
11871187
constexpr int MomInd[6] = {9, 13, 14, 18, 19, 20}; // cov matrix elements for momentum component
@@ -1210,18 +1210,18 @@ GPUd() o2::track::TrackPar DCAFitterN<N, Args...>::createParentTrackPar(int cand
12101210
const auto& trP = getTrack(0, cand);
12111211
const auto& trN = getTrack(1, cand);
12121212
const auto& wvtx = getPCACandidate(cand);
1213-
o2::gpu::gpustd::array<float, 3> pvecV = {0.};
1213+
std::array<float, 3> pvecV = {0.};
12141214
int q = 0;
12151215
for (int it = 0; it < N; it++) {
12161216
const auto& trc = getTrack(it, cand);
1217-
o2::gpu::gpustd::array<float, 3> pvecT = {0.};
1217+
std::array<float, 3> pvecT = {0.};
12181218
trc.getPxPyPzGlo(pvecT);
12191219
for (int i = 0; i < 3; i++) {
12201220
pvecV[i] += pvecT[i];
12211221
}
12221222
q += trc.getCharge();
12231223
}
1224-
const o2::gpu::gpustd::array<float, 3> vertex = {(float)wvtx[0], (float)wvtx[1], (float)wvtx[2]};
1224+
const std::array<float, 3> vertex = {(float)wvtx[0], (float)wvtx[1], (float)wvtx[2]};
12251225
return o2::track::TrackPar(vertex, pvecV, q, sectorAlpha);
12261226
}
12271227

Common/ML/include/ML/OrtInterface.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,10 @@ class OrtModel
4545

4646
public:
4747
// Constructors & destructors
48-
OrtModel() = default;
49-
OrtModel(std::unordered_map<std::string, std::string> optionsMap) { init(optionsMap); }
50-
void init(std::unordered_map<std::string, std::string> optionsMap)
51-
{
52-
initOptions(optionsMap);
53-
initEnvironment();
54-
}
55-
virtual ~OrtModel() = default;
48+
OrtModel();
49+
OrtModel(std::unordered_map<std::string, std::string> optionsMap);
50+
void init(std::unordered_map<std::string, std::string> optionsMap);
51+
virtual ~OrtModel();
5652

5753
// General purpose
5854
void initOptions(std::unordered_map<std::string, std::string> optionsMap);
@@ -113,7 +109,7 @@ class OrtModel
113109
private:
114110
// ORT variables -> need to be hidden as pImpl
115111
struct OrtVariables;
116-
OrtVariables* mPImplOrt;
112+
std::unique_ptr<OrtVariables> mPImplOrt;
117113

118114
// Input & Output specifications of the loaded network
119115
std::vector<const char*> mInputNamesChar, mOutputNamesChar;

Common/ML/src/OrtInterface.cxx

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,20 @@ namespace o2
2727
namespace ml
2828
{
2929

30+
OrtModel::OrtModel() = default;
31+
OrtModel::OrtModel(std::unordered_map<std::string, std::string> optionsMap) { init(optionsMap); }
32+
OrtModel::~OrtModel() = default;
33+
void OrtModel::init(std::unordered_map<std::string, std::string> optionsMap)
34+
{
35+
initOptions(optionsMap);
36+
initEnvironment();
37+
}
38+
3039
struct OrtModel::OrtVariables { // The actual implementation is hidden in the .cxx file
3140
// ORT runtime objects
3241
Ort::RunOptions runOptions;
33-
std::shared_ptr<Ort::Env> env = nullptr;
34-
std::shared_ptr<Ort::Session> session = nullptr; ///< ONNX session
42+
std::unique_ptr<Ort::Env> env = nullptr;
43+
std::unique_ptr<Ort::Session> session = nullptr; ///< ONNX session
3544
Ort::SessionOptions sessionOptions;
3645
Ort::AllocatorWithDefaultOptions allocator;
3746
Ort::MemoryInfo memoryInfo = Ort::MemoryInfo("Cpu", OrtAllocatorType::OrtDeviceAllocator, 0, OrtMemType::OrtMemTypeDefault);
@@ -41,7 +50,7 @@ struct OrtModel::OrtVariables { // The actual implementation is hidden in the .c
4150
// General purpose
4251
void OrtModel::initOptions(std::unordered_map<std::string, std::string> optionsMap)
4352
{
44-
mPImplOrt = new OrtVariables();
53+
mPImplOrt = std::make_unique<OrtVariables>();
4554

4655
// Load from options map
4756
if (!optionsMap.contains("model-path")) {
@@ -101,7 +110,7 @@ void OrtModel::initOptions(std::unordered_map<std::string, std::string> optionsM
101110

102111
void OrtModel::initEnvironment()
103112
{
104-
mPImplOrt->env = std::make_shared<Ort::Env>(
113+
mPImplOrt->env = std::make_unique<Ort::Env>(
105114
OrtLoggingLevel(mLoggingLevel),
106115
(mEnvName.empty() ? "ORT" : mEnvName.c_str()),
107116
// Integrate ORT logging into Fairlogger
@@ -129,7 +138,7 @@ void OrtModel::initSession()
129138
if (mAllocateDeviceMemory) {
130139
memoryOnDevice(mDeviceId);
131140
}
132-
mPImplOrt->session = std::make_shared<Ort::Session>(*mPImplOrt->env, mModelPath.c_str(), mPImplOrt->sessionOptions);
141+
mPImplOrt->session = std::make_unique<Ort::Session>(*mPImplOrt->env, mModelPath.c_str(), mPImplOrt->sessionOptions);
133142
mPImplOrt->ioBinding = std::make_unique<Ort::IoBinding>(*mPImplOrt->session);
134143

135144
setIO();
@@ -147,12 +156,12 @@ void OrtModel::memoryOnDevice(int32_t deviceIndex)
147156
(mPImplOrt->sessionOptions).AddConfigEntry("session.use_env_allocators", "1"); // This should enable to use the volatile memory allocation defined in O2/GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx; not working yet: ONNX still assigns new memory at init time
148157
(mPImplOrt->sessionOptions).AddConfigEntry("session_options.enable_cpu_mem_arena", "0"); // This should enable to use the volatile memory allocation defined in O2/GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerHost.cxx; not working yet: ONNX still assigns new memory at init time
149158
// Arena memory shrinkage comes at performance cost
150-
/// For now prefer to use single allocation, enabled by O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu -> SetONNXGPUStream -> rocm_options.arena_extend_strategy = 0;
151-
// (mPImplOrt->runOptions).AddConfigEntry("memory.enable_memory_arena_shrinkage", ("gpu:" + std::to_string(deviceIndex)).c_str()); // See kOrtRunOptionsConfigEnableMemoryArenaShrinkage, https://github.com/microsoft/onnxruntime/blob/90c263f471bbce724e77d8e62831d3a9fa838b2f/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h#L27
159+
// For now prefer to use single allocation, enabled by O2/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu -> SetONNXGPUStream -> rocm_options.arena_extend_strategy = 0;
160+
(mPImplOrt->runOptions).AddConfigEntry("memory.enable_memory_arena_shrinkage", ("gpu:" + std::to_string(deviceIndex)).c_str()); // See kOrtRunOptionsConfigEnableMemoryArenaShrinkage, https://github.com/microsoft/onnxruntime/blob/90c263f471bbce724e77d8e62831d3a9fa838b2f/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h#L27
152161

153162
std::string dev_mem_str = "";
154163
if (mDeviceType == "ROCM") {
155-
dev_mem_str = "Hip";
164+
dev_mem_str = "HipPinned";
156165
}
157166
if (mDeviceType == "CUDA") {
158167
dev_mem_str = "Cuda";
@@ -166,7 +175,7 @@ void OrtModel::memoryOnDevice(int32_t deviceIndex)
166175

167176
void OrtModel::resetSession()
168177
{
169-
mPImplOrt->session = std::make_shared<Ort::Session>(*(mPImplOrt->env), mModelPath.c_str(), mPImplOrt->sessionOptions);
178+
mPImplOrt->session = std::make_unique<Ort::Session>(*(mPImplOrt->env), mModelPath.c_str(), mPImplOrt->sessionOptions);
170179
}
171180

172181
// Getters
@@ -252,7 +261,7 @@ void OrtModel::setIO()
252261

253262
void OrtModel::setEnv(Ort::Env* env)
254263
{
255-
mPImplOrt->env = std::shared_ptr<Ort::Env>(env);
264+
mPImplOrt->env.reset(env);
256265
}
257266

258267
// Inference
@@ -308,6 +317,14 @@ void OrtModel::inference(I* input, int64_t input_size, O* output)
308317
(mPImplOrt->ioBinding)->BindOutput(mOutputNames[0].c_str(), outputTensor);
309318

310319
(mPImplOrt->session)->Run(mPImplOrt->runOptions, *mPImplOrt->ioBinding);
320+
// mPImplOrt->session->Run(
321+
// mPImplOrt->runOptions,
322+
// mInputNamesChar.data(),
323+
// &inputTensor,
324+
// mInputNamesChar.size(),
325+
// mOutputNamesChar.data(),
326+
// &outputTensor,
327+
// mOutputNamesChar.size());
311328
}
312329

313330
template void OrtModel::inference<OrtDataType::Float16_t, OrtDataType::Float16_t>(OrtDataType::Float16_t*, int64_t, OrtDataType::Float16_t*);
@@ -427,10 +444,7 @@ template std::vector<OrtDataType::Float16_t> OrtModel::inference<OrtDataType::Fl
427444
// Release session
428445
void OrtModel::release(bool profilingEnabled)
429446
{
430-
// if (profilingEnabled) {
431-
// mPImplOrt->session->EndProfiling();
432-
// }
433-
LOG(info) << "(ORT) Size of mPImplOrt: " << sizeof(*mPImplOrt) << " bytes";
447+
mPImplOrt.reset();
434448
}
435449

436450
// private

Common/MathUtils/include/MathUtils/SMatrixGPU.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
#define ALICEO2_SMATRIX_GPU_H
2626

2727
#include "GPUCommonDef.h"
28-
#include "GPUCommonArray.h"
2928
#include "GPUCommonMath.h"
3029
#include "GPUCommonAlgorithm.h"
3130
#include "GPUCommonLogger.h"
32-
#include "GPUCommonTypeTraits.h"
31+
#ifndef GPUCA_GPUCODE_DEVICE
32+
#include <type_traits>
33+
#include <array>
34+
#endif
3335

3436
namespace o2::math_utils::detail
3537
{
@@ -281,14 +283,14 @@ struct make_indices : make_indices_impl<0, indices<>, N> {
281283
};
282284

283285
template <int I0, class F, int... I>
284-
constexpr auto do_make(F f, indices<I...>) -> gpu::gpustd::array<int, sizeof...(I)>
286+
constexpr auto do_make(F f, indices<I...>) -> std::array<int, sizeof...(I)>
285287
{
286-
gpu::gpustd::array<int, sizeof...(I)> retarr = {f(I0 + I)...};
288+
std::array<int, sizeof...(I)> retarr = {f(I0 + I)...};
287289
return retarr;
288290
}
289291

290292
template <int N, int I0 = 0, class F>
291-
constexpr auto make(F f) -> gpu::gpustd::array<int, N>
293+
constexpr auto make(F f) -> std::array<int, N>
292294
{
293295
return do_make<I0>(f, typename make_indices<N>::type());
294296
}

Common/MathUtils/include/MathUtils/detail/basicMath.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
#ifndef MATHUTILS_INCLUDE_MATHUTILS_DETAIL_BASICMATH_H_
1717
#define MATHUTILS_INCLUDE_MATHUTILS_DETAIL_BASICMATH_H_
1818

19+
#include "GPUCommonDef.h"
20+
#include "GPUCommonMath.h"
21+
#include "CommonConstants/MathConstants.h"
22+
1923
#ifndef GPUCA_GPUCODE_DEVICE
2024
#include <cmath>
2125
#include <tuple>
26+
#include <array>
2227
#endif
23-
#include "GPUCommonArray.h"
24-
#include "GPUCommonDef.h"
25-
#include "GPUCommonMath.h"
26-
#include "CommonConstants/MathConstants.h"
2728

2829
namespace o2
2930
{
@@ -130,4 +131,4 @@ GPUdi() double log(double x)
130131
} // namespace math_utils
131132
} // namespace o2
132133

133-
#endif /* MATHUTILS_INCLUDE_MATHUTILS_DETAIL_BASICMATH_H_ */
134+
#endif /* MATHUTILS_INCLUDE_MATHUTILS_DETAIL_BASICMATH_H_ */

Common/MathUtils/include/MathUtils/detail/trigonometric.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@
1616
#ifndef MATHUTILS_INCLUDE_MATHUTILS_DETAIL_TRIGONOMETRIC_H_
1717
#define MATHUTILS_INCLUDE_MATHUTILS_DETAIL_TRIGONOMETRIC_H_
1818

19-
#ifndef GPUCA_GPUCODE_DEVICE
20-
#include <cmath>
21-
#include <tuple>
22-
#endif
23-
#include "GPUCommonArray.h"
2419
#include "GPUCommonDef.h"
2520
#include "GPUCommonMath.h"
2621
#include "CommonConstants/MathConstants.h"
2722
#include "MathUtils/detail/basicMath.h"
2823

24+
#ifndef GPUCA_GPUCODE_DEVICE
25+
#include <cmath>
26+
#include <tuple>
27+
#include <array>
28+
#endif
29+
2930
namespace o2
3031
{
3132
namespace math_utils
@@ -156,7 +157,7 @@ GPUhdi() std::tuple<T, T> rotateZInv(T xG, T yG, T snAlp, T csAlp)
156157
#endif
157158

158159
template <typename T>
159-
GPUhdi() void rotateZ(gpu::gpustd::array<T, 3>& xy, T alpha)
160+
GPUhdi() void rotateZ(std::array<T, 3>& xy, T alpha)
160161
{
161162
// transforms vector in tracking frame alpha to global frame
162163
T sin, cos;

0 commit comments

Comments
 (0)