Package com.aparapi

Class ProfileReport

java.lang.Object
com.aparapi.ProfileReport

public final class ProfileReport
extends Object
  • Constructor Summary

    Constructors 
    Constructor Description
    ProfileReport​(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 Type Method 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.
    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 tuple.
    String getStageName​(int stage)
    Get the name of a given stage
    List<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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProfileReport

      public ProfileReport​(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.
      Parameters:
      _threadId - the id of thread that executed the kernel
      clazz - 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 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 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

      public Class<? extends Kernel> getKernelClass()
      Retrieves the class of the kernel to which this profile report pertains to
      Returns:
      the Aparapi kernel class
    • getDevice

      public Device getDevice()
      Retrieves the Aparapi device where the kernel was executed, producing this profile report.
      Returns:
      the Aparapi device
    • getStageNames

      public List<String> 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

      public String getStageName​(int stage)
      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 events from through to.
    • 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

      public ProfileReport clone()