(git:08825b9)
Loading...
Searching...
No Matches
dbm_miniapp.c File Reference
#include "dbm_library.h"
#include "dbm_matrix.h"
#include "../mpiwrap/cp_mpi.h"
#include "../offload/offload_library.h"
#include "../offload/offload_mempool.h"
#include <assert.h>
#include <omp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static void print_func (const char *msg, int msglen, int output_unit)
 Wrapper for printf, passed to dbm_library_print_stats.
static int imin (int x, int y)
 Returns the smaller of the two integers (missing from the C standard).
static dbm_distribution_t * create_dist (const int nrows, const int ncols, const cp_mpi_comm_t comm)
 Private routine for creating a distribution.
static dbm_matrix_t * create_some_matrix (const int nrows, const int ncols, const int nrows_min, const int nrows_max, const int ncols_min, const int ncols_max, const cp_mpi_comm_t comm)
 Private routine for creating a distribution and an empty matrix.
static void reserve_all_blocks (dbm_matrix_t *matrix)
 Private routine for reserving all blocks of the given matrix.
static void set_all_blocks (dbm_matrix_t *matrix)
 Private routine for setting all blocks.
void benchmark_multiply (const int M, const int N, const int K, const int m, const int n, const int k, const cp_mpi_comm_t comm)
 Run a benchmark of dbm_multiply with given block sizes.
int main (int argc, char *argv[])
 Stand-alone miniapp for smoke-testing and benchmarking dbm_multiply.

Function Documentation

◆ print_func()

void print_func ( const char * msg,
int msglen,
int output_unit )
static

Wrapper for printf, passed to dbm_library_print_stats.

Author
Ole Schuett

Definition at line 25 of file dbm_miniapp.c.

Here is the caller graph for this function:

◆ imin()

int imin ( int x,
int y )
inlinestatic

Returns the smaller of the two integers (missing from the C standard).

Author
Ole Schuett

Definition at line 36 of file dbm_miniapp.c.

Here is the caller graph for this function:

◆ create_dist()

dbm_distribution_t * create_dist ( const int nrows,
const int ncols,
const cp_mpi_comm_t comm )
static

Private routine for creating a distribution.

Author
Ole Schuett

Definition at line 42 of file dbm_miniapp.c.

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

◆ create_some_matrix()

dbm_matrix_t * create_some_matrix ( const int nrows,
const int ncols,
const int nrows_min,
const int nrows_max,
const int ncols_min,
const int ncols_max,
const cp_mpi_comm_t comm )
static

Private routine for creating a distribution and an empty matrix.

Author
Ole Schuett

Definition at line 71 of file dbm_miniapp.c.

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

◆ reserve_all_blocks()

void reserve_all_blocks ( dbm_matrix_t * matrix)
static

Private routine for reserving all blocks of the given matrix.

Author
Ole Schuett

Definition at line 116 of file dbm_miniapp.c.

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

◆ set_all_blocks()

void set_all_blocks ( dbm_matrix_t * matrix)
static

Private routine for setting all blocks.

Author
Ole Schuett

Definition at line 163 of file dbm_miniapp.c.

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

◆ benchmark_multiply()

void benchmark_multiply ( const int M,
const int N,
const int K,
const int m,
const int n,
const int k,
const cp_mpi_comm_t comm )

Run a benchmark of dbm_multiply with given block sizes.

Author
Ole Schuett

Definition at line 184 of file dbm_miniapp.c.

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

◆ main()

int main ( int argc,
char * argv[] )

Stand-alone miniapp for smoke-testing and benchmarking dbm_multiply.

Author
Ole Schuett

Definition at line 248 of file dbm_miniapp.c.

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