Skip to content
Snippets Groups Projects
Commit 2b0ad9b6 authored by ='s avatar =
Browse files

mesures

parent 833be914
No related branches found
No related tags found
No related merge requests found
......@@ -54,13 +54,7 @@ __global__ void dummy_kernel(int* src, int* dest,int N, int M)
int j = blockIdx.y * blockDim.y + threadIdx.y;
int index = ((j-1) * N + i);
//printf("\n i = %d j = %d",i,j);
//int index = i*(M-1)+j;
int res = life_destiny(src,N,M,i,j);
if(src[index] == 1){
printf("\n i = %d j = %d",i,j);
}
dest[index] = res;
}
......
......@@ -22,8 +22,8 @@ void write_pbm(int* array, int nRows, int nCols, const char *filename) {
}
int main() {
int H = 32;
int W = 32;
int H = 100;
int W = 100;
int* domain = (int*)calloc(H*W, sizeof(int));
// carre au milieu du domaine, devrait rester statique
domain[9*W+9] = 1;
......@@ -46,7 +46,7 @@ int main() {
cudaEventRecord(start,0);
life(domain, H, W, 1, dim3(32, 32, 1), dim3(W/32, H/32, 1));
life(domain, H, W, 500, dim3(32, 32, 1), dim3(W/32, H/32, 1));
cudaEventRecord(stop,0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment