Skip to content

Instantly share code, notes, and snippets.

@CodaFi
Last active December 14, 2015 17:38
Show Gist options
  • Save CodaFi/5123465 to your computer and use it in GitHub Desktop.
Save CodaFi/5123465 to your computer and use it in GitHub Desktop.
ACCELERATE(x) _mm_set1_ps((float)&x)
DECCELERATE_INTO(x, f) _mm_store_ss(&f, result)
Sample usage:
//accelerate a float into a super-fast 128 mm register
float x = 1.0f;
__m128 vecX = ACCELERATE(x);
//deccelerate a 128 mm register value back to a float
float dexc = 0.0f;
DECCELERATE_INTO(vecX, dexc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment