Coverage Report

Created: 2025-07-18 06:52

/src/fftw3/kernel/tensor2.c
Line
Count
Source (jump to first uncovered line)
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
1.38k
{
27
1.38k
     tensor *x = X(mktensor)(2);
28
1.38k
     x->dims[0].n = n0;
29
1.38k
     x->dims[0].is = is0;
30
1.38k
     x->dims[0].os = os0;
31
1.38k
     x->dims[1].n = n1;
32
1.38k
     x->dims[1].is = is1;
33
1.38k
     x->dims[1].os = os1;
34
1.38k
     return x;
35
1.38k
}
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
0
{
42
0
     tensor *x = X(mktensor)(3);
43
0
     x->dims[0].n = n0;
44
0
     x->dims[0].is = is0;
45
0
     x->dims[0].os = os0;
46
0
     x->dims[1].n = n1;
47
0
     x->dims[1].is = is1;
48
0
     x->dims[1].os = os1;
49
0
     x->dims[2].n = n2;
50
0
     x->dims[2].is = is2;
51
0
     x->dims[2].os = os2;
52
0
     return x;
53
0
}