develop/projects/rocprofiler-systems/source/lib/rocprof-sys-common-api/rocprofiler-systems/annotation.h File Reference#
annotation.h File Reference
#include <stdint.h>Go to the source code of this file.
Classes | |
| struct | rocprofsys_annotation |
| A struct containing annotation data to be included in the perfetto trace. More... | |
Typedefs | |
| typedef enum ROCPROFSYS_ANNOTATION_TYPE | rocprofsys_annotation_type_t |
| typedef struct rocprofsys_annotation | rocprofsys_annotation_t |
Enumerations | |
| enum | ROCPROFSYS_ANNOTATION_TYPE { ROCPROFSYS_VALUE_NONE = 0 , ROCPROFSYS_VALUE_CSTR = 1 , ROCPROFSYS_STRING = ROCPROFSYS_VALUE_CSTR , ROCPROFSYS_VALUE_SIZE_T = 2 , ROCPROFSYS_SIZE_T = ROCPROFSYS_VALUE_SIZE_T , ROCPROFSYS_VALUE_INT64 = 3 , ROCPROFSYS_INT64 = ROCPROFSYS_VALUE_INT64 , ROCPROFSYS_I64 = ROCPROFSYS_VALUE_INT64 , ROCPROFSYS_VALUE_UINT64 = 4 , ROCPROFSYS_UINT64 = ROCPROFSYS_VALUE_UINT64 , ROCPROFSYS_U64 = ROCPROFSYS_VALUE_UINT64 , ROCPROFSYS_VALUE_FLOAT64 = 5 , ROCPROFSYS_FLOAT64 = ROCPROFSYS_VALUE_FLOAT64 , ROCPROFSYS_FP64 = ROCPROFSYS_VALUE_FLOAT64 , ROCPROFSYS_VALUE_VOID_P = 6 , ROCPROFSYS_VOID_P = ROCPROFSYS_VALUE_VOID_P , ROCPROFSYS_PTR = ROCPROFSYS_VALUE_VOID_P , ROCPROFSYS_VALUE_INT32 = 7 , ROCPROFSYS_INT32 = ROCPROFSYS_VALUE_INT32 , ROCPROFSYS_I32 = ROCPROFSYS_VALUE_INT32 , ROCPROFSYS_VALUE_UINT32 = 8 , ROCPROFSYS_UINT32 = ROCPROFSYS_VALUE_UINT32 , ROCPROFSYS_U32 = ROCPROFSYS_VALUE_UINT32 , ROCPROFSYS_VALUE_FLOAT32 = 9 , ROCPROFSYS_FLOAT32 = ROCPROFSYS_VALUE_FLOAT32 , ROCPROFSYS_FP32 = ROCPROFSYS_VALUE_FLOAT32 , ROCPROFSYS_VALUE_INT16 = 10 , ROCPROFSYS_INT16 = ROCPROFSYS_VALUE_INT16 , ROCPROFSYS_I16 = ROCPROFSYS_VALUE_INT16 , ROCPROFSYS_VALUE_UINT16 = 11 , ROCPROFSYS_UINT16 = ROCPROFSYS_VALUE_UINT16 , ROCPROFSYS_U16 = ROCPROFSYS_VALUE_UINT16 , ROCPROFSYS_VALUE_LAST } |
| Identifier for the data type of the annotation. if the data type is not a pointer, pass the address of data. More... | |
Class Documentation
◆ rocprofsys_annotation
| struct rocprofsys_annotation |
A struct containing annotation data to be included in the perfetto trace.
#include <cstddef>
#include <cstdint>
double
compute_residual(size_t n, double* data);
double
compute(size_t n, double* data, size_t nitr, double tolerance)
{
size_t iteration = 0;
double residual = tolerance;
rocprofsys_annotation_t _annotations[] = {
{ "iteration", ROCPROFSYS_VALUE_SIZE_T, &iteration },
{ "residual", ROCPROFSYS_VALUE_FLOAT64, &residual },
};
for(iteration = 0; iteration < nitr; ++iteration)
{
rocprofsys_push_category_region(ROCPROFSYS_CATEGORY_USER, "compute",
_annotations, 2);
residual = compute_residual(n, data);
rocprofsys_pop_category_region(ROCPROFSYS_CATEGORY_USER, "compute",
_annotations, 2);
}
return residual;
}
A struct containing annotation data to be included in the perfetto trace.
Definition: annotation.h:101
Definition at line 100 of file annotation.h.
| Class Members | ||
|---|---|---|
| const char * | name | label for annotation |
| unsigned long | type | rocprofsys_annotation_type_t |
| void * | value | data to annotate |
Typedef Documentation
◆ rocprofsys_annotation_t
◆ rocprofsys_annotation_type_t
Enumeration Type Documentation
◆ ROCPROFSYS_ANNOTATION_TYPE
Identifier for the data type of the annotation. if the data type is not a pointer, pass the address of data.
Definition at line 21 of file annotation.h.
enum ROCPROFSYS_ANNOTATION_TYPE rocprofsys_annotation_type_t