Ejemplo n.º 1
0
 /**
  * The program that this kernel belongs to
  *
  * @param kernel The kernel
  * @return The value
  */
 public static cl_program getProgram(cl_kernel kernel) {
   cl_program result = new cl_program();
   Infos.getPointer(Infos.FOR_KERNEL, kernel, CL_KERNEL_PROGRAM, result);
   if (result.equals(new cl_program())) {
     return null;
   }
   return result;
 }
Ejemplo n.º 2
0
 /**
  * The context that this kernel belongs to
  *
  * @param kernel The kernel
  * @return The value
  */
 public static cl_context getContext(cl_kernel kernel) {
   cl_context result = new cl_context();
   Infos.getPointer(Infos.FOR_KERNEL, kernel, CL_KERNEL_CONTEXT, result);
   if (result.equals(new cl_context())) {
     return null;
   }
   return result;
 }