/** * 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; }
/** * 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; }