1 # ifndef CPPAD_LOCAL_GRAPH_CPP_GRAPH_OP_HPP 2 # define CPPAD_LOCAL_GRAPH_CPP_GRAPH_OP_HPP 3 /* -------------------------------------------------------------------------- 4 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-19 Bradley M. Bell 5 6 CppAD is distributed under the terms of the 7 Eclipse Public License Version 2.0. 8 9 This Source Code may also be made available under the following 10 Secondary License when the conditions for such availability set forth 11 in the Eclipse Public License, Version 2.0 are satisfied: 12 GNU General Public License, Version 2.0 or later. 13 -------------------------------------------------------------------------- */ 14 15 # include <cstddef> 16 # include <string> 17 # include <map> 18 19 # include <cppad/utility/vector.hpp> 20 # include <cppad/configure.hpp> 21 # include <cppad/core/graph/graph_op_enum.hpp> 22 23 namespace CppAD { namespace local { namespace graph { 24 /* 25 $begin cpp_graph_op$$ 26 $spell 27 vec 28 asinh 29 acosh 30 atanh 31 erf 32 erfc 33 expm 34 namespace 35 enum 36 struct 37 op 38 arg 39 CppAD 40 addr_t 41 $$ 42 43 $section C++ AD Graph Operators$$ 44 45 $head Namespace$$ 46 All of these definitions 47 are in the $code CppAD::local::graph$$ namespace. 48 49 $head CppAD::graph$$ 50 $srccode%hpp% */ 51 using namespace CppAD::graph; 52 /* %$$ 53 54 $head addr_t$$ 55 $srccode%hpp% */ 56 typedef CPPAD_TAPE_ADDR_TYPE addr_t; 57 /* %$$ 58 59 $head op_name2enum$$ 60 This is a mapping from the operator name to its enum value. 61 The name is the operator enum without the $code _operator$$ at the end. 62 $srccode%hpp% */ 63 extern std::map< std::string, graph_op_enum > op_name2enum; 64 /* %$$ 65 66 $head op_enum2fixed_n_arg$$ 67 This is the number of arguments for the operators that have 68 a fixed number of arguments and one result. 69 For other operators, this value is zero. 70 $srccode%hpp% */ 71 extern size_t op_enum2fixed_n_arg[]; 72 /* %$$ 73 74 $head op_enum2name$$ 75 This is mapping from operator enum value to its name. 76 In the $code local::graph$$ namespace: 77 $srccode%hpp% */ 78 extern const char* op_enum2name[]; 79 /* %$$ 80 81 $head set_operator_info$$ 82 This routine sets the values in 83 $code op_enum2fixed_n_arg$$, 84 $code op_enum2name$$, and 85 $code op_name2enum$$. 86 $srccode%hpp% */ 87 extern void set_operator_info(void); 88 /* %$$ 89 $end 90 */ 91 92 } } } // END_CPPAD_LOCAL_GRAPH_NAMESPACE 93 94 # endif 95