AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
AnnotationMacros.hpp File Reference
#include "axom/config.hpp"
#include "axom/core/utilities/nvtx/interface.hpp"

Macros

#define AXOM_PERF_MARK_FUNCTION(__func_name__)
 The AXOM_PERF_MARK_FUNCTION is used to annotate a function. More...
 
#define AXOM_PERF_MARK_SECTION(__name__, ...)
 The AXOM_PERF_MARK_SECTION macro is used to annotate sections of code. More...
 

Macro Definition Documentation

◆ AXOM_PERF_MARK_FUNCTION

#define AXOM_PERF_MARK_FUNCTION (   __func_name__)

The AXOM_PERF_MARK_FUNCTION is used to annotate a function.

Parameters
[in]namea user-supplied name to annotate the function.
Note
Typically, the AXOM_PERF_MARK_FUNCTION is placed in the beginning of the function to annotate.
Warning
The AXOM_PERF_MARK_FUNCTION can only be called once within a given (function) scope.

Usage Example:

void foo( )
{
...
}

Referenced by axom::quest::getMeshTriangle().

◆ AXOM_PERF_MARK_SECTION

#define AXOM_PERF_MARK_SECTION (   __name__,
  ... 
)
Value:
do \
{ \
__VA_ARGS__ \
} while(false)

The AXOM_PERF_MARK_SECTION macro is used to annotate sections of code.

Note
In contrast to the AXOM_PERF_MARK_FUNCTION, the AXOM_PERF_MARK_SECTION macro is used to annotate sections of code at a much finer granularity within a given function and it may be use in conjunction with the AXOM_PERF_MARK_FUNCTION macro.
Warning
Variables declared within an AXOM_PERF_MARK_SECTION are only defined within the scope of the annotated section.
The AXOM_PERF_MARK_SECTION macro may not be called in a nested fashion, i.e., within another AXOM_PERF_MARK_SECTION

Usage Example:

void foo( )
{
axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType idx)
{
...
} );
);
axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType idx)
{
...
} );
);
}

Referenced by axom::quest::getMeshTriangle().