Go to the documentation of this file.
13#ifndef ML_MODULE_MACROS_H
14#define ML_MODULE_MACROS_H
33#define ML_INSTANTIATE_STANDARD_SIGNED_INT_TYPES(PASSED_CODE) \
34 PASSED_CODE(MLint8); \
35 PASSED_CODE(MLint16); \
36 PASSED_CODE(MLint32); \
42#define ML_INSTANTIATE_STANDARD_UNSIGNED_INT_TYPES(PASSED_CODE) \
43 PASSED_CODE(MLuint8); \
44 PASSED_CODE(MLuint16); \
45 PASSED_CODE(MLuint32); \
46 PASSED_CODE(MLuint64);
51#define ML_INSTANTIATE_STANDARD_INT_TYPES(PASSED_CODE) \
52 ML_INSTANTIATE_STANDARD_SIGNED_INT_TYPES(PASSED_CODE) \
53 ML_INSTANTIATE_STANDARD_UNSIGNED_INT_TYPES(PASSED_CODE)
58#define ML_INSTANTIATE_STANDARD_FLOAT_TYPES(PASSED_CODE) \
59 PASSED_CODE(MLfloat); \
60 PASSED_CODE(MLdouble);
82#define ML_INSTANTIATE_STANDARD_TYPES(PASSED_CODE) \
83 ML_INSTANTIATE_STANDARD_INT_TYPES(PASSED_CODE) \
84 ML_INSTANTIATE_STANDARD_FLOAT_TYPES(PASSED_CODE)
89#define ML_INSTANTIATE_DEFAULT_EXTENDED_TYPES(PASSED_CODE) \
90 PASSED_CODE(std::complex<MLfloat>); \
91 PASSED_CODE(std::complex<MLdouble>); \
92 PASSED_CODE(Vector2f); \
93 PASSED_CODE(Vector2d); \
94 PASSED_CODE(Vector3f); \
95 PASSED_CODE(Vector3d); \
96 PASSED_CODE(Vector6f); \
97 PASSED_CODE(Vector6d); \
98 PASSED_CODE(Matrix2f); \
99 PASSED_CODE(Matrix2d); \
100 PASSED_CODE(Matrix3f); \
101 PASSED_CODE(Matrix3d);
107#define ML_INSTANTIATE_ALL_TYPES(PASSED_CODE) \
108 ML_INSTANTIATE_STANDARD_TYPES(PASSED_CODE) \
109 ML_INSTANTIATE_DEFAULT_EXTENDED_TYPES(PASSED_CODE)
146#define ML_IMPLEMENT_ALL_CASES(CLASS_NAME, SWITCH_CODE, O_SWITCH_TYPE, INFO_STRING, DUMMY_OUT_TYPE) \
147 switch(O_SWITCH_TYPE){ \
148 case MLint8Type: SWITCH_CODE(MLint8 , MLint8 , CLASS_NAME); break; \
149 case MLuint8Type: SWITCH_CODE(MLuint8 , MLuint8 , CLASS_NAME); break; \
150 case MLint16Type: SWITCH_CODE(MLint16 , MLint16 , CLASS_NAME); break; \
151 case MLuint16Type: SWITCH_CODE(MLuint16 , MLuint16 , CLASS_NAME); break; \
152 case MLint32Type: SWITCH_CODE(MLint32 , MLint32 , CLASS_NAME); break; \
153 case MLuint32Type: SWITCH_CODE(MLuint32 , MLuint32 , CLASS_NAME); break; \
154 case MLint64Type: SWITCH_CODE(MLint64 , MLint64 , CLASS_NAME); break; \
155 case MLuint64Type: SWITCH_CODE(MLuint64 , MLuint64 , CLASS_NAME); break; \
156 case MLfloatType: SWITCH_CODE(MLfloat , MLfloat , CLASS_NAME); break; \
157 case MLdoubleType: SWITCH_CODE(MLdouble , MLdouble , CLASS_NAME); break; \
158 case MLComplexfType: SWITCH_CODE(std::complex<MLfloat> , std::complex<MLfloat> , CLASS_NAME); break; \
159 case MLComplexdType: SWITCH_CODE(std::complex<MLdouble>, std::complex<MLdouble>, CLASS_NAME); break; \
160 case MLVector2fType: SWITCH_CODE(Vector2f , Vector2f , CLASS_NAME); break; \
161 case MLVector2dType: SWITCH_CODE(Vector2d , Vector2d , CLASS_NAME); break; \
162 case MLVector3fType: SWITCH_CODE(Vector3f , Vector3f , CLASS_NAME); break; \
163 case MLVector3dType: SWITCH_CODE(Vector3d , Vector3d , CLASS_NAME); break; \
164 case MLVector6fType: SWITCH_CODE(Vector6f , Vector6f , CLASS_NAME); break; \
165 case MLVector6dType: SWITCH_CODE(Vector6d , Vector6d , CLASS_NAME); break; \
166 case MLMatrix2fType: SWITCH_CODE(Matrix2f , Matrix2f , CLASS_NAME); break; \
167 case MLMatrix2dType: SWITCH_CODE(Matrix2d , Matrix2d , CLASS_NAME); break; \
168 case MLMatrix3fType: SWITCH_CODE(Matrix3f , Matrix3f , CLASS_NAME); break; \
169 case MLMatrix3dType: SWITCH_CODE(Matrix3d , Matrix3d , CLASS_NAME); break; \
170 default: { ML_PRINT_FATAL_ERROR(INFO_STRING, ML_BAD_DATA_TYPE, "Unsupported type case."); break; \
177#define ML_IMPLEMENT_SCALAR_TYPE_CASES(CLASS_NAME, SWITCH_CODE, O_SWITCH_TYPE, INFO_STRING, DUMMY_OUT_TYPE) \
178 switch(O_SWITCH_TYPE){ \
179 case MLint8Type: SWITCH_CODE(MLint8 , MLint8 , CLASS_NAME); break; \
180 case MLuint8Type: SWITCH_CODE(MLuint8 , MLuint8 , CLASS_NAME); break; \
181 case MLint16Type: SWITCH_CODE(MLint16 , MLint16 , CLASS_NAME); break; \
182 case MLuint16Type: SWITCH_CODE(MLuint16 , MLuint16 , CLASS_NAME); break; \
183 case MLint32Type: SWITCH_CODE(MLint32 , MLint32 , CLASS_NAME); break; \
184 case MLuint32Type: SWITCH_CODE(MLuint32 , MLuint32 , CLASS_NAME); break; \
185 case MLint64Type: SWITCH_CODE(MLint64 , MLint64 , CLASS_NAME); break; \
186 case MLuint64Type: SWITCH_CODE(MLuint64 , MLuint64 , CLASS_NAME); break; \
187 case MLfloatType: SWITCH_CODE(MLfloat , MLfloat , CLASS_NAME); break; \
188 case MLdoubleType: SWITCH_CODE(MLdouble , MLdouble , CLASS_NAME); break; \
189 default: { ML_PRINT_FATAL_ERROR(INFO_STRING, ML_BAD_DATA_TYPE, "Unsupported type case."); break; \
224#define ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, SWITCH_CODE, IN_SWITCH_TYPE, INFO_STRING, OUTPUT_TYPE) \
225 switch (static_cast<int>(IN_SWITCH_TYPE)){ \
226 case MLint8Type: SWITCH_CODE(OUTPUT_TYPE, MLint8 , CLASS_NAME); break; \
227 case MLuint8Type: SWITCH_CODE(OUTPUT_TYPE, MLuint8 , CLASS_NAME); break; \
228 case MLint16Type: SWITCH_CODE(OUTPUT_TYPE, MLint16 , CLASS_NAME); break; \
229 case MLuint16Type: SWITCH_CODE(OUTPUT_TYPE, MLuint16 , CLASS_NAME); break; \
230 case MLint32Type: SWITCH_CODE(OUTPUT_TYPE, MLint32 , CLASS_NAME); break; \
231 case MLuint32Type: SWITCH_CODE(OUTPUT_TYPE, MLuint32 , CLASS_NAME); break; \
232 case MLint64Type: SWITCH_CODE(OUTPUT_TYPE, MLint64 , CLASS_NAME); break; \
233 case MLuint64Type: SWITCH_CODE(OUTPUT_TYPE, MLuint64 , CLASS_NAME); break; \
234 case MLfloatType: SWITCH_CODE(OUTPUT_TYPE, MLfloat , CLASS_NAME); break; \
235 case MLdoubleType: SWITCH_CODE(OUTPUT_TYPE, MLdouble , CLASS_NAME); break; \
236 case MLComplexfType: SWITCH_CODE(OUTPUT_TYPE, std::complex<MLfloat> , CLASS_NAME); break; \
237 case MLComplexdType: SWITCH_CODE(OUTPUT_TYPE, std::complex<MLdouble>, CLASS_NAME); break; \
238 case MLVector2fType: SWITCH_CODE(OUTPUT_TYPE, Vector2f , CLASS_NAME); break; \
239 case MLVector2dType: SWITCH_CODE(OUTPUT_TYPE, Vector2d , CLASS_NAME); break; \
240 case MLVector3fType: SWITCH_CODE(OUTPUT_TYPE, Vector3f , CLASS_NAME); break; \
241 case MLVector3dType: SWITCH_CODE(OUTPUT_TYPE, Vector3d , CLASS_NAME); break; \
242 case MLVector6fType: SWITCH_CODE(OUTPUT_TYPE, Vector6f , CLASS_NAME); break; \
243 case MLVector6dType: SWITCH_CODE(OUTPUT_TYPE, Vector6d , CLASS_NAME); break; \
244 case MLMatrix2fType: SWITCH_CODE(OUTPUT_TYPE, Matrix2f , CLASS_NAME); break; \
245 case MLMatrix2dType: SWITCH_CODE(OUTPUT_TYPE, Matrix2d , CLASS_NAME); break; \
246 case MLMatrix3fType: SWITCH_CODE(OUTPUT_TYPE, Matrix3f , CLASS_NAME); break; \
247 case MLMatrix3dType: SWITCH_CODE(OUTPUT_TYPE, Matrix3d , CLASS_NAME); break; \
250 sprintf(buf, "Type not supported, case type %d does not exist.", IN_SWITCH_TYPE); \
251 ML_PRINT_FATAL_ERROR(INFO_STRING, ML_BAD_DATA_TYPE, buf); } \
257#define ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, SWITCH_CODE, IN_SWITCH_TYPE, INFO_STRING, OUTPUT_TYPE) \
258 switch (static_cast<int>(IN_SWITCH_TYPE)){ \
259 case MLint8Type: SWITCH_CODE(OUTPUT_TYPE, MLint8 , CLASS_NAME); break; \
260 case MLuint8Type: SWITCH_CODE(OUTPUT_TYPE, MLuint8 , CLASS_NAME); break; \
261 case MLint16Type: SWITCH_CODE(OUTPUT_TYPE, MLint16 , CLASS_NAME); break; \
262 case MLuint16Type: SWITCH_CODE(OUTPUT_TYPE, MLuint16 , CLASS_NAME); break; \
263 case MLint32Type: SWITCH_CODE(OUTPUT_TYPE, MLint32 , CLASS_NAME); break; \
264 case MLuint32Type: SWITCH_CODE(OUTPUT_TYPE, MLuint32 , CLASS_NAME); break; \
265 case MLint64Type: SWITCH_CODE(OUTPUT_TYPE, MLint64 , CLASS_NAME); break; \
266 case MLuint64Type: SWITCH_CODE(OUTPUT_TYPE, MLuint64 , CLASS_NAME); break; \
267 case MLfloatType: SWITCH_CODE(OUTPUT_TYPE, MLfloat , CLASS_NAME); break; \
268 case MLdoubleType: SWITCH_CODE(OUTPUT_TYPE, MLdouble , CLASS_NAME); break; \
271 sprintf(buf, "Type not supported, case type %d does not exist.", IN_SWITCH_TYPE); \
272 ML_PRINT_FATAL_ERROR(INFO_STRING, ML_BAD_DATA_TYPE, buf); } \
276#define ML_IMPLEMENT_SCALAR_CASES_WITH_DEFAULT(CLASS_NAME, SWITCH_CODE, O_SWITCH_TYPE, DEFAULT_CODE, DUMMY_OUT_TYPE) \
277 switch (static_cast<int>(O_SWITCH_TYPE)){ \
278 case MLint8Type: { SWITCH_CODE(MLint8 , MLint8 , CLASS_NAME); } break; \
279 case MLuint8Type: { SWITCH_CODE(MLuint8 , MLuint8 , CLASS_NAME); } break; \
280 case MLint16Type: { SWITCH_CODE(MLint16 , MLint16 , CLASS_NAME); } break; \
281 case MLuint16Type: { SWITCH_CODE(MLuint16, MLuint16, CLASS_NAME); } break; \
282 case MLint32Type: { SWITCH_CODE(MLint32 , MLint32 , CLASS_NAME); } break; \
283 case MLuint32Type: { SWITCH_CODE(MLuint32, MLuint32, CLASS_NAME); } break; \
284 case MLint64Type: { SWITCH_CODE(MLint64 , MLint64 , CLASS_NAME); } break; \
285 case MLuint64Type: { SWITCH_CODE(MLuint64, MLuint64, CLASS_NAME); } break; \
286 case MLfloatType: { SWITCH_CODE(MLfloat , MLfloat , CLASS_NAME); } break; \
287 case MLdoubleType: { SWITCH_CODE(MLdouble, MLdouble, CLASS_NAME); } break; \
288 default: { DEFAULT_CODE(DUMMY_OUT_TYPE, CLASS_NAME); } \
291#define ML_IMPLEMENT_DIFFERENT_INOUT_SCALAR_CASES_WITH_DEFAULT(CLASS_NAME, SWITCH_CODE, IN_SWITCH_TYPE, DEFAULT_CODE, OUTPUT_TYPE) \
292 switch (static_cast<int>(IN_SWITCH_TYPE)){ \
293 case MLint8Type: { SWITCH_CODE(OUTPUT_TYPE, MLint8 , CLASS_NAME); } break; \
294 case MLuint8Type: { SWITCH_CODE(OUTPUT_TYPE, MLuint8 , CLASS_NAME); } break; \
295 case MLint16Type: { SWITCH_CODE(OUTPUT_TYPE, MLint16 , CLASS_NAME); } break; \
296 case MLuint16Type: { SWITCH_CODE(OUTPUT_TYPE, MLuint16, CLASS_NAME); } break; \
297 case MLint32Type: { SWITCH_CODE(OUTPUT_TYPE, MLint32 , CLASS_NAME); } break; \
298 case MLuint32Type: { SWITCH_CODE(OUTPUT_TYPE, MLuint32, CLASS_NAME); } break; \
299 case MLint64Type: { SWITCH_CODE(OUTPUT_TYPE, MLint64 , CLASS_NAME); } break; \
300 case MLuint64Type: { SWITCH_CODE(OUTPUT_TYPE, MLuint64, CLASS_NAME); } break; \
301 case MLfloatType: { SWITCH_CODE(OUTPUT_TYPE, MLfloat , CLASS_NAME); } break; \
302 case MLdoubleType: { SWITCH_CODE(OUTPUT_TYPE, MLdouble, CLASS_NAME); } break; \
303 default:{ DEFAULT_CODE(OUTPUT_TYPE, CLASS_NAME); } \
311#define ML_IMPLEMENT_INT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLint8Type: SWITCH_CODE(MLint8 , MLint8 , CLASS_NAME); break;
312#define ML_IMPLEMENT_UINT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLuint8Type: SWITCH_CODE(MLuint8 , MLuint8 , CLASS_NAME); break;
313#define ML_IMPLEMENT_INT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLint16Type: SWITCH_CODE(MLint16 , MLint16 , CLASS_NAME); break;
314#define ML_IMPLEMENT_UINT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLuint16Type: SWITCH_CODE(MLuint16 , MLuint16 , CLASS_NAME); break;
315#define ML_IMPLEMENT_INT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLint32Type: SWITCH_CODE(MLint32 , MLint32 , CLASS_NAME); break;
316#define ML_IMPLEMENT_UINT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLuint32Type: SWITCH_CODE(MLuint32 , MLuint32 , CLASS_NAME); break;
317#define ML_IMPLEMENT_INT64_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLint64Type: SWITCH_CODE(MLint64 , MLint64 , CLASS_NAME); break;
318#define ML_IMPLEMENT_UINT64_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLuint64Type: SWITCH_CODE(MLuint64 , MLuint64 , CLASS_NAME); break;
319#define ML_IMPLEMENT_FLOAT_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLfloatType: SWITCH_CODE(MLfloat , MLfloat , CLASS_NAME); break;
320#define ML_IMPLEMENT_DOUBLE_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLdoubleType: SWITCH_CODE(MLdouble , MLdouble , CLASS_NAME); break;
321#define ML_IMPLEMENT_COMPLEXF_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLComplexfType: SWITCH_CODE(std::complex<MLfloat> , std::complex<MLfloat> , CLASS_NAME); break;
322#define ML_IMPLEMENT_COMPLEXD_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLComplexdType: SWITCH_CODE(std::complex<MLdouble>, std::complex<MLdouble>, CLASS_NAME); break;
323#define ML_IMPLEMENT_VECTOR2F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector2fType: SWITCH_CODE(Vector2f , Vector2f , CLASS_NAME); break;
324#define ML_IMPLEMENT_VECTOR2D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector2dType: SWITCH_CODE(Vector2d , Vector2d , CLASS_NAME); break;
325#define ML_IMPLEMENT_VECTOR3F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector3fType: SWITCH_CODE(Vector3f , Vector3f , CLASS_NAME); break;
326#define ML_IMPLEMENT_VECTOR3D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector3dType: SWITCH_CODE(Vector3d , Vector3d , CLASS_NAME); break;
327#define ML_IMPLEMENT_VECTOR6F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector6fType: SWITCH_CODE(Vector6f , Vector6f , CLASS_NAME); break;
328#define ML_IMPLEMENT_VECTOR6D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLVector6dType: SWITCH_CODE(Vector6d , Vector6d , CLASS_NAME); break;
329#define ML_IMPLEMENT_MATRIX2F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLMatrix2fType: SWITCH_CODE(Matrix2f , Matrix2f , CLASS_NAME); break;
330#define ML_IMPLEMENT_MATRIX2D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLMatrix2dType: SWITCH_CODE(Matrix2d , Matrix2d , CLASS_NAME); break;
331#define ML_IMPLEMENT_MATRIX3F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLMatrix3fType: SWITCH_CODE(Matrix3f , Matrix3f , CLASS_NAME); break;
332#define ML_IMPLEMENT_MATRIX3D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) case MLMatrix3dType: SWITCH_CODE(Matrix3d , Matrix3d , CLASS_NAME); break;
340#define ML_IMPLEMENT_INT_CASES_WO_INT64(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)\
341 ML_IMPLEMENT_INT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
342 ML_IMPLEMENT_UINT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
343 ML_IMPLEMENT_INT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
344 ML_IMPLEMENT_UINT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
345 ML_IMPLEMENT_INT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
346 ML_IMPLEMENT_UINT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)
349#define ML_IMPLEMENT_INT_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
350 ML_IMPLEMENT_INT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
351 ML_IMPLEMENT_UINT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
352 ML_IMPLEMENT_INT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
353 ML_IMPLEMENT_UINT16_CASE(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
354 ML_IMPLEMENT_INT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
355 ML_IMPLEMENT_UINT32_CASE(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
356 ML_IMPLEMENT_INT64_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
357 ML_IMPLEMENT_UINT64_CASE(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)
360#define ML_IMPLEMENT_FLOAT_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)\
361 ML_IMPLEMENT_FLOAT_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
362 ML_IMPLEMENT_DOUBLE_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
365#define ML_IMPLEMENT_COMPLEX_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)\
366 ML_IMPLEMENT_COMPLEXF_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
367 ML_IMPLEMENT_COMPLEXD_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)
369#define ML_IMPLEMENT_VECTOR_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
370 ML_IMPLEMENT_VECTOR2F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
371 ML_IMPLEMENT_VECTOR2D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
372 ML_IMPLEMENT_VECTOR3F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
373 ML_IMPLEMENT_VECTOR3D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
374 ML_IMPLEMENT_VECTOR6F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
375 ML_IMPLEMENT_VECTOR6D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)
377#define ML_IMPLEMENT_MATRIX_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
378 ML_IMPLEMENT_MATRIX2F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
379 ML_IMPLEMENT_MATRIX2D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
380 ML_IMPLEMENT_MATRIX3F_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
381 ML_IMPLEMENT_MATRIX3D_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY)
384#define ML_IMPLEMENT_INT_FLOAT_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)\
385 ML_IMPLEMENT_INT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
386 ML_IMPLEMENT_FLOAT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)
389#define ML_IMPLEMENT_INT_FLOAT_CASES_WO_INT64(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)\
390 ML_IMPLEMENT_INT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
391 ML_IMPLEMENT_UINT8_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
392 ML_IMPLEMENT_INT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
393 ML_IMPLEMENT_UINT16_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
394 ML_IMPLEMENT_INT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
395 ML_IMPLEMENT_UINT32_CASE( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
396 ML_IMPLEMENT_FLOAT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)
399#define ML_IMPLEMENT_DEFAULT_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
400 ML_IMPLEMENT_INT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
401 ML_IMPLEMENT_FLOAT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
402 ML_IMPLEMENT_COMPLEX_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
403 ML_IMPLEMENT_VECTOR_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
404 ML_IMPLEMENT_MATRIX_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY, INFO_DUMMY, INTYPE_DUMMY) \
407#define ML_IMPLEMENT_SCALAR_CASES(CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)\
408 ML_IMPLEMENT_INT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3) \
409 ML_IMPLEMENT_FLOAT_CASES( CLASS_NAME, SWITCH_CODE, OST_DUMMY1, OST_DUMMY2, OST_DUMMY3)
414#define ML_IMPLEMENT_DEFAULT_HANDLING(CALLING_POSITION_STRING) \
416 ML_PRINT_FATAL_ERROR(CALLING_POSITION_STRING, \
418 "Type case not executed."); \
437#define _ML_TYPE_SWITCH_INTERN(DTSWITCHES, METHOD_PREFIX, METHOD_SUFFIX, DOUBLE_COLON, SWITCH_CODE, OUT_SWITCH_TYPE, CALLING_POSITION_STRING, INPTR, CLASS_NAME) \
439 void METHOD_PREFIX DOUBLE_COLON calculateOutputSubImage(SubImage *outSubImg, int outIndex, INPTR) METHOD_SUFFIX \
441 switch(OUT_SWITCH_TYPE){ \
442 DTSWITCHES(CLASS_NAME, SWITCH_CODE, OUT_SWITCH_TYPE, CALLING_POSITION_STRING, INTYPE_DUMMY) \
443 ML_IMPLEMENT_DEFAULT_HANDLING(CALLING_POSITION_STRING) \
451#define _ML_TYPE_SWITCH_C(DTSWITCHES, SWITCH_CODE, CALLING_POSITION_STRING, INPTR, CLASS_NAME) \
452 _ML_TYPE_SWITCH_INTERN(DTSWITCHES, CLASS_NAME, ML_EMPTY_PARAM, ::, SWITCH_CODE, outSubImg->getDataType(), CALLING_POSITION_STRING, INPTR, CLASS_NAME)
458#define _ML_TYPE_SWITCH_H(DTSWITCHES, SWITCH_CODE, CALLING_POSITION_STRING, INPTR) \
459 _ML_TYPE_SWITCH_INTERN(DTSWITCHES, ML_EMPTY_PARAM, override, ML_EMPTY_PARAM, SWITCH_CODE, outSubImg->getDataType(), CALLING_POSITION_STRING, INPTR, CLASS_NAME)
479#ifdef ML_CALCULATEOUTPUTSUBIMAGE_IS_CONST
480 #define _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME) \
481 static_cast<const CLASS_NAME*>(this)->calculateOutputSubImage
483 #define _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME) calculateOutputSubImage
490#define _ML_SWITCH_CODE_0(OUTDTYPE, INDTYPE, CLASS_NAME) \
492 TSubImage<OUTDTYPE> tOutSubImg(*outSubImg);\
493 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&tOutSubImg,outIndex);\
501#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_DEFAULT_TYPES_CPP", SubImage *, CLASS_NAME);
504#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_SCALAR_TYPES_CPP", SubImage *, CLASS_NAME);
508#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_WITH_CUSTOM_SWITCH_CPP", SubImage *, CLASS_NAME);
511#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_DEFAULT_TYPES", SubImage *);
514#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_SCALAR_TYPES", SubImage *);
517#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_0, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_0_WITH_CUSTOM_SWITCH", SubImage *);
524#define _ML_SWITCH_CODE_1(OUTDTYPE, INDTYPE, CLASS_NAME) \
526 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg); \
527 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[0]);\
528 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,\
534#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
535#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
536#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
541#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DEFAULT_TYPES", SubImage *inSubImgs);
542#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_SCALAR_TYPES", SubImage *inSubImgs);
543#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_1, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
551#define _ML_SWITCH_CODE_2(OUTDTYPE, INDTYPE, CLASS_NAME) \
553 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg);\
554 TSubImage<INDTYPE> typedInSubImg0(inSubImgs[0]);\
555 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[1]);\
556 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,&typedInSubImg0,&typedInSubImg1);\
561#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
562#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
563#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
568#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DEFAULT_TYPES", SubImage *inSubImgs);
569#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_SCALAR_TYPES", SubImage *inSubImgs);
570#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_2, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
578#define _ML_SWITCH_CODE_3(OUTDTYPE, INDTYPE, CLASS_NAME) \
580 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg);\
581 TSubImage<INDTYPE> typedInSubImg0(inSubImgs[0]);\
582 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[1]);\
583 TSubImage<INDTYPE> typedInSubImg2(inSubImgs[2]);\
584 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,\
585 &typedInSubImg0, &typedInSubImg1,\
591#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
592#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
593#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
598#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DEFAULT_TYPES", SubImage *inSubImgs);
599#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_SCALAR_TYPES", SubImage *inSubImgs);
600#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_3, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
608#define _ML_SWITCH_CODE_4(OUTDTYPE, INDTYPE, CLASS_NAME) \
610 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg);\
611 TSubImage<INDTYPE> typedInSubImg0(inSubImgs[0]);\
612 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[1]);\
613 TSubImage<INDTYPE> typedInSubImg2(inSubImgs[2]);\
614 TSubImage<INDTYPE> typedInSubImg3(inSubImgs[3]);\
615 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,\
616 &typedInSubImg0, &typedInSubImg1,\
617 &typedInSubImg2, &typedInSubImg3);\
622#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
623#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
624#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
629#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DEFAULT_TYPES", SubImage *inSubImgs);
630#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_SCALAR_TYPES", SubImage *inSubImgs);
631#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_4, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
639#define _ML_SWITCH_CODE_5(OUTDTYPE, INDTYPE, CLASS_NAME) \
641 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg);\
642 TSubImage<INDTYPE> typedInSubImg0(inSubImgs[0]);\
643 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[1]);\
644 TSubImage<INDTYPE> typedInSubImg2(inSubImgs[2]);\
645 TSubImage<INDTYPE> typedInSubImg3(inSubImgs[3]);\
646 TSubImage<INDTYPE> typedInSubImg4(inSubImgs[4]);\
647 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,\
648 &typedInSubImg0, &typedInSubImg1,\
649 &typedInSubImg2, &typedInSubImg3,\
655#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
656#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
657#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
662#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DEFAULT_TYPES", SubImage *inSubImgs);
663#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_SCALAR_TYPES", SubImage *inSubImgs);
664#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_5, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
672#define _ML_SWITCH_CODE_10(OUTDTYPE, INDTYPE, CLASS_NAME) \
674 TSubImage<OUTDTYPE> typedOutSubImg(*outSubImg);\
675 TSubImage<INDTYPE> typedInSubImg0(inSubImgs[0]);\
676 TSubImage<INDTYPE> typedInSubImg1(inSubImgs[1]);\
677 TSubImage<INDTYPE> typedInSubImg2(inSubImgs[2]);\
678 TSubImage<INDTYPE> typedInSubImg3(inSubImgs[3]);\
679 TSubImage<INDTYPE> typedInSubImg4(inSubImgs[4]);\
680 TSubImage<INDTYPE> typedInSubImg5(inSubImgs[5]);\
681 TSubImage<INDTYPE> typedInSubImg6(inSubImgs[6]);\
682 TSubImage<INDTYPE> typedInSubImg7(inSubImgs[7]);\
683 TSubImage<INDTYPE> typedInSubImg8(inSubImgs[8]);\
684 TSubImage<INDTYPE> typedInSubImg9(inSubImgs[9]);\
685 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&typedOutSubImg,outIndex,\
686 &typedInSubImg0, &typedInSubImg1, \
687 &typedInSubImg2, &typedInSubImg3, \
688 &typedInSubImg4, &typedInSubImg5, \
689 &typedInSubImg6, &typedInSubImg7, \
690 &typedInSubImg8, &typedInSubImg9);\
695#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
696#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
697#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
702#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DEFAULT_TYPES", SubImage *inSubImgs);
703#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_SCALAR_TYPES", SubImage *inSubImgs);
704#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_10, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
726#define _ML_SWITCH_CODE_N(OUTDTYPE, INDTYPE, CLASS_NAME) \
729 const MLssize_t numIns = static_cast<MLssize_t>(this->getNumInputImages()); \
732 TSubImage<OUTDTYPE> outSubImgT(*outSubImg); \
741 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSubImgT, outIndex, \
742 (TSubImage<INDTYPE>**)NULL); \
750 TSubImage<INDTYPE> inSubImgT(inSubImgs[0]); \
751 TSubImage<INDTYPE> *inArr = &inSubImgT; \
754 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSubImgT, outIndex, &inArr); \
760 TSubImage<INDTYPE> inSubImg0T(inSubImgs[0]); \
761 TSubImage<INDTYPE> inSubImg1T(inSubImgs[1]); \
762 TSubImage<INDTYPE> *inArr[2]; \
763 inArr[0] = &inSubImg0T; \
764 inArr[1] = &inSubImg1T; \
765 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSubImgT, outIndex, inArr); \
771 ML_PRINT_FATAL_ERROR("_ML_SWITCH_CODE_N", \
772 ML_PROGRAMMING_ERROR, \
773 "Invalid case switch detected, " \
774 "ignoring case and not processing page"); \
781 TSubImage<INDTYPE> **inArr = NULL; \
782 inArr = new TSubImage<INDTYPE>*[numIns]; \
783 bool okay = inArr != NULL; \
786 MLssize_t createdTSubs=0; \
790 for (MLssize_t c=0; okay && (c < numIns); c++){ \
791 inArr[c] = new TSubImage<INDTYPE>(inSubImgs[c]); \
792 if (inArr[c]){ createdTSubs++; } else { okay = false; } \
797 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSubImgT, outIndex, inArr); \
800 ML_PRINT_FATAL_ERROR(#CLASS_NAME, ML_NO_MEMORY, \
801 "Not calculating page."); \
806 for (MLssize_t d=0; d < createdTSubs; d++){ \
822#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DEFAULT_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DEFAULT_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
825#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_SCALAR_TYPES_CPP(CLASS_NAME) _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_SCALAR_TYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
829#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
834#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DEFAULT_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DEFAULT_TYPES", SubImage *inSubImgs);
835#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_SCALAR_TYPES(CLASS_NAME) _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_SCALAR_TYPES", SubImage *inSubImgs);
836#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE_N, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
860#define _ML_SWITCH_CODE1_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
861 { TSubImage<INDTYPE> inSIT(inSubImgs[0]); _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &inSIT); }
864#define _ML_SWITCH_CODE1_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
866 TSubImage<OUTDTYPE> outSI(*outSubImg); \
867 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
868 _ML_SWITCH_CODE1_DD_L2, \
869 inSubImgs[0].getDataType(), \
870 "_ML_SWITCH_CODE1_DD", \
875#define _ML_SWITCH_CODE1S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
877 TSubImage<OUTDTYPE> outSI(*outSubImg); \
878 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
879 _ML_SWITCH_CODE1_DD_L2, \
880 inSubImgs[0].getDataType(), \
881 "_ML_SWITCH_CODE1_DD", \
887#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
888 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE1_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
889#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
890 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE1S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
891#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
892 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE1_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
893#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
894 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE1_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
895#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
896 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE1S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
897#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
898 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE1_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_1_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
911#define _ML_SWITCH_CODE2_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
912 { TSubImage<INDTYPE> it0(inSubImgs[0]), it1(inSubImgs[1]); _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &it0, &it1); }
915#define _ML_SWITCH_CODE2_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
917 TSubImage<OUTDTYPE> outSI(*outSubImg); \
918 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
919 _ML_SWITCH_CODE2_DD_L2, \
920 inSubImgs[0].getDataType(), \
921 "_ML_SWITCH_CODE2_DD", \
926#define _ML_SWITCH_CODE2S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
928 TSubImage<OUTDTYPE> outSI(*outSubImg); \
929 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
930 _ML_SWITCH_CODE2_DD_L2, \
931 inSubImgs[0].getDataType(), \
932 "_ML_SWITCH_CODE2_DD", \
938#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
939 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE2_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
940#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
941 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE2S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
942#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
943 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE2_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
944#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
945 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE2_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
946#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
947 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE2S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
948#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
949 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE2_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_2_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
964#define _ML_SWITCH_CODE3_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
965 { TSubImage<INDTYPE> it0(inSubImgs[0]), it1(inSubImgs[1]), it2(inSubImgs[2]); \
966 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &it0, &it1, &it2); }
969#define _ML_SWITCH_CODE3_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
971 TSubImage<OUTDTYPE> outSI(*outSubImg); \
972 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
973 _ML_SWITCH_CODE3_DD_L2, \
974 inSubImgs[0].getDataType(), \
975 "_ML_SWITCH_CODE3_DD", \
980#define _ML_SWITCH_CODE3S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
982 TSubImage<OUTDTYPE> outSI(*outSubImg); \
983 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
984 _ML_SWITCH_CODE3_DD_L2, \
985 inSubImgs[0].getDataType(), \
986 "_ML_SWITCH_CODE3_DD", \
992#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
993 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE3_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
994#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
995 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE3S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
996#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
997 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE3_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
998#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
999 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE3_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
1000#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
1001 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE3S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
1002#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
1003 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE3_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_3_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
1018#define _ML_SWITCH_CODE4_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
1019 { TSubImage<INDTYPE> it0(inSubImgs[0]), it1(inSubImgs[1]), it2(inSubImgs[2]), it3(inSubImgs[3]); \
1020 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &it0, &it1, &it2, &it3); }
1023#define _ML_SWITCH_CODE4_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1025 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1026 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
1027 _ML_SWITCH_CODE4_DD_L2, \
1028 inSubImgs[0].getDataType(), \
1029 "_ML_SWITCH_CODE4_DD", \
1034#define _ML_SWITCH_CODE4S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1036 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1037 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
1038 _ML_SWITCH_CODE4_DD_L2, \
1039 inSubImgs[0].getDataType(), \
1040 "_ML_SWITCH_CODE4_DD", \
1046#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
1047 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE4_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1048#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
1049 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE4S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1050#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
1051 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE4_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
1052#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
1053 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE4_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
1054#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
1055 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE4S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
1056#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
1057 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE4_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_4_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
1073#define _ML_SWITCH_CODE5_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
1074 { TSubImage<INDTYPE> it0(inSubImgs[0]), it1(inSubImgs[1]), it2(inSubImgs[2]), it3(inSubImgs[3]), it4(inSubImgs[4]); \
1075 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &it0, &it1, &it2, &it3, &it4); }
1078#define _ML_SWITCH_CODE5_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1080 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1081 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
1082 _ML_SWITCH_CODE5_DD_L2, \
1083 inSubImgs[0].getDataType(), \
1084 "_ML_SWITCH_CODE5_DD", \
1089#define _ML_SWITCH_CODE5S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1091 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1092 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
1093 _ML_SWITCH_CODE5_DD_L2, \
1094 inSubImgs[0].getDataType(), \
1095 "_ML_SWITCH_CODE5_DD", \
1101#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
1102 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE5_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1103#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
1104 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE5S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1105#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
1106 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE5_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
1107#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
1108 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE5_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
1109#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
1110 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE5S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
1111#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
1112 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE5_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_5_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
1130#define _ML_SWITCH_CODE10_DD_L2(OUTDTYPE, INDTYPE, CLASS_NAME) \
1131 { TSubImage<INDTYPE> it0(inSubImgs[0]), it1(inSubImgs[1]), it2(inSubImgs[2]), it3(inSubImgs[3]), it4(inSubImgs[4]); \
1132 TSubImage<INDTYPE> it5(inSubImgs[5]), it6(inSubImgs[6]), it7(inSubImgs[7]), it8(inSubImgs[8]), it9(inSubImgs[9]); \
1133 _ML_CALCULATEOUTPUTCALL_HELPER(CLASS_NAME)(&outSI, outIndex, &it0, &it1, &it2, &it3, &it4, &it5, &it6, &it7, &it8, &it9); }
1136#define _ML_SWITCH_CODE10_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1138 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1139 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
1140 _ML_SWITCH_CODE10_DD_L2, \
1141 inSubImgs[0].getDataType(), \
1142 "_ML_SWITCH_CODE10_DD", \
1147#define _ML_SWITCH_CODE10S_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1149 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1150 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
1151 _ML_SWITCH_CODE10_DD_L2, \
1152 inSubImgs[0].getDataType(), \
1153 "_ML_SWITCH_CODE10_DD", \
1159#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
1160 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE10_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1161#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
1162 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE10S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1163#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
1164 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODE10_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
1165#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
1166 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODE10_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
1167#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
1168 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODE10S_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
1169#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
1170 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODE10_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_10_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);
1188#define _ML_SWITCH_CODEN_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1190 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1191 ML_IMPLEMENT_DIFFERENT_INOUT_DATATYPES_CASES(CLASS_NAME, \
1192 _ML_SWITCH_CODE_N, \
1193 inSubImgs[0].getDataType(), \
1194 "_ML_SWITCH_CODEN_DD", \
1199#define _ML_SWITCH_CODENS_DD(OUTDTYPE, INDTYPE, CLASS_NAME) \
1201 TSubImage<OUTDTYPE> outSI(*outSubImg); \
1202 ML_IMPLEMENT_DIFFERENT_SCALAR_INOUT_DATATYPES_CASES(CLASS_NAME, \
1203 _ML_SWITCH_CODE_N, \
1204 inSubImgs[0].getDataType(), \
1205 "_ML_SWITCH_CODEN_DD", \
1211#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP(CLASS_NAME) \
1212 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODEN_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_DEFAULT_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1213#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP(CLASS_NAME) \
1214 _ML_TYPE_SWITCH_C(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODENS_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_SCALAR_INOUT_DATATYPES_CPP", SubImage *inSubImgs, CLASS_NAME);
1215#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP(CLASS_NAME, DTSWITCHES) \
1216 _ML_TYPE_SWITCH_C(DTSWITCHES, _ML_SWITCH_CODEN_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH_CPP", SubImage *inSubImgs, CLASS_NAME);
1217#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_DEFAULT_INOUT_DATATYPES(CLASS_NAME) \
1218 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_DEFAULT_CASES, _ML_SWITCH_CODEN_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_DEFAULT_INOUT_DATATYPES", SubImage *inSubImgs);
1219#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_SCALAR_INOUT_DATATYPES(CLASS_NAME) \
1220 _ML_TYPE_SWITCH_H(ML_IMPLEMENT_SCALAR_CASES, _ML_SWITCH_CODENS_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_SCALAR_INOUT_DATATYPES", SubImage *inSubImgs);
1221#define ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH(CLASS_NAME, DTSWITCHES) \
1222 _ML_TYPE_SWITCH_H(DTSWITCHES, _ML_SWITCH_CODEN_DD, "ML_CALCULATEOUTPUTSUBIMAGE_NUM_INPUTS_N_DIFFERENT_INOUT_DATATYPES_WITH_CUSTOM_SWITCH", SubImage *inSubImgs);