LLVM OpenMP 20.0.0git
Classes | Macros | Typedefs | Functions | Variables
first-tool.h File Reference
#include "omp-tools.h"
#include "callback.h"
#include "ompt-multiplex.h"

Go to the source code of this file.

Classes

struct  custom_data_pair_s
 

Macros

#define ompt_start_tool   disable_ompt_start_tool
 
#define _TOOL_PREFIX   " _first_tool:"
 
#define CLIENT_TOOL_LIBRARIES_VAR   "CUSTOM_DATA_STORAGE_TOOL_LIBRARIES"
 
#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA   custom_get_client_ompt_data
 
#define OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA   free_data_pair
 
#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA    custom_get_client_ompt_data
 
#define OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA   free_data_pair
 
#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA   custom_get_client_ompt_data
 
#define OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA   free_data_pair
 
#define register_ompt_callback2_t(name, type)
 
#define register_ompt_callback2(name)   register_ompt_callback2_t(name, name##_t)
 

Typedefs

typedef struct custom_data_pair_s custom_data_pair_t
 

Functions

static ompt_data_t * custom_get_client_ompt_data (ompt_data_t *)
 
static void free_data_pair (ompt_data_t *)
 
static ompt_data_t * get_own_ompt_data (ompt_data_t *data)
 
static ompt_multiplex_data_pair_tallocate_data_pair (ompt_data_t *data_pointer)
 
static void on_cds_ompt_callback_sync_region (ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
 
static void on_cds_ompt_callback_sync_region_wait (ompt_sync_region_t kind, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
 
static void on_cds_ompt_callback_flush (ompt_data_t *thread_data, const void *codeptr_ra)
 
static void on_cds_ompt_callback_cancel (ompt_data_t *task_data, int flags, const void *codeptr_ra)
 
static void on_cds_ompt_callback_implicit_task (ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, unsigned int team_size, unsigned int thread_num, int type)
 
static void on_cds_ompt_callback_work (ompt_work_t wstype, ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, uint64_t count, const void *codeptr_ra)
 
static void on_cds_ompt_callback_master (ompt_scope_endpoint_t endpoint, ompt_data_t *parallel_data, ompt_data_t *task_data, const void *codeptr_ra)
 
static void on_cds_ompt_callback_parallel_begin (ompt_data_t *parent_task_data, const ompt_frame_t *parent_task_frame, ompt_data_t *parallel_data, uint32_t requested_team_size, int invoker, const void *codeptr_ra)
 
static void on_cds_ompt_callback_parallel_end (ompt_data_t *parallel_data, ompt_data_t *task_data, int invoker, const void *codeptr_ra)
 
static void on_cds_ompt_callback_task_create (ompt_data_t *parent_task_data, const ompt_frame_t *parent_frame, ompt_data_t *new_task_data, int type, int has_dependences, const void *codeptr_ra)
 
static void on_cds_ompt_callback_task_schedule (ompt_data_t *first_task_data, ompt_task_status_t prior_task_status, ompt_data_t *second_task_data)
 
static void on_cds_ompt_callback_dependences (ompt_data_t *task_data, const ompt_dependence_t *deps, int ndeps)
 
static void on_cds_ompt_callback_task_dependence (ompt_data_t *first_task_data, ompt_data_t *second_task_data)
 
static void on_cds_ompt_callback_thread_begin (ompt_thread_t thread_type, ompt_data_t *thread_data)
 
static void on_cds_ompt_callback_thread_end (ompt_data_t *thread_data)
 
static int on_cds_ompt_callback_control_tool (uint64_t command, uint64_t modifier, void *arg, const void *codeptr_ra)
 
ompt_data_t * ompt_get_own_thread_data ()
 
int ompt_cds_initialize (ompt_function_lookup_t lookup, int initial_device_num, ompt_data_t *tool_data)
 
void ompt_cds_finalize (ompt_data_t *tool_data)
 
ompt_start_tool_result_tompt_start_tool (unsigned int omp_version, const char *runtime_version)
 

Variables

static ompt_get_thread_data_t ompt_cds_get_thread_data
 

Macro Definition Documentation

◆ _TOOL_PREFIX

#define _TOOL_PREFIX   " _first_tool:"

Definition at line 4 of file first-tool.h.

◆ CLIENT_TOOL_LIBRARIES_VAR

#define CLIENT_TOOL_LIBRARIES_VAR   "CUSTOM_DATA_STORAGE_TOOL_LIBRARIES"

Definition at line 9 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA

#define OMPT_MULTIPLEX_CUSTOM_DELETE_PARALLEL_DATA   free_data_pair

Definition at line 16 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA

#define OMPT_MULTIPLEX_CUSTOM_DELETE_TASK_DATA   free_data_pair

Definition at line 18 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA

#define OMPT_MULTIPLEX_CUSTOM_DELETE_THREAD_DATA   free_data_pair

Definition at line 13 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA

#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_PARALLEL_DATA    custom_get_client_ompt_data

Definition at line 14 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA

#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_TASK_DATA   custom_get_client_ompt_data

Definition at line 17 of file first-tool.h.

◆ OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA

#define OMPT_MULTIPLEX_CUSTOM_GET_CLIENT_THREAD_DATA   custom_get_client_ompt_data

Definition at line 12 of file first-tool.h.

◆ ompt_start_tool

#define ompt_start_tool   disable_ompt_start_tool

Definition at line 3 of file first-tool.h.

◆ register_ompt_callback2

#define register_ompt_callback2 (   name)    register_ompt_callback2_t(name, name##_t)

Definition at line 250 of file first-tool.h.

◆ register_ompt_callback2_t

#define register_ompt_callback2_t (   name,
  type 
)
Value:
do { \
type f_##name = &on_cds_##name; \
if (ompt_set_callback(name, (ompt_callback_t)f_##name) == ompt_set_never) \
printf("0: Could not register callback '" #name "'\n"); \
} while (0)
static ompt_set_callback_t ompt_set_callback
Definition: callback.h:132
__itt_string_handle * name
Definition: ittnotify.h:3305
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type

Definition at line 243 of file first-tool.h.

Typedef Documentation

◆ custom_data_pair_t

Function Documentation

◆ allocate_data_pair()

static ompt_multiplex_data_pair_t * allocate_data_pair ( ompt_data_t *  data_pointer)
static

◆ custom_get_client_ompt_data()

static ompt_data_t * custom_get_client_ompt_data ( ompt_data_t *  data)
static

Definition at line 26 of file first-tool.h.

References data.

◆ free_data_pair()

static void free_data_pair ( ompt_data_t *  data_pointer)
static

Definition at line 54 of file first-tool.h.

◆ get_own_ompt_data()

static ompt_data_t * get_own_ompt_data ( ompt_data_t *  data)
static

◆ ompt_cds_finalize()

void ompt_cds_finalize ( ompt_data_t *  tool_data)

Definition at line 284 of file first-tool.h.

Referenced by ompt_start_tool().

◆ ompt_cds_initialize()

int ompt_cds_initialize ( ompt_function_lookup_t  lookup,
int  initial_device_num,
ompt_data_t *  tool_data 
)

◆ ompt_get_own_thread_data()

ompt_data_t * ompt_get_own_thread_data ( )

Definition at line 239 of file first-tool.h.

References get_own_ompt_data(), and ompt_cds_get_thread_data.

Referenced by ompt_cds_initialize().

◆ ompt_start_tool()

ompt_start_tool_result_t * ompt_start_tool ( unsigned int  omp_version,
const char runtime_version 
)

Definition at line 288 of file first-tool.h.

References ompt_cds_finalize(), ompt_cds_initialize(), and ompt_start_tool_result.

◆ on_cds_ompt_callback_cancel()

static void on_cds_ompt_callback_cancel ( ompt_data_t *  task_data,
int  flags,
const void codeptr_ra 
)
static

Definition at line 85 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_cancel().

◆ on_cds_ompt_callback_control_tool()

static int on_cds_ompt_callback_control_tool ( uint64_t  command,
uint64_t  modifier,
void arg,
const void codeptr_ra 
)
static

◆ on_cds_ompt_callback_dependences()

static void on_cds_ompt_callback_dependences ( ompt_data_t *  task_data,
const ompt_dependence_t *  deps,
int  ndeps 
)
static

Definition at line 177 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_dependences().

◆ on_cds_ompt_callback_flush()

static void on_cds_ompt_callback_flush ( ompt_data_t *  thread_data,
const void codeptr_ra 
)
static

Definition at line 79 of file first-tool.h.

References get_own_ompt_data(), and on_cds_ompt_callback_flush().

Referenced by on_cds_ompt_callback_flush().

◆ on_cds_ompt_callback_implicit_task()

static void on_cds_ompt_callback_implicit_task ( ompt_scope_endpoint_t  endpoint,
ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
unsigned int  team_size,
unsigned int  thread_num,
int  type 
)
static

◆ on_cds_ompt_callback_master()

static void on_cds_ompt_callback_master ( ompt_scope_endpoint_t  endpoint,
ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
const void codeptr_ra 
)
static

Definition at line 120 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_masked().

◆ on_cds_ompt_callback_parallel_begin()

static void on_cds_ompt_callback_parallel_begin ( ompt_data_t *  parent_task_data,
const ompt_frame_t *  parent_task_frame,
ompt_data_t *  parallel_data,
uint32_t  requested_team_size,
int  invoker,
const void codeptr_ra 
)
static

◆ on_cds_ompt_callback_parallel_end()

static void on_cds_ompt_callback_parallel_end ( ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
int  invoker,
const void codeptr_ra 
)
static

Definition at line 143 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_parallel_end().

◆ on_cds_ompt_callback_sync_region()

static void on_cds_ompt_callback_sync_region ( ompt_sync_region_t  kind,
ompt_scope_endpoint_t  endpoint,
ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
const void codeptr_ra 
)
static

Definition at line 58 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_sync_region().

◆ on_cds_ompt_callback_sync_region_wait()

static void on_cds_ompt_callback_sync_region_wait ( ompt_sync_region_t  kind,
ompt_scope_endpoint_t  endpoint,
ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
const void codeptr_ra 
)
static

Definition at line 69 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_sync_region_wait().

◆ on_cds_ompt_callback_task_create()

static void on_cds_ompt_callback_task_create ( ompt_data_t *  parent_task_data,
const ompt_frame_t *  parent_frame,
ompt_data_t *  new_task_data,
int  type,
int  has_dependences,
const void codeptr_ra 
)
static

◆ on_cds_ompt_callback_task_dependence()

static void on_cds_ompt_callback_task_dependence ( ompt_data_t *  first_task_data,
ompt_data_t *  second_task_data 
)
static

Definition at line 185 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_task_dependence().

◆ on_cds_ompt_callback_task_schedule()

static void on_cds_ompt_callback_task_schedule ( ompt_data_t *  first_task_data,
ompt_task_status_t  prior_task_status,
ompt_data_t *  second_task_data 
)
static

Definition at line 167 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_task_schedule().

◆ on_cds_ompt_callback_thread_begin()

static void on_cds_ompt_callback_thread_begin ( ompt_thread_t  thread_type,
ompt_data_t *  thread_data 
)
static

◆ on_cds_ompt_callback_thread_end()

static void on_cds_ompt_callback_thread_end ( ompt_data_t *  thread_data)
static

Definition at line 201 of file first-tool.h.

References get_own_ompt_data(), and on_ompt_callback_thread_end().

◆ on_cds_ompt_callback_work()

static void on_cds_ompt_callback_work ( ompt_work_t  wstype,
ompt_scope_endpoint_t  endpoint,
ompt_data_t *  parallel_data,
ompt_data_t *  task_data,
uint64_t  count,
const void codeptr_ra 
)
static

Definition at line 109 of file first-tool.h.

References count, get_own_ompt_data(), and on_ompt_callback_work().

Variable Documentation

◆ ompt_cds_get_thread_data

ompt_get_thread_data_t ompt_cds_get_thread_data
static

Definition at line 238 of file first-tool.h.

Referenced by ompt_cds_initialize(), and ompt_get_own_thread_data().