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

Simple array operations – init, set, copy, etc. More...

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

Go to the source code of this file.

Functions

void fasp_array_null (REAL *x)
 Initialize an array. More...
 
void fasp_array_set (const INT n, REAL *x, const REAL val)
 Set initial value for an array to be x=val. More...
 
void fasp_iarray_set (const INT n, INT *x, const INT val)
 Set initial value for an array to be x=val. More...
 
void fasp_array_cp (const INT n, REAL *x, REAL *y)
 Copy an array to the other y=x. More...
 
void fasp_iarray_cp (const INT n, INT *x, INT *y)
 Copy an array to the other y=x. More...
 
void fasp_array_cp_nc3 (REAL *x, REAL *y)
 Copy an array to the other y=x, the length is 3. More...
 
void fasp_array_cp_nc5 (REAL *x, REAL *y)
 Copy an array to the other y=x, the length is 5. More...
 
void fasp_array_cp_nc7 (REAL *x, REAL *y)
 Copy an array to the other y=x, the length is 7. More...
 

Detailed Description

Simple array operations – init, set, copy, etc.

Definition in file array.c.

Function Documentation

void fasp_array_cp ( const INT  n,
REAL x,
REAL y 
)

Copy an array to the other y=x.

Parameters
nNumber of variables
xPointer to the original vector
yPointer to the destination vector
Author
Chensong Zhang
Date
2010/04/03

Definition at line 165 of file array.c.

void fasp_array_cp_nc3 ( REAL x,
REAL y 
)

Copy an array to the other y=x, the length is 3.

Parameters
xPointer to the original vector
yPointer to the destination vector
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010
Note
Special unrolled routine designed for a specific application

Definition at line 205 of file array.c.

void fasp_array_cp_nc5 ( REAL x,
REAL y 
)

Copy an array to the other y=x, the length is 5.

Parameters
xPointer to the original vector
yPointer to the destination vector
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010
Note
Special unrolled routine designed for a specific application

Definition at line 226 of file array.c.

void fasp_array_cp_nc7 ( REAL x,
REAL y 
)

Copy an array to the other y=x, the length is 7.

Parameters
xPointer to the original vector
yPointer to the destination vector
Author
Xiaozhe Hu, Shiquan Zhang
Date
05/01/2010
Note
Special unrolled routine designed for a specific application

Definition at line 249 of file array.c.

void fasp_array_null ( REAL x)

Initialize an array.

Parameters
xPointer to the vector
Author
Chensong Zhang
Date
2010/04/03

Definition at line 29 of file array.c.

void fasp_array_set ( const INT  n,
REAL x,
const REAL  val 
)

Set initial value for an array to be x=val.

Parameters
nNumber of variables
xPointer to the vector
valInitial value for the REAL array
Author
Chensong Zhang
Date
04/03/2010

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

Definition at line 48 of file array.c.

void fasp_iarray_cp ( const INT  n,
INT x,
INT y 
)

Copy an array to the other y=x.

Parameters
nNumber of variables
xPointer to the original vector
yPointer to the destination vector
Author
Chunsheng Feng, Xiaoqiang Yue
Date
05/23/2012

Definition at line 185 of file array.c.

void fasp_iarray_set ( const INT  n,
INT x,
const INT  val 
)

Set initial value for an array to be x=val.

Parameters
nNumber of variables
xPointer to the vector
valInitial value for the REAL array
Author
Chensong Zhang
Date
04/03/2010

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

Definition at line 107 of file array.c.