LORENE
FFTW3/admissible_fft.C
1/*
2 * Determines whether a given number of points N is allowed by the
3 * Fast Fourier Transform algorithm of fftw, i.e. if
4 *
5 * N = 2*p and N >= 4
6 *
7 */
8
9/*
10 * Copyright (c) 1999-2001 Eric Gourgoulhon
11 *
12 * This file is part of LORENE.
13 *
14 * LORENE is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * LORENE is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with LORENE; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 *
28 */
29
30
31char admissible_fft_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/FFTW3/admissible_fft.C,v 1.2 2014/10/13 08:53:18 j_novak Exp $" ;
32
33/*
34 * $Id: admissible_fft.C,v 1.2 2014/10/13 08:53:18 j_novak Exp $
35 * $Log: admissible_fft.C,v $
36 * Revision 1.2 2014/10/13 08:53:18 j_novak
37 * Lorene classes and functions now belong to the namespace Lorene.
38 *
39 * Revision 1.1 2004/12/21 17:06:02 j_novak
40 * Added all files for using fftw3.
41 *
42 * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon
43 * LORENE
44 *
45 * Revision 1.1 1999/11/24 16:06:52 eric
46 * Initial revision
47 *
48 *
49 * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Coef/FFTW3/admissible_fft.C,v 1.2 2014/10/13 08:53:18 j_novak Exp $
50 *
51 */
52
53namespace Lorene {
54
55bool admissible_fft(int n) {
56
57 if (n < 4) {
58 return false ;
59 }
60
61 // Division by 2
62 //--------------
63
64 int reste = n % 2 ;
65 if (reste != 0) {
66 return false ;
67 }
68
69 return true ;
70 }
71}
Lorene prototypes.
Definition app_hor.h:64