(git:ccc2433)
dbm_miniapp.c File Reference
#include <assert.h>
#include <omp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../offload/offload_library.h"
#include "dbm_library.h"
#include "dbm_matrix.h"
#include "dbm_mpi.h"

Go to the source code of this file.

Functions

static void print_func (char *message, int output_unit)
 Wrapper for printf, passed to dbm_library_print_stats. More...
 
static int imin (int x, int y)
 Returns the smaller of two given integer (missing from the C standard) More...
 
static dbm_matrix_tcreate_some_matrix (const int nrows, const int ncols, const int row_size, const int col_size, const dbm_mpi_comm_t comm)
 Private routine for creating a distribution and an empty matrix. More...
 
static void reserve_all_blocks (dbm_matrix_t *matrix)
 Private routine for reserving all blocks of the given matrix. More...
 
static void set_all_blocks (dbm_matrix_t *matrix)
 Private routine for setting all blocks to 1.0. More...
 
void benchmark_multiply (const int M, const int N, const int K, const int m, const int n, const int k, const dbm_mpi_comm_t comm)
 Run a benchmark of dbm_multiply with given block sizes. More...
 
int main (int argc, char *argv[])
 Stand-alone miniapp for smoke-testing and benchmarking dbm_multiply. More...
 

Function Documentation

◆ print_func()

static void print_func ( char *  message,
int  output_unit 
)
static

Wrapper for printf, passed to dbm_library_print_stats.

Author
Ole Schuett

Definition at line 28 of file dbm_miniapp.c.

Here is the caller graph for this function:

◆ imin()

static int imin ( int  x,
int  y 
)
inlinestatic

Returns the smaller of two given integer (missing from the C standard)

Author
Ole Schuett

Definition at line 38 of file dbm_miniapp.c.

Here is the caller graph for this function:

◆ create_some_matrix()

static dbm_matrix_t* create_some_matrix ( const int  nrows,
const int  ncols,
const int  row_size,
const int  col_size,
const dbm_mpi_comm_t  comm 
)
static

Private routine for creating a distribution and an empty matrix.

Author
Ole Schuett

Definition at line 44 of file dbm_miniapp.c.

Here is the call graph for this function:

◆ reserve_all_blocks()

static 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 86 of file dbm_miniapp.c.

Here is the call graph for this function:

◆ set_all_blocks()

static void set_all_blocks ( dbm_matrix_t matrix)
static

Private routine for setting all blocks to 1.0.

Author
Ole Schuett

Definition at line 129 of file dbm_miniapp.c.

Here is the call 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 dbm_mpi_comm_t  comm 
)

Run a benchmark of dbm_multiply with given block sizes.

Author
Ole Schuett

Definition at line 150 of file dbm_miniapp.c.

◆ main()

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

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

Author
Ole Schuett

Definition at line 197 of file dbm_miniapp.c.

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