Created
July 25, 2014 04:39
-
-
Save iamgreaser/5761539adca572365663 to your computer and use it in GitHub Desktop.
Am I documenting my code right
This file contains 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
static uint32_t color_sse_to_bytes_1(__m128 m) | |
{ | |
// Introducing a new, novel way of documenting code! | |
__m128 multiply_by_255 = _mm_mul_ps(m, _mm_set1_ps(255.0f)); | |
__m128i then_convert_to_int = _mm_cvtps_epi32(multiply_by_255); | |
__m128i pack_once = _mm_packs_epi32(then_convert_to_int, then_convert_to_int); | |
__m128i pack_again = _mm_packus_epi16(pack_once, pack_once); | |
int get_the_int_and_return = _mm_cvtsi128_si32(pack_again); | |
return get_the_int_and_return; | |
// I get the feeling that was a terrible idea. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment