Esempio 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;
 }
Esempio n. 2
0
 /**
  * The context of the program.
  *
  * @param program The program
  * @return The value
  */
 public static cl_context getContext(cl_program program) {
   cl_context result = new cl_context();
   Infos.getPointer(Infos.FOR_PROGRAM, program, CL_PROGRAM_CONTEXT, result);
   if (result.equals(new cl_context())) {
     return null;
   }
   return result;
 }
Esempio n. 3
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;
 }