Changes

Jump to: navigation, search

GPU610/TeamKappa

310 bytes added, 02:59, 16 December 2015
Code Snippet
'''kernel CUDA version work in progress...and comparasions'''
 
==== Code Snippet of CUDA kernel ====
<code><pre>__global__ void montecarlo(const double* d_x, const double* d_y, int* d_score) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if ((d_x[idx]) * (d_x[idx]) +
(d_y[idx]) * (d_y[idx]) <= 1){
d_score[idx] = 1;
}
else
d_score[idx] = 0;
}
</code></pre>
==== Code Snippet of kernel ====
13
edits

Navigation menu