Debian Codegraph @

tools/swig/test/Flat.h

raw
1 #ifndef FLAT_H
2 #define FLAT_H
3
4 // The following macro defines the prototypes for a family of
5 // functions that work with arrays with the forms
6 //
7 // void SNAMEProcess(TYPE * array, int size);
8 //
9 // for any specified type TYPE (for example: short, unsigned int, long
10 // long, etc.) with given short name SNAME (for example: short, uint,
11 // longLong, etc.). The macro is then expanded for the given
12 // TYPE/SNAME pairs. The resulting functions are for testing numpy
13 // interfaces for:
14 //
15 // * in-place arrays (arbitrary number of dimensions) with a fixed number of elements
16 //
17 #define TEST_FUNC_PROTOS(TYPE, SNAME) \
18 \
19 void SNAME ## Process(TYPE * array, int size); \
20
21 TEST_FUNC_PROTOS(signed char , schar )
22 TEST_FUNC_PROTOS(unsigned char , uchar )
23 TEST_FUNC_PROTOS(short , short )
24 TEST_FUNC_PROTOS(unsigned short , ushort )
25 TEST_FUNC_PROTOS(int , int )
26 TEST_FUNC_PROTOS(unsigned int , uint )
27 TEST_FUNC_PROTOS(long , long )
28 TEST_FUNC_PROTOS(unsigned long , ulong )
29 TEST_FUNC_PROTOS(long long , longLong )
30 TEST_FUNC_PROTOS(unsigned long long, ulongLong)
31 TEST_FUNC_PROTOS(float , float )
32 TEST_FUNC_PROTOS(double , double )
33
34 #endif