-
Notifications
You must be signed in to change notification settings - Fork 2
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
support basic_shape on device #54
Comments
Is this task for implementing ttl/algorithms in cuda kernels? |
No, this is not related to the
If you are looking for |
template <std::size_t r> __device__ int get_coords(const int *g, int *c)
{
const int idx = blockIdx.x * blockDim.x + threadIdx.x;
int j = idx;
for (int i = r - 1; i >= 0; --i) {
c[i] = j % g[i];
j /= g[i];
}
return idx;
} |
Currently the cuda grid system only supports up to 6d grid,
blockIdx.x
blockIdx.y
blockIdx.z
threadIdx.x
threadIdx.y
threadIdx.z
and it is tied to the kernel launch parameter.
But sometimes we would like to write something like
The text was updated successfully, but these errors were encountered: