]> 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
159b88ae4b800e37d4a0efca0bcd40e49e1f4dc9
[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     OCLUtils.printEventStats("simulate", event);
14
15     if (! isBatchModeEnabled()) {
16         queue.blockingReadBuffer(mmMem, mmList, 0, mmMem.getSize());
17         queue.blockingReadBuffer(omMem, omList, 0, omMem.getSize());
18         queue.blockingReadBuffer(worldsMem, worlds, 0, worldsMem.getSize());
19     }
20 }