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 / apirest / tcperm.om

23 lines · 372 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn artcperm x view f32 * y edit ushort * to ulong
3if ne len x len y
4ret 1
5end
6for i ulong 18446744073709551615
7if ge i len x
8break
9end
10o = rem i 4
11if eq o 1
12o = 2
13else
14if eq o 2
15o = 1
16end
17end
18p = add sub i rem i 4 o
19v = mul get x p bitcast f32 uint 1602224128
20put y i ushort av_rne bitcast uint v
21end
22ret 0
23end