(git:9ccafda)
Loading...
Searching...
No Matches
dbm_library.c File Reference
#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)
#define DBM_NUM_COUNTERS   64

Functions

void dbm_library_init (void)
 Initializes the DBM library.
void dbm_library_finalize (void)
 Finalizes the DBM library.
static int floorlog10 (const int x)
 Computes min(3, floor(log10(x))).
void dbm_library_counter_increment (const int m, const int n, const int k)
 Add given block multiplication to stats. This routine is thread-safe.
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 bool library_initialized = false
static int max_threads = 0

Macro Definition Documentation

◆ DBM_LIBRARY_PRINT

#define DBM_LIBRARY_PRINT ( FN,
MSG,
OUTPUT_UNIT )
Value:
((FN)(MSG, (int)strlen(MSG), OUTPUT_UNIT))

Definition at line 19 of file dbm_library.c.

◆ DBM_NUM_COUNTERS

#define DBM_NUM_COUNTERS   64

Definition at line 21 of file dbm_library.c.

Function Documentation

◆ dbm_library_init()

void dbm_library_init ( void )

Initializes the DBM library.

Author
Ole Schuett

Definition at line 35 of file dbm_library.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbm_library_finalize()

void dbm_library_finalize ( void )

Finalizes the DBM library.

Author
Ole Schuett

Definition at line 67 of file dbm_library.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ floorlog10()

int floorlog10 ( const int x)
static

Computes min(3, floor(log10(x))).

Author
Ole Schuett

Definition at line 89 of file dbm_library.c.

Here is the caller graph for this function:

◆ dbm_library_counter_increment()

void dbm_library_counter_increment ( const int m,
const int n,
const int k )

Add given block multiplication to stats. This routine is thread-safe.

Author
Ole Schuett

Definition at line 97 of file dbm_library.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_counters()

int compare_counters ( const void * a,
const void * b )
static

Comperator passed to qsort to compare two counters.

Author
Ole Schuett

Definition at line 108 of file dbm_library.c.

Here is the caller graph for this function:

◆ dbm_library_print_stats()

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.

Author
Ole Schuett

Definition at line 116 of file dbm_library.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ per_thread_counters

int64_t** per_thread_counters = NULL
static

Definition at line 23 of file dbm_library.c.

◆ library_initialized

bool library_initialized = false
static

Definition at line 24 of file dbm_library.c.

◆ max_threads

int max_threads = 0
static

Definition at line 25 of file dbm_library.c.