Changes

Jump to: navigation, search

GPUSquad

103 bytes added, 12:39, 7 April 2018
Assignment 2
using namespace std;
</source>
<pre style="color: blue">
__global__ void matrixKernel(float* a, float* b, float dcent, int n, int m, int xmin, int xmax,
int ymin, int ymax, float dx, float dy, float dxxinv, float dyyinv) {//MODIFY to suit algorithm
}
</pre>
<source>
// Set grid size and number of iterations
const int save_iters = 20;
dim3 dGrid(nblocks);
dim3 dBlock(1024);
</source><pre style="color: blue">
// Carry out Jacobi iterations
for (k = 1; k <= total_iters; k++) {
}
}
</pre>
<source>
cudaMemcpy(a, d_a, n* m * sizeof(float), cudaMemcpyDeviceToHost);
outputImage("jacobi out", a);
93
edits

Navigation menu