General purpose hash code for an arbitrary value.
- Template Parameters:
-
| Value | is the type of the argument being hash coded. It should be a plain old data class; i.e., the values included in the equality operator in the object and not pointed to by the object. |
- Parameters:
-
| value | the value that we are generating a hash code for. |
- Returns:
- is a hash code that is between zero and CPPAD_HASH_TABLE_SIZE - 1.
- Checked Assertions
std::numeric_limits<unsigned short>::max() == CPPAD_HASH_TABLE_SIZE - 1
sizeof(value) is even
sizeof(unsigned short) == 2
Definition at line 51 of file hash_code.hpp.
Referenced by optimize_binary_match(), optimize_unary_match(), and recorder< Base >::PutPar().