Intermediate commit for rebase

Цей коміт міститься в:
Brandon Potter committed 2024-09-10 07:10:22 -07:00
1 джерело 678564ba3c
коміт 2806e1be79
4 files changed
+77 -17

No files matched your search

+8
Переглянути файл
@@ -93,6 +93,7 @@ __device__ __forceinline__ bool is_thread_zero_in_block() {
__device__ __forceinline__ bool is_block_zero_in_grid() {
return hipBlockIdx_x == 0 && hipBlockIdx_y == 0 && hipBlockIdx_z == 0;
}
/*
* Returns the number of threads in the caller's flattened thread block.
*/
@@ -100,6 +101,13 @@ __device__ __forceinline__ int get_flat_block_size() {
return hipBlockDim_x * hipBlockDim_y * hipBlockDim_z;
}
/*
* Returns the number of threads in the caller's flattened grid.
*/
__device__ __forceinline__ int get_flat_grid_size() {
return get_flat_block_size() * hipGridDim_x * hipGridDim_y * hipGridDim_z;
}
/*
* Returns the flattened thread index of the calling thread within its
* thread block.