vector and matrix optimization

This commit is contained in:
Youmu Liu
2025-10-14 18:13:18 +08:00
parent 47d2bfe558
commit c5eaf250ab
16 changed files with 482 additions and 381 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#include "sn_intrinsic.h"
#include "sn_internal.h"
SN_API void SN_DECL normalize(VEC(float) *restrict source, VEC(float) *restrict target)
INTERNAL void SN_DECL f32_normalize(VEC(float) *restrict source, VEC(float) *restrict target)
{
register __m128 s = _mm_load_ps(&source->xmm);
register __m128 a_length_sq = _mm_mul_ps(s, s);