public final class ProfileReport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long[] |
currentTimes |
private Device |
device |
private long |
id |
private java.lang.Class<? extends Kernel> |
kernelClass |
private static double |
MILLION |
private static int |
NUM_EVENTS |
private java.lang.String[] |
stagesNames |
private long |
threadId |
Constructor and Description |
---|
ProfileReport(long _threadId,
java.lang.Class<? extends Kernel> clazz,
Device _device)
Creates a profile report pertaining to a given thread that executed kernel class on the specified device.
|
Modifier and Type | Method and Description |
---|---|
ProfileReport |
clone() |
double |
getConversionTime()
Determine the time taken to convert bytecode to OpenCL for first Kernel.execute(range) call.
|
Device |
getDevice()
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 events
from through to . |
double |
getExecutionTime()
Determine the execution time of the Kernel.execute(range) call from this report.
|
java.lang.Class<? extends Kernel> |
getKernelClass()
Retrieves the class of the kernel to which this profile report pertains to
|
int |
getNumberOfStages()
The number of stages available with report data.
|
long |
getReportId()
Retrieves the current report unique identifier.
Note: The identifier is monotonically incremented at each new report for the current |
java.lang.String |
getStageName(int stage)
Get the name of a given stage
|
java.util.List<java.lang.String> |
getStageNames()
Get the names of the stages for which data was collected.
|
long |
getThreadId()
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.
|
private static final int NUM_EVENTS
private static final double MILLION
private long id
private final java.lang.Class<? extends Kernel> kernelClass
private final long threadId
private final Device device
private final long[] currentTimes
private final java.lang.String[] stagesNames
public ProfileReport(long _threadId, java.lang.Class<? extends Kernel> clazz, Device _device)
_threadId
- the id of thread that executed the kernelclazz
- the class of the executed kernel_device
- the device where the kernel executedpublic void setProfileReport(long reportId, long[] _currentTimes)
reportId
- the unique identifier for this report (the identifier is unique within the _currentTimes
- the profiling datapublic long getReportId()
public long getThreadId()
public java.lang.Class<? extends Kernel> getKernelClass()
public Device getDevice()
public java.util.List<java.lang.String> getStageNames()
public int getNumberOfStages()
public java.lang.String getStageName(int stage)
stage
- the index of the stagepublic double getElapsedTime(int stage)
public double getElapsedTime(int from, int to)
from
through to
.public double getExecutionTime()
public double getConversionTime()
public ProfileReport clone()
clone
in class java.lang.Object