![]() |
GHOST
1.1.2
General, Hybrid, and Optimized Sparse Toolkit
|
Functions for global mathematical operations. More...
#include "config.h"
#include "types.h"
#include "context.h"
#include "sparsemat.h"
#include "densemat.h"
#include "error.h"
#include "tsmm.h"
#include "tsmm_inplace.h"
#include "dot.h"
#include <stdarg.h>
Go to the source code of this file.
Classes | |
struct | ghost_gemm_perf_args |
struct | ghost_kacz_perf_args |
struct | ghost_spmv_perf_args |
struct | ghost_axpy_perf_args |
struct | ghost_axpby_perf_args |
struct | ghost_axpbypcz_perf_args |
struct | ghost_dot_perf_args |
struct | ghost_scale_perf_args |
Macros | |
#define | SELECT_BLAS1_KERNEL(kernels, commonlocation, compute_at, storage, ret,...) |
#define | GHOST_GEMM_ALL_REDUCE GHOST_ALLREDUCE |
#define | GHOST_GEMM_NO_REDUCE -2 |
#define | GHOST_KACZ_PERF_UNIT "GF/s" |
#define | GHOST_KACZ_PERF_TAG "kacz" |
#define | GHOST_SPMV_PERF_UNIT "GF/s" |
#define | GHOST_SPMV_PERF_TAG "spmv" |
#define | GHOST_AXPY_PERF_UNIT "GB/s" |
#define | GHOST_AXPY_PERF_TAG "axpy" |
#define | GHOST_AXPBY_PERF_UNIT "GB/s" |
#define | GHOST_AXPBY_PERF_TAG "axpby" |
#define | GHOST_AXPBYPCZ_PERF_UNIT "GB/s" |
#define | GHOST_AXPBYPCZ_PERF_TAG "axpbypcz" |
#define | GHOST_DOT_PERF_UNIT "GB/s" |
#define | GHOST_DOT_PERF_TAG "dot" |
#define | GHOST_SCALE_PERF_UNIT "GB/s" |
#define | GHOST_SCALE_PERF_TAG "scale" |
Enumerations | |
enum | ghost_gemm_flags { GHOST_GEMM_DEFAULT = 0, GHOST_GEMM_NOT_SPECIAL = 1, GHOST_GEMM_NOT_CLONE_ALIASED = 2, GHOST_GEMM_KAHAN = 4 } |
Functions | |
ghost_error | ghost_spmv (ghost_densemat *res, ghost_sparsemat *mat, ghost_densemat *invec, ghost_spmv_opts opts) |
Multiply a sparse matrix with a dense vector. More... | |
ghost_error | ghost_spmv_nocomm (ghost_densemat *res, ghost_sparsemat *mat, ghost_densemat *invec, ghost_spmv_opts opts) |
ghost_error | ghost_gemm_valid (ghost_densemat *x, ghost_densemat *v, const char *transv, ghost_densemat *w, const char *transw, void *alpha, void *beta, int reduce, ghost_gemm_flags flags, int printerror) |
ghost_error | ghost_gemm (ghost_densemat *x, ghost_densemat *v, const char *transv, ghost_densemat *w, const char *transw, void *alpha, void *beta, int reduce, ghost_gemm_flags flags) |
Compute the general (dense) matrix-matrix product x = v*w. More... | |
ghost_error | ghost_mpi_operations_create () |
ghost_error | ghost_mpi_operations_destroy () |
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_spmv_nflops (int *nFlops, ghost_datatype m_t, ghost_datatype v_t) |
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 *s) |
Computes x := s*x with scalar s. More... | |
ghost_error | ghost_vscale (ghost_densemat *x, void *s) |
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 *vec, 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 *vec) |
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... | |
int | ghost_kacz_perf (double *perf, double time, void *arg) |
int | ghost_spmv_perf (double *perf, double time, void *arg) |
int | ghost_axpy_perf (double *perf, double time, void *arg) |
int | ghost_axpby_perf (double *perf, double time, void *arg) |
int | ghost_scale_perf (double *perf, double time, void *arg) |
int | ghost_dot_perf (double *perf, double time, void *arg) |
int | ghost_axpbypcz_perf (double *perf, double time, void *arg) |
int | ghost_gemm_perf_GFs (double *perf, double time, void *arg) |
int | ghost_gemm_perf_GBs (double *perf, double time, void *arg) |
bool | ghost_iszero (void *number, ghost_datatype dt) |
bool | ghost_isone (void *vnumber, ghost_datatype dt) |
Functions for global mathematical operations.
#define GHOST_AXPBY_PERF_TAG "axpby" |
#define GHOST_AXPBY_PERF_UNIT "GB/s" |
#define GHOST_AXPBYPCZ_PERF_TAG "axpbypcz" |
#define GHOST_AXPBYPCZ_PERF_UNIT "GB/s" |
#define GHOST_AXPY_PERF_TAG "axpy" |
#define GHOST_AXPY_PERF_UNIT "GB/s" |
#define GHOST_DOT_PERF_TAG "dot" |
#define GHOST_DOT_PERF_UNIT "GB/s" |
#define GHOST_GEMM_ALL_REDUCE GHOST_ALLREDUCE |
#define GHOST_GEMM_NO_REDUCE -2 |
#define GHOST_KACZ_PERF_TAG "kacz" |
#define GHOST_KACZ_PERF_UNIT "GF/s" |
#define GHOST_SCALE_PERF_TAG "scale" |
#define GHOST_SCALE_PERF_UNIT "GB/s" |
#define GHOST_SPMV_PERF_TAG "spmv" |
#define GHOST_SPMV_PERF_UNIT "GF/s" |
#define SELECT_BLAS1_KERNEL | ( | kernels, | |
commonlocation, | |||
compute_at, | |||
storage, | |||
ret, | |||
... | |||
) |
enum ghost_gemm_flags |
int ghost_axpby_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
int ghost_axpbypcz_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
int ghost_axpy_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
int ghost_dot_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
int ghost_gemm_perf_GBs | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
int ghost_gemm_perf_GFs | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
ghost_error ghost_gemm_valid | ( | ghost_densemat * | x, |
ghost_densemat * | v, | ||
const char * | transv, | ||
ghost_densemat * | w, | ||
const char * | transw, | ||
void * | alpha, | ||
void * | beta, | ||
int | reduce, | ||
ghost_gemm_flags | flags, | ||
int | printerror | ||
) |
bool ghost_isone | ( | void * | vnumber, |
ghost_datatype | dt | ||
) |
bool ghost_iszero | ( | void * | number, |
ghost_datatype | dt | ||
) |
int ghost_kacz_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
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.
norm | Where to store the norm. Must be a pointer to the densemat's data type. |
vec | The densemat. |
pow | The power. Must be a pointer to the densemat's data type. |
ghost_error ghost_nrm2 | ( | void * | norm, |
ghost_densemat * | vec | ||
) |
Compute the norm of a densemat: sum_i [conj(vec_i) * vec_i]^2.
norm | Where to store the norm. Must be a pointer to the densemat's data type. |
vec | The densemat. |
int ghost_scale_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |
ghost_error ghost_spmv_nflops | ( | int * | nFlops, |
ghost_datatype | m_t, | ||
ghost_datatype | v_t | ||
) |
ghost_error ghost_spmv_nocomm | ( | ghost_densemat * | res, |
ghost_sparsemat * | mat, | ||
ghost_densemat * | invec, | ||
ghost_spmv_opts | opts | ||
) |
int ghost_spmv_perf | ( | double * | perf, |
double | time, | ||
void * | arg | ||
) |