tmp
/
pip-install-ghxuqwgs
/numpy_78e94bf2b6094bf9a1f3d92042f9bf46
/tools
/swig
/test
/SuperTensor.cxx
| // The following macro defines a family of functions that work with 3D | |
| // arrays with the forms | |
| // | |
| // TYPE SNAMENorm( TYPE supertensor[2][2][2][2]); | |
| // TYPE SNAMEMax( TYPE * supertensor, int cubes, int slices, int rows, int cols); | |
| // TYPE SNAMEMin( int cubes, int slices, int rows, int cols, TYPE * supertensor); | |
| // void SNAMEScale( TYPE supertensor[3][3][3][3]); | |
| // void SNAMEFloor( TYPE * array, int cubes, int slices, int rows, int cols, TYPE floor); | |
| // void SNAMECeil( int slices, int cubes, int slices, int rows, int cols, TYPE * array, TYPE ceil); | |
| // void SNAMELUSplit(TYPE in[2][2][2][2], TYPE lower[2][2][2][2], TYPE upper[2][2][2][2]); | |
| // | |
| // for any specified type TYPE (for example: short, unsigned int, long | |
| // long, etc.) with given short name SNAME (for example: short, uint, | |
| // longLong, etc.). The macro is then expanded for the given | |
| // TYPE/SNAME pairs. The resulting functions are for testing numpy | |
| // interfaces, respectively, for: | |
| // | |
| // * 4D input arrays, hard-coded length | |
| // * 4D input arrays | |
| // * 4D input arrays, data last | |
| // * 4D in-place arrays, hard-coded lengths | |
| // * 4D in-place arrays | |
| // * 4D in-place arrays, data last | |
| // * 4D argout arrays, hard-coded length | |
| // | |
| TEST_FUNCS(signed char , schar ) | |
| TEST_FUNCS(unsigned char , uchar ) | |
| TEST_FUNCS(short , short ) | |
| TEST_FUNCS(unsigned short , ushort ) | |
| TEST_FUNCS(int , int ) | |
| TEST_FUNCS(unsigned int , uint ) | |
| TEST_FUNCS(long , long ) | |
| TEST_FUNCS(unsigned long , ulong ) | |
| TEST_FUNCS(long long , longLong ) | |
| TEST_FUNCS(unsigned long long, ulongLong) | |
| TEST_FUNCS(float , float ) | |
| TEST_FUNCS(double , double ) | |