Skip to content

Commit ba3e057

Browse files
committed
MathUtils: let bringTo* deduce the type of the call they forward to
The parameter is a reference, so T is deduced with the address space attached, and forcing that same T on a by-value parameter is a substitution failure on Metal. Letting the inner call deduce its own type gives the same T everywhere else, where the address space is not part of it.
1 parent f7d0bbc commit ba3e057

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 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,7 +107,7 @@ 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

113113
#if defined(__OPENCL__) || defined(__METAL__) // TODO: get rid of that stupid workaround for OpenCL template address spaces

0 commit comments

Comments
 (0)