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 / api / attn_gath.om

40 lines · 732 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn vc_gath s view uchar * d edit uchar * q view ulong 16 to ulong
3r = new ulong 4 0
4put r 2 get q 2
5for jj ulong get q 7
6t = add get q 6 jj
7for h ulong get q 1
8src = mul t get q 3
9dst = mul h get q 4
10src = add src dst
11src = mul src get q 5
12dst = mul t get q 1
13dst = add dst h
14dst = mul dst get q 2
15put r 0 src
16put r 1 dst
17av_cseg s d r
18end
19end
20ret 0
21end
22fn av_gath s view uchar * d edit uchar * q view ulong 16 to ulong
23z = new ulong 16 0
24for j ulong 16
25put z j get q j
26end
27for bb ulong add div get q 0 1000000 1
28put z 6 mul bb 1000000
29cnt = sub get q 0 get z 6
30if gt cnt 1000000
31cnt = ulong 1000000
32end
33put z 7 cnt
34rc = vc_gath s d z
35if ne rc 0
36ret rc
37end
38end
39ret 0
40end