![]() |
(git:c641773)
|
#include "dbm_library.h"#include "../mpiwrap/cp_mpi.h"#include "../offload/offload_library.h"#include "../offload/offload_mempool.h"#include <assert.h>#include <inttypes.h>#include <omp.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Macros | |
| #define | DBM_LIBRARY_PRINT(FN, MSG, OUTPUT_UNIT) |
Functions | |
| void | dbm_library_init (void) |
| Initializes the DBM library. | |
| void | dbm_library_finalize (void) |
| Finalizes the DBM library. | |
| void | dbm_library_counters_add (const int64_t counters[DBM_NUM_COUNTERS]) |
| Add the calling thread's counts to the stats. This routine is thread-safe. | |
| void | dbm_library_phases_add (const double seconds[DBM_NUM_PHASES], const int64_t bytes[DBM_NUM_PHASES]) |
| Add the durations (seconds) of a multiplication's phases to the stats. Called once per dbm_multiply outside of parallel regions. | |
| static int | compare_counters (const void *a, const void *b) |
| Comperator passed to qsort to compare two counters. | |
| void | dbm_library_print_stats (const int fortran_comm, void(*print_func)(const char *, int, int), const int output_unit) |
| Prints statistics gathered by the DBM library. | |
Variables | |
| static int64_t ** | per_thread_counters = NULL |
| static double | phase_seconds [DBM_NUM_PHASES] = {0} |
| static int64_t | phase_bytes [DBM_NUM_PHASES] = {0} |
| static bool | library_initialized = false |
| static int | max_threads = 0 |
| #define DBM_LIBRARY_PRINT | ( | FN, | |
| MSG, | |||
| OUTPUT_UNIT ) |
Definition at line 19 of file dbm_library.c.
| void dbm_library_init | ( | void | ) |
Initializes the DBM library.
Definition at line 36 of file dbm_library.c.
| void dbm_library_finalize | ( | void | ) |
Finalizes the DBM library.
Definition at line 70 of file dbm_library.c.
| void dbm_library_counters_add | ( | const int64_t | counters[DBM_NUM_COUNTERS] | ) |
Add the calling thread's counts to the stats. This routine is thread-safe.
Add the calling thread's counts (dbm_library_counter_index) to the stats. Counting locally first avoids a call per block multiplication. This routine is thread-safe.
Definition at line 93 of file dbm_library.c.
| void dbm_library_phases_add | ( | const double | seconds[DBM_NUM_PHASES], |
| const int64_t | bytes[DBM_NUM_PHASES] ) |
Add the durations (seconds) of a multiplication's phases to the stats. Called once per dbm_multiply outside of parallel regions.
Add the durations (seconds) of a multiplication's phases and the bytes sent by them to the stats. Called once per dbm_multiply outside of parallel regions.
Definition at line 106 of file dbm_library.c.
|
static |
Comperator passed to qsort to compare two counters.
Definition at line 119 of file dbm_library.c.
| void dbm_library_print_stats | ( | const int | fortran_comm, |
| void(* | print_func )(const char *, int, int), | ||
| const int | output_unit ) |
Prints statistics gathered by the DBM library.
Definition at line 129 of file dbm_library.c.
|
static |
Definition at line 22 of file dbm_library.c.
|
static |
Definition at line 23 of file dbm_library.c.
|
static |
Definition at line 24 of file dbm_library.c.
|
static |
Definition at line 25 of file dbm_library.c.
|
static |
Definition at line 26 of file dbm_library.c.