{
  "$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": "LSTM Layer Functions",
      "path": "heliaCORE.LSTM",
      "submodules": [],
      "summary": "",
      "symbols": [
        {
          "description": "Unidirectional LSTM inference.\n\n:::note\nOn the MVE float path a NaN cell state yields a NaN hidden state, as tanh returns NaN unchanged there (#635). With cell clipping enabled the clip removes a NaN cell state first.\n\n:::",
          "examples": [],
          "id": "arm_lstm_unidirectional_f32",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f32",
          "params": [
            {
              "description": "Pointer to the input sequence tensor.",
              "direction": "in",
              "name": "input",
              "type": "const float32_t *"
            },
            {
              "description": "Pointer to the output sequence tensor.",
              "direction": "out",
              "name": "output",
              "type": "float32_t *"
            },
            {
              "description": "LSTM parameters and weights.",
              "direction": "in",
              "name": "params",
              "type": "const cmsis_nn_lstm_params_f32 *"
            },
            {
              "description": "Mutable LSTM scratch and state buffers. temp1 and temp2 are sized by `arm_lstm_unidirectional_f32_temp1_get_buffer_size()` / `arm_lstm_unidirectional_f32_temp2_get_buffer_size()`, which report 0: the float implementation never dereferences them and both may be NULL.",
              "direction": "inout",
              "name": "buffers",
              "type": "cmsis_nn_lstm_context_f32 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_lstm_unidirectional_f32(\n    const float32_t *input,\n    float32_t *output,\n    const cmsis_nn_lstm_params_f32 *params,\n    cmsis_nn_lstm_context_f32 *buffers\n)",
          "source": {
            "line": 1781,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1781"
          },
          "summary": "Unidirectional LSTM inference."
        },
        {
          "description": "Unidirectional GRU layer for float32 input, output and state.\n\nImplements the reset-after GRU (Keras / TFLite default) when `params->reset_after` is non-zero, and the pre-reset variant otherwise. The hidden state is zero-initialised for the first time step, unless `buffers->hidden_state` is supplied for streaming state carry (`batch_size == 1`), in which case it seeds the initial state and receives the final hidden state on return.\n\n:::note\nNaN contract: a NaN in `input`, the previous hidden state, or the candidate gate's weight or bias reaches every output unit it feeds, on the scalar and MVE legs alike and at the shipped -Ofast: the MVE block re-establishes NaN after the table tanh with an integer-domain test that fast-math cannot elide (#251). A NaN confined to the update or reset gate's weight or bias does not reach the output: the scalar sigmoid maps NaN to 1.0 (see the note on arm_nn_sigmoid_scalar_f32 in `arm_nnsupportfunctions_flt.h`). NaN payloads and signs are not preserved on the MVE leg (default NaN, architectural). Inf follows the arithmetic.\n\n:::",
          "examples": [],
          "id": "arm_gru_unidirectional_f32",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_gru_unidirectional_f32",
          "params": [
            {
              "description": "Input sequence tensor. Must not overlap `output`: earlier outputs are re-read as the recurrent state for later time steps, so aliasing corrupts silently.",
              "direction": "in",
              "name": "input",
              "type": "const float32_t *"
            },
            {
              "description": "Output (hidden-state) sequence tensor.",
              "direction": "out",
              "name": "output",
              "type": "float32_t *"
            },
            {
              "description": "Struct describing the GRU operator.",
              "direction": "in",
              "name": "params",
              "type": "const cmsis_nn_gru_params_f32 *"
            },
            {
              "description": "Scratch buffers. May be NULL when `reset_after` != 0. temp1 is sized by `arm_gru_unidirectional_f32_temp1_get_buffer_size()`.",
              "direction": "inout",
              "name": "buffers",
              "type": "cmsis_nn_gru_context_f32 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "ARM_CMSIS_NN_SUCCESS on success, ARM_CMSIS_NN_ARG_ERROR otherwise."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_gru_unidirectional_f32(\n    const float32_t *input,\n    float32_t *output,\n    const cmsis_nn_gru_params_f32 *params,\n    cmsis_nn_gru_context_f32 *buffers\n)",
          "source": {
            "line": 1812,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1812"
          },
          "summary": "Unidirectional GRU layer for float32 input, output and state."
        },
        {
          "description": "Get size of the temp1 scratch buffer required by `arm_lstm_unidirectional_f32()`.\n\n:::note\nThis query reports its invalid input as -1, following the integer LSTM temp sizers (`arm_lstm_unidirectional_s8_temp1_get_buffer_size()`), not the 0 used by the float convolution and fully-connected queries in this header.\n\n:::",
          "examples": [],
          "id": "arm_lstm_unidirectional_f32_temp1_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f32_temp1_get_buffer_size",
          "params": [
            {
              "description": "LSTM operator parameters, i.e. the same `cmsis_nn_lstm_params_f32` passed to `arm_lstm_unidirectional_f32()`. No field is read.",
              "direction": "in",
              "name": "lstm_params",
              "type": "const cmsis_nn_lstm_params_f32 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "0 for any non-NULL lstm_params, on every build target: the float32 implementation computes its gate values per hidden unit in automatics and never dereferences temp1 or temp2, so both context pointers may be NULL. Returns -1 only for a NULL lstm_params. The query exists so arena-sizing code can treat every LSTM variant alike; a future implementation that starts staging gate vectors would change this figure, so size from the query rather than hard-coding 0."
            }
          ],
          "signature": "int32_t arm_lstm_unidirectional_f32_temp1_get_buffer_size(const cmsis_nn_lstm_params_f32 *lstm_params)",
          "source": {
            "line": 1833,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1833"
          },
          "summary": "Get size of the temp1 scratch buffer required by armlstmunidirectionalf32()."
        },
        {
          "description": "Get size of the temp2 scratch buffer required by `arm_lstm_unidirectional_f32()`. The contract is identical to `arm_lstm_unidirectional_f32_temp1_get_buffer_size()`, and the answer is the same 0 (temp2 is likewise never dereferenced).\n\n:::note\nThis query reports its invalid input as -1, following the integer LSTM temp sizers (`arm_lstm_unidirectional_s8_temp1_get_buffer_size()`), not the 0 used by the float convolution and fully-connected queries in this header.\n\n:::",
          "examples": [],
          "id": "arm_lstm_unidirectional_f32_temp2_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f32_temp2_get_buffer_size",
          "params": [
            {
              "description": "LSTM operator parameters, i.e. the same `cmsis_nn_lstm_params_f32` passed to `arm_lstm_unidirectional_f32()`. No field is read.",
              "direction": "in",
              "name": "lstm_params",
              "type": "const cmsis_nn_lstm_params_f32 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "0 for any non-NULL lstm_params, on every build target: the float32 implementation computes its gate values per hidden unit in automatics and never dereferences temp1 or temp2, so both context pointers may be NULL. Returns -1 only for a NULL lstm_params. The query exists so arena-sizing code can treat every LSTM variant alike; a future implementation that starts staging gate vectors would change this figure, so size from the query rather than hard-coding 0."
            }
          ],
          "signature": "int32_t arm_lstm_unidirectional_f32_temp2_get_buffer_size(const cmsis_nn_lstm_params_f32 *lstm_params)",
          "source": {
            "line": 1842,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1842"
          },
          "summary": "Get size of the temp2 scratch buffer required by armlstmunidirectionalf32()."
        },
        {
          "description": "Get size of the temp1 scratch buffer required by `arm_gru_unidirectional_f32()`.\n\n:::note\nOn the pre-reset path a 0 is only returned for the degenerate hidden_size == 0, which `arm_gru_unidirectional_f32()` rejects with ARM_CMSIS_NN_ARG_ERROR before any buffer access - so a 0 there never corresponds to a runnable call.\n\n:::\n\n:::note\nThis query reports an out-of-range shape as -1, following the integer LSTM temp sizers, not the 0 used by the float convolution and fully-connected queries in this header.\n\n:::",
          "examples": [],
          "id": "arm_gru_unidirectional_f32_temp1_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_gru_unidirectional_f32_temp1_get_buffer_size",
          "params": [
            {
              "description": "GRU operator parameters, i.e. the same `cmsis_nn_gru_params_f32` passed to `arm_gru_unidirectional_f32()`. Only reset_after and hidden_size are read.",
              "direction": "in",
              "name": "gru_params",
              "type": "const cmsis_nn_gru_params_f32 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: hidden_size * sizeof(float32_t) when reset_after == 0 (the pre-reset formulation stages the r . h_prev vector in temp1; the vector is reused across batches and time steps, so neither batch_size nor time_steps enters), and 0 when reset_after != 0 (temp1 is never dereferenced and may be NULL). Returns -1 if gru_params is NULL, if hidden_size is negative, or if the byte count would not fit in an int32_t. The figure and the range checks are the same on every build target."
            }
          ],
          "signature": "int32_t arm_gru_unidirectional_f32_temp1_get_buffer_size(const cmsis_nn_gru_params_f32 *gru_params)",
          "source": {
            "line": 1863,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L1863"
          },
          "summary": "Get size of the temp1 scratch buffer required by armgruunidirectionalf32()."
        },
        {
          "description": "Unidirectional LSTM inference.\n\n:::note\nOn the MVE float path a NaN cell state yields a NaN hidden state, as tanh returns NaN unchanged there (#635). With cell clipping enabled the clip removes a NaN cell state first.\n\n:::",
          "examples": [],
          "id": "arm_lstm_unidirectional_f16",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f16",
          "params": [
            {
              "description": "Pointer to the input sequence tensor.",
              "direction": "in",
              "name": "input",
              "type": "const float16_t *"
            },
            {
              "description": "Pointer to the output sequence tensor.",
              "direction": "out",
              "name": "output",
              "type": "float16_t *"
            },
            {
              "description": "LSTM parameters and weights.",
              "direction": "in",
              "name": "params",
              "type": "const cmsis_nn_lstm_params_f16 *"
            },
            {
              "description": "Mutable LSTM scratch and state buffers. temp1 and temp2 are sized by `arm_lstm_unidirectional_f32_temp1_get_buffer_size()` / `arm_lstm_unidirectional_f32_temp2_get_buffer_size()`, which report 0: the float implementation never dereferences them and both may be NULL.",
              "direction": "inout",
              "name": "buffers",
              "type": "cmsis_nn_lstm_context_f16 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "`ARM_CMSIS_NN_SUCCESS` on success or `ARM_CMSIS_NN_ARG_ERROR` on invalid arguments."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_lstm_unidirectional_f16(\n    const float16_t *input,\n    float16_t *output,\n    const cmsis_nn_lstm_params_f16 *params,\n    cmsis_nn_lstm_context_f16 *buffers\n)",
          "source": {
            "line": 3558,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3558"
          },
          "summary": "Unidirectional LSTM inference."
        },
        {
          "description": "Unidirectional GRU layer for float16 input, output and state.\n\nImplements the reset-after GRU (Keras / TFLite default) when `params->reset_after` is non-zero, and the pre-reset variant otherwise. The hidden state is zero-initialised for the first time step, unless `buffers->hidden_state` is supplied for streaming state carry (`batch_size == 1`), in which case it seeds the initial state and receives the final hidden state on return.\n\n:::note\nNaN contract: a NaN in `input`, the previous hidden state, or the candidate gate's weight or bias reaches every output unit it feeds, on the scalar and MVE legs alike and at the shipped -Ofast: the MVE block re-establishes NaN after the table tanh with an integer-domain test that fast-math cannot elide (#251). A NaN confined to the update or reset gate's weight or bias does not reach the output: the scalar sigmoid maps NaN to 1.0 (see the note on arm_nn_sigmoid_scalar_f32 in `arm_nnsupportfunctions_flt.h`). NaN payloads and signs are not preserved on the MVE leg (default NaN, architectural). Inf follows the arithmetic.\n\n:::",
          "examples": [],
          "id": "arm_gru_unidirectional_f16",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_gru_unidirectional_f16",
          "params": [
            {
              "description": "Input sequence tensor. Must not overlap `output`: earlier outputs are re-read as the recurrent state for later time steps, so aliasing corrupts silently.",
              "direction": "in",
              "name": "input",
              "type": "const float16_t *"
            },
            {
              "description": "Output (hidden-state) sequence tensor.",
              "direction": "out",
              "name": "output",
              "type": "float16_t *"
            },
            {
              "description": "Struct describing the GRU operator.",
              "direction": "in",
              "name": "params",
              "type": "const cmsis_nn_gru_params_f16 *"
            },
            {
              "description": "Scratch buffers. May be NULL when `reset_after` != 0. temp1 is sized by `arm_gru_unidirectional_f16_temp1_get_buffer_size()`.",
              "direction": "inout",
              "name": "buffers",
              "type": "cmsis_nn_gru_context_f16 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "ARM_CMSIS_NN_SUCCESS on success, ARM_CMSIS_NN_ARG_ERROR otherwise."
            }
          ],
          "signature": "arm_cmsis_nn_status arm_gru_unidirectional_f16(\n    const float16_t *input,\n    float16_t *output,\n    const cmsis_nn_gru_params_f16 *params,\n    cmsis_nn_gru_context_f16 *buffers\n)",
          "source": {
            "line": 3589,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3589"
          },
          "summary": "Unidirectional GRU layer for float16 input, output and state."
        },
        {
          "description": "Get size of the temp1 scratch buffer required by `arm_lstm_unidirectional_f16()`. The contract is identical to `arm_lstm_unidirectional_f32_temp1_get_buffer_size()`, and the answer is the same 0 on every build target (the float16 implementation likewise never dereferences temp1 or temp2, which may both be NULL).",
          "examples": [],
          "id": "arm_lstm_unidirectional_f16_temp1_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f16_temp1_get_buffer_size",
          "params": [
            {
              "description": "LSTM operator parameters, i.e. the same `cmsis_nn_lstm_params_f16` passed to `arm_lstm_unidirectional_f16()`. No field is read.",
              "direction": "in",
              "name": "lstm_params",
              "type": "const cmsis_nn_lstm_params_f16 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "0 for any non-NULL lstm_params, -1 for a NULL lstm_params."
            }
          ],
          "signature": "int32_t arm_lstm_unidirectional_f16_temp1_get_buffer_size(const cmsis_nn_lstm_params_f16 *lstm_params)",
          "source": {
            "line": 3605,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3605"
          },
          "summary": "Get size of the temp1 scratch buffer required by armlstmunidirectionalf16()."
        },
        {
          "description": "Get size of the temp2 scratch buffer required by `arm_lstm_unidirectional_f16()`. The contract is identical to `arm_lstm_unidirectional_f32_temp1_get_buffer_size()`, and the answer is the same 0.",
          "examples": [],
          "id": "arm_lstm_unidirectional_f16_temp2_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_lstm_unidirectional_f16_temp2_get_buffer_size",
          "params": [
            {
              "description": "LSTM operator parameters, i.e. the same `cmsis_nn_lstm_params_f16` passed to `arm_lstm_unidirectional_f16()`. No field is read.",
              "direction": "in",
              "name": "lstm_params",
              "type": "const cmsis_nn_lstm_params_f16 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "0 for any non-NULL lstm_params, -1 for a NULL lstm_params."
            }
          ],
          "signature": "int32_t arm_lstm_unidirectional_f16_temp2_get_buffer_size(const cmsis_nn_lstm_params_f16 *lstm_params)",
          "source": {
            "line": 3613,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3613"
          },
          "summary": "Get size of the temp2 scratch buffer required by armlstmunidirectionalf16()."
        },
        {
          "description": "Get size of the temp1 scratch buffer required by `arm_gru_unidirectional_f16()`. See `arm_gru_unidirectional_f32_temp1_get_buffer_size()` for the -1-on-invalid contract and the pre-reset degenerate-0 note; both apply here unchanged.",
          "examples": [],
          "id": "arm_gru_unidirectional_f16_temp1_get_buffer_size",
          "kind": "function",
          "language": "c",
          "members": [],
          "name": "arm_gru_unidirectional_f16_temp1_get_buffer_size",
          "params": [
            {
              "description": "GRU operator parameters, i.e. the same `cmsis_nn_gru_params_f16` passed to `arm_gru_unidirectional_f16()`. Only reset_after and hidden_size are read.",
              "direction": "in",
              "name": "gru_params",
              "type": "const cmsis_nn_gru_params_f16 *"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Required buffer size in bytes: hidden_size * sizeof(float16_t) when reset_after == 0, 0 when reset_after != 0 (temp1 is never dereferenced and may be NULL). Half the figure `arm_gru_unidirectional_f32_temp1_get_buffer_size()` returns for the same shape - sizing an f16 layer with the f32 query over-allocates, and the reverse under-allocates."
            }
          ],
          "signature": "int32_t arm_gru_unidirectional_f16_temp1_get_buffer_size(const cmsis_nn_gru_params_f16 *gru_params)",
          "source": {
            "line": 3628,
            "path": "Include/arm_nnfunctions_flt.h",
            "url": "https://github.com/AmbiqAI/ns-cmsis-nn/blob/5f3fed9f21a57390cc7f00f77a37db8f5f110cb8/Include/arm_nnfunctions_flt.h#L3628"
          },
          "summary": "Get size of the temp1 scratch buffer required by armgruunidirectionalf16()."
        }
      ]
    }
  ],
  "name": "heliaCORE"
}
