Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 8bb0992

Browse files
Updated according to code review comments
1 parent b428b17 commit 8bb0992

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

SYCL/ESIMD/ext_math.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ template <MathOp Op> float HostMathFunc(float X);
6262

6363
// --- Specializations per each extended math operation
6464

65-
#define DEFINE_OP(Op, HostOp) \
65+
#define DEFINE_ESIMD_OP(Op, HostOp) \
6666
template <> float HostMathFunc<MathOp::Op>(float X) { return HostOp(X); } \
6767
template <int VL> struct DeviceMathFunc<VL, MathOp::Op> { \
6868
simd<float, VL> \
@@ -71,7 +71,7 @@ template <MathOp Op> float HostMathFunc(float X);
7171
} \
7272
}
7373

74-
#define DEFINE_OP_REUSE_SCALAR(Op, HostOp) \
74+
#define DEFINE_SIMD_OVERLOADED_STD_SYCL_OP(Op, HostOp) \
7575
template <> float HostMathFunc<MathOp::Op>(float X) { return HostOp(X); } \
7676
template <int VL> struct DeviceMathFunc<VL, MathOp::Op> { \
7777
simd<float, VL> \
@@ -80,13 +80,13 @@ template <MathOp Op> float HostMathFunc(float X);
8080
} \
8181
}
8282

83-
DEFINE_OP_REUSE_SCALAR(sin, sin);
84-
DEFINE_OP_REUSE_SCALAR(cos, cos);
85-
DEFINE_OP_REUSE_SCALAR(exp, exp);
86-
DEFINE_OP_REUSE_SCALAR(log, log);
87-
DEFINE_OP(inv, 1.0f /);
88-
DEFINE_OP(sqrt, sqrt);
89-
DEFINE_OP(rsqrt, 1.0f / sqrt);
83+
DEFINE_SIMD_OVERLOADED_STD_SYCL_OP(sin, sin);
84+
DEFINE_SIMD_OVERLOADED_STD_SYCL_OP(cos, cos);
85+
DEFINE_SIMD_OVERLOADED_STD_SYCL_OP(exp, exp);
86+
DEFINE_SIMD_OVERLOADED_STD_SYCL_OP(log, log);
87+
DEFINE_ESIMD_OP(inv, 1.0f /);
88+
DEFINE_ESIMD_OP(sqrt, sqrt);
89+
DEFINE_ESIMD_OP(rsqrt, 1.0f / sqrt);
9090

9191
// --- Generic kernel calculating an extended math operation on array elements
9292

0 commit comments

Comments
 (0)