Edge AI Add-on API 2.3.0
Loading...
Searching...
No Matches
nrf_dsp_scale_zscore.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
15#ifndef _NRF_DSP_SUPPORT_SCALE_ZSCORE_H_
16#define _NRF_DSP_SUPPORT_SCALE_ZSCORE_H_
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
34 uint16_t num,
35 const flt32_t mean,
36 const flt32_t stddev,
37 flt32_t *p_output);
38
50void nrf_dsp_scale_zscore_i8(const int8_t *p_input,
51 uint16_t num,
52 const int8_t mean,
53 const int8_t stddev,
54 int8_t *p_output);
55
67void nrf_dsp_scale_zscore_i16(const int16_t *p_input,
68 uint16_t num,
69 const int16_t mean,
70 const int16_t stddev,
71 int16_t *p_output);
72
82#define nrf_dsp_scale_zscore_int_q(var, qfactor, mean, stddev) \
83 (((int32_t)(var - mean) * qfactor) / stddev)
84
93#define nrf_dsp_scale_zscore_float(var, mean, stddev) ((flt32_t)(var - mean) / stddev)
94
104#define nrf_dsp_scale_zscore_float_q(var, qfactor, mean, stddev) (((var - mean) * qfactor) / stddev)
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* _NRF_DSP_SUPPORT_SCALE_ZSCORE_H_ */
111
void nrf_dsp_scale_zscore_i8(const int8_t *p_input, uint16_t num, const int8_t mean, const int8_t stddev, int8_t *p_output)
Z-score scaling of the INT8 vector ( y = (x - mean) / stddev )
void nrf_dsp_scale_zscore_f32(const flt32_t *p_input, uint16_t num, const flt32_t mean, const flt32_t stddev, flt32_t *p_output)
Z-score scaling of the floating-point vector ( y = (x - mean) / stddev )
void nrf_dsp_scale_zscore_i16(const int16_t *p_input, uint16_t num, const int16_t mean, const int16_t stddev, int16_t *p_output)
Z-score scaling of the INT16 vector ( y = (x - mean) / stddev )
float flt32_t
32-bit floating-point type definition.
Definition nrf_edgeai_ctypes.h:21