Package com.aparapi.internal.kernel
Class KernelPreferences
java.lang.Object
com.aparapi.internal.kernel.KernelPreferences
Thread safe class holding the kernel preferences for a given kernel class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LinkedHashSet<Device> private final KernelManagerprivate final AtomicReference<LinkedHashSet<Device>> -
Constructor Summary
ConstructorsConstructorDescriptionKernelPreferences(KernelManager manager, Class<? extends Kernel> kernelClass) -
Method Summary
Modifier and TypeMethodDescriptionWhat Kernel subclass is this the preferences for?getPreferredDevice(Kernel kernel) getPreferredDevices(Kernel kernel) booleanisDeviceAmongPreferredDevices(Device device) Validates if the specified devices is among the preferred devices for executing the kernel associated with the current kernel preferences.(package private) voidmarkDeviceFailed(Device device) (package private) voidprivate void(package private) voidsetPreferredDevices(LinkedHashSet<Device> _preferredDevices)
-
Field Details
-
kernelClass
-
manager
-
preferredDevices
-
failedDevices
-
-
Constructor Details
-
KernelPreferences
-
-
Method Details
-
getKernelClass
What Kernel subclass is this the preferences for? -
getPreferredDevices
-
isDeviceAmongPreferredDevices
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
-
getPreferredDevice
-
markPreferredDeviceFailed
void markPreferredDeviceFailed() -
markDeviceFailed
-
maybeSetUpDefaultPreferredDevices
private void maybeSetUpDefaultPreferredDevices() -
getFailedDevices
-