grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

blas_level_2.c File Reference
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <grass/gmath.h>
#include <grass/gis.h>
Include dependency graph for blas_level_2.c:

Go to the source code of this file.

Macros

#define EPSILON   0.00000000000000001
 

Functions

void G_math_d_Ax (double **A, double *x, double *y, int rows, int cols)
 Compute the matrix - vector product
of matrix A and vector x. More...
 
void G_math_f_Ax (float **A, float *x, float *y, int rows, int cols)
 Compute the matrix - vector product
of matrix A and vector x. More...
 
void G_math_d_x_dyad_y (double *x, double *y, double **A, int rows, int cols)
 Compute the dyadic product of two vectors. The result is stored in the matrix A. More...
 
void G_math_f_x_dyad_y (float *x, float *y, float **A, int rows, int cols)
 Compute the dyadic product of two vectors. The result is stored in the matrix A. More...
 
void G_math_d_aAx_by (double **A, double *x, double *y, double a, double b, double *z, int rows, int cols)
 Compute the scaled matrix - vector product
of matrix double **A and vector x and y. More...
 
void G_math_f_aAx_by (float **A, float *x, float *y, float a, float b, float *z, int rows, int cols)
 Compute the scaled matrix - vector product
of matrix A and vectors x and y. More...
 
int G_math_d_A_T (double **A, int rows)
 Compute the transposition of matrix A. Matrix A will be overwritten. More...
 
int G_math_f_A_T (float **A, int rows)
 Compute the transposition of matrix A. Matrix A will be overwritten. More...
 

Macro Definition Documentation

◆ EPSILON

#define EPSILON   0.00000000000000001

MODULE: Grass numerical math interface AUTHOR(S): Soeren Gebbert, Berlin (GER) Dec 2006 soerengebbert <at> googlemail <dot> com

PURPOSE: grass blas implementation part of the gmath library

COPYRIGHT: (C) 2010 by the GRASS Development Team

          This program is free software under the GNU General Public
          License (>=v2). Read the file COPYING that comes with GRASS
          for details.

Definition at line 27 of file blas_level_2.c.

Function Documentation

◆ G_math_d_A_T()

int G_math_d_A_T ( double **  A,
int  rows 
)

Compute the transposition of matrix A. Matrix A will be overwritten.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

Returns 0.

Parameters
A(double **)
rows(int)
Returns
int

Definition at line 339 of file blas_level_2.c.

References A, and tmp.

◆ G_math_d_aAx_by()

void G_math_d_aAx_by ( double **  A,
double *  x,
double *  y,
double  a,
double  b,
double *  z,
int  rows,
int  cols 
)

Compute the scaled matrix - vector product
of matrix double **A and vector x and y.

z = a * A * x + b * y

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

Parameters
A(double **)
x(double *)
y(double *)
a(double)
b(double)
z(double *)
rows(int)
cols(int)
Returns
(void)

Definition at line 179 of file blas_level_2.c.

References A, a, b, tmp, and x.

◆ G_math_d_Ax()

void G_math_d_Ax ( double **  A,
double *  x,
double *  y,
int  rows,
int  cols 
)

Compute the matrix - vector product
of matrix A and vector x.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

y = A * x

Parameters
A(double ** )
x(double *)
y(double *)
rows(int)
cols(int)
Returns
(void)

Definition at line 47 of file blas_level_2.c.

References A, tmp, and x.

Referenced by N_les_integrate_dirichlet_2d(), N_les_integrate_dirichlet_3d(), solver_bicgstab(), solver_cg(), and solver_pcg().

◆ G_math_d_x_dyad_y()

void G_math_d_x_dyad_y ( double *  x,
double *  y,
double **  A,
int  rows,
int  cols 
)

Compute the dyadic product of two vectors. The result is stored in the matrix A.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

A = x * y^T

Parameters
x(double *)
y(double *)
A(float **) – matrix of size rows*cols
rows(int) – length of vector x
cols(int) – lengt of vector y
Returns
(void)

Definition at line 115 of file blas_level_2.c.

References A, and x.

◆ G_math_f_A_T()

int G_math_f_A_T ( float **  A,
int  rows 
)

Compute the transposition of matrix A. Matrix A will be overwritten.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

Returns 0.

Parameters
A(float **)
rows(int)
Returns
int

Definition at line 372 of file blas_level_2.c.

References A, and tmp.

◆ G_math_f_aAx_by()

void G_math_f_aAx_by ( float **  A,
float *  x,
float *  y,
float  a,
float  b,
float *  z,
int  rows,
int  cols 
)

Compute the scaled matrix - vector product
of matrix A and vectors x and y.

z = a * A * x + b * y

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

Parameters
A(float **)
x(float *)
y(float *)
a(float)
b(float)
z(float *)
rows(int)
cols(int)
Returns
(void)

Definition at line 261 of file blas_level_2.c.

References A, a, b, tmp, and x.

◆ G_math_f_Ax()

void G_math_f_Ax ( float **  A,
float *  x,
float *  y,
int  rows,
int  cols 
)

Compute the matrix - vector product
of matrix A and vector x.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

y = A * x

Parameters
A(float ** )
x(float *)
y(float *)
rows(int)
cols(int)
Returns
(void)

Definition at line 81 of file blas_level_2.c.

References A, tmp, and x.

◆ G_math_f_x_dyad_y()

void G_math_f_x_dyad_y ( float *  x,
float *  y,
float **  A,
int  rows,
int  cols 
)

Compute the dyadic product of two vectors. The result is stored in the matrix A.

This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

A = x * y^T

Parameters
x(float *)
y(float *)
A(float **= – matrix of size rows*cols
rows(int) – length of vector x
cols(int) – lengt of vector y
Returns
(void)

Definition at line 145 of file blas_level_2.c.

References A, and x.