Open main menu

CDOT Wiki β

Changes

GroupNumberUndefined

406 bytes removed, 16:43, 26 March 2017
Assignment 2
And this is the kernal implementation :
__global__ void enlarge(int* pixelArr, const int* oldArray, int ni, int nj){ int i = blockIdx.x * blockDim.x + threadIdx.x; int j = blockIdx.y * blockDim.y + threadIdx.y; if (i < ni && j < nj) { int pixel = oldArray[i * nj + j]; pixelArr[(i * (nj*2) + j)*2] = pixel; pixelArr[(i * (nj*2) + j) * 2 + 1] = pixel; pixelArr[(i * (nj*2) + j) * 2 + nj*2File:Snippet.PNG] = pixel; pixelArr[(i * (nj*2) + j) * 2 + nj*2 + 1] = pixel; }}
=== Assignment 3 ===
62
edits