GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Local operations

Numerical operations not involving communication. More...

Collaboration diagram for Local operations:

Functions

ghost_error ghost_localdot (void *res, ghost_densemat *vec1, ghost_densemat *vec2)
 Compute the local dot product of two dense vectors/matrices. More...
 
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_conj (ghost_densemat *x)
 Conjugates a densemat. 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...
 
ghost_error ghost_tsmm (ghost_densemat *x, ghost_densemat *v, ghost_densemat *w, void *alpha, void *beta)
 Multiply a distributed dense tall skinny matrix with a redundant dense matrix. More...
 
ghost_error ghost_tsmm_inplace (ghost_densemat *x, ghost_densemat *w, void *alpha, void *beta)
 Multiply a distributed dense tall skinny matrix with a redundant dense matrix in-place. More...
 

Detailed Description

Numerical operations not involving communication.

Function Documentation

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.

Parameters
yThe in-/output densemat.
xThe input densemat
aPoints to the scale factor a.
bPoints to the scale factor b.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

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.

Parameters
yThe in-/output densemat.
xThe input densemat x
zThe input densemat z
aPoints to the scale factor a.
bPoints to the scale factor b.
cPoints to the scale factor c.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_axpy ( ghost_densemat y,
ghost_densemat x,
void *  a 
)

Computes y := a*x + y with scalar a.

Parameters
yThe in-/output densemat
xThe input densemat
aPoints to the scale factor.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_conj ( ghost_densemat x)

Conjugates a densemat.

Parameters
xThe densemat.
Returns
GHOST_SUCCESS on success or an error indicator.

This function does nothing for real-valued densemats.

Here is the call graph for this function:

ghost_error ghost_localdot ( void *  res,
ghost_densemat vec1,
ghost_densemat vec2 
)

Compute the local dot product of two dense vectors/matrices.

Parameters
resWhere to store the result.
vec1The first vector/matrix.
vec2The second vector/matrix.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

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.

Parameters
yThe in-/output densemat.
xThe input densemat
aPoints to the scale factor a.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_scale ( ghost_densemat x,
void *  s 
)

Computes x := s*x with scalar s.

Parameters
xThe densemat.
sThe scale factor.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_tsmm ( ghost_densemat x,
ghost_densemat v,
ghost_densemat w,
void *  alpha,
void *  beta 
)

Multiply a distributed dense tall skinny matrix with a redundant dense matrix.

Parameters
[in,out]x
[in]v
[in]w
[in]alpha
[in]beta

Compute $ x = \alpha \cdot v \cdot w + \beta \cdot x$.

v is MxK, distributed.

w is KxN, redundant.

x is MxN, distributed.

M<<N

This kernel is auto-generated at compile time for given values of K and N.

Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_tsmm_inplace ( ghost_densemat x,
ghost_densemat w,
void *  alpha,
void *  beta 
)

Multiply a distributed dense tall skinny matrix with a redundant dense matrix in-place.

Parameters
[in,out]x
[in]w
[in]alpha
[in]beta

Compute $ x(:,1:K) = \alpha \cdot x(:,1:M) \cdot w + \beta \cdot x(:,1:M)$.

w is MxK, M>K, redundant, col-major.

x is NxM, distributed, row-major.

M,K<<N

This kernel is auto-generated at compile time for given values of M and K.

Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

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.

Parameters
yThe in-/output densemat.
xThe input densemat
aPoints to the scale factors a. Length must be number of densemat columns.
bPoints to the scale factors b. Length must be number of densemat columns.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

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.

Parameters
yThe in-/output densemat.
xThe input densemat x
zThe input densemat z
aPoints to the scale factors a. Length must be number of densemat columns.
bPoints to the scale factors b. Length must be number of densemat columns.
cPoints to the scale factors c. Length must be number of densemat columns.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

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.

Parameters
yThe in-/output densemat
xThe input densemat
aPoints to the scale factors a. Length must be number of densemat columns.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function:

ghost_error ghost_vscale ( ghost_densemat x,
void *  s 
)

Computes column-wise x := s_i*x with separate scalars s_i.

Parameters
xThe densemat.
sThe scale factors. Length must be number of densemat columns.
Returns
GHOST_SUCCESS on success or an error indicator.

Here is the call graph for this function: