]> 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
last font embedded pb corrected
[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 + ") too small to execute the simulation");
7     }
8
9     OCLEvent event = queue.enqueue1DKernel(simulateKernel, nbSim * blockSize, blockSize);
10
11     OCLEvent.waitFor(event);
12     OCLUtils.printEventStats("simulate", 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         System.out.println("copy");
19     }
20 }