escript  Revision_
ES_optype.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 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-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17 
18 #ifndef __ESCRIPT_ESOPTYPE_H__
19 #define __ESCRIPT_ESOPTYPE_H__
20 
21 #include "system_dep.h"
22 
23 #include <string>
24 
25 namespace escript
26 {
27 
28 // For the purposes of unit testing and maintaining sanity, it is important that this enum be contiguous
30 {
33  ADD=2,
34  SUB=3,
35  MUL=4,
36  DIV=5,
37  POW=6,
38  SIN=POW+1,
39  COS=SIN+1,
40  TAN=SIN+2,
41  ASIN=SIN+3,
42  ACOS=SIN+4,
43  ATAN=SIN+5,
44  SINH=SIN+6,
45  COSH=SIN+7,
46  TANH=SIN+8,
47  ERF=SIN+9,
48  ASINH=SIN+10,
49  ACOSH=SIN+11,
50  ATANH=SIN+12,
60  GZ=RECIP+1,
61  LZ=GZ+1, // <0
62  GEZ=GZ+2, // >=0
63  LEZ=GZ+3, // <=0
64  NEZ=GZ+4, // >=0
65  EZ=GZ+5,
66  SYM=EZ+1,
67  NSYM=SYM+1,
75  HER=CONDEVAL+1, // hermitian
76  NHER=HER+1, // antihermitian
80  LESS=CONJ+1, // a<b
84  PHS=LESS_EQUAL+1, // phase
85  PROM=PHS+1 // promote real to complex
86 };
87 
89 const std::string&
91 
93 {
96  G_BINARY, // pointwise operations with two arguments
97  G_UNARY, // pointwise operations with one argument
98  G_UNARY_P, // pointwise operations with one argument, requiring a parameter
99  G_UNARY_R, // pointwise operations with one argument, always real output
100  G_NP1OUT, // non-pointwise op with one output
101  G_NP1OUT_P, // non-pointwise op with one output requiring a parameter
102  G_TENSORPROD, // general tensor product
103  G_NP1OUT_2P, // non-pointwise op with one output requiring two params
104  G_REDUCTION, // non-pointwise unary op with a scalar output
106  G_UNARY_C, // pointwise operations with one argument, always cplx output
107  G_UNARY_PR // G_UNARY_P but always real output
108 };
109 
110 
111 
114 
115 const std::string&
117 }
118 
119 #endif
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:30
Definition: AbstractContinuousDomain.cpp:23
const std::string & groupToString(ES_opgroup g)
Definition: ES_optype.cpp:105
const std::string & opToString(ES_optype op)
Definition: ES_optype.cpp:89
ES_optype
Definition: ES_optype.h:30
@ PROD
Definition: ES_optype.h:68
@ GREATER
Definition: ES_optype.h:81
@ SYM
Definition: ES_optype.h:66
@ ABS
Definition: ES_optype.h:54
@ RECIP
Definition: ES_optype.h:59
@ POW
Definition: ES_optype.h:37
@ NEZ
Definition: ES_optype.h:64
@ LZ
Definition: ES_optype.h:61
@ LESS
Definition: ES_optype.h:80
@ LEZ
Definition: ES_optype.h:63
@ LOG10
Definition: ES_optype.h:51
@ SINH
Definition: ES_optype.h:44
@ ATANH
Definition: ES_optype.h:50
@ NSYM
Definition: ES_optype.h:67
@ REAL
Definition: ES_optype.h:77
@ PROM
Definition: ES_optype.h:85
@ GZ
Definition: ES_optype.h:60
@ EXP
Definition: ES_optype.h:57
@ TANH
Definition: ES_optype.h:46
@ MINVAL
Definition: ES_optype.h:72
@ TRANS
Definition: ES_optype.h:69
@ COSH
Definition: ES_optype.h:45
@ IMAG
Definition: ES_optype.h:78
@ ERF
Definition: ES_optype.h:47
@ SIN
Definition: ES_optype.h:38
@ MUL
Definition: ES_optype.h:35
@ LESS_EQUAL
Definition: ES_optype.h:83
@ SWAP
Definition: ES_optype.h:71
@ ASINH
Definition: ES_optype.h:48
@ POS
Definition: ES_optype.h:56
@ MAXVAL
Definition: ES_optype.h:73
@ ACOSH
Definition: ES_optype.h:49
@ UNKNOWNOP
Definition: ES_optype.h:31
@ LOG
Definition: ES_optype.h:52
@ EZ
Definition: ES_optype.h:65
@ SUB
Definition: ES_optype.h:34
@ NHER
Definition: ES_optype.h:76
@ DIV
Definition: ES_optype.h:36
@ TRACE
Definition: ES_optype.h:70
@ SIGN
Definition: ES_optype.h:53
@ TAN
Definition: ES_optype.h:40
@ PHS
Definition: ES_optype.h:84
@ ASIN
Definition: ES_optype.h:41
@ GEZ
Definition: ES_optype.h:62
@ SQRT
Definition: ES_optype.h:58
@ ADD
Definition: ES_optype.h:33
@ IDENTITY
Definition: ES_optype.h:32
@ CONJ
Definition: ES_optype.h:79
@ ACOS
Definition: ES_optype.h:42
@ ATAN
Definition: ES_optype.h:43
@ HER
Definition: ES_optype.h:75
@ COS
Definition: ES_optype.h:39
@ NEG
Definition: ES_optype.h:55
@ GREATER_EQUAL
Definition: ES_optype.h:82
@ CONDEVAL
Definition: ES_optype.h:74
ES_opgroup
Definition: ES_optype.h:93
@ G_NP1OUT_P
Definition: ES_optype.h:101
@ G_NP1OUT_2P
Definition: ES_optype.h:103
@ G_IDENTITY
Definition: ES_optype.h:95
@ G_UNARY_PR
Definition: ES_optype.h:107
@ G_UNKNOWN
Definition: ES_optype.h:94
@ G_NP1OUT
Definition: ES_optype.h:100
@ G_REDUCTION
Definition: ES_optype.h:104
@ G_UNARY
Definition: ES_optype.h:97
@ G_TENSORPROD
Definition: ES_optype.h:102
@ G_CONDEVAL
Definition: ES_optype.h:105
@ G_UNARY_C
Definition: ES_optype.h:106
@ G_UNARY_P
Definition: ES_optype.h:98
@ G_UNARY_R
Definition: ES_optype.h:99
@ G_BINARY
Definition: ES_optype.h:96
ES_opgroup getOpgroup(ES_optype op)
Definition: ES_optype.cpp:99