Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches
nrf_dsp_mem.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 */
6#ifndef _NRF_DSP_MEMORY_OPERATIONS_H_
7#define _NRF_DSP_MEMORY_OPERATIONS_H_
8
9#include "nrf_dsp_defs.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
22__NRF_DSP_STATIC_FORCEINLINE int32_t read_i8x4(int8_t const* p_input)
23{
24 return ((int32_t)(p_input[3] & 0x0FF) << 24) | ((int32_t)(p_input[2] & 0x0FF) << 16) |
25 ((int32_t)(p_input[1] & 0x0FF) << 8) | (p_input[0] & 0x0FF);
26}
27
35__NRF_DSP_STATIC_FORCEINLINE int32_t read_i16x2(int16_t const* p_input)
36{
37 return ((int32_t)p_input[1] << 16) | (p_input[0] & 0x0FFFF);
38}
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif /* _NRF_DSP_MEMORY_OPERATIONS_H_ */
__NRF_DSP_STATIC_FORCEINLINE int32_t read_i16x2(int16_t const *p_input)
Read 2 INT16 values as INT32 value, from INT16 vector.
Definition nrf_dsp_mem.h:35
__NRF_DSP_STATIC_FORCEINLINE int32_t read_i8x4(int8_t const *p_input)
Read 4 INT8 values as INT32 value, from INT8 vector.
Definition nrf_dsp_mem.h:22