Open main menu

CDOT Wiki β

Changes

GPU610/gpuchill

425 bytes added, 22:10, 4 April 2019
Assignment 2
=== Assignment 2 ===
==== Beginning Information ====
 ==== Enlarge Image====<pre>__global__ void enlargeImg(int* a, int* b, int matrixSize, int growthVal, int imgCols, int enlargedCols) { int idx = blockIdx.x * blockDim.x + threadIdx.x; int x = idx / enlargedCols; int y = idx % enlargedCols; if (idx < matrixSize) { a[idx] = b[(x / growthVal) * imgCols + (y / growthVal)]; }}</pre> ==== Shrink Image ====
On the CPU "shrink" took 20,000 microseconds and the GPU took 118 microseconds which shows a speedup of 169.5 times
The following chart graphically shows how this speedup looks:
==== Rotate Image==== ==== Translate Image==== ==== Rotate Image====
On the CPU "rotate" took 40,000 microseconds and the GPU took 123,123 microseconds which shows a speedup of X
The following chart graphically shows how this speedup looks:
 
==== Negate Image====
=== Assignment 3 ===
46
edits