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/src/omega_bw_policy.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 / src / omega_bw_policy.h` 21 lines · 878 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #ifndef OMEGA_BW_POLICY_H 3 #define OMEGA_BW_POLICY_H 4 #include "cudapp_native.h" 5 #include 6 /* The only branch here checks the generated ABI, not GPU policy. The scalar 7 * unit is total and import-free for these canonical unsigned arguments. */ 8 static inline uint64_t omega_bw_value(uint64_t op, uint64_t x, uint64_t y, 9 uint64_t z, uint64_t w, uint64_t v) { 10 uint64_t result; 11 if (omega_bw_scalar(&result, op, x, y, z, w, v) != OMEGA_OK) __builtin_trap(); 12 return result; 13 } 14 #ifndef OMEGA_GPU_NO_POSIX 15 static inline int omega_bw_id(const uint8_t data[256], uint64_t n, uint8_t out[32]) { 16 uint64_t result = 0; 17 uint32_t rc = omega_bw_identity(&result, data, 256, n, out, 32); 18 return (int)(int64_t)omega_bw_value(8, rc, result, 0, 0, 0); 19 } 20 #endif 21 #endif