Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
BlaArray.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_darray_ax (const INT n, const REAL a, REAL *x)
 x = a*x More...
 
void fasp_blas_darray_axpy (const INT n, const REAL a, const REAL *x, REAL *y)
 y = a*x + y More...
 
void fasp_blas_ldarray_axpy (const INT n, const REAL a, const REAL *x, LONGREAL *y)
 y = a*x + y More...
 
void fasp_blas_darray_axpy_nc2 (const REAL a, const REAL *x, REAL *y)
 y = a*x + y, length of x and y should be 2 More...
 
void fasp_blas_darray_axpy_nc3 (const REAL a, const REAL *x, REAL *y)
 y = a*x + y, length of x and y should be 3 More...
 
void fasp_blas_darray_axpy_nc5 (const REAL a, const REAL *x, REAL *y)
 y = a*x + y, length of x and y should be 5 More...
 
void fasp_blas_darray_axpy_nc7 (const REAL a, const REAL *x, REAL *y)
 y = a*x + y, length of x and y should be 7 More...
 
void fasp_blas_darray_axpyz (const INT n, const REAL a, const REAL *x, const REAL *y, REAL *z)
 z = a*x + y More...
 
void fasp_blas_darray_axpyz_nc2 (const REAL a, const REAL *x, const REAL *y, REAL *z)
 z = a*x + y, length of x, y and z should be 2 More...
 
void fasp_blas_darray_axpyz_nc3 (const REAL a, const REAL *x, const REAL *y, REAL *z)
 z = a*x + y, length of x, y and z should be 3 More...
 
void fasp_blas_darray_axpyz_nc5 (const REAL a, const REAL *x, const REAL *y, REAL *z)
 z = a*x + y, length of x, y and z should be 5 More...
 
void fasp_blas_darray_axpyz_nc7 (const REAL a, const REAL *x, const REAL *y, REAL *z)
 z = a*x + y, length of x, y and z should be 7 More...
 
void fasp_blas_darray_axpby (const INT n, const REAL a, const REAL *x, const REAL b, REAL *y)
 y = a*x + b*y More...
 
REAL fasp_blas_darray_norm1 (const INT n, const REAL *x)
 L1 norm of array x. More...
 
REAL fasp_blas_darray_norm2 (const INT n, const REAL *x)
 L2 norm of array x. More...
 
REAL fasp_blas_darray_norminf (const INT n, const REAL *x)
 Linf norm of array x. More...
 
REAL fasp_blas_darray_dotprod (const INT n, const REAL *x, const REAL *y)
 Inner product of two arraies x and y. More...
 

Detailed Description

BLAS1 operations for arrays.

Note
This file contains Level-1 (Bla) functions. It requires: AuxThreads.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.

Definition in file BlaArray.c.

Function Documentation

◆ fasp_blas_darray_ax()

void fasp_blas_darray_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/2009

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

Warning
x is reused to store the resulting array!

Definition at line 43 of file BlaArray.c.

◆ fasp_blas_darray_axpby()

void fasp_blas_darray_axpby ( const INT  n,
const REAL  a,
const 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, reused to store the resulting array
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 620 of file BlaArray.c.

◆ fasp_blas_darray_axpy()

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

y = a*x + y

Parameters
nNumber of variables
aFactor a
xPointer to x
yPointer to y, reused to store the resulting array
Author
Chensong Zhang
Date
07/01/2009

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

Definition at line 90 of file BlaArray.c.

◆ fasp_blas_darray_axpy_nc2()

void fasp_blas_darray_axpy_nc2 ( const REAL  a,
const REAL x,
REAL y 
)

y = a*x + y, length of x and y should be 2

Parameters
aREAL factor a
xPointer to the original array
yPointer to the destination array
Author
Xiaozhe Hu
Date
18/11/2011

Definition at line 234 of file BlaArray.c.

◆ fasp_blas_darray_axpy_nc3()

void fasp_blas_darray_axpy_nc3 ( const REAL  a,
const REAL x,
REAL y 
)

y = a*x + y, length of x and y should be 3

Parameters
aREAL factor a
xPointer to the original array
yPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 255 of file BlaArray.c.

◆ fasp_blas_darray_axpy_nc5()

void fasp_blas_darray_axpy_nc5 ( const REAL  a,
const REAL x,
REAL y 
)

y = a*x + y, length of x and y should be 5

Parameters
aREAL factor a
xPointer to the original array
yPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 282 of file BlaArray.c.

◆ fasp_blas_darray_axpy_nc7()

void fasp_blas_darray_axpy_nc7 ( const REAL  a,
const REAL x,
REAL y 
)

y = a*x + y, length of x and y should be 7

Parameters
aREAL factor a
xPointer to the original array
yPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 327 of file BlaArray.c.

◆ fasp_blas_darray_axpyz()

void fasp_blas_darray_axpyz ( const INT  n,
const REAL  a,
const REAL x,
const 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/2009

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

Definition at line 403 of file BlaArray.c.

◆ fasp_blas_darray_axpyz_nc2()

void fasp_blas_darray_axpyz_nc2 ( const REAL  a,
const REAL x,
const REAL y,
REAL z 
)

z = a*x + y, length of x, y and z should be 2

Parameters
aREAL factor a
xPointer to the original array 1
yPointer to the original array 2
zPointer to the destination array
Author
Xiaozhe Hu
Date
18/11/2011

Definition at line 445 of file BlaArray.c.

◆ fasp_blas_darray_axpyz_nc3()

void fasp_blas_darray_axpyz_nc3 ( const REAL  a,
const REAL x,
const REAL y,
REAL z 
)

z = a*x + y, length of x, y and z should be 3

Parameters
aREAL factor a
xPointer to the original array 1
yPointer to the original array 2
zPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 468 of file BlaArray.c.

◆ fasp_blas_darray_axpyz_nc5()

void fasp_blas_darray_axpyz_nc5 ( const REAL  a,
const REAL x,
const REAL y,
REAL z 
)

z = a*x + y, length of x, y and z should be 5

Parameters
aREAL factor a
xPointer to the original array 1
yPointer to the original array 2
zPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 497 of file BlaArray.c.

◆ fasp_blas_darray_axpyz_nc7()

void fasp_blas_darray_axpyz_nc7 ( const REAL  a,
const REAL x,
const REAL y,
REAL z 
)

z = a*x + y, length of x, y and z should be 7

Parameters
aREAL factor a
xPointer to the original array 1
yPointer to the original array 2
zPointer to the destination array
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010

Definition at line 544 of file BlaArray.c.

◆ fasp_blas_darray_dotprod()

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

Inner product of two arraies x and y.

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

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

Definition at line 771 of file BlaArray.c.

◆ fasp_blas_darray_norm1()

REAL fasp_blas_darray_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/2009

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

Definition at line 663 of file BlaArray.c.

◆ fasp_blas_darray_norm2()

REAL fasp_blas_darray_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/2009

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

Definition at line 691 of file BlaArray.c.

◆ fasp_blas_darray_norminf()

REAL fasp_blas_darray_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/2009

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

Definition at line 719 of file BlaArray.c.

◆ fasp_blas_ldarray_axpy()

void fasp_blas_ldarray_axpy ( const INT  n,
const REAL  a,
const REAL x,
LONGREAL y 
)

y = a*x + y

Parameters
nNumber of variables
aFactor a
xPointer to x
yPointer to y, reused to store the resulting array
Author
Ting Lai
Date
05/09/2022

Definition at line 163 of file BlaArray.c.