Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
BlaSmallMat.c File Reference

BLAS operations for small dense matrices. More...

#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

void fasp_blas_smat_axm (REAL *a, const INT n, const REAL alpha)
 Compute a = alpha*a (in place) More...
 
void fasp_blas_smat_axm1 (REAL *a, const INT n, const REAL alpha, REAL *b)
 Compute b = alpha*a (in place) More...
 
void fasp_blas_smat_add (const REAL *a, const REAL *b, const INT n, const REAL alpha, const REAL beta, REAL *c)
 Compute c = alpha*a + beta*b. More...
 
void fasp_blas_smat_mxv_nc2 (const REAL *a, const REAL *b, REAL *c)
 Compute the product of a 2*2 matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mxv_nc3 (const REAL *a, const REAL *b, REAL *c)
 Compute the product of a 3*3 matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mxv_nc4 (const REAL *a, const REAL *b, REAL *c)
 Compute the product of a 4*4 matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mxv_nc5 (const REAL *a, const REAL *b, REAL *c)
 Compute the product of a 5*5 matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mxv_nc7 (const REAL *a, const REAL *b, REAL *c)
 Compute the product of a 7*7 matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mxv (const REAL *a, const REAL *b, REAL *c, const INT n)
 Compute the product of a small full matrix a and a array b, stored in c. More...
 
void fasp_blas_smat_mul_nc2 (const REAL *a, const REAL *b, REAL *c)
 Compute the matrix product of two 2* matrices a and b, stored in c. More...
 
void fasp_blas_smat_mul_nc3 (const REAL *a, const REAL *b, REAL *c)
 Compute the matrix product of two 3*3 matrices a and b, stored in c. More...
 
void fasp_blas_smat_mul_nc4 (const REAL *a, const REAL *b, REAL *c)
 Compute the matrix product of two 4*4 matrices a and b, stored in c. More...
 
void fasp_blas_smat_mul_nc5 (const REAL *a, const REAL *b, REAL *c)
 Compute the matrix product of two 5*5 matrices a and b, stored in c. More...
 
void fasp_blas_smat_mul_nc7 (const REAL *a, const REAL *b, REAL *c)
 Compute the matrix product of two 7*7 matrices a and b, stored in c. More...
 
void fasp_blas_smat_mul (const REAL *a, const REAL *b, REAL *c, const INT n)
 Compute the matrix product of two small full matrices a and b, stored in c. More...
 
void fasp_blas_smat_ypAx_nc2 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y + Ax, where 'A' is a 2*2 dense matrix. More...
 
void fasp_blas_smat_ypAx_nc3 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y + Ax, where 'A' is a 3*3 dense matrix. More...
 
void fasp_blas_smat_ypAx_nc4 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y + Ax, where 'A' is a 4*4 dense matrix. More...
 
void fasp_blas_smat_ypAx_nc5 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y + Ax, where 'A' is a 5*5 dense matrix. More...
 
void fasp_blas_smat_ypAx_nc7 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y + Ax, where 'A' is a 7*7 dense matrix. More...
 
void fasp_blas_smat_ypAx (const REAL *A, const REAL *x, REAL *y, const INT n)
 Compute y := y + Ax, where 'A' is a n*n dense matrix. More...
 
void fasp_blas_smat_ymAx_nc2 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y - Ax, where 'A' is a 2*2 dense matrix. More...
 
void fasp_blas_smat_ymAx_nc3 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y - Ax, where 'A' is a 3*3 dense matrix. More...
 
void fasp_blas_smat_ymAx_nc4 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y - Ax, where 'A' is a 4*4 dense matrix. More...
 
void fasp_blas_smat_ymAx_nc5 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y - Ax, where 'A' is a 5*5 dense matrix. More...
 
void fasp_blas_smat_ymAx_nc7 (const REAL *A, const REAL *x, REAL *y)
 Compute y := y - Ax, where 'A' is a 7*7 dense matrix. More...
 
void fasp_blas_smat_ymAx (const REAL *A, const REAL *x, REAL *y, const INT n)
 Compute y := y - Ax, where 'A' is a n*n dense matrix. More...
 
void fasp_blas_smat_aAxpby (const REAL alpha, const REAL *A, const REAL *x, const REAL beta, REAL *y, const INT n)
 Compute y:=alpha*A*x + beta*y. More...
 

Detailed Description

BLAS operations for small dense matrices.

Note
This file contains Level-1 (Bla) functions. It requires: BlaSparseBSR.c, BlaSparseCSR.c, BlaSpmvCSR.c, and PreDataInit.c

Copyright (C) 2009–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Warning
These rountines are designed for full matrices only!
This file contains very long lines. Not print friendly!

Definition in file BlaSmallMat.c.

Function Documentation

◆ fasp_blas_smat_aAxpby()

void fasp_blas_smat_aAxpby ( const REAL  alpha,
const REAL A,
const REAL x,
const REAL  beta,
REAL y,
const INT  n 
)

Compute y:=alpha*A*x + beta*y.

Parameters
alphaREAL factor alpha
APointer to the REAL array which stands for a n*n full matrix
xPointer to the REAL array with length n
betaREAL factor beta
yPointer to the REAL array with length n
nLength of array x and y
Author
Zhiyang Zhou, Chensong Zhang
Date
2010/10/25

Definition at line 1140 of file BlaSmallMat.c.

◆ fasp_blas_smat_add()

void fasp_blas_smat_add ( const REAL a,
const REAL b,
const INT  n,
const REAL  alpha,
const REAL  beta,
REAL c 
)

Compute c = alpha*a + beta*b.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
alphaScalar
betaScalar
cPointer to the REAL array which stands a n*n matrix
Author
Xiaozhe Hu, Chensong Zhang
Date
05/26/2014

Definition at line 86 of file BlaSmallMat.c.

◆ fasp_blas_smat_axm()

void fasp_blas_smat_axm ( REAL a,
const INT  n,
const REAL  alpha 
)

Compute a = alpha*a (in place)

Parameters
aPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
alphaScalar
Author
Xiaozhe Hu, Chensong Zhang
Date
05/26/2014

Definition at line 37 of file BlaSmallMat.c.

◆ fasp_blas_smat_axm1()

void fasp_blas_smat_axm1 ( REAL a,
const INT  n,
const REAL  alpha,
REAL b 
)

Compute b = alpha*a (in place)

Parameters
aPointer to the REAL array which stands a n*n matrix
bOUT: Pointer to the REAL array which stands a n*n matrix
nDimension of the matrix
alphaScalar
Author
Li Zhao
Date
07/03/2023

Definition at line 60 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul()

void fasp_blas_smat_mul ( const REAL a,
const REAL b,
REAL c,
const INT  n 
)

Compute the matrix product of two small full matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array which stands a n*n matrix
cPointer to the REAL array which stands a n*n matrix
nDimension of the matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
04/21/2010
Author
Li Zhao, the case of adding n = 4
Date
04/18/2021

Definition at line 596 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul_nc2()

void fasp_blas_smat_mul_nc2 ( const REAL a,
const REAL b,
REAL c 
)

Compute the matrix product of two 2* matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array which stands a n*n matrix
cPointer to the REAL array which stands a n*n matrix
Author
Xiaozhe Hu
Date
18/11/2011

Definition at line 289 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul_nc3()

void fasp_blas_smat_mul_nc3 ( const REAL a,
const REAL b,
REAL c 
)

Compute the matrix product of two 3*3 matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array which stands a n*n matrix
cPointer to the REAL array which stands a n*n matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 315 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul_nc4()

void fasp_blas_smat_mul_nc4 ( const REAL a,
const REAL b,
REAL c 
)

Compute the matrix product of two 4*4 matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array which stands a n*n matrix
cPointer to the REAL array which stands a n*n matrix
Author
Li Zhao
Date
04/18/2021

