Esempio n. 1
0
 /**
  * Release each of the given contexts if it is not <code>null</code>.
  *
  * @param contexts The contexts to release
  */
 public static void release(Iterable<cl_context> contexts) {
   if (contexts != null) {
     for (cl_context context : contexts) {
       if (context != null) {
         clReleaseContext(context);
       }
     }
   }
 }
Esempio n. 2
0
 /**
  * Release each of the given contexts if it is not <code>null</code>.
  *
  * @param contexts The contexts to release
  */
 public static void release(cl_context... contexts) {
   if (contexts != null) {
     for (cl_context context : contexts) {
       if (context != null) {
         clReleaseContext(context);
       }
     }
   }
 }
Esempio n. 3
0
 @Override
 protected void finalize() throws Throwable {
   clReleaseCommandQueue(commandQueue);
   clReleaseContext(context);
   super.finalize();
 }