Class 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 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: DeviceSelector
        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.
        Specified by:
        init in interface DeviceSelector
        Parameters:
        pDevices - list of devices to consider
      • selected

        public boolean selected​(ClearCLDevice pClearCLDevice)
        Description copied from interface: DeviceSelector
        Returns true if the device should be selected, multiple devices can be selected.
        Specified by:
        selected in interface DeviceSelector
        Parameters:
        pClearCLDevice - device
        Returns:
        true if selected, false otherwise.