Open main menu

CDOT Wiki β

Changes

GPU610/TeamKappa

305 bytes removed, 03:00, 16 December 2015
Code Snippet of kernel
==== 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 ====
<code><pre>__global__ void montecarlo(const double* d_x, const double* d_y, int* d_score) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
13
edits