Skip to content

thread indexing. #43

Description

@bauom

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions