Edge AI Add-on API 2.3.0
Loading...
Searching...
No Matches
nrf_dsp_moments.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_STAT_MOMENTS_FUNCTIONS_H_
16#define _NRF_DSP_STAT_MOMENTS_FUNCTIONS_H_
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
39
43typedef union nrf_dsp_moments_i8_u {
44 struct {
46 int16_t var;
48 int16_t skew;
50 int16_t kur;
52
53 int16_t moments[3U];
55
59typedef union nrf_dsp_moments_i16_u {
60 struct {
62 int32_t var;
64 int32_t skew;
66 int32_t kur;
68
69 int32_t moments[3U];
71
83void nrf_dsp_moments_f32(const flt32_t *p_input,
84 uint16_t num,
87
100void nrf_dsp_moments_f32_s(const flt32_t *p_input,
101 uint16_t num,
102 size32_t stride,
105
116void nrf_dsp_moments_i8(const int8_t *p_input,
117 uint16_t num,
120
131void nrf_dsp_moments_i16(const int16_t *p_input,
132 uint16_t num,
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif /* _NRF_DSP_STAT_MOMENTS_FUNCTIONS_H_ */
141
void nrf_dsp_moments_f32(const flt32_t *p_input, uint16_t num, nrf_dsp_stat_ctx_f32_t *p_ctx, nrf_dsp_moments_f32_t *p_m)
Calculate 3 higher statistical moments(Variance, Skewness, Kurtosis) of a floating-point vector.
union nrf_dsp_moments_i8_u nrf_dsp_moments_i8_t
INT8 statistical moments container.
union nrf_dsp_moments_i16_u nrf_dsp_moments_i16_t
INT16 statistical moments container.
void nrf_dsp_moments_f32_s(const flt32_t *p_input, uint16_t num, size32_t stride, nrf_dsp_stat_ctx_f32_t *p_ctx, nrf_dsp_moments_f32_t *p_m)
Calculate 3 higher statistical moments(Variance, Skewness, Kurtosis) of a floating-point vector.
union nrf_dsp_moments_f32_u nrf_dsp_moments_f32_t
Floating-point statistical moments container.
void nrf_dsp_moments_i16(const int16_t *p_input, uint16_t num, nrf_dsp_stat_ctx_i16_t *p_ctx, nrf_dsp_moments_i16_t *p_m)
Calculate 3 higher statistical moments(Variance, Skewness, Kurtosis) of a INT16 vector.
void nrf_dsp_moments_i8(const int8_t *p_input, uint16_t num, nrf_dsp_stat_ctx_i8_t *p_ctx, nrf_dsp_moments_i8_t *p_m)
Calculate 3 higher statistical moments(Variance, Skewness, Kurtosis) of a INT8 vector.
size_t size32_t
Architecture 32-bit size_t type definition.
Definition nrf_edgeai_ctypes.h:31
float flt32_t
32-bit floating-point type definition.
Definition nrf_edgeai_ctypes.h:21
Floating-point statistics reusable context, in which is used to store derived or intermediate metrics...
Definition nrf_dsp_types.h:80
INT16 statistics reusable context, in which is used to store derived or intermediate metrics to simpl...
Definition nrf_dsp_types.h:135
INT8 statistics reusable context, in which is used to store derived or intermediate metrics to simpli...
Definition nrf_dsp_types.h:116
flt32_t var
Definition nrf_dsp_moments.h:30
struct nrf_dsp_moments_f32_u::@96 moment
flt32_t moments[3U]
Definition nrf_dsp_moments.h:37
flt32_t skew
Definition nrf_dsp_moments.h:32
flt32_t kur
Definition nrf_dsp_moments.h:34
Floating-point statistical moments container.
Definition nrf_dsp_moments.h:27
int32_t moments[3U]
Definition nrf_dsp_moments.h:69
int32_t skew
Definition nrf_dsp_moments.h:64
struct nrf_dsp_moments_i16_u::@98 moment
int32_t var
Definition nrf_dsp_moments.h:62
int32_t kur
Definition nrf_dsp_moments.h:66
INT16 statistical moments container.
Definition nrf_dsp_moments.h:59
int16_t skew
Definition nrf_dsp_moments.h:48
int16_t kur
Definition nrf_dsp_moments.h:50
struct nrf_dsp_moments_i8_u::@97 moment
int16_t var
Definition nrf_dsp_moments.h:46
int16_t moments[3U]
Definition nrf_dsp_moments.h:53
INT8 statistical moments container.
Definition nrf_dsp_moments.h:43