Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
basicmath_f16.h
Go to the documentation of this file.
1/* Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
2 * SPDX-License-Identifier: Apache-2.0
3 */
4
11#ifndef INCLUDE_ZEPHYR_DSP_BASICMATH_F16_H_
12#define INCLUDE_ZEPHYR_DSP_BASICMATH_F16_H_
13
14#ifndef CONFIG_FP16
15#error "Cannot use float16 DSP functionality without CONFIG_FP16 enabled"
16#endif /* CONFIG_FP16 */
17
18#include <zephyr/dsp/dsp.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
32DSP_FUNC_SCOPE void zdsp_mult_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
33 uint32_t block_size);
34
43DSP_FUNC_SCOPE void zdsp_add_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
44 uint32_t block_size);
45
54DSP_FUNC_SCOPE void zdsp_sub_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
55 uint32_t block_size);
56
66 uint32_t block_size);
67
75DSP_FUNC_SCOPE void zdsp_abs_f16(const float16_t *src, float16_t *dst, uint32_t block_size);
76
85DSP_FUNC_SCOPE void zdsp_dot_prod_f16(const float16_t *src_a, const float16_t *src_b,
86 uint32_t block_size, float16_t *result);
87
97 uint32_t block_size);
98
106DSP_FUNC_SCOPE void zdsp_negate_f16(const float16_t *src, float16_t *dst, uint32_t block_size);
107
118 float16_t high, uint32_t num_samples);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif /* INCLUDE_ZEPHYR_DSP_BASICMATH_F16_H_ */
Public APIs for Digital Signal Processing (DSP) math.
#define DSP_FUNC_SCOPE
Definition: dsp.h:17
DSP_FUNC_SCOPE void zdsp_abs_f16(const float16_t *src, float16_t *dst, uint32_t block_size)
Floating-point vector absolute value.
DSP_FUNC_SCOPE void zdsp_add_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, uint32_t block_size)
Floating-point vector addition.
DSP_FUNC_SCOPE void zdsp_clip_f16(const float16_t *src, float16_t *dst, float16_t low, float16_t high, uint32_t num_samples)
Elementwise floating-point clipping.
DSP_FUNC_SCOPE void zdsp_dot_prod_f16(const float16_t *src_a, const float16_t *src_b, uint32_t block_size, float16_t *result)
Dot product of floating-point vectors.
DSP_FUNC_SCOPE void zdsp_mult_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, uint32_t block_size)
Floating-point vector multiplication.
DSP_FUNC_SCOPE void zdsp_negate_f16(const float16_t *src, float16_t *dst, uint32_t block_size)
Negates the elements of a floating-point vector.
DSP_FUNC_SCOPE void zdsp_offset_f16(const float16_t *src, float16_t offset, float16_t *dst, uint32_t block_size)
Adds a constant offset to a floating-point vector.
DSP_FUNC_SCOPE void zdsp_scale_f16(const float16_t *src, float16_t scale, float16_t *dst, uint32_t block_size)
Multiplies a floating-point vector by a scalar.
DSP_FUNC_SCOPE void zdsp_sub_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, uint32_t block_size)
Floating-point vector subtraction.
__fp16 float16_t
16-bit floating point type definition.
Definition: types.h:48
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90