Skip to content

Instantly share code, notes, and snippets.

@nazar-pc
Created August 15, 2017 13:38
Show Gist options
  • Save nazar-pc/984c342f0dd7bc4e0ae383a47033d319 to your computer and use it in GitHub Desktop.
Save nazar-pc/984c342f0dd7bc4e0ae383a47033d319 to your computer and use it in GitHub Desktop.
SIMD version of p448_bias
void
p448_bias (
p448_t *a,
int amt
) {
uint32_t co1 = ((1ull<<28)-1)*amt, co2 = co1-amt;
uint32x4_t lo = {co1,co1,co1,co1}, hi = {co2,co1,co1,co1};
uint32x4_t *aa = (uint32x4_t*) a;
aa[0] += lo;
aa[1] += lo;
aa[2] += hi;
aa[3] += lo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment