Class GlobalMemorySelector
- java.lang.Object
-
- net.haesleinhuepf.clij.clearcl.selector.GlobalMemorySelector
-
- All Implemented Interfaces:
DeviceSelector
public class GlobalMemorySelector extends Object implements DeviceSelector
Selects a device based on the amount of global memory.- Author:
- royer
-
-
Field Summary
Fields Modifier and Type Field Description static GlobalMemorySelectorMAXGlobal memory selector that returns the device with most global memory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GlobalMemorySelectorATLEAST(long pAtLeastBytes)Global memory selector that returns the devices with at least a given amount of memory.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
-
MAX
public static GlobalMemorySelector MAX
Global memory selector that returns the device with most global memory.
-
-
Method Detail
-
ATLEAST
public static GlobalMemorySelector ATLEAST(long pAtLeastBytes)
Global memory selector that returns the devices with at least a given amount of memory.- Parameters:
pAtLeastBytes- least amount of memory in bytes- Returns:
- device selector
-
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.
-
-