docs-6.3.1/source/lib/rocprof-sys-user/rocprofiler-systems/categories.h File Reference#
categories.h File Reference
#include <stddef.h>
#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_CATEGORIES | rocprofsys_category_t |
Identifier for categories. More... | |
typedef enum ROCPROFSYS_ANNOTATION_TYPE | rocprofsys_annotation_type_t |
typedef struct rocprofsys_annotation | rocprofsys_annotation_t |
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)
{
rocprofsys_annotation_t _annotations[] = {
{ "data", ROCPROFSYS_VALUE_PTR, data },
{ "size", ROCPROFSYS_VALUE_SIZE_T, &n },
{ "tolerance", ROCPROFSYS_VALUE_FLOAT64, &tolerance },
nullptr
};
double residual = tolerance;
for(size_t i = 0; i < nitr; ++i)
{
rocprofsys_user_push_annotated_region("compute", &_annotations);
residual = compute_residual(n, data);
_annotations[0].value = &i;
_annotations[1].value = &residual;
rocprofsys_user_pop_annotated_region("compute", &_annotations);
}
return residual;
}
A struct containing annotation data to be included in the perfetto trace.
Definition: categories.h:178
int rocprofsys_user_pop_annotated_region(const char *, rocprofsys_annotation_t *, unsigned long)
int rocprofsys_user_push_annotated_region(const char *, rocprofsys_annotation_t *, unsigned long)
Definition at line 177 of file categories.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
◆ rocprofsys_category_t
Identifier for categories.
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 96 of file categories.h.
enum ROCPROFSYS_ANNOTATION_TYPE rocprofsys_annotation_type_t
◆ ROCPROFSYS_CATEGORIES
Definition at line 37 of file categories.h.
@ ROCPROFSYS_CATEGORY_KERNEL_HARDWARE_COUNTER
Definition: categories.h:81
@ ROCPROFSYS_CATEGORY_THREAD_PEAK_MEMORY
Definition: categories.h:78
@ ROCPROFSYS_CATEGORY_OVERFLOW_SAMPLING
Definition: categories.h:84
@ ROCPROFSYS_CATEGORY_PROCESS_SAMPLING
Definition: categories.h:64
@ ROCPROFSYS_CATEGORY_PROCESS_PAGE_FAULT
Definition: categories.h:72
@ ROCPROFSYS_CATEGORY_THREAD_WALL_TIME
Definition: categories.h:75
@ ROCPROFSYS_CATEGORY_ROCM_SMI_MEMORY_USAGE
Definition: categories.h:55
@ ROCPROFSYS_CATEGORY_PROCESS_KERNEL_MODE_TIME
Definition: categories.h:74
@ ROCPROFSYS_CATEGORY_THREAD_PAGE_FAULT
Definition: categories.h:77
@ ROCPROFSYS_CATEGORY_THREAD_CONTEXT_SWITCH
Definition: categories.h:79
@ ROCPROFSYS_CATEGORY_PROCESS_USER_MODE_TIME
Definition: categories.h:73
@ ROCPROFSYS_CATEGORY_PROCESS_CONTEXT_SWITCH
Definition: categories.h:71
@ ROCPROFSYS_CATEGORY_THREAD_HARDWARE_COUNTER
Definition: categories.h:80