Package com.aparapi
Enum Kernel.EXECUTION_MODE
- All Implemented Interfaces:
Serializable
,Comparable<Kernel.EXECUTION_MODE>
- Enclosing class:
Kernel
Deprecated.
- Version:
- Alpha, 21/09/2010
- Author:
- gfrost AMD Javalabs
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeprecated.The value representing execution on an accelerator device (Xeon Phi) via OpenCL.Deprecated.Deprecated.The value representing execution on a CPU device via OpenCL.Deprecated.The value representing execution on a GPU device via OpenCL.Deprecated.The value representing execution on a Java Thread Pool.Deprecated.A dummy value to indicate an unknown state.Deprecated.The value representing execution sequentially in a single loop. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isOpenCL()
Deprecated.static Kernel.EXECUTION_MODE
Deprecated.Returns the enum constant of this type with the specified name.static Kernel.EXECUTION_MODE[]
values()
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTO
Deprecated. -
NONE
Deprecated.A dummy value to indicate an unknown state. -
GPU
Deprecated.The value representing execution on a GPU device via OpenCL. -
CPU
Deprecated.The value representing execution on a CPU device via OpenCL.Note not all OpenCL implementations support OpenCL compute on the CPU.
-
JTP
Deprecated.The value representing execution on a Java Thread Pool.By default one Java thread is started for each available core and each core will execute
globalSize/cores
work items. This creates a total ofglobalSize%cores
threads to complete the work. Choose suitable values forglobalSize
to minimize the number of threads that are spawned. -
SEQ
Deprecated.The value representing execution sequentially in a single loop.This is meant to be used for debugging a kernel.
-
ACC
Deprecated.The value representing execution on an accelerator device (Xeon Phi) via OpenCL.
-
-
Method Details
-
values
Deprecated.Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isOpenCL
public boolean isOpenCL()Deprecated.
-
EXECUTION_MODE
s are used, as a more sophisticatedDevice
preference mechanism is in place, seeKernelManager
. ThoughKernel.setExecutionMode(EXECUTION_MODE)
is still honored, the default EXECUTION_MODE is nowAUTO
, 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.
GPU
ACC
CPU
JTP
SEQ
To request that a kernel is executed in a specific mode, call
Kernel.setExecutionMode(EXECUTION_MODE)
before the kernel first executes.Alternatively, the property
com.codegen.executionMode
can be set to one ofJTP,GPU,ACC,CPU,SEQ
when an application is launched.Generally setting the execution mode is not recommended (it is best to let Aparapi decide automatically) but the option provides a way to compare a kernel's performance under multiple execution modes.