STRATA_FORCE_ISA caps the probes like the pool's own (expert_layout.cpp): avx2 = no AVX-512, avx = AVX only, sse = SSE4.2 only.
| 47 | |
| 48 | // STRATA_FORCE_ISA caps the probes like the pool's own (expert_layout.cpp): avx2 = no AVX-512, avx = AVX only, sse = SSE4.2 only. |
| 49 | int isa_cap() { |
| 50 | const char* f = std::getenv("STRATA_FORCE_ISA"); |
| 51 | if (f == nullptr || *f == 0) return 3; |
| 52 | if (!std::strcmp(f, "avx2")) return 2; |
| 53 | if (!std::strcmp(f, "avx")) return 1; |
| 54 | if (!std::strcmp(f, "sse")) return 0; |
| 55 | std::fprintf(stderr, "strata: STRATA_FORCE_ISA=%s is not avx2, avx or sse; ignored\n", f); |
| 56 | return 3; |
| 57 | } |
| 58 | |
| 59 | Caps probe() { |
| 60 | Caps c; |