$search

nl_private.h File Reference

#include <NL/nl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for nl_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX(x, y)   (((x) > (y)) ? (x) : (y))
#define MIN(x, y)   (((x) < (y)) ? (x) : (y))
#define nl_assert(x)
#define nl_assert_not_reached
#define NL_CLEAR(T, x)   memset(x, 0, sizeof(T))
#define NL_CLEAR_ARRAY(T, x, NB)   memset(x, 0, (NB)*sizeof(T))
#define nl_debug_assert(x)
#define nl_debug_range_assert(x, min_val, max_val)
#define NL_DELETE(x)   free(x); x = NULL
#define NL_DELETE_ARRAY(x)   free(x); x = NULL
#define NL_NEW(T)   (T*)(calloc(1, sizeof(T)))
#define NL_NEW_ARRAY(T, NB)   (T*)(calloc((NB),sizeof(T)))
#define nl_parano_assert(x)
#define nl_parano_range_assert(x, min_val, max_val)
#define nl_range_assert(x, min_val, max_val)
#define NL_RENEW_ARRAY(T, x, NB)   (T*)(realloc(x,(NB)*sizeof(T)))

Functions

void nl_assertion_failed (char *cond, char *file, int line)
void nl_range_assertion_failed (double x, double min_val, double max_val, char *file, int line)
void nl_should_not_have_reached (char *file, int line)
NLdouble nlCurrentTime ()
void nlError (char *function, char *message)
void nlWarning (char *function, char *message)

Define Documentation

#define MAX ( x,
 )     (((x) > (y)) ? (x) : (y))

Definition at line 111 of file nl_private.h.

#define MIN ( x,
 )     (((x) < (y)) ? (x) : (y))

Definition at line 107 of file nl_private.h.

#define nl_assert (  ) 
Value:
{                                        \
    if(!(x)) {                                                  \
        nl_assertion_failed(#x,__FILE__, __LINE__) ;          \
    }                                                           \
}

Definition at line 56 of file nl_private.h.

#define nl_assert_not_reached
Value:
{                               \
    nl_should_not_have_reached(__FILE__, __LINE__) ;          \
}

Definition at line 70 of file nl_private.h.

#define NL_CLEAR ( T,
 )     memset(x, 0, sizeof(T))

Definition at line 124 of file nl_private.h.

#define NL_CLEAR_ARRAY ( T,
x,
NB   )     memset(x, 0, (NB)*sizeof(T))

Definition at line 125 of file nl_private.h.

#define nl_debug_assert (  ) 

Definition at line 78 of file nl_private.h.

#define nl_debug_range_assert ( x,
min_val,
max_val   ) 

Definition at line 79 of file nl_private.h.

#define NL_DELETE (  )     free(x); x = NULL

Definition at line 121 of file nl_private.h.

#define NL_DELETE_ARRAY (  )     free(x); x = NULL

Definition at line 122 of file nl_private.h.

#define NL_NEW (  )     (T*)(calloc(1, sizeof(T)))

Definition at line 118 of file nl_private.h.

#define NL_NEW_ARRAY ( T,
NB   )     (T*)(calloc((NB),sizeof(T)))

Definition at line 119 of file nl_private.h.

#define nl_parano_assert (  ) 

Definition at line 86 of file nl_private.h.

#define nl_parano_range_assert ( x,
min_val,
max_val   ) 

Definition at line 87 of file nl_private.h.

#define nl_range_assert ( x,
min_val,
max_val   ) 
Value:
{                  \
    if(((x) < (min_val)) || ((x) > (max_val))) {                \
        nl_range_assertion_failed(x, min_val, max_val,        \
            __FILE__, __LINE__                                  \
        ) ;                                                     \
    }                                                           \
}

Definition at line 62 of file nl_private.h.

#define NL_RENEW_ARRAY ( T,
x,
NB   )     (T*)(realloc(x,(NB)*sizeof(T)))

Definition at line 120 of file nl_private.h.


Function Documentation

void nl_assertion_failed ( char *  cond,
char *  file,
int  line 
)

Definition at line 51 of file nl_os.c.

void nl_range_assertion_failed ( double  x,
double  min_val,
double  max_val,
char *  file,
int  line 
)

Definition at line 60 of file nl_os.c.

void nl_should_not_have_reached ( char *  file,
int  line 
)

Definition at line 71 of file nl_os.c.

NLdouble nlCurrentTime (  ) 

Definition at line 89 of file nl_os.c.

void nlError ( char *  function,
char *  message 
)

Definition at line 101 of file nl_os.c.

void nlWarning ( char *  function,
char *  message 
)

Definition at line 105 of file nl_os.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


opennl
Author(s): Benjamin Pitzer
autogenerated on Mon Mar 4 11:05:49 2013