fclFilterDevices Interface

interface
public module function fclFilterDevices(devices, vendor, type, nameLike, extensions, sortBy) result(deviceList)

Arguments

Type IntentOptional Attributes Name
type(fclDevice), intent(in) :: devices(:)
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,(:)

Filtered and sorted list. Unallocated if no matching devices found.

Description

Filter and sort list of devices based on criteria