Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/evidence/gpu-reconv-308/oracle/cf.cu # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / evidence / gpu-reconv-308 / oracle / cf.cu` 25 lines ยท 1163 bytes Raw Blame History 1 // Offline encoding/placement oracle for omega #308 (BSSY/BSYNC). Never linked into AIEN. 2 extern "C" __global__ void k_diamond(unsigned *o, const unsigned *a) { 3 unsigned x = a[threadIdx.x], y; 4 if (x & 1) y = x * 3u + 7u; else { y = x >> 2; y = y * y + 1u; y ^= 0x5a5a; } 5 y += __shfl_down_sync(0xffffffffu, y, 1); 6 o[threadIdx.x] = y; 7 } 8 extern "C" __global__ void k_loop(unsigned *o, const unsigned *a) { 9 unsigned j = a[threadIdx.x], p = a[threadIdx.x + 64], acc = 0; 10 while (j < 32) { acc |= 1u << j; j += p; } 11 acc += __shfl_down_sync(0xffffffffu, acc, 1); 12 o[threadIdx.x] = acc; 13 } 14 extern "C" __global__ void k_nested(unsigned *o, const unsigned *a) { 15 unsigned x = a[threadIdx.x], acc = 0; 16 if (x & 1) { unsigned j = x >> 1; while (j < 32) { acc += j; j += (x & 7) + 1; } } 17 acc += __shfl_down_sync(0xffffffffu, acc, 1); 18 __syncthreads(); 19 o[threadIdx.x] = acc; 20 } 21 extern "C" __global__ void k_break(unsigned *o, const unsigned *a) { 22 unsigned x = a[threadIdx.x], acc = 0; 23 for (unsigned i = 0; i < 64; i++) { acc += a[i]; if (acc > x) break; } 24 o[threadIdx.x] = acc + __shfl_down_sync(0xffffffffu, acc, 1); 25 }