MMALIB User Guide
MMALIB_types.h
Go to the documentation of this file.
1 /******************************************************************************
2  * *
3  * module name :MMALIB *
4  * *
5  * module descripton :Matrix Multiply Accelerator Library module for C7x+MMA *
6  * *
7  * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/ *
8  * ALL RIGHTS RESERVED *
9  * *
10  ******************************************************************************/
11 
23 #ifndef COMMON_MMALIB_TYPES_H_
24 #define COMMON_MMALIB_TYPES_H_ 1
25 
26 /* This header is needed to be included in OpenCL programs which link
27  * against MMALIB, but OpenCL doesn't need the following headers */
28 #ifndef __OPENCL_VERSION__
29 #include <stdint.h>
30 #include <stdlib.h>
31 #include <inttypes.h>
32 #include <stddef.h> // for NULL
33 #include <stdio.h> // for printf
34 #endif
35 #include <c7x.h> // for streaming engine, streaming address gen.
36 
37 
38 #include "MMALIB_bufParams.h"
39 #include "TI_platforms.h"
40 
41 #if defined (__C7100__) || defined (__device__) || defined (__RESERVED__) || defined (__RESERVED__) || defined (__RESERVED__)
42 #include "c71/MMALIB_defines.h"
43 #else
44 #error invalid target
45 #endif
46 
47 #if defined (__C7100__)
48 #include "c7100/MMALIB_defines.h"
49 #include "c7100/MMALIB_types.h"
50 #endif
51 
52 #if defined (__device__)
53 #include "c7120/MMALIB_types.h"
54 #include "c7120/MMALIB_defines.h"
55 #endif
56 
57 #if defined (__RESERVED__)
58 #include "RESERVED/MMALIB_types.h"
59 #include "RESERVED/MMALIB_defines.h"
60 #endif
61 #if defined (__RESERVED__)
62 #include "RESERVED/MMALIB_types.h"
63 #include "RESERVED/MMALIB_defines.h"
64 #endif
65 #if defined (__RESERVED__)
66 #include "RESERVED/MMALIB_types.h"
67 #include "RESERVED/MMALIB_defines.h"
68 #endif
69 
73 #if !defined(MMALIB_DEBUGPRINT)
74 #define MMALIB_DEBUGPRINT 0
75 #endif
76 
77 #if (defined(_HOST_BUILD) && (MMALIB_COMPILER_VERSION < 1003999))
78 #define MMALIB_const
79 #else
80 #define MMALIB_const const
81 #endif
82 
83 #define __PRAGMA(x) _Pragma(#x)
84 #ifdef __cplusplus
85 # define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE)
86 #else
87 # define __INLINE_FUNC(x) __PRAGMA(FUNC_ALWAYS_INLINE(x))
88 #endif
89 
90 /* ---------------------------------------------------------------- */
91 /* MISRAC Rule 4.9(DEFINE.FUNC) Deviation: The following two */
92 /* function-like macros do not have equivalent function */
93 /* implementations. */
94 /* ---------------------------------------------------------------- */
95 #define MMALIB_PRINTF(fmt,...) \
96  do { \
97  fprintf(stdout, fmt, __VA_ARGS__); \
98  } while (0)
99 
100 #if MMALIB_DEBUGPRINT > 0
101 #define MMALIB_DEBUGPRINTFN(N, fmt, ...) \
102  do { \
103  if (MMALIB_DEBUGPRINT >= (N)) { \
104  fprintf(stdout, "MMALIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, \
105  __VA_ARGS__); \
106  } \
107  } while (0)
108 
109 #else // MMALIB_DEBUGPRINT == 0
110 
111 #define MMALIB_DEBUGPRINTFN(N, fmt, ...)
112 //#define MMALIB_PRINTF(fmt, ...)
113 #endif // #if MMALIB_DEBUGPRINT
114 
115 #if defined(MMALIB_MESSAGES)
116 // if enabled, display messages to the library user
117 // MMALIB_MESSAGES should only be defined when TARGET_BUILD=debug or CHECKPARAMS=1
118 #define MMALIB_MESG(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
119 #else
120 #define MMALIB_MESG(fmt, ...)
121 #endif //#if defined(MMALIB_MESSAGES)
122 
123 /* Original implementation that had the benefit of always being compiled and thus
124  receiving error checking. However, the fprintf generates a MISRA-C violation.
125 #define MMALIB_DEBUGPRINTFN(N, fmt, ...) \
126  do { \
127  if (MMALIB_DEBUGPRINT >= (N)) { \
128  fprintf(stderr, "MMALIB debug %s - %d: " fmt, __FUNCTION__, __LINE__, \
129  __VA_ARGS__); \
130  } \
131  } while (0)
132 
133 #define MMALIB_PRINTF(fmt, ...) \
134  do { \
135  fprintf(stderr, fmt, __VA_ARGS__); \
136  } while (0)
137 #endif
138  */
139 
140 
141 #define MMALIB_SOFT_MMA_RESET 0
142 
143 // switch to enable or disable static inline for MMALIB functions defined in .c files (so not many functions)
144 #define MMALIB_STATIC_INLINE static inline
145 
146 
147 #ifdef __cplusplus
148 #include <c7x_scalable.h> // for device scalability
149 
150 extern const c7x::uchar_vec MMALIB_zeroVect_uchar_vec;
151 extern const c7x::ushort_vec MMALIB_zeroVect_ushort_vec;
152 extern const c7x::uchar_vec MMALIB_vperm_data_0_63;
153 
154 extern "C" {
155 #endif /* __cplusplus */
156 
164 /* @{ */
165 
166 /*******************************************************************************
167  *
168  * TYPEDEFS
169  *
170  ******************************************************************************/
171 
172 typedef double MMALIB_D64;
173 typedef float MMALIB_F32;
174 
176 typedef enum {
191  // MMALIB_CNN_convolve_row
206  // MMALIB_CNN_convolve_col_smallNo
222  // MMALIB_CNN_deconvolve_row
232  // MMALIB_CNN_fullyConnected
237  // MMALIB_CNN_pixelShuffle_row
250  // MMALIB_CNN_tensor_convert_ixX_oxX
259  // MMALIB_LINALG_matrixMatrixMultiply
263  // MMALIB_LINALG_matrixMatrixMultiplyAccumulate
267  // MMALIB_LINALG_matrixTranspose
271  // MMALIB_LINALG_pointwiseMatrixMatrixMultiply
276 
278 
279 typedef void *MMALIB_kernelHandle;
280 
282 typedef enum {
286  MMALIB_FUNCTION_MAX = 128
288 
291 typedef enum {
296 } MMALIB_buffer_mode_e; // formerly eMMABufferMode;
297 
299 typedef enum {
301  MMALIB_HWC
303 
305 
306 /*******************************************************************************
307  *
308  * DEFINES
309  *
310  ******************************************************************************/
311 
312 #define MMALIB_PARAM_SIZE 128
313 #define MMALIB_BYTE_WIDTH __MMA_A_COLS(sizeof(int8_t))
314 #define MMALIB_MMA_ACCUMULATOR_BYTE_WIDTH_8_BIT 4
315 #define MMALIB_MMA_ACCUMULATOR_BYTE_WIDTH_16_BIT 8
316 #define MMALIB_MMA_ACCUMULATOR_BYTE_WIDTH_32_BIT 16
317 
318 
319 /*******************************************************************************
320  *
321  * Macros
322  *
323  ******************************************************************************/
324 
325 #define MMALIB_ALIGN_SHIFT_64BYTES \
326  6
327 #define MMALIB_ALIGN_SHIFT_128BYTES \
328  7
329 #define MMALIB_ALIGN_SHIFT_256BYTES \
330  8
331 
332 #define MMALIB_ALIGN_64BYTES \
333  (1 << MMALIB_ALIGN_SHIFT_64BYTES)
334 #define MMALIB_ALIGN_128BYTES \
335  (1 << MMALIB_ALIGN_SHIFT_128BYTES)
336 #define MMALIB_ALIGN_256BYTES \
337  (1 << MMALIB_ALIGN_SHIFT_256BYTES)
338 
339 #define MMALIB_L2DATA_ALIGN_SHIFT \
340  MMALIB_ALIGN_SHIFT_64BYTES
341 
344 #define MMALIB_L2DATA_ALIGNMENT (((uint32_t)1) << ((uint32_t)MMALIB_L2DATA_ALIGN_SHIFT))
345 
346 /* ---------------------------------------------------------------- */
347 /* MISRAC Rule 4.9(DEFINE.FUNC) Deviation: The advisory is not */
348 /* being addressed */
349 /* ---------------------------------------------------------------- */
350 
353 #define MMALIB_MMA_SIZE_8_BIT __MMA_A_COLS(sizeof(int8_t))
354 #define MMALIB_MMA_SIZE_16_BIT __MMA_A_COLS(sizeof(int16_t))
355 #define MMALIB_MMA_SIZE_32_BIT __MMA_A_COLS(sizeof(int32_t))
356 
357 
358 #define MMALIB_MMA_BIAS_SIZE_32_BIT __MMA_A_COLS(sizeof(int32_t))
359 #define MMALIB_MMA_BIAS_SIZE_64_BIT ((MMALIB_MMA_BIAS_SIZE_32_BIT) >> 1)
360 
361 /* @} */
362 
363 /******************************************************************************
364  *
365  * Do not document these in the User Guide
366  ******************************************************************************/
367 
371 /* @{ */
372 
373 
374 /* ---------------------------------------------------------------- */
375 /* MISRAC Rule 4.9(DEFINE.FUNC) Deviation: The advisory is not */
376 /* being addressed */
377 /* ---------------------------------------------------------------- */
378 // remove asm comments for Loki testing as they may add cycles
379  #if defined(_HOST_BUILD)
380  #define MMALIB_asm(string) ;
381  #else
382  #define MMALIB_asm(string); asm(string);
383  #endif // _HOST_BUILD
384 
385 /* ---------------------------------------------------------------- */
386 /* MISRAC Rule 4.9(DEFINE.FUNC) Deviation: The advisory is not */
387 /* being addressed so as not to lose portability across different */
388 /* platforms. */
389 /* ---------------------------------------------------------------- */
390 // cl7x unroll attributes not recognized by gcc/gpp compiler and generate
391 // warnings. Remove them with macro
392 #if defined(_HOST_BUILD)
393 #define str(x) #x
394 #define xstr(x) str(x)
395 #ifdef WIN32
396 #define __attribute__()
397 #define MMALIB_UNROLL(count)
398 #else
399 #define MMALIB_UNROLL(count) _Pragma(str(UNROLL(count)))
400 #endif
401 #else
402 #define MMALIB_UNROLL(COUNT) [[TI::unroll(COUNT)]]
403 #endif
404 
405 #if defined(_HOST_BUILD)
406 #ifdef WIN32
407 #define __attribute__()
408 #define MMALIB_MUST_ITERATE(initial, max, multiple)
409 #else
410 #define MMALIB_MUST_ITERATE(initial, max, multiple) _Pragma(str(MUST_ITERATE(initial, max, multiple)))
411 #endif
412 #else
413 #define MMALIB_MUST_ITERATE(INTIAL, MAX, MULTIPLE) [[TI::must_iterate(INTIAL, MAX, MULTIPLE)]]
414 #endif
415 
416 #ifndef MMALIB_NUMBER_RANDOM_DIM_TESTS
417 #define MMALIB_NUMBER_RANDOM_DIM_TESTS 25
418 #endif
419 
420 #define MMALIB_PERFORMANCE_TEST_PATTERN RANDOM_SIGNED
421 
422 #define MMALIB_TEST_OUTPUT_HEAP 0
423 #if defined(_HOST_BUILD)
424  // Valgrind works better when output is in the heap (it can't track statically allocated memory), so
425  // in host emulation mode, place test outputs in the heap rather than statically allocated MSMC
426  #define MMALIB_TEST_OUTPUT_MSMC MMALIB_TEST_OUTPUT_HEAP
427 #else
428  #define MMALIB_TEST_OUTPUT_MSMC 1
429 #endif
430 
431 #define STRIDE_OPT_4CYCLE 1
432 
433 /*******************************************************************************
434  *
435  * MACROS
436  *
437  ******************************************************************************/
438 
439 /* ---------------------------------------------------------------- */
440 /* MISRAC Rule 4.9(DEFINE.FUNC) Deviation: The following */
441 /* function-like macros are intended to be used across different */
442 /* data types. */
443 /* ---------------------------------------------------------------- */
444 #define MMALIB_min(x, y) \
445  (((x) < (y)) ? (x) : (y))
446 #define MMALIB_max(x, y) \
447  (((x) < (y)) ? (y) : (x))
448 #define MMALIB_ceilingDiv(x, y) \
449  (((x) + (y)-1) / \
450  (y))
453 /******************************************************************************
454  *
455  * COMMON MMA CONIFGURATIONS
456  *
457  ******************************************************************************/
458 
459  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i32s_i32s_o32s;
460 
461  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16s;
462  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i16s_i16s_o16u;
463  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16s;
464  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i16u_i16s_o16u;
465 
466  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8s;
467  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i8s_i8s_o8u;
468  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8s;
469  extern const MMALIB_MMA_CONFIG_REG configRegisterStruct_i8u_i8s_o8u;
470 
471  extern const __HWA_OFFSET_REG offsetRegStruct_zeros;
472  extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_32bit;
473  extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_16bit;
474  extern const __HWA_OFFSET_REG offsetRegStruct_diagonal_8bit;
475 
476 
477 /* @} */
480 #ifdef __cplusplus
481 }
482 #endif /* __cplusplus */
483 #endif /* COMMON_MMALIB_TYPES_H_ */
484 
485 /* ======================================================================== */
486 /* End of file: MMALIB_types.h */
487 /* ======================================================================== */
File to hold buffer parameter related info for MMALIB.
MMALIB_tensor_format_e MMALIB_tensor_format
Definition: MMALIB_types.h:304
MMALIB_STATUS_NAME
The enumeration of all status codes.
Definition: MMALIB_types.h:176
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_SUBMCHANNELS
Definition: MMALIB_types.h:197
@ MMALIB_ERR_INVALID_ACTIVATION
Definition: MMALIB_types.h:188
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:262
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_WEIGHTS_TYPE
Definition: MMALIB_types.h:214
@ MMALIB_ERR_CONVOLVE_COL_INVALID_SHIFTMETHOD
Definition: MMALIB_types.h:207
@ MMALIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE
Definition: MMALIB_types.h:272
@ MMALIB_ERR_INVALID_VALUE
Definition: MMALIB_types.h:179
@ MMALIB_ERR_CONVOLVE_COL_INVALID_BIASB_TYPE
Definition: MMALIB_types.h:212
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_ROWS_STRIDE
Definition: MMALIB_types.h:245
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_BUFFER_SIZES
Definition: MMALIB_types.h:230
@ MMALIB_ERR_TENSOR_CONVERT_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:253
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_NUM_OUTPUT_CHANNELS_PER_GROUP
Definition: MMALIB_types.h:203
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_WEIGHTS_DIMENSION
Definition: MMALIB_types.h:215
@ MMALIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_INPUT_TYPE
Definition: MMALIB_types.h:268
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_PAD
Definition: MMALIB_types.h:226
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_ROWS_STRIDE
Definition: MMALIB_types.h:199
@ MMALIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:274
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:266
@ MMALIB_ERR_NOT_EQUAL_WIDTH_STRIDE
Definition: MMALIB_types.h:184
@ MMALIB_ERR_PIXELSHUFFLE_ROW_UNSUPPORTED_STRIDE
Definition: MMALIB_types.h:239
@ MMALIB_ERROR_MAX
Definition: MMALIB_types.h:190
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_INITARGS
Definition: MMALIB_types.h:246
@ MMALIB_ERR_CONVOLVE_COL_INVALID_SHIFTVALUES
Definition: MMALIB_types.h:208
@ MMALIB_ERR_CONVOLVE_COL_INVALID_BIASBVALUES
Definition: MMALIB_types.h:211
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_SUBMCHANNELS
Definition: MMALIB_types.h:229
@ MMALIB_ERR_CONVOLVE_COL_INVALID_CASE
Definition: MMALIB_types.h:220
@ MMALIB_ERR_POINTWISE_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE
Definition: MMALIB_types.h:273
@ MMALIB_ERR_PIXELSHUFFLE_ROW_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:240
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_STRIDE
Definition: MMALIB_types.h:224
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:217
@ MMALIB_ERR_NULL_POINTER
Definition: MMALIB_types.h:182
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_INCHOFFSET_CIRCULAR
Definition: MMALIB_types.h:192
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_OUTPUT_TYPE
Definition: MMALIB_types.h:261
@ MMALIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:270
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_SUBMCHANNELS
Definition: MMALIB_types.h:243
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_OUTPUT_FEATURE_MAP_TYPE
Definition: MMALIB_types.h:216
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_STRIDE
Definition: MMALIB_types.h:218
@ MMALIB_ERR_NOT_ALIGNED_PTRS_STRIDES
Definition: MMALIB_types.h:185
@ MMALIB_ERR_MATRIX_TRANSPOSE_UNSUPPORTED_OUTPUT_TYPE
Definition: MMALIB_types.h:269
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_INPUT_TYPE
Definition: MMALIB_types.h:264
@ MMALIB_ERR_INVALID_SHIFT
Definition: MMALIB_types.h:189
@ MMALIB_ERR_INVALID_TYPE
Definition: MMALIB_types.h:180
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_VALIDCOLSIN
Definition: MMALIB_types.h:201
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_SUBMCHANNELS_STRIDE
Definition: MMALIB_types.h:196
@ MMALIB_ERR_FULLYCONNECTED_INVALID_TYPE_COMBINATION
Definition: MMALIB_types.h:233
@ MMALIB_ERR_CONVOLVE_COL_INVALID_NUMBIASVALS
Definition: MMALIB_types.h:210
@ MMALIB_ERR_FULLYCONNECTED_INVALID_TYPE_RELU_COMBINATION
Definition: MMALIB_types.h:235
@ MMALIB_ERR_NOT_ALIGNED_WIDTHS
Definition: MMALIB_types.h:186
@ MMALIB_ERR_TENSOR_CONVERT_INVALID_TYPE_COMBINATION
Definition: MMALIB_types.h:251
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_INCHOFFSET_CIRCULAR
Definition: MMALIB_types.h:238
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_INIT_ARGS
Definition: MMALIB_types.h:227
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_UNSUPPORTED_INPUT_TYPE
Definition: MMALIB_types.h:260
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_BUFFER_DIMENSION
Definition: MMALIB_types.h:244
@ MMALIB_ERR_NOT_IMPLEMENTED
Definition: MMALIB_types.h:183
@ MMALIB_ERR_TENSOR_CONVERT_UNSUPPORTED_PAD_DIMENSION
Definition: MMALIB_types.h:256
@ MMALIB_ERR_TENSOR_CONVERT_UNSUPPORTED_CONVRSION_FORMAT
Definition: MMALIB_types.h:255
@ MMALIB_ERR_BUFFER_TOO_SMALL
Definition: MMALIB_types.h:187
@ MMALIB_ERR_FULLYCONNECTED_INVALID_DIMENSION_COMBINATION
Definition: MMALIB_types.h:234
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_NUM_GROUPS_PER_KERNEL
Definition: MMALIB_types.h:202
@ MMALIB_ERR_CONVOLVE_ROW_UNSUPPORTED_STRIDE
Definition: MMALIB_types.h:193
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_UPSCALE_FACTOR
Definition: MMALIB_types.h:248
@ MMALIB_ERR_INVALID_DIMENSION
Definition: MMALIB_types.h:181
@ MMALIB_ERR_CONVOLVE_ROW_UNSUPPORTED_TYPE_COMBINATION
Definition: MMALIB_types.h:194
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_KERNEL_SIZE
Definition: MMALIB_types.h:223
@ MMALIB_ERR_TENSOR_CONVERT_UNSUPPORTED_CHANNEL_DIMENSION
Definition: MMALIB_types.h:254
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_INPUT_FEATURE_MAP_TYPE
Definition: MMALIB_types.h:213
@ MMALIB_ERR_CONVOLVE_COL_UNSUPPORTED_GROUPING
Definition: MMALIB_types.h:219
@ MMALIB_SUCCESS
Definition: MMALIB_types.h:177
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_PTR_STRIDE
Definition: MMALIB_types.h:195
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_NUM_GROUPS_PER_KERNEL_STRIDED
Definition: MMALIB_types.h:204
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_INITARGS
Definition: MMALIB_types.h:200
@ MMALIB_ERR_MATRIX_MATRIX_MULTIPLY_ACCUMULATE_UNSUPPORTED_OUTPUT_TYPE
Definition: MMALIB_types.h:265
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_PTR_STRIDE
Definition: MMALIB_types.h:241
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_VALIDCOLSIN
Definition: MMALIB_types.h:247
@ MMALIB_ERR_CONVOLVE_COL_INVALID_PAD_VALUES
Definition: MMALIB_types.h:209
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_BUFFER_DIMENSION_WEIGHTS
Definition: MMALIB_types.h:228
@ MMALIB_ERR_CONVOLVE_ROW_INVALID_BUFFER_DIMENSION
Definition: MMALIB_types.h:198
@ MMALIB_ERR_PIXELSHUFFLE_ROW_INVALID_SUBMCHANNELS_STRIDE
Definition: MMALIB_types.h:242
@ MMALIB_ERR_DECONVOLVE_ROW_INVALID_DILATION
Definition: MMALIB_types.h:225
@ MMALIB_ERR_FAILURE
Definition: MMALIB_types.h:178
@ MMALIB_ERR_TENSOR_CONVERT_INVALID_DIMENSION_COMBINATION
Definition: MMALIB_types.h:252
MMALIB_STATUS_NAME MMALIB_STATUS
Return value for MMALIB functions.
Definition: MMALIB_types.h:277
float MMALIB_F32
Single precision floating point.
Definition: MMALIB_types.h:173
MMALIB_FUNCTION_STYLE
Enumeration for the style of function implementation.
Definition: MMALIB_types.h:282
@ MMALIB_FUNCTION_MAX
Definition: MMALIB_types.h:286
@ MMALIB_FUNCTION_NATC
Definition: MMALIB_types.h:283
@ MMALIB_FUNCTION_OPTIMIZED
Definition: MMALIB_types.h:284
void * MMALIB_kernelHandle
Handle type for MMALIB operations.
Definition: MMALIB_types.h:279
MMALIB_buffer_mode_e
Buffer structure for input feature maps and coefficients of MMALIB_CNN_convolve_row_ixX_ixX_oxX.
Definition: MMALIB_types.h:291
@ MMALIB_BUF_CIRCULAR
Circular buffer for coefficients.
Definition: MMALIB_types.h:295
@ MMALIB_LINEAR
Linear buffer.
Definition: MMALIB_types.h:292
@ MMALIB_SE_CIRCULAR
Definition: MMALIB_types.h:293
double MMALIB_D64
Double precision floating point.
Definition: MMALIB_types.h:172
MMALIB_tensor_format_e
Tensor format.
Definition: MMALIB_types.h:299
@ MMALIB_HWC
Used when tensor is in NHWC format.
Definition: MMALIB_types.h:301
@ MMALIB_CHW
Used when tensor is in NCHW format.
Definition: MMALIB_types.h:300