Mercurial > hg > audiostuff
comparison spandsp-0.0.3/spandsp-0.0.3/src/spandsp/complex_vector_float.h @ 5:f762bf195c4b
import spandsp-0.0.3
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 16:00:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:26cd8f1ef0b1 | 5:f762bf195c4b |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * complex_vector_float.h | |
5 * | |
6 * Written by Steve Underwood <steveu@coppice.org> | |
7 * | |
8 * Copyright (C) 2003 Steve Underwood | |
9 * | |
10 * All rights reserved. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License version 2, as | |
14 * published by the Free Software Foundation. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 * | |
25 * $Id: complex_vector_float.h,v 1.3 2006/10/24 13:45:28 steveu Exp $ | |
26 */ | |
27 | |
28 #if !defined(_COMPLEX_VECTOR_FLOAT_H_) | |
29 #define _COMPLEX_VECTOR_FLOAT_H_ | |
30 | |
31 #ifdef __cplusplus | |
32 extern "C" { | |
33 #endif | |
34 | |
35 static __inline__ void cvec_copyf(complexf_t z[], const complexf_t x[], int n) | |
36 { | |
37 int i; | |
38 | |
39 for (i = 0; i < n; i++) | |
40 z[i] = x[i]; | |
41 } | |
42 /*- End of function --------------------------------------------------------*/ | |
43 | |
44 static __inline__ void cvec_copy(complex_t z[], const complex_t x[], int n) | |
45 { | |
46 int i; | |
47 | |
48 for (i = 0; i < n; i++) | |
49 z[i] = x[i]; | |
50 } | |
51 /*- End of function --------------------------------------------------------*/ | |
52 | |
53 #if defined(HAVE_LONG_DOUBLE) | |
54 static __inline__ void cvec_copyl(complexl_t z[], const complexl_t x[], int n) | |
55 { | |
56 int i; | |
57 | |
58 for (i = 0; i < n; i++) | |
59 z[i] = x[i]; | |
60 } | |
61 /*- End of function --------------------------------------------------------*/ | |
62 #endif | |
63 | |
64 static __inline__ void cvec_zerof(complexf_t z[], int n) | |
65 { | |
66 int i; | |
67 | |
68 for (i = 0; i < n; i++) | |
69 z[i] = complex_setf(0.0f, 0.0f); | |
70 } | |
71 /*- End of function --------------------------------------------------------*/ | |
72 | |
73 static __inline__ void cvec_zero(complex_t z[], int n) | |
74 { | |
75 int i; | |
76 | |
77 for (i = 0; i < n; i++) | |
78 z[i] = complex_set(0.0, 0.0); | |
79 } | |
80 /*- End of function --------------------------------------------------------*/ | |
81 | |
82 #if defined(HAVE_LONG_DOUBLE) | |
83 static __inline__ void cvec_zerol(complexl_t z[], int n) | |
84 { | |
85 int i; | |
86 | |
87 for (i = 0; i < n; i++) | |
88 z[i] = complex_setl(0.0, 0.0); | |
89 } | |
90 /*- End of function --------------------------------------------------------*/ | |
91 #endif | |
92 | |
93 static __inline__ void cvec_setf(complexf_t z[], complexf_t *x, int n) | |
94 { | |
95 int i; | |
96 | |
97 for (i = 0; i < n; i++) | |
98 z[i] = *x; | |
99 } | |
100 /*- End of function --------------------------------------------------------*/ | |
101 | |
102 static __inline__ void cvec_set(complex_t z[], complex_t *x, int n) | |
103 { | |
104 int i; | |
105 | |
106 for (i = 0; i < n; i++) | |
107 z[i] = *x; | |
108 } | |
109 /*- End of function --------------------------------------------------------*/ | |
110 | |
111 #if defined(HAVE_LONG_DOUBLE) | |
112 static __inline__ void cvec_setl(complexl_t z[], complexl_t *x, int n) | |
113 { | |
114 int i; | |
115 | |
116 for (i = 0; i < n; i++) | |
117 z[i] = *x; | |
118 } | |
119 /*- End of function --------------------------------------------------------*/ | |
120 #endif | |
121 | |
122 #ifdef __cplusplus | |
123 } | |
124 #endif | |
125 | |
126 #endif | |
127 /*- End of file ------------------------------------------------------------*/ |