HILA
Loading...
Searching...
No Matches
memalloc.h
1/// Memory allocator -- gives back aligned memory, if ALIGN defined
2
3#include "plumbing/defs.h"
4
5/// We'll have two prototypes, 2nd gives the file name and size for error messages
6/// preprocessor substitutes memalloc() -calls with right parameters!
7
8#if defined(VECTORIZED) || defined(AVX)
9#define ALIGNED_MEMALLOC
10#endif
11
12void *memalloc(std::size_t size);
13void *memalloc(std::size_t size, const char *filename, const unsigned line);
14
15/// d_malloc allocates memory from "device": either from cpu or from gpu,
16/// depending on the target. Free with d_free()
17void *d_malloc(std::size_t size);
18void d_free(void * dptr);
This file defines all includes for HILA.