Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread indexing. #43

Open
Tracked by #25
bauom opened this issue Feb 22, 2024 · 0 comments
Open
Tracked by #25

thread indexing. #43

bauom opened this issue Feb 22, 2024 · 0 comments
Assignees

Comments

@bauom
Copy link
Collaborator

bauom commented Feb 22, 2024

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

@bauom bauom mentioned this issue Feb 22, 2024
22 tasks
@smazouz42 smazouz42 assigned smazouz42 and unassigned smazouz42 Mar 1, 2024
@smazouz42 smazouz42 self-assigned this Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants