public static boolean isOpenCL1_0(cl_platform_id platform) { String version = infos.getString(getPeer(platform), OpenCLLibrary.CL_PLATFORM_VERSION); return version.matches("OpenCL 1\\.0.*"); } public static boolean isValid() {
/** * Get the source code of this program */ public synchronized String getSource() { if (source == null && !loadedFromBinary) source = infos.getString(getEntity(), CL_PROGRAM_SOURCE); return source; }
/** * Get the source code of this program */ public synchronized String getSource() { if (source == null && !loadedFromBinary) source = infos.getString(getEntity(), CL_PROGRAM_SOURCE); return source; }
/** * List of built-in kernels supported by the device. */ @InfoName("CL_DEVICE_BUILT_IN_KERNELS") public String[] getBuiltInKernels() { if (buildInKernels == null) { buildInKernels = new LinkedHashSet<String>(Arrays.asList(infos.getString(getEntity(), CL_DEVICE_BUILT_IN_KERNELS).split(";"))); } return buildInKernels.toArray(new String[buildInKernels.size()]); } private Set<String> buildInKernels;
/** * List of built-in kernels supported by the device. */ @InfoName("CL_DEVICE_BUILT_IN_KERNELS") public String[] getBuiltInKernels() { if (buildInKernels == null) { buildInKernels = new LinkedHashSet<String>(Arrays.asList(infos.getString(getEntity(), CL_DEVICE_BUILT_IN_KERNELS).split(";"))); } return buildInKernels.toArray(new String[buildInKernels.size()]); } private Set<String> buildInKernels;
/** * Returns a list of extension names <br> * Extensions defined here must be supported by all devices associated with this platform. */ @InfoName("CL_PLATFORM_EXTENSIONS") public String[] getExtensions() { if (extensions == null) { extensions = new LinkedHashSet<String>(Arrays.asList(infos.getString(getEntity(), CL_PLATFORM_EXTENSIONS).split("\\s+"))); } return extensions.toArray(new String[extensions.size()]); } private Set<String> extensions;
/** * Returns a list of extension names <br> * Extensions defined here must be supported by all devices associated with this platform. */ @InfoName("CL_PLATFORM_EXTENSIONS") public String[] getExtensions() { if (extensions == null) { extensions = new LinkedHashSet<String>(Arrays.asList(infos.getString(getEntity(), CL_PLATFORM_EXTENSIONS).split("\\s+"))); } return extensions.toArray(new String[extensions.size()]); } private Set<String> extensions;
/** OpenCL software driver version string in the form major_number.minor_number. */ @InfoName("CL_DRIVER_VERSION") public String getDriverVersion() { return infos.getString(getEntity(), CL_DRIVER_VERSION); }
/** OpenCL version string. Returns the OpenCL version supported by the implementation. This version string has the following format: OpenCL<space><major_version.min or_version><space><platform- specific information> Last Revision Date: 5/16/09 Page 30 The major_version.minor_version value returned will be 1.0. */ @InfoName("CL_PLATFORM_VERSION") public String getVersion() { return infos.getString(getEntity(), CL_PLATFORM_VERSION); }
/** * Platform vendor string. */ @InfoName("CL_PLATFORM_VENDOR") public String getVendor() { return infos.getString(getEntity(), CL_PLATFORM_VENDOR); }
/** * Return the kernel function name. */ @InfoName("CL_KERNEL_FUNCTION_NAME") public String getFunctionName() { if (name == null) name = infos.getString(getEntity(), CL_KERNEL_FUNCTION_NAME); return name; } }
/** * OpenCL version string. <br> * Returns the OpenCL version supported by the device.<br> * This version string has the following format: * <code> * OpenCL<space><major_version.min or_version><space><vendor-specific information> * </code> * The major_version.minor_version value returned will be 1.0. */ @InfoName("CL_DEVICE_VERSION") public String getVersion() { return infos.getString(getEntity(), CL_DEVICE_VERSION); }
/** * OpenCL profile string. Returns the profile name supported by the implementation. The profile name returned can be one of the following strings: * <ul> * <li>FULL_PROFILE if the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported).</li> * <li>EMBEDDED_PROFILE if the implementation supports the OpenCL embedded profile. The embedded profile is defined to be a subset for each version of OpenCL. The embedded profile for OpenCL 1.0 is described in section 10.</li> * </ul> */ @InfoName("CL_PLATFORM_PROFILE") public String getProfile() { return infos.getString(getEntity(), CL_PLATFORM_PROFILE); }
/** Device name string. */ @InfoName("CL_DEVICE_NAME") public String getName() { return infos.getString(getEntity(), CL_DEVICE_NAME); }
/** OpenCL software driver version string in the form major_number.minor_number. */ @InfoName("CL_DRIVER_VERSION") public String getDriverVersion() { return infos.getString(getEntity(), CL_DRIVER_VERSION); }
/** * Platform vendor string. */ @InfoName("CL_PLATFORM_VENDOR") public String getVendor() { return infos.getString(getEntity(), CL_PLATFORM_VENDOR); }
/** * Platform name string. */ @InfoName("CL_PLATFORM_NAME") public String getName() { return infos.getString(getEntity(), CL_PLATFORM_NAME); }
/** * Platform name string. */ @InfoName("CL_PLATFORM_NAME") public String getName() { return infos.getString(getEntity(), CL_PLATFORM_NAME); }
/** Vendor name string. */ @InfoName("CL_DEVICE_VENDOR") public String getVendor() { return infos.getString(getEntity(), CL_DEVICE_VENDOR); }
/** Vendor name string. */ @InfoName("CL_DEVICE_VENDOR") public String getVendor() { return infos.getString(getEntity(), CL_DEVICE_VENDOR); }