~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to extern/fftw/kernel/tensor2.c

  • Committer: theeth
  • Date: 2008-10-14 16:52:04 UTC
  • Revision ID: vcs-imports@canonical.com-20081014165204-r32w2gm6s0osvdhn
copy back trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2003, 2006 Matteo Frigo
 
3
 * Copyright (c) 2003, 2006 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *
 
19
 */
 
20
 
 
21
/* $Id: tensor2.c,v 1.5 2006-01-05 03:04:27 stevenj Exp $ */
 
22
 
 
23
#include "ifftw.h"
 
24
 
 
25
tensor *X(mktensor_2d)(INT n0, INT is0, INT os0,
 
26
                       INT n1, INT is1, INT os1)
 
27
{
 
28
     tensor *x = X(mktensor)(2);
 
29
     x->dims[0].n = n0;
 
30
     x->dims[0].is = is0;
 
31
     x->dims[0].os = os0;
 
32
     x->dims[1].n = n1;
 
33
     x->dims[1].is = is1;
 
34
     x->dims[1].os = os1;
 
35
     return x;
 
36
}
 
37
 
 
38
 
 
39
tensor *X(mktensor_3d)(INT n0, INT is0, INT os0,
 
40
                       INT n1, INT is1, INT os1,
 
41
                       INT n2, INT is2, INT os2)
 
42
{
 
43
     tensor *x = X(mktensor)(3);
 
44
     x->dims[0].n = n0;
 
45
     x->dims[0].is = is0;
 
46
     x->dims[0].os = os0;
 
47
     x->dims[1].n = n1;
 
48
     x->dims[1].is = is1;
 
49
     x->dims[1].os = os1;
 
50
     x->dims[2].n = n2;
 
51
     x->dims[2].is = is2;
 
52
     x->dims[2].os = os2;
 
53
     return x;
 
54
}
 
55