MCPcopy Create free account
hub / github.com/Niko1221/Strata / isa_cap

Function isa_cap

engine/src/quant/isa.cpp:49–57  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
49int 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
59Caps probe() {
60 Caps c;

Callers 1

probeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected