public class KernelRunner extends KernelRunnerJNI
Kernel
implementations. KernelRunner
is the real workhorse for Aparapi. Each Kernel
instance creates a single
KernelRunner
to encapsulate state and to help coordinate interactions between the Kernel
and it's execution logic.KernelRunner
is created lazily as a result of calling Kernel.execute()
. A this
time the ExecutionMode
is consulted to determine the default requested mode. This will dictate how
the KernelRunner
will attempt to execute the Kernel
Kernel.execute(int _globalSize)
Constructor and Description |
---|
KernelRunner(Kernel _kernel)
Create a KernelRunner for a specific Kernel instance.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Kernel.dispose() delegates to KernelRunner.dispose() which delegates to disposeJNI() to actually close JNI data structures. |
Kernel |
execute(Kernel.Entry entry,
Range _range,
int _passes) |
Kernel |
execute(java.lang.String _entrypointName,
Range _range,
int _passes) |
void |
get(java.lang.Object array)
Enqueue a request to return this array from the GPU.
|
long |
getAccumulatedExecutionTime()
Determine the accumulated execution time of all previous Kernel.execute(range) calls.
|
long |
getConversionTime()
Determine the time taken to convert bytecode to OpenCL for first Kernel.execute(range) call.
|
long |
getExecutionTime()
Determine the execution time of the previous Kernel.execute(range) call.
|
java.util.List<ProfileInfo> |
getProfileInfo() |
boolean |
isExplicit() |
void |
put(java.lang.Object array)
Tag this array so that it is explicitly enqueued before the kernel is executed.
|
void |
setExplicit(boolean _explicit) |
public KernelRunner(Kernel _kernel)
_kernel
- public void dispose()
Kernel.dispose()
delegates to KernelRunner.dispose()
which delegates to disposeJNI()
to actually close JNI data structures.KernelRunner#disposeJNI()
public Kernel execute(Kernel.Entry entry, Range _range, int _passes)
public void get(java.lang.Object array)
Kernel.put(type [])
calls will delegate to this call.
array
- It is assumed that this parameter is indeed an array (of int, float, short etc).Kernel.get(int[] arr)
,
Kernel#get(short[] arr)
,
Kernel.get(float[] arr)
,
Kernel.get(double[] arr)
,
Kernel.get(long[] arr)
,
Kernel.get(char[] arr)
,
Kernel.get(boolean[] arr)
public java.util.List<ProfileInfo> getProfileInfo()
public void put(java.lang.Object array)
Kernel.put(type [])
calls will delegate to this call. array
- It is assumed that this parameter is indeed an array (of int, float, short etc).Kernel.put(int[] arr)
,
Kernel#put(short[] arr)
,
Kernel.put(float[] arr)
,
Kernel.put(double[] arr)
,
Kernel.put(long[] arr)
,
Kernel.put(char[] arr)
,
Kernel.put(boolean[] arr)
public void setExplicit(boolean _explicit)
public boolean isExplicit()
public long getConversionTime()
public long getExecutionTime()
public long getAccumulatedExecutionTime()