What is this C syntax?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 9: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
- Labels:
-
STM32CubeAI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-19 10:30 PM
Look up the definition of the Macro or Function. Use a static analysis tool or find-in-files.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-20 6: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-20 6: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.
