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 / cache.om

29 lines · 580 bytes Raw Blame History
1om2
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note q: entry count, entry bytes, valid-byte offset, key offset, key bytes.
4fn ar_cm q view ulong 8 a view uchar * key view uchar * i ulong to ulong
5b = mul i get q 1
6if eq get a add b get q 2 0
7ret 0
8end
9if ne get q 5 0
10if ne get a add b sub get q 5 1 0
11ret 0
12end
13end
14b = add b get q 3
15for j ulong len key
16if ne get a add b j get key j
17ret 0
18end
19end
20ret 1
21end
22fn arcache q view ulong 8 a view uchar * key view uchar * to ulong
23for i ulong get q 0
24if ne ar_cm q a key i 0
25ret i
26end
27end
28ret 18446744073709551615
29end