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/CUDApp/blob/main/tests/scan_rest_test.c # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / tests / scan_rest_test.c` 33 lines · 1545 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #include "omega_gpu_scan.h" 3 #include "cudapp_native.h" 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 int scan_c_prefix(const float *,size_t,float *); 11 static uint32_t bits(float f){uint32_t u;memcpy(&u,&f,4);return u;} 12 static float value(uint32_t u){float f;memcpy(&f,&u,4);return f;} 13 static void equal(float a,float b){assert((isnan(a)&&isnan(b))||bits(a)==bits(b));} 14 int main(void){ 15 const uint32_t cls[]={0,0x80000000u,1,0x80000001u,0x3f800000u,0xbf800000u,0x7f800000u,0xff800000u,0x7fc00001u,0x4b000000u}; 16 const size_t ns[]={1,31,32,33,63,64,65,1023,1024,1025,2049}; 17 for(unsigned k=0;k1){r=0;assert(!omega_ar_carry(&r,tot,0,b,n)&&r==1);} 30 free(x);free(a);free(b);free(tot); 31 } 32 puts("SCAN_REFERENCE_REST differential PASS");return 0; 33 }