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 / q38-head / envelope-driver.om

29 lines · 516 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2global QEIn uchar 20480
3global QEOut uchar 8
4fn main to int
5off = ulong 0
6while lt off 20480 bound 20480
7n = read 0 QEIn off sub 20480 off
8if le n 0
9ret 65
10end
11off = add off ulong n
12end
13bits = new uint 5120 0
14for i ulong 5120
15v = ulong 0
16for j ulong 4
17v = or v shl ulong get QEIn add mul i 4 j mul j 8
18end
19put bits i uint v
20end
21v = q38_envelope bits
22for j ulong 8
23put QEOut j uchar and shr v mul j 8 255
24end
25if ne write 1 QEOut 0 8 8
26ret 74
27end
28ret 0
29end