6 float *output,
size_t output_elements,
size_t output_stride,
7 float *scratch,
size_t scratch_elements,
size_t rows,
size_t channels) {
12 input_elements < ni || output_elements < no || scratch_elements < ns)
return -2;
17 for (
size_t r = 0; r < rows; ++r)
19 for (
size_t r = 0; r < rows; ++r) {
20 memcpy(scratch + r * channels, input + r * input_stride, channels *
sizeof(
float));
26 for (
size_t r = 0; r < rows; ++r)
27 memcpy(output + r * output_stride, scratch + r * channels, channels *
sizeof(
float));
int gelu_rows_tanh_checked_f32(const float *input, size_t input_elements, size_t input_stride, float *output, size_t output_elements, size_t output_stride, float *scratch, size_t scratch_elements, size_t rows, size_t channels)