1 #ifndef TEMPLATE_H
2 #define TEMPLATE_H
3 
4 /* concatenation */
5 #define _cat2(x, y)    x ## _ ## y
6 #define _cat3(x, y, z) x ## _ ## y ## _ ## z
7 
8 /* 1- and 2-argument function templates */
9 #define _t1(function, arg)        _cat2(function, arg)
10 #define _t2(function, type, dims) _cat3(function, type, dims)
11 
12 #endif
13