Deep Learning, Machine Learning, Gpu, Cuda, AI.
also extend this example to handle multiple blocks: #include <stdio.h> // Kernel definition __global__ void AddTwoMatrices(float A[N][N], float B[N][N], float C[N][N]) { int i = blockIdx.x * blockDim.x + threadIdx.x; int j = blockIdx.y * blockDim.y + threadIdx.y; if (i < N && j < N) { C[i][j] =