mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
arm: use intrin to set/init vec4 as @gottfriedleibniz suggests
This commit is contained in:
@@ -35,7 +35,13 @@
|
|||||||
#define glmm_combine_hh(x, y) vcombine_f32(vget_high_f32(x), vget_high_f32(y))
|
#define glmm_combine_hh(x, y) vcombine_f32(vget_high_f32(x), vget_high_f32(y))
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) && defined(_MSC_VER)
|
||||||
# define glmm_float32x4_init(x, y, z, w) { .n128_f32 = { x, y, z, w } }
|
/* # define glmm_float32x4_init(x, y, z, w) { .n128_f32 = { x, y, z, w } } */
|
||||||
|
CGLM_INLINE
|
||||||
|
float32x4_t
|
||||||
|
glmm_float32x4_init(float x, float y, float z, float w) {
|
||||||
|
CGLM_ALIGN(16) float v[4] = {x, y, z, w};
|
||||||
|
return vld1q_f32(v);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
# define glmm_float32x4_init(x, y, z, w) { x, y, z, w }
|
# define glmm_float32x4_init(x, y, z, w) { x, y, z, w }
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user