vlsvrs 1.0.0

VLSV reader with C and Python bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef TEMPLATE_H
#define TEMPLATE_H

/* concatenation */
#define _body(x)       x ## _
#define _cat2(x, y)    x ## _ ## y
#define _cat3(x, y, z) x ## _ ## y ## _ ## z

/* 1- and 2-argument function templates */
#define _t1(function, arg)        _cat2(function, arg)
#define _t2(function, type, dims) _cat3(function, type, dims)

/* 1-argument template instantiation; body must be defined in macro */
#define _tdef1(function, type, args) _cat2(function, type)args _body(function)(type)

#endif