interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / om / tools / dag_jstr.om

26 lines · 497 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note dagsim jstr byte policy. The C stream shell owns string termination and output effects.
3fn dj_hex x uint to uchar
4if lt x 10
5ret uchar add x 48
6end
7ret uchar add x 87
8end
9fn dag_jstr c uchar out edit uchar 6 to ulong
10if or eq c 34 eq c 92
11put out 0 92
12put out 1 c
13ret 2
14end
15if lt c 32
16put out 0 92
17put out 1 117
18put out 2 48
19put out 3 48
20put out 4 dj_hex shr uint c 4
21put out 5 dj_hex and uint c 15
22ret 6
23end
24put out 0 c
25ret 1
26end