Torque3D/Engine/source/math/public/math_backend.h
marauder2k7 18d0aa0418 further sse simd additions
avx2 float3 added
added normalize_magnitude
added divide fast to float3 may copy to float4

move static spheremesh to drawSphere (initialize on first use) so platform has a chance to load the math backend
2026-02-26 21:11:31 +00:00

35 lines
651 B
C++

#pragma once
#ifndef _MATH_BACKEND_H_
#define _MATH_BACKEND_H_
#ifndef _MCONSTANTS_H_
#include "math/mConstants.h"
#endif
#ifndef _PLATFORMASSERT_H_
#include "platform/platformAssert.h"
#endif
#ifndef _FLOAT4_DISPATCH_H_
#include "math/public/float4_dispatch.h"
#endif
#ifndef _FLOAT3_DISPATCH_H_
#include "math/public/float3_dispatch.h"
#endif
namespace math_backend
{
enum class backend
{
scalar,
sse2,
sse41,
avx,
avx2,
neon
};
static backend g_backend = backend::scalar;
backend choose_backend(U32 cpu_flags);
void install_from_cpu_flags(uint32_t cpu_flags);
}
#endif // !_MATH_BACKEND_H_