TOpenCLPlatformList.AutoDeviceSelect Method

function AutoDeviceSelect(LoadFunction: TMtxNotifyEvent; CacheItemCount: Integer; CacheItemLength: Integer): TOpenCLDevice;

The function will measure time of running LoadFunction on all devices and will return the fastest device.

#NameTypeDescription
1LoadFunctionTMtxNotifyEvent
2CacheItemCountInteger
3CacheItemLengthInteger

Returns: TOpenCLDevice

Remarks:

The command queue on the fastest is marked automatically. For each device the function will be called twice and should therefore have a meaningfull computational load. The first call is for warming up the cache and waking up the device from low power mode. The second call is timed.