46 #ifndef __buffer_ops_h
47 #define __buffer_ops_h
53 #define REP4(expr) (expr);(expr);(expr);(expr);
62 static inline __attribute__((optimize(
"Ofast"),always_inline))
64 float * __restrict__ flt,
67 const float *end = flt + ((len>>2)<<2);
68 for (; flt != end; ) {
69 REP4(*(flt++) = q31_to_f32(*(q31++)));
72 for (; flt != end; ) {
73 *(flt++) = q31_to_f32(*(q31++));
79 static inline __attribute__((optimize(
"Ofast"),always_inline))
81 q31_t * __restrict__ q31,
84 const float *end = flt + ((len>>2)<<2);
85 for (; flt != end; ) {
86 REP4(*(q31++) = f32_to_q31(*(flt++)));
89 for (; flt != end; ) {
90 *(q31++) = f32_to_q31(*(flt++));
103 static inline __attribute__((optimize(
"Ofast"),always_inline))
107 const float *end = ptr + ((len>>2)<<2);
108 for (; ptr != end; ) {
112 for (; ptr != end; ) {
119 static inline __attribute__((optimize(
"Ofast"),always_inline))
123 const uint32_t *end = ptr + ((len>>2)<<2);
124 for (; ptr != end; ) {
128 for (; ptr != end; ) {
142 static inline __attribute__((optimize(
"Ofast"),always_inline))
144 float * __restrict__ dst,
147 const float *end = src + ((len>>2)<<2);
148 for (; src != end; ) {
149 REP4(*(dst++) = *(src++));
152 for (; src != end; ) {
159 static inline __attribute__((optimize(
"Ofast"),always_inline))
161 uint32_t * __restrict__ dst,
164 const uint32_t *end = src + ((len>>2)<<2);
165 for (; src != end; ) {
166 REP4(*(dst++) = *(src++));
169 for (; src != end; ) {
176 #endif // __buffer_ops_h