~ubuntu-branches/ubuntu/raring/fftw3/raring-proposed

« back to all changes in this revision

Viewing changes to rdft/problem.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2006-05-31 13:44:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060531134405-ol9hrbg6bh81sg0c
Tags: 3.1.1-1
* New upstream release (closes: #350327, #338487, #338501)
* Add --enable-portable-binary to use -mtune instead of -march
* Use --with-gcc-arch=G5 / pentium4 on powerpc / i386
* Updated Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (c) 2003 Matteo Frigo
3
 
 * Copyright (c) 2003 Massachusetts Institute of Technology
 
2
 * Copyright (c) 2003, 2006 Matteo Frigo
 
3
 * Copyright (c) 2003, 2006 Massachusetts Institute of Technology
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License as published by
18
18
 *
19
19
 */
20
20
 
21
 
/* $Id: problem.c,v 1.47 2003/04/10 19:36:17 athena Exp $ */
 
21
/* $Id: problem.c,v 1.53 2006-01-13 03:21:57 athena Exp $ */
22
22
 
23
23
#include "rdft.h"
24
24
#include <stddef.h>
59
59
     else if (rnk == 0)
60
60
          I[0] = K(0.0);
61
61
     else if (rnk > 0) {
62
 
          int i, n = dims[0].n;
63
 
          int is = dims[0].is;
 
62
          int i;
 
63
          INT n = dims[0].n, is = dims[0].is;
64
64
 
65
65
          if (rnk == 1) {
66
66
               /* this case is redundant but faster */
97
97
{
98
98
     const problem_rdft *ego = (const problem_rdft *) ego_;
99
99
     int i;
100
 
     p->print(p, "(rdft %d %td %T %T", 
 
100
     p->print(p, "(rdft %d %D %T %T", 
101
101
              X(alignment_of)(ego->I),
102
 
              ego->O - ego->I, 
 
102
              (INT)(ego->O - ego->I), 
103
103
              ego->sz,
104
104
              ego->vecsz);
105
105
     for (i = 0; i < ego->sz->rnk; ++i)
117
117
 
118
118
static const problem_adt padt =
119
119
{
 
120
     PROBLEM_RDFT,
120
121
     hash,
121
122
     zero,
122
123
     print,
123
124
     destroy
124
125
};
125
126
 
126
 
int X(problem_rdft_p)(const problem *p)
127
 
{
128
 
     return (p->adt == &padt);
129
 
}
130
 
 
131
127
/* Dimensions of size 1 that are not REDFT/RODFT are no-ops and can be
132
128
   eliminated.  REDFT/RODFT unit dimensions often have factors of 2.0
133
129
   and suchlike from normalization and phases, although in principle
233
229
     A(sz->rnk <= 1);
234
230
     return X(mkproblem_rdft_d)(sz, vecsz, I, O, &kind);
235
231
}
 
232
 
 
233
/* create a zero-dimensional problem */
 
234
problem *X(mkproblem_rdft_0_d)(tensor *vecsz, R *I, R *O)
 
235
{
 
236
     return X(mkproblem_rdft_d)(X(mktensor_0d)(), vecsz, I, O, 
 
237
                                (const rdft_kind *)0);
 
238
}