{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "5f3fed9f21a57390cc7f00f77a37db8f5f110cb8",
    "tool": "doxyref",
    "version": "1.17.0"
  },
  "language": "c",
  "modules": [
    {
      "description": "",
      "name": "SVDF Functions",
      "path": "heliaCORE.SVDF",
      "submodules": [],
      "summary": "",
      "symbols": [
        {
          "description": "Stateful singular value decomposition filter.",
          "examples": [],
          "id": "arm_svdf_f32",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f32",
          "params": [
            {
              "description": "Unused by this function. Reserved for future use; may be NULL.",
              "direction": "in",
              "name": "ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "Mandatory, not optional: a NULL input_ctx, or a NULL input_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, feature batch). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f32_input_ctx_get_buffer_size(input_dims, weights_feature_dims): input_dims->n * weights_feature_dims->n * sizeof(float32_t) bytes. Setting input_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.",
              "direction": "inout",
              "name": "input_ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "Mandatory, not optional: a NULL output_ctx, or a NULL output_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, output unit). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f32_output_ctx_get_buffer_size(svdf_params, input_dims, weights_feature_dims): input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float32_t) bytes, truncating division. Setting output_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.",
              "direction": "inout",
              "name": "output_ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "SVDF operator parameters.",
              "direction": "in",
              "name": "svdf_params",
              "type": "const cmsis_nn_svdf_params_f32 *"
            },
            {
              "description": "Input tensor dimensions.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the input tensor data.",
              "direction": "in",
              "name": "input_data",
              "type": "const float32_t *"
            },
            {
              "description": "State tensor dimensions.",
              "direction": "in",
              "name": "state_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the mutable state tensor.",
              "direction": "inout",
              "name": "state_data",
              "type": "float32_t *"
            },
            {
              "description": "Feature-weight tensor dimensions.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the feature-weight tensor.",
              "direction": "in",
              "name": "weights_feature_data",
              "type": "const float32_t *"
            },
            {
              "description": "Time-weight tensor dimensions.",
              "direction": "in",
              "name": "weights_time_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the time-weight tensor.",
              "direction": "in",
              "name": "weights_time_data",
              "type": "const float32_t *"
            },
            {
              "description": "Bias tensor dimensions.",
              "direction": "in",
              "name": "bias_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Optional bias tensor data.",
              "direction": "in",
              "name": "bias_data",
              "type": "const float32_t *"
            },
            {
              "description": "Output tensor dimensions.",
              "direction": "in",
              "name": "output_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the output tensor data.",
              "direction": "out",
              "name": "output_data",
              "type": "float32_t *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_svdf_f32(\n    const cmsis_nn_context *ctx,\n    const cmsis_nn_context *input_ctx,\n    const cmsis_nn_context *output_ctx,\n    const cmsis_nn_svdf_params_f32 *svdf_params,\n    const cmsis_nn_dims *input_dims,\n    const float32_t *input_data,\n    const cmsis_nn_dims *state_dims,\n    float32_t *state_data,\n    const cmsis_nn_dims *weights_feature_dims,\n    const float32_t *weights_feature_data,\n    const cmsis_nn_dims *weights_time_dims,\n    const float32_t *weights_time_data,\n    const cmsis_nn_dims *bias_dims,\n    const float32_t *bias_data,\n    const cmsis_nn_dims *output_dims,\n    float32_t *output_data\n)",
          "source": {
            "line": 1694,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1694"
          },
          "summary": "Stateful singular value decomposition filter."
        },
        {
          "description": "Get size of the input_ctx staging buffer required by `arm_svdf_f32()`.\n\n:::note\nThis query reports an out-of-range shape as -1, following the SVDF family (`arm_svdf_s8_get_buffer_size()`). That differs from the float convolution and fully-connected queries in this header, which report an out-of-range size as 0. The reason is that `arm_svdf_f32()` reads ctx->size, and size == 0 is the opt-out signal for its scratch-size check: a 0-on-overflow answer fed straight back as `buf = alloc(0), size = 0` would silently disable the check over a zero-byte allocation, whereas alloc((size_t)-1) fails and the NULL check catches it.\n\n:::\n\n:::note\n0 is still a valid *return* for a degenerate shape (input_dims->n == 0). Unlike the general rule in README.md, a 0 here does NOT mean you may pass { NULL, 0 }: `arm_svdf_f32()` rejects a NULL input_ctx->buf with ARM_CMSIS_NN_ARG_ERROR regardless of the size. Allocate a non-NULL pointer, or do not call the kernel for a shape that produces no output.\n\n:::",
          "examples": [],
          "id": "arm_svdf_f32_input_ctx_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f32_input_ctx_get_buffer_size",
          "params": [
            {
              "description": "Input tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Feature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: input_dims->n * weights_feature_dims->n * sizeof(float32_t). Returns -1 if either pointer is NULL, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t. The figure and the validation are the same on every build target, since `arm_svdf_f32()` stages this buffer on every build rather than only under MVE."
            }
          ],
          "signature": "int32_t arm_svdf_f32_input_ctx_get_buffer_size(\n    const cmsis_nn_dims *input_dims,\n    const cmsis_nn_dims *weights_feature_dims\n)",
          "source": {
            "line": 1734,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1734"
          },
          "summary": "Get size of the inputctx staging buffer required by armsvdff32()."
        },
        {
          "description": "Get size of the output_ctx staging buffer required by `arm_svdf_f32()`.\n\n:::note\nSame -1 and degenerate-0 contract as `arm_svdf_f32_input_ctx_get_buffer_size()`, including that a 0 does not license passing { NULL, 0 }.\n\n:::",
          "examples": [],
          "id": "arm_svdf_f32_output_ctx_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f32_output_ctx_get_buffer_size",
          "params": [
            {
              "description": "SVDF operator parameters; only svdf_params->rank is read.",
              "direction": "in",
              "name": "svdf_params",
              "type": "const cmsis_nn_svdf_params_f32 *"
            },
            {
              "description": "Input tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Feature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f32()`.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float32_t), truncating division to match the kernel's own unit count. Returns -1 if any pointer is NULL, if svdf_params->rank is zero or negative, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t."
            }
          ],
          "signature": "int32_t arm_svdf_f32_output_ctx_get_buffer_size(\n    const cmsis_nn_svdf_params_f32 *svdf_params,\n    const cmsis_nn_dims *input_dims,\n    const cmsis_nn_dims *weights_feature_dims\n)",
          "source": {
            "line": 1754,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1754"
          },
          "summary": "Get size of the outputctx staging buffer required by armsvdff32()."
        },
        {
          "description": "Stateful singular value decomposition filter, float16 variant.\n\n:::note\nSizing an f16 layer with the `arm_svdf_f32()` queries over-allocates and is safe. Sizing an f32 layer with the `arm_svdf_f16()` queries under-allocates by half: `arm_svdf_f32()` returns ARM_CMSIS_NN_ARG_ERROR if ctx->size carries that undersized figure, but corrupts memory if ctx->size is left at 0, which opts out of the check.\n\n:::\n\n:::note\nNaN propagates through the activation clamps that take the bit-classified scalar clamp of #380, at every optimization level on the gated toolchains, including the shipped -Ofast: the input-activation clamp is that scalar clamp on EVERY build, and the output-activation clamp is on non-MVE builds. On MVE builds the output-activation clamp is vmaxnmq/vminnmq with no NaN restore, so a NaN resolves to a clamp bound there instead.\n\n:::",
          "examples": [],
          "id": "arm_svdf_f16",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f16",
          "params": [
            {
              "description": "Unused by this function. Reserved for future use; may be NULL.",
              "direction": "in",
              "name": "ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "Mandatory, not optional: a NULL input_ctx, or a NULL input_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, feature batch). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f16_input_ctx_get_buffer_size(input_dims, weights_feature_dims): input_dims->n * weights_feature_dims->n * sizeof(float16_t) bytes. Note this is float16_t, half the `arm_svdf_f32()` figure for the same shape. Setting input_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.",
              "direction": "inout",
              "name": "input_ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "Mandatory, not optional: a NULL output_ctx, or a NULL output_ctx->buf, is diagnosed with ARM_CMSIS_NN_ARG_ERROR on every build. Staging buffer written by this function, holding one element per (input batch, output unit). Written before it is read, so its contents on entry do not matter, but it is written on EVERY build, not only under MVE. Sized by arm_svdf_f16_output_ctx_get_buffer_size(svdf_params, input_dims, weights_feature_dims): input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float16_t) bytes, truncating division. Note this is float16_t, half the `arm_svdf_f32()` figure for the same shape. Setting output_ctx->size lets this function reject an undersized buffer with ARM_CMSIS_NN_ARG_ERROR; leaving it at zero opts out of that check. The caller is expected to clear the buffer, if applicable, for security reasons.",
              "direction": "inout",
              "name": "output_ctx",
              "type": "const cmsis_nn_context *"
            },
            {
              "description": "SVDF operator parameters.",
              "direction": "in",
              "name": "svdf_params",
              "type": "const cmsis_nn_svdf_params_f16 *"
            },
            {
              "description": "Input tensor dimensions.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the input tensor data.",
              "direction": "in",
              "name": "input_data",
              "type": "const float16_t *"
            },
            {
              "description": "State tensor dimensions.",
              "direction": "in",
              "name": "state_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the mutable state tensor.",
              "direction": "inout",
              "name": "state_data",
              "type": "float16_t *"
            },
            {
              "description": "Feature-weight tensor dimensions.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the feature-weight tensor.",
              "direction": "in",
              "name": "weights_feature_data",
              "type": "const float16_t *"
            },
            {
              "description": "Time-weight tensor dimensions.",
              "direction": "in",
              "name": "weights_time_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the time-weight tensor.",
              "direction": "in",
              "name": "weights_time_data",
              "type": "const float16_t *"
            },
            {
              "description": "Bias tensor dimensions.",
              "direction": "in",
              "name": "bias_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Optional bias tensor data.",
              "direction": "in",
              "name": "bias_data",
              "type": "const float16_t *"
            },
            {
              "description": "Output tensor dimensions.",
              "direction": "in",
              "name": "output_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Pointer to the output tensor data.",
              "direction": "out",
              "name": "output_data",
              "type": "float16_t *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_svdf_f16(\n    const cmsis_nn_context *ctx,\n    const cmsis_nn_context *input_ctx,\n    const cmsis_nn_context *output_ctx,\n    const cmsis_nn_svdf_params_f16 *svdf_params,\n    const cmsis_nn_dims *input_dims,\n    const float16_t *input_data,\n    const cmsis_nn_dims *state_dims,\n    float16_t *state_data,\n    const cmsis_nn_dims *weights_feature_dims,\n    const float16_t *weights_feature_data,\n    const cmsis_nn_dims *weights_time_dims,\n    const float16_t *weights_time_data,\n    const cmsis_nn_dims *bias_dims,\n    const float16_t *bias_data,\n    const cmsis_nn_dims *output_dims,\n    float16_t *output_data\n)",
          "source": {
            "line": 3479,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3479"
          },
          "summary": "Stateful singular value decomposition filter, float16 variant."
        },
        {
          "description": "Get size of the input_ctx staging buffer required by `arm_svdf_f16()`.\n\n:::note\n`arm_svdf_f16()` stages float16_t, so this is HALF the byte count `arm_svdf_f32_input_ctx_get_buffer_size()` returns for the same shape. Sizing an f16 layer with the f32 query over-allocates and is safe; sizing an f32 layer with this one under-allocates by half.\n\n:::\n\n:::note\nThis query reports an out-of-range shape as -1, following the SVDF family (`arm_svdf_s8_get_buffer_size()`), not the 0 used by the float convolution and fully-connected queries in this header. The reason is that `arm_svdf_f16()` reads ctx->size, and size == 0 is the opt-out signal for its scratch-size check: a 0-on-overflow answer fed straight back as `buf = alloc(0), size = 0` would silently disable the check over a zero-byte allocation, whereas alloc((size_t)-1) fails and the NULL check catches it.\n\n:::\n\n:::note\n0 is still a valid *return* for a degenerate shape (input_dims->n == 0). Unlike the general rule in README.md, a 0 here does NOT mean you may pass { NULL, 0 }: `arm_svdf_f16()` rejects a NULL input_ctx->buf with ARM_CMSIS_NN_ARG_ERROR regardless of the size.\n\n:::",
          "examples": [],
          "id": "arm_svdf_f16_input_ctx_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f16_input_ctx_get_buffer_size",
          "params": [
            {
              "description": "Input tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Feature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: input_dims->n * weights_feature_dims->n * sizeof(float16_t). Returns -1 if either pointer is NULL, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t. The figure and the validation are the same on every build target, since `arm_svdf_f16()` stages this buffer on every build rather than only under MVE."
            }
          ],
          "signature": "int32_t arm_svdf_f16_input_ctx_get_buffer_size(\n    const cmsis_nn_dims *input_dims,\n    const cmsis_nn_dims *weights_feature_dims\n)",
          "source": {
            "line": 3521,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3521"
          },
          "summary": "Get size of the inputctx staging buffer required by armsvdff16()."
        },
        {
          "description": "Get size of the output_ctx staging buffer required by `arm_svdf_f16()`.\n\n:::note\n`arm_svdf_f16()` stages float16_t, so this is HALF the byte count `arm_svdf_f32_output_ctx_get_buffer_size()` returns for the same shape.\n\n:::\n\n:::note\nSame -1 and degenerate-0 contract as `arm_svdf_f16_input_ctx_get_buffer_size()`, including that a 0 does not license passing { NULL, 0 }. A rank greater than weights_feature_dims->n truncates the unit count to 0 and so returns 0.\n\n:::",
          "examples": [],
          "id": "arm_svdf_f16_output_ctx_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_svdf_f16_output_ctx_get_buffer_size",
          "params": [
            {
              "description": "SVDF operator parameters; only svdf_params->rank is read.",
              "direction": "in",
              "name": "svdf_params",
              "type": "const cmsis_nn_svdf_params_f16 *"
            },
            {
              "description": "Input tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.",
              "direction": "in",
              "name": "input_dims",
              "type": "const cmsis_nn_dims *"
            },
            {
              "description": "Feature-weight tensor dimensions, i.e. the same `cmsis_nn_dims` passed to `arm_svdf_f16()`.",
              "direction": "in",
              "name": "weights_feature_dims",
              "type": "const cmsis_nn_dims *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: input_dims->n * (weights_feature_dims->n / svdf_params->rank) * sizeof(float16_t), truncating division to match the kernel's own unit count. Returns -1 if any pointer is NULL, if svdf_params->rank is zero or negative, if input_dims->n or weights_feature_dims->n is negative, or if the product would not fit in an int32_t."
            }
          ],
          "signature": "int32_t arm_svdf_f16_output_ctx_get_buffer_size(\n    const cmsis_nn_svdf_params_f16 *svdf_params,\n    const cmsis_nn_dims *input_dims,\n    const cmsis_nn_dims *weights_feature_dims\n)",
          "source": {
            "line": 3544,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3544"
          },
          "summary": "Get size of the outputctx staging buffer required by armsvdff16()."
        }
      ]
    }
  ],
  "name": "heliaCORE"
}
