Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::ScopedProfiling Class Reference

RAII class for scoped profiling. More...

#include <ScopedProfiling.hh>

Public Member Functions

 ScopedProfiling (Input const &input)
 Activate device profiling with options.
 
 ScopedProfiling (std::string_view name)
 Activate device profiling with just a name.
 
 ~ScopedProfiling ()
 Deactivate a profiling scope.
 

Type aliases

using Input = ScopedProfilingInput
 
 CELER_DELETE_COPY_MOVE (ScopedProfiling)
 

Detailed Description

RAII class for scoped profiling.

Implementations should support multithreaded context where each thread have one or more alive instance of this class.

This is useful for wrapping specific code fragment in a range for profiling, e.g. ignoring of VecGeom instantiation kernels, profiling a specific action or loop on the CPU.

Note
The nvtx implementation of ScopedProfiling only does something when the application using Celeritas is ran through a tool that supports nvtx, e.g. nsight compute with the –nvtx argument. If this is not the case, API calls to nvtx are no-ops.
The AMD roctx implementation requires the roctx library, which may not be available on all systems.
The CPU implementation requires Perfetto. It is not supported when Celeritas is built with device support (CUDA/HIP)

Member Typedef Documentation

◆ Input

Prevent copying and moving for RAII class

Member Function Documentation

◆ CELER_DELETE_COPY_MOVE()

celeritas::ScopedProfiling::CELER_DELETE_COPY_MOVE ( ScopedProfiling  )

Prevent copying and moving for RAII class


The documentation for this class was generated from the following files: