squared distance with SIMD support (#96)

squared distance for vec4
This commit is contained in:
Luigi Castelli
2019-08-23 09:32:54 +02:00
committed by Recep Aslantas
parent d03d4b8df5
commit 43b36f1dc1
9 changed files with 87 additions and 28 deletions

View File

@@ -113,6 +113,12 @@ glmm_norm(__m128 a) {
return _mm_cvtss_f32(_mm_sqrt_ss(glmm_vhadds(_mm_mul_ps(a, a))));
}
static inline
float
glmm_norm2(__m128 a) {
return _mm_cvtss_f32(glmm_vhadds(_mm_mul_ps(a, a)));
}
static inline
__m128
glmm_load3(float v[3]) {