Enum and Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
com.aparapi.Kernel.EXECUTION_MODE
It is no longer recommended that
EXECUTION_MODE s are used, as a more sophisticated Device
preference mechanism is in place, see KernelManager . Though Kernel.setExecutionMode(EXECUTION_MODE)
is still honored, the default EXECUTION_MODE is now Kernel.EXECUTION_MODE.AUTO , which indicates that the KernelManager
will determine execution behaviours.
The execution mode ENUM enumerates the possible modes of executing a kernel. One can request a mode of execution using the values below, and query a kernel after it first executes to determine how it executed. Aparapi supports 5 execution modes. Default is GPU.
To request that a kernel is executed in a specific mode, call
int[] values = new int[1024]; // fill values array SquareKernel kernel = new SquareKernel(values); kernel.setExecutionMode(Kernel.EXECUTION_MODE.JTP); kernel.execute(values.length);
<<<<<<< HEAD:src/main/java/com/aparapi/Kernel.java
Alternatively, the property java -classpath ....;aparapi.jar -Dcom.aparapi.executionMode=GPU MyApplication ======= Alternatively, the property |
Method and Description |
---|
com.aparapi.Kernel.addExecutionModes(Kernel.EXECUTION_MODE...)
See
Kernel.EXECUTION_MODE .
set possible fallback path for execution modes. for example setExecutionFallbackPath(GPU,CPU,JTP) will try to use the GPU if it fails it will fall back to OpenCL CPU and finally it will try JTP. |
com.aparapi.device.Device.best() |
com.aparapi.device.Device.bestACC() |
com.aparapi.internal.kernel.KernelManager.DeprecatedMethods.bestACC() |
com.aparapi.device.Device.bestGPU() |
com.aparapi.internal.kernel.KernelManager.DeprecatedMethods.bestGPU() |
com.aparapi.device.Device.first(Device.TYPE) |
com.aparapi.device.Device.firstCPU() |
com.aparapi.internal.kernel.KernelManager.DeprecatedMethods.firstDevice(Device.TYPE) |
com.aparapi.device.Device.firstGPU() |
com.aparapi.Kernel.getExecutionMode()
See
Kernel.EXECUTION_MODE
Return the current execution mode. Before a Kernel executes, this return value will be the execution mode as determined by the setting of the EXECUTION_MODE enumeration. By default, this setting is either GPU if OpenCL is available on the target system, or JTP otherwise. This default setting can be changed by calling setExecutionMode(). After a Kernel executes, the return value will be the mode in which the Kernel actually executed. |
com.aparapi.Kernel.hasNextExecutionMode() |
com.aparapi.Kernel.setExecutionMode(Kernel.EXECUTION_MODE)
See
Kernel.EXECUTION_MODE
Set the execution mode. This should be regarded as a request. The real mode will be determined at runtime based on the availability of OpenCL and the characteristics of the workload. |
com.aparapi.Kernel.setFallbackExecutionMode() |
com.aparapi.Kernel.tryNextExecutionMode()
See
Kernel.EXECUTION_MODE .
try the next execution path in the list if there aren't any more than give up |
Copyright © 2016 Syncleus. All rights reserved.