Package com.aparapi.internal.kernel
Class KernelProfile
java.lang.Object
com.aparapi.internal.kernel.KernelProfile
Collects profiling information per kernel class per device.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference
<Device> private static Logger
static final double
private IProfileReportObserver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getDeviceProfile
(Device device) double
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
(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
Starts a profiling information gathering sequence for the current thread invoking this method regarding the specified execution device.void
setReportObserver
(IProfileReportObserver _observer)
-
Field Details
-
MILLION
public static final double MILLION- See Also:
-
logger
-
kernelClass
-
deviceProfiles
-
currentDevice
-
observer
-
-
Constructor Details
-
KernelProfile
-
-
Method Details
-
getLastExecutionTime
public double getLastExecutionTime() -
getLastConversionTime
public double getLastConversionTime() -
getAccumulatedTotalTime
public double getAccumulatedTotalTime() -
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.- Returns:
- the device profile
-
onStart
Starts a profiling information gathering sequence for the current thread invoking this method regarding the specified execution device.- Parameters:
device
-
-
onEvent
Updates the profiling information for the current thread invoking this method regarding the specified execution device.- Parameters:
device
- the device where the kernel is/was executedevent
- the event for which the profiling information is being updated
-
getDevices
-
getDeviceProfiles
-
getDeviceProfile
-
setReportObserver
-
getReportObserver
-