Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
blas_array.c File Reference

BLAS1 operations for arrays. More...

#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"

Go to the source code of this file.

Functions

void fasp_blas_array_ax (const INT n, const REAL a, REAL *x)
 x = a*x More...
 
void fasp_blas_array_axpy (const INT n, const REAL a, REAL *x, REAL *y)
 y = a*x + y More...
 
void fasp_blas_array_axpyz (const INT n, const REAL a, REAL *x, REAL *y, REAL *z)
 z = a*x + y More...
 
void fasp_blas_array_axpby (const INT n, const REAL a, REAL *x, const REAL b, REAL *y)
 y = a*x + b*y More...
 
REAL fasp_blas_array_dotprod (const INT n, const REAL *x, const REAL *y)
 Inner product of two arraies (x,y) More...
 
REAL fasp_blas_array_norm1 (const INT n, const REAL *x)
 L1 norm of array x. More...
 
REAL fasp_blas_array_norm2 (const INT n, const REAL *x)
 L2 norm of array x. More...
 
REAL fasp_blas_array_norminf (const INT n, const REAL *x)
 Linf norm of array x. More...
 

Detailed Description

BLAS1 operations for arrays.

Definition in file blas_array.c.

Function Documentation

void fasp_blas_array_ax ( const INT  n,
const REAL  a,
REAL x 
)

x = a*x

Parameters
nNumber of variables
aFactor a
xPointer to x
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Note
x is reused to store the resulting array.

Definition at line 35 of file blas_array.c.

void fasp_blas_array_axpby ( const INT  n,
const REAL  a,
REAL x,
const REAL  b,
REAL y 
)

y = a*x + b*y

Parameters
nNumber of variables
aFactor a
xPointer to x
bFactor b
yPointer to y
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Note
y is reused to store the resulting array.

Definition at line 218 of file blas_array.c.

void fasp_blas_array_axpy ( const INT  n,
const REAL  a,
REAL x,
REAL y 
)

y = a*x + y

Parameters
nNumber of variables
aFactor a
xPointer to x
yPointer to y
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Note
y is reused to store the resulting array.

Definition at line 87 of file blas_array.c.

void fasp_blas_array_axpyz ( const INT  n,
const REAL  a,
REAL x,
REAL y,
REAL z 
)

z = a*x + y

Parameters
nNumber of variables
aFactor a
xPointer to x
yPointer to y
zPointer to z
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Definition at line 167 of file blas_array.c.

REAL fasp_blas_array_dotprod ( const INT  n,
const REAL x,
const REAL y 
)

Inner product of two arraies (x,y)

Parameters
nNumber of variables
xPointer to x
yPointer to y
Returns
Inner product (x,y)
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Definition at line 267 of file blas_array.c.

REAL fasp_blas_array_norm1 ( const INT  n,
const REAL x 
)

L1 norm of array x.

Parameters
nNumber of variables
xPointer to x
Returns
L1 norm of x
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Definition at line 307 of file blas_array.c.

REAL fasp_blas_array_norm2 ( const INT  n,
const REAL x 
)

L2 norm of array x.

Parameters
nNumber of variables
xPointer to x
Returns
L2 norm of x
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Xiaoqiang Yue on 05/23/2012

Definition at line 347 of file blas_array.c.

REAL fasp_blas_array_norminf ( const INT  n,
const REAL x 
)

Linf norm of array x.

Parameters
nNumber of variables
xPointer to x
Returns
L_inf norm of x
Author
Chensong Zhang
Date
07/01/209

Modified by Chunsheng Feng, Zheng Li on 06/28/2012

Definition at line 388 of file blas_array.c.