Edge AI Add-on API 2.2.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
49void nrf_dsp_scale_zscore_i8(const int8_t* p_input,
50 uint16_t num,
51 const int8_t mean,
52 const int8_t stddev,
53 int8_t* p_output);
54
65void nrf_dsp_scale_zscore_i16(const int16_t* p_input,
66 uint16_t num,
67 const int16_t mean,
68 const int16_t stddev,
69 int16_t* p_output);
70
80#define nrf_dsp_scale_zscore_int_q(var, qfactor, mean, stddev) \
81 (((int32_t)(var - mean) * qfactor) / stddev)
82
91#define nrf_dsp_scale_zscore_float(var, mean, stddev) ((flt32_t)(var - mean) / stddev)
92
102#define nrf_dsp_scale_zscore_float_q(var, qfactor, mean, stddev) (((var - mean) * qfactor) / stddev)
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif /* _NRF_DSP_SUPPORT_SCALE_ZSCORE_H_ */
109
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