Newer
Older
Atkins, Charles Vernon
committed
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOSMacros.h
* This contains a set of helper macros used internally
*/
#ifndef ADIOSMACROS_H
#define ADIOSMACROS_H
// The ADIOS_FOREACH_TYPE_1ARG macro assumes the given argument is a macro which
// takes a single argument that is a type and then inserts the given MACRO for
// each of the known primitive types
//
// An example of this might be to instantiate a template function for each
// known type. For example:
//
// template<typename T> int foo() { /* some implementation of foo */ }
//
// #define instantiate_foo(T) template int foo<T>();
// ADIOS_FOREACH_TYPE_1ARG(instantiate_foo)
// #undef instantiate_foo
//
#define ADIOS_FOREACH_TYPE_1ARG(MACRO) \
MACRO(char) \
MACRO(unsigned char) \
MACRO(short) \
MACRO(unsigned short) \
MACRO(int) \
MACRO(unsigned int) \
MACRO(long int) \
MACRO(unsigned long int) \
MACRO(long long int) \
MACRO(unsigned long long int) \
MACRO(float) \
MACRO(double) \
MACRO(long double) \
MACRO(std::complex<float>) \
MACRO(std::complex<double>) \
MACRO(std::complex<long double>)
#define ADIOS_FOREACH_PRIMITIVE_TYPE_1ARG(MACRO) \
MACRO(char) \
MACRO(unsigned char) \
MACRO(short) \
MACRO(unsigned short) \
MACRO(int) \
MACRO(unsigned int) \
MACRO(long int) \
MACRO(unsigned long int) \
MACRO(long long int) \
MACRO(unsigned long long int) \
MACRO(float) \
MACRO(double) \
MACRO(long double)
#define ADIOS_FOREACH_COMPLEX_TYPE_1ARG(MACRO) \
MACRO(float) \
MACRO(double) \
MACRO(long double)
Atkins, Charles Vernon
committed
#endif // ADIOSMACROS_H