Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/kernel/tensor3.c @ 82:d0c2a83c1364
Add FFTW 3.3.8 source, and a Linux build
author | Chris Cannam |
---|---|
date | Tue, 19 Nov 2019 14:52:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
81:7029a4916348 | 82:d0c2a83c1364 |
---|---|
1 /* | |
2 * Copyright (c) 2003, 2007-14 Matteo Frigo | |
3 * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software | |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 * | |
19 */ | |
20 | |
21 | |
22 #include "kernel/ifftw.h" | |
23 | |
24 /* Currently, mktensor_4d and mktensor_5d are only used in the MPI | |
25 routines, where very complicated transpositions are required. | |
26 Therefore we split them into a separate source file. */ | |
27 | |
28 tensor *X(mktensor_4d)(INT n0, INT is0, INT os0, | |
29 INT n1, INT is1, INT os1, | |
30 INT n2, INT is2, INT os2, | |
31 INT n3, INT is3, INT os3) | |
32 { | |
33 tensor *x = X(mktensor)(4); | |
34 x->dims[0].n = n0; | |
35 x->dims[0].is = is0; | |
36 x->dims[0].os = os0; | |
37 x->dims[1].n = n1; | |
38 x->dims[1].is = is1; | |
39 x->dims[1].os = os1; | |
40 x->dims[2].n = n2; | |
41 x->dims[2].is = is2; | |
42 x->dims[2].os = os2; | |
43 x->dims[3].n = n3; | |
44 x->dims[3].is = is3; | |
45 x->dims[3].os = os3; | |
46 return x; | |
47 } | |
48 | |
49 tensor *X(mktensor_5d)(INT n0, INT is0, INT os0, | |
50 INT n1, INT is1, INT os1, | |
51 INT n2, INT is2, INT os2, | |
52 INT n3, INT is3, INT os3, | |
53 INT n4, INT is4, INT os4) | |
54 { | |
55 tensor *x = X(mktensor)(5); | |
56 x->dims[0].n = n0; | |
57 x->dims[0].is = is0; | |
58 x->dims[0].os = os0; | |
59 x->dims[1].n = n1; | |
60 x->dims[1].is = is1; | |
61 x->dims[1].os = os1; | |
62 x->dims[2].n = n2; | |
63 x->dims[2].is = is2; | |
64 x->dims[2].os = os2; | |
65 x->dims[3].n = n3; | |
66 x->dims[3].is = is3; | |
67 x->dims[3].os = os3; | |
68 x->dims[4].n = n4; | |
69 x->dims[4].is = is4; | |
70 x->dims[4].os = os4; | |
71 return x; | |
72 } |