/[escript]/branches/clazy/escriptcore/src/ES_optype.h
ViewVC logotype

Annotation of /branches/clazy/escriptcore/src/ES_optype.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6511 - (hide annotations)
Fri Mar 3 01:41:39 2017 UTC (13 months, 3 weeks ago) by jfenwick
File MIME type: text/plain
File size: 2454 byte(s)
For some experiments

1 jfenwick 6168
2     /*****************************************************************************
3     *
4     * Copyright (c) 2003-2016 by The University of Queensland
5     * http://www.uq.edu.au
6     *
7     * Primary Business: Queensland, Australia
8     * Licensed under the Apache License, version 2.0
9     * http://www.apache.org/licenses/LICENSE-2.0
10     *
11     * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14     *
15     *****************************************************************************/
16    
17     #ifndef __ESCRIPT_ESOPTYPE_H__
18     #define __ESCRIPT_ESOPTYPE_H__
19    
20     #include <string>
21    
22     namespace escript
23     {
24    
25     // For the purposes of unit testing and maintaining sanity, it is important that this enum be contiguous
26     enum ES_optype
27     {
28     UNKNOWNOP=0,
29     IDENTITY=1,
30     ADD=2,
31     SUB=3,
32     MUL=4,
33     DIV=5,
34     POW=6,
35     SIN=POW+1,
36     COS=SIN+1,
37     TAN=SIN+2,
38     ASIN=SIN+3,
39     ACOS=SIN+4,
40     ATAN=SIN+5,
41     SINH=SIN+6,
42     COSH=SIN+7,
43     TANH=SIN+8,
44     ERF=SIN+9,
45     ASINH=SIN+10,
46     ACOSH=SIN+11,
47     ATANH=SIN+12,
48     LOG10=ATANH+1,
49     LOG=LOG10+1,
50     SIGN=LOG10+2,
51     ABS=LOG10+3,
52     NEG=LOG10+4,
53     POS=LOG10+5,
54     EXP=LOG10+6,
55     SQRT=LOG10+7,
56     RECIP=LOG10+8,
57     GZ=RECIP+1,
58     LZ=GZ+1, // <0
59     GEZ=GZ+2, // >=0
60     LEZ=GZ+3, // <=0
61     NEZ=GZ+4, // >=0
62     EZ=GZ+5,
63     SYM=EZ+1,
64     NSYM=SYM+1,
65     PROD=NSYM+1,
66     TRANS=PROD+1,
67     TRACE=TRANS+1,
68     SWAP=TRACE+1,
69     MINVAL=SWAP+1,
70     MAXVAL=MINVAL+1,
71     CONDEVAL=MAXVAL+1,
72     HER=CONDEVAL+1, // hermitian
73     NHER=HER+1, // antihermitian
74     REAL=NHER+1,
75     IMAG=REAL+1,
76     CONJ=IMAG+1,
77     LESS=CONJ+1, // a<b
78     GREATER=LESS+1,
79     GREATER_EQUAL=GREATER+1,
80 jfenwick 6413 LESS_EQUAL=GREATER_EQUAL+1,
81     PHS=LESS_EQUAL+1 // phase
82 jfenwick 6168 };
83    
84     const std::string&
85     opToString(ES_optype op);
86    
87     enum ES_opgroup
88     {
89     G_UNKNOWN,
90     G_IDENTITY,
91     G_BINARY, // pointwise operations with two arguments
92     G_UNARY, // pointwise operations with one argument
93     G_UNARY_P, // pointwise operations with one argument, requiring a parameter
94     G_UNARY_R, // pointwise operations with one argument, always real output
95     G_NP1OUT, // non-pointwise op with one output
96     G_NP1OUT_P, // non-pointwise op with one output requiring a parameter
97     G_TENSORPROD, // general tensor product
98     G_NP1OUT_2P, // non-pointwise op with one output requiring two params
99     G_REDUCTION, // non-pointwise unary op with a scalar output
100     G_CONDEVAL
101     };
102    
103    
104    
105     ES_opgroup
106     getOpgroup(ES_optype op);
107     }
108    
109     #endif

  ViewVC Help
Powered by ViewVC 1.1.26