2026-02-26 16:40:01 +00:00
|
|
|
#pragma once
|
2026-02-26 21:11:31 +00:00
|
|
|
#ifndef _MATH_BACKEND_H_
|
|
|
|
|
#define _MATH_BACKEND_H_
|
|
|
|
|
|
2026-02-26 16:40:01 +00:00
|
|
|
#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
|
2026-02-26 21:11:31 +00:00
|
|
|
#ifndef _FLOAT3_DISPATCH_H_
|
|
|
|
|
#include "math/public/float3_dispatch.h"
|
|
|
|
|
#endif
|
2026-02-26 16:40:01 +00:00
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
2026-02-26 21:11:31 +00:00
|
|
|
|
|
|
|
|
#endif // !_MATH_BACKEND_H_
|