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/runtime/cm_sort_unit.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 / runtime / cm_sort_unit.c` 36 lines · 1675 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #include 3 #include 4 #include 5 #include 6 #define CUDAPP_MIGRATION_PENDING_C_CM_SORT 1 7 #define rx_cm_sort rx_cm_sort_oracle 8 #include "runtime/rx_cm_sort.h" 9 #undef rx_cm_sort 10 #undef RX_CM_SORT_H 11 #undef CUDAPP_MIGRATION_PENDING_C_CM_SORT 12 #define CUDAPP_MIGRATION_PENDING_C_CM_SORT 0 13 #include "runtime/rx_cm_sort.h" 14 static uint64_t state=0x5258534f5254ULL; 15 static uint64_t next(void){state^=state<<13;state^=state>>7;state^=state<<17;return state;} 16 static void test(size_t n,unsigned mode){ 17 double *a=calloc(n?n:1,sizeof *a),*b=calloc(n?n:1,sizeof *b); 18 if(!a||!b)exit(2); 19 const uint64_t edge[]={0,UINT64_C(0x8000000000000000),UINT64_C(0x7ff0000000000000),UINT64_C(0xfff0000000000000),UINT64_C(0x7ff8000000000000),UINT64_C(0xfff8000000000000),1,UINT64_C(0x8000000000000001)}; 20 for(size_t i=0;i