Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches
nrf_dsp_clipping.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_CLIPPING_H_
16#define _NRF_DSP_SUPPORT_CLIPPING_H_
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
32void nrf_dsp_clip_f32(flt32_t* p_input, uint16_t num, const flt32_t min, const flt32_t max);
33
42void nrf_dsp_clip_i8(int8_t* p_input, uint16_t num, const int8_t min, const int8_t max);
43
52void nrf_dsp_clip_i16(int16_t* p_input, uint16_t num, const int16_t min, const int16_t max);
53
64#define nrf_dsp_clip(input, min, max) \
65 (((input) < (min)) ? (min) : (((input) > (max)) ? (max) : (input)))
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* _NRF_DSP_SUPPORT_CLIPPING_H_ */
72
void nrf_dsp_clip_i8(int8_t *p_input, uint16_t num, const int8_t min, const int8_t max)
Clips INT8 values to the limit (min, max)
void nrf_dsp_clip_i16(int16_t *p_input, uint16_t num, const int16_t min, const int16_t max)
Clips INT16 values to the limit (min, max)
void nrf_dsp_clip_f32(flt32_t *p_input, uint16_t num, const flt32_t min, const flt32_t max)
Clips floating-point values to the limit (min, max)
float flt32_t
32-bit floating-point type definition.
Definition nrf_edgeai_ctypes.h:21