\chapterauthor{Guillaume Laville}{Femto-ST Institute, University of Franche-Comte, France}
\chapterauthor{Christophe Lang}{Femto-ST Institute, University of Franche-Comte, France}
-\chapterauthor{Kamel Mazouzi}{Femto-ST Institute, University of Franche-Comte, France}
-\chapterauthor{Nicolas Marilleau}{Femto-ST Institute, University of Franche-Comte, France}
+\chapterauthor{Kamel Mazouzi}{Franche-Comte Computing Center, University of Franche-Comte, France}
+\chapterauthor{Nicolas Marilleau}{UMMISCO, Institut de Recherche pour le Développement (IRD), France}
\chapterauthor{Bénédicte Herrmann}{Femto-ST Institute, University of Franche-Comte, France}
\chapterauthor{Laurent Philippe}{Femto-ST Institute, University of Franche-Comte, France}
// _syncthreads() in CUDA
barrier(CLK_GLOBAL_MEM_FENCE);
- // Retrieve neighbors surplus and add them to the current cell population
+ // Retrieve neighbors surplus and add them to the current cell
+ // population
int surplus = OVERFLOW(world, overflows, i + 1, j) + OVERFLOW(world, overflows, i - 1, j) + OVERFLOW(world, overflows, i, j - 1) + OVERFLOW(world, overflows, i, j + 1);
CELL(world, newPopulations, i, j) = CELL(world, populations, i, j) + surplus / 8.0 - OVERFLOW(world, overflows, i, j);
simulateKernel.setArguments(mmMem, omMem, worldsMem, mmOffsetsMem, omOffsetsMem, mmCSRMem, omCSRMem, partsMem);
if (blockSize < Math.max(nbOM, nbMM)) {
- throw new RuntimeException("blockSize (" + blockSize + ") too small to execute the simulation");
+ throw new RuntimeException("blockSize (" + blockSize +
+ ") too small to execute the simulation");
}
OCLEvent event = queue.enqueue1DKernel(simulateKernel, nbSim * blockSize, blockSize);
queue.blockingReadBuffer(mmMem, mmList, 0, mmMem.getSize());
queue.blockingReadBuffer(omMem, omList, 0, omMem.getSize());
queue.blockingReadBuffer(worldsMem, worlds, 0, worldsMem.getSize());
- System.out.println("copy");
}
}