escript  Revision_
Namespaces | Functions
PasoUtil.h File Reference
#include "Paso.h"

Go to the source code of this file.

Namespaces

namespace  paso
namespace  paso::util

Functions

void paso::util::applyGivensRotations (dim_t n, double *v, const double *c, const double *s)
index_t paso::util::arg_max (dim_t N, dim_t *lambda)
 returns the index to the largest entry in lambda
int paso::util::comparIndex (const void *index1, const void *index2)
 this int-comparison function is used by qsort/bsearch in various places
index_t paso::util::cumsum (dim_t N, index_t *array)
 calculates the cumulative sum in array and returns the total sum
index_t paso::util::cumsum_maskedTrue (dim_t N, index_t *array, int *mask)
index_t paso::util::cumsum_maskedFalse (dim_t N, index_t *array, int *mask)
index_t paso::util::iMax (dim_t N, const index_t *array)
 returns the maximum value in integer array
double paso::util::innerProduct (dim_t N, const double *x, const double *y, Esys_MPIInfo *mpiinfo)
 returns the inner product of global arrays x and y
bool paso::util::isAny (dim_t N, index_t *array, index_t value)
 returns true if array contains value
double paso::util::l2 (dim_t N, const double *x, Esys_MPIInfo *mpiinfo)
 returns the global L2 norm of x
void paso::util::linearCombination (dim_t n, double *z, double a, const double *x, double b, const double *y)
double paso::util::lsup (dim_t N, const double *x, Esys_MPIInfo *mpiinfo)
 returns the global Lsup of x
dim_t paso::util::numPositives (dim_t N, const double *x)
 returns the number of positive values in x
void paso::util::update (dim_t n, double a, double *x, double b, const double *y)
void paso::util::zeroes (dim_t N, double *x)
 fills array x with zeroes
void paso::util::copy (dim_t N, double *out, const double *in)
 out = in
void paso::util::scale (dim_t N, double *x, double a)
 x = a*x
void paso::util::AXPY (dim_t N, double *x, double a, const double *y)
 x = x+a*y
bool paso::util::samesign (double a, double b)
 returns true if both arguments have the same sign, false otherwise