Skip to content

Commit 0af8023

Browse files
committed
Synced to upstream and fixed PDG instance merge conflicts
2 parents e73febc + ff93406 commit 0af8023

345 files changed

Lines changed: 223244 additions & 4546 deletions

File tree

Some content is hidden

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

‎.github/workflows/clean-test.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ name: Clean PR checks
2727
description: build/O2/fullCI_slc9
2828
type: boolean
2929
default: true
30+
'check_build/O2/fullCI-slc10-x86':
31+
description: build/O2/fullCI-slc10-x86
32+
type: boolean
33+
default: true
34+
# Off by default, unlike every other check here: the gpu pool is a single
35+
# worker and a gpu-test round is hours, so resetting this is a much bigger
36+
# ask than requeueing one of the twenty-odd slc9/slc10 builders. Tick it
37+
# when the GPU check is what you actually want re-run.
38+
'check_build/O2/gpu-test-slc10-x86':
39+
description: build/O2/gpu-test-slc10-x86
40+
type: boolean
41+
default: false
3042
'check_build/O2/o2-dataflow-slc9':
3143
description: build/O2/o2-dataflow-slc9
3244
type: boolean

‎Common/DCAFitter/GPU/cuda/DCAFitterN.cu‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#endif
1717

1818
#include <numeric>
19+
#include <iostream>
1920

2021
#include "GPUCommonDef.h"
2122
#include "DCAFitter/DCAFitterN.h"

‎Common/MathUtils/include/MathUtils/detail/StatAccumulator.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct StatAccumulator {
4242
wsum += w;
4343
n++;
4444
}
45-
double getMean() const { return wsum > 0. ? sum / wsum : 0.; }
45+
double getMean() const { return wsum > 0. ? sum / wsum : double{0}; }
4646

4747
#ifndef GPUCA_GPUCODE_DEVICE
4848
template <typename T = float>

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

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,36 @@ GPUdi() T log(T x)
9191
return o2::gpu::GPUCommonMath::Log(x);
9292
};
9393

94-
#ifndef GPUCA_GPUCODE_DEVICE // Double overloads using std namespace not visible on GPU
94+
template <class T>
95+
GPUdi() T exp(T x)
96+
{
97+
return o2::gpu::GPUCommonMath::Exp(x);
98+
};
99+
100+
#if !defined(GPUCA_GPUCODE_DEVICE) || defined(__CUDACC__) || defined(__HIPCC__) // Double specialisations, not for OpenCL and Metal
95101
template <>
96102
GPUhdi() double copysign(double x, double y)
97103
{
98-
return std::copysign(x, y);
104+
return o2::gpu::GPUCommonMath::Copysignd(x, y);
99105
}
100106
template <>
101107
GPUhdi() double sqrt(double x)
102108
{
103-
return std::sqrt(x);
109+
return o2::gpu::GPUCommonMath::Sqrtd(x);
104110
};
111+
template <>
112+
GPUdi() double log(double x)
113+
{
114+
return o2::gpu::GPUCommonMath::Logd(x);
115+
};
116+
template <>
117+
GPUdi() double exp(double x)
118+
{
119+
return o2::gpu::GPUCommonMath::Expd(x);
120+
};
121+
#endif
122+
123+
#ifndef GPUCA_GPUCODE_DEVICE // Double overloads using std namespace not visible on GPU
105124
GPUhdi() double abs(double x)
106125
{
107126
return std::abs(x);
@@ -120,11 +139,6 @@ GPUdi() bool finite(double x)
120139
return std::isfinite(x);
121140
#endif
122141
}
123-
template <>
124-
GPUdi() double log(double x)
125-
{
126-
return std::log(x);
127-
};
128142
#endif
129143

130144
} // namespace detail

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ GPUhdi() T to02Pi(T phi)
4848
template <typename T>
4949
GPUhdi() void bringTo02Pi(T& phi)
5050
{
51-
phi = to02Pi<T>(phi);
51+
phi = to02Pi(phi);
5252
}
5353

