GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
math.c File Reference
#include "ghost/config.h"
#include "ghost/types.h"
#include "ghost/util.h"
#include "ghost/math.h"
#include "ghost/densemat.h"
#include "ghost/densemat_cm.h"
#include "ghost/densemat_rm.h"
#include "ghost/locality.h"
#include "ghost/instr.h"
#include "ghost/log.h"
#include <complex.h>
#include <float.h>
Include dependency graph for math.c:

Functions

ghost_error ghost_mpi_op_sum (ghost_mpi_op *op, ghost_datatype datatype)
 
ghost_error ghost_mpi_op_densemat_sum (ghost_mpi_op *op, ghost_datatype datatype)
 
ghost_error ghost_mpi_operations_create ()
 
ghost_error ghost_mpi_operations_destroy ()
 
ghost_error ghost_spmv_nflops (int *nFlops, ghost_datatype m_t, ghost_datatype v_t)
 
int ghost_kacz_perf (double *perf, double time, void *varg)
 
int ghost_spmv_perf (double *perf, double time, void *varg)
 
int ghost_axpbypcz_perf (double *perf, double time, void *varg)
 
int ghost_axpby_perf (double *perf, double time, void *varg)
 
int ghost_axpy_perf (double *perf, double time, void *varg)
 
int ghost_dot_perf (double *perf, double time, void *varg)
 
int ghost_scale_perf (double *perf, double time, void *varg)
 
bool ghost_iszero (void *vnumber, ghost_datatype dt)
 
bool ghost_isone (void *vnumber, ghost_datatype dt)
 
ghost_error ghost_axpy (ghost_densemat *y, ghost_densemat *x, void *a)
 Computes y := a*x + y with scalar a. More...
 
ghost_error ghost_vaxpy (ghost_densemat *y, ghost_densemat *x, void *a)
 Computes column-wise y := a_i*x + y with separate scalar a_i. More...
 
ghost_error ghost_axpby (ghost_densemat *y, ghost_densemat *x, void *a, void *b)
 Computes y := a*x + b*y with scalar a and b. More...
 
ghost_error ghost_vaxpby (ghost_densemat *y, ghost_densemat *x, void *a, void *b)
 Computes column-wise y := a_i*x + b_i*y with separate scalar a_i and b_i. More...
 
ghost_error ghost_axpbypcz (ghost_densemat *y, ghost_densemat *x, void *a, void *b, ghost_densemat *z, void *c)
 Computes y := a*x + b*y + c*z with scalar a, b, and c. More...
 
ghost_error ghost_vaxpbypcz (ghost_densemat *y, ghost_densemat *x, void *a, void *b, ghost_densemat *z, void *c)
 Computes column-wise y := a_i*x + b_i*y + c_i*z with separate scalars a_i, b_i, and c_i. More...
 
ghost_error ghost_scale (ghost_densemat *x, void *a)
 Computes x := s*x with scalar s. More...
 
ghost_error ghost_vscale (ghost_densemat *x, void *a)
 Computes column-wise x := s_i*x with separate scalars s_i. More...
 
ghost_error ghost_normalize (ghost_densemat *x)
 Normalizes a densemat (interpreted as a block vector). More...
 
ghost_error ghost_conj (ghost_densemat *x)
 Conjugates a densemat. More...
 
ghost_error ghost_norm (void *norm, ghost_densemat *x, void *pow)
 Compute the norm of a densemat: sum_i [conj(vec_i) * vec_i]^pow. More...
 
ghost_error ghost_nrm2 (void *norm, ghost_densemat *x)
 Compute the norm of a densemat: sum_i [conj(vec_i) * vec_i]^2. More...
 
ghost_error ghost_mult (ghost_densemat *y, ghost_densemat *x, void *a)
 Computes y(i,j) := a*x(i,j)*y(i,j) or y(i,j) := a*x(i) (if x has 1 column), with scalar a. More...
 

Variables

static ghost_mpi_op GHOST_MPI_OP_SUM_C = MPI_OP_NULL
 
static ghost_mpi_op GHOST_MPI_OP_SUM_Z = MPI_OP_NULL
 
static ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_S = MPI_OP_NULL
 
static ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_D = MPI_OP_NULL
 
static ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_C = MPI_OP_NULL
 
static ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_Z = MPI_OP_NULL
 

Function Documentation

int ghost_axpby_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

int ghost_axpbypcz_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

int ghost_axpy_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

int ghost_dot_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

bool ghost_isone ( void *  vnumber,
ghost_datatype  dt 
)
bool ghost_iszero ( void *  vnumber,
ghost_datatype  dt 
)
int ghost_kacz_perf ( double *  perf,
double  time,
void *  varg 
)
ghost_error ghost_mpi_op_densemat_sum ( ghost_mpi_op op,
ghost_datatype  datatype 
)
ghost_error ghost_mpi_op_sum ( ghost_mpi_op op,
ghost_datatype  datatype 
)
ghost_error ghost_mpi_operations_create ( )
ghost_error ghost_mpi_operations_destroy ( )
ghost_error ghost_norm ( void *  norm,
ghost_densemat vec,
void *  pow 
)

Compute the norm of a densemat: sum_i [conj(vec_i) * vec_i]^pow.

Parameters
normWhere to store the norm. Must be a pointer to the densemat's data type.
vecThe densemat.
powThe power. Must be a pointer to the densemat's data type.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_nrm2 ( void *  norm,
ghost_densemat vec 
)

Compute the norm of a densemat: sum_i [conj(vec_i) * vec_i]^2.

Parameters
normWhere to store the norm. Must be a pointer to the densemat's data type.
vecThe densemat.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

int ghost_scale_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

ghost_error ghost_spmv_nflops ( int *  nFlops,
ghost_datatype  m_t,
ghost_datatype  v_t 
)

Here is the call graph for this function:

int ghost_spmv_perf ( double *  perf,
double  time,
void *  varg 
)

Here is the call graph for this function:

Variable Documentation

ghost_mpi_op GHOST_MPI_OP_SUM_C = MPI_OP_NULL
static
ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_C = MPI_OP_NULL
static
ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_D = MPI_OP_NULL
static
ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_S = MPI_OP_NULL
static
ghost_mpi_op GHOST_MPI_OP_SUM_DENSEMAT_Z = MPI_OP_NULL
static
ghost_mpi_op GHOST_MPI_OP_SUM_Z = MPI_OP_NULL
static