Torque3D/Engine/source/math/public/mat44_dispatch.h
marauder2k7 caeaedde52 add inverse to
fix tests by adding an explicit inverse to function
copy 3rd row into dst it seems original was not touching this at all.
2026-03-05 18:55:41 +00:00

36 lines
1.1 KiB
C++

#pragma once
#ifndef _MAT44_DISPATCH_H_
#define _MAT44_DISPATCH_H_
namespace math_backend::mat44::dispatch
{
struct Mat44Funcs
{
void (*transpose)(float*) = nullptr;
void (*inverse)(float*) = nullptr;
void (*inverse_to)(const float*, float*) = nullptr;
void (*affine_inverse)(float*) = nullptr;
void (*normalize)(float*) = nullptr;
void (*mul_mat44)(const float* a, const float* b, float* r) = nullptr;
void (*mul_pos3)(const float* a, const float* b, float* r) = nullptr;
void (*mul_vec3)(const float* a, const float* b, float* r) = nullptr;
void (*mul_float4)(const float* a, const float* b, float* r) = nullptr;
float (*determinant)(const float*) = nullptr;
void (*scale)(float*, const float*) = nullptr;
void (*get_scale)(const float*, float*) = nullptr;
};
// Global dispatch table
extern Mat44Funcs gMat44;
// Backend installers (defined in ISA libraries)
void install_scalar();
void install_sse2();
void install_sse41();
void install_avx();
void install_avx2();
void install_neon();
}
#endif // !_MAT44_DISPATCH_H_