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/leftovers_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 / leftovers_test.c` 79 lines · 3502 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_LEFTOVERS 1 7 #define omega_path_byte oracle_path_byte 8 #define omega_path_copy oracle_path_copy 9 #include "omega_path_check.h" 10 #undef omega_path_byte 11 #undef omega_path_copy 12 #undef CUDAPP_MIGRATION_PENDING_LEFTOVERS 13 #undef OMEGA_PATH_CHECK_H 14 #include "omega_path_check.h" 15 #ifdef LEFTOVERS_ORACLE 16 #define CUDAPP_MIGRATION_PENDING_LEFTOVERS 1 17 #endif 18 #include "omega_numeric_lifecycle.h" 19 #include "omega_gpu_q36_native.h" 20 #ifdef LEFTOVERS_ORACLE 21 #undef CUDAPP_MIGRATION_PENDING_LEFTOVERS 22 #endif 23 atomic_int omega_numeric_native_state; 24 static unsigned checks; 25 #define CHECK(x) do { ++checks; if (!(x)) { fprintf(stderr,"FAIL line %d\n",__LINE__); return 1; } } while (0) 26 static int path(const char *s, size_t cap) { 27 char a[64], b[64]; memset(a, 85, sizeof a); memset(b, 85, sizeof b); 28 int ar = oracle_path_copy(a, cap, s), br = omega_path_copy(b, cap, s); 29 #ifdef LEFTOVERS_RED 30 br ^= 1; 31 #endif 32 CHECK(ar == br); 33 /* Refusals promise an empty string, not equality of scratch bytes. */ 34 CHECK(cap == 0 || strcmp(a, b) == 0); 35 return 0; 36 } 37 int main(void) { 38 const char *cases[] = {NULL,"","/",".","..","...","a/../b","../","a/..","a/./b","a//b/","/..","/a/b","a b","a\nb","AZaz09._-/+,=@:~","..a","a..","a/.../b"}; 39 for (size_t i=0;i>63||!p?UINT64_MAX:0))); 71 } 72 for (unsigned j=0;j