File: H5FD_inline.c

package info (click to toggle)
haskell-hdf5 1.8.15-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 872 kB
  • sloc: haskell: 2,515; ansic: 479; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <H5FDpublic.h>
#if H5_VERSION_GE(1,14,0)
#include <H5FDdevelop.h>
#endif

#include <string.h>

#define MIN(a,b) (a < b ? a : b)
#define BC_INLINE_ARRAY(name, t)                \
    void inline_ ## name (t *b, size_t n) {   \
        t a[] = name;                           \
        memcpy(b, a, MIN(n, sizeof(a)));        \
    }

BC_INLINE_ARRAY(H5FD_FLMAP_SINGLE,      H5FD_mem_t)
BC_INLINE_ARRAY(H5FD_FLMAP_DICHOTOMY,   H5FD_mem_t)
BC_INLINE_ARRAY(H5FD_FLMAP_DEFAULT,     H5FD_mem_t)