1/*
2 * ompd-private.h
3 */
4
5//===----------------------------------------------------------------------===//
6//
7// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
8// See https://llvm.org/LICENSE.txt for license information.
9// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef SRC_OMPD_PRIVATE_H_
14#define SRC_OMPD_PRIVATE_H_
15
16/*
17 * Definition of OMPD states, taken from OMPT
18 */
19#define FOREACH_OMPD_STATE(macro) \
20 \
21 /* first available state */ \
22 macro(ompt_state_undefined, 0x102) /* undefined thread state */ \
23 \
24 /* work states (0..15) */ \
25 macro(ompt_state_work_serial, 0x000) /* working outside parallel */ \
26 macro(ompt_state_work_parallel, 0x001) /* working within parallel */ \
27 macro(ompt_state_work_reduction, 0x002) /* performing a reduction */ \
28 \
29 /* barrier wait states (16..31) */ \
30 macro(ompt_state_wait_barrier, 0x010) /* waiting at a barrier */ \
31 macro(ompt_state_wait_barrier_implicit_parallel, \
32 0x011) /* implicit barrier at the end of parallel region */ \
33 macro(ompt_state_wait_barrier_implicit_workshare, \
34 0x012) /* implicit barrier at the end of worksharing */ \
35 macro(ompt_state_wait_barrier_implicit, 0x013) /* implicit barrier */ \
36 macro(ompt_state_wait_barrier_explicit, 0x014) /* explicit barrier */ \
37 \
38 /* task wait states (32..63) */ \
39 macro(ompt_state_wait_taskwait, 0x020) /* waiting at a taskwait */ \
40 macro(ompt_state_wait_taskgroup, 0x021) /* waiting at a taskgroup */ \
41 \
42 /* mutex wait states (64..127) */ \
43 macro(ompt_state_wait_mutex, 0x040) \
44 macro(ompt_state_wait_lock, 0x041) /* waiting for lock */ \
45 macro(ompt_state_wait_critical, 0x042) /* waiting for critical */ \
46 macro(ompt_state_wait_atomic, 0x043) /* waiting for atomic */ \
47 macro(ompt_state_wait_ordered, 0x044) /* waiting for ordered */ \
48 \
49 /* target wait states (128..255) */ \
50 macro(ompt_state_wait_target, 0x080) /* waiting for target region */ \
51 macro(ompt_state_wait_target_map, \
52 0x081) /* waiting for target data mapping operation */ \
53 macro(ompt_state_wait_target_update, \
54 0x082) /* waiting for target update operation */ \
55 \
56 /* misc (256..511) */ \
57 macro(ompt_state_idle, 0x100) /* waiting for work */ \
58 macro(ompt_state_overhead, 0x101) /* overhead excluding wait states */ \
59 \
60 /* implementation-specific states (512..) */
61
62#define OMPD_LAST_OMP_STATE ompt_state_overhead
63
64/**
65 * Primitive types.
66 */
67typedef enum ompd_target_prim_types_t {
68 ompd_type_invalid = -1,
69 ompd_type_char = 0,
70 ompd_type_short = 1,
71 ompd_type_int = 2,
72 ompd_type_long = 3,
73 ompd_type_long_long = 4,
74 ompd_type_pointer = 5,
75 ompd_type_max
76} ompd_target_prim_types_t;
77
78#include "ompd-types.h"
79#endif /*SRC_OMPD_PRIVATE_H*/
80

source code of openmp/libompd/src/ompd-private.h