Class KernelProfile


  • public class KernelProfile
    extends java.lang.Object
    Collects profiling information per kernel class per device.
    • Field Detail

      • logger

        private static java.util.logging.Logger logger
      • kernelClass

        private final java.lang.Class<? extends Kernel> kernelClass
      • currentDevice

        private final java.util.concurrent.atomic.AtomicReference<Device> currentDevice
    • Constructor Detail

      • KernelProfile

        public KernelProfile​(java.lang.Class<? extends Kernel> _kernelClass)
    • Method Detail

      • getLastExecutionTime

        public double getLastExecutionTime()
      • getLastConversionTime

        public double getLastConversionTime()
      • getAccumulatedTotalTime

        public double getAccumulatedTotalTime()
      • getLastDeviceProfile

        public 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.
        Returns:
        the device profile
      • onStart

        void onStart​(Device device)
        Starts a profiling information gathering sequence for the current thread invoking this method regarding the specified execution device.
        Parameters:
        device -
      • onEvent

        void onEvent​(Device device,
                     ProfilingEvent event)
        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 executed
        event - the event for which the profiling information is being updated
      • getDevices

        public java.util.Collection<Device> getDevices()