5454
template <typename T>
@@ -68,7 +68,7 @@ inline T to02PiGen(T phi)
6868
template <typename T>
6969
inline void bringTo02PiGen(T& phi)
7070
{
71-
phi = to02PiGen<T>(phi);
71+
phi = to02PiGen(phi);
7272
}
7373

7474
template <typename T>
@@ -87,7 +87,7 @@ GPUhdi() T toPMPi(T phi)
8787
template <typename T>
8888
GPUhdi() void bringToPMPi(T& phi)
8989
{
90-
phi = toPMPi<T>(phi);
90+
phi = toPMPi(phi);
9191
}
9292

9393
template <typename T>
@@ -107,10 +107,10 @@ inline T toPMPiGen(T phi)
107107
template <typename T>
108108
inline void bringToPMPiGen(T& phi)
109109
{
110-
phi = toPMPiGen<T>(phi);
110+
phi = toPMPiGen(phi);
111111
}
112112

113-
#ifdef __OPENCL__ // TODO: get rid of that stupid workaround for OpenCL template address spaces
113+
#if defined(__OPENCL__) || defined(__METAL__) // TODO: get rid of that stupid workaround for OpenCL template address spaces
114114
template <typename T, typename S, typename U>
115115
GPUhdi() void sincos(T ang, S& s, U& c)
116116
{
@@ -275,12 +275,11 @@ GPUhdi() constexpr T fastATan2(T y, T x)
275275
// Average inaccuracy: 0.00048
276276
// Max inaccuracy: 0.00084
277277
// Speed: 6.2 times faster than atan2f()
278-
constexpr T Pi = 3.1415926535897932384626433832795;
279-
280278
auto atan = [](T a) -> T {
281279
// returns the arctan for the angular range [-Pi/4, Pi/4]
282280
// the polynomial coefficients are taken from:
283281
// https://stackoverflow.com/questions/42537957/fast-accurate-atan-arctan-approximation-algorithm
282+
constexpr T Pi = 3.1415926535897932384626433832795;
284283
constexpr T A = 0.0776509570923569;
285284
constexpr T B = -0.287434475393028;
286285
constexpr T C = ((Pi / 4) - A - B);
@@ -290,6 +289,7 @@ GPUhdi() constexpr T fastATan2(T y, T x)
290289

291290
auto atan2P = [atan](T yy, T xx) -> T {
292291
// fast atan2(yy,xx) for the angular range [0,+Pi]
292+
constexpr T Pi = 3.1415926535897932384626433832795;
293293
constexpr T Pi025 = 1 * Pi / 4;
294294
constexpr T Pi075 = 3 * Pi / 4;
295295
const T x1 = xx + yy; // point p1 (x1,y1) = (xx,yy) - Pi/4
@@ -299,7 +299,7 @@ GPUhdi() constexpr T fastATan2(T y, T x)
299299
if (xx < 0) { // p1 is in the range [Pi/4, 3*Pi/4]
300300
phi0 = Pi075;
301301
tan = y1 > T(0) ? -x1 / y1 : T(0); // yy is always >=0, hence y1>=0
302-
} else { // p1 is in the range [-Pi/4, Pi/4]
302+
} else { // p1 is in the range [-Pi/4, Pi/4]
303303
phi0 = Pi025;
304304
tan = x1 > T(0) ? y1 / x1 : T(0);
305305
}
@@ -376,41 +376,41 @@ GPUdi() double pi()
376376
return o2::constants::math::PI;
377377
}
378378

379-
#ifndef GPUCA_GPUCODE_DEVICE
379+
#if !defined(GPUCA_GPUCODE_DEVICE) || defined(__CUDACC__) || defined(__HIPCC__) // Double specialisations, not for OpenCL and Metal
380380
template <>
381381
GPUdi() double tan(double x)
382382
{
383-
return std::tan(x);
383+
return o2::gpu::GPUCommonMath::Tand(x);
384384
};
385385
template <>
386386
GPUdi() double sin(double x)
387387
{
388-
return std::sin(x);
388+
return o2::gpu::GPUCommonMath::Sind(x);
389389
};
390390
template <>
391391
GPUdi() double atan2(double y, double x)
392392
{
393-
return std::atan2(y, x);
393+
return o2::gpu::GPUCommonMath::ATan2d(y, x);
394394
};
395395
template <>
396396
GPUdi() double atan(double x)
397397
{
398-
return std::atan(x);
398+
return o2::gpu::GPUCommonMath::ATand(x);
399399
};
400400
template <>
401401
GPUdi() double asin(double x)
402402
{
403-
return std::asin(x);
403+
return o2::gpu::GPUCommonMath::ASind(x);
404404
};
405405
template <>
406406
GPUdi() double acos(double x)
407407
{
408-
return std::acos(x);
408+
return o2::gpu::GPUCommonMath::ACosd(x);
409409
};
410410
template <>
411411
GPUdi() double cos(double x)
412412
{
413-
return std::cos(x);
413+
return o2::gpu::GPUCommonMath::Cosd(x);
414414
};
415415
#endif
416416

‎DataFormats/Detectors/FIT/FDD/CMakeLists.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ o2_add_library(DataFormatsFDD
1414
src/RecPoint.cxx
1515
src/CTF.cxx
1616
src/LookUpTable.cxx
17+
src/FDDRecoConfig.cxx
1718
PUBLIC_LINK_LIBRARIES O2::FDDBase
1819
O2::DataFormatsFIT
1920
O2::SimulationDataFormat
@@ -29,5 +30,6 @@ o2_target_root_dictionary(DataFormatsFDD
2930
include/DataFormatsFDD/RecPoint.h
3031
include/DataFormatsFDD/RawEventData.h
3132
include/DataFormatsFDD/LookUpTable.h
32-
include/DataFormatsFDD/CTF.h)
33+
include/DataFormatsFDD/CTF.h
34+
include/DataFormatsFDD/FDDRecoConfig.h)
3335

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#ifndef ALICEO2_FDD_RECO_PARAM
13+
#define ALICEO2_FDD_RECO_PARAM
14+
15+
#include "CommonUtils/ConfigurableParamHelper.h"
16+
17+
namespace o2::fdd
18+
{
19+
struct FDDRecoConfig : o2::conf::ConfigurableParamHelper<FDDRecoConfig> {
20+
float AmplitudeCutOnCollisionTimeWeights = 3;
21+
O2ParamDef(FDDRecoConfig, "FDDRecoConfig");
22+
ClassDefNV(FDDRecoConfig, 1);
23+
};
24+
} // namespace o2::fdd
25+
#endif

‎DataFormats/Detectors/FIT/FDD/src/DataFormatsFDDLinkDef.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@
3737
#pragma link C++ class o2::fdd::CTF + ;
3838
#pragma link C++ class o2::ctf::EncodedBlocks < o2::fdd::CTFHeader, 8, uint32_t> + ;
3939

40+
#pragma link C++ struct o2::fdd::FDDRecoConfig + ;
41+
#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::fdd::FDDRecoConfig> + ;
4042
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
#include <DataFormatsFDD/FDDRecoConfig.h>
13+
14+
using namespace o2::fdd;
15+
O2ParamImpl(FDDRecoConfig);

‎DataFormats/Detectors/FIT/FV0/CMakeLists.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ o2_add_library(DataFormatsFV0
1717
src/RawEventData.cxx
1818
src/CTF.cxx
1919
src/LookUpTable.cxx
20+
src/FV0RecoConfig.cxx
2021
PUBLIC_LINK_LIBRARIES O2::FV0Base
2122
O2::DataFormatsFIT
2223
O2::SimulationDataFormat
@@ -35,4 +36,6 @@ o2_target_root_dictionary(DataFormatsFV0
3536
include/DataFormatsFV0/RecPoints.h
3637
include/DataFormatsFV0/RawEventData.h
3738
include/DataFormatsFV0/LookUpTable.h
38-
include/DataFormatsFV0/CTF.h)
39+
include/DataFormatsFV0/CTF.h
40+
include/DataFormatsFV0/FV0RecoConfig.h
41+
)

0 commit comments

Comments
 (0)