Class 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 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: 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.