Function arm_gru_unidirectional_f32_temp1_get_buffer_size¶
Defined in File arm_nnfunctions_flt.h
Function Documentation¶
-
int32_t arm_gru_unidirectional_f32_temp1_get_buffer_size(const cmsis_nn_gru_params_f32 *gru_params)¶
Get size of the temp1 scratch buffer required by arm_gru_unidirectional_f32().
Note
On 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.
Note
This 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.
- Parameters:
gru_params – [in] 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.
- Returns:
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.