Skip to content

Commit 1ce1e58

Browse files
committed
define basic intrinsics
1 parent d065562 commit 1ce1e58

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

src/intrinsics.jl

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module KernelIntrinsics
2+
3+
"""
4+
get_global_size()::@NamedTuple{x::Int32, y::Int32, z::Int32}
5+
6+
Return the number of global work-items specified.
7+
"""
8+
function get_global_size end
9+
10+
"""
11+
get_global_id()::@NamedTuple{x::Int32, y::Int32, z::Int32}
12+
13+
Returns the unique global work-item ID.
14+
"""
15+
function get_global_id end
16+
17+
"""
18+
get_local_size()::@NamedTuple{x::Int32, y::Int32, z::Int32}
19+
20+
Return the number of local work-items specified.
21+
"""
22+
function get_local_size end
23+
24+
"""
25+
get_local_id()::@NamedTuple{x::Int32, y::Int32, z::Int32}
26+
27+
Returns the unique local work-item ID.
28+
"""
29+
function get_local_id end
30+
31+
"""
32+
get_num_groups()::@NamedTuple{x::Int32, y::Int32, z::Int32}
33+
34+
Returns the number of groups.
35+
"""
36+
function get_num_groups end
37+
38+
"""
39+
get_group_id()::@NamedTuple{x::Int32, y::Int32, z::Int32}
40+
41+
Returns the unique group ID.
42+
"""
43+
function get_group_id end
44+
45+
function localmemory end
46+
function barrier end
47+
function print end
48+
49+
end

0 commit comments

Comments
 (0)