Definition at line 350 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul_nc5()

void fasp_blas_smat_mul_nc5 ( const REAL a,
const REAL b,
REAL c 
)

Compute the matrix product of two 5*5 matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a 5*5 matrix
bPointer to the REAL array which stands a 5*5 matrix
cPointer to the REAL array which stands a 5*5 matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 395 of file BlaSmallMat.c.

◆ fasp_blas_smat_mul_nc7()

void fasp_blas_smat_mul_nc7 ( const REAL a,
const REAL b,
REAL c 
)

Compute the matrix product of two 7*7 matrices a and b, stored in c.

Parameters
aPointer to the REAL array which stands a 7*7 matrix
bPointer to the REAL array which stands a 7*7 matrix
cPointer to the REAL array which stands a 7*7 matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 452 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv()

void fasp_blas_smat_mxv ( const REAL a,
const REAL b,
REAL c,
const INT  n 
)

Compute the product of a small full matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a n*n matrix
bPointer to the REAL array with length n
cPointer to the REAL array with length n
nDimension of the matrix
Author
Xiaozhe Hu, Shiquan Zhang
Date
04/21/2010
Author
Li Zhao, the case of adding n = 4
Date
04/18/2021

Definition at line 238 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv_nc2()

void fasp_blas_smat_mxv_nc2 ( const REAL a,
const REAL b,
REAL c 
)

Compute the product of a 2*2 matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a 2*2 matrix
bPointer to the REAL array with length 2
cPointer to the REAL array with length 2
Author
Xiaozhe Hu
Date
18/11/2010

Definition at line 113 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv_nc3()

void fasp_blas_smat_mxv_nc3 ( const REAL a,
const REAL b,
REAL c 
)

Compute the product of a 3*3 matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a 3*3 matrix
bPointer to the REAL array with length 3
cPointer to the REAL array with length 3
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 133 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv_nc4()

void fasp_blas_smat_mxv_nc4 ( const REAL a,
const REAL b,
REAL c 
)

Compute the product of a 4*4 matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a 4*4 matrix
bPointer to the REAL array with length 4
cPointer to the REAL array with length 4
Author
Li Zhao
Date
04/18/2021

Definition at line 154 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv_nc5()

void fasp_blas_smat_mxv_nc5 ( const REAL a,
const REAL b,
REAL c 
)

Compute the product of a 5*5 matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a 5*5 matrix
bPointer to the REAL array with length 5
cPointer to the REAL array with length 5
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 176 of file BlaSmallMat.c.

◆ fasp_blas_smat_mxv_nc7()

void fasp_blas_smat_mxv_nc7 ( const REAL a,
const REAL b,
REAL c 
)

Compute the product of a 7*7 matrix a and a array b, stored in c.

Parameters
aPointer to the REAL array which stands a 7*7 matrix
bPointer to the REAL array with length 7
cPointer to the REAL array with length 7
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 200 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx()

void fasp_blas_smat_ymAx ( const REAL A,
const REAL x,
REAL y,
const INT  n 
)

Compute y := y - Ax, where 'A' is a n*n dense matrix.

Parameters
APointer to the n*n dense matrix
xPointer to the REAL array with length n
yPointer to the REAL array with length n
nthe dimension of the dense matrix
Author
Zhiyang Zhou, Xiaozhe Hu, Chensong Zhang
Date
2010/10/25

Modified by Chensong Zhang on 01/25/2017

Definition at line 1028 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx_nc2()

void fasp_blas_smat_ymAx_nc2 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y - Ax, where 'A' is a 2*2 dense matrix.

Parameters
APointer to the 2*2 dense matrix
xPointer to the REAL array with length 3
yPointer to the REAL array with length 3
Author
Xiaozhe Hu
Date
18/11/2011
Note
Works for 2-component

Definition at line 889 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx_nc3()

void fasp_blas_smat_ymAx_nc3 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y - Ax, where 'A' is a 3*3 dense matrix.

