aboutsummaryrefslogtreecommitdiffstats
path: root/test/raytracer/config.h
blob: ed5b8478cbacfc0ca6b3bcdf45d6c7c250639891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#ifdef SINGLE_PRECISION
typedef float flt;
#else
typedef double flt;
#endif

#if 0
extern void abord(void);

#define assert(cond) \
  if (!(cond)) { fprintf(stderr, "%s:%u: failed assertion\n", __FILE__, __LINE__); abort(); }

#endif

#define ASSIGN(lv,rv) memcpy(&(lv), &(rv), sizeof(rv))

void arena_init(void);
void arena_clear(void);
void * arena_alloc(int size);