Skip to content

Commit 5cbdb52

Browse files
committed
Extended bruteforce test.
1 parent 2332a15 commit 5cbdb52

File tree

1 file changed

+205
-68
lines changed

1 file changed

+205
-68
lines changed

Source/test/tests/BruteSimdTest.cpp

Lines changed: 205 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "../../DFPSR/base/TemporaryCallback.h"
55
#include "../../DFPSR/api/randomAPI.h"
66

7+
// These tests check for consistency across implementations, instead of giving examples of expected outcome.
8+
79
static const intptr_t ITERATIONS = 1000000;
810

911
template<typename T>
@@ -119,8 +121,64 @@ void binaryEquivalent (
119121
printText(U"*");
120122
}
121123

122-
#define UNARY_POINT_EQUIVALENCE(S, V, EXPR) unaryEquivalent<S, S, V, V>([](const S &a) -> S { return EXPR; }, [](const V &a) -> V { return EXPR; }, U"unary function equivalence test between " U###S U" and " U###V U" for " U###EXPR)
123-
#define BINARY_POINT_EQUIVALENCE(S, V, EXPR) binaryEquivalent<S, S, V, V>([](const S &a, const S &b) -> S { return EXPR; }, [](const V &a, const V &b) -> V { return EXPR; }, U"binary function equivalence test between " U###S U" and " U###V U" for " U###EXPR)
124+
// TODO: Is it time to use varargs instead of copying this?
125+
template<typename S_IN, typename S_OUT, typename V_IN, typename V_OUT>
126+
void trinaryEquivalent (
127+
const TemporaryCallback<S_OUT(const S_IN &a, const S_IN &b, const S_IN &c)> &scalarOp,
128+
const TemporaryCallback<V_OUT(const V_IN &a, const V_IN &b, const V_IN &c)> &simdOp,
129+
const ReadableString &testName
130+
) {
131+
constexpr intptr_t laneCount = (sizeof(V_IN) / sizeof(S_IN));
132+
// This test only applies to functions where input and output has the same number of lanes.
133+
ASSERT_EQUAL(laneCount, sizeof(V_OUT) / sizeof(S_OUT));
134+
// Initialize a random generator independently of other bruteforce tests
135+
// so that disabling another test does not affect this test.
136+
RandomGenerator generator = random_createGenerator(460983751);
137+
// Loop over random inputs.
138+
for (intptr_t iteration = 0; iteration < ITERATIONS; iteration++) {
139+
// Generate random input.
140+
ALIGN_BYTES(sizeof(V_OUT)) S_IN inputA[laneCount];
141+
ALIGN_BYTES(sizeof(V_OUT)) S_IN inputB[laneCount];
142+
ALIGN_BYTES(sizeof(V_OUT)) S_IN inputC[laneCount];
143+
for (intptr_t lane = 0; lane < laneCount; lane++) {
144+
inputA[lane] = generate<S_IN>(generator);
145+
inputB[lane] = generate<S_IN>(generator);
146+
inputC[lane] = generate<S_IN>(generator);
147+
}
148+
// Execute scalar operation for all lanes.
149+
ALIGN_BYTES(sizeof(V_OUT)) S_OUT scalarResult[laneCount];
150+
for (intptr_t lane = 0; lane < laneCount; lane++) {
151+
scalarResult[lane] = scalarOp(inputA[lane], inputB[lane], inputC[lane]);
152+
}
153+
// Execute SIMD operation with all lanes at the same time.
154+
V_IN simdInputA = V_IN::readAlignedUnsafe(inputA);
155+
V_IN simdInputB = V_IN::readAlignedUnsafe(inputB);
156+
V_IN simdInputC = V_IN::readAlignedUnsafe(inputC);
157+
V_OUT simdOutput = simdOp(simdInputA, simdInputB, simdInputC);
158+
ALIGN_BYTES(sizeof(V_OUT)) S_OUT vectorResult[laneCount];
159+
simdOutput.writeAlignedUnsafe(vectorResult);
160+
// Compare results.
161+
for (intptr_t lane = 0; lane < laneCount; lane++) {
162+
if (!somewhatEqual(scalarResult[lane], vectorResult[lane])) {
163+
printText(U"\n_______________________________ FAIL _______________________________\n");
164+
printText(U"\nWrong result at lane ", lane, U" of 0..", laneCount - 1, U" at iteration ", iteration, U" of ", testName, U"!\n");
165+
printText(U"Input: ", inputA[lane], U", ", inputB[lane], U"\n");
166+
printText(U"Scalar result: ", scalarResult[lane], U"\n");
167+
printText(U"Vector result: ", vectorResult[lane], U"\n");
168+
printText(U"\n____________________________________________________________________\n");
169+
failed = true;
170+
return;
171+
}
172+
}
173+
}
174+
printText(U"*");
175+
}
176+
177+
#define UNARY_POINT_EQUIVALENCE_EXPR(S, V, EXPR) unaryEquivalent<S, S, V, V>([](const S &a) -> S { return EXPR; }, [](const V &a) -> V { return EXPR; }, U"unary function equivalence test between " U###S U" and " U###V U" for " U###EXPR)
178+
#define BINARY_POINT_EQUIVALENCE_EXPR(S, V, EXPR) binaryEquivalent<S, S, V, V>([](const S &a, const S &b) -> S { return EXPR; }, [](const V &a, const V &b) -> V { return EXPR; }, U"binary function equivalence test between " U###S U" and " U###V U" for " U###EXPR)
179+
#define UNARY_POINT_EQUIVALENCE_FUNC(S, V, FUNC) unaryEquivalent<S, S, V, V>([](const S &a) -> S { return FUNC(a); }, [](const V &a) -> V { return FUNC(a); }, U"unary function equivalence test between " U###S U" and " U###V U" for " U###FUNC)
180+
#define BINARY_POINT_EQUIVALENCE_FUNC(S, V, FUNC) binaryEquivalent<S, S, V, V>([](const S &a, const S &b) -> S { return FUNC(a, b); }, [](const V &a, const V &b) -> V { return FUNC(a, b); }, U"binary function equivalence test between " U###S U" and " U###V U" for " U###FUNC)
181+
#define TRINARY_POINT_EQUIVALENCE_FUNC(S, V, FUNC) trinaryEquivalent<S, S, V, V>([](const S &a, const S &b, const S &c) -> S { return FUNC(a, b, c); }, [](const V &a, const V &b, const V &c) -> V { return FUNC(a, b, c); }, U"binary function equivalence test between " U###S U" and " U###V U" for " U###FUNC)
124182

