Cached CPU features, added AVX2, and AVX512.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user