mirror of
https://github.com/recp/cglm.git
synced 2026-01-01 13:16:11 +00:00
avx: implement scale matrix using AVX
This commit is contained in:
@@ -14,6 +14,16 @@
|
||||
|
||||
#include <immintrin.h>
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_mat4_scale_avx(mat4 m, float s) {
|
||||
__m256 y0;
|
||||
y0 = _mm256_set1_ps(s);
|
||||
|
||||
glmm_store256(m[0], _mm256_mul_ps(y0, glmm_load256(m[0])));
|
||||
glmm_store256(m[2], _mm256_mul_ps(y0, glmm_load256(m[2])));
|
||||
}
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_mat4_mul_avx(mat4 m1, mat4 m2, mat4 dest) {
|
||||
|
||||
Reference in New Issue
Block a user