Esempio n. 1
0
 private synchronized void shutdown() {
   if (!exe.isShutdown()) {
     freeCUObjectsMemory();
   }
   exe.shutdown();
   try {
     System.err.println(
         "cuda device " + Id + " freed ? " + exe.awaitTermination(10, TimeUnit.SECONDS));
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
Esempio n. 2
0
 /** Stop the executors and clean memory on registered CUObject */
 public static synchronized void freeMemory() {
   for (CudaEngine ce : cudaEngines.values()) {
     ce.freeCUObjectsMemory();
   }
 }