interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / gpu / nvidia / om / apiviews / rope.om

18 lines · 441 bytes Raw Blame History
1om2
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note One head of the rope table: cos into the first half, sin into the second.
4note len tab is twice len cs, and len sn equals len cs. The launch stays in C.
5fn av_rope cs view f32 * sn view f32 * tab edit f32 * to ulong
6if ne len cs len sn
7ret 1
8end
9if ne len tab add len cs len cs
10ret 1
11end
12h = len cs
13for i ulong h
14put tab i get cs i
15put tab add i h get sn i
16end
17ret 0
18end