fix linux compile

added flags for different simd availability
linux complained (as usual)
This commit is contained in:
marauder2k7 2026-02-25 18:05:39 +00:00
parent a59ba751eb
commit 8908bbe462
3 changed files with 70 additions and 3 deletions

View file

@ -196,12 +196,14 @@ float math_backend::float4::dot(const float* a, const float* b)
// ---- SSE4.1 : dedicated dot instruction ----
case ISA::AVX2:
case ISA::AVX:
case ISA::SSE41: {
case ISA::SSE41:
#ifdef TORQUE_HAVE_SSE4_1 // Linux macro required in case sse4 does not exist.
{
__m128 va = _mm_loadu_ps(a);
__m128 vb = _mm_loadu_ps(b);
return _mm_cvtss_f32(_mm_dp_ps(va, vb, 0xFF));
}
#endif
// ---- SSE2 fallback (no horizontal ops available) ----
case ISA::SSE2: {
__m128 va = _mm_loadu_ps(a);