comparison libtwamr/memops.h @ 308:8dfb7cbe6b59

libtwamr: integrated up to bgnscd.c
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 16 Apr 2024 17:57:21 +0000
parents libgsmefr/memops.h@d285877fc4cc
children
comparison
equal deleted inserted replaced
307:6b33f3ba4289 308:8dfb7cbe6b59
1 /*
2 * The original code from ETSI uses its own Copy() and Set_zero()
3 * functions, operating on Word16 elements. Here we implement them
4 * as static inline functions wrapping around memcpy and memset.
5 */
6
7 #include <string.h>
8
9 static inline void Copy (
10 const Word16 x[], /* (i) : input vector */
11 Word16 y[], /* (o) : output vector */
12 Word16 L /* (i) : vector length */
13 )
14 {
15 memcpy(y, x, L * 2);
16 }
17
18 static inline void Set_zero (
19 Word16 x[], /* (o) : vector to clear */
20 Word16 L /* (i) : length of vector */
21 )
22 {
23 memset(x, 0, L * 2);
24 }