logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

clGetProgramBuildInfo - Returns build information for each device in the program object.

Authors

TheKhronosGroup

Errors

       Returns CL_SUCCESS if the function is executed successfully. Otherwise it returns the following:

       •    Returns CL_INVALID_DEVICE if device is not in the list of devices associated with program.

       •    Returns CL_INVALID_VALUE if param_name is not valid, or if size in bytes specified by
           param_value_size is < size of return type as described in the table above and param_value is not
           NULL.

       •    Returns CL_INVALID_PROGRAM if program is a not a valid program object.

       •   CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation
           on the device.

       •   CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL
           implementation on the host.

Name

       clGetProgramBuildInfo - Returns build information for each device in the program object.

       cl_intclGetProgramBuildInfo(cl_programprogram,cl_device_iddevice,cl_program_build_infoparam_name,size_tparam_value_size,void*param_value,size_t*param_value_size_ret);

Notes

        1. OpenCL Specification
           page 153, section 5.6.7 - Program Object Queries

The Khronos Group                                  11/18/2024                         CLGETPROGRAMBUILDINF(3clc)

Parameters

program
           Specifies the program object being queried.

       device
           Specifies the device for which build information is being queried.  device must be a valid device
           associated with program.

        param_name
           Specifies the information to query. The list of supported param_name types and the information
           returned in param_value by clGetProgramBuildInfo is described in the table below.
           ┌──────────────────────────┬─────────────────────────────────────────┐
           │ cl_program_buid_infoReturnTypeandInfo.returnedin       │
           │                          │ param_value                             │
           ├──────────────────────────┼─────────────────────────────────────────┤
           │ CL_PROGRAM_BUILD_STATUS  │ Return type: cl_build_status            │
           │                          │                                         │
           │                          │ Returns the build, compile or link      │
           │                          │ status, whichever was performed last    │
           │                          │ on program for device.                  │
           │                          │                                         │
           │                          │ This can be one of the following:       │
           │                          │                                         │
           │                          │ CL_BUILD_NONE. The build status         │
           │                          │ returned if no clBuildProgram(3clc),    │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc) has been            │
           │                          │ performed on the specified program      │
           │                          │ object for device.                      │
           │                          │                                         │
           │                          │ CL_BUILD_ERROR. The build status        │
           │                          │ returned if clBuildProgram(3clc),       │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc) whichever was       │
           │                          │ performed last on the specified         │
           │                          │ program object for device generated     │
           │                          │ an error.                               │
           │                          │                                         │
           │                          │ CL_BUILD_SUCCESS. The build status      │
           │                          │ returned if clBuildProgram(3clc),       │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc) whichever was       │
           │                          │ performed last on the specified         │
           │                          │ program object for device was           │
           │                          │ successful.                             │
           │                          │                                         │
           │                          │ CL_BUILD_IN_PROGRESS. The build         │
           │                          │ status returned if                      │
           │                          │ clBuildProgram(3clc),                   │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc) whichever was       │
           │                          │ performed last on the specified         │
           │                          │ program object for device has not       │
           │                          │ finished.                               │
           ├──────────────────────────┼─────────────────────────────────────────┤
           │ CL_PROGRAM_BUILD_OPTIONS │ Return type: char[]                     │
           │                          │                                         │
           │                          │ Return the build, compile or link       │
           │                          │ options specified by the options        │
           │                          │ argument in clBuildProgram(3clc),       │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc), whichever was      │
           │                          │ performed last on program for device.   │
           │                          │                                         │
           │                          │ If build status of program for device   │
           │                          │ is CL_BUILD_NONE, an empty string is    │
           │                          │ returned.                               │
           ├──────────────────────────┼─────────────────────────────────────────┤
           │ CL_PROGRAM_BUILD_LOG     │ Return type: char[]                     │
           │                          │                                         │
           │                          │ Return the build, compile or link log   │
           │                          │ for clBuildProgram(3clc),               │
           │                          │ clCompileProgram(3clc) or               │
           │                          │ clLinkProgram(3clc) whichever was       │
           │                          │ performed last on program for device.   │
           │                          │                                         │
           │                          │ If build status of program for device   │
           │                          │ is CL_BUILD_NONE, an empty string is    │
           │                          │ returned.                               │
           ├──────────────────────────┼─────────────────────────────────────────┤
           │ CL_PROGRAM_BINARY_TYPE   │ Return type: cl_program_binary_type     │
           │                          │                                         │
           │                          │ Return the program binary type for      │
           │                          │ device. This can be one of the          │
           │                          │ following values:                       │
           │                          │                                         │
           │                          │ CL_PROGRAM_BINARY_TYPE_NONE. There is   │
           │                          │ no binary associated with device.       │
           │                          │                                         │
           │                          │ CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT. │
           │                          │ A compiled binary is associated with    │
           │                          │ device. This is the case if program     │
           │                          │ was created using                       │
           │                          │ clCreateProgramWithSource(3clc) and     │
           │                          │ compiled using clCompileProgram(3clc)   │
           │                          │ or a compiled binary is loaded using    │
           │                          │ clCreateProgramWithBinary(3clc).        │
           │                          │                                         │
           │                          │ CL_PROGRAM_BINARY_TYPE_LIBRARY. A       │
           │                          │ library binary is associated with       │
           │                          │ device. This is the case if program     │
           │                          │ was created by clLinkProgram(3clc)      │
           │                          │ which is called with the                │
           │                          │ –createlibrary link option or if a      │
           │                          │ library binary is loaded using          │
           │                          │ clCreateProgramWithBinary(3clc).        │
           │                          │                                         │
           │                          │ CL_PROGRAM_BINARY_TYPE_EXECUTABLE. An   │
           │                          │ executable binary is associated with    │
           │                          │ device. This is the case if program     │
           │                          │ was created by clLinkProgram(3clc)      │
           │                          │ without the –createlibrary link         │
           │                          │ option or program was created by        │
           │                          │ clBuildProgram(3clc) or an executable   │
           │                          │ binary is loaded using                  │
           │                          │ clCreateProgramWithBinary(3clc).        │
           └──────────────────────────┴─────────────────────────────────────────┘

       param_value
           A pointer to memory where the appropriate result being queried is returned. If param_value is NULL,
           it is ignored.

       param_value_size
           Specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return
           type as described in the table above.

       param_value_size_ret
           Returns the actual size in bytes of data copied to param_value. If param_value_size_ret is NULL, it
           is ignored.

See Also

clGetProgramInfo(3clc)

Specification

OpenCLSpecification[1]

See Also