Skip to content
Snippets Groups Projects
Commit 60a4c28f authored by ='s avatar =
Browse files

Mesures

parent 2b0ad9b6
Branches
No related tags found
No related merge requests found
......@@ -38,16 +38,6 @@ __device__ int life_destiny(int* src, int x,int y,int i, int j){
}
}
void print_array(int* array, int nRows, int nCols) {
for (int i = 0; i < nRows; i++) {
for (int j = 0; j < nCols; j++) {
printf("%d, ", array[i*nCols + j]);
}
printf("\n");
}
}
__global__ void dummy_kernel(int* src, int* dest,int N, int M)
{
int i = blockIdx.x * blockDim.x + threadIdx.x;
......
......@@ -21,6 +21,16 @@ void write_pbm(int* array, int nRows, int nCols, const char *filename) {
fclose(f);
}
void print_array(int* array, int nRows, int nCols) {
for (int i = 0; i < nRows; i++) {
for (int j = 0; j < nCols; j++) {
printf("%d, ", array[i*nCols + j]);
}
printf("\n");
}
}
int main() {
int H = 100;
int W = 100;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment