Skip to content

Instantly share code, notes, and snippets.

@bitnenfer
Created February 12, 2016 13:22
Show Gist options
  • Save bitnenfer/43722eb42816103f0a8c to your computer and use it in GitHub Desktop.
Save bitnenfer/43722eb42816103f0a8c to your computer and use it in GitHub Desktop.
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