mirror of
https://github.com/g-truc/glm.git
synced 2024-11-30 03:44:38 +00:00
Improved alignment
This commit is contained in:
parent
441f8a6575
commit
ce78b77f86
@ -333,11 +333,13 @@ namespace detail
|
|||||||
#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
||||||
# define GLM_DEPRECATED __declspec(deprecated)
|
# define GLM_DEPRECATED __declspec(deprecated)
|
||||||
# define GLM_ALIGN(x) __declspec(align(x))
|
# define GLM_ALIGN(x) __declspec(align(x))
|
||||||
|
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
|
||||||
# define GLM_RESTRICT __declspec(restrict)
|
# define GLM_RESTRICT __declspec(restrict)
|
||||||
# define GLM_RESTRICT_VAR __restrict
|
# define GLM_RESTRICT_VAR __restrict
|
||||||
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
|
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
|
||||||
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
||||||
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
||||||
|
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
|
||||||
# if(GLM_COMPILER >= GLM_COMPILER_GCC33)
|
# if(GLM_COMPILER >= GLM_COMPILER_GCC33)
|
||||||
# define GLM_RESTRICT __restrict__
|
# define GLM_RESTRICT __restrict__
|
||||||
# define GLM_RESTRICT_VAR __restrict__
|
# define GLM_RESTRICT_VAR __restrict__
|
||||||
@ -349,7 +351,8 @@ namespace detail
|
|||||||
# define GLM_RESTRICT_VAR __restrict__
|
# define GLM_RESTRICT_VAR __restrict__
|
||||||
#else
|
#else
|
||||||
# define GLM_DEPRECATED
|
# define GLM_DEPRECATED
|
||||||
# define GLM_ALIGN(x)
|
# define GLM_ALIGN
|
||||||
|
# define GLM_ALIGNED_STRUCT(x)
|
||||||
# define GLM_RESTRICT
|
# define GLM_RESTRICT
|
||||||
# define GLM_RESTRICT_VAR
|
# define GLM_RESTRICT_VAR
|
||||||
#endif//GLM_COMPILER
|
#endif//GLM_COMPILER
|
||||||
|
@ -34,7 +34,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
/// 4x4 Matrix implemented using SIMD SEE intrinsics.
|
/// 4x4 Matrix implemented using SIMD SEE intrinsics.
|
||||||
/// \ingroup gtx_simd_mat4
|
/// \ingroup gtx_simd_mat4
|
||||||
GLM_ALIGN(16) struct fmat4x4SIMD
|
GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
|
||||||
{
|
{
|
||||||
enum ctor{null};
|
enum ctor{null};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
/// 4-dimensional vector implemented using SIMD SEE intrinsics.
|
/// 4-dimensional vector implemented using SIMD SEE intrinsics.
|
||||||
/// \ingroup gtx_simd_vec4
|
/// \ingroup gtx_simd_vec4
|
||||||
GLM_ALIGN(4) struct fvec4SIMD
|
GLM_ALIGNED_STRUCT(4) fvec4SIMD
|
||||||
{
|
{
|
||||||
enum ctor{null};
|
enum ctor{null};
|
||||||
typedef __m128 value_type;
|
typedef __m128 value_type;
|
||||||
|
Loading…
Reference in New Issue
Block a user