00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef INC_PASO_UTIL
00016 #define INC_PASO_UTIL
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "Common.h"
00030 #include "Paso_MPI.h"
00031 #ifdef _OPENMP
00032 #include <omp.h>
00033 #endif
00034
00035
00036
00037 index_t Paso_Util_cumsum(dim_t,index_t*);
00038 bool_t Paso_Util_isAny(dim_t N,index_t* array,index_t value);
00039 void Paso_zeroes(const dim_t n, double* x);
00040 void Paso_Update(const dim_t n, const double a, double* x, const double b, const double* y);
00041 void Paso_LinearCombination(const dim_t n, double*z, const double a,const double* x, const double b, const double* y);
00042 double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Paso_MPIInfo* mpiinfo);
00043 double Paso_l2(const dim_t n, const double* x, Paso_MPIInfo* mpiinfo);
00044 void ApplyGivensRotations(const dim_t n,double* v,const double* c,const double* s);
00045 void Paso_Copy(const dim_t n, double* out, const double* in);
00046 bool_t Paso_fileExists( const char* filename );
00047 double Paso_lsup(const dim_t n, const double* x, Paso_MPIInfo* mpiinfo);
00048
00049 #define Paso_copyShortDouble(n, source, target) memcpy(target,source,sizeof(double)*(size_t)n)
00050
00051 #endif