Exemplo 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);
       }
     }
   }
 }
Exemplo 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);
       }
     }
   }
 }
Exemplo n.º 3
0
 @Override
 protected void finalize() throws Throwable {
   clReleaseCommandQueue(commandQueue);
   clReleaseContext(context);
   super.finalize();
 }