Cached CPU features, added AVX2, and AVX512.
Some checks failed
Build & Release / Windows-AMD64-Build (push) Failing after 4m42s
Build & Release / Linux-AMD64-Build (push) Successful in 15m40s
Build & Release / Linux-AARCH64-Build (push) Failing after 45m49s

This commit is contained in:
2025-05-08 22:41:05 -07:00
parent 63eba0d2db
commit 0cec9789b1
10 changed files with 865 additions and 280 deletions

View File

@@ -36,9 +36,9 @@ namespace ehs
double Math::Sqrt(const double from)
{
#if defined(EHS_ARCH_X64)
if (CPU::HasAVX())
if (CPU::hasAVX)
return Sqrt_AVX(from);
else if (CPU::HasSSE())
else if (CPU::hasSSE)
return Sqrt_SSE2(from);
double temp = 0.0;
@@ -59,9 +59,9 @@ namespace ehs
float Math::Sqrt(const float from)
{
#if defined(EHS_ARCH_X64)
if (CPU::HasAVX())
if (CPU::hasAVX)
return Sqrt_AVX(from);
else if (CPU::HasSSE())
else if (CPU::hasSSE)
return Sqrt_SSE(from);
float temp = 0.0f;