Run the full SIMD test suite. Returns the number of failures.
1402 {
1404 int num_tests = 0;
1406
1407 int passed = 0;
1408 int failed = 0;
1409
1411 FL_PRINT(
"────────────────────────────────────────────────────────────────");
1412
1413#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
1414 FL_PRINT(
" SIMD Backend: x86 SSE2");
1415#elif defined(__XTENSA__) && FL_XTENSA_HAS_PIE
1416 FL_PRINT(
" SIMD Backend: Xtensa PIE (ESP32-S3)");
1417#elif defined(__XTENSA__)
1418 FL_PRINT(
" SIMD Backend: Xtensa scalar");
1419#elif defined(__riscv)
1420 FL_PRINT(
" SIMD Backend: RISC-V scalar");
1421#else
1422 FL_PRINT(
" SIMD Backend: Scalar fallback");
1423#endif
1424
1426 ss << " Running " << num_tests << " SIMD tests...\n";
1428
1429 for (int i = 0; i < num_tests; i++) {
1430 bool ok = tests[i].
func();
1431 if (ok) {
1432 passed++;
1434 ss <<
" [PASS] " << tests[i].
name;
1436 } else {
1437 failed++;
1439 ss <<
" [FAIL] " << tests[i].
name;
1441 }
1442 }
1443
1445 ss << "\n[SIMD RESULTS] " << passed << "/" << num_tests << " passed";
1446 if (failed > 0) {
1447 ss << ", " << failed << " FAILED";
1449 } else {
1450 ss << " - ALL PASSED";
1452 }
1453
1454 return failed;
1455}
void clear() FL_NO_EXCEPT
string str() const FL_NO_EXCEPT
void getTests(const SimdTestEntry **out_tests, int *out_count)
Get the static test table. Used by both runSimdTests() and the RPC handler.