Run the full SIMD test suite. Returns the number of failures.
1394 {
1396 int num_tests = 0;
1398
1399 int passed = 0;
1400 int failed = 0;
1401
1403 FL_PRINT(
"────────────────────────────────────────────────────────────────");
1404
1405#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
1406 FL_PRINT(
" SIMD Backend: x86 SSE2");
1407#elif defined(__XTENSA__) && FL_XTENSA_HAS_PIE
1408 FL_PRINT(
" SIMD Backend: Xtensa PIE (ESP32-S3)");
1409#elif defined(__XTENSA__)
1410 FL_PRINT(
" SIMD Backend: Xtensa scalar");
1411#elif defined(__riscv)
1412 FL_PRINT(
" SIMD Backend: RISC-V scalar");
1413#else
1414 FL_PRINT(
" SIMD Backend: Scalar fallback");
1415#endif
1416
1418 ss << " Running " << num_tests << " SIMD tests...\n";
1420
1421 for (int i = 0; i < num_tests; i++) {
1422 bool ok = tests[i].
func();
1423 if (ok) {
1424 passed++;
1426 ss <<
" [PASS] " << tests[i].
name;
1428 } else {
1429 failed++;
1431 ss <<
" [FAIL] " << tests[i].
name;
1433 }
1434 }
1435
1437 ss << "\n[SIMD RESULTS] " << passed << "/" << num_tests << " passed";
1438 if (failed > 0) {
1439 ss << ", " << failed << " FAILED";
1441 } else {
1442 ss << " - ALL PASSED";
1444 }
1445
1446 return failed;
1447}
string str() const FL_NOEXCEPT
#define FL_PRINT(X)
Print without prefix (like FL_WARN but without "WARN: " prefix) Uses sstream for dynamic formatting (...
void getTests(const SimdTestEntry **out_tests, int *out_count)
Get the static test table. Used by both runSimdTests() and the RPC handler.