mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Add macro for automatic alignment of matrices
This commit is contained in:
@@ -26,6 +26,12 @@
|
||||
# define CGLM_ALIGN_IF(X) /* no alignment */
|
||||
#endif
|
||||
|
||||
#ifdef __AVX__
|
||||
# define CGLM_ALIGN_MAT CGLM_ALIGN(32)
|
||||
#else
|
||||
# define CGLM_ALIGN_MAT CGLM_ALIGN(16)
|
||||
#endif
|
||||
|
||||
typedef float vec2[2];
|
||||
typedef CGLM_ALIGN_IF(8) float vec3[3];
|
||||
typedef int ivec3[3];
|
||||
|
||||
Reference in New Issue
Block a user