Intermediate commit for rebase

Dieser Commit ist enthalten in:
Brandon Potter committed 2024-09-10 07:10:22 -07:00
1 Ursprung 678564ba3c
Commit 2806e1be79
4 Dateien geändert
+77 -17

Keine Dateien entsprechen Ihrer Suche

+8
Datei anzeigen
@@ -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.