Skip navigation links

Package com.aparapi.device

Contains classes representing OpenCL-capable devices, and "virtual" (java) devices which execute kernels using java.

See: Description

Package com.aparapi.device Description

Contains classes representing OpenCL-capable devices, and "virtual" (java) devices which execute kernels using java.

Various methods of Device which selected devices of a particular type have been deprecated, as now the preferred mechanism for device selection is to rely on the KernelManager to select an appropriate device. Where a particular device is required to be used for a certain kernel, for such purposes as debugging or unit testing, this can be achieved by using KernelManager.setKernelManager(com.aparapi.internal.kernel.KernelManager) prior to invoking any Kernel executions, by overriding Kernel.isAllowDevice(com.aparapi.device.Device) to veto/approve devices from the available devices for a given Kernel class, or (not recommended) by using KernelManager.setPreferredDevices(com.aparapi.Kernel, java.util.LinkedHashSet) to specify a particular device list for a given Kernel class.

In order to determine the Device which will be used to execute a particular Kernel, use Kernel.getTargetDevice(). This can also be used immediately after execution to see on which device the kernel actually got executed (in case the execution failed and fell back to another device).

Skip navigation links

Copyright © 2021 Syncleus. All rights reserved.