repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[DirectX] Implement the resource.store.rawbuffer intrinsic (#121282)
[llvm-project.git]
/
libclc
/
ptx-nvidiacl
/
lib
/
workitem
/
get_num_groups.cl
blob
f0e52f1fdbc0888916b5c7f09b43b59c5714a7cf
1
#
include
<
clc
/
clc.h
>
2
3
_CLC_DEF _CLC_OVERLOAD size_t get_num_groups
(
uint
dim
) {
4
switch
(
dim
) {
5
case
0
:
return __nvvm_read_ptx_sreg_nctaid_x
()
;
6
case
1
:
return __nvvm_read_ptx_sreg_nctaid_y
()
;
7
case
2
:
return __nvvm_read_ptx_sreg_nctaid_z
()
;
8
default
:
return
0
;
9
}
10
}