1 # ifndef CPPAD_LOCAL_OPTIMIZE_HASH_CODE_HPP
2 # define CPPAD_LOCAL_OPTIMIZE_HASH_CODE_HPP
21 namespace CppAD {
namespace local {
namespace optimize {
49 size_t sum = size_t(op);
50 for(
size_t i = 0; i < num_arg; i++)
51 sum +=
size_t(arg[i]);
CPPAD_TAPE_ADDR_TYPE addr_t
size_t optimize_hash_code(OpCode op, size_t num_arg, const addr_t *arg)
Specialized hash code for a CppAD operator and its arguments (used during optimization).
OpCode
Type used to distinguish different AD< Base > atomic operations.
#define CPPAD_ASSERT_UNKNOWN(exp)
Check that exp is true, if not terminate execution.
#define CPPAD_HASH_TABLE_SIZE
the codes retruned by hash_code are between zero and CPPAD_HASH_TABLE_SIZE minus one.