From 40b66ce80f20247985be574f3c439bbe3eeef8f3 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Sat, 28 Mar 2026 21:22:40 +0100 Subject: [PATCH] Drop unneeded workaround This apparently is fixed with the new ROOT and it actually breaks with the latest system clang on macOS. --- Common/MathUtils/include/MathUtils/Cartesian.h | 18 ------------------ .../MathUtils/include/MathUtils/CartesianGPU.h | 4 ++++ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Common/MathUtils/include/MathUtils/Cartesian.h b/Common/MathUtils/include/MathUtils/Cartesian.h index 9b917707835a6..5702656b86e9f 100644 --- a/Common/MathUtils/include/MathUtils/Cartesian.h +++ b/Common/MathUtils/include/MathUtils/Cartesian.h @@ -285,24 +285,6 @@ GPUdi() SMatrix> Similarity(const SMatrix> fails because the class -/// implements a copy constructor, although it does not much more than the default copy -/// constructor. We need Point3D to fulfill the condition in order to make types -/// inheriting from it or using it as member can be safely detected as messageable. -/// -/// We believe that Point3D is messageable and explicitly specialize the type trait. -/// There is a unit test for checking trivial copy -/// This is a workaround, we will also make suggestions to fix the cause in ROOT itself -/// TODO: delete once it is fixed in ROOT -template -struct is_trivially_copyable> : std::true_type { -}; -} // namespace std #endif // Disable for GPU #endif diff --git a/Common/MathUtils/include/MathUtils/CartesianGPU.h b/Common/MathUtils/include/MathUtils/CartesianGPU.h index 905f2f660f9c0..3a7f48271594f 100644 --- a/Common/MathUtils/include/MathUtils/CartesianGPU.h +++ b/Common/MathUtils/include/MathUtils/CartesianGPU.h @@ -16,6 +16,7 @@ #define ALICEO2_CARTESIANGPU_H #include "GPUCommonDef.h" +#include "GPUCommonTypeTraits.h" namespace o2::math_utils { @@ -43,6 +44,9 @@ struct GPUPoint3D : public GPUPoint2D { GPUd() float R() const { return o2::gpu::CAMath::Sqrt(GPUPoint2D::xx * GPUPoint2D::xx + GPUPoint2D::yy * GPUPoint2D::yy + zz * zz); } GPUd() void SetZ(float v) { zz = v; } T zz; +#if (!defined(GPUCA_GPUCODE_DEVICE) || defined(__CUDACC__) || defined(__HIPCC__)) && !defined(GPUCA_GPUCODE_COMPILEKERNELS) + static_assert(std::is_trivially_copyable_v); +#endif }; } // namespace detail