2024-02-19 09:12 PM
The following is the code generated by X-CUBE-AI of STM32CubeIDE ,but I can't understand it.
/** Array declarations section **********************************************/
/* Array#0 */
AI_ARRAY_OBJ_DECLARE(
input_1_output_array, AI_ARRAY_FORMAT_FLOAT|AI_FMT_FLAG_IS_IO,
NULL, NULL, 4096, AI_STATIC)
/** Tensor declarations section *********************************************/
/* Tensor #0 */
AI_TENSOR_OBJ_DECLARE(
input_1_output, AI_STATIC,
0, 0x0,
AI_SHAPE_INIT(4, 1, 1, 64, 64), AI_STRIDE_INIT(4, 4, 4, 4, 256),
1, &input_1_output_array, NULL)
DER
2024-02-19 10:30 PM
Look up the definition of the Macro or Function. Use a static analysis tool or find-in-files.
2024-02-20 06:23 AM
Right-click -> Open Declaration to see the macro definition of AI_ARRAY_OBJ_DECLARE. Or hit F3 when your cursor is on it.
2024-02-20 06:39 AM
@xiewenliang wrote:I can't understand it.
DER
What, exactly, don't you understand?
The syntax is simply using Macros (#defines) with parameters.
See the section on the Preprocessor in any C reference.
Your IDE should be able to take you to the definitions of the Macros - then you can work out what it expands to.