Class FastestDeviceSelector
- java.lang.Object
-
- net.haesleinhuepf.clij.clearcl.selector.FastestDeviceSelector
-
- All Implemented Interfaces:
DeviceSelector
public class FastestDeviceSelector extends Object implements DeviceSelector
Selects a device based on the actual computation speed based on benchmarking. Benchmarking results are cached.- Author:
- royer
-
-
Field Summary
Fields Modifier and Type Field Description static FastestDeviceSelectorFastestForBuffersDevice selector that uses a buffer centric benchmark to determine the fastest devicestatic FastestDeviceSelectorFastestForImagesDevice selector that uses a image centric benchmark to determine the fastest device
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(ArrayList<ClearCLDevice> pDevices)In some case the whole list of devices is needed before being able to decide on whether a particular device is selected, this method provided this possibility.booleanselected(ClearCLDevice pClearCLDevice)Returns true if the device should be selected, multiple devices can be selected.
-
-
-
Field Detail
-
FastestForImages
public static FastestDeviceSelector FastestForImages
Device selector that uses a image centric benchmark to determine the fastest device
-
FastestForBuffers
public static FastestDeviceSelector FastestForBuffers
Device selector that uses a buffer centric benchmark to determine the fastest device
-
-
Method Detail
-
init
public void init(ArrayList<ClearCLDevice> pDevices)
Description copied from interface:DeviceSelectorIn some case the whole list of devices is needed before being able to decide on whether a particular device is selected, this method provided this possibility.- Specified by:
initin interfaceDeviceSelector- Parameters:
pDevices- list of devices to consider
-
selected
public boolean selected(ClearCLDevice pClearCLDevice)
Description copied from interface:DeviceSelectorReturns true if the device should be selected, multiple devices can be selected.- Specified by:
selectedin interfaceDeviceSelector- Parameters:
pClearCLDevice- device- Returns:
- true if selected, false otherwise.
-
-