Created
February 12, 2016 13:22
-
-
Save bitnenfer/43722eb42816103f0a8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct mat4 | |
{ | |
union alignas(16) | |
{ | |
struct | |
{ | |
float | |
a, b, c, d, | |
e, f, g, h, | |
i, j, k, l, | |
m, n, o, p; | |
}; | |
float data[16]; | |
// This is the important data. | |
__m128 sse_data[4]; | |
}; | |
}; | |
// or a more "clean" implementation | |
struct mat4 | |
{ | |
__m128 data[4]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment