]> AND Private Git Repository - book_gpu.git/blob - BookGPU/Chapters/chapter17/code/mior_launcher.java
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif
[book_gpu.git] / BookGPU / Chapters / chapter17 / code / mior_launcher.java
1 @Override
2 protected void doLiveImpl() {
3     simulateKernel.setArguments(mmMem, omMem, worldsMem, mmOffsetsMem, omOffsetsMem, mmCSRMem, omCSRMem, partsMem);
4
5     if (blockSize < Math.max(nbOM, nbMM)) {
6         throw new RuntimeException("blockSize (" + blockSize + 
7                                 ") too small to execute the simulation");
8     }
9
10     OCLEvent event = queue.enqueue1DKernel(simulateKernel, nbSim * blockSize, blockSize);
11
12     OCLEvent.waitFor(event);
13
14     if (! isBatchModeEnabled()) {
15         queue.blockingReadBuffer(mmMem, mmList, 0, mmMem.getSize());
16         queue.blockingReadBuffer(omMem, omList, 0, omMem.getSize());
17         queue.blockingReadBuffer(worldsMem, worlds, 0, worldsMem.getSize());
18     }
19 }