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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6513 - (show annotations)
Fri Mar 3 03:04:03 2017 UTC (9 months, 2 weeks ago) by jfenwick
File MIME type: text/plain
File size: 2590 byte(s)
Add information for the promote operation
Operation not implemented yet


1
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 LESS_EQUAL=GREATER_EQUAL+1,
81 PHS=LESS_EQUAL+1, // phase
82 PROM=PHS+1 // promote real to complex
83 };
84
85 const std::string&
86 opToString(ES_optype op);
87
88 enum ES_opgroup
89 {
90 G_UNKNOWN,
91 G_IDENTITY,
92 G_BINARY, // pointwise operations with two arguments
93 G_UNARY, // pointwise operations with one argument
94 G_UNARY_P, // pointwise operations with one argument, requiring a parameter
95 G_UNARY_R, // pointwise operations with one argument, always real output
96 G_NP1OUT, // non-pointwise op with one output
97 G_NP1OUT_P, // non-pointwise op with one output requiring a parameter
98 G_TENSORPROD, // general tensor product
99 G_NP1OUT_2P, // non-pointwise op with one output requiring two params
100 G_REDUCTION, // non-pointwise unary op with a scalar output
101 G_CONDEVAL,
102 G_UNARY_C // pointwise operations with one argument, always cplx output
103 };
104
105
106
107 ES_opgroup
108 getOpgroup(ES_optype op);
109 }
110
111 #endif

  ViewVC Help
Powered by ViewVC 1.1.26