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_route_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_route_unit.c` 43 lines · 1970 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #include 3 #include 4 #include 5 #ifndef CM_ROUTE_IMPL 6 #define CM_ROUTE_IMPL "cudapp_om_cm_route.c" 7 #endif 8 #include CM_ROUTE_IMPL 9 static int one(uint64_t n, int red) { 10 uint64_t d[16] = {n}, r = 0; 11 if (omega_cm_route(&r, 0, d, 16) || r != 1 || d[1] != n / 64 || 12 d[2] != n % 64 || d[3] != (n / 64) * 64 + (unsigned)red) return 1; 13 return 0; 14 } 15 int main(int argc, char **argv) { 16 (void)argv; 17 const uint64_t cases[] = {0,1,62,63,64,65,126,127,128,129,UINT32_MAX-1, 18 UINT32_MAX,(uint64_t)UINT32_MAX+1,UINT64_MAX-1,UINT64_MAX}; 19 for (unsigned i=0;i1)) { fputs("FAIL cm route block plan\n",stderr); return 1; } 21 for (unsigned field=0;field<6;++field) for (unsigned i=0;i