Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/kernel/tensor2.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 tensor *X(mktensor_2d)(INT n0, INT is0, INT os0, | |
25 INT n1, INT is1, INT os1) | |
26 { | |
27 tensor *x = X(mktensor)(2); | |
28 x->dims[0].n = n0; | |
29 x->dims[0].is = is0; | |
30 x->dims[0].os = os0; | |
31 x->dims[1].n = n1; | |
32 x->dims[1].is = is1; | |
33 x->dims[1].os = os1; | |
34 return x; | |
35 } | |
36 | |
37 | |
38 tensor *X(mktensor_3d)(INT n0, INT is0, INT os0, | |
39 INT n1, INT is1, INT os1, | |
40 INT n2, INT is2, INT os2) | |
41 { | |
42 tensor *x = X(mktensor)(3); | |
43 x->dims[0].n = n0; | |
44 x->dims[0].is = is0; | |
45 x->dims[0].os = os0; | |
46 x->dims[1].n = n1; | |
47 x->dims[1].is = is1; | |
48 x->dims[1].os = os1; | |
49 x->dims[2].n = n2; | |
50 x->dims[2].is = is2; | |
51 x->dims[2].os = os2; | |
52 return x; | |
53 } |