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/tools/dagsim/dagsim_format.h # 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 / tools / dagsim / dagsim_format.h` 23 lines · 775 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 * Fixed-view ABI marshalling only; decisions and arithmetic live in dag_fmt.om. */ 3 #ifndef DAGSIM_FORMAT_H 4 #define DAGSIM_FORMAT_H 5 #include "cudapp_native.h" 6 #include 7 #include 8 #include 9 static inline uint64_t ds_fmt(unsigned mode, uint64_t a[16], char s[256]) { 10 uint64_t result = 0; 11 if (omega_dag_fmt(&result, mode, a, 16, s, 256)) abort(); 12 return result; 13 } 14 static inline uint64_t ds_bits(double d) { 15 uint64_t u; memcpy(&u, &d, sizeof u); return u; 16 } 17 static inline double ds_unbits(uint64_t u) { 18 double d; memcpy(&d, &u, sizeof d); return d; 19 } 20 static inline uint64_t ds_decide(unsigned mode, uint64_t a[16]) { 21 char s[256]; return ds_fmt(mode, a, s); 22 } 23 #endif