| NFFT 3.5.0

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

vector2.c
1 /*
2 * Copyright (c) 2002, 2017 Jens Keiner, Stefan Kunis, Daniel Potts
3 *
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 2 of the License, or (at your option) any later
7 * version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19 #include "infft.h"
20
22 void Y(cp_complex)(C *x, C *y, INT n)
23 {
24 INT k;
25
26 for (k = 0; k < n; k++)
27 x[k] = y[k];
28 }
29
31 void Y(cp_double)(R *x, R *y, INT n)
32 {
33 INT k;
34
35 for (k = 0; k < n; k++)
36 x[k] = y[k];
37 }
38
40 void Y(cp_a_complex)(C *x, R a, C *y, INT n)
41 {
42 INT k;
43
44 for (k = 0; k < n; k++)
45 x[k] = a * y[k];
46 }
47
49 void Y(cp_a_double)(R *x, R a, R *y, INT n)
50 {
51 INT k;
52
53 for (k = 0; k < n; k++)
54 x[k] = a * y[k];
55 }
56
57
59 void Y(cp_w_complex)(C *x, R *w, C *y, INT n)
60 {
61 INT k;
62
63 for (k = 0; k < n; k++)
64 x[k] = w[k]*y[k];
65 }
66
68 void Y(cp_w_double)(R *x, R *w, R *y, INT n)
69 {
70 INT k;
71
72 for (k = 0; k < n; k++)
73 x[k] = w[k] * y[k];
74 }