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 / numeric / reduce.om

20 lines · 407 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note One padded hierarchy stage, or explicitly non-contract left fold.
3fn numeric_reduce op ulong n ulong t view ulong 32 seq ulong init ulong to ulong
4v = new ulong 32 0
5if eq seq 1
6r = init
7for i ulong n
8r = fadd32 r get t i
9end
10ret r
11end
12for i ulong 32
13x = nrreduce 0 op 0 0 0
14if lt i n
15x = get t i
16end
17put v i x
18end
19ret numeric_tile op v
20end