forked from pyccel/pyccel
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Adding support to Cuda thread indexing.
example:
from pyccel.decorators import kernel, types
from pyccel import cuda
@kernel
@types('int[:]')
def func(a):
i = cuda.threadIdx(0) + cuda.blockIdx(0) * cuda.blockDim(0)
print("Hello World! ", a[i])The aim is to add the support of ( threadIdx, blockIdx, blockDim )
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#thread-hierarchy
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#built-in-variables
Metadata
Metadata
Assignees
Labels
No labels