/[escript]/trunk/escriptcore/src/ArrayOps.cpp
ViewVC logotype

Contents of /trunk/escriptcore/src/ArrayOps.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6168 - (show annotations)
Wed Apr 13 03:08:12 2016 UTC (2 years, 1 month ago) by jfenwick
File size: 1569 byte(s)
Making Lazy and the rest of escript use the same operator enumeration


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
18 #include "ArrayOps.h"
19
20 using namespace escript;
21
22 namespace escript
23 {
24
25 bool supports_cplx(escript::ES_optype operation)
26 {
27 switch (operation)
28 {
29 case NEG:
30 case SIN:
31 case COS:
32 case TAN:
33 case ASIN:
34 case ACOS:
35 case ATAN:
36 case SINH:
37 case COSH:
38 case TANH: return true;
39 case ERF: return false;
40 case ASINH:
41 case ACOSH:
42 case ATANH:
43 case LOG10:
44 case LOG: return true;
45 case SIGN: return false;
46 case ABS:
47 case EXP:
48 case SQRT: return true;
49 case EZ:
50 case NEZ:return true;
51 case GZ:
52 case GEZ:
53 case LZ:
54 case LEZ: return false;
55 case CONJ: return true;
56 case REAL: return true;
57 case IMAG: return true;
58 case RECIP: return true;
59 default:
60 return false; // let's be conservative
61 }
62 }
63
64 bool always_real(escript::ES_optype operation)
65 {
66 return ((operation==REAL) || (operation==IMAG) || (operation==EZ) || (operation==NEZ) || (operation==ABS));
67 }
68
69
70 }

  ViewVC Help
Powered by ViewVC 1.1.26