fclFindDevices Interface

public interface fclFindDevices

Generic interface to list devices, sorted and filtered by properties Raises runtime error if no matching device is found.


Contents


Functions

public module function fclFindDevices_1(ctx, vendor, type, nameLike, extensions, sortBy) result(deviceList)

Arguments

Type IntentOptional Attributes Name
type(fclContext), intent(in), target :: ctx

Context containing device for command queue

character(len=*), intent(in), optional :: vendor

Filter device list based on platform vendor. Specify multiple possible vendors in comma-separate list

character(len=*), intent(in), optional :: type

Filter device list based on device type. Specify at least one of 'cpu', 'gpu', default: 'cpu,gpu' (both)

character(len=*), intent(in), optional :: nameLike

Filter devices based on device name. Look for this substring in device name.

character(len=*), intent(in), optional :: extensions

Filter devices based on supported device extensions. Specify comma-separated list of OpenCL extension names, e.g. cl_khr_fp64. See clGetDeviceInfo Extensions specified are requirements: devices are filtered-out if they don't support all extensions specified.

character(len=*), intent(in), optional :: sortBy

Sort device list based on either 'memory': total global memory, 'cores': total number of compute units, 'clock': maximum clock speed

Return Value type(fclDevice), allocatable, (:)

public module function fclFindDevices_2(vendor, type, nameLike, extensions, sortBy) result(deviceList)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: vendor

Filter device list based on platform vendor. Specify multiple possible vendors in comma-separate list

character(len=*), intent(in), optional :: type

Filter device list based on device type. Specify at least one of 'cpu', 'gpu', default: 'cpu,gpu' (both)

character(len=*), intent(in), optional :: nameLike

Filter devices based on device name. Look for this substring in device name.

character(len=*), intent(in), optional :: extensions

Filter devices based on supported device extensions. Specify comma-separated list of OpenCL extension names, e.g. cl_khr_fp64. See clGetDeviceInfo Extensions specified are requirements: devices are filtered-out if they don't support all extensions specified.

character(len=*), intent(in), optional :: sortBy

Sort device list based on either 'memory': total global memory, 'cores': total number of compute units, 'clock': maximum clock speed

Return Value type(fclDevice), allocatable, (:)