nl_private.h File Reference
#include <NL/nl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
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, |
|
|
y |
|
) |
(((x) > (y)) ? (x) : (y)) |
#define MIN |
( |
x, |
|
|
y |
|
) |
(((x) < (y)) ? (x) : (y)) |
#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))) |
Function Documentation
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 | |
|
) |
| | |
void nlError |
( |
char * |
function, |
|
|
char * |
message | |
|
) |
| | |
void nlWarning |
( |
char * |
function, |
|
|
char * |
message | |
|
) |
| | |