Skip to content

Commit bdb39f6

Browse files
committed
GPU: Workaround for OpenCL
1 parent a1cae4e commit bdb39f6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Common/MathUtils/include/MathUtils/SMatrixGPU.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,14 @@ class SMatrixGPU
516516
R mRep;
517517
};
518518

519+
#ifndef __OPENCL__ // TODO: current C++ for OpenCL 2021 is at C++17, so no concepts. But we don't need this trick for OpenCL anyway, so we can just hide it.
519520
template <class T, unsigned int D1, unsigned int D2, class R, typename Y, typename X = Y>
520521
requires(sizeof(typename X::traits_type::pos_type) != 0) // do not provide a template to fair::Logger, etc... (pos_type is a member type of all std::ostream classes)
521522
GPUd() X& operator<<(Y& y, const SMatrixGPU<T, D1, D2, R>&)
522523
{
523524
return y;
524525
}
526+
#endif
525527

526528
template <class T, unsigned int D1, unsigned int D2, class R>
527529
GPUdi() SMatrixGPU<T, D1, D2, R>::SMatrixGPU(SMatrixIdentity)

GPU/GPUTracking/dEdx/GPUdEdx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ GPUdi() void GPUdEdx::fillSubThreshold(int32_t padRow, const GPUParam& GPUrestri
212212
mNSubThresh++;
213213
}
214214

215-
#endif // !GPUCA_HAVE_O2HEADERS || __OPENCL1__
215+
#endif // !GPUCA_HAVE_O2HEADERS || GPUCA_OPENCL1
216216
} // namespace gpu
217217
} // namespace GPUCA_NAMESPACE
218218

0 commit comments

Comments
 (0)