public class KernelProfile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicReference<Device> |
currentDevice |
private java.util.concurrent.ConcurrentSkipListMap<Device,KernelDeviceProfile> |
deviceProfiles |
private java.lang.Class<? extends Kernel> |
kernelClass |
private static java.util.logging.Logger |
logger |
static double |
MILLION |
private IProfileReportObserver |
observer |
Constructor and Description |
---|
KernelProfile(java.lang.Class<? extends Kernel> _kernelClass) |
Modifier and Type | Method and Description |
---|---|
double |
getAccumulatedTotalTime() |
KernelDeviceProfile |
getDeviceProfile(Device device) |
java.util.Collection<KernelDeviceProfile> |
getDeviceProfiles() |
java.util.Collection<Device> |
getDevices() |
double |
getLastConversionTime() |
KernelDeviceProfile |
getLastDeviceProfile()
Retrieves the last device profile that was updated by the last thread that made
a profiling information update, when executing this kernel on the specified device.
|
double |
getLastExecutionTime() |
IProfileReportObserver |
getReportObserver() |
(package private) void |
onEvent(Device device,
ProfilingEvent event)
Updates the profiling information for the current thread invoking this method regarding
the specified execution device.
|
(package private) void |
onStart(Device device)
Starts a profiling information gathering sequence for the current thread invoking this method
regarding the specified execution device.
|
void |
setReportObserver(IProfileReportObserver _observer) |
public static final double MILLION
private static java.util.logging.Logger logger
private final java.lang.Class<? extends Kernel> kernelClass
private java.util.concurrent.ConcurrentSkipListMap<Device,KernelDeviceProfile> deviceProfiles
private final java.util.concurrent.atomic.AtomicReference<Device> currentDevice
private IProfileReportObserver observer
public KernelProfile(java.lang.Class<? extends Kernel> _kernelClass)
public double getLastExecutionTime()
public double getLastConversionTime()
public double getAccumulatedTotalTime()
public KernelDeviceProfile getLastDeviceProfile()
void onStart(Device device)
device
- void onEvent(Device device, ProfilingEvent event)
device
- the device where the kernel is/was executedevent
- the event for which the profiling information is being updatedpublic java.util.Collection<Device> getDevices()
public java.util.Collection<KernelDeviceProfile> getDeviceProfiles()
public KernelDeviceProfile getDeviceProfile(Device device)
public void setReportObserver(IProfileReportObserver _observer)
public IProfileReportObserver getReportObserver()