I saw this post.
const int filas = 128; const int columns = 128; const int N = filas*columnas; const int threadsPerBlock = 16; const int blocksPerGrid = (filas+threadsPerBlock-1) / threadsPerBlock;
Why do you use ‘blocksPerGrid’ like that? thank you.
This expression is rounding up the blocksPerGrid value, such that blocksPerGrid * threadsPerBlock is always larger or equal than the variable filas