/[escript]/branches/doubleplusgood/paso/src/PasoUtil.h
ViewVC logotype

Annotation of /branches/doubleplusgood/paso/src/PasoUtil.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4257 - (hide annotations)
Wed Feb 27 03:42:40 2013 UTC (6 years, 10 months ago) by jfenwick
File MIME type: text/plain
File size: 2504 byte(s)
Some simple experiments for c++ Finley

1 ksteube 1312
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 4154 * Copyright (c) 2003-2013 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Open Software License version 3.0
9     * http://www.opensource.org/licenses/osl-3.0.php
10     *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development since 2012 by School of Earth Sciences
13     *
14     *****************************************************************************/
15 dhawcroft 631
16 ksteube 1811
17 jgs 150 #ifndef INC_PASO_UTIL
18     #define INC_PASO_UTIL
19    
20 jfenwick 3981 /************************************************************************************/
21 jgs 150
22     /* Some utility routines: */
23    
24 jfenwick 3981 /************************************************************************************/
25 jgs 150
26     /* Copyrights by ACcESS Australia, 2003,2004,2005 */
27 jfenwick 2625 /* author: l.gross@uq.edu.au */
28 jgs 150
29 jfenwick 3981 /************************************************************************************/
30 jgs 150
31     #include "Common.h"
32 jfenwick 3259 #include "esysUtils/Esys_MPI.h"
33 gross 1639 #ifdef _OPENMP
34     #include <omp.h>
35     #endif
36 jgs 150
37 jfenwick 3981 /************************************************************************************/
38 jgs 150
39     index_t Paso_Util_cumsum(dim_t,index_t*);
40     bool_t Paso_Util_isAny(dim_t N,index_t* array,index_t value);
41 gross 1639 void Paso_zeroes(const dim_t n, double* x);
42     void Paso_Update(const dim_t n, const double a, double* x, const double b, const double* y);
43     void Paso_LinearCombination(const dim_t n, double*z, const double a,const double* x, const double b, const double* y);
44 jfenwick 3259 double Paso_InnerProduct(const dim_t n,const double* x, const double* y, Esys_MPIInfo* mpiinfo);
45     double Paso_l2(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo);
46 gross 1639 void ApplyGivensRotations(const dim_t n,double* v,const double* c,const double* s);
47     void Paso_Copy(const dim_t n, double* out, const double* in);
48 gross 1669 bool_t Paso_fileExists( const char* filename );
49 jfenwick 3259 double Paso_lsup(const dim_t n, const double* x, Esys_MPIInfo* mpiinfo);
50 gross 3283 index_t Paso_Util_cumsum_maskedTrue(dim_t N,index_t* array, bool_t* mask);
51     index_t Paso_Util_cumsum_maskedFalse(dim_t N,index_t* array, bool_t* mask);
52     index_t Paso_Util_arg_max(dim_t n, dim_t* lambda);
53 gross 3440 index_t Paso_Util_iMax(const dim_t N,const index_t* array);
54 gross 3482 dim_t Paso_Util_numPositives(const dim_t N, const double *x);
55 gross 3283
56 gross 3140 #define Paso_Scale(n, x, a) Paso_Update(n, a, x, 0, x);
57     #define Paso_AXPY(n, x, a, y) Paso_Update(n, 1., x, a, y);
58 gross 1639 #define Paso_copyShortDouble(n, source, target) memcpy(target,source,sizeof(double)*(size_t)n)
59    
60 gross 3140
61 jgs 150 #endif /* #ifndef INC_PASO_UTIL */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26