125183
START_TEST(BruteSimd)
126184
printText(U"\nThe bruteforce SIMD test is compiled using:\n");
@@ -141,75 +199,154 @@ START_TEST(BruteSimd)
141199
#endif
142200

143201
// Addition.
144-
BINARY_POINT_EQUIVALENCE(uint8_t , U8x16 , a + b);
145-
BINARY_POINT_EQUIVALENCE(uint8_t , U8x32 , a + b);
146-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a + b);
147-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a + b);
148-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a + b);
149-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a + b);
150-
BINARY_POINT_EQUIVALENCE(int32_t , I32x4 , a + b);
151-
BINARY_POINT_EQUIVALENCE(int32_t , I32x8 , a + b);
152-
BINARY_POINT_EQUIVALENCE(float , F32x4 , a + b);
153-
BINARY_POINT_EQUIVALENCE(float , F32x8 , a + b);
202+
BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16 , a + b);
203+
BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32 , a + b);
204+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a + b);
205+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a + b);
206+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a + b);
207+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a + b);
208+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x4 , a + b);
209+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x8 , a + b);
210+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x4 , a + b);
211+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x8 , a + b);
154212

155213
// Subtraction
156-
BINARY_POINT_EQUIVALENCE(uint8_t , U8x16 , a - b);
157-
BINARY_POINT_EQUIVALENCE(uint8_t , U8x32 , a - b);
158-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a - b);
159-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a - b);
160-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a - b);
161-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a - b);
162-
BINARY_POINT_EQUIVALENCE(int32_t , I32x4 , a - b);
163-
BINARY_POINT_EQUIVALENCE(int32_t , I32x8 , a - b);
164-
BINARY_POINT_EQUIVALENCE(float , F32x4 , a - b);
165-
BINARY_POINT_EQUIVALENCE(float , F32x8 , a - b);
166-
167-
// Negation
168-
UNARY_POINT_EQUIVALENCE(int32_t , I32x4 , -a);
169-
UNARY_POINT_EQUIVALENCE(int32_t , I32x8 , -a);
170-
UNARY_POINT_EQUIVALENCE(float , F32x4 , -a);
171-
UNARY_POINT_EQUIVALENCE(float , F32x8 , -a);
214+
BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16 , a - b);
215+
BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32 , a - b);
216+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a - b);
217+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a - b);
218+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a - b);
219+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a - b);
220+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x4 , a - b);
221+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x8 , a - b);
222+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x4 , a - b);
223+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x8 , a - b);
224+
225+
// Negation (only applicable to signed types)
226+
UNARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x4 , -a);
227+
UNARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x8 , -a);
228+
UNARY_POINT_EQUIVALENCE_EXPR(float , F32x4 , -a);
229+
UNARY_POINT_EQUIVALENCE_EXPR(float , F32x8 , -a);
172230

