Package com.aparapi
Class ProfileReport
java.lang.Object
com.aparapi.ProfileReport
-
Constructor Summary
ConstructorsConstructorDescriptionProfileReport
(long _threadId, Class<? extends Kernel> clazz, Device _device) Creates a profile report pertaining to a given thread that executed kernel class on the specified device. -
Method Summary
Modifier and TypeMethodDescriptionclone()
double
Determine the time taken to convert bytecode to OpenCL for first Kernel.execute(range) call.Retrieves the Aparapi device where the kernel was executed, producing this profile report.double
getElapsedTime
(int stage) Elapsed time for a single event only, i.e.double
getElapsedTime
(int from, int to) Elapsed time for all eventsfrom
throughto
.double
Determine the execution time of the Kernel.execute(range) call from this report.Retrieves the class of the kernel to which this profile report pertains toint
The number of stages available with report data.long
Retrieves the current report unique identifier.
Note: The identifier is monotonically incremented at each new report for the current invalid input: '<'kernel, device> tuple.getStageName
(int stage) Get the name of a given stageGet the names of the stages for which data was collected.long
Retrieves the thread id of the thread that executed the kernel, producing this profile report.void
setProfileReport
(long reportId, long[] _currentTimes) Sets specific report data.
-
Constructor Details
-
ProfileReport
Creates a profile report pertaining to a given thread that executed kernel class on the specified device.- Parameters:
_threadId
- the id of thread that executed the kernelclazz
- the class of the executed kernel_device
- the device where the kernel executed
-
-
Method Details
-
setProfileReport
public void setProfileReport(long reportId, long[] _currentTimes) Sets specific report data.- Parameters:
reportId
- the unique identifier for this report (the identifier is unique within the invalid input: '<'kernel,device> tuple)_currentTimes
- the profiling data
-
getReportId
public long getReportId()Retrieves the current report unique identifier.
Note: The identifier is monotonically incremented at each new report for the current invalid input: '<'kernel, device> tuple.- Returns:
- the report id
-
getThreadId
public long getThreadId()Retrieves the thread id of the thread that executed the kernel, producing this profile report.- Returns:
- the thread id
-
getKernelClass
Retrieves the class of the kernel to which this profile report pertains to- Returns:
- the Aparapi kernel class
-
getDevice
Retrieves the Aparapi device where the kernel was executed, producing this profile report.- Returns:
- the Aparapi device
-
getStageNames
Get the names of the stages for which data was collected.- Returns:
- the list with the stages names
-
getNumberOfStages
public int getNumberOfStages()The number of stages available with report data.- Returns:
- the number of stages
-
getStageName
Get the name of a given stage- Parameters:
stage
- the index of the stage- Returns:
- the stage name
-
getElapsedTime
public double getElapsedTime(int stage) Elapsed time for a single event only, i.e. since the previous stage rather than from the start. -
getElapsedTime
public double getElapsedTime(int from, int to) Elapsed time for all eventsfrom
throughto
. -
getExecutionTime
public double getExecutionTime()Determine the execution time of the Kernel.execute(range) call from this report.- Returns:
- The time spent executing the kernel (ms)
-
getConversionTime
public double getConversionTime()Determine the time taken to convert bytecode to OpenCL for first Kernel.execute(range) call.- Returns:
- The time spent preparing the kernel for execution using GPU (ms)
-
clone
-