SWDEV-470698 - fix formatting, add format check workflow (#657)

This commit is contained in:
Danylo Lytovchenko
2025-08-20 16:28:06 +02:00
committed by GitHub
vanhempi 5840940caa
commit f7338717ae
1574 muutettua tiedostoa jossa 162972 lisäystä ja 199346 poistoa
@@ -24,15 +24,15 @@ THE SOFTWARE.
using namespace cooperative_groups;
extern "C" {
__global__ void cooperativeKernelEx(int* output, int totalThreads) {
grid_group grid = this_grid();
int tid = threadIdx.x + blockDim.x * blockIdx.x;
if (tid < totalThreads) {
output[tid] = tid * 3;
}
grid.sync();
if (tid == 0) {
output[0] = 2222;
}
grid_group grid = this_grid();
int tid = threadIdx.x + blockDim.x * blockIdx.x;
if (tid < totalThreads) {
output[tid] = tid * 3;
}
grid.sync();
if (tid == 0) {
output[0] = 2222;
}
}
/*
@@ -44,7 +44,7 @@ __global__ void emptyKernel() {}
* Kernel which doesn't use cooperative groups and takes an argument
* and updates the value with 100
*/
__global__ void argKernel(int *val) { *val = 100; }
__global__ void argKernel(int* val) { *val = 100; }
/*
* Kernel which uses cooperative groups and without any arguments
@@ -62,7 +62,7 @@ __global__ void coopEmptykernel() {
* 2) Wait for all the blocks completes it's operations
* 3) Fill each element in the output array with sum of elements in arr
*/
__global__ void coopFillArrayKernel(int *arr, int *output, int N) {
__global__ void coopFillArrayKernel(int* arr, int* output, int N) {
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
if (blockIdx.x == 0)
@@ -93,4 +93,3 @@ __global__ void coopFillArrayKernel(int *arr, int *output, int N) {
}
}
}