173231
// Multiplication
174-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x16 , a * b); // Missing
175-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x32 , a * b); // Missing
176-
//BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a * b); // Missing
177-
//BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a * b); // Missing
178-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a * b);
179-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a * b);
180-
BINARY_POINT_EQUIVALENCE(int32_t , I32x4 , a * b);
181-
BINARY_POINT_EQUIVALENCE(int32_t , I32x8 , a * b);
182-
BINARY_POINT_EQUIVALENCE(float , F32x4 , a * b);
183-
BINARY_POINT_EQUIVALENCE(float , F32x8 , a * b);
184-
185-
// Bitwise and
186-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x16 , a & b); // Missing
187-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x32 , a & b); // Missing
188-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a & b);
189-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a & b);
190-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a & b);
191-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a & b);
192-
193-
// Bitwise or
194-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x16, a | b); // Missing
195-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x32, a | b); // Missing
196-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a | b);
197-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a | b);
198-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a | b);
199-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a | b);
200-
201-
// Bitwise xor
202-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x16, a ^ b); // Missing
203-
//BINARY_POINT_EQUIVALENCE(uint8_t , U8x32, a ^ b); // Missing
204-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x8 , a ^ b);
205-
BINARY_POINT_EQUIVALENCE(uint16_t, U16x16, a ^ b);
206-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x4 , a ^ b);
207-
BINARY_POINT_EQUIVALENCE(uint32_t, U32x8 , a ^ b);
208-
209-
// Bitwise negation
210-
UNARY_POINT_EQUIVALENCE(uint16_t, U16x8 , ~a);
211-
UNARY_POINT_EQUIVALENCE(uint16_t, U16x16, ~a);
212-
UNARY_POINT_EQUIVALENCE(uint32_t, U32x4 , ~a);
213-
UNARY_POINT_EQUIVALENCE(uint32_t, U32x8 , ~a);
232+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16 , a * b); // Missing
233+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32 , a * b); // Missing
234+
//BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a * b); // Missing
235+
//BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a * b); // Missing
236+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a * b);
237+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a * b);
238+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x4 , a * b);
239+
BINARY_POINT_EQUIVALENCE_EXPR(int32_t , I32x8 , a * b);
240+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x4 , a * b);
241+
BINARY_POINT_EQUIVALENCE_EXPR(float , F32x8 , a * b);
242+
243+
// Bitwise and (only numerically well defined for unsigned integers)
244+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16 , a & b); // Missing
245+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32 , a & b); // Missing
246+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a & b);
247+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a & b);
248+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a & b);
249+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a & b);
250+
251+
// Bitwise or (only numerically well defined for unsigned integers)
252+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16, a | b); // Missing
253+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32, a | b); // Missing
254+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a | b);
255+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a | b);
256+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a | b);
257+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a | b);
258+
259+
// Bitwise xor (only numerically well defined for unsigned integers)
260+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x16, a ^ b); // Missing
261+
//BINARY_POINT_EQUIVALENCE_EXPR(uint8_t , U8x32, a ^ b); // Missing
262+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , a ^ b);
263+
BINARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, a ^ b);
264+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , a ^ b);
265+
BINARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , a ^ b);
266+
267+
// Bitwise negation (only numerically well defined for unsigned integers)
268+
UNARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x8 , ~a);
269+
UNARY_POINT_EQUIVALENCE_EXPR(uint16_t, U16x16, ~a);
270+
UNARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x4 , ~a);
271+
UNARY_POINT_EQUIVALENCE_EXPR(uint32_t, U32x8 , ~a);
272+
273+
// Absolute (only applicable to signed types)
274+
UNARY_POINT_EQUIVALENCE_FUNC(int32_t, I32x4, dsr::abs);
275+
UNARY_POINT_EQUIVALENCE_FUNC(int32_t, I32x8, dsr::abs);
276+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x4, dsr::abs);
277+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x8, dsr::abs);
278+
279+
// Minimum
280+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x16 , dsr::min); // Missing
281+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x32 , dsr::min); // Missing
282+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x8 , dsr::min); // Missing
283+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x16, dsr::min); // Missing
284+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x4 , dsr::min); // Missing
285+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x8 , dsr::min); // Missing
286+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x4 , dsr::min); // Missing
287+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x8 , dsr::min); // Missing
288+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::min);
289+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::min);
290+
291+
// Maximum
292+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x16 , dsr::max); // Missing
293+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x32 , dsr::max); // Missing
294+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x8 , dsr::max); // Missing
295+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x16, dsr::max); // Missing
296+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x4 , dsr::max); // Missing
297+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x8 , dsr::max); // Missing
298+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x4 , dsr::max); // Missing
299+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x8 , dsr::max); // Missing
300+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::max);
301+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::max);
302+
303+
// Clamp using upper and lower limit
304+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x16 , dsr::clamp); // Missing
305+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x32 , dsr::clamp); // Missing
306+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x8 , dsr::clamp); // Missing
307+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x16, dsr::clamp); // Missing
308+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x4 , dsr::clamp); // Missing
309+
//TRINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x8 , dsr::clamp); // Missing
310+
//TRINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x4 , dsr::clamp); // Missing
311+
//TRINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x8 , dsr::clamp); // Missing
312+
TRINARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::clamp);
313+
TRINARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::clamp);
314+
315+
// Clamp using only the upper limit (same as minimum but different name for readability)
316+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x16 , dsr::clampUpper); // Missing
317+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x32 , dsr::clampUpper); // Missing
318+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x8 , dsr::clampUpper); // Missing
319+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x16, dsr::clampUpper); // Missing
320+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x4 , dsr::clampUpper); // Missing
321+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x8 , dsr::clampUpper); // Missing
322+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x4 , dsr::clampUpper); // Missing
323+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x8 , dsr::clampUpper); // Missing
324+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::clampUpper);
325+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::clampUpper);
326+
327+
// Clamp using only the lower limit (same as maximum but different name for readability)
328+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x16 , dsr::clampLower); // Missing
329+
//BINARY_POINT_EQUIVALENCE_FUNC(uint8_t , U8x32 , dsr::clampLower); // Missing
330+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x8 , dsr::clampLower); // Missing
331+
//BINARY_POINT_EQUIVALENCE_FUNC(uint16_t, U16x16, dsr::clampLower); // Missing
332+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x4 , dsr::clampLower); // Missing
333+
//BINARY_POINT_EQUIVALENCE_FUNC(uint32_t, U32x8 , dsr::clampLower); // Missing
334+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x4 , dsr::clampLower); // Missing
335+
//BINARY_POINT_EQUIVALENCE_FUNC(int32_t , I32x8 , dsr::clampLower); // Missing
336+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::clampLower);
337+
BINARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::clampLower);
338+
339+
/* Needs a more flexible precision or input range to handle singularity near division by zero.
340+
// Reciprocal (only applicable to floating-point types)
341+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::reciprocal);
342+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::reciprocal);
343+
344+
// Square root (only applicable to floating-point types)
345+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::squareRoot);
346+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::squareRoot);
214347
348+
// Reciprocal square root (only applicable to floating-point types)
349+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x4 , dsr::reciprocalSquareRoot);
350+
UNARY_POINT_EQUIVALENCE_FUNC(float , F32x8 , dsr::reciprocalSquareRoot);
351+
*/
215352
END_TEST

0 commit comments

Comments
 (0)