Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: fusl/src/prng/__rand48_step.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <stdint.h> 1 #include <stdint.h>
2 2
3 uint64_t __rand48_step(unsigned short *xi, unsigned short *lc) 3 uint64_t __rand48_step(unsigned short* xi, unsigned short* lc) {
4 { 4 uint64_t a, x;
5 » uint64_t a, x; 5 x = xi[0] | ((uint32_t)xi[1]) << 16 | ((uint64_t)xi[2]) << 32;
6 » x = xi[0] | ((uint32_t)xi[1])<<16 | ((uint64_t)xi[2])<<32; 6 a = lc[0] | ((uint32_t)lc[1]) << 16 | ((uint64_t)lc[2]) << 32;
7 » a = lc[0] | ((uint32_t)lc[1])<<16 | ((uint64_t)lc[2])<<32; 7 x = a * x + lc[3];
8 » x = a*x + lc[3]; 8 xi[0] = x;
9 » xi[0] = x; 9 xi[1] = x >> 16;
10 » xi[1] = x>>16; 10 xi[2] = x >> 32;
11 » xi[2] = x>>32; 11 return x & 0xffffffffffffull;
12 » return x & 0xffffffffffffull;
13 } 12 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698