27#define MAX_SI 0x7fffffff
32#define MIN_SI 0x80000000
38#if (defined __SUNPRO_CC || defined __clang__ || defined(_WIN32) || \
40#define STACK_NEW_ARRAY(name, T, size) T* name= tm_new_array<T> (size)
41#define STACK_DELETE_ARRAY(name) tm_delete_array (name)
43#define STACK_NEW_ARRAY(name, T, size) T name[size]
44#define STACK_DELETE_ARRAY(name)
85#define ASSERT(cond, msg) \
87 if (!(cond)) tm_throw (msg); \
93#define TM_FAILED(msg) \
103#define ASSERT(cond, msg) \
114#define TM_FAILED(msg) \
125#define ASSERT(cond, msg) \
135#define TM_FAILED(msg) \
136 { tm_failure (msg); }
223 return u.n & 0xffffffff;
239 return (
int) (
u.n ^ (
u.n >> 32));
273 return floor (x + 0.5);
int copy(int x)
Returns a copy of an integer.
int new_type_identifier()
Generates a new type identifier.
void handle_exceptions()
Function used to handle exceptions by displaying and clearing the exception message.
int hash(int i)
Hashes an integer.
double tm_round(double x)
Rounds a double to the nearest integer.
tm_ostream & operator<<(tm_ostream &out, display_control ctrl)
Output operator for display control options.
SI as_int(double x)
Converts a double to a signed integer, rounding to the nearest integer.
void tm_failure(const char *msg)
Function used to handle a TM failure by displaying an error message and exiting the program.
void tm_throw(const char *msg)
Function used to throw an exception with a specified error message.
string the_exception
Global variable used to store the current exception message.
display_control
Enumeration of display control options.
The list class represents a linked list.
unsigned long long int DN
Helper struct for type identification and initialization.
static T init_val()
Returns the initialized value of the type.
static T init
The initialized value of the type.
static int id
The type identifier.