Class KernelPreferences

java.lang.Object
com.aparapi.internal.kernel.KernelPreferences

public class KernelPreferences extends Object
Thread safe class holding the kernel preferences for a given kernel class.
  • Field Details

  • Constructor Details

  • Method Details

    • getKernelClass

      public Class<? extends Kernel> getKernelClass()
      What Kernel subclass is this the preferences for?
    • getPreferredDevices

      public List<Device> getPreferredDevices(Kernel kernel)
    • isDeviceAmongPreferredDevices

      public boolean isDeviceAmongPreferredDevices(Device device)
      Validates if the specified devices is among the preferred devices for executing the kernel associated with the current kernel preferences.
      Parameters:
      device - the device to be tested
      Returns:
      • true, if specified device is among the preferred devices
      • false, otherwise
    • setPreferredDevices

      void setPreferredDevices(LinkedHashSet<Device> _preferredDevices)
    • getPreferredDevice

      public Device getPreferredDevice(Kernel kernel)
    • markPreferredDeviceFailed

      void markPreferredDeviceFailed()
    • markDeviceFailed

      void markDeviceFailed(Device device)
    • maybeSetUpDefaultPreferredDevices

      private void maybeSetUpDefaultPreferredDevices()
    • getFailedDevices

      public List<Device> getFailedDevices()