Parameters
APointer to the 3*3 dense matrix
xPointer to the REAL array with length 3
yPointer to the REAL array with length 3
Author
Xiaozhe Hu, Zhiyang Zhou
Date
01/06/2011
Note
Works for 3-component

Definition at line 913 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx_nc4()

void fasp_blas_smat_ymAx_nc4 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y - Ax, where 'A' is a 4*4 dense matrix.

Parameters
APointer to the 4*4 dense matrix
xPointer to the REAL array with length 4
yPointer to the REAL array with length 4
Author
Li Zhao
Date
04/18/2021
Note
Works for 4-component

Definition at line 938 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx_nc5()

void fasp_blas_smat_ymAx_nc5 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y - Ax, where 'A' is a 5*5 dense matrix.

Parameters
APointer to the 5*5 dense matrix
xPointer to the REAL array with length 5
yPointer to the REAL array with length 5
Author
Xiaozhe Hu, Zhiyang Zhou
Date
01/06/2011
Note
Works for 5-component

Definition at line 963 of file BlaSmallMat.c.

◆ fasp_blas_smat_ymAx_nc7()

void fasp_blas_smat_ymAx_nc7 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y - Ax, where 'A' is a 7*7 dense matrix.

Parameters
APointer to the 7*7 dense matrix
xPointer to the REAL array with length 7
yPointer to the REAL array with length 7
Author
Xiaozhe Hu, Zhiyang Zhou
Date
01/06/2011
Note
Works for 7-component

Definition at line 990 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx()

void fasp_blas_smat_ypAx ( const REAL A,
const REAL x,
REAL y,
const INT  n 
)

Compute y := y + Ax, where 'A' is a n*n dense matrix.

Parameters
APointer to the n*n dense matrix
xPointer to the REAL array with length n
yPointer to the REAL array with length n
nDimension of the dense matrix
Author
Zhiyang Zhou, Chensong Zhang
Date
2010/10/25

Modified by Chensong Zhang on 01/25/2017

Definition at line 779 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx_nc2()

void fasp_blas_smat_ypAx_nc2 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y + Ax, where 'A' is a 2*2 dense matrix.

Parameters
APointer to the 3*3 dense matrix
xPointer to the REAL array with length 3
yPointer to the REAL array with length 3
Author
Xiaozhe Hu
Date
2011/11/18

Definition at line 651 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx_nc3()

void fasp_blas_smat_ypAx_nc3 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y + Ax, where 'A' is a 3*3 dense matrix.

Parameters
APointer to the 3*3 dense matrix
xPointer to the REAL array with length 3
yPointer to the REAL array with length 3
Author
Zhiyang Zhou, Xiaozhe Hu
Date
2010/10/25

Definition at line 673 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx_nc4()

void fasp_blas_smat_ypAx_nc4 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y + Ax, where 'A' is a 4*4 dense matrix.

Parameters
APointer to the 4*4 dense matrix
xPointer to the REAL array with length 4
yPointer to the REAL array with length 4
Author
Li Zhao
Date
2021/04/18

Definition at line 695 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx_nc5()

void fasp_blas_smat_ypAx_nc5 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y + Ax, where 'A' is a 5*5 dense matrix.

Parameters
APointer to the 5*5 dense matrix
xPointer to the REAL array with length 5
yPointer to the REAL array with length 5
Author
Zhiyang Zhou, Xiaozhe Hu, Chensong Zhang
Date
2010/10/25

Definition at line 718 of file BlaSmallMat.c.

◆ fasp_blas_smat_ypAx_nc7()

void fasp_blas_smat_ypAx_nc7 ( const REAL A,
const REAL x,
REAL y 
)

Compute y := y + Ax, where 'A' is a 7*7 dense matrix.

Parameters
APointer to the 7*7 dense matrix
xPointer to the REAL array with length 7
yPointer to the REAL array with length 7
Author
Zhiyang Zhou, Xiaozhe Hu, Chensong Zhang
Date
2010/10/25

Definition at line 742 of file BlaSmallMat.c.