fftw-2.1.5/0002777000175400001440000000000007637531662006253 5fftw-2.1.5/README0000644000175400001440000000461307635206026007040 This is FFTW, a collection of fast C routines to compute the Discrete Fourier Transform in one or more dimensions. `OFFICIAL' CODE: The doc/ directory contains the manual in texinfo, postscript, info, and HTML formats. Frequently asked questions and answers can be found in the FAQ/ directory in a variety of formats (including HTML). The fftw/ directory contains the source code for the complex transforms, and the rfftw/ directory contains the source code for the real transforms. Large portions of the source are automatically generated by a program in the gensrc/ directory (written in Objective Caml). You do not need this program to use FFTW, since FFTW comes with a default set of pregenerated codelets. You are, however, welcome to look at and play with the generator (see the FFTW manual for more information). The threads/ directory contains an parallel version of FFTW (for shared-memory machines) that uses threads. See the "Multi-threaded FFTW" section of the manual for more information. The mpi/ directory contains a parallel version of FFTW for transforms on machines with MPI. (This code, unlike our other two parallel transforms, supports distributed memory machines.) See the "MPI FFTW" section of the manual for more information. fortran/ contains some constant definitions for using FFTW from Fortran (see the FFTW manual), and also a small example program. Installation instructions are provided in the manual (don't worry, it is straightforward). `UNOFFICIAL' CODE (for you to play with): matlab/ contains code that allows you to call FFTW from MATLAB. The cilk/ directory contains an parallel version of FFTW written in Cilk. Cilk is a cool C-like language in which you can write spawn foo() : foo will be executed in parallel with the main thread and the cost of spawn is just a few cycles (compare this with all the mess you have to do to create a posix thread and pay 3000 cycles for it). More info on Cilk can be found at http://supertech.lcs.mit.edu/cilk/. CONTACTS -------- FFTW was written by Matteo Frigo and Steven G. Johnson. You can contact them at fftw@fftw.org. The latest version of FFTW, benchmarks, links, and other information can be found at the FFTW home page (http://www.fftw.org). You can also sign up to the fftw-announce mailing list to receive (infrequent) updates and information about new releases; to do so, go to: http://www.fftw.org/mailman/listinfo/fftw-announce fftw-2.1.5/AUTHORS0000644000175400001440000000017007635206026007222 Authors of FFTW (reachable at fftw@fftw.org): Matteo Frigo (athena@fftw.org) Stevenj G. Johnson (stevenj@alum.mit.edu) fftw-2.1.5/COPYING0000644000175400001440000004327007635206026007215 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. fftw-2.1.5/ChangeLog0000644000175400001440000050203207637527040007734 2003-03-18 Steven G. Johnson * fftw/fftwf77.c, rfftw/rfftwf77.c, threads/fftw_f77_threads.c, threads/rfftw_f77_threads.c: whoops, missing Fortran wrappers, grr...thanks to Stuart Midgley 2003-03-16 Steven G. Johnson * configure.in: 2.1.4 * COPYRIGHT, cilk/executor_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/fftwnd_cilk.cilk, cilk/test_cilk.cilk, cilk/time_cilk.cilk, fftw/config.h.in, fftw/executor.c, fftw/fftw-int.h, fftw/fftw.h.in, fftw/fftwf77.c, fftw/fftwnd.c, fftw/generic.c, fftw/malloc.c, fftw/planner.c, fftw/putils.c, fftw/rader.c, fftw/timer.c, fftw/twiddle.c, fftw/wisdom.c, fftw/wisdomio.c, fortran/f77_test.F, gensrc/asched.ml, gensrc/asched.mli, gensrc/complex.ml, gensrc/complex.mli, gensrc/dag.ml, gensrc/dag.mli, gensrc/expr.ml, gensrc/expr.mli, gensrc/exprdag.ml, gensrc/exprdag.mli, gensrc/fft.ml, gensrc/genfft.ml, gensrc/magic.ml, gensrc/number.ml, gensrc/number.mli, gensrc/schedule.ml, gensrc/schedule.mli, gensrc/symmetry.ml, gensrc/to_c.ml, gensrc/to_c.mli, gensrc/twiddle.ml, gensrc/util.ml, gensrc/util.mli, gensrc/variable.ml, gensrc/variable.mli, matlab/fftw.c, mpi/TOMS_transpose.c, mpi/TOMS_transpose.h, mpi/fftw_f77_mpi.c, mpi/fftw_f77_mpi.h, mpi/fftw_mpi.c, mpi/fftw_mpi.h, mpi/fftw_mpi_test.c, mpi/fftwnd_mpi.c, mpi/rfftw_f77_mpi.c, mpi/rfftw_mpi.h, mpi/rfftw_mpi_test.c, mpi/rfftwnd_mpi.c, mpi/sched.c, mpi/sched.h, mpi/test_sched.c, mpi/test_transpose_mpi.c, mpi/transpose_mpi.c, rfftw/rexec.c, rfftw/rexec2.c, rfftw/rfftw.h, rfftw/rfftwf77.c, rfftw/rfftwnd.c, rfftw/rgeneric.c, rfftw/rplanner.c, tests/fftw_test.c, tests/rfftw_test.c, tests/test_main.c, threads/executor_threads.c, threads/fftw_f77_threads.c, threads/fftw_threads-int.h, threads/fftw_threads.c, threads/fftw_threads.h, threads/fftw_threads_test.c, threads/fftwnd_threads.c, threads/rexec2_threads.c, threads/rexec_threads.c, threads/rfftw_f77_threads.c, threads/rfftw_threads.h, threads/rfftw_threads_test.c, threads/rfftwnd_threads.c: update copyright year 2003-03-15 Steven G. Johnson * fftw/fftw.h.in: removed C99 complex stuff, since it breaks backwards compatibility 2003-03-08 Steven G. Johnson * configure.in, acinclude.m4: warnings only in debug/maintainer mode 2003-01-15 Steven G. Johnson * doc/fftw.texi: fixed typo (thanks to Andrew Young for the correction) 2003-01-13 Steven G. Johnson * configure.in: added check if c/f77 linking works 2002-11-27 Steven G. Johnson * FAQ/fftw-faq.bfnn: noted pgcc problems 2002-10-24 Steven G. Johnson * Makefile.am, gensrc/Makefile.fftw.am: whoops * NEWS: slight fix * NEWS: more news * fftw/fftw.h.in: qualified compatibility claim * acx_mpi.m4: sync with MPB * ChangeLog: updated * NEWS, configure.in: use acx_mpi.m4 * mpi/Makefile.am: whoops * acx_mpi.m4: added * FAQ/fftw-faq.bfnn: more FAQs * acinclude.m4, configure.in, fftw/config.h.in, fftw/f77_func.h, fftw/fftwf77.c, mpi/fftw_f77_mpi.h, rfftw/rfftwf77.c, threads/fftw_f77_threads.c, threads/rfftw_f77_threads.c: use autoconf's AC_F77_WRAPPERS instead of our own mangling code...the autoconf stuff is derived from ours, anyway 2002-10-24 Steven G. Johnson * NEWS, configure.in: use acx_mpi.m4 * mpi/Makefile.am: whoops * acx_mpi.m4: added * FAQ/fftw-faq.bfnn: more FAQs * acinclude.m4, configure.in, fftw/config.h.in, fftw/f77_func.h, fftw/fftwf77.c, mpi/fftw_f77_mpi.h, rfftw/rfftwf77.c, threads/fftw_f77_threads.c, threads/rfftw_f77_threads.c: use autoconf's AC_F77_WRAPPERS instead of our own mangling code...the autoconf stuff is derived from ours, anyway * configure.in: bumped version * gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am: whoops * acinclude.m4, configure.in, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am, mpi/Makefile.am, tests/Makefile.am, threads/Makefile.am: eliminated SUBST_XXX hackery...it doesn't work with the latest autoconf, and doesn't seem to be needed any more either * FAQ/fftw-faq.bfnn: noted AIX problem * acx_pthread.m4: sync with fftw3 2002-07-12 Steven G. Johnson * acx_pthread.m4: switch to C so that CFLAGS work 2002-04-18 Steven G. Johnson * acx_pthread.m4: remove pthread.h test * acx_pthread.m4: synchronize formatting with AC archive 2001-11-06 FFTW Maintainers * threads/fftw_threads.c: fix thread parallelization on Solaris 2001-06-27 Steven G. Johnson * ChangeLog: updated 2001-06-21 Steven G. Johnson * configure.in: added IBM AIX mpi cc command 2001-04-21 fftw * doc/fftw.texi: removed extraneous @end * acinclude.m4: fixed underquoting bug (caused configure script to not work) 2001-04-21 Steven G. Johnson * fortran/f77_test.F: more compilation notes 2001-04-01 fftw * acinclude.m4: Use -O3 instead of -O6 with gcc. -O6 isn't a real flag anyway, and it is not recognized by some versions of gcc (notably, Apple's hacked-up version on MacOS X). 2001-03-08 fftw * acx_pthread.m4: check for -mt *after* -lpthread. -mt links only -lthread, but this sometimes mysteriously works, and I don't want to link in more than I have to or rely on something which seems to be undocumented(?). 2001-02-16 fftw * configure.in: Steven Berukoff reports that -lmpich is needed, even with mpicc, for some MPI installations. 2000-12-30 fftw * acx_pthread.m4: minor comment fix * acx_pthread.m4: clarified -mt effects 2000-12-21 Steven G. Johnson * acx_pthread.m4: not sure if -mt uses -lpthread... * acx_pthread.m4: added -mt flag 2000-12-09 fftw * acx_pthread.m4: fixed position of AC_REQUIRE * FAQ/fftw-faq.bfnn: addressed finite-precision floating-point in FAQ 2000-10-22 fftw * acx_pthread.m4: fixed comment * gensrc/genfft.ml, gensrc/symmetry.ml: whoops, undo accidental commit * acx_pthread.m4, gensrc/genfft.ml, gensrc/symmetry.ml: many changes 2000-10-16 fftw * doc/fftw.texi: point rfftw users to fftw for prime sizes 2000-10-04 fftw * acinclude.m4: newer xlc versions reportedly accept -qarch=auto to automatically tune for the native host. 2000-07-03 fftw * acinclude.m4: Punt on guessing -qarch/-qtune flags for AIX, since there seems to be no good way to guess the CPU. 2000-06-26 Matteo Frigo * fftw/fftwnd.c: Unrolled loop to expose more parallelism. 2000-06-07 fftw * configure.in: Added "mpcc" MPI compiler for IBM SP3. thanks to Ferenc Molnar for the information. 2000-06-03 Matteo Frigo * gensrc/complex.ml, gensrc/complex.mli, gensrc/genfft.ml, gensrc/symmetry.ml, gensrc/variable.ml: Implemented mp3mdct generation mode for generating the MDCT used in mp3. 2000-06-02 Matteo Frigo * cilk/executor_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/fftwnd_cilk.cilk, cilk/Makefile, cilk/test_cilk.cilk, cilk/time_cilk.cilk, fftw/malloc.c, fftw/planner.c, fftw/putils.c, fftw/rader.c, fftw/twiddle.c: Adapted (simplified) to the forthcoming Cilk-5.3 * gensrc/exprdag.ml: Iterate optimization until convergence. Saves two fops in fhb_9.c 2000-05-29 fftw * acx_pthread.m4: The autoconf folks like the macro name to be quoted in AC_DEFUN. 2000-05-20 fftw * fftw/fftw.h.in: If the user includes before , then use the new C99 complex type for fftw_complex. This way, all the arithmetic operators, etcetera, are available to the user. The C99 complex type should be binary-compatible with FFTW's struct-based type. * gensrc/ast.ml: deleted unused file 2000-05-19 Steven G. Johnson * acx_pthread.m4: synchronized with macro archive, and added in Sequent -Kthread support. 2000-04-05 Steven G. Johnson * doc/fftw.texi: slight change for clarity 2000-03-31 Steven G. Johnson * acx_pthread.m4: only have one @author line, in accordance with needs of the autoconf macro archive. 2000-03-24 fftw * acx_pthread.m4: check to see if threads work with no arguments before trying -kthread, to avoid compiler warnings on such systems. 2000-03-23 fftw * configure.in: output message change 2000-03-23 Steven G. Johnson * acx_pthread.m4: minor change * acx_pthread.m4: try PTHREAD_LIBS and PTHREAD_CFLAGS environment variables first * acx_pthread.m4: Added FreeBSD LinuxThreads port (-llthread) support. Thanks to Jonathan Wilkins for his time and the use of his machine. 2000-03-21 fftw * acx_pthread.m4: fixed AC_DEFINE for HAVE_PTHREAD * acx_pthread.m4: added acknowledgments * acx_pthread.m4: include description strings for AC_DEFINEs so that autoheader will work * acx_pthread.m4: check for pthread.h before checking for threads libraries * acx_pthread.m4: don't check for cc_r if threads weren't found * acx_pthread.m4: check for -kthread, then -lpthread, then -pthread * threads/fftw_threads_test.c: added missing newline to error message * doc/fftw.texi: documented --with-openmp and --with-sgimp * threads/fftw_threads.c: bug fix in compiler thread directive loop 2000-03-20 fftw * configure.in, fftw/config.h.in, threads/fftw_threads.c, threads/fftw_threads-int.h: added experimental support for openmp and sgi mp compiler directives for threads code * Makefile.am: make sure acx_pthread.m4 is included in the dist * acx_pthread.m4: minor rewording in comment * acx_pthread.m4, configure.in, fftw/config.h.in, threads/fftw_threads.c: Separated POSIX threads library checks into a separate macro (ACX_PTHREAD) for submission to the autoconf macro repository (replacing an earlier macro there by Alejandro Cuervo). Also, added checks for -pthread compiler flag required on FreeBSD (thanks to Jonathan Wilkins for the use of his machine for testing). 2000-03-02 Steven G. Johnson * ChangeLog: fixed email addresses * ChangeLog: updated * mpi/sched.c, mpi/test_transpose_mpi.c, mpi/transpose_mpi.c, rfftw/rexec2.c, rfftw/rexec.c, rfftw/rfftwf77.c, rfftw/rfftw.h, rfftw/rfftwnd.c, rfftw/rgeneric.c, rfftw/rplanner.c, tests/fftw_test.c, tests/rfftw_test.c, tests/test_main.c, threads/executor_threads.c, threads/fftw_f77_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.c, threads/fftw_threads.h, threads/fftw_threads-int.h, threads/fftw_threads_test.c, threads/rexec2_threads.c, threads/rexec_threads.c, threads/rfftw_f77_threads.c, threads/rfftwnd_threads.c, threads/rfftw_threads.h, threads/rfftw_threads_test.c, configure.in, fftw/executor.c, fftw/f77_func.h, fftw/fftwf77.c, fftw/fftw-int.h, fftw/fftwnd.c, fftw/generic.c, fftw/malloc.c, fftw/planner.c, fftw/putils.c, fftw/rader.c, fftw/timer.c, fftw/twiddle.c, fftw/wisdom.c, fftw/wisdomio.c, gensrc/codelet_prelude, gensrc/config_prelude, gensrc/rconfig_prelude, matlab/fftw.c, mpi/fftw_f77_mpi.h, mpi/fftw_mpi.c, mpi/fftw_mpi.h, mpi/fftw_mpi_test.c, mpi/fftwnd_mpi.c, mpi/rfftw_f77_mpi.c, mpi/rfftw_mpi.h, mpi/rfftw_mpi_test.c, mpi/rfftwnd_mpi.c, mpi/TOMS_transpose.h: whoops, kill acx_pthread test code Wed Feb 23 17:07:23 2000 fftw * mpi/README.f77: noted column-major slab decomposition Tue Feb 22 00:23:44 2000 Matteo Frigo * doc/fftw.texi: Changed ``@iftex\\@tex\\@end tex\\@end iftex'' to ``@tex\\@end tex'' because nesting is broken with texi2dvi-3.12 and texi2dvi-4.00. I don't know whether this is a texi2dvi bug or our fault. (Nesting works properly if one does not use texi2dvi.) Mon Feb 14 19:41:37 2000 Matteo Frigo * gensrc/rconfig_prelude: Removed copyright, because it is added by makerconfig.sh. Fri Feb 11 07:15:05 2000 fftw * FAQ/fftw-faq.bfnn: Noted problems with DEC CC. Thanks to Xavier Marduel for the bug report. Sun Feb 6 20:01:52 2000 fftw * gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am, mpi/Makefile.am, threads/Makefile.am: Use $(srcdir)/foo instead of $<, since according to GNU Makefile conventions document, many non-GNU 'make' implementations only set $< for implicit rules. Thu Jan 27 16:18:03 2000 fftw * configure.in, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am, mpi/Makefile.am, threads/Makefile.am: Used $@, $< in Makefile rules for srfftw.h, etcetera. This should fix things in VPATH builds; thanks to Michael Poole for the suggestion. Wed Nov 10 20:01:40 1999 Steven G. Johnson * threads/fftw_threads-int.h: Yikes! Self-#include should be fftw_threads.h. Mon Nov 8 00:53:35 1999 Steven G. Johnson * NEWS: noted (expected) 2.1.3 release date * doc/texi2html, AUTHORS: Updated Matteo's email address. * README: Noted mailing list URL. Sun Nov 7 19:15:52 1999 Steven G. Johnson * doc/fftw.texi: Reference latest version of gcc bug report. * acinclude.m4: Updated stack alignment check to also check for misaligned main() (due to OS/libc/loader problems), and to reference latest version of gcc bug report. Fri Nov 5 01:49:21 1999 Steven G. Johnson * NEWS: Thanked Diab Jerius for CFLAGS patch. * NEWS: noted that configure no longer overrides CFLAGS. * acinclude.m4: Fixed code so that configure will not override the CFLAGS environment variable. Tue Nov 2 23:52:02 1999 Steven G. Johnson * rfftw/rfftwnd.c, doc/fftw.texi: Ugh, ugh, triple ugh! Had to modify the rule for stride interpretation of in-place rfftwnd transforms to handle a pathological case. Before, if you did howmany transforms of size 1 (stride=1, dist=1) both the r2c and c2r transforms would work okay, BUT: the input of the r2c transform would have the required "padding" elements to make room for the complex output, while the c2r transform would output real numbers *without* padding (because of the idist==1 -> odist_t=1 rule). Thus, we'd have the bizarre situation of r2c + c2r = input in different order (no padding). This caused the rfftwnd_mpi tests to fail for Nx1 transforms (N > 2). So, I've modified the rule slightly to idist==1 && idist < istride. This should continue to make rfftwnd do what we want in all the ordinary cases, but fixes this case. Mon Nov 1 22:31:14 1999 Steven G. Johnson * NEWS: noted that gcc stack alignment bug was only on x86. Sun Oct 31 23:17:12 1999 Steven G. Johnson * mpi/test_transpose_mpi.c: got rid of unused variables. * mpi/test_sched.c: got rid of unused variable * mpi/rfftw_f77_mpi.c: fixed typo * configure.in: awk -F can't be followed by a space in older awk's. * mpi/Makefile.am: added README.f77 to distribution * mpi/README.f77: minor fixes * fortran/fftw_f77.i: changed "c" comments to "!" to accommodate f90 freeform mode. Also added params for experimental MPI wrappers. Fri Oct 29 21:41:59 1999 Steven G. Johnson * mpi/README.f77, mpi/fftw_f77_mpi.h: minor additions to documentation * Makefile.am: disable autoheader here too (it was a problem once today; why not before?) * mpi/README.f77, NEWS: Added description of experimental MPI wrappers. * acinclude.m4, configure.in: Use AC_F77_LIBRARY_LDFLAGS when attempting to link Fortran with C code in ACX_F77_FUNC_MANGLE. * fftw/config.h.in, mpi/Makefile.am, mpi/fftw_f77_mpi.c, mpi/fftw_f77_mpi.h, mpi/rfftw_f77_mpi.c, configure.in: Added experimental Fortran-callable wrappers for the MPI transforms. * acinclude.m4: small fix Thu Oct 28 19:53:33 1999 Steven G. Johnson * doc/fftw.texi: Noted stack alignment bug in gcc 2.95.[012]. * NEWS, acinclude.m4, configure.in: Work around buggy stack alignment in gcc-2.95.x. * acinclude.m4, configure.in: Reorganized macros in acinclude.m4 somewhat. New checks for -fstrict-aliasing and try to guess cpu type on powerpc by looking at /proc/cpuinfo (using -mcpu=750 makes a ~10% difference on a PowerPC G3). Tue Oct 26 21:45:06 1999 Steven G. Johnson * tests/test_main.c: Added obligatory new joke for 2.1.3 release. * threads/executor_threads.c, threads/rexec_threads.c, rfftw/rexec.c, rfftw/rexec2.c, gensrc/to_c.ml, fftw/executor.c, fftw/fftw-int.h: Technically, macros with empty argument lists invoke undefined behavior in ANSI C, although they will be allowed in the C99 language revision. Fix HACK_ALIGN_STACK_* macros to remove this usage. * fftw/config.h.in, fftw/fftw-int.h, doc/fftw.texi, configure.in: --enable-i386-hacks is no longer needed in gcc-2.95+ (i.e. versions which have the -mpreferred-stack-boundary flag). * fftw/fftw-int.h: Indented alignment #preprocessor statements to make them more readable. Also, made it so that you can use --debug-alignment even without --enable-i386-hacks. Tue Oct 26 16:17:51 1999 Matteo Frigo * ChangeLog: Updated ChangeLog Tue Oct 26 05:47:25 1999 Steven G. Johnson * acinclude.m4: No point in doing both -mcpu and -mtune (-mcpu includes -mtune). * doc/fftw.texi: Some fixes in Fortran docs. * rfftw/rexec.c, rfftw/rplanner.c, fftw/config.h.in, fftw/executor.c, fftw/planner.c, configure.in: Vector recursion is now enabled by a --enable-vec-recurse flag (disabled by default). * NEWS: Added version number. Tue Sep 28 09:13:39 1999 Steven G. Johnson * rfftw/rplanner.c, fftw/planner.c: Disable vector recursion for now. * fftw/rader.c, fftw/twiddle.c, fftw/config.h.in, fftw/fftw-int.h, FAQ/fftw-faq.bfnn, NEWS, configure.in: Fixed overflow for (x*y)%p in Rader routines (for complex transforms of prime sizes). Thanks to Ezio Riva (ERiva@artis-software.com) for the bug report. Thu Aug 19 03:08:29 1999 Steven G. Johnson * NEWS: Noted Matlab wrapper bug fix. Tue Aug 17 18:46:54 1999 Steven G. Johnson * matlab/fftw.c: Fixed bug (memory leak; a new plan is created on each call for the multi-dim. transforms). Thanks to Matthew Davis for the bug report. Wed Jul 28 19:12:15 1999 Steven G. Johnson * NEWS, configure.in: Fixed configure script problems with --enable-threads on Digital Unix. Tue Jul 27 20:03:22 1999 Steven G. Johnson * fftw.spec.in: Many changes, including several based on suggestions by Keith Amidon . Now install into the "build root" at build time so that building the RPM does not affect existing FFTW installations (and doesn't require root privileges). Compilation (and configuration) now only occurs during the build phase. Post install and uninstall scripts run ldconfig to update the linker database, and warn the user if the install directory is not in /etc/ld.so.conf. Finally, the double-precision libraries are installed into the standard [r]fftw names instead of under d[r]fftw. * tests/test_main.c: Minor cleanup. Sat Jul 24 20:32:58 1999 Steven G. Johnson * tests/test_main.c, tests/test_main.h: Added -1 (--only-one-speed-test) option, as I'm tired of waiting for the 8 different speed tests to run when I only want one. * threads/fftw_threads_test.c, threads/rfftw_threads_test.c, tests/fftw_test.c, tests/rfftw_test.c, tests/test_main.c, tests/test_main.h, rfftw/rplanner.c, mpi/fftw_mpi_test.c, mpi/rfftw_mpi_test.c, fftw/fftw-int.h, fftw/fftw.h.in, fftw/fftwnd.c, fftw/planner.c, fftw/putils.c, fftw/rader.c, fftw/wisdom.c, fftw/wisdomio.c: Implemented new FFTW_NO_VECTOR_RECURSE flag to inhibit use of vector recursion. This flag is used internally in the planner to prevent vector recursion at anything other than the top level of the plan (instead of the planner_depth stuff used previously), and insures that the correct wisdom is used. (Note, however, that the wisdom is still not specific to the vector_size parameter; this needs to be fixed.) Mon Jul 19 17:04:16 1999 Steven G. Johnson * fftw/fftw-int.h: Added a comment about why we have macros for trig. functions. Mon Jun 21 16:01:44 1999 fftw * FAQ/fftw-faq.bfnn: Noted that SGI MipsPro bugs seem to have been fixed. Also mentioned problems with egcs-1.0.2 on the PowerPC. Sat Jun 19 17:47:28 1999 fftw * FAQ/fftw-faq.bfnn: Noted incorrect code generation in Metrowerks CodeWarrior Pro 4 for the Macintosh. (Maybe we should rename this FAQ question?) Fri Jun 18 19:20:28 1999 fftw * FAQ/m-html.pl: Updated FFTW Manual bookmark. Sat Jun 12 05:03:31 1999 fftw * doc/fftw.texi: Added clarifications to fftwnd reference, as suggested by John F. Gibson of Cornell. Tue Jun 8 22:17:35 1999 fftw * threads/fftw_threads-int.h, tests/test_main.c, matlab/fftw.m, gensrc/README, matlab/README, fftw/fftw-int.h, doc/fftw.texi, FAQ/html.refs, FAQ/m-html.pl, cilk/README, FAQ/fftw-faq.bfnn, TODO, fftw.spec.in, Makefile.am, README: Great URL change: web page -> www.fftw.org, ftp -> ftp.fftw.org, email -> @fftw.org. Note that currently, this means that some of links in the documentation are broken (links to sub-pages within the main FFTW site). This will be fixed once we get real hosting for fftw.org. Mon Jun 7 23:36:19 1999 fftw * fftw/config.h.in, fftw/fftw-int.h: Added warnings to flaky MacOS nanosecond timer routines. (The ordinary Mac timer routines, with microsecond accuracy (in theory) are okay.) Tue Jun 1 21:52:50 1999 fftw * fftw/fftw-int.h: Oops, I declared fftw_time twice. * fftw/fftw-int.h: Incorporated new timer code by Sampo Niskanen. Mon May 31 17:45:34 1999 Matteo Frigo * acinclude.m4: Added -arch host to osf-alpha CFLAGS. Sat May 29 20:38:03 1999 fftw * Makefile.am: slight reformatting. * Makefile.am: Make sure lynx doesn't attempt to reformat logo gif data. * NEWS: Noted the date of each release (plus or minus a day or two, in some cases). Merged release notes for beta releases with those of final releases. Sat May 29 04:28:29 1999 Steven G. Johnson * ChangeLog: ChangeLog now reflects all revisions of FFTW (instead of starting at 6/11/98). * ChangeLog: Updated change log. Sat May 29 03:25:59 1999 fftw * doc/fftw.texi: Fixed another typo. * doc/fftw.texi: Typo fix. Fri May 28 19:33:41 1999 fftw * fftw.spec.in, Attic/fftw.spec, Makefile.am, configure.in: You can now build the RPM package by running 'make rpm' (as root) after 'make dist'. fftw.spec is now kept in sync automatically with the version numbers in configure.in. Thu May 27 05:48:57 1999 fftw * threads/rexec_threads.c, rfftw/rplanner.c, threads/executor_threads.c, rfftw/rexec2.c, rfftw/rfftw.h, rfftw/rexec.c, fftw/rader.c, fftw/wisdom.c, fftw/putils.c, fftw/planner.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c: Initial version of "vector recursion" in executor. No vector codelets yet. The threads code works, but does not do vector recursion. No use of vector recursion for in-place howmany loops yet. Wed May 26 18:06:47 1999 fftw * gensrc/complex.ml: In times_3_3 routine, got rid of infinite loop for multiplication by non-constants (was biting us during generation of twiddle codelets). * gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/exprdag.ml, gensrc/complex.ml: Various cleanup * tests/test_main.c, fftw/config.h.in, fftw/fftw.h.in: Centralized tests for Windows (in config.h.in) and use HAVE_WIN32 elsewhere. Tue May 25 23:59:14 1999 fftw * NEWS: Removed extra period. * doc/fftw.texi: Noted possibility of "d" or "s" prefix in the tutorial (as requested by many users). * FAQ/fftw-faq.bfnn, Attic/fftw.spec, NEWS, configure.in: Bumped version number to 2.1.3, documented AIX threads fix. * threads/fftw_threads-int.h, threads/fftw_threads.c, fftw/fftw-int.h, configure.in, fftw/config.h.in, acinclude.m4: Fixed threads bug on AIX: pthread_create on AIX spawns detached (non-joinable) threads by default. Also fixed much autoconf lossage on AIX. Thanks to Jim Lindsay (lindsay@mill.acns.nwu.edu) for the bug report and for the use of Northwestern's SP2. * fftw/timer.c: Only use BSDgettimeofday if gettimeofday is not available (causes problems on some AIX systems). * tests/rfftw_test.c, tests/fftw_test.c, rfftw/rplanner.c, fftw/planner.c, fftw/fftw-int.h: Put (r)fftw_plan_hook in fftw-int.h, with a typedef, and used Andrew Sterian's DL_IMPORT macro to succor the lost souls using VC++. Fri May 21 17:58:30 1999 fftw * tests/test_main.c: Fixed typo in help string. Tue May 18 23:39:07 1999 fftw * threads/rfftw_threads_test.c, tests/test_main.h, threads/fftw_threads_test.c, tests/test_main.c, tests/rfftw_test.c, tests/fftw_test.c, mpi/rfftw_mpi_test.c, mpi/fftw_mpi_test.c, FAQ/fftw-faq.bfnn, NEWS: Whoops, found the real source of the MPI bug that was supposedly fixed in 2.1.2. MPI_Init can modify argv (and does so, for processes other than the first), but we passed the original argv to getopt. This is now fixed. (This is a bug in the MPI test programs of 2.1.2 also, but as it's only in the test programs and doesn't seem to bite us on any known MPI implementation, it can wait until the next FFTW release.) Sigh. Mon May 17 23:09:31 1999 fftw * NEWS: Went into more detail regarding the generator changes. Mon May 17 22:20:27 1999 Matteo Frigo * NEWS: Note reduction in rfftw code size. * gensrc/symmetry.ml, gensrc/genfft.ml, fftw/twiddle.c: Reduced code size and # of operations of rfftw twiddle codelets. Mon May 17 19:57:11 1999 fftw * ChangeLog: Updated * NEWS: Noted codelet generator speed. * gensrc/symmetry.ml, gensrc/genfft.ml, gensrc/fft.ml: Improved real{even|odd}2 transforms * doc/fftw.texi: Fixed typo. * gensrc/exprdag.ml: Improved simplifier for DCT-type transforms. * TODO: Noted that the transpose routines for MPI could use improving. * gensrc/symmetry.ml: Fixed comment. * gensrc/symmetry.ml, gensrc/genfft.ml, gensrc/fft.ml: Fixed modified DCT/DST generation (realeven2/realodd2) so that it works now. The simplifier really sucks for this, at the moment. Why? Sun May 16 23:59:33 1999 fftw * gensrc/genfft.ml: Fixed real[even,odd]2 codelet node type output. * gensrc/variable.ml, gensrc/variable.mli, gensrc/symmetry.ml, gensrc/genfft.ml: Added generators realeven2 and realodd2 for the modified DCT and DST (i.e. transforms for real data that are even/odd about n=-1/2, not n=0). * gensrc/exprdag.ml: Memoized eval for speed reasons. * gensrc/util.ml, gensrc/exprdag.ml: Implemented better statistics. * gensrc/exprdag.ml: Improved complexity of network transposition from O(n^2)=O(slow) to O(n) [times O(polylog)] * TODO: Noted that the generator can now output efficient hard-coded DCT/DST routines of small sizes. * gensrc/variable.mli, gensrc/variable.ml, gensrc/symmetry.ml, gensrc/genfft.ml, gensrc/complex.mli, gensrc/complex.ml: Added realeven and realodd codelet generation options. (They work.) Mon May 10 02:48:14 1999 fftw * doc/fftw.texi: Noted how to force compiler choice via CC env. variable. Also added "compiler" index entry. Fri May 7 20:12:11 1999 fftw * TODO, NEWS: Updated TODO. * README: Fixed Cilk URL. * NEWS: Noted GNU-style long options in the test programs. Thu May 6 22:35:05 1999 fftw * tests/test_main.c: --help option no longer causes an exit with an error code. * tests/test_main.c, configure.in, fftw/config.h.in: Test programs now use GNU-ly correct long options if getopt_long is available. * FAQ/fftw-faq.bfnn, NEWS: MPICH bug fix is apparently not specific to Linux (it also fixed the same problem on some Ultrasparcs). * Attic/fftw.spec: Updated for 2.1.2. * mpi/fftw_mpi_test.c: --only-parallel argument hack should also only be accessed by process 0. Wed May 5 23:02:12 1999 fftw * NEWS: Noted addition of omitted fftw_f77_threads_init function. * FAQ/fftw-faq.bfnn: Bug fix (dates need to have two digits for the day). * threads/rfftw_threads_test.c, threads/fftw_threads_test.c, tests/test_main.c, tests/test_main.h, tests/rfftw_test.c, tests/fftw_test.c, mpi/rfftw_mpi_test.c, mpi/test_transpose_mpi.c, FAQ/fftw-faq.bfnn, mpi/fftw_mpi_test.c, NEWS, configure.in: Fixed bug when running test programs under MPICH; prepared for 2.1.2 release. Sun Apr 18 04:16:39 1999 Steven G. Johnson * Attic/fftw.spec: Made package relocatable. * Attic/fftw.spec: Created spec file for generating RPM packages of FFTW. * FAQ/fftw-faq.bfnn: Revised linker FAQ entry. Mon Apr 12 19:34:17 1999 fftw * tests/test_main.c: Added joke. Sat Apr 10 00:14:37 1999 fftw * FAQ/fftw-faq.bfnn: Added linker FAQ entry. Wed Apr 7 17:17:48 1999 Steven G. Johnson * threads/fftw_f77_threads.c: Added missing fftw_f77_threads_init function (thanks to V. Sundararajan for pointing out the omission). Tue Apr 6 19:29:13 1999 Steven G. Johnson * configure.in: Check for hcc in addition to mpicc (hcc is used by the LAM MPI implementation). Wed Mar 31 00:54:20 1999 Steven G. Johnson * NEWS, doc/fftw.texi, ChangeLog: Fixed credit for 2.1.1 bug fix (real credit goes to Ming-Chang Liu, according to Jeff Briedenbach, whose name was misspelled anyway). Tue Mar 30 18:19:21 1999 Steven G. Johnson * FAQ/fftw-faq.bfnn: Moderated language. * NEWS: This isn't LaTeX, Matteo; an en dash in a monospaced font is rendered the same as a hyphen (i.e. "-" not "--"). Mon Mar 29 19:23:24 1999 Matteo Frigo * ChangeLog: Updated * NEWS: Minor change. Sun Mar 28 20:24:30 1999 Matteo Frigo * tests/rfftw_test.c, tests/fftw_test.c: Implemented paranoid check for real->complex and complex->real transforms Sun Mar 28 00:11:47 1999 fftw * NEWS: Moderated language. I do not want to claim that the bug occurs in `rare' circumstances. A bug is a bug, period. * tests/fftw_test.c, rfftw/rplanner.c: Implemented paranoid check for in-place complex planners. I still don't know how to check real->complex plans, though (apart from rewriting test_ergun for real->complex and complex->real) Fri Mar 26 22:58:57 1999 Steven G. Johnson * doc/fftw.texi, FAQ/fftw-faq.bfnn, NEWS: Updated documentation for FFTW 2.1.1. * configure.in: Updated version number for 2.1.1 (as well as shared lib. version). * threads/Makefile.am, mpi/Makefile.am: Fixed typo in comment. * threads/fftw_threads_test.c, threads/rfftw_threads_test.c, mpi/rfftw_mpi_test.c, mpi/fftw_mpi_test.c: Added definition of enter_paranoid_mode() to threads & MPI test programs. * fftw/planner.c: Slight modification for future safety (not necessary now). Thu Mar 25 02:29:08 1999 Matteo Frigo * tests/test_main.c, tests/test_main.h, tests/rfftw_test.c, tests/fftw_test.c, fftw/planner.c: Added hooks for paranoid verification of every single plan. Tue Mar 23 17:44:35 1999 Matteo Frigo * fftw/generic.c: Array read out of bounds---fixed. Thanks to Jeff Breiden. Tue Mar 9 01:40:54 1999 Steven G. Johnson * FAQ/fftw-faq.bfnn: Noted free-ness in "What is FFTW?" description. Mon Mar 8 20:21:46 1999 Steven G. Johnson * threads/fftw_threads.c: By default, don't even try to specify PTHREAD_SCOPE_SYSTEM, since it causes problems on @!#%$ IRIX 6.5 (in which PTHREAD_SCOPE_SYSTEM is not supported, but pthread_attr_setscope doesn't return an error!!!). Just use the default attributes (fftw_pthread_attributes_p == NULL). * threads/fftw_threads.c: Fixed typo in comment. * NEWS: Added 2.1 news. Mon Mar 8 18:00:37 1999 fftw * tests/rfftw_test.c, tests/fftw_test.c: Fixed pow(8192, x) --> pow(8192.0, x) . This failed on Digital unix, I don't know why. Mon Mar 8 15:16:51 1999 Matteo Frigo * ChangeLog: Updated * configure.in: Updated version number Sun Mar 7 19:47:54 1999 Steven G. Johnson * doc/fftw.texi: a_slow_array --> a_bad_array * doc/fftw.texi: Removed all reference to performance from "Dynamic Arrays--The Wrong Way" section. * doc/fftw.texi: Clarified output parameter of Fortran multi-dimensional in-place transforms. * NEWS, doc/fftw.texi: Thanks to Erik Scheirer (boom@sonyx.com) for testing the Mach C threads code. Sat Mar 6 05:59:42 1999 Steven G. Johnson * mpi/fftw_mpi_test.c: Added undocumented --only-parallel flag. * threads/rfftw_f77_threads.c, threads/fftw_f77_threads.c, threads/Makefile.am, doc/fftw.texi, NEWS: Added Fortran-callable wrappers for the multi-threaded routines. Thu Feb 25 16:42:10 1999 Steven G. Johnson * threads/fftw_threads.c, threads/fftw_threads-int.h: Made pthreads code more tolerant if user doesn't call fftw_threads_init. * tests/rfftw_test.c, tests/fftw_test.c, mpi/rfftw_mpi_test.c, mpi/fftw_mpi_test.c: Reduced array sizes somewhat for planner tests. Wed Feb 24 21:43:26 1999 Steven G. Johnson * doc/fftw.texi: Added user thank-you to acknowledgements. * doc/fftw.texi: Clarified output format of 1d MPI transforms. * FAQ/fftw-faq.bfnn: Small change. Wed Feb 24 19:45:30 1999 fftw * FAQ/fftw-faq.bfnn: Changed wording regarding VC++5.0. * doc/texi2html: Fixed bug in index generation Wed Feb 24 04:16:19 1999 Steven G. Johnson * doc/fftw.texi: moved configure to fpindex, and added more entries. * doc/fftw.texi: Added more padding index entries. * doc/fftw.texi: Objective Caml -> Caml in the index. * doc/fftw.texi: Added @cindex floating-point precision * doc/fftw.texi: Updated index. * doc/fftw.texi: typo fix: rfftwnd_threads_*_one -> rfftwnd_threads_one_* * doc/fftw.texi: Print table of contents at the end, as directed by the texinfo manual, so that pagination is not screwed up when the TOC has an odd number of pages. Tue Feb 23 04:32:15 1999 Steven G. Johnson * doc/fftw.texi: Fixed typo. * doc/fftw.texi: Indentation fix. Mon Feb 22 19:20:41 1999 Matteo Frigo * ChangeLog: Updated Mon Feb 22 19:16:12 1999 Steven G. Johnson * FAQ/fftw-faq.bfnn: Noted workaround for buggy SGI compilers. * ChangeLog: Line-wrapped (I wish you would remember to do this, Matteo). * gensrc/Makefile.rfftw.am, mpi/Makefile.am, threads/Makefile.am, gensrc/Makefile.fftw.am: Got rid of hackery in header creation, since circular dependencies are gone. Also added prefixed headers to CLEANFILES so they get deleted by 'make clean'. * configure.in: Used xyz for prefix1 instead of just x, to make future conflicts less likely. Mon Feb 22 18:55:16 1999 Matteo Frigo * configure.in: Fix for irix didn't work, let's try this * ChangeLog: Fixed typo * ChangeLog: Updated * configure.in: Accounted for irix thread lossage * tests/test_main.c: usage() must normally exit, otherwise the test programs tries to read argv[] out of bounds. * doc/Makefile.am: fftw.ps used compressed fonts * gensrc/Makefile.rfftw.am, gensrc/Makefile.fftw.am: rfftw.h didn't go into distribution. Fixed * threads/Makefile.am, gensrc/Makefile.rfftw.am, mpi/Makefile.am, configure.in, gensrc/Makefile.fftw.am: Removed circular dependencies * configure.in: Fixed typo Mon Feb 22 05:19:40 1999 Steven G. Johnson * tests/test_main.c: Added some new jokes. Also, print out floating-point precision for -v. * mpi/rfftw_mpi_test.c, threads/Makefile.am, gensrc/Makefile.rfftw.am, mpi/Makefile.am, mpi/fftw_mpi_test.c, gensrc/Makefile.fftw.am: Made sure header files are not deleted when no prefix is added. (Also got rid of some extraneous newlines printed by mpi code.) * configure.in, NEWS: Renamed 2.1 -> 2.1-beta1. * doc/Makefile.am: make clean shouldn't remove rfftwnd.gif. Sun Feb 21 20:33:51 1999 Steven G. Johnson * NEWS: Feature set for 2.1 is now frozen (I think). * doc/fftw.texi: slight change * mpi/Makefile.am, threads/Makefile.am, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am: Whoops! Don't include XXX_FFTW_PREFIX_XXX header files in CLEANFILES, because that will cause 'make clean' to delete irreplaceable files when no prefix is being used. * mpi/Makefile.am, threads/Makefile.am, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am: Fixed installed headers to use FFTW_PREFIX for their own header inclusions. * configure.in, doc/fftw.texi, NEWS: Documented --enable-type-prefix. * mpi/Makefile.am, tests/Makefile.am, threads/Makefile.am, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am, acinclude.m4, configure.in: Use FFTW_PREFIX for all installed files. * configure.in: Use g77 in preference to fort77. Sun Feb 21 17:56:49 1999 Matteo Frigo * tests/Makefile.am: Fixed forgotted XXX_FFTW_NAME_XXX * configure.in: Allowed user specification of [r]fftw-name Sun Feb 21 17:35:28 1999 fftw * tests/Makefile.am, configure.in, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am, acinclude.m4: (Preliminary) hack: allow user to change name of fftw library. * configure.in: Incremented shared library version number. * configure.in: Added rfftw_mpi.h to list of files to install for --enable-mpi. Sat Feb 20 23:00:41 1999 Steven G. Johnson * FAQ/fftw-faq.bfnn: The ascii and info (but not html) versions of the FAQ were chopping off the answer to the last question. Rather than fix the bug, I just added a trailing comment like in the Linux FAQ, which seems to correct the problem. * FAQ/fftw-faq.bfnn: Minor fixes and updates for 2.1. * mpi/rfftw_mpi_test.c, mpi/fftw_mpi.h, mpi/fftw_mpi_test.c, mpi/fftw_mpi.c: Share plans between forward and backward fftw_mpi plans (and between other fftw_mpi plans of the same size). * tests/rfftw_test.c, tests/fftw_test.c: In -p test with rank > 1, reduce the size of the arrays for the plan. * mpi/transpose_mpi.c: Got rid of compiler warning (code was okay, though). * doc/fftw.texi: small fix. Sat Feb 20 03:27:36 1999 fftw * doc/fftw.texi: Minor tweaks Sat Feb 20 02:57:37 1999 Steven G. Johnson * doc/Makefile.am, doc/rfftwnd.gif: fig2dev gif output stinks; "manually" add better version of gif figure. * doc/fftw.texi: Added link. * doc/Makefile.am: Make sure to distribute rfftwnd.fig. * doc/fftw.texi: Some post-reorganization grooming. * configure.in: Whoops! Use $enableval, not $withval, in AC_ARG_ENABLE. Fri Feb 19 23:50:45 1999 Matteo Frigo * doc/Makefile.am, doc/fftw.texi: Added picture to postscript manual Fri Feb 19 23:29:07 1999 fftw * configure.in: Added fort77 to list of fortran compiler (linux f2c comes with a program with this name) * doc/rfftwnd.gif, doc/rfftwnd.fig, doc/Makefile.am: Reverse-engineered rfftwnd picture from postscirpt to fig, so I can edit it and produce smaller postscript. (Linux rules!) * doc/fftw.texi: Restructured manual Fri Feb 19 20:32:13 1999 Steven G. Johnson * fftw/config.h.in, threads/fftw_threads-int.h, configure.in, doc/fftw.texi, NEWS: Added untested support for Mach C threads. Also changed three --with options to --enable. Fri Feb 19 17:22:38 1999 Matteo Frigo * threads/rfftw_threads_test.c, threads/rfftwnd_threads.c, threads/rexec2_threads.c, threads/rexec_threads.c, threads/rfftw_threads.h, threads/fftw_threads_test.c, threads/fftwnd_threads.c, threads/fftw_threads.c, threads/fftw_threads.h, threads/executor_threads.c, threads/fftw_threads-int.h, tests/test_main.c, tests/fftw_test.c, tests/rfftw_test.c, rfftw/rgeneric.c, rfftw/rplanner.c, rfftw/rfftwf77.c, rfftw/rfftwnd.c, rfftw/rexec2.c, rfftw/rfftw.h, mpi/transpose_mpi.c, rfftw/rexec.c, mpi/sched.h, mpi/test_sched.c, mpi/test_transpose_mpi.c, mpi/rfftw_mpi_test.c, mpi/rfftwnd_mpi.c, mpi/sched.c, mpi/fftwnd_mpi.c, mpi/rfftw_mpi.h, mpi/fftw_mpi.c, mpi/fftw_mpi.h, mpi/fftw_mpi_test.c, mpi/TOMS_transpose.h, matlab/fftw.c, mpi/TOMS_transpose.c, gensrc/variable.ml, gensrc/variable.mli, gensrc/util.mli, gensrc/twiddle.ml, gensrc/util.ml, gensrc/to_c.mli, gensrc/symmetry.ml, gensrc/to_c.ml, gensrc/schedule.ml, gensrc/schedule.mli, gensrc/number.mli, gensrc/rconfig_prelude, gensrc/magic.ml, gensrc/number.ml, gensrc/fft.ml, gensrc/genfft.ml, gensrc/exprdag.mli, gensrc/expr.ml, gensrc/expr.mli, gensrc/exprdag.ml, gensrc/dag.ml, gensrc/dag.mli, gensrc/complex.ml, gensrc/complex.mli, gensrc/asched.mli, gensrc/ast.ml, gensrc/asched.ml, fftw/wisdomio.c, fortran/f77_test.F, fftw/twiddle.c, fftw/wisdom.c, fftw/rader.c, fftw/timer.c, fftw/planner.c, fftw/putils.c, fftw/generic.c, fftw/malloc.c, fftw/fftwf77.c, fftw/fftwnd.c, fftw/fftw-int.h, fftw/fftw.h.in, fftw/executor.c, fftw/f77_func.h, fftw/config.h.in, cilk/time_cilk.cilk, doc/fftw.texi, cilk/fftwnd_cilk.cilk, cilk/test_cilk.cilk, cilk/executor_cilk.cilk, cilk/fftw_cilk.cilkh, COPYRIGHT, ChangeLog: Fixed copyright year Fri Feb 19 06:12:37 1999 Steven G. Johnson * doc/fftw.texi: Minor changes. * doc/fftw.texi: Various updates. * doc/fftw.texi: Acknowledged Steven's long-suffering advisor. =) * doc/fftw.texi: Noted that 1d complex MPI transforms are supported. * NEWS: Noted rfftwnd illustration. * README: Moved threads, mpi, and fortran descriptions to be under "official" header. * TODO: Removed parallel rfftw from TODO (it's done). * doc/rfftwnd.gif, doc/fftw.texi, doc/Makefile.am: Added rfftwnd illustration to the manual (HTML version only). Thu Feb 18 22:44:08 1999 Steven G. Johnson * doc/fftw.texi: rfftwnd_mpi documentation bug fix. Tue Feb 16 23:24:36 1999 Steven G. Johnson * doc/fftw.texi: Noted library requirements of 1D MPI. * mpi/fftw_mpi.h, mpi/fftw_mpi.c, doc/fftw.texi: Added scrambled input/output options (flags) for 1d mpi transforms. * cilk/Makefile: Don't complain if Makefile.common doesn't exist. * mpi/fftw_mpi_test.c: Fixed printf. * mpi/Makefile.am: Made sure headers are included in make dist. * doc/fftw.texi: Documented 1D MPI transforms in manual. * mpi/fftw_mpi.c, mpi/fftw_mpi.h, mpi/fftw_mpi_test.c, mpi/Makefile.am, NEWS: Added MPI 1D FFT for those crazy guys at Caltech. * NEWS, doc/fftw.texi: Documented real MPI transforms. * mpi/rfftw_mpi_test.c: Small fix. Mon Feb 15 23:50:41 1999 Steven G. Johnson * mpi/rfftw_mpi_test.c, mpi/rfftwnd_mpi.c, mpi/fftw_mpi_test.c, mpi/rfftw_mpi.h, configure.in, mpi/Makefile.am: Added rfftw MPI transforms. * mpi/Attic/transpose_mpi.h: this header file is now part of fftw_mpi.h * doc/fftw.texi: fixed quote marks. * doc/fftw.texi: Fixed typo. * doc/fftw.texi: Fixed parallel ref. in intro. * doc/fftw.texi: fixed typo * doc/fftw.texi: Noted stupid Fortran identifier length limitation. * doc/fftw.texi: hyphenation fix * doc/fftw.texi: Fixed cross-reference. * doc/fftw.texi: small fix * doc/fftw.texi: Clarifications in the MPI section. * doc/fftw.texi: bug fix. * doc/fftw.texi: Fixed @uref tags. * NEWS: Noted MPI updates. * doc/fftw.texi: Added documentation reference to MPI FFTW in parallel overview. * mpi/Attic/README, doc/fftw.texi: Folded MPI documentation into main manual. * mpi/transpose_mpi.c: bug fix: when a process didn't have any local data, we weren't able to distinguish between in-place and out-of-place transposes, and were also incorrectly thinking that all block sizes were equal. Sun Feb 14 20:21:50 1999 Steven G. Johnson * tests/test_main.h, tests/test_main.c, mpi/Attic/test_fftwnd_mpi.c, mpi/Attic/time_fftwnd_mpi.c, mpi/fftw_mpi_test.c, configure.in, mpi/Makefile.am: Use standard fftw test program template for MPI tests. * fftw/malloc.c: Whoops! * fftw/malloc.c: fixed omission from last checkin. * configure.in: Fixed typo and updated version number to 2.1. * mpi/transpose_mpi.c, mpi/Attic/time_fftwnd_mpi.c, mpi/test_transpose_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/fftwnd_mpi.c, mpi/fftw_mpi.h: Added option of doing out-of-place transpose, so that we can take advantage of MPI_Alltoall primitive if the user provides enough space. * threads/fftw_threads.c: Don't require system to support PTHREAD_SCOPE_SYSTEM (although we prefer this over PTHREAD_SCOPE_PROCESS). * gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am: Include f77 wrapper files in sources. * mpi/transpose_mpi.c, mpi/Attic/time_fftwnd_mpi.c, mpi/test_transpose_mpi.c, mpi/Attic/fftwnd_mpi.h, mpi/Attic/test_fftwnd_mpi.c, mpi/sched.c, mpi/fftw_mpi.h, mpi/fftwnd_mpi.c, mpi/Makefile.am, mpi/TOMS_transpose.c, mpi/TOMS_transpose.h, mpi/Attic/Makefile, Makefile.am, configure.in: Integrated mpi stuff into automake/autoconf. * threads/Makefile.am: Fixed typo in comment. Sat Feb 13 22:36:14 1999 Steven G. Johnson * mpi/Attic/transpose_mpi.h, mpi/transpose_mpi.c, mpi/Attic/time_fftwnd_mpi.c, mpi/test_transpose_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/sched.h, mpi/test_sched.c, mpi/Attic/fftwnd_mpi.h, mpi/sched.c, mpi/TOMS_transpose.c, mpi/TOMS_transpose.h, mpi/fftwnd_mpi.c, mpi/Attic/Makefile: Updated MPI routines. The new implementation is almost completely rewritten from before, and should (hopefully) be easier to manage and (maybe) faster in some cases. * configure.in: Check for pthread_create outside of -lpthread, since some systems may have threads built into the standard C libraries. * fftw/malloc.c: Allow allocation/freeing of 0-size blocks/NULL pointers (since that is ANSI-okay, after all). * cilk/executor_cilk.cilk: Use ntwiddle instead of r-1 in case twiddle policy changes. * mpi/Attic/time_fftwnd_mpi.c: Whoops! don't pass uninitialized out parameter (shouldn't be a problem in any case since transform is in-place, but better safe than sorry). Thu Feb 11 02:31:45 1999 Steven G. Johnson * doc/fftw.texi: Noted necessity of linking threads-using code with -lpthread or whatever. * rfftw/rfftwf77.c, fortran/Attic/rfftw_f77.c, fortran/Attic/fortranize.h, fortran/Attic/fftw_f77.c, fortran/fftw_f77.i, fortran/Attic/README, fortran/f77_test.F, fftw/f77_func.h, fftw/fftwf77.c, fftw/config.h.in, configure.in, doc/fftw.texi, NEWS, acinclude.m4: Fortran wrapper functions are now automatically included in the main FFTW libraries, unless the --without-fortran option is passed to configure. They are also documented in the main manual. * doc/fftw.texi: Fixed broken cross-reference. Wed Feb 10 22:47:01 1999 Steven G. Johnson * doc/fftw.texi: Small fixes to multi-threaded FFTW section. * threads/Attic/README, doc/fftw.texi, NEWS: Documented threads routines in the main FFTW manual. * threads/fftw_threads.c: Make sure spawn_loop handles nthreads == 0. * threads/fftw_threads-int.h, threads/rfftwnd_threads.c, threads/executor_threads.c: Set things up so that we could pass workspace to fftw_many_inplace_threads. * threads/fftw_threads.c: Improved load-balancing of threads slightly, although in practice it doesn't seem to make much difference. * threads/rfftwnd_threads.c, threads/rexec_threads.c, threads/rfftw_threads.h, threads/rfftw_threads_test.c: For greater consistency, make sure "threads" suffix always directly follows rfftw or rfftwnd. * threads/rfftwnd_threads.c, threads/rexec2_threads.c, threads/rexec_threads.c, threads/rfftw_threads.h, threads/fftw_threads-int.h, threads/fftw_threads.c, threads/fftwnd_threads.c, threads/executor_threads.c: Cleaned up loop-parallelizing interface considerably. * threads/rfftwnd_threads.c, threads/rfftw_threads.h, threads/rfftw_threads_test.c, threads/rexec2_threads.c, threads/rexec_threads.c, threads/executor_threads.c, threads/fftw_threads-int.h, threads/fftw_threads.h, configure.in, threads/Makefile.am, NEWS: Added first stab at parallel (threads) rfftw. * rfftw/rfftwnd.c, rfftw/rexec.c: Slight stride/dist fix (to make behavior in in-place transforms more in line with what the manual says), Fri Feb 5 22:53:13 1999 Steven G. Johnson * tests/test_main.c: Noted -x and -f options in -h help. * threads/executor_threads.c: Yikes! Use ntwiddle instead of r-1 in twiddle_thread. (This would have been a problem if we ever changed the twiddle policy.) * threads/fftwnd_threads.c, threads/executor_threads.c, threads/fftw_threads-int.h, fftw/config.h.in: Use autoconf to determine if alloca is available and use malloc/free if it is not. * threads/fftw_threads_test.c: Call fftw_threads_init when starting up. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.h, threads/fftw_threads_test.c, threads/executor_threads.c, threads/fftw_threads-int.h, threads/fftw_threads.c, threads/Attic/README, threads/Makefile.am, tests/test_main.c, tests/test_main.h, tests/rfftw_test.c, configure.in, tests/fftw_test.c: Made the threads test program follow the model of the uniprocessor test programs. * doc/fftw.texi: Documented --with-threads configure option. * threads/Attic/time_threads.c, threads/Attic/README, threads/Attic/test_threads.c, threads/Makefile.am, threads/fftw_threads.h, threads/Attic/Makefile, configure.in, fftw/config.h.in, Makefile.am, NEWS: Autoconfiscated threads stuff. Mon Feb 1 18:49:40 1999 fftw * FAQ/fftw-faq.bfnn: Added entry about VC++ 5.0 Fri Jan 29 01:11:15 1999 Steven G. Johnson * NEWS: Noted improvements to argument for test programs. * tests/fftw_test.c: Removed unnecessary testing of both real and imaginary impulses--this is unnecessary since we check linearity under multiplication by complex scalars. * tests/test_main.c: (Whoops!) Turn interactive mode back off when getopt is available. * tests/test_main.c: Added support for new format to interactive mode. Fri Jan 29 00:09:00 1999 Matteo Frigo * tests/test_main.c, tests/test_main.h, tests/rfftw_test.c, tests/fftw_test.c, tests/Makefile.am, tests/README, ChangeLog: Allow specification of dimensions in ND test program. Fri Dec 11 23:03:47 1998 Steven G. Johnson * fftw/malloc.c: Use typedefs consistently for fftw_*_hook. Wed Dec 9 17:27:42 1998 Matteo Frigo * gensrc/dag.ml: Changed to avoid warning from ocaml-2.01 Tue Nov 17 18:01:13 1998 Steven G. Johnson * doc/fftw.texi: Updated Cilk URL. Wed Nov 11 05:51:16 1998 Steven G. Johnson * tests/test_main.c: Print FFTW version on -v. * tests/Makefile.am: Removed explicit -lm -- it is added automatically by configure when it is available. Mon Oct 19 15:56:50 1998 Matteo Frigo * tests/test_main.c: Replaced 2x2 linear system with fib() in timer iteration. The linear system was converging to 0 in floating point, and it caused underflow problems. Wed Oct 7 16:15:39 1998 Steven G. Johnson * configure.in: Fixed usage of ` in echo. Tue Oct 6 04:46:04 1998 Steven G. Johnson * configure.in: Got rid of message about enabling the x86 cycle counter--why are we loudly suggesting a deprecated option? Interested users can read the manual. Thu Oct 1 13:40:01 1998 Matteo Frigo * gensrc/genfft.ml: Changed -> "athfft.h" Tue Sep 29 22:50:53 1998 Steven G. Johnson * FAQ/fftw-faq.bfnn, README: Don't mention the current version number, so that we don't have to keep updating these files with each new version. * README.hacks: Postponed computation of the phase of the moon until FFTW 17.0. * doc/fftw.texi: Explained "out of place" in tutorial. * doc/fftw.texi: Added a couple of clarifications to the installation on non-Unix section. * NEWS: Fixed typo. Mon Sep 28 21:09:50 1998 Steven G. Johnson * tests/test_main.c: Deleted some unused variables. Mon Sep 28 19:18:54 1998 Matteo Frigo * fftw/wisdom.c, fftw/config.h.in, fftw/executor.c, Makefile.am, configure.in: Moved version number to configure.in and tweaked make dist to change config.h with the right version number. Sun Sep 27 01:18:27 1998 Steven G. Johnson * FAQ/fftw-faq.bfnn, NEWS: Noted bug fixes for large rfftwnd transforms in 2.0.1. * tests/rfftw_test.c: Fixed bug in -s for large multi-dimensional transforms. * tests/test_main.c: Added -b flag for testing really large transforms. * fftw/fftwnd.c: Initialize nwork to zero (not really necessary, but it doesn't hurt to make sure things are initialized). * rfftw/rfftwnd.c: Fixed another parenthesization problem which caused overflow problems with rank > 2 transforms. Sat Sep 26 19:57:25 1998 Steven G. Johnson * rfftw/rfftwnd.c: Yeow! Integer precision overflow occurs for final dim. >= 2^16 due to inauspicious parenthesization. Fixed. Fri Sep 25 21:55:28 1998 Steven G. Johnson * NEWS: Some small changes to 2.0.1 release notes. Fri Sep 25 19:14:16 1998 Matteo Frigo * gensrc/Makefile.rfftw.am, gensrc/exprdag.ml, gensrc/Makefile.fftw.am, NEWS, configure.in, ChangeLog: Changed version numbers for 2.0.1 release. * tests/fftw_test.c: Added FFTW_OUT_OF_PLACE to flags just in case we forget it again in the header file. Fri Sep 25 16:29:21 1998 fftw * gensrc/magic.ml, gensrc/genfft.ml, gensrc/exprdag.ml: Added a couple of hacks useful for athenafft Thu Sep 24 16:17:32 1998 fftw * gensrc/magic.ml, gensrc/genfft.ml: Added experimental `athena' mode Wed Sep 23 14:55:02 1998 Steven G. Johnson * doc/fftw.texi: Fixed another typo. Wed Sep 23 14:08:36 1998 Matteo Frigo * fftw/fftw.h.in, doc/fftw.texi: Added definition of FFTW_OUT_OF_PLACE and fixed typo. Wed Sep 23 02:23:17 1998 Steven G. Johnson * doc/fftw.texi: Noted how to compile in single precision in installation for non-unix section. Fri Sep 18 16:36:20 1998 Steven G. Johnson * fftw/fftwnd.c: Modified buffered transforms to use a skew (padding) between buffers, and also to do contigous writes instead of reads when copying result from buffers back to array. Thanks to Geert van Kempen for the tips. * fftw/fftw.h.in: Added Andrew Sterian's patch to allow FFTW to be used as a shared library more easily on Win32. Thu Sep 17 20:42:14 1998 Steven G. Johnson * tests/test_main.c, tests/test_main.h, tests/rfftw_test.c, tests/fftw_test.c: Added -e flag to use FFTW_ESTIMATE in speed tests. Wed Sep 16 01:10:11 1998 Matteo Frigo * rfftw/rplanner.c, fftw/planner.c: Do not use twiddle(1) codelets, even if somebody (like me :-)) includes them accidentally in [r]config.c. Tue Sep 15 21:48:07 1998 fftw * doc/fftw.texi: Fixed typo 0 <= i instead of 0 < i Tue Sep 15 19:01:47 1998 Steven G. Johnson * doc/fftw.texi: Added hyphen. Tue Sep 15 14:07:20 1998 Matteo Frigo * gensrc/variable.ml, gensrc/number.ml, gensrc/exprdag.ml: Better hashing scheme for variables. Removed caching of float value of Numbers since it makes little difference with the new hashing scheme. Tue Sep 15 13:14:18 1998 fftw * gensrc/number.ml, gensrc/exprdag.ml: Made oracle smarter (as it was in 2.0) Mon Sep 14 23:10:58 1998 Matteo Frigo * gensrc/variable.mli, gensrc/number.ml, gensrc/variable.ml, gensrc/Makefile.genfft, gensrc/exprdag.ml: Many, many speed improvements Mon Sep 14 17:20:58 1998 fftw * gensrc/Makefile.genfft, gensrc/util.ml: Added timestamp to info messages * gensrc/util.ml, gensrc/util.mli, gensrc/genfft.ml, gensrc/magic.ml, gensrc/exprdag.ml, gensrc/Makefile.genfft: Added informative messages * gensrc/variable.mli, gensrc/to_c.ml, gensrc/variable.ml, gensrc/fft.ml, gensrc/exprdag.ml, gensrc/exprdag.mli, gensrc/expr.ml, gensrc/expr.mli, gensrc/complex.mli, gensrc/asched.ml, gensrc/complex.ml: Added LittleSimplifier to do a first quick simplification pass. This speeds up the algebraic simplifier a lot. Mon Sep 14 02:06:24 1998 Steven G. Johnson * doc/fftw.texi: Fixed library ordering for -lrfftw. Sun Sep 13 19:09:19 1998 Matteo Frigo * gensrc/number.mli, gensrc/fft.ml, gensrc/number.ml, gensrc/exprdag.mli, gensrc/complex.mli, gensrc/exprdag.ml, gensrc/complex.ml: Improved speed of generator Fri Sep 11 17:33:16 1998 Matteo Frigo * acinclude.m4: Dec's compiler does not like -malign-double. Fri Sep 11 15:06:50 1998 Steven G. Johnson * acinclude.m4: Make sure ACX_PROG_CC_EGCS is called. Fri Sep 11 14:15:46 1998 Matteo Frigo * Makefile.am: Added COPYRIGHT to distribution * tests/Makefile.am: Added missing dependency * threads/Attic/Makefile, cilk/Makefile, configure.in, ChangeLog, acinclude.m4: Disabled egcs scheduler. Thu Sep 10 21:45:25 1998 Steven G. Johnson * acinclude.m4: Added ppc/linux flags. Thu Sep 10 20:15:00 1998 Matteo Frigo * Makefile.am: Added bootstrap.sh to distributed files * ChangeLog: Formatted The Right Way * gensrc/to_c.mli, gensrc/fft.ml, gensrc/to_c.ml, gensrc/exprdag.ml, gensrc/exprdag.mli, gensrc/Makefile.sources, gensrc/codelet_prelude, gensrc/Makefile.genfft: Tweaked generator to print fused mult/add count and more revision infos Wed Sep 9 16:32:37 1998 Steven G. Johnson * threads/Attic/README, threads/fftw_threads.h, threads/Attic/Makefile, doc/fftw.texi: Noted that Win32 threads code has been reported as working. Wed Sep 9 12:20:52 1998 Matteo Frigo * threads/executor_threads.c, cilk/executor_cilk.cilk, gensrc/magic.ml: Fixed parallel transform after X_codelet -> fftw_X_codelet conversion Tue Sep 8 20:43:31 1998 Steven G. Johnson * ChangeLog: Line-wrapped. Tue Sep 8 18:12:39 1998 Matteo Frigo * gensrc/magic.ml, gensrc/genfft.ml, gensrc/Makefile.sources, gensrc/exprdag.ml, ChangeLog: More experiments with generation of twiddloe factors (disable by default) Tue Sep 8 13:35:46 1998 fftw * doc/fftw.texi: Added reference to ocaml 2.00 Mon Sep 7 22:21:01 1998 Matteo Frigo * gensrc/Makefile.sources: Disabled fused madd flags for now * gensrc/magic.ml, gensrc/genfft.ml, gensrc/Makefile.sources, gensrc/exprdag.ml: Added option to expand all FMA's explicitly, even at the cost of increasing the operation count. * gensrc/number.ml, gensrc/number.mli, gensrc/magic.ml, gensrc/genfft.ml, gensrc/Makefile.sources, gensrc/exprdag.ml: Implemented fused-multiply-add rules Mon Sep 7 16:10:44 1998 Steven G. Johnson * fftw/malloc.c: Got rid of COMMA hack. Mon Sep 7 15:38:41 1998 Matteo Frigo * rfftw/rgeneric.c, rfftw/rplanner.c, rfftw/rexec2.c, rfftw/rfftwnd.c, rfftw/.indent.pro, rfftw/rexec.c, gensrc/genfft.ml, fftw/putils.c, gensrc/.indent.pro, fftw/planner.c, fftw/fftw-int.h, fftw/fftw.h.in, fftw/.indent.pro, fftw/executor.c: Alpha-converted X_codelet => fftw_X_codelet to avoid namespace pollution. Replaced ``for (i = 0; i < m; ++i)'' with ``for (i = m; i > 0; --i)'' in twiddle codelets. Sat Sep 5 21:49:24 1998 Steven G. Johnson * configure.in: Removed redundant inclusion of acinclude.m4. * acinclude.m4, configure.in: Moved max. optimization checking into acinclude.m4. * ChangeLog: Line-wrapped. * gensrc/codelet_prelude, gensrc/Makefile.fftw.am, gensrc/Makefile.rfftw.am: Changed from perfect to past tense in notices about being automatically generated. * FAQ/fftw-faq.bfnn: Slight change. * fftw/putils.c, fftw/fftw.h.in: added fftw_sizeof_fftw_real(). Thu Sep 3 21:51:19 1998 Steven G. Johnson * doc/fftw.texi: Fixed bug in documentation of how factors of 11 and 13 may be efficiently handled. Wed Sep 2 19:23:22 1998 fftw * configure.in: Respect existing CFLAGS in the environment if any Wed Sep 2 15:23:20 1998 Matteo Frigo * cilk/Makefile, configure.in, acinclude.m4: Added -cpu=pentium et al. for latest egcs Wed Sep 2 00:06:06 1998 fftw * FAQ/fftw-faq.bfnn: Added FAQ antry about the darned ucbcc Tue Sep 1 14:07:46 1998 fftw * FAQ/fftw-faq.bfnn: Mentioned that matlab computes normalized FFTs * fortran/f77_test.F: Used 'implicit none' to be sure to catch Fortran compilers that don't call cpp. Mon Aug 31 17:38:38 1998 fftw * ChangeLog: Updated changelog * gensrc/Makefile.rfftw.am, gensrc/Makefile.fftw.am: Added `automatically generated' notice * rfftw/rplanner.c, rfftw/rgeneric.c, rfftw/rfftwnd.c, rfftw/rexec2.c, rfftw/rexec.c, gensrc/rconfig_prelude, gensrc/config_prelude, configure.in: Tried to be more tolerant of systems with nonworking ``const''. Sun Aug 30 18:44:02 1998 fftw * gensrc/Makefile.rfftw.am, gensrc/Makefile.fftw.am: Switched version number of shared library to 2.0.0. Fri Aug 28 21:42:01 1998 fftw * fftw/fftwnd.c: Removed redundant include. * doc/fftw.texi: Recommend using GNU make. * cilk/Makefile: use rm -f for make clean. * doc/fftw.texi: Various small changes. * Makefile.am: Fixed bug: CVS dir was not removed from distribution * threads/Attic/Makefile, tests/Makefile.am, mpi/Attic/Makefile, gensrc/Makefile.rfftw.am, gensrc/Makefile.fftw.am, gensrc/Makefile, cilk/Makefile, Makefile.am: Minor fixes for distribution * Makefile.am: Polished `make dist'. * doc/fftw.texi: Fixed missing word. * doc/fftw.texi: Changed @detailmenu label. There must be some bug in emacs, I believe. * doc/equation-4.gif: Grabbed equation-4.gif again * fftw/fftwnd.c: Yikes! Bug fix. * doc/fftw.texi: Minor fixes. * FAQ/fftw-faq.bfnn: Rewrote answer to "What is FFTW?" question. * doc/fftw.texi: More fixes. * doc/fftw.texi: Fixed messed-up equation. Thu Aug 27 23:51:32 1998 fftw * doc/fftw.texi: Slight changes. * doc/fftw.texi: "What RFFTWND Really Computes" was missing a complex conjugate in the description of Hermitian symmetry. * threads/Attic/Makefile: Link libraries in the correct order. * configure.in: Renamed 2.0 to 2.0-beta1 for the release * doc/fftw.texi, doc/equation-4.gif, doc/Makefile.am: Added html definition of rfftwnd. * doc/fftw.texi: Fixed a few typos. * fftw/putils.c: Fixed improper reference to planner.c (which causes the whole complex package to be loaded for real transforms) * ChangeLog: Line-wrapped. * README.hacks, TODO, README, INSTALL: Updated README and similar files for 2.0. * threads/executor_threads.c: Align stack on Linux/x86 with gcc. * doc/fftw.texi: Noted that complex-to-real transforms overwrite their input arrays. * gensrc/makemakefile.sh, gensrc/Makefile.fftw.am, gensrc/Attic/Makefile.am: Makefile.am -> Makefile.fftw.am, for consistency. * gensrc/Makefile.rfftw.am: rfftwint.h is gone. * doc/fftw.texi: More stylistic changes * doc/fftw.texi: Stylistic changes * doc/fftw.texi: Added What RFFTWND Really Computes section. * rfftw/rplanner.c, rfftw/rgeneric.c, rfftw/rfftwnd.c, rfftw/Attic/rfftwint.h, rfftw/rexec2.c, rfftw/rexec.c, fftw/executor.c: Inlined i386 hacks. This is almost completely portable because of the new alloca() trick. Code is much cleaner now. * doc/fftw.texi: Described rfftwnd complex format, and discussed meaning of stride/dist for in-place transforms. Wed Aug 26 23:08:05 1998 fftw * fftw/rader.c, fftw/planner.c, cilk/test_cilk.cilk, cilk/executor_cilk.cilk, cilk/Makefile, ChangeLog: Upgraded Cilk version to 2.0 * doc/fftw.texi: Fixed a couple of typos * doc/fftw.texi: Added most of rfftwnd reference. * NEWS: Noted FFTW_THREADSAFE and corresponding new section of the manual. * doc/fftw.texi: More changes in the introduction of the halfcomplex format. * doc/fftw.texi: Made it clear that halfcomplex applies to one-dimensional rfftw only. * doc/texi2html: There is no tag in HTML 4.0. * doc/fftw.texi: Fixed html versions of halfcomplex dfn. * doc/texi2html, doc/fftw.texi: Added a few missing html formulas * doc/fftw.texi: Some minor changes. Removed mention of "halfcomplex" in reference to rfftwnd outputs, since we define that word in terms of the rfftw output format. * doc/fftw.texi: Added What RFFTW Really Computes section * doc/fftw.texi, doc/Makefile.am: Added index * doc/fftw.texi: Added description of halfcomplex storage. * tests/README: Noted rfftw_test, and pointed user to manual for compilation instructions. Tue Aug 25 23:45:57 1998 fftw * NEWS: Noted version 2.0. * doc/fftw.texi: Slight change. * doc/fftw.texi: Wrote non-Unix installation section and made a few other minor changes. * doc/fftw.texi: Fixed references to "What FFTWND Really Computes". * rfftw/rexec.c, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in, configure.in: I386_HACK Done Right. The hack now should work across all generations of gcc/egcs, whether building a shared library or not. * doc/fftw.texi: Noted use of fast algorithm for prime sizes in complex transforms. Got rid of tag everywhere (doesn't seem to be well-defined in the HTML standard). * rfftw/rfftw.h: Changed rfftw.h to reflect the manual. * rfftw/rexec.c, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in, configure.in: Changed the x86 hack to work also with the shared library. * doc/texi2html: @math used to translate to italics, which looked ugly in HTML; now does nothing. * doc/fftw.texi: Several small changes. Gave uref's readable titles. Removed @inforef, which looked ugly in non-info docs. * doc/fftw.texi: Fixed screwed-up master menu * doc/fftw.texi: Worked on installation guide * doc/fftw.texi: Added draft or real-complex reference. * doc/texi2html, doc/fftw.texi: Upgraded to latest texi2html. * configure.in: Use -qansialias on RS/6000 (seems to cause a miniscule improvement). * doc/fftw.texi: Several small changes. Mon Aug 24 23:55:51 1998 fftw * doc/fftw.texi: Separate wisdom is now used for real-complex. * doc/fftw.texi: Fixed typo. * doc/fftw.texi: Noted link requirements for rfftw. * doc/fftw.texi: Quick Start -> Tutorial. Updated introduction to reflect extra sections. * NEWS: Noted dropped op-count routines. * threads/Attic/README: Updated; noted FFTW_THREADSAFE flag. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/fftwnd_threads.c, threads/executor_threads.c: Updated for FFTW 2.0. * doc/fftw.texi: Slight changes to introduction. * doc/fftw.texi: Removed reference to operation counts from manual. * rfftw/rplanner.c, rfftw/rfftwnd.c, rfftw/rfftw.h, gensrc/genfft.ml, fftw/rader.c, fftw/putils.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h: Removed op counts, until we find a decent way to incorporate them back. * FAQ/fftw-faq.bfnn: Added entry for broken linuxthreads. * doc/fftw.texi: Updated introduction * doc/fftw.texi: Written draft of reference section. Sun Aug 23 17:16:32 1998 fftw * FAQ/fftw-faq.bfnn: My middle initial is "G," not "J." Sat Aug 22 22:52:13 1998 fftw * fftw/malloc.c: Added more paranoia to debugging malloc/free. * doc/fftw.texi: Changed some wording in threads section and noted that wisdom import/forget is not threadsafe. * gensrc/fft.ml: More cosmetic changes * gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml: Cosmetic changes * doc/fftw.texi: Started re-adding installation section. * doc/fftw.texi: Noted that plan destruction is not safe either. * doc/fftw.texi: Cross-reference and line-length fixes. * doc/fftw.texi: Updated menus and node references. Emacs texinfo-mode is great! * doc/fftw.texi: Re-added "Words of Wisdom" and "Multi-Dimensional Array Formats" chapters Added chapter on parallel transforms & thread-safety. * doc/texi2html: @url{} tags are now converted into hyperlinks. Fri Aug 21 17:24:36 1998 fftw * gensrc/util.mli, gensrc/util.ml, gensrc/symmetry.ml, gensrc/fft.ml: Fixes to improve speed of generator and op count for n not squarefree. Thu Aug 20 22:35:04 1998 fftw * doc/fftw.texi: Grammar fix. * doc/fftw.texi: Don't need to say the number of args. * doc/fftw.texi: Recommend that quick starts be read in order. * rfftw/rfftwnd.c: dist parameter for in-place transforms now works more closely like what you might expect. * doc/fftw.texi: Various fixes and modifications. * doc/fftw.texi: Added rfftwnd quick start. * doc/fftw.texi: public-domain -> freely-available (FFTW, along with many other FFT routines, is not "public-domain"). * doc/fftw.texi: Minor additions. * doc/fftw.texi: Wrote rfftw quick start. * fftw/twiddle.c, fftw/rader.c: Use FFTW_FORWARD instead of a hard-coded negative sign, in case someone ever needs to change this sign. * rfftw/rfftw.h: Recreated rfftw_plan and rfftwnd_plan types. * doc/fftw.texi: Some more changes to the multi-dimensional quick-start. * doc/fftw.texi: Added quick-start for multi-dimensional transforms. * doc/fftw.texi: Added 1d complex quick start. Wed Aug 19 23:55:39 1998 fftw * doc/fftw.texi: Changed reference in the introduction--an introductory book is a better reference for people who don't know anything about DFTs. Also some minor changes. Alluded to a License and Copyright section. * gensrc/symmetry.ml, gensrc/magic.ml, gensrc/fft.ml, gensrc/exprdag.mli, gensrc/exprdag.ml, gensrc/expr.mli, gensrc/expr.ml: Implemented three-phase simplifier. * gensrc/symmetry.ml, gensrc/magic.ml, gensrc/fft.ml: Reset rader_min to 13, until I understand how to simplify the code properly. * gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/exprdag.mli, gensrc/exprdag.ml, gensrc/Makefile.sources, gensrc/Makefile.genfft: Disabled new convolution hack for n >= 17, since the naive algorithm is better. The hack is similar to Rader's variant 4 in Tolimieri's book, and the growth of the operation count is also documented in that book. * TODO: Updated to reflect the fact that we have now rewritten rfftw. * fortran/Attic/README: Fixed erroneous listing of rfftwnd. * fortran/Attic/fortranize.h, fortran/Attic/README: Various improvements. * NEWS: Added rfftw Fortran wrappers. * fortran/Attic/fortranize.h, fortran/Attic/rfftw_f77.c, fortran/fftw_f77.i, fortran/Attic/fftw_f77.c, fortran/Attic/README: Added rfftw wrappers. Tue Aug 18 23:52:19 1998 fftw * gensrc/exprdag.ml, gensrc/expr.ml, gensrc/Makefile.genfft: Another horrible hack in the generator speeds up n=13 by a lot. * rfftw/Attic/rfftwint.h: Whoops! Deleted extraneous characters. * rfftw/rplanner.c, rfftw/rgeneric.c, rfftw/rfftwnd.c, rfftw/Attic/rfftwint.h, rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c, gensrc/Makefile.rfftw.am: Added invoke_many routine for rfftw, and split hacks into separate header file (rfftwint.h). * gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/exprdag.ml, gensrc/Makefile.sources: Implemented new way of doing Rader's algorithm. * NEWS: Noted fftw_one, etcetera. * ChangeLog: Line-wrapped entries. * tests/rfftw_test.c, rfftw/rfftwnd.c: Yikes! Bug fix. In the future, be sure to try running the test program with the -m option, since the rfftwnd specific planner operates signficantly differently under FFTW_MEASURE than under FFTW_ESTIMATE. Mon Aug 17 23:27:23 1998 fftw * tests/test_main.c: Also sprach g++: the `gets' function is dangerous and should not be used. * rfftw/rfftwnd.c, fftw/rader.c, fftw/malloc.c: Made g++ happy * rfftw/rplanner.c, fftw/putils.c, ChangeLog: Fixed wrong arguments in make_node_rgeneric. (Ouch!) * tests/rfftw_test.c, tests/fftw_test.c, rfftw/rfftwnd.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h: Added FFTW_THREADSAFE flag, which is intended to guarantee that the plan be read-only, making it safe to use the same plan in parallel from multiple threads. Currently, it only has an effect in the multi-dimensional transforms (the 1d plans are already read-only). * tests/Makefile.am, rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c, fftw/executor.c: Optimized the aligned _many loop. Fixed alignments in rexec2.c * rfftw/rexec.c, fftw/fftw-int.h, fftw/executor.c: Reorganized alignment hacks to be more robust with different compilers and compiler flags. * tests/Makefile.am: automake TESTS variable expects the names of actual executables, not simple 'make' dependencies. Fixed by overriding 'make check' behavior instead of using TESTS. * tests/test_main.c, tests/Makefile.am: Added 'make check' feature, along with flag to test programs to limit the number of iterations. * tests/test_main.h, tests/test_main.c, tests/rfftw_test.c, tests/fftw_test.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/rexec.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/executor.c: Added fftw_one and friends, and modified the test programs to check them. * doc/fftw.texi: Capitalization changes, clarifications, and other minor changes. * doc/texi2html, doc/fftw.texi: Restructured manual (still incomplete) * rfftw/rplanner.c, rfftw/rgeneric.c, rfftw/rfftw.h, rfftw/rexec.c, fftw/twiddle.c, fftw/timer.c, fftw/rader.c, fftw/putils.c, fftw/planner.c, fftw/malloc.c, fftw/generic.c, fftw/fftwnd.c, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in: Many cosmetic changes. ``optimized'' rexecutor slightly. * fftw/rader.c: Calls fftw_executor_simple directly instead of calling fftw(). * tests/test_main.h, tests/test_main.c, tests/rfftw_test.c: Fixed (hopefully) a problem with roundoff errors sometimes exceeding the tolerance. Sun Aug 16 22:55:43 1998 fftw * rfftw/rgeneric.c: ``optimized'' rgeneric codelets (kind of) * fftw/fftw-int.h, fftw/config.h.in, configure.in: Added separate --enable-debug-alignment flags for debugging x86 alignments (the --enable-debug flag also changes the compiler flags, which we don't want to do). * rfftw/rplanner.c, fftw/putils.c: Bug fix--make sure to only call rgeneric codelets for odd n. * rfftw/rexec2.c, gensrc/Makefile.sources: Fixed x86 alignments. * tests/test_main.c: -s now interacts with -d 1 in the same way that -c and -a do. * NEWS: Slight clarification. * rfftw/rplanner.c: Planner can now decide on the best place to use generic codelets. * fftw/planner.c: Planner now decides the best place to put generic/Rader codelets. * fftw/putils.c: Changed message for Rader print_plan. * tests/rfftw_test.c, fftw/rader.c, fftw/putils.c, fftw/fftw.h.in: Modified Rader to use only a single plan for forward and backward transforms of the convolution. Sat Aug 15 22:35:05 1998 fftw * NEWS: Noted the news. * threads/Attic/Makefile, tests/Makefile.am, mpi/Attic/Makefile, matlab/Makefile, gensrc/config, gensrc/README, fftw/fftw-int.h, doc/fftw.texi, cilk/README, cilk/Makefile, FAQ/fftw-faq.bfnn, configure.in, README.hacks, Makefile.am, INSTALL: The great directory renaming: src -> fftw. * fftw/twiddle.c, fftw/rader.c, fftw/putils.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c: Added sharing of Rader data and twiddles between different plans (and within the same plan). * tests/test_main.c, fftw/malloc.c, fftw/fftw.h.in: When debugging is enabled, keep track of the peak memory usage (and report it in the test programs). * fftw/rader.c: Rader is now prepared to share data between forward and backward transforms. * fftw/rader.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c: Whoops, forgot to add rader.c to the repository. Also got rid of an unused variable and include prototypes for the *_ops functions in fftw-int.h. * fftw/twiddle.c, fftw/putils.c, fftw/planner.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, gensrc/Attic/Makefile.am: Added Rader codelets to handle large prime factors. Fri Aug 14 23:37:20 1998 fftw * rfftw/rgeneric.c: rgeneric seems to work! * rfftw/rgeneric.c: Fixed yet another bug in rgeneric. * rfftw/rexec.c: Fixed wrong union field. * fftw/putils.c, fftw/planner.c, fftw/fftw.h.in, fftw/fftw-int.h, rfftw/rplanner.c, rfftw/rgeneric.c, rfftw/rexec.c, gensrc/Makefile.rfftw.am: Implemented generic codelet. (inverse does not work yet) * fftw/putils.c, fftw/generic.c, fftw/fftw.h.in, fftw/fftw-int.h, rfftw/rplanner.c, rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c: Split NOTW from HC2REAL and TWIDDLE from HC2HC, to avoid horrible type confusion and let me modify the various codelts type separately * tests/rfftw_test.c: Fixed bug in in-place testnd. (It's working now...hooray!) * tests/test_main.h: CHECK now calls fftw_die instead of exit (mainly to make it easier to breakpoint). * fftw/wisdom.c, fftw/twiddle.c, fftw/timer.c, fftw/putils.c, fftw/planner.c, fftw/malloc.c, fftw/generic.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/config.h.in, fftw/.indent.pro, rfftw/rplanner.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/.indent.pro, gensrc/.indent.pro: Moved code around to avoid unnecessary linking dependencies. * tests/rfftw_test.c, fftw/putils.c, fftw/planner.c, fftw/generic.c, fftw/fftw-int.h, fftw/.indent.pro, rfftw/rplanner.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c, rfftw/.indent.pro, gensrc/Attic/Makefile.am, gensrc/.indent.pro: Splitted planner.c into two files, so that the liker does not load the complex codelets if only rfftw is used. Renamed rfftw_plan->fftw_plan, since they are the same and we do not seem able to maintain consistency internally. * ChangeLog: Updated changelog * fftw/executor.c, rfftw/rexec2.c: Removed redundant test * tests/rfftw_test.c, rfftw/rfftwnd.c: Fixed more bugs in in-place rfftwnd (not done yet...sigh). * rfftw/rfftwnd.c, rfftw/rexec2.c, rfftw/rexec.c: Fixed bug in rfftwnd for ((n+1)/2)%4 == 0. Thu Aug 13 23:56:16 1998 fftw * rfftw/rexec2.c: Removed redundant statement. * tests/test_main.c: test -d 1 -a now uses nd routines, consistent with -d 1 -c . * fftw/malloc.c: Need to flush(stdout) before printing to stderr, or messages sometimes come in the wrong order. Also, should pass EXIT_FAILURE instead of 1 to exit(). * fftw/executor.c, rfftw/rexec.c: Fixed those damned alignments. * tests/test_main.h, tests/test_main.c, tests/rfftw_test.c, tests/fftw_test.c: Multi-dimensional tests are getting closer to working... * rfftw/rfftwnd.c, rfftw/rexec2.c: Bug fixes. * fftw/fftw-int.h, fftw/executor.c, rfftw/rexec.c, gensrc/to_c.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/Makefile.sources: Added automatic alignment checker --- this will make life easier on the x86 * fftw/wisdom.c: Fixed incorrect order of arguments. * fftw/wisdom.c, fftw/twiddle.c, fftw/planner.c, fftw/fftw-int.h, fftw/executor.c, fftw/.indent.pro, rfftw/rplanner.c, rfftw/rfftwnd.c, rfftw/rexec2.c, rfftw/rexec.c, rfftw/.indent.pro, configure.in: Added extra wisdom flag. Renamed to V2.0. * tests/Makefile.am: Registered testmain.h with automake, so that it gets distributed * Makefile.am: Compile rfftw before tests (otherwise make fails) * tests/rfftw_test.c: Fixed in-place testing bug. * tests/rfftw_test.c: Fixed bug in test. * tests/rfftw_test.c: First version of rfftw_test (incomplete). * tests/test_main.h, tests/test_main.c, tests/fftw_test.c, tests/Makefile.am, rfftw/rfftwnd.c: Initial version of rfftw_test (incomplete). * gensrc/Makefile: 'make clean' now gets rid of files from aborted make install. * gensrc/Makefile.rfftw.am: Added rfftwnd & friends to makefile. * tests/test_main.h, tests/test_main.c, tests/fftw_test.c, tests/Makefile.am: Split off main portion of fftw_test.c so that it can be reused for rfftw_test. * fftw/fftwnd.c, fftw/fftw-int.h, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c: Added preliminary rfftwnd.c, modifying other files as necessary. * gensrc/number.mli, gensrc/number.ml, gensrc/exprdag.ml, gensrc/expr.mli, gensrc/expr.ml: Added post-optimization pass to simplify K1*(K2*A+K3*B), where Ki is a number * rfftw/rfftw.h, rfftw/rexec2.c, rfftw/rexec.c: Added rexec2 in preparation for rfftwnd transforms. * rfftw/Attic/README: Removed out-of-date rfftw/README. We will need to add a couple of sections to the main manual. Wed Aug 12 23:47:47 1998 fftw * fftw/twiddle.c, fftw/planner.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, rfftw/Attic/test_rfftw.c, rfftw/Attic/time_rfftw.c, rfftw/rfftw.h, rfftw/rplanner.c, rfftw/Attic/rfftw.c, rfftw/rexec.c, rfftw/Attic/Makefile.am, gensrc/rconfig_prelude, gensrc/makesources.sh, gensrc/makerconfig.sh, gensrc/makemakefile.sh, gensrc/makeconfig.sh, gensrc/install.sh, gensrc/config, gensrc/config_prelude, gensrc/Makefile.rfftw.am, gensrc/Attic/Makefile.am, gensrc/Makefile, configure.in: First version of rfftw executor and friends. * gensrc/config, gensrc/Makefile.sources: Updated for real transforms * gensrc/Attic/polygen.ml, gensrc/Attic/poly.ml, gensrc/Attic/factorizer.ml, gensrc/Makefile.genfft: Removed old unused files * gensrc/variable.mli, gensrc/variable.ml, gensrc/symmetry.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/Makefile.genfft: Added hc2hc_backward codelets. INCOMPATIBLE CHANGE: hc2hc codelets are marked FFTW_HC2HC instead of FFTW_HC2HC_FORWARD and FFTW_HC2HC_BACKWARD. The direction is given by the dir flag. * gensrc/schedule.ml: Added some comments * gensrc/schedule.ml, gensrc/dag.mli, gensrc/dag.ml: Changed scheduler to work properly with DIF codelets. * gensrc/variable.mli, gensrc/variable.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/dag.ml, gensrc/Makefile.genfft: Removed old junk code. * gensrc/twiddle.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/Makefile.genfft: Separated twiddle policies into new file. Added DIF twiddle code. Tue Aug 11 22:40:02 1998 fftw * gensrc/variable.mli, gensrc/variable.ml, gensrc/makeconfig.sh, gensrc/genfft.ml, gensrc/fft.ml: Added hc2real codelets * gensrc/variable.ml, gensrc/fft.ml: Fixed a couple of bugs in the generator Mon Aug 10 22:57:14 1998 fftw * gensrc/variable.mli, gensrc/variable.ml, gensrc/to_c.mli, gensrc/to_c.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml: Implemented hc2hc-forward pass (not tested yet) * gensrc/to_c.mli, gensrc/to_c.ml, gensrc/genfft.ml: renamed confusing function `make_unparser' * gensrc/variable.mli, gensrc/variable.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/.indent.pro: genfft now generates real2hc codelets Sat Aug 8 18:38:05 1998 fftw * threads/fftwnd_threads.c, tests/fftw_test.c, fftw/wisdom.c, fftw/twiddle.c, fftw/planner.c, fftw/malloc.c, rfftw/Attic/rfftw.c, gensrc/genfft.ml: Reverted NULL -> (foo *) 0 * threads/fftwnd_threads.c, tests/fftw_test.c, fftw/wisdom.c, fftw/twiddle.c, fftw/planner.c, fftw/malloc.c, rfftw/Attic/rfftw.c, gensrc/makeconfig.sh, gensrc/genfft.ml: (foo *) 0 -> NULL, since the former is technically non-portable (it assumes that a NULL pointer is equivalent to the cast of an integer 0). Fri Aug 7 21:38:54 1998 fftw * ChangeLog: Updated changelog * configure.in: test $CC is incorrect if CC contains a space. Fixed to test "$CC" * doc/fftw.texi: configure -> ./configure Thu Aug 6 07:14:42 1998 fftw * fftw/wisdomio.c, fftw/Attic/common_io.c, gensrc/Attic/Makefile.am: Changed common_io.c -> wisdomio.c to meet 8.3 filename restriction. (sigh) Sun Aug 2 20:42:25 1998 fftw * fftw/fftw-int.h: Got rid of PASTE(x,FFTW_REAL_SUFFIX) since invoking macros with empty arguments (e.g. the default value of FFTW_REAL_SUFFIX) produces undefined behavior in ANSI C (the 1989 ISO standard). (The C9X standard will fix this.) Fri Jul 31 19:57:42 1998 fftw * tests/fftw_test.c: main() now returns 0 instead of calling exit(0). Tue Jul 28 23:04:55 1998 fftw * configure.in: Note default CFLAGS in configure message when machine is unknown. * doc/fftw.texi: Added more concrete example of how to save & restore plans using wisdom. Fri Jul 3 22:26:37 1998 fftw * threads/fftw_threads.h: Noted that nthreads is modified by the spawn_loop macro. Thu Jun 25 20:56:10 1998 fftw * FAQ/fftw-faq.bfnn: Noted that you shouldn't recreate the plan before every transform. Mon Jun 15 18:22:07 1998 fftw * fftw/fftw-int.h: Fixed bug in pentium timer runes Sun Jun 14 19:46:22 1998 fftw * doc/fftw.texi: Fixed em-dash bugs introduced in last revision. Sat Jun 13 06:31:20 1998 fftw * AUTHORS: Added newline to end of file. Fri Jun 12 22:44:55 1998 fftw * doc/Makefile.am, configure.in, Makefile.am: Minor fixes * doc/fftw.texi, doc/Makefile.am, Makefile.am: Added html docs to make dist * doc/fftw.texi: Fixed for latest version of texinfo (3.12) * bootstrap.sh: Fixed bootstrap.sh to interact properly with automake * doc/Makefile.am, Makefile.am, ChangeLog: Fixed distribution policy * doc/fftw.texi, doc/Makefile.am, doc/Attic/Makefile, configure.in, Makefile.am: Put documentation under automake control. Thu Jun 11 23:24:31 1998 fftw * NEWS: V, V. -> Version * INSTALL: Added FFTW-specific introduction. I'm still not happy with this file. * Makefile.am: Added cilk/ to list of distributed directories * doc/fftw.texi: Minor fixes. * tests/fftw_test.c: Used the word "consistency" rather than "accuracy" when describing the output of fftw_test -t. * ChangeLog: Added ChangeLog entry. You can update the ChangeLog in emacs with M-x vc-update-change-log. Then you can remove trivial comments from the log manually. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.h, threads/executor_threads.c, threads/Attic/README, tests/fftw_test.c, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/generic.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/Attic/rfftw.c, rfftw/rfftw.h, rfftw/Attic/README, mpi/Attic/time_fftwnd_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/Attic/fftwnd_mpi.h, mpi/fftwnd_mpi.c, mpi/Attic/README, matlab/fftw.c, gensrc/to_c.ml, gensrc/genfft.ml, fortran/Attic/fftw_f77.c, fortran/Attic/README, doc/fftw.texi, cilk/time_cilk.cilk, cilk/test_cilk.cilk, cilk/fftwnd_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/executor_cilk.cilk, NEWS: Renamed FFTW_COMPLEX, FFTW_REAL -> fftw_complex, fftw_real. * fftw/malloc.c, fftw/config.h.in, configure.in: Added --enable-debug option; supercedes old MALLOC_DEBUG flag in malloc.c. * gensrc/Attic/Makefile.am: Fixed bug in makefile * tests/Makefile.am, rfftw/Attic/Makefile.am, configure.in, ChangeLog: Added libtool support Wed Jun 10 20:48:23 1998 fftw * tests/fftw_test.c, configure.in: Changed configure.in for alpha * gensrc/Attic/Makefile.am: Just another fix * Makefile.am, bootstrap.sh: Yet another fix * rfftw/Attic/Makefile.am, gensrc/Attic/Makefile.am, Attic/build-distrib.sh, bootstrap.sh, Makefile.am: More GNU-lly correct changes * rfftw/Attic/Makefile.in, rfftw/Attic/Makefile.am, gensrc/Attic/Makefile.am, configure.in: Completed switch to automake. Should work now * tests/Attic/Makefile.in, tests/Makefile.am, gensrc/makemakefile.sh, gensrc/install.sh, gensrc/Attic/Makefile.in, gensrc/Attic/Makefile.am, Attic/install.sh, Attic/config.sub, configure.in, Attic/config.guess, Attic/build-distrib.sh, Attic/RELEASE-NOTES, NEWS, Attic/Makefile.in, Makefile.am, INSTALL, ChangeLog, AUTHORS: Switched to GNU automake (first attempt) Tue Jun 9 16:30:43 1998 fftw * FAQ/html.refs: Fixed broken link. Fri Jun 5 05:18:10 1998 fftw * doc/fftw.texi: Made nx and ny more explicit. * configure.in: Guess -O3 for CFLAGS if none are known. Thu Jun 4 19:57:21 1998 fftw * tests/fftw_test.c, fftw/twiddle.c, fftw/fftw-int.h: Modified tests to use FFTW_TRIG_xxx. Fri May 29 18:29:06 1998 fftw * doc/fftw.texi: Emphasized that arrays of pointers are incompatible with fftwnd. Wed May 20 16:09:52 1998 fftw * Attic/RELEASE-NOTES: Noted changes to make long double, etcetera, easier to support. Fri May 8 18:52:34 1998 fftw * FAQ/fftw-faq.bfnn: Noted that we neither know nor care how to decipher users' image and audio formats. Wed May 6 16:44:13 1998 fftw * fftw/twiddle.c, fftw/fftw-int.h, gensrc/to_c.ml: Wrapped constants in FFTW_KONST() and made a couple of other changes to make it easier to use other floating point types. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/executor_threads.c, tests/fftw_test.c, rfftw/rfftwnd.c, mpi/Attic/test_fftwnd_mpi.c: Replaced "illegal" with "invalid." * fftw/twiddle.c, fftw/generic.c: Replaced double with FFTW_REAL in twiddle generation (to make it easier to use long double, etc.) Also removed spurious math.h inclusion from generic.c. Tue May 5 14:56:51 1998 fftw * fftw/twiddle.c, fftw/executor.c: Replaced illegal->invalid. To hell with the laywers. Fri Apr 17 19:44:12 1998 fftw * configure.in: Fixed HPUX case pattern. * configure.in: Added HP-UX CFLAGS. * fortran/Attic/fftw_f77.c: Added HP/UX case (no underscore, all lower-case), and deleted Solaris case since it is the same as the default. Wed Apr 15 16:01:03 1998 fftw * gensrc/number.ml: Added a few more digits to twopi constant. (Not that it matters, since we will have to modify the float_to_num function to get more than 9 digits of accuracy. Tue Apr 14 20:38:49 1998 fftw * doc/fftw.texi: Added new DARPA grant #. Renamed arpa->darpa. Maybe we should write a macro \def\arpa{\ifnum\phaseofmoon1\then DARPA\else ARPA\fi} * threads/Attic/time_threads.c: Eeep! Fixed bug that didn't allow you to call time_threads without passing a rank parameter. Sat Apr 11 04:38:06 1998 fftw * FAQ/fftw-faq.bfnn: Slight change. * FAQ/fftw-faq.bfnn: Added explanation of non-free licenses. * fftw/fftw-int.h: Added missing extern "C" { ... } in case someone compiles FFTW with a mix of C and C++ compilers. Fri Apr 10 23:14:54 1998 fftw * FAQ/fftw-faq.bfnn: Fixed missing \}. * FAQ/fftw-faq.bfnn: Small changes. Fixed grammatical error. * doc/fftw.texi: Small changes. Thu Apr 9 17:56:39 1998 fftw * tests/fftw_test.c: Small fix * fftw/config.h.in: Slight clarification in comments. * rfftw/Attic/README.rfftw, rfftw/Attic/README: Renamed README.rfftw -> README. Wed Apr 8 18:40:09 1998 fftw * fftw/fftw.h.in, fftw/fftw-int.h: Minor fix * Attic/build-distrib.sh: Used a little awk script to comment out #undef's in config.h and fftw.h. * doc/fftw.texi, FAQ/fftw-faq.bfnn: Fixed instructions for compiling in single precision. * FAQ/fftw-faq.bfnn: Added (abbreviated) Sun SC4.0 warning back into the FAQ. * fftw/timer.c: Removed cast (void *)0 in gettimezone. Technically, this should be (struct timezone *)0. ANSI C++ forbids conversion from void * to other pointers in function arguments. Just 0 should be fine, since 0 is valid syntax for the null pointer of any type. * tests/fftw_test.c, fftw/fftwnd.c, fftw/fftw.h.in: Fixed couple of spurious warnings * tests/fftw_test.c: Wording change in joke. * tests/fftw_test.c: Reduced maximum size for random 1D tests. * tests/fftw_test.c: Some new jokes. Removed redundant Windows-specific joke. (Why beat a dead horse?) Tue Apr 7 22:58:04 1998 fftw * doc/fftw.texi, FAQ/fftw-faq.bfnn: Many small changes. * doc/fftw.texi: Made clear that windoze is not supported. * doc/Attic/Makefile, FAQ/fftw-faq.bfnn: Small changes. * doc/fftw.texi: Some slight changes. Added a link to the GPL copy on the GNU home page. * tests/fftw_test.c: Added more meaningful please_wait message for infinite tests. * FAQ/fftw-faq.bfnn: Fixed typo. * COPYING: Fixed up header formatting a little and replaced tabs with spaces (which are a poor way to do formatting since different programs interpret them differently). * Attic/RELEASE-NOTES: Noted wisdom import/export format change. * threads/Attic/test_threads.c, threads/Attic/time_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.h, threads/fftw_threads.c, threads/executor_threads.c, tests/fftw_test.c, fftw/wisdom.c, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/generic.c, fftw/malloc.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in, fftw/Attic/common_io.c, rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/Attic/rfftw.c, mpi/Attic/time_fftwnd_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/Attic/fftwnd_mpi.h, mpi/fftwnd_mpi.c, matlab/fftw.c, gensrc/variable.mli, gensrc/variable.ml, gensrc/util.mli, gensrc/util.ml, gensrc/to_c.mli, gensrc/to_c.ml, gensrc/schedule.mli, gensrc/schedule.ml, gensrc/Attic/poly.ml, gensrc/Attic/polygen.ml, gensrc/number.mli, gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/Attic/factorizer.ml, gensrc/exprdag.mli, gensrc/exprdag.ml, gensrc/expr.mli, gensrc/expr.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/ast.ml, gensrc/asched.mli, gensrc/asched.ml, fortran/Attic/fftw_f77.c, fortran/f77_test.F, doc/fftw.texi, cilk/time_cilk.cilk, cilk/test_cilk.cilk, cilk/fftwnd_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/executor_cilk.cilk, FAQ/fftw-faq.bfnn, COPYRIGHT, COPYING: Completed transition to GNU * rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c: Got rid of warnings. * tests/fftw_test.c: Minor fix * tests/fftw_test.c: rand() wasn't being random enough; I just gave up and used a counter. * tests/fftw_test.c, fftw/wisdom.c, fftw/fftw-int.h, doc/fftw.texi: A few small fixes. Also, cleaned up the please_wait routine and called it in more places. Mon Apr 6 23:29:21 1998 fftw * TODO: fixed typo * tests/fftw_test.c: minor fix * tests/fftw_test.c, fftw/fftw-int.h, fftw/config.h.in, doc/fftw.texi, configure.in: Added pentium timer and jokes * fftw/wisdom.c, fftw/fftw.h.in, fftw/fftw-int.h, gensrc/genfft.ml, configure.in: Minor fixes * tests/fftw_test.c, fftw/wisdom.c, tests/Attic/Makefile.in, fftw/planner.c, fftw/fftw.h.in, fftw/executor.c, rfftw/Attic/test_rfftw.c, rfftw/Attic/Makefile.in, gensrc/genfft.ml, gensrc/Attic/Makefile.in, configure.in, TODO: fixed wisdom + minor details Sun Apr 5 17:28:03 1998 fftw * doc/fftw.texi: In Quick Start, reminded readers that they need to compile and install FFTW. * doc/fftw.texi: Casted malloc results in example code for C++ compatibility. * Attic/RELEASE-NOTES: Noted threads improvements. * threads/fftw_threads.h: Fixed missing close paren in comment. * threads/fftw_threads.h, threads/Attic/README: Added experimental Win32 threads support. * threads/fftwnd_threads.c: Used recursive fftwnd, adapted from new serial version. (Improves locality, resulting in higher performance and parallelization when rank >= 3.) * threads/executor_threads.c, threads/Attic/test_threads.c: A couple of small fixes. Sat Apr 4 18:42:24 1998 fftw * fftw/fftwnd.c: Slight change. * threads/fftwnd_threads.c, threads/fftw_threads.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, rfftw/Attic/rfftw.c, cilk/fftwnd_cilk.cilk, cilk/executor_cilk.cilk: Moved a number of "private" functions into fftw-int.h. * threads/Attic/time_threads.c, threads/Attic/Makefile: Rewritten timing program (much improved). * doc/fftw.texi: Expanded discussion of what we really compute, since this topic seems to confuse many people. Fri Apr 3 22:45:40 1998 fftw * fftw/twiddle.c: Reverted to old twiddle scheme. * Attic/RELEASE-NOTES: Noted changes since beta1 (especially performance improvements in multi-dimensional transforms). * fftw/twiddle.c: Improved twiddle generator (?) * fftw/executor.c: Yet another p6 hack * fftw/fftwnd.c: Improved handling of howmany loop when dist < stride. * tests/fftw_test.c: Added checks for howmany parameter. * tests/fftw_test.c: Modified speed tests to allow benchmarking of multiple fields (i.e. howmany != 1), with new '-f' option. * fftw/fftwnd.c: Used recursive processing of hyperslabs to improve locality. (On stern, I am seeing 20-30% speed gains.) * tests/fftw_test.c, tests/README: Improved options for random tests. Thu Apr 2 18:33:06 1998 fftw * tests/Attic/Makefile.in, fftw/timer.c, fftw/fftw-int.h, rfftw/Attic/Makefile.in, doc/fftw.texi, configure.in: Implemented Wolfgang Reimer's extensions Wed Apr 1 04:31:16 1998 fftw * gensrc/variable.mli, gensrc/variable.ml, gensrc/asched.ml: Added hack to keep together load(re) and load(im) when the scheduler is indifferent. Tue Mar 31 22:20:08 1998 fftw * fftw/timer.c, fftw/fftw-int.h, fftw/config.h.in: Added Mac/Windows symbols to config.h.in, and renamed them. * gensrc/codelet_prelude: Minor fix (not really necessary) * fftw/malloc.c, fftw/fftw.h.in: Added fftw_die_hook (it is necessary to modify the exit behavior in some cases, e.g. in multi-processor situations). * FAQ/fftw-faq.bfnn: Noted that Numerical Recipes uses the opposite sign convention. Sun Mar 29 18:46:42 1998 fftw * FAQ/fftw-faq.bfnn: Added single precision FAQ. * fftw/fftw-int.h: Removed win32 ifdef Sat Mar 28 21:18:42 1998 fftw * tests/fftw_test.c: Removed wrong relic #undef HAVE_GETOPT * gensrc/fft.ml: Minor tweak that will simplify Bernstein's trick when we implement it. * gensrc/Attic/Makefile.in: Minor fix * doc/fftw.texi: Rewrote part of the introduction. Several other small changes. Fri Mar 27 23:17:46 1998 fftw * Attic/RELEASE-NOTES: Noted specifically which routines were changed. * fftw/planner.c: Noted that *_OPTIMAL_SIZE constants are only used by FFTW_ESTIMATE (this was confusing some people). * fftw/fftw-int.h: Made sure to define __WIN32__ even for other compilers (e.g. VC++) that define variants of this symbol. * Attic/build-distrib.sh: Create default config.h file for non-UNIX platforms. * Attic/RELEASE-NOTES: Noted gcc/x86 hack. * rfftw/Attic/time_rfftw.c, gensrc/fft.ml: Minor fix * rfftw/Attic/time_rfftw.c: Fixed bug and cleaned up code. * rfftw/Attic/time_rfftw.c: Removed extra printf. * threads/Attic/README: Noted existence of (untested) MacOS MP code. * Attic/RELEASE-NOTES: Noted MPI bug fix. Thu Mar 26 23:42:19 1998 fftw * tests/fftw_test.c: Fixed command-line-less version (added access to -d and -r options). * mpi/Attic/test_fftwnd_mpi.c: Turned off USE_RANDOM by default. * mpi/Attic/time_fftwnd_mpi.c, gensrc/genfft.ml: Fixed MPI bug and AIX warning * doc/fftw.texi: Changed COMPLEX -> FFTW_COMPLEX in (I think) the last remaining place. * tests/fftw_test.c: Removed redundant print statement * tests/fftw_test.c: Added printout of specificity of the plan. * tests/fftw_test.c: Fixed: FFTW_MEASURE | FFTW_SPECIFIC destroyed input * tests/fftw_test.c: Added another silly comment * tests/Attic/small_test.c, tests/Attic/Makefile.in: Deleted small_test. * configure.in: Fixed -lm library check. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, mpi/Attic/time_fftwnd_mpi.c, mpi/Attic/test_fftwnd_mpi.c, matlab/fftw.c: Made sure to cast all malloc return values to prevent C++ problems. * Attic/RELEASE-NOTES: Noted C++ bug fixes. * tests/fftw_test.c, fftw/fftwnd.c, fftw/fftw.h.in: Made sure fftwnd variants are all tested. * tests/Attic/testnd.c, tests/Attic/go_fft.c, tests/fftw_test.c, tests/README, tests/Attic/Makefile.in: Consolidated one- and multi-dimensional transforms. (Actually, multi-dimensional tests have been completely rewritten.) * tests/fftw_test.c: Combined error computations. Wed Mar 25 23:08:06 1998 fftw * configure.in: Added missing ". * FAQ/fftw-faq.bfnn: Noted that scaling applies to multi-dimensional transforms as well. * doc/fftw.texi: Noted that -lfftw is Unix-specific, and pointed to specific planners from non-specific planners in reference section. * doc/fftw.texi: Minor fix * configure.in: Minor change * tests/Attic/Makefile.in: Minor fix * gensrc/fft.ml: Implemented Bernstein's trick * tests/Attic/testnd.c, tests/Attic/go_fft.c, fftw/twiddle.c, fftw/planner.c, fftw/fftw.h.in, rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/Attic/rfftw.c, gensrc/makeconfig.sh, gensrc/genfft.ml: C++-ified (had to cast mallocs and other crap) Tue Mar 24 23:32:09 1998 fftw * doc/fftw.texi: Fixed small texinfo idiosyncrasy * Attic/RELEASE-NOTES: Noted new testing algorithm. * Attic/RELEASE-NOTES: Added more change notes. * doc/fftw.texi: Documented specific planners and count_plan_ops. * README.hacks, README: Minor changes * rfftw/Attic/test_rfftw.c, configure.in: Minor fixes * matlab/README: Noted that users can use FFTW_ESTIMATE. * doc/fftw.texi: Asked people to send in good CFLAGS. * doc/fftw.texi, configure.in: Removed SGI CFLAGS and added note to manual about the occasional necessity to manually set CFLAGS. * FAQ/fftw-faq.bfnn, configure.in: Minor changes * FAQ/fftw-faq.bfnn: Added item about conventions, and made a few other small changes. * doc/fftw.texi: Updated installation section for non-unix systems, and made a few other small changes. * fftw/wisdom.c: Changes wisdom format # * TODO, Attic/RELEASE-NOTES: Updated release notes * tests/Attic/small_test.c, tests/Attic/Makefile.in: Added small_test * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.h, threads/fftw_threads.c, threads/executor_threads.c, tests/Attic/testnd.c, tests/fftw_test.c, fftw/wisdom.c, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/malloc.c, fftw/generic.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in, fftw/Attic/common_io.c, rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/Attic/rfftw.c, mpi/Attic/time_fftwnd_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/Attic/fftwnd_mpi.h, mpi/fftwnd_mpi.c, matlab/fftw.c, gensrc/variable.mli, gensrc/variable.ml, gensrc/util.mli, gensrc/util.ml, gensrc/to_c.mli, gensrc/to_c.ml, gensrc/schedule.mli, gensrc/schedule.ml, gensrc/Attic/polygen.ml, gensrc/Attic/poly.ml, gensrc/number.mli, gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/Attic/factorizer.ml, gensrc/exprdag.mli, gensrc/exprdag.ml, gensrc/expr.mli, gensrc/expr.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/ast.ml, gensrc/asched.mli, gensrc/asched.ml, fortran/Attic/fftw_f77.c, fortran/f77_test.F, doc/fftw.texi, cilk/time_cilk.cilk, cilk/test_cilk.cilk, cilk/fftwnd_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/executor_cilk.cilk, FAQ/html.refs, FAQ/fftw-faq.bfnn, configure.in, COPYRIGHT: Many changes to the manual. Changed copyright. Updated FAQ. Changed Free Software discussion. * fftw/fftw.h.in: Changed plan structure to support whatever idiotic alignments compilers could require. Mon Mar 23 22:58:46 1998 fftw * threads/Attic/time_threads.c, tests/Attic/testnd.c, tests/fftw_test.c, fftw/wisdom.c, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/malloc.c, fftw/generic.c, fftw/fftwnd.c, fftw/fftw.h.in, fftw/fftw-int.h, fftw/executor.c, fftw/config.h.in, fftw/Attic/common_io.c, rfftw/Attic/time_rfftw.c, gensrc/codelet_prelude, gensrc/Attic/Makefile.in, cilk/Makefile, configure.in: Separated timers and config.h from fftw.h Fri Mar 20 22:48:35 1998 fftw * gensrc/exprdag.mli, gensrc/exprdag.ml: Added arithmetic op counter (unused) * gensrc/magic.ml, gensrc/genfft.ml, gensrc/exprdag.ml: Hacked optimizer * tests/fftw_test.c: Added paranoid test options * gensrc/genfft.ml, gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml: Minor changes * gensrc/fft.ml: Implemented trick to add input 0 in the FFT for Rader. Wed Mar 18 20:47:12 1998 fftw * gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml: Added explicit symmetries in fftgen Tue Mar 17 15:09:33 1998 fftw * tests/fftw_test.c: Fixed linearity test * tests/fftw_test.c: Removed legacy (crappy) computation of relative error. * tests/fftw_test.c: Minor changes Mon Mar 16 21:56:23 1998 fftw * tests/fftw_test.c: Fixed bug in plan verifier: both real and imaginary unit impulses must be checked. Also made output less verbose, and computed verified plans only once. Some other slight changes. * tests/fftw_test.c, gensrc/Attic/Makefile.in: Fixed makefile * tests/fftw_test.c, fftw/Attic/naive.c, fftw/fftw.h.in: Implemented Funda's verification procedure * gensrc/fft.ml, gensrc/exprdag.mli, gensrc/exprdag.ml: Perfected optimizer to convert a*v + b*v -> (a+b)*v. (I had to merge CSE and Algsimp in order to achieve this effect. The code is sligtly messier but faster) Fri Mar 13 23:51:06 1998 fftw * gensrc/fft.ml: Added DIF split radix Fri Mar 6 16:12:06 1998 fftw * gensrc/util.mli, gensrc/util.ml, gensrc/to_c.ml, gensrc/magic.ml, gensrc/genfft.ml: Minor tweaks Thu Mar 5 22:34:27 1998 fftw * fftw/fftw.h.in, gensrc/genfft.ml: Fixed unorthodox cast * gensrc/exprdag.ml, gensrc/asched.ml: More tweaks and cosmetic changes * gensrc/exprdag.ml: Extended capabilities of monads. This will make it easier for me to merge CSE and simplification, if I ever want to do that. Wed Mar 4 17:03:48 1998 fftw * gensrc/number.ml, gensrc/exprdag.ml: Minor changes * gensrc/asched.ml: Minor aesthetic change. Tue Mar 3 23:24:21 1998 fftw * gensrc/fft.ml: Exposed common subexpressions for odd primes * gensrc/asched.ml: More hacks to generate better code * gensrc/exprdag.mli: Added forgotten exprdag.mli * gensrc/to_c.ml, gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/exprdag.ml: Veni. Vidi. Vici. Mon Mar 2 21:39:50 1998 fftw * gensrc/fft.ml: Added split radix * gensrc/Makefile.genfft: Fixed dependencies * gensrc/fft.ml, gensrc/exprdag.ml, gensrc/complex.mli, gensrc/complex.ml: Solved the uminus problem * gensrc/Attic/simplify.mli, gensrc/Attic/simplify.ml, gensrc/Attic/assign.mli, gensrc/Attic/assign.ml: Removed unused files * gensrc/variable.mli, gensrc/variable.ml, gensrc/util.mli, gensrc/util.ml, gensrc/to_c.ml, gensrc/schedule.mli, gensrc/schedule.ml, gensrc/number.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/exprdag.ml, gensrc/expr.mli, gensrc/expr.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/ast.ml, gensrc/asched.mli, gensrc/asched.ml, gensrc/Makefile.sources, gensrc/Makefile.genfft: Switched to functional approach (as opposed to assignment-based) Sat Feb 28 21:32:04 1998 fftw * gensrc/schedule.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/Makefile.sources: Now we have the right scheduler, I believe. (And much simpler than before.) Added another vodoo parameter * tests/fftw_test.c: Added a comma. * gensrc/makesources.sh: Put parallel mode back in * gensrc/schedule.ml, gensrc/makesources.sh, gensrc/dag.ml: More improvements to the scheduler * gensrc/schedule.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/asched.ml, gensrc/Makefile.sources: Improved generator Fri Feb 27 22:25:20 1998 fftw * gensrc/schedule.ml: Small adjustment to scheduler * gensrc/util.mli, gensrc/util.ml, gensrc/to_c.ml, gensrc/schedule.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/asched.ml, gensrc/Makefile.sources: Completely rewritten the scheduler * gensrc/to_c.ml, gensrc/schedule.mli, gensrc/schedule.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/ast.ml, gensrc/asched.mli, gensrc/asched.ml, gensrc/Makefile.sources: Changes to the scheduler that should ease the right thing, if I ever find it. Thu Feb 26 18:55:11 1998 fftw * gensrc/variable.mli, gensrc/variable.ml, gensrc/magic.ml, gensrc/genfft.ml, gensrc/exprdag.ml, gensrc/dag.ml, gensrc/Makefile.genfft: Added more magic options to change the order of loads and stores Wed Feb 25 22:18:28 1998 fftw * tests/fftw_test.c: Enhanced test_planner and added some crazy remarks. Tue Feb 24 19:23:23 1998 fftw * gensrc/exprdag.ml: Aesthetic changes to the optimizer * gensrc/magic.ml, gensrc/genfft.ml, gensrc/exprdag.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/Makefile.genfft: Removed unused code and added more options Mon Feb 23 23:09:24 1998 fftw * fftw/twiddle.c: Minor fix * gensrc/makesources.sh, gensrc/exprdag.ml: Added inlining of variables used only once * gensrc/expr.ml: Fixed is_one and is_mone, which were screwing up the polynomial convolution generator. * gensrc/exprdag.ml: Fixed bug * gensrc/exprdag.ml: Minor change * gensrc/makesources.sh: Added PARALLEL back * gensrc/exprdag.ml: Added exprdag.ml * gensrc/variable.mli: Removed relic * gensrc/variable.mli, gensrc/to_c.ml, gensrc/schedule.ml, gensrc/makesources.sh, gensrc/expr.mli, gensrc/expr.ml, gensrc/complex.ml, gensrc/Attic/assign.mli, gensrc/Attic/assign.ml, gensrc/Makefile.genfft: Changed simplifier completely Thu Feb 19 16:37:21 1998 fftw * mpi/Attic/README: Noted transposed dimensions for inverse transform. Wed Feb 18 18:25:59 1998 fftw * gensrc/variable.mli, gensrc/Attic/simplify.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/Attic/assign.ml, gensrc/Makefile.sources: Addec common subexpression elimination and other tricks * gensrc/util.mli, gensrc/Attic/polygen.ml, gensrc/util.ml, gensrc/Attic/poly.ml, gensrc/number.ml, gensrc/fft.ml, gensrc/Attic/factorizer.ml, gensrc/expr.mli, gensrc/complex.mli, gensrc/expr.ml, gensrc/complex.ml, gensrc/Makefile.sources, gensrc/Makefile.genfft, gensrc/Makefile: Added functions for implementing polynomial-based algorithms, and implemented convolution by recursive factorization of z^n - 1. Sun Feb 15 20:33:26 1998 fftw * fftw/twiddle.c: Fixed silly comment * fftw/twiddle.c, fftw/planner.c, fftw/fftw.h.in, rfftw/Attic/rfftw.c, gensrc/makeconfig.sh, gensrc/genfft.ml: const-qualified codelet_desc structure. * fftw/twiddle.c: Fixed bug in twiddle.c * fftw/twiddle.c, fftw/planner.c, fftw/fftw.h.in, rfftw/Attic/rfftw.c, gensrc/to_c.mli, gensrc/to_c.ml, gensrc/makeconfig.sh, gensrc/genfft.ml, gensrc/fft.ml, gensrc/config_prelude: Added codelet descriptions. Changed everything else Sat Feb 14 22:58:27 1998 fftw * gensrc/util.mli, gensrc/util.ml, gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml: Added Rader algorithm for prime sizes, with FFTs for the convolutions. * fftw/twiddle.c, fftw/planner.c, fftw/fftw.h.in, gensrc/makeconfig.sh, gensrc/genfft.ml, gensrc/fft.ml, gensrc/config_prelude: Modified to pack twiddle array according to twiddle generation technique. * tests/Attic/testnd.c: Make sure that compiler knows isnan takes a double arg. * fftw/planner.c, fftw/fftwnd.c, fftw/fftw.h.in, gensrc/to_c.ml, gensrc/makeconfig.sh: Changed fftw_op_count vars to const. Fri Feb 13 21:05:36 1998 fftw * tests/Attic/testnd.c, tests/fftw_test.c, fftw/fftw.h.in, configure.in: Checked for isnan() and, if it is available, use it to check for NaN's in the test programs. * gensrc/schedule.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/Attic/assign.ml: Made scheduler policy more rational. * gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml: Added more twiddle policies * gensrc/to_c.ml, gensrc/genfft.ml: Removed redundant brackets * gensrc/to_c.ml, gensrc/README: Added README. Thu Feb 12 23:47:23 1998 fftw * gensrc/variable.ml, gensrc/to_c.ml, gensrc/Attic/simplify.ml, gensrc/schedule.ml, gensrc/number.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/expr.ml, gensrc/dag.ml, gensrc/ast.ml, gensrc/Attic/assign.ml, gensrc/asched.ml: Added a little documentation to the beginning of each file. * gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml: Added yet another twiddle policy * gensrc/number.ml: Cosmetic changes. Increased margin of safety in almost_equal_cnum. Got rid of unnecessary call to Arith_status.set_normalize_ratio (we were setting it to the default value). * gensrc/number.ml: Used the "right" algorithm for cexp. * gensrc/magic.ml, gensrc/genfft.ml, gensrc/fft.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/Makefile.sources: Added twiddle policies back * gensrc/number.ml, gensrc/Makefile.sources: Improved speed and clarity of the multiprecision complex exponential calculator. * gensrc/to_c.ml: No parentheses around FFTW_K*. * gensrc/number.ml: Increased default precision. * gensrc/to_c.ml, gensrc/number.mli, gensrc/number.ml, gensrc/complex.ml, gensrc/Makefile.sources: Implemented multiple precision library Wed Feb 11 19:42:54 1998 fftw * gensrc/variable.ml, gensrc/variable.mli, gensrc/util.mli, gensrc/util.ml, gensrc/to_c.mli, gensrc/to_c.ml, gensrc/Attic/simplify.mli, gensrc/Attic/simplify.ml, gensrc/schedule.mli, gensrc/schedule.ml, gensrc/number.mli, gensrc/Attic/makekonst.sh, gensrc/number.ml, gensrc/magic.ml, gensrc/install.sh, gensrc/genfft.ml, gensrc/fft.ml, gensrc/expr.mli, gensrc/expr.ml, gensrc/dag.mli, gensrc/dag.ml, gensrc/complex.mli, gensrc/complex.ml, gensrc/codelet_prelude, gensrc/ast.ml, gensrc/Attic/assign.mli, gensrc/Attic/assign.ml, gensrc/asched.mli, gensrc/asched.ml, gensrc/Makefile.sources, gensrc/Attic/Makefile.in, gensrc/Makefile: Switched to new codelet generator * fftw/fftwnd.c: Print op count with plan. * fftw/fftwnd.c: Modified comment. * tests/fftw_test.c: Updated to test speed and planner for multi-dimensional transforms. * fftw/timer.c, fftw/fftwnd.c, fftw/fftw.h.in: Added specific planner for fftwnd, along with the possibility of buffered fftwnd transforms. Also added fftwnd_print_plan. Sun Feb 8 00:20:22 1998 fftw * fftw/malloc.c: Prepend "fftw: " to fftw_die messages. Wed Feb 4 19:32:50 1998 fftw * gensrc/genfft.ml: Added twiddle generate/load policy * gensrc/genfft.ml: Improved command-line parsing * gensrc/Attic/makekonst.sh: Removed reference to ~stevenj/calc * fftw/Attic/konst.h, gensrc/Attic/makekonst.sh, gensrc/install.sh, gensrc/genfft.ml, gensrc/Makefile: Implemented automatic generation of konst constants via the calc program. * gensrc/genfft.ml: Some (many) stylistic changes * gensrc/genfft.ml: Added computation of operation counts. * fftw/fftw.h.in, fftw/executor.c, configure.in: Added the 386 stack hack Tue Feb 3 23:46:04 1998 fftw * gensrc/genfft.ml: Printed out konst expressions, and got rid of all the extra damn parentheses. * gensrc/genfft.ml: Keep track of generating expressions along with real numbers. * gensrc/genfft.ml: Minor cosmetic changes * tests/fftw_test.c: Benchmark specific planner in speed tests. Mon Feb 2 23:52:42 1998 fftw * fftw/timer.c, fftw/planner.c, fftw/fftw.h.in: Added fftw_create_plan_specific. * fftw/malloc.c, fftw/fftw.h.in, configure.in: Removed stupid memalign * fftw/malloc.c, fftw/fftw.h.in, gensrc/genfft.ml, gensrc/Makefile.sources, gensrc/Attic/Makefile.in, configure.in: Added hooks for general dag node rewriting. Added support for -mdouble-align on Pentia. Added support for memalign on systems that have it. * gensrc/genfft.ml: Fixed bug in genfft.ml Sun Feb 1 00:25:42 1998 fftw * gensrc/genfft.ml: Improved speed of generator (but not of resulting program) Fri Jan 30 22:01:17 1998 fftw * gensrc/makesources.sh, gensrc/makemakefile.sh: Fixed bug in makesources * gensrc/makemakefile.sh: Fixed bug in makemakefile * gensrc/makesources.sh, gensrc/genfft.ml, gensrc/Makefile.sources, gensrc/Makefile: Added new codelet generator. Wed Jan 28 22:15:05 1998 fftw * FAQ/fftw-faq.bfnn: Noted that tests have been fixed so that they now work in single-precision. * rfftw/Attic/README.rfftw: By popular demand, added explanation of howmany, stride, and dist. Mon Jan 26 15:39:42 1998 fftw * configure.in, Attic/Makefile.in: Minor fixes to makefile * tests/fftw_test.c, fftw/fftw.h.in, configure.in: Added --enable-float Sun Jan 25 20:10:26 1998 fftw * fftw/timer.c, fftw/fftw.h.in, configure.in: Support BSDgettimeofday. * Attic/build-distrib.sh: Updated to run autoconf and also to copy fftw.h.in to fftw.h for non-UNIX systems. * tests/fftw_test.c: Fixed askuser function (matching function in benchfft). * fftw/fftw.h.in: Used #ifdef HAVE_UNISTD_H, etc. For fftw_time definitions, used #if..#elif...#else...#endif instead of #ifdef...#endif...#if...#endif...etc. * Attic/configure: Removed configure from repository since it is generated by autoconf. Sat Jan 24 19:25:06 1998 fftw * tests/fftw_test.c, fftw/fftw.h.in, configure.in, Attic/configure: Checked for getopt for fftw_test with autoconf. * tests/fftw_test.c: Printed out tmin/tmax for fftw_test -v -t * Attic/RELEASE-NOTES: Noted changes. * README: Referred users to manual for installation instructions. * fftw/fftw.h.in: Fixed grammar in comment. * fftw/timer.c: Fixed sourious struct timezone * configure.in, Attic/configure: Added --with-gcc configure option Fri Jan 23 22:50:48 1998 fftw * configure.in, Attic/configure: Hacker better linux cflags * tests/Attic/Makefile.in, rfftw/Attic/Makefile.in, doc/Attic/Makefile, Attic/Makefile.in: Fixed install target in makefiles * fftw/timer.c, fftw/fftw.h.in, gensrc/Attic/Makefile.in: Fixed more typos * fftw/timer.c, fftw/fftw.h.in, Attic/install.sh, Attic/install-sh, configure.in, Attic/configure: Fixed various typos * Attic/Makefile.in: Added forgotten Makefile.in * Attic/install-sh: Added forgotten install-sh * tests/fftw_test.c, tests/Attic/Makefile, tests/Attic/Makefile.in, fftw/timer.c, fftw/fftw.h.in, fftw/Attic/fftw.h, rfftw/Attic/Makefile.in, gensrc/install.sh, rfftw/Attic/Makefile, gensrc/Attic/Makefile.in, configure.in, Attic/configure, Attic/config.sub, Attic/config.guess: Converted to `configure' automatic configuration. Converted to new timer. * fortran/Attic/fftw_f77_param.f, fortran/fftw_f77.i, fortran/f77_test.F, fortran/Attic/README: fftw_f77_param.f -> fftw_f77.i Tue Jan 20 23:52:21 1998 fftw * fftw/timer.c, fftw/Attic/fftw.h: Fixed timer logic and constants Mon Jan 19 19:08:46 1998 fftw * tests/Attic/Makefile, fftw/Attic/fftw.h, gensrc/Attic/Makefile.in: Fixed alpha timing constants * tests/Attic/Makefile: Fixed makefile * tests/Attic/Makefile, fftw/timer.c, fftw/Attic/fftw.h, gensrc/Attic/Makefile.in: Added support for timeval systems * fftw/timer.c: Oops, I forgot to remove a debugging flag * gensrc/Attic/Makefile.in: Fixed Makefile * fftw/timer.c, fftw/planner.c, fftw/Attic/fftw.h, fftw/executor.c, rfftw/Attic/time_rfftw.c, rfftw/Attic/rfftw.c: Removed COPY_TWIDDLE and added new timer policy Fri Jan 16 04:13:05 1998 fftw * matlab/README: Noted requirement of MATLAB 5.0 or later. * matlab/fftw.m, matlab/fftw.c, matlab/README, matlab/Makefile, Attic/RELEASE-NOTES, README: Added MATLAB wrappers. Thu Jan 15 20:27:36 1998 fftw * fftw/planner.c, fftw/fftwnd.c, fftw/Attic/fftw.h: Added fftwnd_count_plan_ops. Tue Dec 16 00:12:52 1997 fftw * fftw/Attic/common_io.c: Explicit cast of void* to char*. Mon Dec 15 18:03:19 1997 fftw * fortran/Attic/fftw_f77.c, fortran/Attic/README: Fixed up & documented -DUSING_G77. * fortran/Attic/fftw_f77.c: Added Fortranize macro for g77. Tue Dec 9 19:47:34 1997 fftw * FAQ/fftw-faq.bfnn: Mentined precision-specificity of MPI routines. * FAQ/fftw-faq.bfnn: 1.2 -> 1.2.1 * mpi/Attic/README: Noted type specialization of transpose_mpi. Thu Dec 4 22:40:09 1997 fftw * Attic/RELEASE-NOTES: Noted new MPI bug fix, 1.2.1 maintenance release. Tue Dec 2 19:59:28 1997 fftw * FAQ/fftw-faq.bfnn: Changed wording. * FAQ/fftw-faq.bfnn: Reorganized & added question/answer on shifting the origin to the center. Sat Nov 29 20:12:07 1997 fftw * doc/fftw.texi: Removed documentation for fftw_malloc/fftw_free, which the user should never call anyway. Fri Nov 21 18:04:09 1997 fftw * gensrc/Attic/Makefile.in: Added -IPA to SGI Added alpha CFLAGS Thu Nov 20 00:46:41 1997 fftw * tests/fftw_test.c: Made speed test more like benchmark. Mon Nov 17 20:46:47 1997 fftw * fftw/Attic/fftw.h: Added support for Nanosecond timer routines available on some PowerMacs. Mon Nov 10 16:17:14 1997 fftw * Attic/RELEASE-NOTES, README: Mentioned Fortran wrapper routines. * fortran/Attic/fftw_f77_param.f, fortran/Attic/fftw_f77.c, fortran/f77_test.F, fortran/Attic/README: Added Fortran wrapper routines. Wed Nov 5 20:44:30 1997 fftw * fftw/Attic/fftw.h: Removed joke. * FAQ/fftw-faq.bfnn: Noted problems with test programs in single precision. Tue Nov 4 23:27:41 1997 fftw * FAQ/fftw-faq.bfnn: Documented FFTW 1.2 MPI bugs. * Attic/RELEASE-NOTES: Mentioned fix for latest MPI bug. * mpi/Attic/time_fftwnd_mpi.c, mpi/fftwnd_mpi.c: Made sure fftw_malloc/fftw_free were used everywhere. Sun Nov 2 05:11:12 1997 fftw * doc/fftw.texi: Excised "small fee." Sat Nov 1 00:02:22 1997 fftw * doc/fftw.texi: Added ref. to paper. Fri Oct 31 05:29:11 1997 fftw * tests/Attic/testnd.c, rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c: void main -> int main Wed Oct 29 02:15:16 1997 fftw * fftw/planner.c: Fixed copy_twiddle bug * doc/fftw.texi: Added more multi-dimensional array comments. Mon Oct 27 21:47:06 1997 fftw * fftw/timer.c, fftw/Attic/fftw.h: Added verbose timer output option in timer.c (via the FFTW_OUTPUT_TIMING preprocessor symbol). Thu Oct 23 22:15:59 1997 fftw * fftw/planner.c, fftw/Attic/fftw.h, gensrc/makeconfig.sh, gensrc/genfft.ml, gensrc/config_prelude: Added fftw_count_plan_ops capability. * gensrc/genfft.ml: Added Rader method for prime sizes (currently only used for N >= 13). Mon Oct 20 18:21:07 1997 fftw * doc/fftw.texi: Qualified comparison of multiplication to load for in-cache access. Sun Oct 19 05:09:26 1997 fftw * gensrc/genfft.ml: Cleaned things up a bit and fixed another case where minus signs weren't propagating properly. * gensrc/genfft.ml: Fixed two bugs in simplifier: #simplify (Plus [Real (-. 0.5) ; Real 0.0]);; - : Expr = Real -0.5 instead of Uminus (Real 0.5) #simplify (Times (Uminus (Real 0.5), Plus [Var "v1" ; Uminus (Var "v2")]));; - : Expr = Uminus (Times (Real 0.5, Plus [Var "v1"; Uminus (Var "v2")])) instead of Times (Real 0.5, Plus [Var "v2"; Uminus (Var "v1")]) Wed Oct 15 20:26:22 1997 fftw * Attic/RELEASE-NOTES: Mentioned MPI bug fix. Wed Oct 8 22:36:30 1997 fftw * gensrc/Attic/Makefile.in: Removed redundant codelets definition. Tue Oct 7 19:08:50 1997 fftw * gensrc/genfft.ml: Used FFTW_COMPLEX instead of COMPLEX in twiddle codelets. * fftw/wisdom.c, fftw/timer.c, fftw/planner.c, fftw/Attic/naive.c, fftw/malloc.c, fftw/Attic/konst.h, fftw/generic.c, fftw/fftwnd.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/common_io.c, fftw/.indent.pro, gensrc/.indent.pro: Hacked the COPY_TWIDDLE thing in Mon Sep 22 23:37:53 1997 fftw * fftw/executor.c: Updated version number * gensrc/.indent.pro: Added indent.pro Sat Sep 20 16:00:20 1997 fftw * gensrc/config: Fixed typo in comment. * gensrc/config: Added more words of explanation. Thu Sep 18 16:16:44 1997 fftw * gensrc/makesources.sh: Minor change * gensrc/genfft.ml: New genfft cost model * gensrc/genfft.ml, gensrc/Makefile: Improved (?) codelet generator Wed Sep 17 16:37:07 1997 fftw * gensrc/config_prelude: Added config_prelude * fftw/Attic/config.c, gensrc/Attic/prelude, gensrc/makeconfig.sh, gensrc/codelet_prelude, gensrc/Makefile.sources, gensrc/Makefile: Added codelet_prelude/config_prelude mechanism Tue Sep 16 15:38:55 1997 fftw * doc/fftw.texi: Updated docs * gensrc/config: Minor fix * gensrc/install.sh, gensrc/config: Minor fixes * gensrc/makesources.sh, gensrc/makeconfig.sh, gensrc/makemakefile.sh: Minor fix * fftw/Attic/prelude, fftw/Attic/genfft.ml, fftw/Attic/config.c, fftw/Attic/Makefile, fftw/Attic/Makefile.sources, gensrc/Attic/prelude, gensrc/makesources.sh, gensrc/makemakefile.sh, gensrc/makeconfig.sh, gensrc/install.sh, gensrc/genfft.ml, gensrc/config, gensrc/Makefile.sources, gensrc/Attic/Makefile.in, gensrc/Makefile, Attic/build-distrib.sh: Restructured the way configuration work. Now there is a single configuration file, and everything that depends on it is automatically generated. * fftw/Attic/Makefile: Made Makefile smarter Sun Sep 14 17:10:23 1997 fftw * FAQ/fftw-faq.bfnn: Added answer to question about scale factor. Fri Sep 12 20:26:12 1997 fftw * README.hacks: Fixed left<->right Sun Sep 7 04:01:48 1997 fftw * FAQ/fftw-faq.bfnn: Alluded to the Fortran-accessible wrapper code that I wrote. Thu Sep 4 19:14:21 1997 fftw * tests/fftw_test.c: Added more timer paranoia. * tests/fftw_test.c: Added paranoid test Tue Sep 2 20:34:54 1997 fftw * mpi/Attic/README: Now distributed as a part of the normal FFTW package. * doc/fftw.texi: Updated fee information. Sun Aug 31 17:59:56 1997 fftw * doc/texi2html, FAQ/m-html.pl: Fixed to produce correct HTML 3.2 output (there had been some technical errors in the HTML code). Fri Aug 29 15:25:15 1997 fftw * tests/fftw_test.c: Oops fixed } * tests/Attic/testnd.c, tests/fftw_test.c: Using rand() by default. More verbose messages. Thu Aug 28 00:22:04 1997 fftw * FAQ/fftw-faq.bfnn: Removed unnecessary ellipsis. * doc/fftw.texi: Fix two minor typos. * FAQ/fftw-faq.bfnn: Minor style changes. Wed Aug 27 23:41:36 1997 fftw * Attic/RELEASE-NOTES: Fixed typo in v1.1 notes. * cilk/time_cilk.cilk, cilk/test_cilk.cilk: Minor cilk fix * fftw/twiddle.c, fftw/planner.c, fftw/malloc.c, fftw/Attic/config.c: Removed memory-leak test in non-debug version, to avoid problems in parallel version. (This sounds like the only possibility. I could put a cilk lock around the counter, but then it becomes slow, and locks are nonportable, etc) * tests/fftw_test.c: Removed DOS vestigia from test program * fftw/Attic/genfft.ml: Added Nussbaumer N=5 code (disabled). * doc/fftw.texi: Minor wording change. * Attic/RELEASE-NOTES, README: Mentioned FAQ. * fftw/malloc.c: Silenced compiler warning (required hack) * doc/fftw.texi: Acknowledged the BFNN author * FAQ/bfnnconv.pl: Removed useless lout/post output * Attic/build-distrib.sh: oops build-distrib was wrong :-) * Attic/build-distrib.sh: Added build-distrib.sh that creates sources/manuals for the distribution * fftw/Attic/genfft.ml: Removed nussbaumer for now. * fftw/malloc.c: Added to the paranoia. * FAQ/fftw-faq.bfnn: Fixed formatting (and a typo). * FAQ/fftw-faq.bfnn: Fixed typo * FAQ/fftw-faq.bfnn: Updated FAQ * fftw/malloc.c: Made malloc a bit more paranoid * FAQ/fftw-faq.bfnn: Removed snide comments about Visual C++. Readers can draw their own conclusions. * tests/fftw_test.c: unix symbol is not defined on all UNIX systems (e.g. AIX). * fftw/malloc.c: Added more NULL checks to debugging code. * Attic/RELEASE-NOTES: Updated to note rfftwnd bug fix (yikes!). * fftw/malloc.c: Fixed macro bug. * rfftw/rfftwnd.c: Fixed bug where data structure allocated was too small (yikes!!!). Tue Aug 26 23:15:27 1997 fftw * fftw/Attic/konst.h, fftw/Attic/genfft.ml: Used Nussbaumer size 3 FFT. * threads/Attic/test_threads.c: Used fftw_malloc/fftw_free. * mpi/Attic/test_fftwnd_mpi.c: Used fftw_malloc/fftw_free & checked for leaks with fftw_check_memory_leaks. * cilk/test_cilk.cilk, threads/Attic/test_threads.c: Checked for memory leaks with fftw_check_memory_leaks(). * rfftw/Attic/test_rfftw.c, tests/Attic/testnd.c, tests/fftw_test.c: Used fftw_check_memory_leaks(). * fftw/Attic/fftw.h: Added fftw_check_memory_leaks(). * fftw/malloc.c: Included fftw_check_memory_leaks() function. * fftw/malloc.c: Put more paranoia into debug versions of fftw_malloc and fftw_free. * rfftw/Attic/Makefile: Put gcc first. * rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c: Fixed malloc->fftw_malloc. * threads/Attic/Makefile: Fixed threads lossage * rfftw/Attic/time_rfftw.c: Fixed rfftw lossage * cilk/Makefile: Fixed cilk port * FAQ/fftw-faq.bfnn: Added FAQ on VC++ * FAQ/html.refs, FAQ/fftw-faq.bfnn: Linked to our Windows installation notes. * FAQ/m-html.pl: More small fixes. * FAQ/m-html.pl: Fixed forward/back. * FAQ/fftw-faq.bfnn: Formatted "wisdom" correctly in all cases. * FAQ/fftw-faq.bfnn: Fixed date * FAQ/Makefile: Whoops! Fixed install-html (~ -> $(HOME)). * FAQ/Makefile: Included install-html option. * FAQ/m-html.pl, FAQ/fftw-faq.bfnn: Touched up FAQ & HTML conversion. * Attic/RELEASE-NOTES: Mentioned header-file changes. * tests/fftw_test.c: Minor tweaks to test program. * README: Updated (included mention of mpi/ directory). * FAQ/Makefile: Fixed makefile * doc/fftw.texi, FAQ/m-lout.pl, FAQ/m-post.pl, FAQ/m-info.pl, FAQ/m-html.pl, FAQ/m-ascii.pl, FAQ/fftw-faq.bfnn, FAQ/html.refs, FAQ/bfnnconv.pl, FAQ/Makefile, Attic/RELEASE-NOTES, README: Added FAQ. Changed docs in minor ways. Mon Aug 25 21:28:30 1997 fftw * doc/fftw.texi: Deleted unsatisfying quotations. Sun Aug 24 15:46:21 1997 fftw * tests/fftw_test.c: Explained comment. * doc/fftw.texi: Updated node structure. Fixed bug (EOF == -1, not 4) Sat Aug 23 20:37:21 1997 fftw * doc/texi2html: Touched up a bit. * doc/texi2html: Used HTML copyright entity (©) for @copyright. * doc/fftw.texi: Made licensing requirements for commercial users explicit. * TODO: Changed indenting. * TODO: Updated. * Attic/RELEASE-NOTES: Listed timer changes. * fftw/Attic/fftw.h: Added documentation to each FFTW_TIME_MIN definition, to help prevent users from modifying the wrong one. * doc/fftw.texi: Updated installation notes. * tests/README: Updated documentation for fftw_test. Fri Aug 22 23:12:14 1997 fftw * doc/fftw.texi: Finished draft of wisdom documentation. * doc/fftw.texi: Fixed { -> @{ * doc/texi2html: Don't use

tag. * doc/fftw.texi: Added quotation format. * doc/fftw.texi: Inserted quotes. * tests/fftw_test.c: Fixed typo in comment. * fftw/Attic/fftw.h: Changed solaris time constant * Attic/RELEASE-NOTES: Updated. * fftw/malloc.c, fftw/Attic/common_io.c: Checked for NULL pointers. * doc/fftw.texi: Added wisdom example code, plus some other slight changes. * fftw/Attic/common_io.c: Added `const' to pointer to shut up compiler * tests/fftw_test.c, fftw/malloc.c: Removed unused memory-leak hack * doc/fftw.texi: Changes to manual * doc/fftw.texi: Made some changes; documented import/export functions. * fftw/Attic/fftw.h: Defined FFTW_HAS_WISDOM symbol. * tests/fftw_test.c: Added another wisdom check. * tests/fftw_test.c: Updated to use fftw_forget_wisdom(). * fftw/wisdom.c, fftw/Attic/fftw.h: Added fftw_forget_wisdom(). * doc/fftw.texi: Started writing wisdom documentation. Thu Aug 21 23:23:43 1997 fftw * tests/fftw_test.c: Fixed syntax error (had to put Mac and Windows on the same line...ugh!). * tests/fftw_test.c: Can't use getopt on Mac or Windows. * tests/fftw_test.c: removed relics * tests/fftw_test.c: Iterate backwards through times to find first inaccurate time. * tests/fftw_test.c: Made test_timer use non-diverging computation. * fftw/Attic/fftw.h: Decreased min. time for Mac (although I don't understand why the results aren't consistent for shorter times). * tests/fftw_test.c: Polished timer test * tests/fftw_test.c: In timer test, print minimum measured time interval (> 0). * fftw/Attic/config.c: Fixed bug in structure initialization. * tests/fftw_test.c: %ul -> %u * tests/fftw_test.c: Two things: * Added -t option to test timer accuracy. * Added interactive mode so that fftw_test will work on machines (e.g. Macs) without a command-line. * threads/Attic/time_threads.c: Used fftw_time_diff. * mpi/Attic/time_fftwnd_mpi.c: Used fftw_time_diff for init_t. * rfftw/Attic/time_rfftw.c: Used fftw_time instead of clock(). * tests/fftw_test.c: Used fftw_time_diff. * tests/README: Updated documentation. * mpi/Attic/time_fftwnd_mpi.c: Use fftw_time_diff. * fftw/timer.c, fftw/Attic/fftw.h: Use fftw_time_diff and fftw_time_to_sec combo. * fftw/Attic/fftw.h, fftw/timer.c: Fixed timer code to handle more abstract fftw_time. Wed Aug 20 23:59:37 1997 fftw * fftw/wisdom.c, fftw/planner.c: New wisdom now replaces old wisdom * fftw/planner.c: Added some macrology to polish planner * tests/fftw_test.c: Don't pass "t" flag to fopen. * fftw/planner.c: Restructured planner. * fftw/planner.c: Fixed bug (from last modification). * fftw/planner.c: Fixed behavior when invalid wisdom is encountered (ignore it and plan normally instead of using the generic twiddle, as it had been doing). * fftw/wisdom.c: Fixed typo. * fftw/wisdom.c: Don't save FFTW_ESTIMATE "wisdom" (only measurements produce wisdom), and always use FFTW_MEASURE wisdom. * tests/fftw_test.c: Test & save accumulated wisdom. * fftw/Attic/common_io.c: Fixed typo. * fftw/wisdom.c: Ate more blanks. Allowed empty wisdom. * fftw/Attic/common_io.c: Used char** instead of struct. * fftw/Attic/common_io.c, fftw/planner.c, fftw/Attic/fftw.h, fftw/Attic/Makefile, fftw/Attic/oracle.c, fftw/wisdom.c: Changed oracle -> wisdom. * tests/fftw_test.c: Used repeated doubling to get number of iterations in speed test. Printed out MFLOPS. * fftw/Attic/oracle.c, fftw/Attic/fftw.h, fftw/Attic/common_io.c: Added void *data to import/export functions for passing data to the i/o hook functions. Also, wrote routines for the common cases of i/o from/to files and strings. * fftw/planner.c, fftw/Attic/oracle.c, fftw/Attic/hints.c, fftw/Attic/fftw.h, fftw/Attic/Makefile: Renamed hints->oracle * fftw/Attic/hints.c: Fixed bug in expect_int() * fftw/planner.c: Added sanity checks for hints. * rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/Attic/rfftw.c: Used fftw_malloc & fftw_free, checked for leaks. Fri Aug 15 13:44:56 1997 fftw * fftw/Attic/hints.c: Oops, forgot to add hints.c Wed Aug 13 14:44:26 1997 fftw * fftw/Attic/fftw.h: Added prototypes for hints to fftw.h * fftw/planner.c, fftw/malloc.c, fftw/Attic/fftw.h, fftw/Attic/config.c, fftw/Attic/Makefile: Implemented the new hint mechanism Mon Aug 11 03:34:13 1997 fftw * fftw/planner.c, fftw/Attic/fftw.h: Added capability to save/restore plans to/from strings. Sun Aug 10 19:16:57 1997 fftw * fftw/planner.c: Changed use_node so that it doesn't croak an a null pointer (this may be useful in the future, although it doesn't matter now). * fftw/planner.c: When working on a plan for size n, don't bother checking twiddle by n followed by no_twiddle of size 1 (unless there is no other plan yet). (There is no way that this is going to be faster than no_twiddle of size n, for example.) Fri Aug 8 22:45:39 1997 fftw * fftw/timer.c, fftw/Attic/fftw.h: Adopted doubling scheme tor timers * fftw/Attic/Makefile.sources: Changed echo to @echo to prevent the echo command itself from being echoed. * fftw/Attic/fftw.h: Changed some FFTW_TIME_MIN settings. * fftw/timer.c, fftw/Attic/fftw.h: Documented timers in fftw.h * fftw/timer.c: Made sure that iteration counter really increases/decreases Thu Aug 7 19:11:04 1997 fftw * fftw/timer.c, fftw/Attic/fftw.h: Taken care of boundary case plan_iter == 0 * fftw/timer.c, fftw/Attic/fftw.h, TODO: Improved timers Fri Aug 1 17:59:48 1997 fftw * doc/fftw.texi: Minor elucidation in installation notes. Tue Jul 29 03:26:30 1997 fftw * doc/fftw.texi: Explicitly documented common case where howmany and strides are 1. * doc/fftw.texi: More nit-picking. * doc/fftw.texi: Nit-picking, as usual. * doc/fftw.texi: Clarified optimal sizes. Mon Jul 28 17:52:01 1997 fftw * rfftw/Attic/README.rfftw: Fixed typo. Mon Jul 21 19:33:21 1997 fftw * doc/fftw.texi: Fixed a couple of typos, and nit-picked some more. * doc/fftw.texi: Me, nit-picking as usual. Fri Jul 18 05:07:39 1997 fftw * fftw/timer.c: Fixed possible compiler difficulty with Mac timing routines. Sun Jul 13 20:00:18 1997 fftw * TODO: Added a couple of items. * fftw/Attic/fftw.h: Added joke. Tue Jul 8 05:53:54 1997 fftw * fftw/planner.c: Whoops! Fixed typo in fftw_fprint_plan stuff. * fftw/planner.c, fftw/Attic/fftw.h: Added fftw_fprint_plan (prints plan to file) (needed in benchmark program). Mon Jul 7 15:25:11 1997 fftw * tests/Attic/test.c, tests/fftw_test.c, tests/Attic/Makefile: Rewritten test program. Tue Jul 1 20:37:03 1997 fftw * doc/fftw.texi: Fixed info version of manual Fri Jun 27 12:06:01 1997 fftw * fftw/Attic/Makefile: Added definition for $(MAKE) Thu Jun 26 23:08:07 1997 fftw * doc/fftw.texi: Fixed minor typo Fri Jun 20 22:41:11 1997 fftw * mpi/Attic/README: Added README for fftwnd_mpi. * mpi/Attic/time_fftwnd_mpi.c: Added MPI_Finalize call. Tue Jun 17 19:00:03 1997 fftw * doc/fftw.texi: Added warning for IN_PLACE transforms * Attic/RELEASE-NOTES: Fixed release notes * tests/Attic/testnd.c, tests/Attic/test.c, fftw/fftwnd.c: Fixed memory leak Mon May 26 19:48:43 1997 fftw * threads/fftw_threads.h, fftw/Attic/fftw.h, rfftw/rfftw.h, mpi/Attic/fftwnd_mpi.h: Added extern "C" { ... } directive for C/C++ compatibility. * threads/fftw_threads.h: Protected against multiple inclusions of header file. * rfftw/rfftw.h: Protected against multiple inclusions of rfftw.h. * fftw/Attic/fftw.h: Protected against multiple inclusions of fftw.h. Sun May 25 20:06:56 1997 fftw * threads/fftw_threads.h, threads/Attic/README, threads/fftw_threads.c, threads/Attic/Makefile: Modified BeOS docs to reflect fact that it has been tested. Added untested support for MP MacOS machines. * doc/fftw.texi: Fixed a couple of typos and spruced up things here and there. Tue May 20 00:17:11 1997 fftw * mpi/Attic/time_fftwnd_mpi.c: Removed extra barriers. Sat May 17 07:48:32 1997 fftw * mpi/Attic/fftwnd_mpi.h, mpi/fftwnd_mpi.c: Inserted copyright notice. * fftw/Attic/fftw.h: Added Cray MPP timing support. * mpi/Attic/time_fftwnd_mpi.c, mpi/Attic/test_fftwnd_mpi.c, mpi/Attic/fftwnd_mpi.h, mpi/fftwnd_mpi.c, mpi/Attic/Makefile: Added experimental MPI version (multi-dimensional transforms only). Sat May 10 19:05:05 1997 fftw * threads/Attic/README: Added warning about timer routines for time_threads. Mon May 5 18:46:19 1997 fftw * doc/fftw.texi: Changed manual to remove incorrect performance claims against libsunperf * fftw/Attic/Makefile, Attic/RELEASE-NOTES: Converted to 8.3 filenames * doc/fftw.texi: 'tied or faster' than ESSL (as opposed to faster) * cilk/Makefile: Removed makefile hacks * tests/Attic/Makefile: Changed to -xO2 on solaris to get around compiler's bug. * fftw/Attic/Makefile: Fixed bug in Makefile * threads/Attic/README: Spruced up the docs a bit. * cilk/time_cilk.cilk, threads/Attic/time_threads.c: Printed out speedup factor in addition to times. * threads/fftw_threads.h: Removed duplicate typedef. * cilk/Makefile: Explicitely linked executor_cilk.o and fftwnd_cilk.o into the test programs. This shouldn't be necessary--the files should be in libfftw_cilk.a, but for some reason the linker isn't recognizing this. Sun May 4 19:02:35 1997 fftw * threads/Attic/README: Explained which libraries to link in more clearly. * threads/fftw_threads.h, threads/Attic/Makefile: Put BeOS threads support in (untested). Sat May 3 19:39:40 1997 fftw * doc/fftw.texi: Added documentation of hooks and some publicity * threads/Attic/README: Made one sentence more polite. * threads/Attic/README: Lowered estimate of minimum size array for good parallelization. * threads/executor_threads.c: Fixed bug. * threads/fftw_threads.h: Cleaned up comments. * threads/Attic/README: Documented fftw_threads_init. Fri May 2 23:42:15 1997 fftw * Attic/RELEASE-NOTES, README: Removed the word "supported" in associated with the threads code. * Attic/RELEASE-NOTES, README: Mentioned parallel software in README and RELEASE-NOTES. * threads/Attic/time_threads.c, threads/Attic/test_threads.c, threads/fftwnd_threads.c, threads/fftw_threads.h, threads/fftw_threads.c, threads/executor_threads.c, threads/Attic/README, threads/Attic/Makefile: Added parallel version of FFTW that uses threads. * cilk/Makefile: Fixed make clean to delete time_cilk and removed redundant listing of test_cilk. * tests/Attic/testnd.c: Fixed incorrect RANDOM_MAX (off by 1). * cilk/test_cilk.cilk: fixed incorrect RANDOM_MAX (off by 1) * cilk/time_cilk.cilk: Don't print out critical path & work timings if compiled with those measurements turned off. * cilk/time_cilk.cilk, cilk/executor_cilk.cilk: Restructured executor (partially) * doc/fftw.texi, fftw/fftwnd.c, fftw/Attic/fftw.h: Changed int *n to const int *n in fftwnd_create_plan. * cilk/time_cilk.cilk: Fixed time_scale. Thu May 1 22:03:16 1997 fftw * cilk/Makefile: Removed spurious stuff. * tests/Attic/testnd.c: Changed >> 1 to / 2. Wed Apr 30 20:51:34 1997 fftw * README.hacks: fixed typos * cilk/README: Added README file. * README.hacks, README: Added README.hacks * doc/fftw.texi, Attic/README.win32: Removed README.win32 and added an ack instead * fftw/planner.c, fftw/Attic/naive.c, fftw/malloc.c, fftw/fftwnd.c, fftw/Attic/fftw.h, fftw/executor.c: Indented code * fftw/executor.c: More minor fixes to comments * fftw/planner.c: Fixed wrong comment * cilk/time_cilk.cilk, cilk/executor_cilk.cilk: Made executor consistent with new in-place method (new fftw_strided_copy) and spruced up the benchmark a bit. * fftw/executor.c: Hacked in-place transform so transforms in->tmp then copies tmp->in instead of the other way around...this gives a speed gain for large multi-dim. transforms (I think...still need to run the regular benchmark on various platforms). * cilk/executor_cilk.cilk: Trying some optimizations. * cilk/time_cilk.cilk, cilk/Makefile: Got benchmark working. * cilk/time_cilk.cilk: Program to benchmark Cilk FFT against normal FFTW. * cilk/test_cilk.cilk, cilk/fftw_cilk.cilkh, cilk/Makefile: Added Makefile, test program, and header file. * cilk/fftwnd_cilk.cilk, cilk/executor_cilk.cilk: Got them working! * cilk/Attic/fftw_cilk.h: Renamed (should end in .cilkh). Tue Apr 29 22:09:07 1997 fftw * fftw/twiddle.c, fftw/planner.c, fftw/malloc.c, fftw/Attic/config.c: Added preprocessor stuff to make it easy to recompile with Cilk. * fftw/fftwnd.c: Changed calloc to fftw_malloc and initialized to zero "manually." * fftw/planner.c: Removed stupid comment * fftw/malloc.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/Makefile: Insulated malloc.c, and added debugging version of malloc() * cilk/Attic/fftw_cilk.h: Added copyright and prototype for fftwnd_cilk. * tests/Attic/testnd.c: Previous modification caused over 100MB of RAM to be required by the test. Changed it so that test sizes are smaller, but can be easily modified to be bigger by changing a single #define at the top. * cilk/fftwnd_cilk.cilk, cilk/Attic/fftw_cilk.h, cilk/executor_cilk.cilk: Experimental parallel transforms using Cilk. * fftw/Attic/fftw.h, fftw/executor.c: Changed names of executor_simple and copy routines, and made them externally visible, so that I can call them from my Cilk code. Mon Apr 28 22:45:19 1997 fftw * fftw/fftwnd.c: hacked free -> ffte_free * tests/Attic/testnd.c, tests/Attic/go_fft.c: Made testnd nastier. Hacked go to support bigger weird numbers * fftw/planner.c, fftw/Attic/fftw.h: Minor fixes * fftw/planner.c: Fixed probable bug * fftw/fftwnd.c, TODO: Updated TODO * fftw/executor.c, fftw/Attic/Makefile: Added -pedantic -ansi to gcc options. * fftw/planner.c, fftw/Attic/fftw.h: Fixed fftw_plan definition Sat Apr 26 23:36:53 1997 fftw * tests/Attic/Makefile, fftw/Attic/Makefile: Added -fomit-frame-pointer to gcc * doc/fftw.texi: Added more jokes about Charles. Fri Apr 25 23:13:18 1997 fftw * doc/fftw.texi: Updated the manual a bit * Attic/RELEASE-NOTES: Fixed typo * rfftw/rfftwnd.c, rfftw/Attic/rfftw.c: Fixed to use new fftw_create_twiddle. Also, added parentheses to remove (unnecessary) gcc compiler warning. * rfftw/Attic/Makefile: Changed compiler options to use -O6. * rfftw/Attic/time_rfftw.c, rfftw/Attic/test_rfftw.c, rfftw/rfftwnd.c, rfftw/rfftw.h, rfftw/Attic/rfftw.c, rfftw/Attic/README.rfftw, rfftw/Attic/Makefile: Added RFFTW directory to FFTW distribution. * fftw/planner.c: Changed insert() function to not use variables named "this" (a C++ keyword that causes problems with some compilers). Thu Apr 24 18:45:40 1997 fftw * tests/Attic/Makefile, fftw/Attic/Makefile: Fixed makefiles * fftw/Attic/Makefile: Fixed Makefile * tests/Attic/Makefile.bcc: Removed useles Makefile.bcc * tests/Attic/Makefile, fftw/Attic/genfft.ml, fftw/Attic/config.c, fftw/Attic/Makefile: Minor fixes. Added radix-64 * fftw/planner.c: fixed small typo * tests/Attic/Makefile, fftw/Attic/Makefile: Fixed Makefiles * tests/Attic/Makefile, fftw/Attic/Makefile: Fixed Makefile * tests/Attic/test.c, tests/Attic/Makefile, fftw/Attic/genfft.ml, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/Makefile: Back to old looping scheme. Wed Apr 23 22:03:14 1997 fftw * Attic/RELEASE-NOTES, README: Changed release notes * fftw/planner.c, fftw/fftwnd.c, fftw/executor.c, fftw/.indent.pro: Redone indentation (I screwed up the first time) * fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/generic.c, fftw/Attic/fftw.h, fftw/executor.c: Indented code. * fftw/Attic/fftw.h: Added backward compatibility by default * tests/Attic/test.c, fftw/Attic/genfft.ml, fftw/Attic/Makefile.sources, fftw/Attic/Makefile: Put old hacks for odd factors back in. * Attic/RELEASE-NOTES: Added release notes * doc/fftw.texi: Minor fixes to the manual * tests/Attic/testnd.c, tests/Attic/test.c, tests/Attic/go_fft.c, tests/Attic/Makefile, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/Attic/genfft.ml, fftw/Attic/fftw_rader.c, fftw/generic.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/config.c, fftw/Attic/Makefile.sources, fftw/Attic/Makefile, doc/fftw.texi: Massive rewriting of everything Fri Apr 4 16:16:26 1997 fftw * fftw/Attic/genfft.ml: Cosmetic changes Thu Apr 3 22:55:11 1997 fftw * fftw/Attic/genfft.ml: Improved genfft. * fftw/planner.c, fftw/Attic/genfft.ml: Implemented prime factor in genfft.ml * fftw/Attic/genfft.ml: New improved code generator * fftw/planner.c, fftw/Attic/fftw_rader.c, fftw/Attic/fftw.h, fftw/executor.c: Made sure that Rader subroutines are not even considered when built-in base/bfly cases exist for a given factor. Oh, and added FFTW_DESTROY_INPUT undocumented flag (currently is only used by Rader subroutine). * fftw/planner.c: Fixed crashing bug...yikes! We really need a better structure for recursive plans... Wed Apr 2 14:57:57 1997 fftw * fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/Attic/naive.c, fftw/Attic/konst.h, fftw/generic.c, fftw/fftwnd.c, fftw/Attic/fftw_rader.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/.indent.pro: Cosmetic changes * fftw/planner.c, fftw/Attic/fftw_rader.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/Makefile: Modified FFTW routines to automatically use Rader routines for base blocks and butterflies when no pre-built routine for a prime factor is available. This required numerous changes to the planner and the executor. Changes were designed so that, when Rader routines are not used, execution is unaffected. * fftw/Attic/fftw_rader.c: Implemented Rader transform for large prime sizes or factors. Tue Apr 1 14:05:24 1997 fftw * tests/Attic/testnd.c, tests/Attic/test.c, fftw/twiddle.c, fftw/timer.c, fftw/planner.c, fftw/Attic/naive.c, fftw/Attic/genfft.ml, fftw/generic.c, fftw/fftwnd.c, fftw/Attic/fftw.h, fftw/executor.c, doc/fftw.texi: Great Rename COMPLEX->FFTW_COMPLEX Mon Mar 31 22:05:59 1997 fftw * fftw/fftwnd.c: Did some CSE that the compiler won't be able to do. (Probably won't make much performance difference, but it can't hurt.) * tests/Attic/testnd.c: Use random() instead of rand(). Also fixed small bug in error reporting. Thu Mar 27 20:50:32 1997 fftw * fftw/twiddle.c: Changed pi constant to use more digits (more in keeping with konst.h). * doc/fftw.texi: Fixed a typo and added a comment explaining how to change FFTW to single precision. Wed Mar 26 15:57:12 1997 fftw * fftw/Attic/Makefile: Added ranlib to Makefile * fftw/Attic/Makefile: Changed standard prefix from "fftw_fly_" (looked like a typo) to "fftw_bfly_". * tests/Attic/go_fft.c, tests/Attic/testnd.c: Fixed fftwnd test so that it works if REAL is not double. Tue Mar 25 21:27:41 1997 fftw * tests/Attic/testnd.c: Fixed indentation. * fftw/planner.c: Changed name of "this" variable to "this_plan". ("this" has special meaning for C++ compilers...I just wanted to head off any possibility of trouble.) * fftw/Attic/Makefile: Minor cosmetic change. * fftw/Attic/Makefile.bcc, fftw/Attic/Makefile.sources, fftw/Attic/Makefile: File names can now be short or long * tests/Attic/Makefile.bcc, fftw/timer.c, fftw/Attic/fftw.h, fftw/Attic/Makefile.bcc, Attic/README.win32: Added win32 contribution Mon Mar 24 14:59:19 1997 fftw * doc/texi2html, doc/fftw.texi: Fixed hyphenation, and hacked texi2html to understand @- * doc/fftw.texi: After Nicole proofread docs, made some changes, bug fixes, and wording modifications. Sun Mar 23 22:33:28 1997 fftw * TODO, README: Added README and TODO Sat Mar 22 02:10:09 1997 fftw * doc/fftw.texi: Added a couple of comments to the installation notes. * doc/fftw.texi: Fixed incorrect article. * doc/fftw.texi: Fixed a glitch and modified a wording. * doc/fftw.texi: Fixed typo (PDA -> PFA). Fri Mar 21 23:35:29 1997 fftw * doc/fftw.texi: Used a more felicitous wording for one sentence. * doc/fftw.texi: Fixed some typos. * doc/fftw.texi: Added ack of the pari calculator, used to compute konst.h * fftw/Attic/prelude, fftw/Attic/konst.h, fftw/Attic/genfft.ml, fftw/Attic/Makefile: Changed constant-generation stategy * fftw/planner.c: Changed fftw_destroy_plan so that it doesn't croak if you give it a NULL plan. * fftw/Attic/genfft.ml: Fixed precision (again) * fftw/Attic/genfft.ml: Increased precision of constants Thu Mar 20 16:43:02 1997 fftw * fftw/Attic/genfft.ml: Reduced precision of genfft.ml * doc/fftw.texi, doc/equation-3.gif: Added equation 3 in the HTML output. Ugly * fftw/Attic/genfft.ml: Fixed precision of floting point numbers * tests/README: Added README * doc/fftw.texi: Minor fixes in the acknowledgements. * doc/texi2html, doc/fftw.texi: Fixed links in the info version. Fixed overfull hboxes in TeX * doc/fftw.texi: Put in links to the home page and benchmark results. Wed Mar 19 23:46:27 1997 fftw * doc/fftw.texi: Added @node labels to Multidimensional Array Format section. * doc/fftw.texi: Modified fftw.texi; fixed a couple of typos. Changed subsections in Multi-dimensional Array Format chapter to sections. * doc/texi2html, doc/Attic/Makefile: More hacks to texi2html * doc/Attic/Makefile: Added install-html target * doc/texi2html: Hacked texi2html * tests/Attic/testnd.c, tests/Attic/test.c, fftw/Attic/fftw.h: fixed prototypes * doc/Attic/Makefile: Fixed makefile * doc/fftw.texi: Fixed 'factors' -> 'factor' Sat Mar 15 18:19:00 1997 Matteo Frigo * fftw/executor.c: Updated version number * doc/fftw.texi: More fixes. (REAL) added in front of all constants. * fftw/Attic/genfft.ml: Added '(REAL)' in front of constants. * fftw/planner.c, fftw/timer.c, fftw/twiddle.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/fftwnd.c, fftw/generic.c, doc/fftw.texi: Some cleanup Fri Mar 14 21:55:53 1997 Matteo Frigo * tests/Attic/testnd.c: Fixed test program * fftw/fftwnd.c: Fixed bug in 3d code * doc/Attic/Makefile: Fixed makefile * fftw/executor.c: Fixed ID * doc/Attic/Makefile: Fixed makefile * tests/Attic/Makefile, tests/Attic/go_fft.c, tests/Attic/test.c, tests/Attic/testnd.c, fftw/Attic/Makefile, fftw/Attic/test.c, doc/Attic/Makefile: Added tests + other changes * doc/Attic/Makefile: Fixed makefile * doc/equation-2.gif, doc/fftw.texi, doc/texi2html, doc/equation-1.gif: Many changes * fftw/fftwnd.c: Added fftwnd * fftw/Attic/fftw-complex.h, fftw/Attic/fftw.h, fftw/Attic/test.c, fftw/Attic/Makefile, fftw/executor.c: *** empty log message *** Thu Mar 13 00:29:38 1997 Matteo Frigo * fftw/Attic/test.c, fftw/planner.c, fftw/timer.c, fftw/Attic/fftw.h, fftw/executor.c: Fixed user interface * doc/equation-2.gif, doc/fftw.texi, doc/texi2html, doc/Attic/Makefile, doc/equation-1.gif: Some editing and hacks Wed Mar 12 21:02:23 1997 Matteo Frigo * doc/fftw.texi, fftw/planner.c, Attic/.indent.pro, COPYRIGHT: Minor fixes Tue Mar 11 23:54:45 1997 Matteo Frigo * fftw/executor.c: updated id * fftw/Attic/fftw.h, fftw/planner.c: Added optimal planner Sat Mar 8 17:43:55 1997 Matteo Frigo * doc/texi2html, doc/Attic/Makefile, doc/fftw.texi: Added doc * fftw/Attic/test.c: Fixed bug in test.c Fri Mar 7 18:07:56 1997 Matteo Frigo * fftw/Attic/genfft.ml: Added cost model * fftw/planner.c, fftw/timer.c, fftw/Attic/fftw.h, fftw/executor.c: Minor fixes. * fftw/timer.c, fftw/planner.c: Polished planner * fftw/planner.c, fftw/Attic/fftw.h, fftw/executor.c: Now the planner uses a table ADT instead of an array (less memory used) Thu Mar 6 01:35:29 1997 Matteo Frigo * fftw/Attic/fftw.h: Removed fftw_init Wed Mar 5 22:45:31 1997 Matteo Frigo * fftw/Attic/genfft.ml: Fixed small bug in cgen * fftw/executor.c, fftw/Attic/genfft.ml: Even better code generator * fftw/Attic/genfft.ml, fftw/executor.c: Improved code generator for odd n * fftw/Attic/genfft.ml, fftw/executor.c: Fixed bug * fftw/executor.c: Changed id in executor * fftw/Attic/genfft.ml, fftw/.indent.pro: Much improved code generator Tue Mar 4 14:21:15 1997 Matteo Frigo * fftw/Attic/genfft.ml: Improved genfft * fftw/executor.c: Fixed executor Mon Mar 3 23:54:47 1997 Matteo Frigo * fftw/executor.c: Fixed executor * fftw/planner.c, fftw/Attic/config.c, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/Makefile: Improved executor * fftw/Attic/config.c, fftw/Attic/Makefile: Removed base-128 code * fftw/Attic/test.c, fftw/Attic/fftw.h, fftw/planner.c, fftw/Attic/config.c, fftw/executor.c, fftw/Attic/Makefile: Added in-place operations. * fftw/Attic/genfft.ml: Nothing. * fftw/Attic/genfft.ml: Added more CVS id here and there * fftw/Attic/fftw.h, fftw/executor.c: Added Id to executor * fftw/executor.c: Added release information to the executor Sun Mar 2 18:37:35 1997 Matteo Frigo * fftw/Attic/genfft.ml: Improved code generator Sat Mar 1 22:53:54 1997 Matteo Frigo * fftw/Attic/genfft.ml, fftw/.indent.pro: Improved code generator (collector) * fftw/Attic/test.c, fftw/timer.c, fftw/twiddle.c, fftw/Attic/naive.c, fftw/Attic/prelude, fftw/planner.c, fftw/Attic/genfft.ml, fftw/generic.c, fftw/Attic/fftw-complex.h, fftw/Attic/fftw.h, fftw/executor.c, fftw/Attic/Makefile.sources, fftw/Attic/complex.h, fftw/Attic/config.c, fftw/Attic/Makefile: Reorganization of the code * fftw/Attic/test.c, fftw/timer.c, fftw/twiddle.c, fftw/Attic/naive.c, fftw/planner.c, fftw/Attic/fftw.h, fftw/Attic/genfft.ml, fftw/executor.c, fftw/generic.c, fftw/Attic/Makefile, fftw/Attic/complex.h, fftw/Attic/config.c, Attic/timer.c, Attic/twiddle.c, Attic/naive.c, Attic/planner.c, Attic/test.c, Attic/fftw.h, Attic/generic.c, Attic/genfft.ml, Attic/complex.h, Attic/config.c, Attic/executor.c, Attic/Makefile: Reorganized directory structure * Attic/executor.c: Changed executor Fri Feb 28 23:42:30 1997 Matteo Frigo * Attic/twiddle.c, Attic/test.c, Attic/timer.c, Attic/fftw.h, Attic/planner.c, Attic/executor.c, Attic/Makefile, Attic/config.c: Added garbage collector and other niceties. Removed base_128 * Attic/timer.c, Attic/twiddle.c, Attic/naive.c, Attic/planner.c, Attic/test.c, Attic/generic.c, Attic/genfft.ml, Attic/config.c, Attic/fftw.h, Attic/Makefile: Added support for inverses. * Attic/executor.c: Steven's modified executor * Attic/test.c: Fixed test program * Attic/timer.c, Attic/test.c, Attic/generic.c, Attic/genfft.ml, Attic/executor.c, Attic/fftw.h: Reverted back to old code generator. Added howmany Thu Feb 27 01:56:02 1997 Matteo Frigo * Attic/executor.c, Attic/fftw.h, Attic/generic.c: Fixed generic solver * Attic/genfft.ml, Attic/executor.c, Attic/fftw.h: Improved speed * Attic/genfft.ml: Improved code generator Wed Feb 26 23:56:52 1997 Matteo Frigo * Attic/genfft.ml, Attic/config.c, Attic/executor.c, Attic/fftw.h: New, smarter code generator * Attic/naive.c, Attic/planner.c, Attic/test.c, Attic/timer.c, Attic/executor.c, Attic/fftw.h, Attic/generic.c, Attic/genfft.ml, Attic/.indent.pro: New simplifier Sat Feb 22 23:41:27 1997 Matteo Frigo * Attic/genfft.ml, Attic/complex.h: Fixed complex.h. Back to old indexing scheme. * Attic/generic.c: Fixed bug * Attic/test.c, Attic/timer.c, Attic/genfft.ml, Attic/executor.c, Attic/fftw.h, Attic/generic.c: Added support for arbitrary strides * Attic/test.c: fixed test pgm * Attic/fftw.h, Attic/generic.c, Attic/complex.h, Attic/executor.c, Attic/Makefile: Added support for generic factors * Attic/genfft.ml, Attic/Makefile: Back to good old [k * m] indexing scheme Fri Feb 21 22:46:40 1997 Matteo Frigo * Attic/test.c, Attic/genfft.ml, Attic/planner.c, Attic/executor.c, Attic/fftw.h, Attic/Makefile, Attic/config.c: Much, *much* faster program. * Attic/planner.c: Fixed bug * Attic/genfft.ml: Changed code generator to do less load/stores * Attic/test.c, Attic/timer.c, Attic/planner.c, Attic/executor.c, Attic/fftw.h, Attic/generic.c, Attic/config.c, Attic/Makefile: Added generic routines Thu Feb 20 00:45:34 1997 Matteo Frigo * Attic/test.c: fixed typo Wed Feb 19 22:20:17 1997 Matteo Frigo * Attic/config.c: FIxed other bug * Attic/config.c: FIxed bug in config.c * Attic/timer.c, Attic/test.c: Fixed timers * Attic/test.c, Attic/fftw.h, Attic/genfft.ml: Minor changes * Attic/timer.c, Attic/fftw.h, Attic/genfft.ml: Improved code generator Tue Feb 18 19:22:48 1997 Matteo Frigo * Attic/test.c, Attic/executor.c: Added Steven's suggestions * Attic/planner.c, Attic/timer.c: Minor fixes * Attic/timer.c, Attic/planner.c, Attic/Makefile: Minor tweaks * Attic/planner.c, Attic/test.c, Attic/Makefile: Fixed bug in planner * Attic/timer.c, Attic/planner.c, Attic/test.c, Attic/executor.c, Attic/fftw.h, Attic/Makefile: Better timers, etc * Attic/test.c: Fixed bug in test program. * Attic/Makefile, Attic/genfft.ml: Added copyright and stuff * Attic/timer.c, Attic/test.c, Attic/executor.c, Attic/fftw.h, Attic/planner.c, Attic/Makefile, Attic/config.c: Improved planner Mon Feb 17 23:12:47 1997 Matteo Frigo * Attic/Makefile, Attic/config.c, Attic/executor.c, Attic/fftw.h, Attic/genfft.ml, Attic/naive.c, Attic/planner.c, Attic/test.c, Attic/timer.c, Attic/twiddle.c, COPYRIGHT: Initial revision * Attic/Makefile, Attic/config.c, Attic/executor.c, Attic/fftw.h, Attic/genfft.ml, Attic/naive.c, Attic/planner.c, Attic/test.c, Attic/timer.c, Attic/twiddle.c, COPYRIGHT: Optimal fft ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/INSTALL����������������������������������������������������������������������������������0000644�0001754�0000144�00000022010�07635206026�007200� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������----------------------------------------------------------------------- Installing FFTW ----------------------------------------------------------------------- Here, we provide a terse overview of FFTW's installation. More detailed installation instructions can be found in the "Installation" section of the FFTW manual, in the doc/ directory. We encourage you to refer to the manual. On Unix systems, type ./configure make to compile FFTW and its test programs. Type 'make install' to install the FFTW library and header file into standard places. Type 'make check' to put the test programs through their paces. The 'configure' script may output helpful suggestions or warnings (surrounded by many asterisks, so you can't miss them); be sure to peruse its output. Also, see below for generic instructions regarding the usage of the Unix 'configure' script. On non-Unix systems, you should simply compile all of the .c files in the fftw/ directory into a library for the complex transforms, and all of the .c files in the rfftw/ directory for the real transforms. You can also compile and link the test programs in the tests/ directory; see the FFTW manual for more detail. ----------------------------------------------------------------------- Generic Instructions for Unix ----------------------------------------------------------------------- Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/Makefile.am������������������������������������������������������������������������������0000644�0001754�0000144�00000004030�07635206026�010205� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������SUBDIRS = fftw rfftw tests doc threads mpi EXTRA_DIST = README.hacks bootstrap.sh COPYRIGHT acx_pthread.m4 acx_mpi.m4 extradist = fortran gensrc matlab cilk FAQ distsrc=$(distdir)/fftw # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo dist-hook: rm -f $(distsrc)/fftw.h awk '{handled=0} /^#undef .*$$/ {print "/* " $$line " */"; handled=1} {if (handled == 0) print}' $(distsrc)/fftw.h.in > $(distsrc)/fftw.h rm -f $(distsrc)/config.h cat $(distsrc)/config.h.in | sed -e "s/^#undef FFTW_VERSION/#define FFTW_VERSION \"$(VERSION)\"/" | awk '{handled=0} /^#undef .*$$/ {print "/* " $$line " */"; handled=1} {if (handled == 0) print}' > $(distsrc)/config.h (cd FAQ; make clean; make) for i in gensrc mpi threads cilk; do (cd $$i; make distclean); done for i in $(extradist); do \ echo "Adding $$i/ to the distribution"; \ find $$i -name CVS -prune -o -print | cpio -pd $(distdir); \ done RPM_SRCDIR = `rpm --showrc |grep "^sourcedir" | sed 's/^.*: *//'` RPM_ARCH = `rpm --showrc |grep "^build arch" | sed 's/^.*: *//'` RPM_RPMS = `rpm --showrc |grep "^rpmdir" | sed 's/^.*: *//'` RPM_SRPMS = `rpm --showrc |grep "^srcrpmdir" | sed 's/^.*: *//'` RPM_TOPDIR = `rpm --showrc |grep "^TOPDIRdir" | sed 's/^.*: *//'` rpm: cp -f $(PACKAGE)-$(VERSION).tar.gz $(RPM_SRCDIR)/$(PACKAGE)-$(VERSION).tar.gz rm -f $(RPM_SRCDIR)/$(PACKAGE)-logo-thumb.gif lynx -source -dump http://www.fftw.org/fftw-logo-thumb.gif > $(RPM_SRCDIR)/fftw-logo-thumb.gif rpm --clean -ba $(PACKAGE).spec rpm -U $(RPM_RPMS)/$(RPM_ARCH)/$(PACKAGE)-$(VERSION)-1.$(RPM_ARCH).rpm\ $(RPM_RPMS)/$(RPM_ARCH)/$(PACKAGE)-devel-$(VERSION)-1.$(RPM_ARCH).rpm @echo "-------------------------------------------------------------" @echo " RPMs are built and installed, and are located under: " @echo " $(RPM_RPMS)/$(RPM_ARCH)" @echo " $(RPM_SRPMS)" @echo "-------------------------------------------------------------" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/Makefile.in������������������������������������������������������������������������������0000644�0001754�0000144�00000045034�07637527504�010240� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER = echo AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = fftw rfftw tests doc threads mpi EXTRA_DIST = README.hacks bootstrap.sh COPYRIGHT acx_pthread.m4 acx_mpi.m4 extradist = fortran gensrc matlab cilk FAQ distsrc = $(distdir)/fftw RPM_SRCDIR = `rpm --showrc |grep "^sourcedir" | sed 's/^.*: *//'` RPM_ARCH = `rpm --showrc |grep "^build arch" | sed 's/^.*: *//'` RPM_RPMS = `rpm --showrc |grep "^rpmdir" | sed 's/^.*: *//'` RPM_SRPMS = `rpm --showrc |grep "^srcrpmdir" | sed 's/^.*: *//'` RPM_TOPDIR = `rpm --showrc |grep "^TOPDIRdir" | sed 's/^.*: *//'` subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = fftw.spec DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess \ config.sub configure configure.in depcomp fftw.spec.in \ install-sh ltmain.sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): configure.in acinclude.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) fftw.spec: $(top_builddir)/config.status fftw.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-libtool clean-recursive ctags \ ctags-recursive dist dist-all dist-gzip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am dvi-recursive info info-am info-recursive install \ install-am install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am \ pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive dist-hook: rm -f $(distsrc)/fftw.h awk '{handled=0} /^#undef .*$$/ {print "/* " $$line " */"; handled=1} {if (handled == 0) print}' $(distsrc)/fftw.h.in > $(distsrc)/fftw.h rm -f $(distsrc)/config.h cat $(distsrc)/config.h.in | sed -e "s/^#undef FFTW_VERSION/#define FFTW_VERSION \"$(VERSION)\"/" | awk '{handled=0} /^#undef .*$$/ {print "/* " $$line " */"; handled=1} {if (handled == 0) print}' > $(distsrc)/config.h (cd FAQ; make clean; make) for i in gensrc mpi threads cilk; do (cd $$i; make distclean); done for i in $(extradist); do \ echo "Adding $$i/ to the distribution"; \ find $$i -name CVS -prune -o -print | cpio -pd $(distdir); \ done rpm: cp -f $(PACKAGE)-$(VERSION).tar.gz $(RPM_SRCDIR)/$(PACKAGE)-$(VERSION).tar.gz rm -f $(RPM_SRCDIR)/$(PACKAGE)-logo-thumb.gif lynx -source -dump http://www.fftw.org/fftw-logo-thumb.gif > $(RPM_SRCDIR)/fftw-logo-thumb.gif rpm --clean -ba $(PACKAGE).spec rpm -U $(RPM_RPMS)/$(RPM_ARCH)/$(PACKAGE)-$(VERSION)-1.$(RPM_ARCH).rpm\ $(RPM_RPMS)/$(RPM_ARCH)/$(PACKAGE)-devel-$(VERSION)-1.$(RPM_ARCH).rpm @echo "-------------------------------------------------------------" @echo " RPMs are built and installed, and are located under: " @echo " $(RPM_RPMS)/$(RPM_ARCH)" @echo " $(RPM_SRPMS)" @echo "-------------------------------------------------------------" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/NEWS�������������������������������������������������������������������������������������0000644�0001754�0000144�00000032354�07637531604�006667� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Version 2.1.5 (3/24/2003) * Bug fix: Fortran wrappers were disabled in version 2.1.4. Version 2.1.4 (3/16/2003) * Upgraded to newer versions of autoconf, etcetera, to fix compilation problems on various recent systems. * The configure script no longer picks the wrong architecture flags (which caused FFTW to crash) on newer IBM POWER machines running AIX. * Multi-threaded transforms should now utilize multiple CPUs on Solaris (which creates threads in single-processor mode by default). * Added experimental support for OpenMP (and SGI MP) compiler parallelization directives in the multi-threaded transforms, instead of using explicit thread spawning. Enable by configuring --with-openmp or --with-sgi-mp in addition to --enable-threads. * Expanded FAQ. Version 2.1.3 (11/7/1999) * The configure script no longer overrides the CFLAGS environment variable if it is defined. (Thanks to Diab Jerius.) * Experimental Fortran-callable wrapper routines for MPI FFTW. See mpi/README.f77 for more information. * The configure script now detects and works around a stack alignment bug in gcc 2.95.x on x86. * configure attempts to guess the appropriate -mcpu flag on Linux/PPC systems, improving performance (especially on G3s with gcc 2.95 or later). * Fixed integer overflow bug for complex transforms of large prime sizes (> 32768). Thanks to Ezio Riva for the bug report. * Fixed memory leak in the Matlab wrappers; thanks to Matthew Davis for the bug report. * Fixed bugs in the configure script when detecting POSIX threads libraries on AIX and Tru64 (nee Digital) Unix. * Fixed bug in multi-threaded transforms on AIX (which strangely creates threads in non-joinable mode by default). Thanks to Jim Lindsay for the bug report, and for allowing us to debug on Northwestern University's IBM SP2. * Slight fix to help build DLL's on Win32 (thanks to Andrew Sterian). Version 2.1.2 (5/18/1999) * Fixed bug in our MPI test programs which made them fail under MPICH with the p4 device (TCP/IP). (The 2.1.1 transforms worked, but the test programs crashed.) * Added missing fftw_f77_threads_init function to the Fortran wrappers for the multi-threaded transforms. Thanks to V. Sundararajan for the bug report. * The codelet generator can now output efficient hard-coded DCT/DST transforms. As a side effect of this work, we slightly reduced the code size of rfftw. * Test programs now support GNU-style long options when used with glibc. * Added some more ideas to our TODO list. * Improved codelet generator speed. Version 2.1.1 (3/31/1999) * Fixed bug in the complex transforms for certain sizes with intermediate-length prime factors (17-97), which under some (hopefully rare) circumstances could cause incorrect results. Thanks to Ming-Chang Liu for the bug report and patch. (The test program will now catch this sort of problem when it is run in paranoid mode.) Version 2.1 (3/8/1999) * Added Fortran-callable wrapper routines for the multi-threaded transforms. * Documentation fixes and improvements. * The --enable-type-prefix option to configure makes it easy to install both single- and double-precision versions of FFTW on the same (Unix) system. (See the installation section of the manual.) * The MPI FFTW routines now include parallel one-dimensional transforms for complex data. (See the fftw_mpi documentation in the FFTW manual.) * The MPI FFTW routines now include parallel multi-dimensional transforms specialized for real data. (See the rfftwnd_mpi documentation in the FFTW manual.) * The MPI FFTW routines are now documented in the main manual (in the doc directory). On Unix systems, they are also automatically configured, compiled, and installed along with the main FFTW library when you include --enable-mpi in the flags to the configure script. (See the FFTW manual.) * Largely-rewritten MPI code. It is now cleaner and (sometimes) faster. It also supports the option of a user-supplied workspace for (often) greater performance (using the MPI_Alltoall primitive). Beware that the interfaces have changed slightly, however. * The multi-threaded FFTW routines now include parallel one- and multi-dimensional transforms of real data. (See the rfftw_threads documentation in the FFTW manual.) * The multi-threaded FFTW routines are now documented in the main manual (in the doc directory). On Unix systems, they are also automatically configured, compiled, and installed along with the main FFTW library when you include --enable-threads in the flags to the configure script. (See the FFTW manual.) * The multi-threaded FFTW routines now include support for Mach C threads (used, for example, in Apple's MacOS X). * The Fortran-callable wrapper routines are now incorporated into the ordinary FFTW libraries by default (although you can disable this with the --disable-fortran option to configure) and are documented in the main FFTW manual. * Added an illustration of the data layout to the rfftwnd tutorial section of the manual, in the hope of preventing future confusion on this subject. * The test programs now allow you to specify multidimensional sizes (e.g. 128x54x81) for the -c and -s correctness and speed test options. Version 2.0.1 (9/29/98) * (bug fix) Due to a poorly-parenthesized expression, rfftwnd overflowed 32-bit integer precision for rank > 1 transforms with a final dimension >= 65536. This is now fixed. (Thanks to Walter Brisken for the bug report.) * (bug fix) Added definition of FFTW_OUT_OF_PLACE to fftw.h. The flag is mentioned several times in the documentation, but its definition was accidentally omitted since FFTW_OUT_OF_PLACE is the default behavior. * Corrected various small errors in the documentation. Thanks to Geir Thomassen and Jeremy Buhler for their comments. * Improved speed of the codelet generator by orders of magnitude, since a user needed a hard-coded fft of size 101. * Modified buffering in multidimensional transforms for some speed improvements (only when fftwnd_create_plan_specific is used). Thanks to Geert van Kempen for his tips. * Added Andrew Sterian's patch to allow FFTW to be used as a shared library more easily on Win32. Version 2.0 (9/11/1998) * Completely rewritten real-complex transforms, now using specialized codelets and an inherently real-complex algorithm for greatly increased speed. Also, rfftw can now handle odd sizes and strided transforms. Beware that the output format for 1D rfftw transforms has changed. See the manual for more details. * The complex transforms now use a fast algorithm for large prime factors, working in O(N lg N) time even for prime sizes. (Previously, the complexity contained an O(p^2) term, where p is the largest prime factor of N. This is still the case for the rfftw transforms.) Small prime factors are still more efficient, however. * Added functions fftw_one, fftwnd_one, rfftw_one, etcetera, to simplify and clarify the use of fftw for single, unit-stride transforms. * Renamed FFTW_COMPLEX, FFTW_REAL to fftw_complex, fftw_real (for greater consistency in capitalization). The all-caps names will continue to be supported indefinitely, but are deprecated. (Also, support for the COMPLEX and REAL types from FFTW 1.0 is now disabled by default.) * There are now Fortran-callable wrappers for the rfftw real-complex transforms. * New section of the manual discussing the use of FFTW with multiple threads, and a new FFTW_THREADSAFE flag (described therein). * Added shared library support. Use configure --enable-shared to produce a shared library instead of a static library (the default). * Dropped support for the operation-count (*_op_count) routines introduced in v1.3, as these were little-used and were a pain to keep up-to-date as FFTW changed internally. * Made it easier to support floating-point types other than float and double (e.g. long double). (See the file fftw-int.h.) Version 1.3 (4/9/1998) * Multi-dimensional transforms contain significant performance improvements for dimensions >= 3. * Performance improvements in multi-dimensional transforms with howmany > 1 and stride > dist. * Improved parallelization and performance in the threads code for dimensions >= 3. * Changed the wisdom import/export format (the new wisdom remembers the stride of the plan that generated it, for use with the new create_plan_specific functions). (You should regenerate any stored wisdom you have anyway, since this is a new version of FFTW.) * Several small fixes to aid compilation on some systems. * Fixed a bug in the MPI transform (in the transpose routine) that caused errors for some array sizes. * Fixed the (hopefully) last few things causing problems with C++ compilers. * Hack for x86/gcc to properly align local double-precision variables. * Completely rewritten codelet generator. Now it produces better code for non powers of 2, and is ready to produce real->complex transforms. * Testing algorithm is now more robust, and has a more rigorous theoretical foundation. (Bugs in testing large transforms or in single precision are now fixed--these bugs were only in the test programs and not in the FFTW library itself.) * Added "specific" planners, which allow plan optimization for a specific array/stride. They also reduce the memory requirements of the planner, and permit new optimizations in the multi-dimensional case. (See the *_create_plan_specific functions.) * FFTW can now compute a count of the number of arithmetic operations it requires, which is useful for some academic purposes. (See the *_count_plan_ops functions.) * Adapted for use with GNU autoconf to aid installation on UNIX systems. (Installation on non-UNIX systems should be the same as before.) * Used gettimeofday function if available. (This function typically has much higher accuracy than clock(), permitting plans to be created much more quickly than before on many machines.) * Made timing algorithm (hopefully) more robust in the face of system interrupts, etc. * Added wrapper routines for calling FFTW from MATLAB (in the matlab/ directory). * Added wrapper routines for calling FFTW from Fortran (in the fortran/ directory). (These were available separately before.) Version 1.2.1 (12/4/1997) * Fixed a third bug in the mpi transpose routines (sheesh!) that could cause problems when re-using a transpose plan. Thanks to Eric Skyllingstad for the bug reports. * Fixed another bug in the mpi transpose routines. This bug produced a memory leak and also occasionally tries to free a null pointer, which causes problems on some systems. The mpi transpose/fft routines now pass all of our malloc paranoia tests. * Fixed bug in mpi transpose routines, where wrong results could be given for some large 2D arrays. Version 1.2 (9/8/1997) * Added a FAQ (in the FAQ/ directory). * Fixed bug in rfftwnd routines where a block was accidentally allocated to be too small, causing random memory to be overwritten (yikes!). (Amazingly, this bug only caused the test program to fail on one system that we could find. Our test suite can now catch this sort of bug.) * Abstractified taking differences of times (with fftw_time_diff macro/function) to allow more general timer data structures. * Added "wisdom" mechanism for saving plans & related info. * Made timing mechanism more robust and maintainable. (Instead of using a fixed number of iterations, we now repeatedly double the number of iterations until a specified time interval (FFTW_TIME_MIN) is reached.) * Fixed header files to prevent difficulties when a mix of C and C++ compilers is used, and to prevent problems with multiple inclusions. * Added experimental distributed-memory transforms using MPI. * Fixed memory leak in fftwnd_destroy_plan (reported by Richard Sullivan). Our test programs now all check for leaks. Version 1.1 (5/5/1997) * Improved speed (yes!) [Some clever tricks with twiddle factors and better code generator] * Renamed `blocks' to `codelets', just to be fashionable * Rewritten planner and executor--much simpler and more readable code. Reference-counter garbage collection employed throughout. * Much improved codelet generator. The ML code should be now readable by humans, and easier to modify. * Support for Prime Factor transforms in the codelet generator. * Renamed COMPLEX -> FFTW_COMPLEX to avoid clashes with existing packages. COMPLEX is still supported for compatibility with 1.0 * Added experimental real->complex transform (quick hack, use at your own risk). * Added experimental parallel transforms using Cilk. * Added experimental parallel transforms using threads (currently, POSIX threads and Solaris threads are implemented and tested). * Added DOS support, in the sense that we now support 8.3 filenames. Version 1.0 (3/24/1997) * First release. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/TODO�������������������������������������������������������������������������������������0000644�0001754�0000144�00000006135�07635206026�006651� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������The following are a number of ideas for future work that we have thought of, or which have been suggested to us. Let us know (fftw@fftw.org) if you have other proposals, or if there is something that you want to work on. * Implement some sort of Prime Factor algorithm (Temperton's?) (PFA is now used in the codelets.) * Try the Winograd blocks for the base cases. (We now use Rader's algorithm for prime size codelets.) * Try on-the-fly generation of twiddle factors, to save space and cache. (Done. However, not yet enabled in the standard distribution. The codelet generator is capable of generating code that either loads or computes the twiddle factors, and the FFTW C code supports both ways. We do not have enough experimental numbers to determine which way is faster, however) * Since we now have "strided wisdom," it would be nice to keep the stride into account when planning 1D transform recursively. We should eliminate the planner table altogether, and just use the wisdom table for planning. * Implement fast DCT and DST codes (cosine and sine transforms); equivalently, implement fast algorithms for transforms of real/even and real/odd data. There are two parts to this: (i) modify the codelet generator to output hard-coded transforms of small sizes [this is done], and (ii) figure out & implement a recursive framework for combining these codelets to achieve transforms of general lengths. (Once this is done, implement multi-dimensional transforms, etcetera.) * Implement a library of convolution routines, windowing, filters, etcetera based on FFTW. As DSP isn't our field (we are interested in FFTs for other reasons), this sort of thing is probably best left to others. Let us know if you're interested in writing such a thing, though, and we'll be happy to link to your site and give you feedback. * Generate multi-dimensional codelets for use in two/three-dimensional transforms. (i.e. implement what is sometimes called a "vector-radix" algorithm.) There are potential cache benefits to this. * Take advantage of the vector instructions on the Pentium-III and forthcoming PowerPC architectures. (Coming from the old Cray vector supercomputers and the horrible coding they encouraged, this seems suspiciously like a giant step backwards in computer architectures...) We'd like to see better gcc support before we do anything along these lines, though. * In rfftw, implement a fast O(n lg n) algorithm for prime sizes and large prime factors (currently, only the complex FFTW has fast algorithms for prime sizes). The basic problem is that we don't know of any such algorithm specialized for real data; suggestions and/or references are welcome. * In the MPI transforms, implement a parallel 1D transform for real data (i.e. rfftw_mpi). (Currently, there are only parallel 1D transforms for complex data in the MPI code.) * In the MPI transforms, implement more sophisticated (i.e. faster) in-place and out-of-place transpose routines for the in-process transposes (used as subroutines by the distributed transpose). The current routines are quite simplistic, although it is not clear how much they hurt performance. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/acinclude.m4�����������������������������������������������������������������������������0000644�0001754�0000144�00000016333�07635206026�010353� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������AC_DEFUN(ACX_CHECK_CC_FLAGS, [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK(whether ${CC-cc} accepts $1, ac_$2, [echo 'void f(){}' > conftest.c if test -z "`${CC-cc} $1 -c conftest.c 2>&1`"; then ac_$2=yes else ac_$2=no fi rm -f conftest* ]) if test "$ac_$2" = yes; then : $3 else : $4 fi ]) AC_DEFUN(ACX_PROG_GCC_VERSION, [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK(whether we are using gcc $1.$2 or later, ac_cv_prog_gcc_$1_$2, [ dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp. cat > conftest.c < $1) || (__GNUC__ == $1 && __GNUC_MINOR__ >= $2) yes; # endif #endif EOF if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc_$1_$2=yes else ac_cv_prog_gcc_$1_$2=no fi ]) if test "$ac_cv_prog_gcc_$1_$2" = yes; then : $3 else : $4 fi ]) AC_DEFUN(ACX_PROG_CC_EGCS, [ACX_PROG_GCC_VERSION(2,90,acx_prog_egcs=yes,acx_prog_egcs=no)]) # Check to see if we are using a version of gcc that aligns the stack # (true in gcc-2.95+, which have the -mpreferred-stack-boundary flag). # Also check for stack alignment bug in gcc-2.95.x # (see http://egcs.cygnus.com/ml/gcc-bugs/1999-11/msg00259.html), and # whether main() is correctly aligned by the OS/libc/loader. AC_DEFUN(ACX_GCC_ALIGNS_STACK, [ AC_REQUIRE([AC_PROG_CC]) acx_gcc_aligns_stack=no if test "$GCC" = "yes"; then ACX_CHECK_CC_FLAGS(-mpreferred-stack-boundary=4, m_pref_stack_boundary_4) if test "$ac_m_pref_stack_boundary_4" = "yes"; then AC_MSG_CHECKING([whether the stack is correctly aligned by gcc]) save_CFLAGS="$CFLAGS" CFLAGS="-O -malign-double" AC_TRY_RUN([#include # include struct yuck { int blechh; }; int one(void) { return 1; } struct yuck ick(void) { struct yuck y; y.blechh = 3; return y; } # define CHK_ALIGN(x) if ((((long) &(x)) & 0x7)) { fprintf(stderr, "bad alignment of " #x "\n"); exit(1); } void blah(int foo) { double foobar; CHK_ALIGN(foobar); } int main(void) { double ok1; struct yuck y; double ok2; CHK_ALIGN(ok1); CHK_ALIGN(ok2); y = ick(); blah(one()); return 0; } ], [acx_gcc_aligns_stack=yes; acx_gcc_stack_align_bug=no], acx_gcc_stack_align_bug=yes, acx_gcc_stack_align_bug=yes) CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_gcc_aligns_stack) fi fi if test "$acx_gcc_aligns_stack" = yes; then : $1 else : $2 fi ]) AC_DEFUN(ACX_PROG_CC_MAXOPT, [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([ACX_PROG_CC_EGCS]) AC_REQUIRE([AC_CANONICAL_HOST]) # Try to determine "good" native compiler flags if none specified on command # line if test "$ac_test_CFLAGS" != "set"; then CFLAGS="" case "${host_cpu}-${host_os}" in *linux*) echo "*******************************************************" echo "* Congratulations! You are running linux. *" echo "*******************************************************" ;; sparc-solaris2*) if test "$CC" = cc; then CFLAGS="-native -fast -xO5 -dalign" fi;; alpha*-osf*) if test "$CC" = cc; then CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1" fi;; hppa*-hpux*) if test "$CC" = cc; then CFLAGS="-Ae +O3 +Oall" fi;; *-aix*) if test "$CC" = cc -o "$CC" = xlc; then ACX_CHECK_CC_FLAGS([-qarch=auto -qtune=auto], qarch_auto, [CFLAGS="-O3 -qansialias -w -qarch=auto -qtune=auto"], [CFLAGS="-O3 -qansialias -w" echo "*******************************************************" echo "* You seem to have AIX and the IBM compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CFLAGS environment var. *" echo "* and re-run configure.) For more info, man cc. *" echo "*******************************************************" ]) fi;; esac # use default flags for gcc on all systems if test $ac_cv_prog_gcc = yes; then CFLAGS="-O3 -fomit-frame-pointer" fi # the egcs scheduler is too smart and destroys our own schedule. # Disable the first instruction scheduling pass. The second # scheduling pass (after register reload) is ok. if test "$acx_prog_egcs" = yes; then CFLAGS="$CFLAGS -fno-schedule-insns -fschedule-insns2" fi # test for gcc-specific flags: if test $ac_cv_prog_gcc = yes; then # -malign-double for x86 systems ACX_CHECK_CC_FLAGS(-malign-double,align_double, CFLAGS="$CFLAGS -malign-double") # -fstrict-aliasing for gcc-2.95+ ACX_CHECK_CC_FLAGS(-fstrict-aliasing,fstrict_aliasing, CFLAGS="$CFLAGS -fstrict-aliasing") fi CPU_FLAGS="" if test "$GCC" = "yes"; then dnl try to guess correct CPU flags, at least for linux case "${host_cpu}" in i586*) ACX_CHECK_CC_FLAGS(-mcpu=pentium,cpu_pentium, [CPU_FLAGS=-mcpu=pentium], [ACX_CHECK_CC_FLAGS(-mpentium,pentium, [CPU_FLAGS=-mpentium])]) ;; i686*) ACX_CHECK_CC_FLAGS(-mcpu=pentiumpro,cpu_pentiumpro, [CPU_FLAGS=-mcpu=pentiumpro], [ACX_CHECK_CC_FLAGS(-mpentiumpro,pentiumpro, [CPU_FLAGS=-mpentiumpro])]) ;; alphaev4-*) ACX_CHECK_CC_FLAGS(-mcpu=ev4,cpu_ev4, [CPU_FLAGS=-mcpu=ev4]) ;; alphaev56-*) ACX_CHECK_CC_FLAGS(-mcpu=ev56,cpu_ev56, [CPU_FLAGS=-mcpu=ev56]) ;; alphaev5-*) ACX_CHECK_CC_FLAGS(-mcpu=ev5,cpu_ev5, [CPU_FLAGS=-mcpu=ev5]) ;; alphaev6-*) ACX_CHECK_CC_FLAGS(-mcpu=ev6,cpu_ev6, [CPU_FLAGS=-mcpu=ev6]) ;; powerpc*) cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` is60x=`echo $cputype | egrep "^60[0-9]e?$"` if test -n "$is60x"; then ACX_CHECK_CC_FLAGS(-mcpu=$cputype,m_cpu_60x, CPU_FLAGS=-mcpu=$cputype) elif test "$cputype" = 750; then ACX_PROG_GCC_VERSION(2,95, ACX_CHECK_CC_FLAGS(-mcpu=750,m_cpu_750, CPU_FLAGS=-mcpu=750)) fi if test -z "$CPU_FLAGS"; then ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc, CPU_FLAGS=-mcpu=powerpc) fi if test -z "$CPU_FLAGS"; then ACX_CHECK_CC_FLAGS(-mpowerpc,m_powerpc, CPU_FLAGS=-mpowerpc) fi esac fi if test -n "$CPU_FLAGS"; then CFLAGS="$CFLAGS $CPU_FLAGS" fi if test -z "$CFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CFLAGS for this system *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CFLAGS="-O3" fi ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [ echo "" echo "********************************************************" echo "* WARNING: The guessed CFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "********************************************************" echo "" CFLAGS="" ]) fi ]) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/aclocal.m4�������������������������������������������������������������������������������0000644�0001754�0000144�00000465650�07637527465�010053� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# generated automatically by aclocal 1.7.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. AC_DEFUN(ACX_CHECK_CC_FLAGS, [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK(whether ${CC-cc} accepts $1, ac_$2, [echo 'void f(){}' > conftest.c if test -z "`${CC-cc} $1 -c conftest.c 2>&1`"; then ac_$2=yes else ac_$2=no fi rm -f conftest* ]) if test "$ac_$2" = yes; then : $3 else : $4 fi ]) AC_DEFUN(ACX_PROG_GCC_VERSION, [ AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK(whether we are using gcc $1.$2 or later, ac_cv_prog_gcc_$1_$2, [ dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp. cat > conftest.c < $1) || (__GNUC__ == $1 && __GNUC_MINOR__ >= $2) yes; # endif #endif EOF if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc_$1_$2=yes else ac_cv_prog_gcc_$1_$2=no fi ]) if test "$ac_cv_prog_gcc_$1_$2" = yes; then : $3 else : $4 fi ]) AC_DEFUN(ACX_PROG_CC_EGCS, [ACX_PROG_GCC_VERSION(2,90,acx_prog_egcs=yes,acx_prog_egcs=no)]) # Check to see if we are using a version of gcc that aligns the stack # (true in gcc-2.95+, which have the -mpreferred-stack-boundary flag). # Also check for stack alignment bug in gcc-2.95.x # (see http://egcs.cygnus.com/ml/gcc-bugs/1999-11/msg00259.html), and # whether main() is correctly aligned by the OS/libc/loader. AC_DEFUN(ACX_GCC_ALIGNS_STACK, [ AC_REQUIRE([AC_PROG_CC]) acx_gcc_aligns_stack=no if test "$GCC" = "yes"; then ACX_CHECK_CC_FLAGS(-mpreferred-stack-boundary=4, m_pref_stack_boundary_4) if test "$ac_m_pref_stack_boundary_4" = "yes"; then AC_MSG_CHECKING([whether the stack is correctly aligned by gcc]) save_CFLAGS="$CFLAGS" CFLAGS="-O -malign-double" AC_TRY_RUN([#include # include struct yuck { int blechh; }; int one(void) { return 1; } struct yuck ick(void) { struct yuck y; y.blechh = 3; return y; } # define CHK_ALIGN(x) if ((((long) &(x)) & 0x7)) { fprintf(stderr, "bad alignment of " #x "\n"); exit(1); } void blah(int foo) { double foobar; CHK_ALIGN(foobar); } int main(void) { double ok1; struct yuck y; double ok2; CHK_ALIGN(ok1); CHK_ALIGN(ok2); y = ick(); blah(one()); return 0; } ], [acx_gcc_aligns_stack=yes; acx_gcc_stack_align_bug=no], acx_gcc_stack_align_bug=yes, acx_gcc_stack_align_bug=yes) CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_gcc_aligns_stack) fi fi if test "$acx_gcc_aligns_stack" = yes; then : $1 else : $2 fi ]) AC_DEFUN(ACX_PROG_CC_MAXOPT, [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([ACX_PROG_CC_EGCS]) AC_REQUIRE([AC_CANONICAL_HOST]) # Try to determine "good" native compiler flags if none specified on command # line if test "$ac_test_CFLAGS" != "set"; then CFLAGS="" case "${host_cpu}-${host_os}" in *linux*) echo "*******************************************************" echo "* Congratulations! You are running linux. *" echo "*******************************************************" ;; sparc-solaris2*) if test "$CC" = cc; then CFLAGS="-native -fast -xO5 -dalign" fi;; alpha*-osf*) if test "$CC" = cc; then CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1" fi;; hppa*-hpux*) if test "$CC" = cc; then CFLAGS="-Ae +O3 +Oall" fi;; *-aix*) if test "$CC" = cc -o "$CC" = xlc; then ACX_CHECK_CC_FLAGS([-qarch=auto -qtune=auto], qarch_auto, [CFLAGS="-O3 -qansialias -w -qarch=auto -qtune=auto"], [CFLAGS="-O3 -qansialias -w" echo "*******************************************************" echo "* You seem to have AIX and the IBM compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CFLAGS environment var. *" echo "* and re-run configure.) For more info, man cc. *" echo "*******************************************************" ]) fi;; esac # use default flags for gcc on all systems if test $ac_cv_prog_gcc = yes; then CFLAGS="-O3 -fomit-frame-pointer" fi # the egcs scheduler is too smart and destroys our own schedule. # Disable the first instruction scheduling pass. The second # scheduling pass (after register reload) is ok. if test "$acx_prog_egcs" = yes; then CFLAGS="$CFLAGS -fno-schedule-insns -fschedule-insns2" fi # test for gcc-specific flags: if test $ac_cv_prog_gcc = yes; then # -malign-double for x86 systems ACX_CHECK_CC_FLAGS(-malign-double,align_double, CFLAGS="$CFLAGS -malign-double") # -fstrict-aliasing for gcc-2.95+ ACX_CHECK_CC_FLAGS(-fstrict-aliasing,fstrict_aliasing, CFLAGS="$CFLAGS -fstrict-aliasing") fi CPU_FLAGS="" if test "$GCC" = "yes"; then dnl try to guess correct CPU flags, at least for linux case "${host_cpu}" in i586*) ACX_CHECK_CC_FLAGS(-mcpu=pentium,cpu_pentium, [CPU_FLAGS=-mcpu=pentium], [ACX_CHECK_CC_FLAGS(-mpentium,pentium, [CPU_FLAGS=-mpentium])]) ;; i686*) ACX_CHECK_CC_FLAGS(-mcpu=pentiumpro,cpu_pentiumpro, [CPU_FLAGS=-mcpu=pentiumpro], [ACX_CHECK_CC_FLAGS(-mpentiumpro,pentiumpro, [CPU_FLAGS=-mpentiumpro])]) ;; alphaev4-*) ACX_CHECK_CC_FLAGS(-mcpu=ev4,cpu_ev4, [CPU_FLAGS=-mcpu=ev4]) ;; alphaev56-*) ACX_CHECK_CC_FLAGS(-mcpu=ev56,cpu_ev56, [CPU_FLAGS=-mcpu=ev56]) ;; alphaev5-*) ACX_CHECK_CC_FLAGS(-mcpu=ev5,cpu_ev5, [CPU_FLAGS=-mcpu=ev5]) ;; alphaev6-*) ACX_CHECK_CC_FLAGS(-mcpu=ev6,cpu_ev6, [CPU_FLAGS=-mcpu=ev6]) ;; powerpc*) cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` is60x=`echo $cputype | egrep "^60[0-9]e?$"` if test -n "$is60x"; then ACX_CHECK_CC_FLAGS(-mcpu=$cputype,m_cpu_60x, CPU_FLAGS=-mcpu=$cputype) elif test "$cputype" = 750; then ACX_PROG_GCC_VERSION(2,95, ACX_CHECK_CC_FLAGS(-mcpu=750,m_cpu_750, CPU_FLAGS=-mcpu=750)) fi if test -z "$CPU_FLAGS"; then ACX_CHECK_CC_FLAGS(-mcpu=powerpc,m_cpu_powerpc, CPU_FLAGS=-mcpu=powerpc) fi if test -z "$CPU_FLAGS"; then ACX_CHECK_CC_FLAGS(-mpowerpc,m_powerpc, CPU_FLAGS=-mpowerpc) fi esac fi if test -n "$CPU_FLAGS"; then CFLAGS="$CFLAGS $CPU_FLAGS" fi if test -z "$CFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CFLAGS for this system *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CFLAGS="-O3" fi ACX_CHECK_CC_FLAGS(${CFLAGS}, guessed_cflags, , [ echo "" echo "********************************************************" echo "* WARNING: The guessed CFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "********************************************************" echo "" CFLAGS="" ]) fi ]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.3])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # serial 5 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ >/dev/null 2>conftest.err && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST(am__include) AC_SUBST(am__quote) AC_MSG_RESULT($_am_result) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_PREREQ([2.52]) # serial 6 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- # serial 46 AC_PROG_LIBTOOL AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ]) AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl _LT_AC_PROG_ECHO_BACKSLASH # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_SAVE AC_LANG_C AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_RESTORE]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, [AC_TRY_LINK([], [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); DllMain (0, 0, 0);], [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) case $host/$CC in *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) # old mingw systems require "-dll" to link a DLL, while more recent ones # require "-mdll" SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) CFLAGS="$SAVE_CFLAGS" ;; *-*-cygwin* | *-*-pw32*) # cygwin systems need to pass --dll to the linker, and not link # crt.o which will require a WinMain@16 definition. lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; esac ;; ]) esac _LT_AC_LTCONFIG_HACK ]) # AC_LIBTOOL_HEADER_ASSERT # ------------------------ AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], [AC_CACHE_CHECK([whether $CC supports assert without backlinking], [lt_cv_func_assert_works], [case $host in *-*-solaris*) if test "$GCC" = yes && test "$with_gnu_ld" != yes; then case `$CC --version 2>/dev/null` in [[12]].*) lt_cv_func_assert_works=no ;; *) lt_cv_func_assert_works=yes ;; esac fi ;; esac]) if test "x$lt_cv_func_assert_works" = xyes; then AC_CHECK_HEADERS(assert.h) fi ])# AC_LIBTOOL_HEADER_ASSERT # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h) ])# _LT_AC_CHECK_DLFCN # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $host_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[[ABCDGISTW]]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[[]] = { EOF sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AC_FD_CC fi else echo "cannot find nm_test_var in $nlist" >&AC_FD_CC fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else echo "$progname: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" if test -z "$lt_cv_sys_global_symbol_pipe"; then global_symbol_to_cdecl= global_symbol_to_c_name_address= else global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" fi if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # --------------------------------- AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], [# Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) AC_DIVERT_POP ])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [if test "$cross_compiling" = yes; then : [$4] else AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; cygwin* | mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF AC_DEFUN([_LT_AC_LTCONFIG_HACK], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" need_locks="$enable_libtool_lock" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o if test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Allow CC to be a program name with arguments. set dummy $CC compiler="[$]2" AC_MSG_CHECKING([for objdir]) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null AC_MSG_RESULT($objdir) AC_ARG_WITH(pic, [ --with-pic try to use only PIC/non-PIC objects [default=use both]], pic_mode="$withval", pic_mode=default) test -z "$pic_mode" && pic_mode=default # We assume here that the value for lt_cv_prog_cc_pic will not be cached # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. AC_MSG_CHECKING([for $compiler option to produce PIC]) AC_CACHE_VAL(lt_cv_prog_cc_pic, [ lt_cv_prog_cc_pic= lt_cv_prog_cc_shlib= lt_cv_prog_cc_wl= lt_cv_prog_cc_static= lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_can_build_shared=$can_build_shared if test "$GCC" = yes; then lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-static' case $host_os in aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # not sure about C++ programs. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_cv_prog_cc_pic='-fno-common' ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; sysv4*MP*) if test -d /usr/nec; then lt_cv_prog_cc_pic=-Kconform_pic fi ;; *) lt_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case $host_os in aix3* | aix4* | aix5*) lt_cv_prog_cc_wl='-Wl,' # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_cv_prog_cc_static='-Bstatic' else lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; hpux9* | hpux10* | hpux11*) # Is there a better lt_cv_prog_cc_static that works with the bundled CC? lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" lt_cv_prog_cc_pic='+Z' ;; irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; newsos6) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) lt_cv_prog_cc_pic='-Kpic' lt_cv_prog_cc_static='-dn' lt_cv_prog_cc_shlib='-belf' ;; solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; sunos4*) lt_cv_prog_cc_pic='-PIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; uts4*) lt_cv_prog_cc_pic='-pic' lt_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_cv_prog_cc_pic='-Kconform_pic' lt_cv_prog_cc_static='-Bstatic' fi ;; *) lt_cv_prog_cc_can_build_shared=no ;; esac fi ]) if test -z "$lt_cv_prog_cc_pic"; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([$lt_cv_prog_cc_pic]) # Check to make sure the pic_flag actually works. AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" AC_TRY_COMPILE([], [], [dnl case $host_os in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then lt_cv_prog_cc_pic_works=no else lt_cv_prog_cc_pic_works=yes fi ;; *) lt_cv_prog_cc_pic_works=yes ;; esac ], [dnl lt_cv_prog_cc_pic_works=no ]) CFLAGS="$save_CFLAGS" ]) if test "X$lt_cv_prog_cc_pic_works" = Xno; then lt_cv_prog_cc_pic= lt_cv_prog_cc_can_build_shared=no else lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" fi AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : else AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) lt_cv_prog_cc_can_build_shared=no fi fi AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl lt_cv_prog_cc_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) LDFLAGS="$save_LDFLAGS" ]) # Belt *and* braces to stop my trousers falling down: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) pic_flag="$lt_cv_prog_cc_pic" special_shlib_compile_flags="$lt_cv_prog_cc_shlib" wl="$lt_cv_prog_cc_wl" link_static_flag="$lt_cv_prog_cc_static" no_builtin_flag="$lt_cv_prog_cc_no_builtin" can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) AC_CACHE_VAL([lt_cv_compiler_c_o], [ $rm -r conftest 2>/dev/null mkdir conftest cd conftest echo "int some_variable = 0;" > conftest.$ac_ext mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then lt_cv_compiler_c_o=no else lt_cv_compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&AC_FD_CC lt_cv_compiler_c_o=no fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null ]) compiler_c_o=$lt_cv_compiler_c_o AC_MSG_RESULT([$compiler_c_o]) if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) AC_CACHE_VAL([lt_cv_compiler_o_lo], [ lt_cv_compiler_o_lo=no save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" save_objext="$ac_objext" ac_objext=lo AC_TRY_COMPILE([], [int some_variable = 0;], [dnl # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then lt_cv_compiler_o_lo=no else lt_cv_compiler_o_lo=yes fi ]) ac_objext="$save_objext" CFLAGS="$save_CFLAGS" ]) compiler_o_lo=$lt_cv_compiler_o_lo AC_MSG_RESULT([$compiler_o_lo]) else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no AC_TRY_COMPILE([], [int some_variable = 0;], [dnl # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then compiler_rtti_exceptions=no else compiler_rtti_exceptions=yes fi ]) CFLAGS="$save_CFLAGS" AC_MSG_RESULT([$compiler_rtti_exceptions]) if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # See if the linker supports building shared libraries. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_into_libs=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= link_all_deplibs=unknown always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac # mingw and cygwin differ, and it's simplest to just exclude the union # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= fi # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \[$]# in 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw* | pw32*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. hardcode_direct=yes archive_cmds='' hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then shared_flag='${wl}-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall can do strange things, so it is better to # generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. allow_undefined_flag='${wl}-berok' # This is a bit strange, but is similar to how AIX traditionally builds # it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on allow_undefined_flag='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. Also zsh mangles # `"' quotes if we put them in here... so don't! archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case $host_os in hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case "$host_os" in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' #Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes export_dynamic_flag_spec='${wl}-Bexport' ;; solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of # the object symbols generated in some cases. Libraries that use # assert need libgcc.a to resolve __eprintf, for example. Linking # a copy of libgcc.a into every shared library to guarantee resolving # such symbols causes other problems: According to Tim Van Holder # , C++ libraries end up with a separate # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' if test "$GCC" = yes; then case `$CC --version 2>/dev/null` in [[12]].*) cat <&2 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is disabling *** -no-undefined support, which will at least allow you to build shared *** libraries. However, you may find that when you link such libraries *** into an application without using GCC, you have to manually add *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to *** upgrade to a newer version of GCC. Another option is to rebuild your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. EOF no_undefined_flag= ;; esac fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5uw7* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi AC_MSG_RESULT([$ld_shlibs]) test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. AC_MSG_CHECKING([how to hardcode library paths into programs]) hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$hardcode_shlibpath_var" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi AC_MSG_RESULT([$hardcode_action]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi reload_cmds='$LD$reload_flag -o $output$reload_objs' test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can # not hardcode correct soname into executable. Probably we can # add versioning support to collect2, so additional links can # be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}.so$major' fi shlibpath_var=LIBPATH fi hardcode_into_libs=yes ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin*) library_names_spec='$libname.dll.a' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog .libs/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' ;; *) library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; *) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) version_type=irix ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case "$host_os" in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" hardcode_into_libs=yes ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi AC_LIBTOOL_DLOPEN_SELF if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], [$rm conftest* echo 'static int dummy;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_cv_prog_cc_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$save_allow_undefined_flag else cat conftest.err 1>&5 fi]) AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) ;; esac fi need_lc=${lt_cv_archive_cmds_need_lc-yes} # The second clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then : else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi if test -f "$ltmain"; then trap "$rm \"${ofile}T\"; exit 1" 1 2 15 $rm -f "${ofile}T" echo creating $ofile # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS SED \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ old_striplib striplib file_magic_cmd export_symbols_cmds \ deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ global_symbol_to_c_name_address \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case $var in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done cat <<__EOF__ > "${ofile}T" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="${SED} -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$need_lc # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # The default C compiler. CC=$lt_CC # Is the compiler the GNU C compiler? with_gcc=$GCC # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag pic_mode=$pic_mode # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$lt_compiler_o_lo # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "${ofile}T" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac case $host_os in cygwin* | mingw* | pw32* | os2*) cat <<'EOF' >> "${ofile}T" # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 # #endif # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) mv -f "${ofile}T" "$ofile" || \ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") chmod +x "$ofile" fi ])# _LT_AC_LTCONFIG_HACK # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_LIBTOOL_PICMODE - implement the --with-pic flag # Usage: AC_LIBTOOL_PICMODE[(MODE)] # Where MODE is either `yes' or `no'. If omitted, it defaults to # `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default)]) # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ]) # AC_PATH_MAGIC - find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) else MAGIC_CMD=: fi fi ]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | [[A-Za-z]]:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$lt_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_PROG_LD_GNU ]) # AC_PROG_LD_GNU - AC_DEFUN([AC_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then lt_cv_prog_gnu_ld=yes else lt_cv_prog_gnu_ld=no fi]) with_gnu_ld=$lt_cv_prog_gnu_ld ]) # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker # -- PORTME Some linkers may need a different reload flag. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, [lt_cv_ld_reload_flag='-r']) reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" ]) # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], [AC_CACHE_CHECK([how to recognise dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin* | mingw* | pw32*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[[012]]) lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` ;; *) # Darwin 1.3 on lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; freebsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20*|hpux11*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6* | nonstopux*) case $host_os in irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux-gnu*) case $host_cpu in alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv5uw[[78]]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}nm if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then lt_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then lt_cv_path_NM="$tmp_nm -p" break else lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" AC_MSG_RESULT([$NM]) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the # configure arguments. Note that LIBLTDL and LTDLINCL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed # with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_executable_p="test -f" as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" fi done done done # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : ${TMPDIR=/tmp} { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/sed$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } _max=0 _count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for _sed in $_sed_list /usr/xpg4/bin/sed; do test ! -f ${_sed} && break cat /dev/null > "$tmp/sed.in" _count=0 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" # Check for GNU sed and select it if it is found. if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then lt_cv_path_SED=${_sed} break fi while true; do cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" mv "$tmp/sed.tmp" "$tmp/sed.in" cp "$tmp/sed.in" "$tmp/sed.nl" echo >>"$tmp/sed.nl" ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break # 40000 chars as input seems more than enough test $_count -gt 10 && break _count=`expr $_count + 1` if test $_count -gt $_max; then _max=$_count lt_cv_path_SED=$_sed fi done done rm -rf "$tmp" ]) if test "X$SED" != "X"; then lt_cv_path_SED=$SED else SED=$lt_cv_path_SED fi AC_MSG_RESULT([$SED]) ]) ����������������������������������������������������������������������������������������fftw-2.1.5/config.guess�����������������������������������������������������������������������������0000755�0001754�0000144�00000120622�07634724445�010510� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) echo i586-pc-interix3 exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ��������������������������������������������������������������������������������������������������������������fftw-2.1.5/config.sub�������������������������������������������������������������������������������0000755�0001754�0000144�00000072425�07634724446�010163� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-02-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic4x | c4x*) basic_machine=tic4x-unknown os=-coff ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/configure��������������������������������������������������������������������������������0000755�0001754�0000144�00001602225�07637527504�010104� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="fftw/planner.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot FFTW_PREFIX FFTW_PREFIX1 CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB LN_S build build_cpu build_vendor build_os host host_cpu host_vendor host_os ECHO CPP EGREP LIBTOOL PERL F77 FFLAGS ac_ct_F77 FLIBS SHARED_VERSION_INFO SHARED_VERSION ALLOCA PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS FFTW_THREADS_LIBLIST FFTW_THREADS_INCLUDELIST FFTW_THREADS_PROGLIST THREADLIBS MPICC MPILIBS FFTW_MPI_LIBLIST FFTW_MPI_INCLUDELIST FFTW_MPI_PROGLIST LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared=PKGS build shared libraries default=no --enable-threads compile FFTW SMP threads library --enable-mpi compile FFTW MPI library --disable-fortran don't include fortran-callable wrappers --enable-float compile fftw for single precision --enable-type-prefix prefix files with d/s to indicate precision --enable-i386-hacks enable gcc/x86 specific performance hacks --enable-pentium-timer enable high resolution Pentium timer --enable-debug compile fftw with extra runtime checks for debugging --enable-debug-alignment enable runtime checks for alignment on x86 --enable-vec-recurse enable experimental performance hack --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --enable-static=PKGS build static libraries default=yes --enable-fast-install=PKGS optimize for fast installation default=yes --disable-libtool-lock avoid locking (might break parallel builds) --enable-unsafe-mulmod risk overflow for large prime sizes Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openmp use OpenMP directives instead of a threads library --with-sgi-mp use SGI MP directives instead of a threads library --with-gcc use gcc instead of the native compiler cc --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.7" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=fftw VERSION=2.1.5 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. SHARED_VERSION_INFO="2:7:0" ac_config_headers="$ac_config_headers fftw/config.h fftw/fftw.h" # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac else enable_shared=no fi; # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" enable_threads=$enableval else enable_threads=no fi; # Check whether --with-openmp or --without-openmp was given. if test "${with_openmp+set}" = set; then withval="$with_openmp" with_openmp=$withval else with_openmp=no fi; # Check whether --with-sgimp or --without-sgimp was given. if test "${with_sgimp+set}" = set; then withval="$with_sgimp" with_sgimp=$withval else with_sgimp=no fi; # Check whether --enable-mpi or --disable-mpi was given. if test "${enable_mpi+set}" = set; then enableval="$enable_mpi" enable_mpi=$enableval else enable_mpi=no fi; # Check whether --enable-fortran or --disable-fortran was given. if test "${enable_fortran+set}" = set; then enableval="$enable_fortran" enable_fortran=$enableval else enable_fortran=yes fi; # Check whether --with-gcc or --without-gcc was given. if test "${with_gcc+set}" = set; then withval="$with_gcc" ok=$withval else ok=no fi; if test "$ok" = "yes"; then CC=gcc fi # Check whether --enable-float or --disable-float was given. if test "${enable_float+set}" = set; then enableval="$enable_float" enable_float=$enableval else enable_float=no fi; if test "$enable_float" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_FLOAT 1 _ACEOF fi FFTW_PREFIX="" # Check whether --enable-type-prefix or --disable-type-prefix was given. if test "${enable_type_prefix+set}" = set; then enableval="$enable_type_prefix" ok=$enableval else ok=no fi; echo "$as_me:$LINENO: checking type prefix for installed files" >&5 echo $ECHO_N "checking type prefix for installed files... $ECHO_C" >&6 if test "$ok" = "yes"; then if test "$enable_float" = "yes"; then FFTW_PREFIX="s" else FFTW_PREFIX="d" fi echo "$as_me:$LINENO: result: $FFTW_PREFIX" >&5 echo "${ECHO_T}$FFTW_PREFIX" >&6 elif test "$ok" = "no"; then echo "$as_me:$LINENO: result: (none)" >&5 echo "${ECHO_T}(none)" >&6 else FFTW_PREFIX="$ok" echo "$as_me:$LINENO: result: $FFTW_PREFIX" >&5 echo "${ECHO_T}$FFTW_PREFIX" >&6 fi FFTW_PREFIX1="xyz" if test -n "$FFTW_PREFIX"; then FFTW_PREFIX1="$FFTW_PREFIX" fi # Check whether --enable-i386-hacks or --disable-i386-hacks was given. if test "${enable_i386_hacks+set}" = set; then enableval="$enable_i386_hacks" ok=$enableval else ok=no fi; if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_I386_HACKS 1 _ACEOF fi # Check whether --enable-pentium-timer or --disable-pentium-timer was given. if test "${enable_pentium_timer+set}" = set; then enableval="$enable_pentium_timer" ok=$enableval else ok=no fi; if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_PENTIUM_TIMER 1 _ACEOF fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" ok=$enableval else ok=no fi; if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_DEBUG 1 _ACEOF fi # Check whether --enable-debug-alignment or --disable-debug-alignment was given. if test "${enable_debug_alignment+set}" = set; then enableval="$enable_debug_alignment" ok=$enableval else ok=no fi; if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_DEBUG_ALIGNMENT 1 _ACEOF fi # Check whether --enable-vec-recurse or --disable-vec-recurse was given. if test "${enable_vec_recurse+set}" = set; then enableval="$enable_vec_recurse" ok=$enableval else ok=no fi; if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_VECTOR_RECURSE 1 _ACEOF fi # Use native cc if present echo "$as_me:$LINENO: checking for vendor's cc to be used instead of gcc" >&5 echo $ECHO_N "checking for vendor's cc to be used instead of gcc... $ECHO_C" >&6 # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ >/dev/null 2>conftest.err && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking whether we are using gcc 2.90 or later" >&5 echo $ECHO_N "checking whether we are using gcc 2.90 or later... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_2_90+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 90) yes; # endif #endif EOF if { ac_try='${CC-cc} -E conftest.c' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc_2_90=yes else ac_cv_prog_gcc_2_90=no fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_90" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_2_90" >&6 if test "$ac_cv_prog_gcc_2_90" = yes; then : acx_prog_egcs=yes else : acx_prog_egcs=no fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Find the correct PATH separator. Usually this is `:', but # DJGPP uses `;' like DOS. if test "X${PATH_SEPARATOR+set}" != Xset; then UNAME=${UNAME-`uname 2>/dev/null`} case X$UNAME in *-DOS) lt_cv_sys_path_separator=';' ;; *) lt_cv_sys_path_separator=':' ;; esac PATH_SEPARATOR=$lt_cv_sys_path_separator fi # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else lt_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$lt_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then lt_cv_prog_gnu_ld=yes else lt_cv_prog_gnu_ld=no fi fi echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}nm if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then lt_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then lt_cv_path_NM="$tmp_nm -p" break else lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi NM="$lt_cv_path_NM" echo "$as_me:$LINENO: result: $NM" >&5 echo "${ECHO_T}$NM" >&6 echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_executable_p="test -f" as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" fi done done done # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : ${TMPDIR=/tmp} { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/sed$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } _max=0 _count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for _sed in $_sed_list /usr/xpg4/bin/sed; do test ! -f ${_sed} && break cat /dev/null > "$tmp/sed.in" _count=0 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" # Check for GNU sed and select it if it is found. if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then lt_cv_path_SED=${_sed} break fi while true; do cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" mv "$tmp/sed.tmp" "$tmp/sed.in" cp "$tmp/sed.in" "$tmp/sed.nl" echo >>"$tmp/sed.nl" ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break # 40000 chars as input seems more than enough test $_count -gt 10 && break _count=`expr $_count + 1` if test $_count -gt $_max; then _max=$_count lt_cv_path_SED=$_sed fi done done rm -rf "$tmp" fi if test "X$SED" != "X"; then lt_cv_path_SED=$SED else SED=$lt_cv_path_SED fi echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi4*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin* | mingw* | pw32*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[012]) lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` ;; *) # Darwin 1.3 on lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' ;; esac ;; freebsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20*|hpux11*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; irix5* | irix6* | nonstopux*) case $host_os in irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux-gnu*) case $host_cpu in alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' else lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv5uw[78]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output" >&5 echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $host_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = { EOF sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" if test -z "$lt_cv_sys_global_symbol_pipe"; then global_symbol_to_cdecl= global_symbol_to_c_name_address= else global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" fi if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in /*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; ?:/*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. ;; *) ac_save_MAGIC_CMD="$MAGIC_CMD" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="/usr/bin:$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$ac_save_ifs" MAGIC_CMD="$ac_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in *-*-irix6*) # Find out which ABI we are using. echo '#line 5025 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" need_locks="$enable_libtool_lock" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o if test x"$host" != x"$build"; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case $host_os in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$as_me:$LINENO: result: $objdir" >&5 echo "${ECHO_T}$objdir" >&6 # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # We assume here that the value for lt_cv_prog_cc_pic will not be cached # in isolation, and that seeing it set (from the cache) indicates that # the associated values are set (in the cache) correctly too. echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_pic= lt_cv_prog_cc_shlib= lt_cv_prog_cc_wl= lt_cv_prog_cc_static= lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_can_build_shared=$can_build_shared if test "$GCC" = yes; then lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-static' case $host_os in aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # not sure about C++ programs. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_cv_prog_cc_pic='-fno-common' ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; sysv4*MP*) if test -d /usr/nec; then lt_cv_prog_cc_pic=-Kconform_pic fi ;; *) lt_cv_prog_cc_pic='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case $host_os in aix3* | aix4* | aix5*) lt_cv_prog_cc_wl='-Wl,' # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_cv_prog_cc_static='-Bstatic' else lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' fi ;; hpux9* | hpux10* | hpux11*) # Is there a better lt_cv_prog_cc_static that works with the bundled CC? lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" lt_cv_prog_cc_pic='+Z' ;; irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_cv_prog_cc_pic='-DDLL_EXPORT' ;; newsos6) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ;; osf3* | osf4* | osf5*) # All OSF/1 code is PIC. lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' ;; sco3.2v5*) lt_cv_prog_cc_pic='-Kpic' lt_cv_prog_cc_static='-dn' lt_cv_prog_cc_shlib='-belf' ;; solaris*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; sunos4*) lt_cv_prog_cc_pic='-PIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' lt_cv_prog_cc_wl='-Wl,' ;; uts4*) lt_cv_prog_cc_pic='-pic' lt_cv_prog_cc_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_cv_prog_cc_pic='-Kconform_pic' lt_cv_prog_cc_static='-Bstatic' fi ;; *) lt_cv_prog_cc_can_build_shared=no ;; esac fi fi if test -z "$lt_cv_prog_cc_pic"; then echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 else echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6 # Check to make sure the pic_flag actually works. echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then case $host_os in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then # they create non-PIC objects. So, if there were any warnings, we # assume that PIC is not supported. if test -s conftest.err; then lt_cv_prog_cc_pic_works=no else lt_cv_prog_cc_pic_works=yes fi ;; *) lt_cv_prog_cc_pic_works=yes ;; esac else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_prog_cc_pic_works=no fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi if test "X$lt_cv_prog_cc_pic_works" = Xno; then lt_cv_prog_cc_pic= lt_cv_prog_cc_can_build_shared=no else lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" fi echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6 fi # Check for any special shared library compilation flags. if test -n "$lt_cv_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6 if test "${lt_cv_prog_cc_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_cc_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_prog_cc_static_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi # Belt *and* braces to stop my trousers falling down: test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6 pic_flag="$lt_cv_prog_cc_pic" special_shlib_compile_flags="$lt_cv_prog_cc_shlib" wl="$lt_cv_prog_cc_wl" link_static_flag="$lt_cv_prog_cc_static" no_builtin_flag="$lt_cv_prog_cc_no_builtin" can_build_shared="$lt_cv_prog_cc_can_build_shared" # Check to see if options -o and -c are simultaneously supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm -r conftest 2>/dev/null mkdir conftest cd conftest echo "int some_variable = 0;" > conftest.$ac_ext mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no if { (eval echo configure:5554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then lt_cv_compiler_c_o=no else lt_cv_compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 lt_cv_compiler_c_o=no fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null fi compiler_c_o=$lt_cv_compiler_c_o echo "$as_me:$LINENO: result: $compiler_c_o" >&5 echo "${ECHO_T}$compiler_c_o" >&6 if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6 if test "${lt_cv_compiler_o_lo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_compiler_o_lo=no save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" save_objext="$ac_objext" ac_objext=lo cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then lt_cv_compiler_o_lo=no else lt_cv_compiler_o_lo=yes fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_objext="$save_objext" CFLAGS="$save_CFLAGS" fi compiler_o_lo=$lt_cv_compiler_o_lo echo "$as_me:$LINENO: result: $compiler_o_lo" >&5 echo "${ECHO_T}$compiler_o_lo" >&6 else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi if test "$GCC" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" compiler_rtti_exceptions=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int some_variable = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then compiler_rtti_exceptions=no else compiler_rtti_exceptions=yes fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5 echo "${ECHO_T}$compiler_rtti_exceptions" >&6 if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # See if the linker supports building shared libraries. echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_into_libs=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= link_all_deplibs=unknown always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX, the GNU linker is very broken # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ test -f $output_objdir/impgen.exe || (cd $output_objdir && \ if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ else $CC -o impgen impgen.c ; fi)~ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' # cygwin and mingw dlls have different entry points and sets of symbols # to exclude. # FIXME: what about values for MSVC? dll_entry=__cygwin_dll_entry@12 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ case $host_os in mingw*) # mingw values dll_entry=_DllMainCRTStartup@12 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ ;; esac # mingw and cygwin differ, and it's simplest to just exclude the union # of the two symbol sets. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one (in ltdll.c) if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else ltdll_obj= ltdll_cmds= fi # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. # Be careful not to strip the DATA tag left be newer dlltools. export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done; fi~ '"$ltdll_cmds"' $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw* | pw32*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. hardcode_direct=yes archive_cmds='' hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then shared_flag='${wl}-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall can do strange things, so it is better to # generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. allow_undefined_flag='${wl}-berok' # This is a bit strange, but is similar to how AIX traditionally builds # it's shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on allow_undefined_flag='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. Also zsh mangles # `"' quotes if we put them in here... so don't! archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' hardcode_direct=yes hardcode_shlibpath_var=no whole_archive_flag_spec='-all_load $convenience' ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case $host_os in hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' #Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes export_dynamic_flag_spec='${wl}-Bexport' ;; solaris*) # gcc --version < 3.0 without binutils cannot create self contained # shared libraries reliably, requiring libgcc.a to resolve some of # the object symbols generated in some cases. Libraries that use # assert need libgcc.a to resolve __eprintf, for example. Linking # a copy of libgcc.a into every shared library to guarantee resolving # such symbols causes other problems: According to Tim Van Holder # , C++ libraries end up with a separate # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' if test "$GCC" = yes; then case `$CC --version 2>/dev/null` in [12].*) cat <&2 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably *** create self contained shared libraries on Solaris systems, without *** introducing a dependency on libgcc.a. Therefore, libtool is disabling *** -no-undefined support, which will at least allow you to build shared *** libraries. However, you may find that when you link such libraries *** into an application without using GCC, you have to manually add *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to *** upgrade to a newer version of GCC. Another option is to rebuild your *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. EOF no_undefined_flag= ;; esac fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5uw7* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # Check hardcoding attributes. echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$hardcode_shlibpath_var" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi reload_cmds='$LD$reload_flag -o $output$reload_objs' test -z "$deplibs_check_method" && deplibs_check_method=unknown # PORTME Fill in your ld.so characteristics echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can # not hardcode correct soname into executable. Probably we can # add versioning support to collect2, so additional links can # be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}.so$major' fi shlibpath_var=LIBPATH fi hardcode_into_libs=yes ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" export_dynamic_flag_spec=-rdynamic # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin*) library_names_spec='$libname.dll.a' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog .libs/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' ;; yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` ;; yes,pw32*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll' ;; *) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; *) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) version_type=irix ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case "$host_os" in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_version=no soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" hardcode_into_libs=yes ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; cygwin* | mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 if test "${lt_cv_archive_cmds_need_lc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else $rm conftest* echo 'static int dummy;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_cv_prog_cc_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$save_allow_undefined_flag else cat conftest.err 1>&5 fi fi echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 ;; esac fi need_lc=${lt_cv_archive_cmds_need_lc-yes} # The second clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then : else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi if test -f "$ltmain"; then trap "$rm \"${ofile}T\"; exit 1" 1 2 15 $rm -f "${ofile}T" echo creating $ofile # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS SED \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ old_striplib striplib file_magic_cmd export_symbols_cmds \ deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ global_symbol_to_c_name_address \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case $var in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done cat <<__EOF__ > "${ofile}T" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996-2000 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="${SED} -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$need_lc # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # The default C compiler. CC=$lt_CC # Is the compiler the GNU C compiler? with_gcc=$GCC # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag pic_mode=$pic_mode # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$lt_compiler_o_lo # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "${ofile}T" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac case $host_os in cygwin* | mingw* | pw32* | os2*) cat <<'EOF' >> "${ofile}T" # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # /* O_BINARY isn't required (or even defined sometimes) under Unix */ # #ifndef O_BINARY # #define O_BINARY 0 # #endif # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i> "${ofile}T" || (rm -f "${ofile}T"; exit 1) mv -f "${ofile}T" "$ofile" || \ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") chmod +x "$ofile" fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="perl" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="echo perl" fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$enable_fortran" = "yes"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:8359:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } # If we don't use `.F' as extension, the preprocessor is not run on the # input file. ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext G77=`test $ac_compiler_gnu = yes && echo yes` ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "$G77" = yes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "$G77" = yes; then FFLAGS="-O2" else FFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -z "$F77"; then enable_fortran=no { echo "$as_me:$LINENO: WARNING: *** Couldn't find f77 compiler; switching to --disable-fortran." >&5 echo "$as_me: WARNING: *** Couldn't find f77 compiler; switching to --disable-fortran." >&2;} fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6 if test "${ac_cv_prog_f77_v+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran 77 compiler in order to get # "verbose" output that we can then parse for the Fortran 77 linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" (eval echo $as_me:8534: \"$ac_link\") >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -f conftest* ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu # If we are using xlf then replace all the commas with spaces. if echo $ac_f77_v_output | grep xlfentry >/dev/null 2>&1; then ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` fi # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" # If we are using Cray Fortran then delete quotes. # Use "\"" instead of '"' for font-lock-mode. # FIXME: a more general fix for quoted arguments with spaces? if echo $ac_f77_v_output | grep cft90 >/dev/null 2>&1; then ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` fi # look for -l* and *.a constructs in the output for ac_arg in $ac_f77_v_output; do case $ac_arg in [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) ac_cv_prog_f77_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_f77_v"; then { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: WARNING: compilation failed" >&5 echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 echo "${ECHO_T}$ac_cv_prog_f77_v" >&6 echo "$as_me:$LINENO: checking for Fortran 77 libraries" >&5 echo $ECHO_N "checking for Fortran 77 libraries... $ECHO_C" >&6 if test "${ac_cv_flibs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$FLIBS" != "x"; then ac_cv_flibs="$FLIBS" # Let the user override the test. else ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran 77 compiler in order to get # "verbose" output that we can then parse for the Fortran 77 linker # flags. ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" (eval echo $as_me:8614: \"$ac_link\") >&5 ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -f conftest* ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu # If we are using xlf then replace all the commas with spaces. if echo $ac_f77_v_output | grep xlfentry >/dev/null 2>&1; then ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` fi # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" # If we are using Cray Fortran then delete quotes. # Use "\"" instead of '"' for font-lock-mode. # FIXME: a more general fix for quoted arguments with spaces? if echo $ac_f77_v_output | grep cft90 >/dev/null 2>&1; then ac_f77_v_output=`echo $ac_f77_v_output | sed "s/\"//g"` fi ac_cv_flibs= # Save positional arguments (if any) ac_save_positional="$@" set X $ac_f77_v_output while test $# != 1; do shift ac_arg=$1 case $ac_arg in [\\/]*.a | ?:[\\/]*.a) ac_exists=false for ac_i in $ac_cv_flibs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_flibs="$ac_cv_flibs $ac_arg" fi ;; -bI:*) ac_exists=false for ac_i in $ac_cv_flibs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_flibs="$ac_cv_flibs -Xlinker $ac_link_opt" done else ac_cv_flibs="$ac_cv_flibs $ac_arg" fi fi ;; # Ignore these flags. -lang* | -lcrt0.o | -lc | -lgcc | -libmil | -LANG:=*) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_flibs="$ac_cv_flibs $ac_arg" ;; -[LRuY]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $2 in "" | -*);; *) ac_arg="$ac_arg$2" shift; shift set X $ac_arg "$@" ;; esac ;; -YP,*) for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_flibs; do if test x"$ac_j" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_arg="$ac_arg $ac_j" ac_cv_flibs="$ac_cv_flibs $ac_j" fi done ;; -[lLR]*) ac_exists=false for ac_i in $ac_cv_flibs; do if test x"$ac_arg" = x"$ac_i"; then ac_exists=true break fi done if test x"$ac_exists" = xtrue; then : else ac_cv_flibs="$ac_cv_flibs $ac_arg" fi ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`echo $ac_f77_v_output | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_ld_run_path; do ac_cv_flibs="$ac_cv_flibs -Xlinker $ac_link_opt" done else ac_cv_flibs="$ac_cv_flibs $ac_ld_run_path" fi ;; esac fi # test "x$FLIBS" = "x" fi echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5 echo "${ECHO_T}$ac_cv_flibs" >&6 FLIBS="$ac_cv_flibs" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 echo $ECHO_N "checking for dummy main to link with Fortran 77 libraries... $ECHO_C" >&6 if test "${ac_cv_f77_dummy_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" # First, try linking without a dummy main: cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_f77_dummy_main=none else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_f77_dummy_main=unknown fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test $ac_cv_f77_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define F77_DUMMY_MAIN $ac_func #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_f77_dummy_main=$ac_func; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi rm -f conftest* LIBS=$ac_f77_dm_save_LIBS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6 F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then if test $F77_DUMMY_MAIN != none; then cat >>confdefs.h <<_ACEOF #define F77_DUMMY_MAIN $F77_DUMMY_MAIN _ACEOF fi else enable_fortran=no { echo "$as_me:$LINENO: WARNING: *** Couldn't figure out how to link C and Fortran; switching to --disable-fortran." >&5 echo "$as_me: WARNING: *** Couldn't figure out how to link C and Fortran; switching to --disable-fortran." >&2;} fi fi if test "x$enable_fortran" = xyes; then echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 echo $ECHO_N "checking for Fortran 77 name-mangling scheme... $ECHO_C" >&6 if test "${ac_cv_f77_mangling+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu cat >conftest.$ac_ext <<_ACEOF subroutine foobar() return end subroutine foo_bar() return end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then mv conftest.$ac_objext cf77_test.$ac_objext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_save_LIBS=$LIBS LIBS="cf77_test.$ac_objext $LIBS $FLIBS" ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_success=yes; break 2 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done done if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_success_extra=yes; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done if test "$ac_success_extra" = "yes"; then ac_cv_f77_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" else ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" fi else ac_cv_f77_mangling="unknown" fi else ac_cv_f77_mangling="unknown" fi LIBS=$ac_save_LIBS ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu rm -f cf77_test* conftest* else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program See \`config.log' for more details." >&5 echo "$as_me: error: cannot compile a simple Fortran program See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 echo "${ECHO_T}$ac_cv_f77_mangling" >&6 case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name _ACEOF ;; "lower case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## _ _ACEOF ;; "lower case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) name ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) name ## __ _ACEOF ;; "upper case, no underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME _ACEOF ;; "upper case, no underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, no extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## _ _ACEOF ;; "upper case, underscore, extra underscore") cat >>confdefs.h <<\_ACEOF #define F77_FUNC(name,NAME) NAME ## _ _ACEOF cat >>confdefs.h <<\_ACEOF #define F77_FUNC_(name,NAME) NAME ## __ _ACEOF ;; *) { echo "$as_me:$LINENO: WARNING: unknown Fortran 77 name-mangling scheme" >&5 echo "$as_me: WARNING: unknown Fortran 77 name-mangling scheme" >&2;} ;; esac fi cat >>confdefs.h <<_ACEOF #define FFTW_VERSION "$VERSION" _ACEOF # Get the version number that will be appended to shared libraries: SHARED_VERSION=`echo $SHARED_VERSION_INFO | awk -F':' '{ print $1 "." $3 "." $2 }'` # Try to determine "good" native compiler flags if none specified on command # line if test "$ac_test_CFLAGS" != "set"; then CFLAGS="" case "${host_cpu}-${host_os}" in *linux*) echo "*******************************************************" echo "* Congratulations! You are running linux. *" echo "*******************************************************" ;; sparc-solaris2*) if test "$CC" = cc; then CFLAGS="-native -fast -xO5 -dalign" fi;; alpha*-osf*) if test "$CC" = cc; then CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1" fi;; hppa*-hpux*) if test "$CC" = cc; then CFLAGS="-Ae +O3 +Oall" fi;; *-aix*) if test "$CC" = cc -o "$CC" = xlc; then echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -qarch=auto -qtune=auto" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -qarch=auto -qtune=auto... $ECHO_C" >&6 if test "${ac_qarch_auto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -qarch=auto -qtune=auto -c conftest.c 2>&1`"; then ac_qarch_auto=yes else ac_qarch_auto=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_qarch_auto" >&5 echo "${ECHO_T}$ac_qarch_auto" >&6 if test "$ac_qarch_auto" = yes; then : CFLAGS="-O3 -qansialias -w -qarch=auto -qtune=auto" else : CFLAGS="-O3 -qansialias -w" echo "*******************************************************" echo "* You seem to have AIX and the IBM compiler. It is *" echo "* recommended for best performance that you use: *" echo "* *" echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *" echo "* ^^^ ^^^ *" echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *" echo "* CPU you have. (Set the CFLAGS environment var. *" echo "* and re-run configure.) For more info, man cc. *" echo "*******************************************************" fi fi;; esac # use default flags for gcc on all systems if test $ac_cv_c_compiler_gnu = yes; then CFLAGS="-O3 -fomit-frame-pointer" fi # the egcs scheduler is too smart and destroys our own schedule. # Disable the first instruction scheduling pass. The second # scheduling pass (after register reload) is ok. if test "$acx_prog_egcs" = yes; then CFLAGS="$CFLAGS -fno-schedule-insns -fschedule-insns2" fi # test for gcc-specific flags: if test $ac_cv_c_compiler_gnu = yes; then # -malign-double for x86 systems echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6 if test "${ac_align_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then ac_align_double=yes else ac_align_double=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_align_double" >&5 echo "${ECHO_T}$ac_align_double" >&6 if test "$ac_align_double" = yes; then : CFLAGS="$CFLAGS -malign-double" else : fi # -fstrict-aliasing for gcc-2.95+ echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6 if test "${ac_fstrict_aliasing+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then ac_fstrict_aliasing=yes else ac_fstrict_aliasing=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 echo "${ECHO_T}$ac_fstrict_aliasing" >&6 if test "$ac_fstrict_aliasing" = yes; then : CFLAGS="$CFLAGS -fstrict-aliasing" else : fi fi CPU_FLAGS="" if test "$GCC" = "yes"; then case "${host_cpu}" in i586*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6 if test "${ac_cpu_pentium+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then ac_cpu_pentium=yes else ac_cpu_pentium=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 echo "${ECHO_T}$ac_cpu_pentium" >&6 if test "$ac_cpu_pentium" = yes; then : CPU_FLAGS=-mcpu=pentium else : echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6 if test "${ac_pentium+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then ac_pentium=yes else ac_pentium=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_pentium" >&5 echo "${ECHO_T}$ac_pentium" >&6 if test "$ac_pentium" = yes; then : CPU_FLAGS=-mpentium else : fi fi ;; i686*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6 if test "${ac_cpu_pentiumpro+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then ac_cpu_pentiumpro=yes else ac_cpu_pentiumpro=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 echo "${ECHO_T}$ac_cpu_pentiumpro" >&6 if test "$ac_cpu_pentiumpro" = yes; then : CPU_FLAGS=-mcpu=pentiumpro else : echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6 if test "${ac_pentiumpro+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then ac_pentiumpro=yes else ac_pentiumpro=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 echo "${ECHO_T}$ac_pentiumpro" >&6 if test "$ac_pentiumpro" = yes; then : CPU_FLAGS=-mpentiumpro else : fi fi ;; alphaev4-*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=ev4" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=ev4... $ECHO_C" >&6 if test "${ac_cpu_ev4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=ev4 -c conftest.c 2>&1`"; then ac_cpu_ev4=yes else ac_cpu_ev4=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_ev4" >&5 echo "${ECHO_T}$ac_cpu_ev4" >&6 if test "$ac_cpu_ev4" = yes; then : CPU_FLAGS=-mcpu=ev4 else : fi ;; alphaev56-*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=ev56" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=ev56... $ECHO_C" >&6 if test "${ac_cpu_ev56+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=ev56 -c conftest.c 2>&1`"; then ac_cpu_ev56=yes else ac_cpu_ev56=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_ev56" >&5 echo "${ECHO_T}$ac_cpu_ev56" >&6 if test "$ac_cpu_ev56" = yes; then : CPU_FLAGS=-mcpu=ev56 else : fi ;; alphaev5-*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=ev5" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=ev5... $ECHO_C" >&6 if test "${ac_cpu_ev5+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=ev5 -c conftest.c 2>&1`"; then ac_cpu_ev5=yes else ac_cpu_ev5=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_ev5" >&5 echo "${ECHO_T}$ac_cpu_ev5" >&6 if test "$ac_cpu_ev5" = yes; then : CPU_FLAGS=-mcpu=ev5 else : fi ;; alphaev6-*) echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=ev6" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=ev6... $ECHO_C" >&6 if test "${ac_cpu_ev6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=ev6 -c conftest.c 2>&1`"; then ac_cpu_ev6=yes else ac_cpu_ev6=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cpu_ev6" >&5 echo "${ECHO_T}$ac_cpu_ev6" >&6 if test "$ac_cpu_ev6" = yes; then : CPU_FLAGS=-mcpu=ev6 else : fi ;; powerpc*) cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` is60x=`echo $cputype | egrep "^600-9e?$"` if test -n "$is60x"; then echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6 if test "${ac_m_cpu_60x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then ac_m_cpu_60x=yes else ac_m_cpu_60x=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 echo "${ECHO_T}$ac_m_cpu_60x" >&6 if test "$ac_m_cpu_60x" = yes; then : CPU_FLAGS=-mcpu=$cputype else : fi elif test "$cputype" = 750; then echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5 echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6 if test "${ac_cv_prog_gcc_2_95+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.c < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) yes; # endif #endif EOF if { ac_try='${CC-cc} -E conftest.c' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc_2_95=yes else ac_cv_prog_gcc_2_95=no fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5 echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6 if test "$ac_cv_prog_gcc_2_95" = yes; then : echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6 if test "${ac_m_cpu_750+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then ac_m_cpu_750=yes else ac_m_cpu_750=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 echo "${ECHO_T}$ac_m_cpu_750" >&6 if test "$ac_m_cpu_750" = yes; then : CPU_FLAGS=-mcpu=750 else : fi else : fi fi if test -z "$CPU_FLAGS"; then echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6 if test "${ac_m_cpu_powerpc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then ac_m_cpu_powerpc=yes else ac_m_cpu_powerpc=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 echo "${ECHO_T}$ac_m_cpu_powerpc" >&6 if test "$ac_m_cpu_powerpc" = yes; then : CPU_FLAGS=-mcpu=powerpc else : fi fi if test -z "$CPU_FLAGS"; then echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6 if test "${ac_m_powerpc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then ac_m_powerpc=yes else ac_m_powerpc=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 echo "${ECHO_T}$ac_m_powerpc" >&6 if test "$ac_m_powerpc" = yes; then : CPU_FLAGS=-mpowerpc else : fi fi esac fi if test -n "$CPU_FLAGS"; then CFLAGS="$CFLAGS $CPU_FLAGS" fi if test -z "$CFLAGS"; then echo "" echo "********************************************************" echo "* WARNING: Don't know the best CFLAGS for this system *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" echo "********************************************************" echo "" CFLAGS="-O3" fi echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6 if test "${ac_guessed_cflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then ac_guessed_cflags=yes else ac_guessed_cflags=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5 echo "${ECHO_T}$ac_guessed_cflags" >&6 if test "$ac_guessed_cflags" = yes; then : else : echo "" echo "********************************************************" echo "* WARNING: The guessed CFLAGS don't seem to work with *" echo "* your compiler. *" echo "* Use make CFLAGS=..., or edit the top level Makefile *" echo "********************************************************" echo "" CFLAGS="" fi fi acx_gcc_aligns_stack=no if test "$GCC" = "yes"; then echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpreferred-stack-boundary=4" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mpreferred-stack-boundary=4... $ECHO_C" >&6 if test "${ac_m_pref_stack_boundary_4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mpreferred-stack-boundary=4 -c conftest.c 2>&1`"; then ac_m_pref_stack_boundary_4=yes else ac_m_pref_stack_boundary_4=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_pref_stack_boundary_4" >&5 echo "${ECHO_T}$ac_m_pref_stack_boundary_4" >&6 if test "$ac_m_pref_stack_boundary_4" = yes; then : else : fi if test "$ac_m_pref_stack_boundary_4" = "yes"; then echo "$as_me:$LINENO: checking whether the stack is correctly aligned by gcc" >&5 echo $ECHO_N "checking whether the stack is correctly aligned by gcc... $ECHO_C" >&6 save_CFLAGS="$CFLAGS" CFLAGS="-O -malign-double" if test "$cross_compiling" = yes; then acx_gcc_stack_align_bug=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include # include struct yuck { int blechh; }; int one(void) { return 1; } struct yuck ick(void) { struct yuck y; y.blechh = 3; return y; } # define CHK_ALIGN(x) if ((((long) &(x)) & 0x7)) { fprintf(stderr, "bad alignment of " #x "\n"); exit(1); } void blah(int foo) { double foobar; CHK_ALIGN(foobar); } int main(void) { double ok1; struct yuck y; double ok2; CHK_ALIGN(ok1); CHK_ALIGN(ok2); y = ick(); blah(one()); return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_gcc_aligns_stack=yes; acx_gcc_stack_align_bug=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) acx_gcc_stack_align_bug=yes fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $acx_gcc_aligns_stack" >&5 echo "${ECHO_T}$acx_gcc_aligns_stack" >&6 fi fi if test "$acx_gcc_aligns_stack" = yes; then : cat >>confdefs.h <<\_ACEOF #define FFTW_GCC_ALIGNS_STACK 1 _ACEOF else : if test "$enable_i386_hacks" = yes; then if test "${acx_gcc_stack_align_bug-no}" = yes; then # we are using a gcc with a stack alignment bug, and we should # turn stack alignment off so that our own hacks work instead. echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpreferred-stack-boundary=2" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts -mpreferred-stack-boundary=2... $ECHO_C" >&6 if test "${ac_m_psb_2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -mpreferred-stack-boundary=2 -c conftest.c 2>&1`"; then ac_m_psb_2=yes else ac_m_psb_2=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_m_psb_2" >&5 echo "${ECHO_T}$ac_m_psb_2" >&6 if test "$ac_m_psb_2" = yes; then : CFLAGS="$CFLAGS -mpreferred-stack-boundary=2" else : { { echo "$as_me:$LINENO: error: can't disable buggy stack alignment" >&5 echo "$as_me: error: can't disable buggy stack alignment" >&2;} { (exit 1); exit 1; }; } fi fi fi fi if test "${enable_debug}" = "yes"; then CFLAGS="-g" fi if test "$enable_debug" = yes || test "$USE_MAINTAINER_MODE" = yes; then if test $ac_cv_c_compiler_gnu = yes; then CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs" # -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations fi fi echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_sqrt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char sqrt (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { sqrt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_sqrt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_sqrt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6 if test $ac_cv_lib_m_sqrt = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in sys/time.h unistd.h getopt.h malloc.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi if test $ac_cv_c_const = no; then echo "**************************************************************" echo "* WARNING: The "'``'"const'' keyword does not appear to work *" echo "* properly on this system. Expect problems. *" echo "* (It's >= 1998. Get an ANSI C compiler.) *" case "${host_cpu}-${host_os}" in sparc-solaris2*) echo "* Maybe you are using the wrong C compiler. Please see the *" echo "* FFTW FAQ for more information. *" ;; esac echo "**************************************************************" fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { char *p = (char *) alloca (2 * sizeof (int)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { char *p = (char *) alloca (1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in gettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in BSDgettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in gethrtime do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getopt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getopt_long do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for isnan" >&5 echo $ECHO_N "checking for isnan... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if (!isnan(3.14159)) isnan(2.7183); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNAN 1 _ACEOF fi echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6 # Check for hrtime_t data type; some systems (AIX) seem to have # a function called gethrtime but no hrtime_t! echo "$as_me:$LINENO: checking for hrtime_t" >&5 echo $ECHO_N "checking for hrtime_t... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef HAVE_SYS_TIME_H #include #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { hrtime_t foobar; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ok" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_HRTIME_T 1 _ACEOF fi echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6 echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { if ((long long *) 0) return 0; if (sizeof (long long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 echo "$as_me:$LINENO: checking size of long long" >&5 echo $ECHO_N "checking size of long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long long)); } unsigned long ulongval () { return (long) (sizeof (long long)); } #include #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF # Check whether --enable-unsafe-mulmod or --disable-unsafe-mulmod was given. if test "${enable_unsafe_mulmod+set}" = set; then enableval="$enable_unsafe_mulmod" enable_unsafe_mulmod=$enableval else enable_unsafe_mulmod=no fi; if test "$enable_unsafe_mulmod" = "yes"; then cat >>confdefs.h <<\_ACEOF #define FFTW_ENABLE_UNSAFE_MULMOD 1 _ACEOF fi echo "$as_me:$LINENO: checking whether ${CC-cc} accepts \"-fkeep-programmers-inline\"" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts \"-fkeep-programmers-inline\"... $ECHO_C" >&6 if test "${ac_fkeep_programmers_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} "-fkeep-programmers-inline" -c conftest.c 2>&1`"; then ac_fkeep_programmers_inline=yes else ac_fkeep_programmers_inline=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_fkeep_programmers_inline" >&5 echo "${ECHO_T}$ac_fkeep_programmers_inline" >&6 if test "$ac_fkeep_programmers_inline" = yes; then : else : fi echo "$as_me:$LINENO: checking whether ${CC-cc} accepts \"-vomit-frame-pointer\"" >&5 echo $ECHO_N "checking whether ${CC-cc} accepts \"-vomit-frame-pointer\"... $ECHO_C" >&6 if test "${ac_vomit_frame_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} "-vomit-frame-pointer" -c conftest.c 2>&1`"; then ac_vomit_frame_pointer=yes else ac_vomit_frame_pointer=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_vomit_frame_pointer" >&5 echo "${ECHO_T}$ac_vomit_frame_pointer" >&6 if test "$ac_vomit_frame_pointer" = yes; then : else : fi FFTW_THREADS_LIBLIST="" FFTW_THREADS_INCLUDELIST="" FFTW_THREADS_PROGLIST="" THREADLIBS="" if test "$enable_threads" = "yes"; then if test "$with_openmp"x != nox; then echo "$as_me:$LINENO: checking how to enable OpenMP" >&5 echo $ECHO_N "checking how to enable OpenMP... $ECHO_C" >&6 omp_enabler=unknown save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS -omp" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char omp_set_num_threads (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { omp_set_num_threads (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then THREADLIBS=" " omp_enabler="$CC -omp" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS -mp" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char omp_set_num_threads (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { omp_set_num_threads (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then THREADLIBS=" " omp_enabler="$CC -mp" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char omp_set_num_threads (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { omp_set_num_threads (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then THREADLIBS=" " omp_enabler="automatic" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $omp_enabler" >&5 echo "${ECHO_T}$omp_enabler" >&6 if test -z "$THREADLIBS"; then { { echo "$as_me:$LINENO: error: don't know how to enable OpenMP" >&5 echo "$as_me: error: don't know how to enable OpenMP" >&2;} { (exit 1); exit 1; }; } fi cat >>confdefs.h <<\_ACEOF #define FFTW_USING_OPENMP_THREADS 1 _ACEOF fi if test "$with_sgimp"x != nox; then echo "$as_me:$LINENO: checking how to enable SGI MP" >&5 echo $ECHO_N "checking how to enable SGI MP... $ECHO_C" >&6 mp_enabler=unknown save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS -mp" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mp_set_numthreads (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { mp_set_numthreads (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then THREADLIBS=" " mp_enabler="$CC -mp" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mp_numthreads (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { mp_numthreads (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then THREADLIBS=" " mp_enabler="automatic" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $mp_enabler" >&5 echo "${ECHO_T}$mp_enabler" >&6 if test -z "$THREADLIBS"; then { { echo "$as_me:$LINENO: error: don't know how to enable SGI MP" >&5 echo "$as_me: error: don't know how to enable SGI MP" >&2;} { (exit 1); exit 1; }; } fi cat >>confdefs.h <<\_ACEOF #define FFTW_USING_SGIMP_THREADS 1 _ACEOF fi # POSIX threads, the default choice: if test -z "$THREADLIBS"; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_join (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { pthread_join (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6 ;; -*) echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6 PTHREAD_CFLAGS="$flag" ;; *) echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6 PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then acx_pthread_ok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5 echo "${ECHO_T}$acx_pthread_ok" >&6 if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_JOINABLE else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { int attr=PTHREAD_CREATE_UNDETACHED; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ok=PTHREAD_CREATE_UNDETACHED else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=unknown fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<\_ACEOF #define PTHREAD_CREATE_JOINABLE $ok _ACEOF fi echo "$as_me:$LINENO: result: ${ok}" >&5 echo "${ECHO_T}${ok}" >&6 if test x"$ok" = xunknown; then { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6 flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac echo "$as_me:$LINENO: result: ${flag}" >&5 echo "${ECHO_T}${flag}" >&6 if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="cc_r" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5 echo "${ECHO_T}$PTHREAD_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then THREADLIBS="$PTHREAD_LIBS " CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" cat >>confdefs.h <<\_ACEOF #define FFTW_USING_POSIX_THREADS 1 _ACEOF : else acx_pthread_ok=no fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Solaris threads: if test -z "$THREADLIBS"; then echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 if test "${ac_cv_lib_thread_thr_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char thr_create (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { thr_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_thread_thr_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_thread_thr_create=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6 if test $ac_cv_lib_thread_thr_create = yes; then THREADLIBS="-lthread" cat >>confdefs.h <<\_ACEOF #define FFTW_USING_SOLARIS_THREADS 1 _ACEOF fi fi # Mach C threads: if test -z "$THREADLIBS"; then echo "$as_me:$LINENO: checking for cthread_fork" >&5 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6 if test "${ac_cv_func_cthread_fork+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define cthread_fork to an innocuous variant, in case declares cthread_fork. For example, HP-UX 11i declares gettimeofday. */ #define cthread_fork innocuous_cthread_fork /* System header to define __stub macros and hopefully few prototypes, which can conflict with char cthread_fork (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef cthread_fork /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char cthread_fork (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork) choke me #else char (*f) () = cthread_fork; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != cthread_fork; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_cthread_fork=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_cthread_fork=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6 if test $ac_cv_func_cthread_fork = yes; then THREADLIBS=" " cat >>confdefs.h <<\_ACEOF #define FFTW_USING_MACH_THREADS 1 _ACEOF fi for ac_header in mach/cthreads.h cthreads.h cthread.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test -z "$THREADLIBS"; then echo "$as_me:$LINENO: checking for cthread_fork in -lcthread" >&5 echo $ECHO_N "checking for cthread_fork in -lcthread... $ECHO_C" >&6 if test "${ac_cv_lib_cthread_cthread_fork+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcthread $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char cthread_fork (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { cthread_fork (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cthread_cthread_fork=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cthread_cthread_fork=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cthread_cthread_fork" >&5 echo "${ECHO_T}$ac_cv_lib_cthread_cthread_fork" >&6 if test $ac_cv_lib_cthread_cthread_fork = yes; then THREADLIBS="-lcthread" cat >>confdefs.h <<\_ACEOF #define FFTW_USING_MACH_THREADS 1 _ACEOF fi for ac_header in mach/cthreads.h cthreads.h cthread.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi if test -z "$THREADLIBS"; then echo "$as_me:$LINENO: checking for cthread_fork in -lcthreads" >&5 echo $ECHO_N "checking for cthread_fork in -lcthreads... $ECHO_C" >&6 if test "${ac_cv_lib_cthreads_cthread_fork+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcthreads $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char cthread_fork (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { cthread_fork (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cthreads_cthread_fork=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cthreads_cthread_fork=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cthreads_cthread_fork" >&5 echo "${ECHO_T}$ac_cv_lib_cthreads_cthread_fork" >&6 if test $ac_cv_lib_cthreads_cthread_fork = yes; then THREADLIBS="-lcthreads" cat >>confdefs.h <<\_ACEOF #define FFTW_USING_MACH_THREADS 1 _ACEOF fi for ac_header in mach/cthreads.h cthreads.h cthread.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi # BeOS threads: if test -z "$THREADLIBS"; then echo "$as_me:$LINENO: checking for spawn_thread" >&5 echo $ECHO_N "checking for spawn_thread... $ECHO_C" >&6 if test "${ac_cv_func_spawn_thread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define spawn_thread to an innocuous variant, in case declares spawn_thread. For example, HP-UX 11i declares gettimeofday. */ #define spawn_thread innocuous_spawn_thread /* System header to define __stub macros and hopefully few prototypes, which can conflict with char spawn_thread (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef spawn_thread /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char spawn_thread (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_spawn_thread) || defined (__stub___spawn_thread) choke me #else char (*f) () = spawn_thread; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != spawn_thread; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_spawn_thread=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_spawn_thread=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_spawn_thread" >&5 echo "${ECHO_T}$ac_cv_func_spawn_thread" >&6 if test $ac_cv_func_spawn_thread = yes; then THREADLIBS=" " cat >>confdefs.h <<\_ACEOF #define FFTW_USING_BEOS_THREADS 1 _ACEOF fi fi if test -z "$THREADLIBS"; then { { echo "$as_me:$LINENO: error: couldn't find threads library for --enable-threads" >&5 echo "$as_me: error: couldn't find threads library for --enable-threads" >&2;} { (exit 1); exit 1; }; } else FFTW_THREADS_LIBLIST="lib${FFTW_PREFIX}fftw_threads.la lib${FFTW_PREFIX}rfftw_threads.la" FFTW_THREADS_INCLUDELIST="${FFTW_PREFIX}fftw_threads.h ${FFTW_PREFIX}rfftw_threads.h" FFTW_THREADS_PROGLIST="fftw_threads_test rfftw_threads_test" fi fi FFTW_MPI_LIBLIST="" FFTW_MPI_INCLUDELIST="" FFTW_MPI_PROGLIST="" if test "$enable_mpi" = "yes"; then for ac_prog in mpicc hcc mpcc mpcc_r mpxlc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_MPICC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then echo "$as_me:$LINENO: result: $MPICC" >&5 echo "${ECHO_T}$MPICC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$MPICC" && break done test -n "$MPICC" || MPICC="$CC" acx_mpi_save_CC="$CC" CC="$MPICC" if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init" >&5 echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6 if test "${ac_cv_func_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define MPI_Init to an innocuous variant, in case declares MPI_Init. For example, HP-UX 11i declares gettimeofday. */ #define MPI_Init innocuous_MPI_Init /* System header to define __stub macros and hopefully few prototypes, which can conflict with char MPI_Init (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef MPI_Init /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char MPI_Init (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_MPI_Init) || defined (__stub___MPI_Init) choke me #else char (*f) () = MPI_Init; #endif #ifdef __cplusplus } #endif #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { return f != MPI_Init; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6 if test $ac_cv_func_MPI_Init = yes; then MPILIBS=" " fi fi if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char MPI_Init (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mpi_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6 if test $ac_cv_lib_mpi_MPI_Init = yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char MPI_Init (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { MPI_Init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mpich_MPI_Init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6 if test $ac_cv_lib_mpich_MPI_Init = yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then echo "$as_me:$LINENO: checking for mpi.h" >&5 echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest.$ac_ext fi CC="$acx_mpi_save_CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then { { echo "$as_me:$LINENO: error: couldn't find mpi library for --enable-mpi" >&5 echo "$as_me: error: couldn't find mpi library for --enable-mpi" >&2;} { (exit 1); exit 1; }; } : else cat >>confdefs.h <<\_ACEOF #define HAVE_MPI 1 _ACEOF : fi FFTW_MPI_LIBLIST="lib${FFTW_PREFIX}fftw_mpi.la lib${FFTW_PREFIX}rfftw_mpi.la" FFTW_MPI_INCLUDELIST="${FFTW_PREFIX}fftw_mpi.h ${FFTW_PREFIX}rfftw_mpi.h" FFTW_MPI_PROGLIST="test_sched test_transpose_mpi fftw_mpi_test rfftw_mpi_test" echo "$as_me:$LINENO: checking for MPI_Comm_f2c" >&5 echo $ECHO_N "checking for MPI_Comm_f2c... $ECHO_C" >&6 save_CC="$CC" CC="$MPICC" ok=yes cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { MPI_Comm_f2c(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_MPI_COMM_F2C 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ok=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $ok" >&5 echo "${ECHO_T}$ok" >&6 CC="$save_CC" else MPICC="$CC" fi ac_config_files="$ac_config_files fftw/Makefile tests/Makefile rfftw/Makefile doc/Makefile Makefile threads/Makefile mpi/Makefile fftw.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "fftw/Makefile" ) CONFIG_FILES="$CONFIG_FILES fftw/Makefile" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "rfftw/Makefile" ) CONFIG_FILES="$CONFIG_FILES rfftw/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES threads/Makefile" ;; "mpi/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi/Makefile" ;; "fftw.spec" ) CONFIG_FILES="$CONFIG_FILES fftw.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "fftw/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS fftw/config.h" ;; "fftw/fftw.h" ) CONFIG_HEADERS="$CONFIG_HEADERS fftw/fftw.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@FFTW_PREFIX@,$FFTW_PREFIX,;t t s,@FFTW_PREFIX1@,$FFTW_PREFIX1,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@LN_S@,$LN_S,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@ECHO@,$ECHO,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@PERL@,$PERL,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@FLIBS@,$FLIBS,;t t s,@SHARED_VERSION_INFO@,$SHARED_VERSION_INFO,;t t s,@SHARED_VERSION@,$SHARED_VERSION,;t t s,@ALLOCA@,$ALLOCA,;t t s,@PTHREAD_CC@,$PTHREAD_CC,;t t s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t s,@FFTW_THREADS_LIBLIST@,$FFTW_THREADS_LIBLIST,;t t s,@FFTW_THREADS_INCLUDELIST@,$FFTW_THREADS_INCLUDELIST,;t t s,@FFTW_THREADS_PROGLIST@,$FFTW_THREADS_PROGLIST,;t t s,@THREADLIBS@,$THREADLIBS,;t t s,@MPICC@,$MPICC,;t t s,@MPILIBS@,$MPILIBS,;t t s,@FFTW_MPI_LIBLIST@,$FFTW_MPI_LIBLIST,;t t s,@FFTW_MPI_INCLUDELIST@,$FFTW_MPI_INCLUDELIST,;t t s,@FFTW_MPI_PROGLIST@,$FFTW_MPI_PROGLIST,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi case "${host_cpu}" in i?86) if test "${enable_i386_hacks-no}" != "yes"; then if test "${enable_float-no}" != "yes"; then if test "${acx_gcc_aligns_stack-no}" != "yes"; then echo "**************************************************************" echo "* If you are running an x86 system with gcc, also try *" echo "* configure --enable-i386-hacks *" echo "* which might produce significant speed improvements. *" echo "* (See the Installation chapter of the manual for more *" echo "* details) *" echo "**************************************************************" fi fi fi esac ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/configure.in�����������������������������������������������������������������������������0000644�0001754�0000144�00000030167�07637526471�010507� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl Process this file with autoconf to produce a configure script. AC_INIT(fftw/planner.c) AM_INIT_AUTOMAKE(fftw, 2.1.5) dnl This is the version info according to the libtool versioning system. dnl It does *not* correspond to the release number. SHARED_VERSION_INFO="2:7:0" AM_CONFIG_HEADER(fftw/config.h fftw/fftw.h) AM_ENABLE_SHARED(no) dnl ----------------------------------------------------------------------- AC_ARG_ENABLE(threads, [ --enable-threads compile FFTW SMP threads library], enable_threads=$enableval, enable_threads=no) AC_ARG_WITH(openmp, [ --with-openmp use OpenMP directives instead of a threads library], with_openmp=$withval, with_openmp=no) AC_ARG_WITH(sgimp, [ --with-sgi-mp use SGI MP directives instead of a threads library], with_sgimp=$withval, with_sgimp=no) AC_ARG_ENABLE(mpi, [ --enable-mpi compile FFTW MPI library], enable_mpi=$enableval, enable_mpi=no) AC_ARG_ENABLE(fortran, [ --disable-fortran don't include fortran-callable wrappers], enable_fortran=$enableval, enable_fortran=yes) AC_ARG_WITH(gcc, [ --with-gcc use gcc instead of the native compiler cc], ok=$withval, ok=no) if test "$ok" = "yes"; then CC=gcc fi AC_ARG_ENABLE(float, [ --enable-float compile fftw for single precision], enable_float=$enableval, enable_float=no) if test "$enable_float" = "yes"; then AC_DEFINE(FFTW_ENABLE_FLOAT) fi FFTW_PREFIX="" AC_ARG_ENABLE(type-prefix, [ --enable-type-prefix prefix files with d/s to indicate precision], ok=$enableval, ok=no) AC_MSG_CHECKING([type prefix for installed files]) if test "$ok" = "yes"; then if test "$enable_float" = "yes"; then FFTW_PREFIX="s" else FFTW_PREFIX="d" fi AC_MSG_RESULT($FFTW_PREFIX) elif test "$ok" = "no"; then AC_MSG_RESULT([(none)]) else FFTW_PREFIX="$ok" AC_MSG_RESULT($FFTW_PREFIX) fi AC_SUBST(FFTW_PREFIX) FFTW_PREFIX1="xyz" if test -n "$FFTW_PREFIX"; then FFTW_PREFIX1="$FFTW_PREFIX" fi AC_SUBST(FFTW_PREFIX1) AC_ARG_ENABLE(i386-hacks, [ --enable-i386-hacks enable gcc/x86 specific performance hacks], ok=$enableval, ok=no) if test "$ok" = "yes"; then AC_DEFINE(FFTW_ENABLE_I386_HACKS) fi AC_ARG_ENABLE(pentium-timer, [ --enable-pentium-timer enable high resolution Pentium timer], ok=$enableval, ok=no) if test "$ok" = "yes"; then AC_DEFINE(FFTW_ENABLE_PENTIUM_TIMER) fi AC_ARG_ENABLE(debug, [ --enable-debug compile fftw with extra runtime checks for debugging], ok=$enableval, ok=no) if test "$ok" = "yes"; then AC_DEFINE(FFTW_DEBUG) fi AC_ARG_ENABLE(debug-alignment, [ --enable-debug-alignment enable runtime checks for alignment on x86], ok=$enableval, ok=no) if test "$ok" = "yes"; then AC_DEFINE(FFTW_DEBUG_ALIGNMENT) fi AC_ARG_ENABLE(vec-recurse, [ --enable-vec-recurse enable experimental performance hack], ok=$enableval, ok=no) if test "$ok" = "yes"; then AC_DEFINE(FFTW_ENABLE_VECTOR_RECURSE) fi dnl ----------------------------------------------------------------------- # Use native cc if present AC_MSG_CHECKING([for vendor's cc to be used instead of gcc]) AC_CHECK_PROG(CC, cc, cc) dnl Checks for programs. AC_PROG_CC ACX_PROG_CC_EGCS AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_LN_S AM_PROG_LIBTOOL AC_CHECK_PROG(PERL, perl, perl, echo perl) AC_SUBST(PERL) dnl ----------------------------------------------------------------------- if test "$enable_fortran" = "yes"; then AC_PROG_F77 if test -z "$F77"; then enable_fortran=no AC_MSG_WARN([*** Couldn't find f77 compiler; switching to --disable-fortran.]) fi AC_F77_DUMMY_MAIN([], [enable_fortran=no AC_MSG_WARN([*** Couldn't figure out how to link C and Fortran; switching to --disable-fortran.])]) fi if test "x$enable_fortran" = xyes; then AC_F77_WRAPPERS fi dnl ----------------------------------------------------------------------- AC_SUBST(SHARED_VERSION_INFO) AC_DEFINE_UNQUOTED(FFTW_VERSION, "$VERSION") # Get the version number that will be appended to shared libraries: SHARED_VERSION=`echo $SHARED_VERSION_INFO | awk -F':' '{ print $1 "." $3 "." $2 }'` AC_SUBST(SHARED_VERSION) ACX_PROG_CC_MAXOPT ACX_GCC_ALIGNS_STACK(AC_DEFINE(FFTW_GCC_ALIGNS_STACK), [ if test "$enable_i386_hacks" = yes; then if test "${acx_gcc_stack_align_bug-no}" = yes; then # we are using a gcc with a stack alignment bug, and we should # turn stack alignment off so that our own hacks work instead. ACX_CHECK_CC_FLAGS(-mpreferred-stack-boundary=2, m_psb_2, [CFLAGS="$CFLAGS -mpreferred-stack-boundary=2"], AC_MSG_ERROR([can't disable buggy stack alignment])) fi fi]) if test "${enable_debug}" = "yes"; then CFLAGS="-g" fi dnl add gcc warnings, in debug/maintainer mode only if test "$enable_debug" = yes || test "$USE_MAINTAINER_MODE" = yes; then if test $ac_cv_prog_gcc = yes; then CFLAGS="$CFLAGS -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -Wshadow -Wbad-function-cast -Wwrite-strings -Wstrict-prototypes -Wredundant-decls -Wnested-externs" # -Wundef -Wconversion -Wmissing-prototypes -Wmissing-declarations fi fi dnl Checks for libraries. AC_CHECK_LIB(m, sqrt) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/time.h unistd.h getopt.h malloc.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME if test $ac_cv_c_const = no; then echo "**************************************************************" echo "* WARNING: The "'``'"const'' keyword does not appear to work *" echo "* properly on this system. Expect problems. *" echo "* (It's >= 1998. Get an ANSI C compiler.) *" case "${host_cpu}-${host_os}" in sparc-solaris2*) echo "* Maybe you are using the wrong C compiler. Please see the *" echo "* FFTW FAQ for more information. *" ;; esac echo "**************************************************************" fi dnl Checks for library functions. AC_FUNC_ALLOCA AC_CHECK_FUNCS(gettimeofday) AC_CHECK_FUNCS(BSDgettimeofday) AC_CHECK_FUNCS(gethrtime) AC_CHECK_FUNCS(getopt) AC_CHECK_FUNCS(getopt_long) AC_MSG_CHECKING([for isnan]) AC_TRY_LINK([#include ], if (!isnan(3.14159)) isnan(2.7183);, ok=yes, ok=no) if test "$ok" = "yes"; then AC_DEFINE(HAVE_ISNAN) fi AC_MSG_RESULT(${ok}) # Check for hrtime_t data type; some systems (AIX) seem to have # a function called gethrtime but no hrtime_t! AC_MSG_CHECKING([for hrtime_t]) AC_TRY_LINK([ #ifdef HAVE_SYS_TIME_H #include #endif ], [hrtime_t foobar;], ok=yes, ok=no) if test "$ok" = "yes"; then AC_DEFINE(HAVE_HRTIME_T) fi AC_MSG_RESULT(${ok}) AC_CHECK_SIZEOF(int, 0) AC_CHECK_SIZEOF(long long, 0) AC_ARG_ENABLE(unsafe-mulmod, [ --enable-unsafe-mulmod risk overflow for large prime sizes], enable_unsafe_mulmod=$enableval, enable_unsafe_mulmod=no) if test "$enable_unsafe_mulmod" = "yes"; then AC_DEFINE(FFTW_ENABLE_UNSAFE_MULMOD) fi dnl make a couple of jokes for user's amusement. See gcc/future.options in dnl egcs distribution ACX_CHECK_CC_FLAGS("-fkeep-programmers-inline",fkeep_programmers_inline) ACX_CHECK_CC_FLAGS("-vomit-frame-pointer",vomit_frame_pointer) dnl ----------------------------------------------------------------------- dnl Check for threads library... FFTW_THREADS_LIBLIST="" FFTW_THREADS_INCLUDELIST="" FFTW_THREADS_PROGLIST="" THREADLIBS="" if test "$enable_threads" = "yes"; then if test "$with_openmp"x != nox; then AC_MSG_CHECKING(how to enable OpenMP) omp_enabler=unknown save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS -omp" AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " omp_enabler="$CC -omp") if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS -mp" AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " omp_enabler="$CC -mp") fi if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS" AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " omp_enabler="automatic") fi AC_MSG_RESULT($omp_enabler) if test -z "$THREADLIBS"; then AC_MSG_ERROR([don't know how to enable OpenMP]) fi AC_DEFINE(FFTW_USING_OPENMP_THREADS) fi if test "$with_sgimp"x != nox; then AC_MSG_CHECKING(how to enable SGI MP) mp_enabler=unknown save_CFLAGS="$CFLAGS" CFLAGS="$save_CFLAGS -mp" AC_TRY_LINK_FUNC(mp_set_numthreads,THREADLIBS=" " mp_enabler="$CC -mp") if test -z "$THREADLIBS"; then CFLAGS="$save_CFLAGS" AC_TRY_LINK_FUNC(mp_numthreads,THREADLIBS=" " mp_enabler="automatic") fi AC_MSG_RESULT($mp_enabler) if test -z "$THREADLIBS"; then AC_MSG_ERROR([don't know how to enable SGI MP]) fi AC_DEFINE(FFTW_USING_SGIMP_THREADS) fi # POSIX threads, the default choice: if test -z "$THREADLIBS"; then sinclude(acx_pthread.m4) ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS " CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" AC_DEFINE(FFTW_USING_POSIX_THREADS)]) fi # Solaris threads: if test -z "$THREADLIBS"; then AC_CHECK_LIB(thread, thr_create, [THREADLIBS="-lthread" AC_DEFINE(FFTW_USING_SOLARIS_THREADS)]) fi # Mach C threads: if test -z "$THREADLIBS"; then AC_CHECK_FUNC(cthread_fork, [THREADLIBS=" " AC_DEFINE(FFTW_USING_MACH_THREADS)]) AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) fi if test -z "$THREADLIBS"; then AC_CHECK_LIB(cthread, cthread_fork, [THREADLIBS="-lcthread" AC_DEFINE(FFTW_USING_MACH_THREADS)]) AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) fi if test -z "$THREADLIBS"; then AC_CHECK_LIB(cthreads, cthread_fork, [THREADLIBS="-lcthreads" AC_DEFINE(FFTW_USING_MACH_THREADS)]) AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) fi # BeOS threads: if test -z "$THREADLIBS"; then AC_CHECK_FUNC(spawn_thread, [THREADLIBS=" " AC_DEFINE(FFTW_USING_BEOS_THREADS)]) fi if test -z "$THREADLIBS"; then AC_MSG_ERROR(couldn't find threads library for --enable-threads) else FFTW_THREADS_LIBLIST="lib${FFTW_PREFIX}fftw_threads.la lib${FFTW_PREFIX}rfftw_threads.la" FFTW_THREADS_INCLUDELIST="${FFTW_PREFIX}fftw_threads.h ${FFTW_PREFIX}rfftw_threads.h" FFTW_THREADS_PROGLIST="fftw_threads_test rfftw_threads_test" fi fi AC_SUBST(FFTW_THREADS_LIBLIST) AC_SUBST(FFTW_THREADS_INCLUDELIST) AC_SUBST(FFTW_THREADS_PROGLIST) AC_SUBST(THREADLIBS) dnl ----------------------------------------------------------------------- dnl Check for mpi library... FFTW_MPI_LIBLIST="" FFTW_MPI_INCLUDELIST="" FFTW_MPI_PROGLIST="" sinclude(acx_mpi.m4) if test "$enable_mpi" = "yes"; then ACX_MPI([], [AC_MSG_ERROR([couldn't find mpi library for --enable-mpi])]) FFTW_MPI_LIBLIST="lib${FFTW_PREFIX}fftw_mpi.la lib${FFTW_PREFIX}rfftw_mpi.la" FFTW_MPI_INCLUDELIST="${FFTW_PREFIX}fftw_mpi.h ${FFTW_PREFIX}rfftw_mpi.h" FFTW_MPI_PROGLIST="test_sched test_transpose_mpi fftw_mpi_test rfftw_mpi_test" AC_MSG_CHECKING([for MPI_Comm_f2c]) save_CC="$CC" CC="$MPICC" ok=yes AC_TRY_LINK([#include ], [MPI_Comm_f2c(0);], [AC_DEFINE(HAVE_MPI_COMM_F2C)], [ok=no]) AC_MSG_RESULT($ok) CC="$save_CC" else MPICC="$CC" AC_SUBST(MPICC) fi AC_SUBST(FFTW_MPI_LIBLIST) AC_SUBST(FFTW_MPI_INCLUDELIST) AC_SUBST(FFTW_MPI_PROGLIST) dnl ----------------------------------------------------------------------- AC_OUTPUT(fftw/Makefile tests/Makefile rfftw/Makefile doc/Makefile Makefile threads/Makefile mpi/Makefile fftw.spec) case "${host_cpu}" in i?86) if test "${enable_i386_hacks-no}" != "yes"; then if test "${enable_float-no}" != "yes"; then if test "${acx_gcc_aligns_stack-no}" != "yes"; then echo "**************************************************************" echo "* If you are running an x86 system with gcc, also try *" echo "* configure --enable-i386-hacks *" echo "* which might produce significant speed improvements. *" echo "* (See the Installation chapter of the manual for more *" echo "* details) *" echo "**************************************************************" fi fi fi esac ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/depcomp����������������������������������������������������������������������������������0000755�0001754�0000144�00000027533�07541534425�007546� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw.spec.in�����������������������������������������������������������������������������0000644�0001754�0000144�00000013336�07635206026�010411� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# RPM spec file for FFTW. # This file is used to build Redhat Package Manager packages for the # FFTW library. Such packages make it easy to install and uninstall # the library and related files from binaries or source. # # This spec file is for version @VERSION@ of FFTW; the appropriate # version numbers are automatically substituted in to fftw.spec.in # by the configure script. However, fftw.spec.in may need to be # modified for future releases, if the list of installed files # or build commands change. # # The icon associated with this package can be downloaded from: # http://www.fftw.org/fftw-logo-thumb.gif # and will need to be placed in /usr/src/redhat/SOURCES, along with # the fftw-@VERSION@.tar.gz file, to build the RPM. To build, use # the command: rpm --clean -ba fftw.spec # # Alternatively, you can just use 'make rpm' (as root). # Name: fftw Summary: fast fourier transform library Version: @VERSION@ Release: 1 Copyright: GPL Icon: fftw-logo-thumb.gif Group: Libraries Prefix: /usr/local BuildRoot: /tmp/%{name}-%{version}-buildroot Source: ftp://ftp.fftw.org/pub/fftw/fftw-@VERSION@.tar.gz URL: http://www.fftw.org %description FFTW is a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, real, and parallel transforms, and can handle arbitrary array sizes efficiently. This RPM package includes both the double- and single-precision FFTW uniprocessor and threads libraries. (The single-precision files have an "s" prefix.) %package devel Summary: headers, libraries, & docs for FFTW fast fourier transform library Group: Development/Libraries Prefix: %{prefix} Requires: fftw = %{version}-%{release} %description devel This package contains the additional header files, documentation, and libraries you need to develop programs using the FFTW fast fourier transform library. %prep # We will be compiling two copies of FFTW, one for double precision and # one for single precision. During the build process, these copies # will be stored in fftw-%{version}/double and fftw-%{version}/single # Unpack the tar archive, first (-c) creating a fftw-%{version} # directory and then unpacking in there. %setup -c # Now, rename the unpacked FFTW directory to "double": mv ${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION} double # Second, make a copy of this directory in "single": cp -r double single %build # Configure and build the double and single precision versions. # Notes: # (1) We install into ${RPM_BUILD_ROOT}, which is set either # by the BuildRoot option above or by --buildroot at build-time. # This allows you to build the RPM without blowing away your existing # FFTW installation, and even without being root. # (2) The double-precision version is installed with the normal library # names, while the single-precision version is installed with an "s" # prefix. cd double %ifarch i386 ./configure --prefix="${RPM_BUILD_ROOT}%{prefix}" --enable-shared --enable-i386-hacks --enable-threads %else ./configure --prefix="${RPM_BUILD_ROOT}%{prefix}" --enable-shared --enable-threads %endif make cd ../single ./configure --prefix="${RPM_BUILD_ROOT}%{prefix}" --enable-shared --enable-type-prefix --enable-threads --enable-float make %install cd double make install cd ../single make install %clean rm -rf ${RPM_BUILD_ROOT} %post # Force ${RPM_INSTALL_PREFIX}/lib to be in /etc/ld.so.conf? # No...that would make it impossible to completely uninstall reliably. # Instead, warn the user fix a broken /etc/ld.so.conf manually: if test -z `grep ${RPM_INSTALL_PREFIX}/lib /etc/ld.so.conf`; then echo "warning: ${RPM_INSTALL_PREFIX}/lib is not in /etc/ld.so.conf" 1>&2 echo " You should add it and then run ldconfig." 1>&2 fi # run ldconfig to update the runtime linker database with the new libraries # (make sure /sbin is in the $PATH) PATH="/sbin:$PATH" ldconfig %postun # after uninstall, run ldconfig to remove the libs from the linker database PATH="/sbin:$PATH" ldconfig %files /usr/local/lib/libfftw.so.@SHARED_VERSION@ /usr/local/lib/libfftw_threads.so.@SHARED_VERSION@ /usr/local/lib/librfftw.so.@SHARED_VERSION@ /usr/local/lib/librfftw_threads.so.@SHARED_VERSION@ /usr/local/lib/libsfftw.so.@SHARED_VERSION@ /usr/local/lib/libsfftw_threads.so.@SHARED_VERSION@ /usr/local/lib/libsrfftw.so.@SHARED_VERSION@ /usr/local/lib/libsrfftw_threads.so.@SHARED_VERSION@ /usr/local/lib/libfftw.so.2 /usr/local/lib/libfftw_threads.so.2 /usr/local/lib/librfftw.so.2 /usr/local/lib/librfftw_threads.so.2 /usr/local/lib/libsfftw.so.2 /usr/local/lib/libsfftw_threads.so.2 /usr/local/lib/libsrfftw.so.2 /usr/local/lib/libsrfftw_threads.so.2 %files devel /usr/local/include/fftw.h /usr/local/include/fftw_threads.h /usr/local/include/rfftw.h /usr/local/include/rfftw_threads.h /usr/local/include/sfftw.h /usr/local/include/sfftw_threads.h /usr/local/include/srfftw.h /usr/local/include/srfftw_threads.h /usr/local/info/fftw.info /usr/local/info/fftw.info-1 /usr/local/info/fftw.info-2 /usr/local/info/fftw.info-3 /usr/local/info/fftw.info-4 /usr/local/info/fftw.info-5 /usr/local/lib/libfftw.a /usr/local/lib/libfftw.la /usr/local/lib/libfftw.so /usr/local/lib/libfftw_threads.a /usr/local/lib/libfftw_threads.la /usr/local/lib/libfftw_threads.so /usr/local/lib/librfftw.a /usr/local/lib/librfftw.la /usr/local/lib/librfftw.so /usr/local/lib/librfftw_threads.a /usr/local/lib/librfftw_threads.la /usr/local/lib/librfftw_threads.so /usr/local/lib/libsfftw.a /usr/local/lib/libsfftw.la /usr/local/lib/libsfftw.so /usr/local/lib/libsfftw_threads.a /usr/local/lib/libsfftw_threads.la /usr/local/lib/libsfftw_threads.so /usr/local/lib/libsrfftw.a /usr/local/lib/libsrfftw.la /usr/local/lib/libsrfftw.so /usr/local/lib/libsrfftw_threads.a /usr/local/lib/libsrfftw_threads.la /usr/local/lib/libsrfftw_threads.so ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/install-sh�������������������������������������������������������������������������������0000755�0001754�0000144�00000012701�07541534425�010164� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 ���������������������������������������������������������������fftw-2.1.5/ltmain.sh��������������������������������������������������������������������������������0000644�0001754�0000144�00000426161�07606470616�010014� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" exit 0 ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --features) echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case $nonopt in *cc | *++ | gcc* | *-gcc* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= prev= lastarg= srcfile="$nonopt" suppress_output= user_target=no for arg do case $prev in "") ;; xcompiler) # Aesthetically quote the previous argument. prev= lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac # Accept any command-line options. case $arg in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi user_target=next ;; -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; -Xcompiler) prev=xcompiler continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi continue ;; esac case $user_target in next) # The next one is the -o target name user_target=yes continue ;; yes) # We got the output file user_target=set libobj="$arg" continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" # Aesthetically quote the previous argument. # Backslashify any backslashes, double quotes, and dollar signs. # These are the only characters that are still specially # interpreted inside of double-quoted scrings. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $lastarg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi done case $user_target in set) ;; no) # Get the name of the library object. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; *) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $libobj" else removelist="$libobj" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" else # Don't build PIC code command="$base_compile $srcfile" fi if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$libobj"; then dir="$objdir" else dir="$dir/$objdir" fi libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` if test -d "$dir"; then $show "$rm $libobj" $run $rm $libobj else $show "$mkdir $dir" $run $mkdir $dir status=$? if test $status -ne 0 && test ! -d $dir; then exit $status fi fi fi if test "$compiler_o_lo" = yes; then output_obj="$libobj" command="$command -o $output_obj" elif test "$compiler_c_o" = yes; then output_obj="$obj" command="$command -o $output_obj" fi $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test x"$output_obj" != x"$libobj"; then $show "$mv $output_obj $libobj" if $run $mv $output_obj $libobj; then : else error=$? $run $rm $removelist exit $error fi fi # If we have no pic_flag, then copy the object into place and finish. if (test -z "$pic_flag" || test "$pic_mode" != default) && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj $run $rm $obj fi $show "$mv $libobj $obj" if $run $mv $libobj $obj; then : else error=$? $run $rm $removelist exit $error fi xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 else error=$? $run $rm $removelist exit $error fi fi # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $srcfile" else # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $srcfile $pic_flag -DPIC" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" $run $rm "$output_obj" $show "$command" if $run eval "$command"; then : else $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed if test x"$output_obj" != x"$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Create an invalid libtool object if no PIC, so that we do not # accidentally link it into a program. if test "$build_libtool_libs" != yes; then $show "echo timestamp > $libobj" $run eval "echo timestamp > \$libobj" || exit $? else # Move the .lo from within objdir $show "$mv $libobj $lo_libobj" if $run $mv $libobj $lo_libobj; then : else error=$? $run $rm $removelist exit $error fi fi fi # Unlock the critical section if it was locked if test "$need_locks" != no; then $run $rm "$lockfile" fi exit 0 ;; # libtool link mode link | relink) modename="$modename: link" case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invokation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args="$nonopt" compile_command="$nonopt" finalize_command="$nonopt" compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= # We need to know -static, to get the right output filenames. for arg do case $arg in -all-static | -static) if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test $# -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n $prev prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | no/*-*-nonstopux*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.lo | *.$objext) # A library or standard object. if test "$prev" = dlfiles; then # This file was specified with -dlopen. if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $arg" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= else case $arg in *.lo) libobjs="$libobjs $arg" ;; *) objs="$objs $arg" ;; esac fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d $output_objdir; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit 1 ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test $linkmode = prog; then # Determine which files to process case $pass in dlopen) libs="$dlfiles" save_deplibs="$deplibs" # Collect dlpreopened libraries deplibs= ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi for deplib in $libs; do lib= found=no case $deplib in -l*) if test $linkmode = oldlib && test $linkmode = obj; then $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 continue fi if test $pass = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do # Search the libtool library lib="$searchdir/lib${name}.la" if test -f "$lib"; then found=yes break fi done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test $pass = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test $pass = conv; then deplibs="$deplib $deplibs" continue fi if test $pass = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test $pass = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test $pass = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then echo echo "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not used here." else echo echo "*** Warning: Linking the shared library $output against the" echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test $pass != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test $found = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test $linkmode = oldlib && test $linkmode = obj; }; then # Add dl[pre]opened files of deplib test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test $pass = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test $linkmode != prog && test $linkmode != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # This library was specified with -dlopen. if test $pass = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. dlprefiles="$dlprefiles $lib" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test $pass = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test $linkmode = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" fi continue fi if test $linkmode = prog && test $pass != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test $linkalldeplibs = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # Link against this shared library if test "$linkmode,$pass" = "prog,link" || { test $linkmode = lib && test $hardcode_into_libs = yes; }; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac if test $linkmode = prog; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi fi fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n $old_archive_from_expsyms_cmds if test $linkmode = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test $linkmode = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test $linkmode = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" add="-l$name" fi if test $linkmode = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test $linkmode = prog; then if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi # Try to link the static library # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo echo "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test $linkmode = lib; then if test -n "$dependency_libs" && { test $hardcode_into_libs != yes || test $build_old_libs = yes || test $link_static = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test $link_all_deplibs != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="-L$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="-L$absdir" fi ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test $pass = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test $pass != dlopen; then test $pass != scan && dependency_libs="$newdependency_libs" if test $pass != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do case $deplib in -L*) new_libs="$deplib $new_libs" ;; *) case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi if test "$pass" = "conv" && { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then libs="$deplibs" # reset libs deplibs= fi done # for pass if test $linkmode = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit 1 else echo echo "*** Warning: Linking the shared library $output against the non-libtool" echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. libext=al oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi current="$2" revision="$3" age="$4" # Check that each of the things are valid numbers. case $current in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test $age -gt $current; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test $loop != 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring="" ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs. $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test $hardcode_into_libs != yes || test $build_old_libs = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. ;; *) # Add libc to deplibs on all other systems if necessary. if test $build_libtool_need_lc = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behaviour. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then echo "*** with $libname but no candidates were found. (...for file magic test)" else echo "*** with $libname and none of the candidates passed a file format test" echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check below in file_magic test if eval echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then echo "*** with $libname but no candidates were found. (...for regex pattern test)" else echo "*** with $libname and none of the candidates passed a file format test" echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | grep . >/dev/null; then echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" echo "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test $allow_undefined = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test $hardcode_into_libs = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi test -z "$dlname" && dlname=$soname lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) in case we are running --disable-static for obj in $libobjs; do xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` if test ! -f $xdir/$oldobj; then $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else save_deplibs="$deplibs" for conv in $convenience; do tmp_deplibs= for test_deplib in $deplibs; do if test "$test_deplib" != "$conv"; then tmp_deplibs="$tmp_deplibs $test_deplib" fi done deplibs="$tmp_deplibs" done eval cmds=\"$archive_cmds\" deplibs="$save_deplibs" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit 0 fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. $show "echo timestamp > $libobj" $run eval "echo timestamp > $libobj" || exit $? exit 0 fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" eval cmds=\"$reload_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" else # Just create a symlink. $show $rm $libobj $run $rm $libobj xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$libobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` $show "(cd $xdir && $LN_S $oldobj $baseobj)" $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; prog) case $host in *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test $need_relink = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit 0 fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe ;; *) exeext= ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit 1 fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 ${SED} $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # win32 systems need to use the prog path for dll # lookup to work *-*-cygwin* | *-*-pw32*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else # Ensure that we have .o objects in place in case we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$oldobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` $show "(cd $xdir && ${LN_S} $obj $baseobj)" $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? fi done eval cmds=\"$old_archive_cmds\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test $need_relink = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 continue fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $wrapper ;; *) . ./$wrapper ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $wrapper ;; *) . ./$wrapper ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in /usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $0 --finish$current_libdirs' else exit 0 fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = ":" && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do echo " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" echo "more information, such as the ld(1) and ld.so(8) manual pages." echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi rmdirs= for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$objdir" else objdir="$dir/$objdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test $mode = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test $mode = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test $mode = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" if test $? != 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) if test "$build_old_libs" = yes; then oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi ;; *) # Do a test to see if this is a libtool program. if test $mode = clean && (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit 1 fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE." exit 0 ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/missing����������������������������������������������������������������������������������0000755�0001754�0000144�00000024036�07541534425�007563� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/mkinstalldirs����������������������������������������������������������������������������0000755�0001754�0000144�00000003411�07541534425�010764� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/README.hacks�����������������������������������������������������������������������������0000644�0001754�0000144�00000012033�07635206026�010123� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This file contains a random collection of the various hacks we did (or did not dare to do) in order to get performance. It is not intended to be complete nor up to date, but it may be instructive for people to read (see also my (Matteo Frigo's) slides on the web page). 1) Negative constants: a = 0.5 * b; a = 0.5 * b; c = 0.5 * d; c = -0.5 * d; e = 1.0 + a; vs. e = 1.0 + a; f = 1.0 - c; f = 1.0 + c; The code on the left is faster. Guess why? The constants 0.5 and -0.5 are stored in different memory locations and loaded separately. 2) Twiddle factors: For some reason that escapes me, every package I have seen (including FFTW 1.0) stores the twiddle factors in such a way that the codelets need to access memory in a random fashion. It is much faster to just store the factors in the order they will be needed. This increased spatial locality exploits caches and improves performance by about 30% for big arrays. 3) Loops: You may notice that the `twiddle' codelets contain a loop. This is the most logical choice, as opposed to moving the loop outside the codelet. For example, one would expect that for (i = 0; i < n; ++i) foo(); be slower than the case where the loop is inside foo(). This is usually the case, *except* for the ultrasparc. FFTW would be 10% faster (more or less) if the loop were outside the codelet. Unfortunately, it would be slower everywhere else. If you want to play with this, the codelet generator can be easily hacked... 4) Array padding: (This is a disgusting hack that my programmer's ethic pervents me from releasing to the public). On the IBM RS/6000, for big n, the following **** is *way* faster: - Take the input array - `inflate' it, that is, produce a bigger array in which every k-th element is unused (say k=512). In other words, insert holes in the input. - execute fftw normally (properly hacked to keep the holes into account) - compact the array. With this hack, FFTW is sensibly faster than IBM's ESSL library. Sorry guys, I don't want to be responsible for releasing this monster (this works only on the RS/6000, fortunately). 5) Phase of moon: Don't take the numbers on the web page too seriously. The architectural details of modern machines make performance *extremely* sensitive to little details such as where your code and data are placed in memory. The ultimate example of brain damage is the Pentium Pro (what a surprise...), where we had a case in which adding a printf() statement to FFTW slowed down another completely unrelated fft program by a factor of 20. Our strategy to generate huge pieces of straight-line code should immunize FFTW sufficiently well against these problems, but you are still likely to observe weird things like: FFTW_ESTIMATE can be faster than FFTW_MEASURE. FFTW-17.0 will compute the phase of the moon in the planner and take it into account. 6) Estimator: The estimator tries to come up with a `reasonable' plan. Unfortunately, this concept is very machine-dependent. The estimator in the release is tuned for the UltraSPARC. The following two parameters can be found in fftw/planner.c : #define NOTW_OPTIMAL_SIZE 32 #define TWIDDLE_OPTIMAL_SIZE 12 They say: use non-twiddle codelets of size close to 32, and twiddle codelets of size close to 12. More or less, these are the most efficient pieces of code on the UltraSPARC. Your mileage *will* vary. Here are some suggestions for other machines. Pentium #define NOTW_OPTIMAL_SIZE 8 (or 16) #define TWIDDLE_OPTIMAL_SIZE 8 Pentium Pro: #define NOTW_OPTIMAL_SIZE 32 (or 16) #define TWIDDLE_OPTIMAL_SIZE 2 RS/6000: #define NOTW_OPTIMAL_SIZE 32 #define TWIDDLE_OPTIMAL_SIZE 32 The basic idea is: compute some plans for sizes you most care about, print the plan and plug in the numbers that appear more often (or some kind of average). Note the dramatic difference between Pentium an Pentium Pro. (NO LONGER TRUE WITH --enable-i386-hacks) 7) Stack alignment: Pentium-type processors impose a huge performance penalty if double- precision values are not aligned to 8-byte boundaries in memory. (We have seen factors of 3 or more in tight loops.) Unfortunately, the Intel ABI specifies that variables on the stack need only be aligned to 4-byte boundaries. Even more unfortunately, this convention is followed by Linux/x86 and gcc. To get around this, we wrote special macros (HACK_ALIGN_STACK_EVEN and HACK_ALIGN_STACK_ODD) that take effect when FFTW is compiled with gcc/egcs and 'configure --enable-i386-hacks' is used. These macros are called before the computation-intensive "codelets" of FFTW. They use the gcc __builtin_alloca function to examine the stack pointer and align the stack to an even or odd 4-byte boundary, depending upon how many values will be pushed on the stack to call the codelet. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/bootstrap.sh�����������������������������������������������������������������������������0000644�0001754�0000144�00000000530�07635206026�010523� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh (cd gensrc; make) aclocal # sometimes automake takes a while to add all the required files :-) automake --add-missing automake --add-missing automake --add-missing automake --add-missing autoconf # repeat the procedure so that ``configure'' will be added to the # distribution. automake autoconf # create makefiles sh configure ������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/COPYRIGHT��������������������������������������������������������������������������������0000644�0001754�0000144�00000001435�07635206026�007452� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/acx_pthread.m4���������������������������������������������������������������������������0000644�0001754�0000144�00000021437�07635206027�010710� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro figures out how to build C programs using POSIX dnl threads. It sets the PTHREAD_LIBS output variable to the threads dnl library and linker flags, and the PTHREAD_CFLAGS output variable dnl to any special C compiler flags that are needed. (The user can also dnl force certain compiler flags/libs to be tested by setting these dnl environment variables.) dnl dnl Also sets PTHREAD_CC to any special C compiler that is needed for dnl multi-threaded programs (defaults to the value of CC otherwise). dnl (This is necessary on AIX to use the special cc_r compiler alias.) dnl dnl If you are only building threads programs, you may wish to dnl use these variables in your default LIBS, CFLAGS, and CC: dnl dnl LIBS="$PTHREAD_LIBS $LIBS" dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" dnl CC="$PTHREAD_CC" dnl dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a threads dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_PTHREAD. dnl dnl Please let the authors know if this macro fails on any platform, dnl or if you have any other suggestions or comments. This macro was dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org) dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread dnl macros posted by AFC to the autoconf macro repository. We are also dnl grateful for the helpful feedback of numerous users. dnl dnl @version $Id: acx_pthread.m4,v 1.27 2002/10/24 02:14:57 stevenj Exp $ dnl @author Steven G. Johnson and Alejandro Forero Cuervo AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/acx_mpi.m4�������������������������������������������������������������������������������0000644�0001754�0000144�00000006152�07635206027�010043� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl @synopsis ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro tries to find out how to compile programs that dnl use MPI (Message Passing Interface), a standard API for dnl parallel process communication (see http://www-unix.mcs.anl.gov/mpi/) dnl dnl On success, it sets the MPICC, MPICXX, or MPIF77 output variable to dnl the name of the MPI compiler, depending upon the current language. dnl (This may just be $CC/$CXX/$F77, but is more often something like dnl mpicc/mpiCC/mpif77.) It also sets MPILIBS to any libraries that are dnl needed for linking MPI (e.g. -lmpi, if a special MPICC/MPICXX/MPIF77 dnl was not found). dnl dnl If you want to compile everything with MPI, you should set: dnl dnl CC="$MPICC" #OR# CXX="$MPICXX" #OR# F77="$MPIF77" dnl LIBS="$MPILIBS $LIBS" dnl dnl The user can force a particular library/compiler by setting the dnl MPICC/MPICXX/MPIF77 and/or MPILIBS environment variables. dnl dnl ACTION-IF-FOUND is a list of shell commands to run if an MPI dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_MPI. dnl dnl @version $Id: acx_mpi.m4,v 1.2 2002/10/24 05:11:22 stevenj Exp $ dnl @author Steven G. Johnson AC_DEFUN([ACX_MPI], [ AC_PREREQ(2.50) dnl for AC_LANG_CASE AC_LANG_CASE([C], [ AC_REQUIRE([AC_PROG_CC]) AC_CHECK_PROGS(MPICC, mpicc hcc mpcc mpcc_r mpxlc, $CC) acx_mpi_save_CC="$CC" CC="$MPICC" AC_SUBST(MPICC) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) AC_CHECK_PROGS(MPICXX, mpiCC mpCC, $CXX) acx_mpi_save_CXX="$CXX" CXX="$MPICXX" AC_SUBST(MPICXX) ], [Fortran 77], [ AC_REQUIRE([AC_PROG_F77]) AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r, $F77) acx_mpi_save_F77="$F77" F77="$MPIF77" AC_SUBST(MPIF77) ]) if test x = x"$MPILIBS"; then AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) AC_TRY_LINK([],[ call MPI_Init], [MPILIBS=" " AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) fi if test x = x"$MPILIBS"; then AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) fi dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the dnl latter uses $CPP, not $CC (which may be mpicc). AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi], [C++], [if test x != x"$MPILIBS"; then AC_MSG_CHECKING([for mpi.h]) AC_TRY_COMPILE([#include ],[],[AC_MSG_RESULT(yes)], [MPILIBS="" AC_MSG_RESULT(no)]) fi]) AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"], [C++], [CXX="$acx_mpi_save_CXX"], [Fortran 77], [F77="$acx_mpi_save_F77"]) AC_SUBST(MPILIBS) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then $2 : else ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) : fi ])dnl ACX_MPI ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/������������������������������������������������������������������������������������0002777�0001754�0000144�00000000000�07637531661�007220� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fftw.h������������������������������������������������������������������������������0000644�0001754�0000144�00000030170�07637531661�010252� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- C -*- */ /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftw.h -- system-wide definitions */ /* $Id: fftw.h.in,v 1.57 2003/03/16 23:43:46 stevenj Exp $ */ #ifndef FFTW_H #define FFTW_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Define for using single precision */ /* * If you can, use configure --enable-float instead of changing this * flag directly */ /* #undef FFTW_ENABLE_FLOAT */ /* our real numbers */ #ifdef FFTW_ENABLE_FLOAT typedef float fftw_real; #else typedef double fftw_real; #endif /********************************************* * Complex numbers and operations *********************************************/ typedef struct { fftw_real re, im; } fftw_complex; #define c_re(c) ((c).re) #define c_im(c) ((c).im) typedef enum { FFTW_FORWARD = -1, FFTW_BACKWARD = 1 } fftw_direction; /* backward compatibility with FFTW-1.3 */ typedef fftw_complex FFTW_COMPLEX; typedef fftw_real FFTW_REAL; #ifndef FFTW_1_0_COMPATIBILITY #define FFTW_1_0_COMPATIBILITY 0 #endif #if FFTW_1_0_COMPATIBILITY /* backward compatibility with FFTW-1.0 */ #define REAL fftw_real #define COMPLEX fftw_complex #endif /********************************************* * Success or failure status *********************************************/ typedef enum { FFTW_SUCCESS = 0, FFTW_FAILURE = -1 } fftw_status; /********************************************* * Codelets *********************************************/ typedef void (fftw_notw_codelet) (const fftw_complex *, fftw_complex *, int, int); typedef void (fftw_twiddle_codelet) (fftw_complex *, const fftw_complex *, int, int, int); typedef void (fftw_generic_codelet) (fftw_complex *, const fftw_complex *, int, int, int, int); typedef void (fftw_real2hc_codelet) (const fftw_real *, fftw_real *, fftw_real *, int, int, int); typedef void (fftw_hc2real_codelet) (const fftw_real *, const fftw_real *, fftw_real *, int, int, int); typedef void (fftw_hc2hc_codelet) (fftw_real *, const fftw_complex *, int, int, int); typedef void (fftw_rgeneric_codelet) (fftw_real *, const fftw_complex *, int, int, int, int); /********************************************* * Configurations *********************************************/ /* * A configuration is a database of all known codelets */ enum fftw_node_type { FFTW_NOTW, FFTW_TWIDDLE, FFTW_GENERIC, FFTW_RADER, FFTW_REAL2HC, FFTW_HC2REAL, FFTW_HC2HC, FFTW_RGENERIC }; /* description of a codelet */ typedef struct { const char *name; /* name of the codelet */ void (*codelet) (); /* pointer to the codelet itself */ int size; /* size of the codelet */ fftw_direction dir; /* direction */ enum fftw_node_type type; /* TWIDDLE or NO_TWIDDLE */ int signature; /* unique id */ int ntwiddle; /* number of twiddle factors */ const int *twiddle_order; /* * array that determines the order * in which the codelet expects * the twiddle factors */ } fftw_codelet_desc; /* On Win32, you need to do funny things to access global variables in shared libraries. Thanks to Andrew Sterian for this hack. */ #ifdef HAVE_WIN32 # if defined(BUILD_FFTW_DLL) # define DL_IMPORT(type) __declspec(dllexport) type # elif defined(USE_FFTW_DLL) # define DL_IMPORT(type) __declspec(dllimport) type # else # define DL_IMPORT(type) type # endif #else # define DL_IMPORT(type) type #endif extern DL_IMPORT(const char *) fftw_version; /***************************** * Plans *****************************/ /* * A plan is a sequence of reductions to compute a FFT of * a given size. At each step, the FFT algorithm can: * * 1) apply a notw codelet, or * 2) recurse and apply a twiddle codelet, or * 3) apply the generic codelet. */ /* structure that contains twiddle factors */ typedef struct fftw_twiddle_struct { int n; const fftw_codelet_desc *cdesc; fftw_complex *twarray; struct fftw_twiddle_struct *next; int refcnt; } fftw_twiddle; typedef struct fftw_rader_data_struct { struct fftw_plan_struct *plan; fftw_complex *omega; int g, ginv; int p, flags, refcount; struct fftw_rader_data_struct *next; fftw_codelet_desc *cdesc; } fftw_rader_data; typedef void (fftw_rader_codelet) (fftw_complex *, const fftw_complex *, int, int, int, fftw_rader_data *); /* structure that holds all the data needed for a given step */ typedef struct fftw_plan_node_struct { enum fftw_node_type type; union { /* nodes of type FFTW_NOTW */ struct { int size; fftw_notw_codelet *codelet; const fftw_codelet_desc *codelet_desc; } notw; /* nodes of type FFTW_TWIDDLE */ struct { int size; fftw_twiddle_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; const fftw_codelet_desc *codelet_desc; } twiddle; /* nodes of type FFTW_GENERIC */ struct { int size; fftw_generic_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } generic; /* nodes of type FFTW_RADER */ struct { int size; fftw_rader_codelet *codelet; fftw_rader_data *rader_data; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } rader; /* nodes of type FFTW_REAL2HC */ struct { int size; fftw_real2hc_codelet *codelet; const fftw_codelet_desc *codelet_desc; } real2hc; /* nodes of type FFTW_HC2REAL */ struct { int size; fftw_hc2real_codelet *codelet; const fftw_codelet_desc *codelet_desc; } hc2real; /* nodes of type FFTW_HC2HC */ struct { int size; fftw_direction dir; fftw_hc2hc_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; const fftw_codelet_desc *codelet_desc; } hc2hc; /* nodes of type FFTW_RGENERIC */ struct { int size; fftw_direction dir; fftw_rgeneric_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } rgeneric; } nodeu; int refcnt; } fftw_plan_node; typedef enum { FFTW_NORMAL_RECURSE = 0, FFTW_VECTOR_RECURSE = 1 } fftw_recurse_kind; struct fftw_plan_struct { int n; int refcnt; fftw_direction dir; int flags; int wisdom_signature; enum fftw_node_type wisdom_type; struct fftw_plan_struct *next; fftw_plan_node *root; double cost; fftw_recurse_kind recurse_kind; int vector_size; }; typedef struct fftw_plan_struct *fftw_plan; /* flags for the planner */ #define FFTW_ESTIMATE (0) #define FFTW_MEASURE (1) #define FFTW_OUT_OF_PLACE (0) #define FFTW_IN_PLACE (8) #define FFTW_USE_WISDOM (16) #define FFTW_THREADSAFE (128) /* guarantee plan is read-only so that the same plan can be used in parallel by multiple threads */ #define FFTWND_FORCE_BUFFERED (256) /* internal flag, forces buffering in fftwnd transforms */ #define FFTW_NO_VECTOR_RECURSE (512) /* internal flag, prevents use of vector recursion */ extern fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); #define FFTW_HAS_PLAN_SPECIFIC extern fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); extern void fftw_print_plan(fftw_plan plan); extern void fftw_destroy_plan(fftw_plan plan); extern void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); extern void fftw_die(const char *s); extern void *fftw_malloc(size_t n); extern void fftw_free(void *p); extern void fftw_check_memory_leaks(void); extern void fftw_print_max_memory_usage(void); typedef void *(*fftw_malloc_type_function) (size_t n); typedef void (*fftw_free_type_function) (void *p); typedef void (*fftw_die_type_function) (const char *errString); extern DL_IMPORT(fftw_malloc_type_function) fftw_malloc_hook; extern DL_IMPORT(fftw_free_type_function) fftw_free_hook; extern DL_IMPORT(fftw_die_type_function) fftw_die_hook; extern size_t fftw_sizeof_fftw_real(void); /* Wisdom: */ /* * define this symbol so that users know we are using a version of FFTW * with wisdom */ #define FFTW_HAS_WISDOM extern void fftw_forget_wisdom(void); extern void fftw_export_wisdom(void (*emitter) (char c, void *), void *data); extern fftw_status fftw_import_wisdom(int (*g) (void *), void *data); extern void fftw_export_wisdom_to_file(FILE *output_file); extern fftw_status fftw_import_wisdom_from_file(FILE *input_file); extern char *fftw_export_wisdom_to_string(void); extern fftw_status fftw_import_wisdom_from_string(const char *input_string); /* * define symbol so we know this function is available (it is not in * older FFTWs) */ #define FFTW_HAS_FPRINT_PLAN extern void fftw_fprint_plan(FILE *f, fftw_plan plan); /***************************** * N-dimensional code *****************************/ typedef struct { int is_in_place; /* 1 if for in-place FFTs, 0 otherwise */ int rank; /* * the rank (number of dimensions) of the * array to be FFTed */ int *n; /* * the dimensions of the array to the * FFTed */ fftw_direction dir; int *n_before; /* * n_before[i] = product of n[j] for j < i */ int *n_after; /* n_after[i] = product of n[j] for j > i */ fftw_plan *plans; /* 1d fftw plans for each dimension */ int nbuffers, nwork; fftw_complex *work; /* * work array big enough to hold * nbuffers+1 of the largest dimension * (has nwork elements) */ } fftwnd_data; typedef fftwnd_data *fftwnd_plan; /* Initializing the FFTWND plan: */ extern fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); extern fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); extern fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); extern fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); extern fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); extern fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); /* Freeing the FFTWND plan: */ extern void fftwnd_destroy_plan(fftwnd_plan plan); /* Printing the plan: */ extern void fftwnd_fprint_plan(FILE *f, fftwnd_plan p); extern void fftwnd_print_plan(fftwnd_plan p); #define FFTWND_HAS_PRINT_PLAN /* Computing the N-Dimensional FFT */ extern void fftwnd(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/Makefile.am�������������������������������������������������������������������������0000644�0001754�0000144�00000003117�07637527074�011173� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@fftw.la include_HEADERS = @FFTW_PREFIX@fftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS= fn_1.c fn_2.c fn_3.c fn_4.c fn_5.c fn_6.c fn_7.c fn_8.c fn_9.c fn_10.c fn_11.c fn_12.c fn_13.c fn_14.c fn_15.c fn_16.c fn_32.c fn_64.c TWID_CODELETS= ftw_2.c ftw_3.c ftw_4.c ftw_5.c ftw_6.c ftw_7.c ftw_8.c ftw_9.c ftw_10.c ftw_16.c ftw_32.c ftw_64.c NOTWI_CODELETS= fni_1.c fni_2.c fni_3.c fni_4.c fni_5.c fni_6.c fni_7.c fni_8.c fni_9.c fni_10.c fni_11.c fni_12.c fni_13.c fni_14.c fni_15.c fni_16.c fni_32.c fni_64.c TWIDI_CODELETS= ftwi_2.c ftwi_3.c ftwi_4.c ftwi_5.c ftwi_6.c ftwi_7.c ftwi_8.c ftwi_9.c ftwi_10.c ftwi_16.c ftwi_32.c ftwi_64.c CODELETS=$(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = timer.c config.c planner.c twiddle.c executor.c \ generic.c fftwnd.c malloc.c wisdom.c wisdomio.c putils.c rader.c \ fftwf77.c lib@FFTW_PREFIX@fftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ fftw.h fftw-int.h lib@FFTW_PREFIX@fftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) config.c DISTCLEANFILES = fftw.h sfftw.h dfftw.h @FFTW_PREFIX1@fftw.h: fftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw.h > $@ CLEANFILES = @FFTW_PREFIX1@fftw.h # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/Makefile.in�������������������������������������������������������������������������0000644�0001754�0000144�00000062004�07637527505�011203� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER = echo AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@fftw.la include_HEADERS = @FFTW_PREFIX@fftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS = fn_1.c fn_2.c fn_3.c fn_4.c fn_5.c fn_6.c fn_7.c fn_8.c fn_9.c fn_10.c fn_11.c fn_12.c fn_13.c fn_14.c fn_15.c fn_16.c fn_32.c fn_64.c TWID_CODELETS = ftw_2.c ftw_3.c ftw_4.c ftw_5.c ftw_6.c ftw_7.c ftw_8.c ftw_9.c ftw_10.c ftw_16.c ftw_32.c ftw_64.c NOTWI_CODELETS = fni_1.c fni_2.c fni_3.c fni_4.c fni_5.c fni_6.c fni_7.c fni_8.c fni_9.c fni_10.c fni_11.c fni_12.c fni_13.c fni_14.c fni_15.c fni_16.c fni_32.c fni_64.c TWIDI_CODELETS = ftwi_2.c ftwi_3.c ftwi_4.c ftwi_5.c ftwi_6.c ftwi_7.c ftwi_8.c ftwi_9.c ftwi_10.c ftwi_16.c ftwi_32.c ftwi_64.c CODELETS = $(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = timer.c config.c planner.c twiddle.c executor.c \ generic.c fftwnd.c malloc.c wisdom.c wisdomio.c putils.c rader.c \ fftwf77.c lib@FFTW_PREFIX@fftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ fftw.h fftw-int.h lib@FFTW_PREFIX@fftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) config.c DISTCLEANFILES = fftw.h sfftw.h dfftw.h CLEANFILES = @FFTW_PREFIX1@fftw.h subdir = fftw mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h fftw.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) lib@FFTW_PREFIX@fftw_la_LIBADD = am__objects_1 = fn_1.lo fn_2.lo fn_3.lo fn_4.lo fn_5.lo fn_6.lo fn_7.lo \ fn_8.lo fn_9.lo fn_10.lo fn_11.lo fn_12.lo fn_13.lo fn_14.lo \ fn_15.lo fn_16.lo fn_32.lo fn_64.lo am__objects_2 = ftw_2.lo ftw_3.lo ftw_4.lo ftw_5.lo ftw_6.lo ftw_7.lo \ ftw_8.lo ftw_9.lo ftw_10.lo ftw_16.lo ftw_32.lo ftw_64.lo am__objects_3 = fni_1.lo fni_2.lo fni_3.lo fni_4.lo fni_5.lo fni_6.lo \ fni_7.lo fni_8.lo fni_9.lo fni_10.lo fni_11.lo fni_12.lo \ fni_13.lo fni_14.lo fni_15.lo fni_16.lo fni_32.lo fni_64.lo am__objects_4 = ftwi_2.lo ftwi_3.lo ftwi_4.lo ftwi_5.lo ftwi_6.lo \ ftwi_7.lo ftwi_8.lo ftwi_9.lo ftwi_10.lo ftwi_16.lo ftwi_32.lo \ ftwi_64.lo am__objects_5 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) am__objects_6 = timer.lo config.lo planner.lo twiddle.lo executor.lo \ generic.lo fftwnd.lo malloc.lo wisdom.lo wisdomio.lo putils.lo \ rader.lo fftwf77.lo am_lib@FFTW_PREFIX@fftw_la_OBJECTS = $(am__objects_5) $(am__objects_6) lib@FFTW_PREFIX@fftw_la_OBJECTS = $(am_lib@FFTW_PREFIX@fftw_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/config.Plo ./$(DEPDIR)/executor.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftwf77.Plo ./$(DEPDIR)/fftwnd.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_1.Plo ./$(DEPDIR)/fn_10.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_11.Plo ./$(DEPDIR)/fn_12.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_13.Plo ./$(DEPDIR)/fn_14.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_15.Plo ./$(DEPDIR)/fn_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_2.Plo ./$(DEPDIR)/fn_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_32.Plo ./$(DEPDIR)/fn_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_5.Plo ./$(DEPDIR)/fn_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_64.Plo ./$(DEPDIR)/fn_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fn_8.Plo ./$(DEPDIR)/fn_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_1.Plo ./$(DEPDIR)/fni_10.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_11.Plo ./$(DEPDIR)/fni_12.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_13.Plo ./$(DEPDIR)/fni_14.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_15.Plo ./$(DEPDIR)/fni_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_2.Plo ./$(DEPDIR)/fni_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_32.Plo ./$(DEPDIR)/fni_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_5.Plo ./$(DEPDIR)/fni_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_64.Plo ./$(DEPDIR)/fni_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fni_8.Plo ./$(DEPDIR)/fni_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_10.Plo ./$(DEPDIR)/ftw_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_2.Plo ./$(DEPDIR)/ftw_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_32.Plo ./$(DEPDIR)/ftw_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_5.Plo ./$(DEPDIR)/ftw_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_64.Plo ./$(DEPDIR)/ftw_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftw_8.Plo ./$(DEPDIR)/ftw_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_10.Plo ./$(DEPDIR)/ftwi_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_2.Plo ./$(DEPDIR)/ftwi_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_32.Plo ./$(DEPDIR)/ftwi_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_5.Plo ./$(DEPDIR)/ftwi_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_64.Plo ./$(DEPDIR)/ftwi_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/ftwi_8.Plo ./$(DEPDIR)/ftwi_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/generic.Plo ./$(DEPDIR)/malloc.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/planner.Plo ./$(DEPDIR)/putils.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rader.Plo ./$(DEPDIR)/timer.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/twiddle.Plo ./$(DEPDIR)/wisdom.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/wisdomio.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(lib@FFTW_PREFIX@fftw_la_SOURCES) HEADERS = $(include_HEADERS) DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in config.h.in \ fftw.h.in SOURCES = $(lib@FFTW_PREFIX@fftw_la_SOURCES) all: config.h fftw.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu fftw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status fftw/config.h $(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/config.h.in fftw.h: stamp-h2 @if test ! -f $@; then \ rm -f stamp-h2; \ $(MAKE) stamp-h2; \ else :; fi stamp-h2: $(srcdir)/fftw.h.in $(top_builddir)/config.status @rm -f stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status fftw/fftw.h $(srcdir)/fftw.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/fftw.h.in distclean-hdr: -rm -f config.h stamp-h1 fftw.h stamp-h2 libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" = "$$p" && dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lib@FFTW_PREFIX@fftw.la: $(lib@FFTW_PREFIX@fftw_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(lib@FFTW_PREFIX@fftw_la_LDFLAGS) $(lib@FFTW_PREFIX@fftw_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/executor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwf77.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwnd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fni_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftw_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftwi_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/planner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twiddle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wisdom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wisdomio.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: includeHEADERS_INSTALL = $(INSTALL_HEADER) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ rm -f $(DESTDIR)$(includedir)/$$f; \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) config.h.in fftw.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in fftw.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in fftw.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in fftw.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h fftw.h installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-depend distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-info-am uninstall-libLTLIBRARIES @FFTW_PREFIX1@fftw.h: fftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw.h > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/config.h.in�������������������������������������������������������������������������0000644�0001754�0000144�00000011776�07637527600�011167� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- C -*- */ /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftw.h -- system-wide definitions */ /* $Id: config.h.in,v 1.30 2003/03/16 23:43:46 stevenj Exp $ */ /* configuration options (guessed by configure) */ /* Define to empty if the keyword does not work. */ #undef const /* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the BSDgettimeofday function. */ #undef HAVE_BSDGETTIMEOFDAY /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the header file. */ #undef HAVE_GETOPT_H /* Define if you have the header file */ #undef HAVE_MALLOC_H /* Define if you have gethrtime() a la Solaris 2 */ #undef HAVE_GETHRTIME #undef HAVE_HRTIME_T /* Define to sizeof int and long long, if available: */ #define SIZEOF_INT 0 #define SIZEOF_LONG_LONG 0 #if (SIZEOF_INT != 0) && (SIZEOF_LONG_LONG >= 2 * SIZEOF_INT) # define LONGLONG_IS_TWOINTS #endif /* Define to use "unsafe" modular multiply (can cause integer overflow and errors for transforms of large prime sizes using Rader). */ #undef FFTW_ENABLE_UNSAFE_MULMOD /* Define if you have getopt() */ #undef HAVE_GETOPT /* Define if you have getopt_long() */ #undef HAVE_GETOPT_LONG /* Define if you have isnan() */ #undef HAVE_ISNAN /* Define for enabling the high resolution Pentium timer */ #undef FFTW_ENABLE_PENTIUM_TIMER /* * When using FFTW_ENABLE_PENTIUM_TIMER, set FFTW_CYCLES_PER_SEC * to your real CPU clock speed! */ /* This is for 200 MHz */ /* #define FFTW_CYCLES_PER_SEC 200000000L */ /* * Define to enable a gcc/x86 specific hack that aligns * the stack to an 8-byte boundary */ #undef FFTW_ENABLE_I386_HACKS /* Define when using a version of gcc that aligns the stack properly */ #undef FFTW_GCC_ALIGNS_STACK /* Define to enable extra runtime checks for debugging. */ #undef FFTW_DEBUG /* Define to enable vector-recurse feature. */ #undef FFTW_ENABLE_VECTOR_RECURSE /* * Define to enable extra runtime checks for the alignment of variables * in the codelets (causes coredump for misaligned double on x86). */ #undef FFTW_DEBUG_ALIGNMENT #undef FFTW_VERSION /* Use Win32 high-resolution timer */ #if defined(__WIN32__) || defined(WIN32) || defined(_WINDOWS) # define HAVE_WIN32_TIMER # define HAVE_WIN32 #endif /* Use MacOS Time Manager timer */ #if defined(MAC) || defined(macintosh) # define HAVE_MAC_TIMER # define HAVE_MACOS /* Define to use nanosecond timer on PCI PowerMacs: */ /* (WARNING: experimental, use at your own risk.) */ #undef HAVE_MAC_PCI_TIMER #endif /* define if you have alloca.h: */ #undef HAVE_ALLOCA_H /* define if you have the alloca function: */ #undef HAVE_ALLOCA /************************** threads configuration ************************/ /* The following preprocessor symbols select which threads library to use when compiling the FFTW threads parallel libraries: */ #undef FFTW_USING_SOLARIS_THREADS #undef FFTW_USING_POSIX_THREADS #undef FFTW_USING_BEOS_THREADS #undef FFTW_USING_MACH_THREADS #undef FFTW_USING_OPENMP_THREADS #undef FFTW_USING_SGIMP_THREADS /* on AIX, this gets defined to PTHREAD_CREATE_UNDETACHED, as that system uses a non-standard name for this attribute (sigh). */ #undef PTHREAD_CREATE_JOINABLE #undef HAVE_MACH_CTHREADS_H #undef HAVE_CTHREADS_H #undef HAVE_CTHREAD_H #ifdef HAVE_WIN32 #define FFTW_USING_WIN32_THREADS #endif #ifdef HAVE_MACOS #define FFTW_USING_MACOS_THREADS #endif /*********************** fortran wrapper configuration *********************/ /* F77_FUNC_ is defined to a macro F77_FUNC_(name,NAME) by autoconf, that takes an identifier name (lower case) and NAME (upper case) and returns the appropriately mangled identifier for the Fortran linker. On non-Unix systems you will have to define this manually. For example, if your linker converts identifiers to lower-case followed by an underscore, you would do: #define F77_FUNC_(name,NAME) name ## _ */ #undef F77_FUNC_ /* The following symbols control how MPI_Comm data structures are translated between Fortran and C for the fftw_mpi wrappers. See the file mpi/fftw_f77_mpi.h for more information. */ #undef HAVE_MPI_COMM_F2C #undef FFTW_USE_F77_MPI_COMM #undef FFTW_USE_F77_MPI_COMM_P ��fftw-2.1.5/fftw/fftw.h.in���������������������������������������������������������������������������0000644�0001754�0000144�00000030162�07637527577�010673� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- C -*- */ /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftw.h -- system-wide definitions */ /* $Id: fftw.h.in,v 1.57 2003/03/16 23:43:46 stevenj Exp $ */ #ifndef FFTW_H #define FFTW_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Define for using single precision */ /* * If you can, use configure --enable-float instead of changing this * flag directly */ #undef FFTW_ENABLE_FLOAT /* our real numbers */ #ifdef FFTW_ENABLE_FLOAT typedef float fftw_real; #else typedef double fftw_real; #endif /********************************************* * Complex numbers and operations *********************************************/ typedef struct { fftw_real re, im; } fftw_complex; #define c_re(c) ((c).re) #define c_im(c) ((c).im) typedef enum { FFTW_FORWARD = -1, FFTW_BACKWARD = 1 } fftw_direction; /* backward compatibility with FFTW-1.3 */ typedef fftw_complex FFTW_COMPLEX; typedef fftw_real FFTW_REAL; #ifndef FFTW_1_0_COMPATIBILITY #define FFTW_1_0_COMPATIBILITY 0 #endif #if FFTW_1_0_COMPATIBILITY /* backward compatibility with FFTW-1.0 */ #define REAL fftw_real #define COMPLEX fftw_complex #endif /********************************************* * Success or failure status *********************************************/ typedef enum { FFTW_SUCCESS = 0, FFTW_FAILURE = -1 } fftw_status; /********************************************* * Codelets *********************************************/ typedef void (fftw_notw_codelet) (const fftw_complex *, fftw_complex *, int, int); typedef void (fftw_twiddle_codelet) (fftw_complex *, const fftw_complex *, int, int, int); typedef void (fftw_generic_codelet) (fftw_complex *, const fftw_complex *, int, int, int, int); typedef void (fftw_real2hc_codelet) (const fftw_real *, fftw_real *, fftw_real *, int, int, int); typedef void (fftw_hc2real_codelet) (const fftw_real *, const fftw_real *, fftw_real *, int, int, int); typedef void (fftw_hc2hc_codelet) (fftw_real *, const fftw_complex *, int, int, int); typedef void (fftw_rgeneric_codelet) (fftw_real *, const fftw_complex *, int, int, int, int); /********************************************* * Configurations *********************************************/ /* * A configuration is a database of all known codelets */ enum fftw_node_type { FFTW_NOTW, FFTW_TWIDDLE, FFTW_GENERIC, FFTW_RADER, FFTW_REAL2HC, FFTW_HC2REAL, FFTW_HC2HC, FFTW_RGENERIC }; /* description of a codelet */ typedef struct { const char *name; /* name of the codelet */ void (*codelet) (); /* pointer to the codelet itself */ int size; /* size of the codelet */ fftw_direction dir; /* direction */ enum fftw_node_type type; /* TWIDDLE or NO_TWIDDLE */ int signature; /* unique id */ int ntwiddle; /* number of twiddle factors */ const int *twiddle_order; /* * array that determines the order * in which the codelet expects * the twiddle factors */ } fftw_codelet_desc; /* On Win32, you need to do funny things to access global variables in shared libraries. Thanks to Andrew Sterian for this hack. */ #ifdef HAVE_WIN32 # if defined(BUILD_FFTW_DLL) # define DL_IMPORT(type) __declspec(dllexport) type # elif defined(USE_FFTW_DLL) # define DL_IMPORT(type) __declspec(dllimport) type # else # define DL_IMPORT(type) type # endif #else # define DL_IMPORT(type) type #endif extern DL_IMPORT(const char *) fftw_version; /***************************** * Plans *****************************/ /* * A plan is a sequence of reductions to compute a FFT of * a given size. At each step, the FFT algorithm can: * * 1) apply a notw codelet, or * 2) recurse and apply a twiddle codelet, or * 3) apply the generic codelet. */ /* structure that contains twiddle factors */ typedef struct fftw_twiddle_struct { int n; const fftw_codelet_desc *cdesc; fftw_complex *twarray; struct fftw_twiddle_struct *next; int refcnt; } fftw_twiddle; typedef struct fftw_rader_data_struct { struct fftw_plan_struct *plan; fftw_complex *omega; int g, ginv; int p, flags, refcount; struct fftw_rader_data_struct *next; fftw_codelet_desc *cdesc; } fftw_rader_data; typedef void (fftw_rader_codelet) (fftw_complex *, const fftw_complex *, int, int, int, fftw_rader_data *); /* structure that holds all the data needed for a given step */ typedef struct fftw_plan_node_struct { enum fftw_node_type type; union { /* nodes of type FFTW_NOTW */ struct { int size; fftw_notw_codelet *codelet; const fftw_codelet_desc *codelet_desc; } notw; /* nodes of type FFTW_TWIDDLE */ struct { int size; fftw_twiddle_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; const fftw_codelet_desc *codelet_desc; } twiddle; /* nodes of type FFTW_GENERIC */ struct { int size; fftw_generic_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } generic; /* nodes of type FFTW_RADER */ struct { int size; fftw_rader_codelet *codelet; fftw_rader_data *rader_data; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } rader; /* nodes of type FFTW_REAL2HC */ struct { int size; fftw_real2hc_codelet *codelet; const fftw_codelet_desc *codelet_desc; } real2hc; /* nodes of type FFTW_HC2REAL */ struct { int size; fftw_hc2real_codelet *codelet; const fftw_codelet_desc *codelet_desc; } hc2real; /* nodes of type FFTW_HC2HC */ struct { int size; fftw_direction dir; fftw_hc2hc_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; const fftw_codelet_desc *codelet_desc; } hc2hc; /* nodes of type FFTW_RGENERIC */ struct { int size; fftw_direction dir; fftw_rgeneric_codelet *codelet; fftw_twiddle *tw; struct fftw_plan_node_struct *recurse; } rgeneric; } nodeu; int refcnt; } fftw_plan_node; typedef enum { FFTW_NORMAL_RECURSE = 0, FFTW_VECTOR_RECURSE = 1 } fftw_recurse_kind; struct fftw_plan_struct { int n; int refcnt; fftw_direction dir; int flags; int wisdom_signature; enum fftw_node_type wisdom_type; struct fftw_plan_struct *next; fftw_plan_node *root; double cost; fftw_recurse_kind recurse_kind; int vector_size; }; typedef struct fftw_plan_struct *fftw_plan; /* flags for the planner */ #define FFTW_ESTIMATE (0) #define FFTW_MEASURE (1) #define FFTW_OUT_OF_PLACE (0) #define FFTW_IN_PLACE (8) #define FFTW_USE_WISDOM (16) #define FFTW_THREADSAFE (128) /* guarantee plan is read-only so that the same plan can be used in parallel by multiple threads */ #define FFTWND_FORCE_BUFFERED (256) /* internal flag, forces buffering in fftwnd transforms */ #define FFTW_NO_VECTOR_RECURSE (512) /* internal flag, prevents use of vector recursion */ extern fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); #define FFTW_HAS_PLAN_SPECIFIC extern fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); extern void fftw_print_plan(fftw_plan plan); extern void fftw_destroy_plan(fftw_plan plan); extern void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); extern void fftw_die(const char *s); extern void *fftw_malloc(size_t n); extern void fftw_free(void *p); extern void fftw_check_memory_leaks(void); extern void fftw_print_max_memory_usage(void); typedef void *(*fftw_malloc_type_function) (size_t n); typedef void (*fftw_free_type_function) (void *p); typedef void (*fftw_die_type_function) (const char *errString); extern DL_IMPORT(fftw_malloc_type_function) fftw_malloc_hook; extern DL_IMPORT(fftw_free_type_function) fftw_free_hook; extern DL_IMPORT(fftw_die_type_function) fftw_die_hook; extern size_t fftw_sizeof_fftw_real(void); /* Wisdom: */ /* * define this symbol so that users know we are using a version of FFTW * with wisdom */ #define FFTW_HAS_WISDOM extern void fftw_forget_wisdom(void); extern void fftw_export_wisdom(void (*emitter) (char c, void *), void *data); extern fftw_status fftw_import_wisdom(int (*g) (void *), void *data); extern void fftw_export_wisdom_to_file(FILE *output_file); extern fftw_status fftw_import_wisdom_from_file(FILE *input_file); extern char *fftw_export_wisdom_to_string(void); extern fftw_status fftw_import_wisdom_from_string(const char *input_string); /* * define symbol so we know this function is available (it is not in * older FFTWs) */ #define FFTW_HAS_FPRINT_PLAN extern void fftw_fprint_plan(FILE *f, fftw_plan plan); /***************************** * N-dimensional code *****************************/ typedef struct { int is_in_place; /* 1 if for in-place FFTs, 0 otherwise */ int rank; /* * the rank (number of dimensions) of the * array to be FFTed */ int *n; /* * the dimensions of the array to the * FFTed */ fftw_direction dir; int *n_before; /* * n_before[i] = product of n[j] for j < i */ int *n_after; /* n_after[i] = product of n[j] for j > i */ fftw_plan *plans; /* 1d fftw plans for each dimension */ int nbuffers, nwork; fftw_complex *work; /* * work array big enough to hold * nbuffers+1 of the largest dimension * (has nwork elements) */ } fftwnd_data; typedef fftwnd_data *fftwnd_plan; /* Initializing the FFTWND plan: */ extern fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); extern fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); extern fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); extern fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); extern fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); extern fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); /* Freeing the FFTWND plan: */ extern void fftwnd_destroy_plan(fftwnd_plan plan); /* Printing the plan: */ extern void fftwnd_fprint_plan(FILE *f, fftwnd_plan p); extern void fftwnd_print_plan(fftwnd_plan p); #define FFTWND_HAS_PRINT_PLAN /* Computing the N-Dimensional FFT */ extern void fftwnd(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_1.c������������������������������������������������������������������������������0000644�0001754�0000144�00000003661�07637527101�010121� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 1 */ /* * This function contains 0 FP additions, 0 FP multiplications, * (or, 0 additions, 0 multiplications, 0 fused multiply/add), * 2 stack variables, and 4 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_1(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); c_re(output[0]) = tmp1; tmp2 = c_im(input[0]); c_im(output[0]) = tmp2; } fftw_codelet_desc fftw_no_twiddle_1_desc = { "fftw_no_twiddle_1", (void (*)()) fftw_no_twiddle_1, 1, FFTW_FORWARD, FFTW_NOTW, 23, 0, (const int *) 0, }; �������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_2.c������������������������������������������������������������������������������0000644�0001754�0000144�00000004201�07637527101�010111� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 2 */ /* * This function contains 4 FP additions, 0 FP multiplications, * (or, 4 additions, 0 multiplications, 0 fused multiply/add), * 4 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_2(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[istride]); c_re(output[ostride]) = tmp1 - tmp2; c_re(output[0]) = tmp1 + tmp2; tmp3 = c_im(input[0]); tmp4 = c_im(input[istride]); c_im(output[ostride]) = tmp3 - tmp4; c_im(output[0]) = tmp3 + tmp4; } fftw_codelet_desc fftw_no_twiddle_2_desc = { "fftw_no_twiddle_2", (void (*)()) fftw_no_twiddle_2, 2, FFTW_FORWARD, FFTW_NOTW, 45, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_3.c������������������������������������������������������������������������������0000644�0001754�0000144�00000005607�07637527101�010125� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 3 */ /* * This function contains 12 FP additions, 4 FP multiplications, * (or, 10 additions, 2 multiplications, 2 fused multiply/add), * 12 stack variables, and 12 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_3(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp10; fftw_real tmp4; fftw_real tmp9; fftw_real tmp8; fftw_real tmp11; fftw_real tmp5; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp10 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[2 * istride]); tmp4 = tmp2 + tmp3; tmp9 = K866025403 * (tmp3 - tmp2); tmp6 = c_im(input[istride]); tmp7 = c_im(input[2 * istride]); tmp8 = K866025403 * (tmp6 - tmp7); tmp11 = tmp6 + tmp7; } c_re(output[0]) = tmp1 + tmp4; tmp5 = tmp1 - (K500000000 * tmp4); c_re(output[2 * ostride]) = tmp5 - tmp8; c_re(output[ostride]) = tmp5 + tmp8; c_im(output[0]) = tmp10 + tmp11; tmp12 = tmp10 - (K500000000 * tmp11); c_im(output[ostride]) = tmp9 + tmp12; c_im(output[2 * ostride]) = tmp12 - tmp9; } fftw_codelet_desc fftw_no_twiddle_3_desc = { "fftw_no_twiddle_3", (void (*)()) fftw_no_twiddle_3, 3, FFTW_FORWARD, FFTW_NOTW, 67, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_4.c������������������������������������������������������������������������������0000644�0001754�0000144�00000005725�07637527101�010127� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 4 */ /* * This function contains 16 FP additions, 0 FP multiplications, * (or, 16 additions, 0 multiplications, 0 fused multiply/add), * 12 stack variables, and 16 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_4(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp11; fftw_real tmp9; fftw_real tmp15; fftw_real tmp6; fftw_real tmp10; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[2 * istride]); tmp3 = tmp1 + tmp2; tmp11 = tmp1 - tmp2; tmp7 = c_im(input[0]); tmp8 = c_im(input[2 * istride]); tmp9 = tmp7 - tmp8; tmp15 = tmp7 + tmp8; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp12; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[istride]); tmp5 = c_re(input[3 * istride]); tmp6 = tmp4 + tmp5; tmp10 = tmp4 - tmp5; tmp12 = c_im(input[istride]); tmp13 = c_im(input[3 * istride]); tmp14 = tmp12 - tmp13; tmp16 = tmp12 + tmp13; } c_re(output[2 * ostride]) = tmp3 - tmp6; c_re(output[0]) = tmp3 + tmp6; c_im(output[ostride]) = tmp9 - tmp10; c_im(output[3 * ostride]) = tmp10 + tmp9; c_re(output[3 * ostride]) = tmp11 - tmp14; c_re(output[ostride]) = tmp11 + tmp14; c_im(output[2 * ostride]) = tmp15 - tmp16; c_im(output[0]) = tmp15 + tmp16; } fftw_codelet_desc fftw_no_twiddle_4_desc = { "fftw_no_twiddle_4", (void (*)()) fftw_no_twiddle_4, 4, FFTW_FORWARD, FFTW_NOTW, 89, 0, (const int *) 0, }; �������������������������������������������fftw-2.1.5/fftw/fn_5.c������������������������������������������������������������������������������0000644�0001754�0000144�00000010661�07637527102�010124� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 5 */ /* * This function contains 32 FP additions, 12 FP multiplications, * (or, 26 additions, 6 multiplications, 6 fused multiply/add), * 16 stack variables, and 20 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_5(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp24; fftw_real tmp8; fftw_real tmp9; fftw_real tmp28; fftw_real tmp29; fftw_real tmp14; fftw_real tmp25; fftw_real tmp23; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp24 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[4 * istride]); tmp4 = tmp2 + tmp3; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[3 * istride]); tmp7 = tmp5 + tmp6; tmp8 = tmp4 + tmp7; tmp9 = K559016994 * (tmp4 - tmp7); tmp28 = tmp2 - tmp3; tmp29 = tmp5 - tmp6; } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp21; fftw_real tmp15; fftw_real tmp16; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp12 = c_im(input[istride]); tmp13 = c_im(input[4 * istride]); tmp21 = tmp12 + tmp13; tmp15 = c_im(input[2 * istride]); tmp16 = c_im(input[3 * istride]); tmp22 = tmp15 + tmp16; tmp14 = tmp12 - tmp13; tmp25 = tmp21 + tmp22; tmp23 = K559016994 * (tmp21 - tmp22); tmp17 = tmp15 - tmp16; } c_re(output[0]) = tmp1 + tmp8; { fftw_real tmp18; fftw_real tmp20; fftw_real tmp11; fftw_real tmp19; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp18 = (K951056516 * tmp14) + (K587785252 * tmp17); tmp20 = (K951056516 * tmp17) - (K587785252 * tmp14); tmp10 = tmp1 - (K250000000 * tmp8); tmp11 = tmp9 + tmp10; tmp19 = tmp10 - tmp9; c_re(output[4 * ostride]) = tmp11 - tmp18; c_re(output[ostride]) = tmp11 + tmp18; c_re(output[2 * ostride]) = tmp19 - tmp20; c_re(output[3 * ostride]) = tmp19 + tmp20; } c_im(output[0]) = tmp25 + tmp24; { fftw_real tmp30; fftw_real tmp31; fftw_real tmp27; fftw_real tmp32; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp30 = (K951056516 * tmp28) + (K587785252 * tmp29); tmp31 = (K951056516 * tmp29) - (K587785252 * tmp28); tmp26 = tmp24 - (K250000000 * tmp25); tmp27 = tmp23 + tmp26; tmp32 = tmp26 - tmp23; c_im(output[ostride]) = tmp27 - tmp30; c_im(output[4 * ostride]) = tmp30 + tmp27; c_im(output[2 * ostride]) = tmp31 + tmp32; c_im(output[3 * ostride]) = tmp32 - tmp31; } } fftw_codelet_desc fftw_no_twiddle_5_desc = { "fftw_no_twiddle_5", (void (*)()) fftw_no_twiddle_5, 5, FFTW_FORWARD, FFTW_NOTW, 111, 0, (const int *) 0, }; �������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_6.c������������������������������������������������������������������������������0000644�0001754�0000144�00000011016�07637527102�010120� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 6 */ /* * This function contains 36 FP additions, 8 FP multiplications, * (or, 32 additions, 4 multiplications, 4 fused multiply/add), * 20 stack variables, and 24 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_6(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp11; fftw_real tmp26; fftw_real tmp33; fftw_real tmp6; fftw_real tmp12; fftw_real tmp9; fftw_real tmp13; fftw_real tmp10; fftw_real tmp14; fftw_real tmp18; fftw_real tmp30; fftw_real tmp21; fftw_real tmp31; fftw_real tmp27; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[3 * istride]); tmp3 = tmp1 - tmp2; tmp11 = tmp1 + tmp2; tmp24 = c_im(input[0]); tmp25 = c_im(input[3 * istride]); tmp26 = tmp24 - tmp25; tmp33 = tmp24 + tmp25; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[5 * istride]); tmp6 = tmp4 - tmp5; tmp12 = tmp4 + tmp5; tmp7 = c_re(input[4 * istride]); tmp8 = c_re(input[istride]); tmp9 = tmp7 - tmp8; tmp13 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp14 = tmp12 + tmp13; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = c_im(input[2 * istride]); tmp17 = c_im(input[5 * istride]); tmp18 = tmp16 - tmp17; tmp30 = tmp16 + tmp17; tmp19 = c_im(input[4 * istride]); tmp20 = c_im(input[istride]); tmp21 = tmp19 - tmp20; tmp31 = tmp19 + tmp20; } tmp27 = tmp18 + tmp21; tmp34 = tmp30 + tmp31; { fftw_real tmp15; fftw_real tmp22; fftw_real tmp29; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; c_re(output[3 * ostride]) = tmp3 + tmp10; tmp15 = tmp3 - (K500000000 * tmp10); tmp22 = K866025403 * (tmp18 - tmp21); c_re(output[5 * ostride]) = tmp15 - tmp22; c_re(output[ostride]) = tmp15 + tmp22; c_re(output[0]) = tmp11 + tmp14; tmp29 = tmp11 - (K500000000 * tmp14); tmp32 = K866025403 * (tmp30 - tmp31); c_re(output[2 * ostride]) = tmp29 - tmp32; c_re(output[4 * ostride]) = tmp29 + tmp32; } { fftw_real tmp23; fftw_real tmp28; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; c_im(output[3 * ostride]) = tmp26 + tmp27; tmp23 = K866025403 * (tmp9 - tmp6); tmp28 = tmp26 - (K500000000 * tmp27); c_im(output[ostride]) = tmp23 + tmp28; c_im(output[5 * ostride]) = tmp28 - tmp23; c_im(output[0]) = tmp33 + tmp34; tmp35 = tmp33 - (K500000000 * tmp34); tmp36 = K866025403 * (tmp13 - tmp12); c_im(output[2 * ostride]) = tmp35 - tmp36; c_im(output[4 * ostride]) = tmp36 + tmp35; } } fftw_codelet_desc fftw_no_twiddle_6_desc = { "fftw_no_twiddle_6", (void (*)()) fftw_no_twiddle_6, 6, FFTW_FORWARD, FFTW_NOTW, 133, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_7.c������������������������������������������������������������������������������0000644�0001754�0000144�00000013726�07637527106�010137� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 7 */ /* * This function contains 60 FP additions, 36 FP multiplications, * (or, 60 additions, 36 multiplications, 0 fused multiply/add), * 22 stack variables, and 28 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_7(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp31; fftw_real tmp4; fftw_real tmp26; fftw_real tmp14; fftw_real tmp33; fftw_real tmp7; fftw_real tmp28; fftw_real tmp20; fftw_real tmp30; fftw_real tmp10; fftw_real tmp27; fftw_real tmp17; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp31 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp12; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[6 * istride]); tmp4 = tmp2 + tmp3; tmp26 = tmp3 - tmp2; tmp12 = c_im(input[istride]); tmp13 = c_im(input[6 * istride]); tmp14 = tmp12 - tmp13; tmp33 = tmp12 + tmp13; } { fftw_real tmp5; fftw_real tmp6; fftw_real tmp18; fftw_real tmp19; ASSERT_ALIGNED_DOUBLE; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[5 * istride]); tmp7 = tmp5 + tmp6; tmp28 = tmp6 - tmp5; tmp18 = c_im(input[2 * istride]); tmp19 = c_im(input[5 * istride]); tmp20 = tmp18 - tmp19; tmp30 = tmp18 + tmp19; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp15; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[3 * istride]); tmp9 = c_re(input[4 * istride]); tmp10 = tmp8 + tmp9; tmp27 = tmp9 - tmp8; tmp15 = c_im(input[3 * istride]); tmp16 = c_im(input[4 * istride]); tmp17 = tmp15 - tmp16; tmp32 = tmp15 + tmp16; } { fftw_real tmp23; fftw_real tmp22; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10; tmp23 = (K974927912 * tmp14) - (K433883739 * tmp20) - (K781831482 * tmp17); tmp22 = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); c_re(output[5 * ostride]) = tmp22 - tmp23; c_re(output[2 * ostride]) = tmp22 + tmp23; { fftw_real tmp25; fftw_real tmp24; fftw_real tmp21; fftw_real tmp11; ASSERT_ALIGNED_DOUBLE; tmp25 = (K781831482 * tmp14) + (K433883739 * tmp17) + (K974927912 * tmp20); tmp24 = tmp1 + (K623489801 * tmp4) - (K900968867 * tmp10) - (K222520933 * tmp7); c_re(output[6 * ostride]) = tmp24 - tmp25; c_re(output[ostride]) = tmp24 + tmp25; tmp21 = (K433883739 * tmp14) + (K974927912 * tmp17) - (K781831482 * tmp20); tmp11 = tmp1 + (K623489801 * tmp7) - (K222520933 * tmp10) - (K900968867 * tmp4); c_re(output[4 * ostride]) = tmp11 - tmp21; c_re(output[3 * ostride]) = tmp11 + tmp21; } c_im(output[0]) = tmp33 + tmp32 + tmp30 + tmp31; tmp35 = (K781831482 * tmp26) + (K974927912 * tmp28) + (K433883739 * tmp27); tmp36 = (K623489801 * tmp33) + tmp31 - (K222520933 * tmp30) - (K900968867 * tmp32); c_im(output[ostride]) = tmp35 + tmp36; c_im(output[6 * ostride]) = tmp36 - tmp35; { fftw_real tmp29; fftw_real tmp34; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp29 = (K433883739 * tmp26) + (K974927912 * tmp27) - (K781831482 * tmp28); tmp34 = (K623489801 * tmp30) + tmp31 - (K222520933 * tmp32) - (K900968867 * tmp33); c_im(output[3 * ostride]) = tmp29 + tmp34; c_im(output[4 * ostride]) = tmp34 - tmp29; tmp37 = (K974927912 * tmp26) - (K781831482 * tmp27) - (K433883739 * tmp28); tmp38 = (K623489801 * tmp32) + tmp31 - (K900968867 * tmp30) - (K222520933 * tmp33); c_im(output[2 * ostride]) = tmp37 + tmp38; c_im(output[5 * ostride]) = tmp38 - tmp37; } } } fftw_codelet_desc fftw_no_twiddle_7_desc = { "fftw_no_twiddle_7", (void (*)()) fftw_no_twiddle_7, 7, FFTW_FORWARD, FFTW_NOTW, 155, 0, (const int *) 0, }; ������������������������������������������fftw-2.1.5/fftw/fn_8.c������������������������������������������������������������������������������0000644�0001754�0000144�00000013203�07637527102�010122� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 8 */ /* * This function contains 52 FP additions, 4 FP multiplications, * (or, 52 additions, 4 multiplications, 0 fused multiply/add), * 26 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_8(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp23; fftw_real tmp18; fftw_real tmp38; fftw_real tmp6; fftw_real tmp37; fftw_real tmp21; fftw_real tmp24; fftw_real tmp13; fftw_real tmp49; fftw_real tmp35; fftw_real tmp43; fftw_real tmp10; fftw_real tmp48; fftw_real tmp30; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[4 * istride]); tmp3 = tmp1 + tmp2; tmp23 = tmp1 - tmp2; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp16 = c_im(input[0]); tmp17 = c_im(input[4 * istride]); tmp18 = tmp16 + tmp17; tmp38 = tmp16 - tmp17; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[6 * istride]); tmp6 = tmp4 + tmp5; tmp37 = tmp4 - tmp5; } tmp19 = c_im(input[2 * istride]); tmp20 = c_im(input[6 * istride]); tmp21 = tmp19 + tmp20; tmp24 = tmp19 - tmp20; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp31; fftw_real tmp32; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[7 * istride]); tmp12 = c_re(input[3 * istride]); tmp31 = tmp11 - tmp12; tmp32 = c_im(input[7 * istride]); tmp33 = c_im(input[3 * istride]); tmp34 = tmp32 - tmp33; tmp13 = tmp11 + tmp12; tmp49 = tmp32 + tmp33; tmp35 = tmp31 - tmp34; tmp43 = tmp31 + tmp34; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp26; fftw_real tmp27; fftw_real tmp28; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[istride]); tmp9 = c_re(input[5 * istride]); tmp26 = tmp8 - tmp9; tmp27 = c_im(input[istride]); tmp28 = c_im(input[5 * istride]); tmp29 = tmp27 - tmp28; tmp10 = tmp8 + tmp9; tmp48 = tmp27 + tmp28; tmp30 = tmp26 + tmp29; tmp42 = tmp29 - tmp26; } } { fftw_real tmp7; fftw_real tmp14; fftw_real tmp15; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; c_re(output[4 * ostride]) = tmp7 - tmp14; c_re(output[0]) = tmp7 + tmp14; tmp15 = tmp13 - tmp10; tmp22 = tmp18 - tmp21; c_im(output[2 * ostride]) = tmp15 + tmp22; c_im(output[6 * ostride]) = tmp22 - tmp15; } { fftw_real tmp51; fftw_real tmp52; fftw_real tmp47; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; tmp51 = tmp18 + tmp21; tmp52 = tmp48 + tmp49; c_im(output[4 * ostride]) = tmp51 - tmp52; c_im(output[0]) = tmp51 + tmp52; tmp47 = tmp3 - tmp6; tmp50 = tmp48 - tmp49; c_re(output[6 * ostride]) = tmp47 - tmp50; c_re(output[2 * ostride]) = tmp47 + tmp50; } { fftw_real tmp25; fftw_real tmp36; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp25 = tmp23 + tmp24; tmp36 = K707106781 * (tmp30 + tmp35); c_re(output[5 * ostride]) = tmp25 - tmp36; c_re(output[ostride]) = tmp25 + tmp36; tmp39 = tmp37 + tmp38; tmp40 = K707106781 * (tmp35 - tmp30); c_im(output[7 * ostride]) = tmp39 - tmp40; c_im(output[3 * ostride]) = tmp39 + tmp40; } { fftw_real tmp45; fftw_real tmp46; fftw_real tmp41; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp38 - tmp37; tmp46 = K707106781 * (tmp42 + tmp43); c_im(output[5 * ostride]) = tmp45 - tmp46; c_im(output[ostride]) = tmp45 + tmp46; tmp41 = tmp23 - tmp24; tmp44 = K707106781 * (tmp42 - tmp43); c_re(output[7 * ostride]) = tmp41 - tmp44; c_re(output[3 * ostride]) = tmp41 + tmp44; } } fftw_codelet_desc fftw_no_twiddle_8_desc = { "fftw_no_twiddle_8", (void (*)()) fftw_no_twiddle_8, 8, FFTW_FORWARD, FFTW_NOTW, 177, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_9.c������������������������������������������������������������������������������0000644�0001754�0000144�00000020545�07637527104�010134� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:38 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 9 */ /* * This function contains 80 FP additions, 40 FP multiplications, * (or, 60 additions, 20 multiplications, 20 fused multiply/add), * 30 stack variables, and 36 memory accesses */ static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_9(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp17; fftw_real tmp50; fftw_real tmp20; fftw_real tmp78; fftw_real tmp53; fftw_real tmp10; fftw_real tmp26; fftw_real tmp58; fftw_real tmp74; fftw_real tmp31; fftw_real tmp59; fftw_real tmp15; fftw_real tmp37; fftw_real tmp62; fftw_real tmp75; fftw_real tmp42; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[3 * istride]); tmp3 = c_re(input[6 * istride]); tmp4 = tmp2 + tmp3; tmp5 = tmp1 + tmp4; tmp17 = tmp1 - (K500000000 * tmp4); tmp50 = K866025403 * (tmp3 - tmp2); } { fftw_real tmp51; fftw_real tmp18; fftw_real tmp19; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp51 = c_im(input[0]); tmp18 = c_im(input[3 * istride]); tmp19 = c_im(input[6 * istride]); tmp52 = tmp18 + tmp19; tmp20 = K866025403 * (tmp18 - tmp19); tmp78 = tmp51 + tmp52; tmp53 = tmp51 - (K500000000 * tmp52); } { fftw_real tmp6; fftw_real tmp28; fftw_real tmp9; fftw_real tmp27; fftw_real tmp25; fftw_real tmp29; fftw_real tmp22; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[istride]); tmp28 = c_im(input[istride]); { fftw_real tmp7; fftw_real tmp8; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[4 * istride]); tmp8 = c_re(input[7 * istride]); tmp9 = tmp7 + tmp8; tmp27 = K866025403 * (tmp8 - tmp7); tmp23 = c_im(input[4 * istride]); tmp24 = c_im(input[7 * istride]); tmp25 = K866025403 * (tmp23 - tmp24); tmp29 = tmp23 + tmp24; } tmp10 = tmp6 + tmp9; tmp22 = tmp6 - (K500000000 * tmp9); tmp26 = tmp22 + tmp25; tmp58 = tmp22 - tmp25; tmp74 = tmp28 + tmp29; tmp30 = tmp28 - (K500000000 * tmp29); tmp31 = tmp27 + tmp30; tmp59 = tmp30 - tmp27; } { fftw_real tmp11; fftw_real tmp39; fftw_real tmp14; fftw_real tmp38; fftw_real tmp36; fftw_real tmp40; fftw_real tmp33; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[2 * istride]); tmp39 = c_im(input[2 * istride]); { fftw_real tmp12; fftw_real tmp13; fftw_real tmp34; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp12 = c_re(input[5 * istride]); tmp13 = c_re(input[8 * istride]); tmp14 = tmp12 + tmp13; tmp38 = K866025403 * (tmp13 - tmp12); tmp34 = c_im(input[5 * istride]); tmp35 = c_im(input[8 * istride]); tmp36 = K866025403 * (tmp34 - tmp35); tmp40 = tmp34 + tmp35; } tmp15 = tmp11 + tmp14; tmp33 = tmp11 - (K500000000 * tmp14); tmp37 = tmp33 + tmp36; tmp62 = tmp33 - tmp36; tmp75 = tmp39 + tmp40; tmp41 = tmp39 - (K500000000 * tmp40); tmp42 = tmp38 + tmp41; tmp61 = tmp41 - tmp38; } { fftw_real tmp76; fftw_real tmp16; fftw_real tmp73; fftw_real tmp77; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp76 = K866025403 * (tmp74 - tmp75); tmp16 = tmp10 + tmp15; tmp73 = tmp5 - (K500000000 * tmp16); c_re(output[0]) = tmp5 + tmp16; c_re(output[3 * ostride]) = tmp73 + tmp76; c_re(output[6 * ostride]) = tmp73 - tmp76; tmp77 = K866025403 * (tmp15 - tmp10); tmp79 = tmp74 + tmp75; tmp80 = tmp78 - (K500000000 * tmp79); c_im(output[3 * ostride]) = tmp77 + tmp80; c_im(output[6 * ostride]) = tmp80 - tmp77; c_im(output[0]) = tmp78 + tmp79; } { fftw_real tmp21; fftw_real tmp54; fftw_real tmp44; fftw_real tmp49; fftw_real tmp48; fftw_real tmp55; fftw_real tmp45; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp21 = tmp17 + tmp20; tmp54 = tmp50 + tmp53; { fftw_real tmp32; fftw_real tmp43; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp32 = (K766044443 * tmp26) + (K642787609 * tmp31); tmp43 = (K173648177 * tmp37) + (K984807753 * tmp42); tmp44 = tmp32 + tmp43; tmp49 = K866025403 * (tmp43 - tmp32); tmp46 = (K766044443 * tmp31) - (K642787609 * tmp26); tmp47 = (K173648177 * tmp42) - (K984807753 * tmp37); tmp48 = K866025403 * (tmp46 - tmp47); tmp55 = tmp46 + tmp47; } c_re(output[ostride]) = tmp21 + tmp44; tmp45 = tmp21 - (K500000000 * tmp44); c_re(output[7 * ostride]) = tmp45 - tmp48; c_re(output[4 * ostride]) = tmp45 + tmp48; c_im(output[ostride]) = tmp54 + tmp55; tmp56 = tmp54 - (K500000000 * tmp55); c_im(output[4 * ostride]) = tmp49 + tmp56; c_im(output[7 * ostride]) = tmp56 - tmp49; } { fftw_real tmp57; fftw_real tmp69; fftw_real tmp72; fftw_real tmp66; fftw_real tmp64; fftw_real tmp65; fftw_real tmp71; fftw_real tmp70; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp67; fftw_real tmp68; fftw_real tmp60; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp57 = tmp17 - tmp20; tmp67 = (K173648177 * tmp59) - (K984807753 * tmp58); tmp68 = (K342020143 * tmp62) + (K939692620 * tmp61); tmp69 = tmp67 - tmp68; tmp72 = K866025403 * (tmp67 + tmp68); tmp66 = tmp53 - tmp50; tmp60 = (K173648177 * tmp58) + (K984807753 * tmp59); tmp63 = (K342020143 * tmp61) - (K939692620 * tmp62); tmp64 = tmp60 + tmp63; tmp65 = K866025403 * (tmp63 - tmp60); } c_re(output[2 * ostride]) = tmp57 + tmp64; tmp71 = tmp57 - (K500000000 * tmp64); c_re(output[8 * ostride]) = tmp71 - tmp72; c_re(output[5 * ostride]) = tmp71 + tmp72; c_im(output[2 * ostride]) = tmp66 + tmp69; tmp70 = tmp66 - (K500000000 * tmp69); c_im(output[5 * ostride]) = tmp65 + tmp70; c_im(output[8 * ostride]) = tmp70 - tmp65; } } fftw_codelet_desc fftw_no_twiddle_9_desc = { "fftw_no_twiddle_9", (void (*)()) fftw_no_twiddle_9, 9, FFTW_FORWARD, FFTW_NOTW, 199, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_10.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000020041�07637527104�010173� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:38 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 10 */ /* * This function contains 84 FP additions, 24 FP multiplications, * (or, 72 additions, 12 multiplications, 12 fused multiply/add), * 36 stack variables, and 40 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_10(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp19; fftw_real tmp64; fftw_real tmp76; fftw_real tmp68; fftw_real tmp69; fftw_real tmp10; fftw_real tmp17; fftw_real tmp18; fftw_real tmp74; fftw_real tmp73; fftw_real tmp22; fftw_real tmp25; fftw_real tmp26; fftw_real tmp36; fftw_real tmp43; fftw_real tmp59; fftw_real tmp60; fftw_real tmp65; fftw_real tmp52; fftw_real tmp55; fftw_real tmp77; fftw_real tmp78; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[5 * istride]); tmp3 = tmp1 - tmp2; tmp19 = tmp1 + tmp2; tmp62 = c_im(input[0]); tmp63 = c_im(input[5 * istride]); tmp64 = tmp62 - tmp63; tmp76 = tmp62 + tmp63; } { fftw_real tmp6; fftw_real tmp20; fftw_real tmp16; fftw_real tmp24; fftw_real tmp9; fftw_real tmp21; fftw_real tmp13; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[7 * istride]); tmp6 = tmp4 - tmp5; tmp20 = tmp4 + tmp5; tmp14 = c_re(input[6 * istride]); tmp15 = c_re(input[istride]); tmp16 = tmp14 - tmp15; tmp24 = tmp14 + tmp15; } { fftw_real tmp7; fftw_real tmp8; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[8 * istride]); tmp8 = c_re(input[3 * istride]); tmp9 = tmp7 - tmp8; tmp21 = tmp7 + tmp8; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[9 * istride]); tmp13 = tmp11 - tmp12; tmp23 = tmp11 + tmp12; } tmp68 = tmp6 - tmp9; tmp69 = tmp13 - tmp16; tmp10 = tmp6 + tmp9; tmp17 = tmp13 + tmp16; tmp18 = tmp10 + tmp17; tmp74 = tmp20 - tmp21; tmp73 = tmp23 - tmp24; tmp22 = tmp20 + tmp21; tmp25 = tmp23 + tmp24; tmp26 = tmp22 + tmp25; } { fftw_real tmp32; fftw_real tmp53; fftw_real tmp42; fftw_real tmp51; fftw_real tmp35; fftw_real tmp54; fftw_real tmp39; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp30; fftw_real tmp31; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp30 = c_im(input[2 * istride]); tmp31 = c_im(input[7 * istride]); tmp32 = tmp30 - tmp31; tmp53 = tmp30 + tmp31; tmp40 = c_im(input[6 * istride]); tmp41 = c_im(input[istride]); tmp42 = tmp40 - tmp41; tmp51 = tmp40 + tmp41; } { fftw_real tmp33; fftw_real tmp34; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp33 = c_im(input[8 * istride]); tmp34 = c_im(input[3 * istride]); tmp35 = tmp33 - tmp34; tmp54 = tmp33 + tmp34; tmp37 = c_im(input[4 * istride]); tmp38 = c_im(input[9 * istride]); tmp39 = tmp37 - tmp38; tmp50 = tmp37 + tmp38; } tmp36 = tmp32 - tmp35; tmp43 = tmp39 - tmp42; tmp59 = tmp32 + tmp35; tmp60 = tmp39 + tmp42; tmp65 = tmp59 + tmp60; tmp52 = tmp50 - tmp51; tmp55 = tmp53 - tmp54; tmp77 = tmp53 + tmp54; tmp78 = tmp50 + tmp51; tmp79 = tmp77 + tmp78; } c_re(output[5 * ostride]) = tmp3 + tmp18; { fftw_real tmp44; fftw_real tmp46; fftw_real tmp29; fftw_real tmp45; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp44 = (K951056516 * tmp36) + (K587785252 * tmp43); tmp46 = (K951056516 * tmp43) - (K587785252 * tmp36); tmp27 = K559016994 * (tmp10 - tmp17); tmp28 = tmp3 - (K250000000 * tmp18); tmp29 = tmp27 + tmp28; tmp45 = tmp28 - tmp27; c_re(output[9 * ostride]) = tmp29 - tmp44; c_re(output[ostride]) = tmp29 + tmp44; c_re(output[7 * ostride]) = tmp45 - tmp46; c_re(output[3 * ostride]) = tmp45 + tmp46; } c_re(output[0]) = tmp19 + tmp26; { fftw_real tmp56; fftw_real tmp58; fftw_real tmp49; fftw_real tmp57; fftw_real tmp47; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp56 = (K951056516 * tmp52) - (K587785252 * tmp55); tmp58 = (K951056516 * tmp55) + (K587785252 * tmp52); tmp47 = tmp19 - (K250000000 * tmp26); tmp48 = K559016994 * (tmp22 - tmp25); tmp49 = tmp47 - tmp48; tmp57 = tmp48 + tmp47; c_re(output[2 * ostride]) = tmp49 - tmp56; c_re(output[8 * ostride]) = tmp49 + tmp56; c_re(output[4 * ostride]) = tmp57 - tmp58; c_re(output[6 * ostride]) = tmp57 + tmp58; } c_im(output[5 * ostride]) = tmp65 + tmp64; { fftw_real tmp70; fftw_real tmp72; fftw_real tmp67; fftw_real tmp71; fftw_real tmp61; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp70 = (K951056516 * tmp68) + (K587785252 * tmp69); tmp72 = (K951056516 * tmp69) - (K587785252 * tmp68); tmp61 = K559016994 * (tmp59 - tmp60); tmp66 = tmp64 - (K250000000 * tmp65); tmp67 = tmp61 + tmp66; tmp71 = tmp66 - tmp61; c_im(output[ostride]) = tmp67 - tmp70; c_im(output[9 * ostride]) = tmp70 + tmp67; c_im(output[3 * ostride]) = tmp71 - tmp72; c_im(output[7 * ostride]) = tmp72 + tmp71; } c_im(output[0]) = tmp79 + tmp76; { fftw_real tmp75; fftw_real tmp83; fftw_real tmp82; fftw_real tmp84; fftw_real tmp80; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp75 = (K951056516 * tmp73) - (K587785252 * tmp74); tmp83 = (K951056516 * tmp74) + (K587785252 * tmp73); tmp80 = tmp76 - (K250000000 * tmp79); tmp81 = K559016994 * (tmp77 - tmp78); tmp82 = tmp80 - tmp81; tmp84 = tmp81 + tmp80; c_im(output[2 * ostride]) = tmp75 + tmp82; c_im(output[8 * ostride]) = tmp82 - tmp75; c_im(output[4 * ostride]) = tmp83 + tmp84; c_im(output[6 * ostride]) = tmp84 - tmp83; } } fftw_codelet_desc fftw_no_twiddle_10_desc = { "fftw_no_twiddle_10", (void (*)()) fftw_no_twiddle_10, 10, FFTW_FORWARD, FFTW_NOTW, 221, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_11.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000023621�07637527122�010203� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:38 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 11 */ /* * This function contains 140 FP additions, 100 FP multiplications, * (or, 140 additions, 100 multiplications, 0 fused multiply/add), * 30 stack variables, and 44 memory accesses */ static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_11(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp50; fftw_real tmp4; fftw_real tmp42; fftw_real tmp20; fftw_real tmp53; fftw_real tmp29; fftw_real tmp49; fftw_real tmp7; fftw_real tmp46; fftw_real tmp10; fftw_real tmp43; fftw_real tmp23; fftw_real tmp52; fftw_real tmp13; fftw_real tmp45; fftw_real tmp32; fftw_real tmp48; fftw_real tmp26; fftw_real tmp51; fftw_real tmp16; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp18; fftw_real tmp19; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp50 = c_im(input[0]); tmp2 = c_re(input[istride]); tmp3 = c_re(input[10 * istride]); tmp4 = tmp2 + tmp3; tmp42 = tmp3 - tmp2; tmp18 = c_im(input[istride]); tmp19 = c_im(input[10 * istride]); tmp20 = tmp18 - tmp19; tmp53 = tmp18 + tmp19; { fftw_real tmp27; fftw_real tmp28; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp27 = c_im(input[2 * istride]); tmp28 = c_im(input[9 * istride]); tmp29 = tmp27 - tmp28; tmp49 = tmp27 + tmp28; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[9 * istride]); tmp7 = tmp5 + tmp6; tmp46 = tmp6 - tmp5; } } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp30; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[3 * istride]); tmp9 = c_re(input[8 * istride]); tmp10 = tmp8 + tmp9; tmp43 = tmp9 - tmp8; { fftw_real tmp21; fftw_real tmp22; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp21 = c_im(input[3 * istride]); tmp22 = c_im(input[8 * istride]); tmp23 = tmp21 - tmp22; tmp52 = tmp21 + tmp22; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[7 * istride]); tmp13 = tmp11 + tmp12; tmp45 = tmp12 - tmp11; } tmp30 = c_im(input[4 * istride]); tmp31 = c_im(input[7 * istride]); tmp32 = tmp30 - tmp31; tmp48 = tmp30 + tmp31; { fftw_real tmp24; fftw_real tmp25; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp24 = c_im(input[5 * istride]); tmp25 = c_im(input[6 * istride]); tmp26 = tmp24 - tmp25; tmp51 = tmp24 + tmp25; tmp14 = c_re(input[5 * istride]); tmp15 = c_re(input[6 * istride]); tmp16 = tmp14 + tmp15; tmp44 = tmp15 - tmp14; } } { fftw_real tmp35; fftw_real tmp34; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10 + tmp13 + tmp16; { fftw_real tmp41; fftw_real tmp40; fftw_real tmp37; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp41 = (K540640817 * tmp20) + (K989821441 * tmp23) + (K755749574 * tmp32) + (K281732556 * tmp26) + (K909631995 * tmp29); tmp40 = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp7) - (K959492973 * tmp16) - (K654860733 * tmp13) - (K142314838 * tmp10); c_re(output[10 * ostride]) = tmp40 - tmp41; c_re(output[ostride]) = tmp40 + tmp41; tmp37 = (K755749574 * tmp20) + (K540640817 * tmp23) + (K281732556 * tmp32) - (K989821441 * tmp29) - (K909631995 * tmp26); tmp36 = tmp1 + (K841253532 * tmp10) + (K415415013 * tmp16) - (K959492973 * tmp13) - (K142314838 * tmp7) - (K654860733 * tmp4); c_re(output[7 * ostride]) = tmp36 - tmp37; c_re(output[4 * ostride]) = tmp36 + tmp37; } tmp35 = (K989821441 * tmp20) + (K540640817 * tmp32) + (K755749574 * tmp26) - (K281732556 * tmp29) - (K909631995 * tmp23); tmp34 = tmp1 + (K415415013 * tmp10) + (K841253532 * tmp13) - (K654860733 * tmp16) - (K959492973 * tmp7) - (K142314838 * tmp4); c_re(output[8 * ostride]) = tmp34 - tmp35; c_re(output[3 * ostride]) = tmp34 + tmp35; { fftw_real tmp39; fftw_real tmp38; fftw_real tmp33; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp39 = (K909631995 * tmp20) + (K755749574 * tmp29) - (K540640817 * tmp26) - (K989821441 * tmp32) - (K281732556 * tmp23); tmp38 = tmp1 + (K415415013 * tmp4) + (K841253532 * tmp16) - (K142314838 * tmp13) - (K959492973 * tmp10) - (K654860733 * tmp7); c_re(output[9 * ostride]) = tmp38 - tmp39; c_re(output[2 * ostride]) = tmp38 + tmp39; tmp33 = (K281732556 * tmp20) + (K755749574 * tmp23) + (K989821441 * tmp26) - (K540640817 * tmp29) - (K909631995 * tmp32); tmp17 = tmp1 + (K841253532 * tmp7) + (K415415013 * tmp13) - (K142314838 * tmp16) - (K654860733 * tmp10) - (K959492973 * tmp4); c_re(output[6 * ostride]) = tmp17 - tmp33; c_re(output[5 * ostride]) = tmp17 + tmp33; } c_im(output[0]) = tmp53 + tmp52 + tmp48 + tmp51 + tmp49 + tmp50; { fftw_real tmp47; fftw_real tmp54; fftw_real tmp57; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp47 = (K281732556 * tmp42) + (K755749574 * tmp43) + (K989821441 * tmp44) - (K909631995 * tmp45) - (K540640817 * tmp46); tmp54 = (K415415013 * tmp48) + (K841253532 * tmp49) + tmp50 - (K142314838 * tmp51) - (K654860733 * tmp52) - (K959492973 * tmp53); c_im(output[5 * ostride]) = tmp47 + tmp54; c_im(output[6 * ostride]) = tmp54 - tmp47; tmp57 = (K540640817 * tmp42) + (K909631995 * tmp46) + (K989821441 * tmp43) + (K755749574 * tmp45) + (K281732556 * tmp44); tmp58 = (K841253532 * tmp53) + (K415415013 * tmp49) + tmp50 - (K959492973 * tmp51) - (K654860733 * tmp48) - (K142314838 * tmp52); c_im(output[ostride]) = tmp57 + tmp58; c_im(output[10 * ostride]) = tmp58 - tmp57; } tmp59 = (K909631995 * tmp42) + (K755749574 * tmp46) - (K540640817 * tmp44) - (K989821441 * tmp45) - (K281732556 * tmp43); tmp60 = (K415415013 * tmp53) + (K841253532 * tmp51) + tmp50 - (K654860733 * tmp49) - (K142314838 * tmp48) - (K959492973 * tmp52); c_im(output[2 * ostride]) = tmp59 + tmp60; c_im(output[9 * ostride]) = tmp60 - tmp59; { fftw_real tmp55; fftw_real tmp56; fftw_real tmp61; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp55 = (K989821441 * tmp42) + (K540640817 * tmp45) + (K755749574 * tmp44) - (K909631995 * tmp43) - (K281732556 * tmp46); tmp56 = (K415415013 * tmp52) + (K841253532 * tmp48) + tmp50 - (K959492973 * tmp49) - (K654860733 * tmp51) - (K142314838 * tmp53); c_im(output[3 * ostride]) = tmp55 + tmp56; c_im(output[8 * ostride]) = tmp56 - tmp55; tmp61 = (K755749574 * tmp42) + (K540640817 * tmp43) + (K281732556 * tmp45) - (K909631995 * tmp44) - (K989821441 * tmp46); tmp62 = (K841253532 * tmp52) + (K415415013 * tmp51) + tmp50 - (K142314838 * tmp49) - (K959492973 * tmp48) - (K654860733 * tmp53); c_im(output[4 * ostride]) = tmp61 + tmp62; c_im(output[7 * ostride]) = tmp62 - tmp61; } } } fftw_codelet_desc fftw_no_twiddle_11_desc = { "fftw_no_twiddle_11", (void (*)()) fftw_no_twiddle_11, 11, FFTW_FORWARD, FFTW_NOTW, 243, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_12.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000021526�07637527105�010207� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:40 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 12 */ /* * This function contains 96 FP additions, 16 FP multiplications, * (or, 88 additions, 8 multiplications, 8 fused multiply/add), * 40 stack variables, and 48 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_12(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp53; fftw_real tmp36; fftw_real tmp28; fftw_real tmp35; fftw_real tmp54; fftw_real tmp10; fftw_real tmp56; fftw_real tmp39; fftw_real tmp33; fftw_real tmp38; fftw_real tmp57; fftw_real tmp16; fftw_real tmp42; fftw_real tmp72; fftw_real tmp45; fftw_real tmp92; fftw_real tmp75; fftw_real tmp21; fftw_real tmp47; fftw_real tmp77; fftw_real tmp50; fftw_real tmp93; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[4 * istride]); tmp3 = c_re(input[8 * istride]); tmp4 = tmp2 + tmp3; tmp5 = tmp1 + tmp4; tmp53 = tmp1 - (K500000000 * tmp4); tmp36 = K866025403 * (tmp3 - tmp2); } { fftw_real tmp24; fftw_real tmp25; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp24 = c_im(input[0]); tmp25 = c_im(input[4 * istride]); tmp26 = c_im(input[8 * istride]); tmp27 = tmp25 + tmp26; tmp28 = tmp24 + tmp27; tmp35 = tmp24 - (K500000000 * tmp27); tmp54 = K866025403 * (tmp25 - tmp26); } { fftw_real tmp6; fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[6 * istride]); tmp7 = c_re(input[10 * istride]); tmp8 = c_re(input[2 * istride]); tmp9 = tmp7 + tmp8; tmp10 = tmp6 + tmp9; tmp56 = tmp6 - (K500000000 * tmp9); tmp39 = K866025403 * (tmp8 - tmp7); } { fftw_real tmp29; fftw_real tmp30; fftw_real tmp31; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp29 = c_im(input[6 * istride]); tmp30 = c_im(input[10 * istride]); tmp31 = c_im(input[2 * istride]); tmp32 = tmp30 + tmp31; tmp33 = tmp29 + tmp32; tmp38 = tmp29 - (K500000000 * tmp32); tmp57 = K866025403 * (tmp30 - tmp31); } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp12 = c_re(input[3 * istride]); tmp13 = c_re(input[7 * istride]); tmp14 = c_re(input[11 * istride]); tmp15 = tmp13 + tmp14; tmp16 = tmp12 + tmp15; tmp42 = tmp12 - (K500000000 * tmp15); tmp72 = K866025403 * (tmp14 - tmp13); } { fftw_real tmp73; fftw_real tmp43; fftw_real tmp44; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_im(input[3 * istride]); tmp43 = c_im(input[7 * istride]); tmp44 = c_im(input[11 * istride]); tmp74 = tmp43 + tmp44; tmp45 = K866025403 * (tmp43 - tmp44); tmp92 = tmp73 + tmp74; tmp75 = tmp73 - (K500000000 * tmp74); } { fftw_real tmp17; fftw_real tmp18; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp17 = c_re(input[9 * istride]); tmp18 = c_re(input[istride]); tmp19 = c_re(input[5 * istride]); tmp20 = tmp18 + tmp19; tmp21 = tmp17 + tmp20; tmp47 = tmp17 - (K500000000 * tmp20); tmp77 = K866025403 * (tmp19 - tmp18); } { fftw_real tmp78; fftw_real tmp48; fftw_real tmp49; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp78 = c_im(input[9 * istride]); tmp48 = c_im(input[istride]); tmp49 = c_im(input[5 * istride]); tmp79 = tmp48 + tmp49; tmp50 = K866025403 * (tmp48 - tmp49); tmp93 = tmp78 + tmp79; tmp80 = tmp78 - (K500000000 * tmp79); } { fftw_real tmp11; fftw_real tmp22; fftw_real tmp23; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp11 = tmp5 + tmp10; tmp22 = tmp16 + tmp21; c_re(output[6 * ostride]) = tmp11 - tmp22; c_re(output[0]) = tmp11 + tmp22; { fftw_real tmp91; fftw_real tmp94; fftw_real tmp95; fftw_real tmp96; ASSERT_ALIGNED_DOUBLE; tmp91 = tmp5 - tmp10; tmp94 = tmp92 - tmp93; c_re(output[3 * ostride]) = tmp91 - tmp94; c_re(output[9 * ostride]) = tmp91 + tmp94; tmp95 = tmp28 + tmp33; tmp96 = tmp92 + tmp93; c_im(output[6 * ostride]) = tmp95 - tmp96; c_im(output[0]) = tmp95 + tmp96; } tmp23 = tmp16 - tmp21; tmp34 = tmp28 - tmp33; c_im(output[3 * ostride]) = tmp23 + tmp34; c_im(output[9 * ostride]) = tmp34 - tmp23; { fftw_real tmp63; fftw_real tmp83; fftw_real tmp82; fftw_real tmp84; fftw_real tmp66; fftw_real tmp70; fftw_real tmp69; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp61; fftw_real tmp62; fftw_real tmp76; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp61 = tmp36 + tmp35; tmp62 = tmp39 + tmp38; tmp63 = tmp61 - tmp62; tmp83 = tmp61 + tmp62; tmp76 = tmp72 + tmp75; tmp81 = tmp77 + tmp80; tmp82 = tmp76 - tmp81; tmp84 = tmp76 + tmp81; } { fftw_real tmp64; fftw_real tmp65; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp64 = tmp42 + tmp45; tmp65 = tmp47 + tmp50; tmp66 = tmp64 - tmp65; tmp70 = tmp64 + tmp65; tmp67 = tmp53 + tmp54; tmp68 = tmp56 + tmp57; tmp69 = tmp67 + tmp68; tmp71 = tmp67 - tmp68; } c_im(output[ostride]) = tmp63 - tmp66; c_im(output[7 * ostride]) = tmp63 + tmp66; c_re(output[10 * ostride]) = tmp69 - tmp70; c_re(output[4 * ostride]) = tmp69 + tmp70; c_re(output[7 * ostride]) = tmp71 - tmp82; c_re(output[ostride]) = tmp71 + tmp82; c_im(output[10 * ostride]) = tmp83 - tmp84; c_im(output[4 * ostride]) = tmp83 + tmp84; } { fftw_real tmp41; fftw_real tmp89; fftw_real tmp88; fftw_real tmp90; fftw_real tmp52; fftw_real tmp60; fftw_real tmp59; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp37; fftw_real tmp40; fftw_real tmp86; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp37 = tmp35 - tmp36; tmp40 = tmp38 - tmp39; tmp41 = tmp37 - tmp40; tmp89 = tmp37 + tmp40; tmp86 = tmp75 - tmp72; tmp87 = tmp80 - tmp77; tmp88 = tmp86 - tmp87; tmp90 = tmp86 + tmp87; } { fftw_real tmp46; fftw_real tmp51; fftw_real tmp55; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp46 = tmp42 - tmp45; tmp51 = tmp47 - tmp50; tmp52 = tmp46 - tmp51; tmp60 = tmp46 + tmp51; tmp55 = tmp53 - tmp54; tmp58 = tmp56 - tmp57; tmp59 = tmp55 + tmp58; tmp85 = tmp55 - tmp58; } c_im(output[5 * ostride]) = tmp41 - tmp52; c_im(output[11 * ostride]) = tmp41 + tmp52; c_re(output[2 * ostride]) = tmp59 - tmp60; c_re(output[8 * ostride]) = tmp59 + tmp60; c_re(output[11 * ostride]) = tmp85 - tmp88; c_re(output[5 * ostride]) = tmp85 + tmp88; c_im(output[2 * ostride]) = tmp89 - tmp90; c_im(output[8 * ostride]) = tmp89 + tmp90; } } } fftw_codelet_desc fftw_no_twiddle_12_desc = { "fftw_no_twiddle_12", (void (*)()) fftw_no_twiddle_12, 12, FFTW_FORWARD, FFTW_NOTW, 265, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_13.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000040725�07637527115�010213� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:40 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 13 */ /* * This function contains 176 FP additions, 68 FP multiplications, * (or, 138 additions, 30 multiplications, 38 fused multiply/add), * 50 stack variables, and 52 memory accesses */ static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_13(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp146; fftw_real tmp115; fftw_real tmp120; fftw_real tmp125; fftw_real tmp31; fftw_real tmp40; fftw_real tmp116; fftw_real tmp24; fftw_real tmp43; fftw_real tmp36; fftw_real tmp41; fftw_real tmp123; fftw_real tmp126; fftw_real tmp56; fftw_real tmp141; fftw_real tmp147; fftw_real tmp134; fftw_real tmp143; fftw_real tmp67; fftw_real tmp73; fftw_real tmp82; fftw_real tmp137; fftw_real tmp144; fftw_real tmp80; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp146 = c_im(input[0]); { fftw_real tmp15; fftw_real tmp113; fftw_real tmp18; fftw_real tmp29; fftw_real tmp21; fftw_real tmp28; fftw_real tmp22; fftw_real tmp114; fftw_real tmp6; fftw_real tmp32; fftw_real tmp25; fftw_real tmp11; fftw_real tmp33; fftw_real tmp26; fftw_real tmp13; fftw_real tmp14; fftw_real tmp12; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; tmp13 = c_re(input[8 * istride]); tmp14 = c_re(input[5 * istride]); tmp15 = tmp13 + tmp14; tmp113 = tmp13 - tmp14; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[6 * istride]); tmp17 = c_re(input[11 * istride]); tmp18 = tmp16 + tmp17; tmp29 = tmp16 - tmp17; tmp19 = c_re(input[2 * istride]); tmp20 = c_re(input[7 * istride]); tmp21 = tmp19 + tmp20; tmp28 = tmp19 - tmp20; } tmp22 = tmp18 + tmp21; tmp114 = tmp29 + tmp28; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[3 * istride]); tmp4 = c_re(input[9 * istride]); tmp5 = tmp3 + tmp4; tmp6 = tmp2 + tmp5; tmp32 = tmp2 - (K500000000 * tmp5); tmp25 = tmp3 - tmp4; } { fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[12 * istride]); tmp8 = c_re(input[4 * istride]); tmp9 = c_re(input[10 * istride]); tmp10 = tmp8 + tmp9; tmp11 = tmp7 + tmp10; tmp33 = tmp7 - (K500000000 * tmp10); tmp26 = tmp8 - tmp9; } tmp115 = tmp113 - tmp114; { fftw_real tmp118; fftw_real tmp119; fftw_real tmp27; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp118 = tmp113 + (K500000000 * tmp114); tmp119 = K866025403 * (tmp25 + tmp26); tmp120 = tmp118 - tmp119; tmp125 = tmp119 + tmp118; tmp27 = tmp25 - tmp26; tmp30 = tmp28 - tmp29; tmp31 = tmp27 + tmp30; tmp40 = tmp30 - tmp27; } tmp116 = tmp6 - tmp11; tmp12 = tmp6 + tmp11; tmp23 = tmp15 + tmp22; tmp24 = tmp12 + tmp23; tmp43 = K300462606 * (tmp12 - tmp23); { fftw_real tmp34; fftw_real tmp35; fftw_real tmp121; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp34 = tmp32 + tmp33; tmp35 = tmp15 - (K500000000 * tmp22); tmp36 = tmp34 + tmp35; tmp41 = tmp34 - tmp35; tmp121 = tmp32 - tmp33; tmp122 = K866025403 * (tmp18 - tmp21); tmp123 = tmp121 + tmp122; tmp126 = tmp121 - tmp122; } } { fftw_real tmp59; fftw_real tmp131; fftw_real tmp62; fftw_real tmp78; fftw_real tmp65; fftw_real tmp77; fftw_real tmp66; fftw_real tmp132; fftw_real tmp50; fftw_real tmp74; fftw_real tmp69; fftw_real tmp55; fftw_real tmp75; fftw_real tmp70; fftw_real tmp57; fftw_real tmp58; fftw_real tmp71; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp57 = c_im(input[8 * istride]); tmp58 = c_im(input[5 * istride]); tmp59 = tmp57 - tmp58; tmp131 = tmp57 + tmp58; { fftw_real tmp60; fftw_real tmp61; fftw_real tmp63; fftw_real tmp64; ASSERT_ALIGNED_DOUBLE; tmp60 = c_im(input[6 * istride]); tmp61 = c_im(input[11 * istride]); tmp62 = tmp60 - tmp61; tmp78 = tmp60 + tmp61; tmp63 = c_im(input[2 * istride]); tmp64 = c_im(input[7 * istride]); tmp65 = tmp63 - tmp64; tmp77 = tmp63 + tmp64; } tmp66 = tmp62 + tmp65; tmp132 = tmp78 + tmp77; { fftw_real tmp46; fftw_real tmp47; fftw_real tmp48; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp46 = c_im(input[istride]); tmp47 = c_im(input[3 * istride]); tmp48 = c_im(input[9 * istride]); tmp49 = tmp47 + tmp48; tmp50 = tmp46 + tmp49; tmp74 = tmp46 - (K500000000 * tmp49); tmp69 = tmp47 - tmp48; } { fftw_real tmp51; fftw_real tmp52; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp51 = c_im(input[12 * istride]); tmp52 = c_im(input[4 * istride]); tmp53 = c_im(input[10 * istride]); tmp54 = tmp52 + tmp53; tmp55 = tmp51 + tmp54; tmp75 = tmp51 - (K500000000 * tmp54); tmp70 = tmp52 - tmp53; } tmp56 = tmp50 - tmp55; { fftw_real tmp139; fftw_real tmp140; fftw_real tmp130; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp139 = tmp50 + tmp55; tmp140 = tmp131 + tmp132; tmp141 = K300462606 * (tmp139 - tmp140); tmp147 = tmp139 + tmp140; tmp130 = tmp74 + tmp75; tmp133 = tmp131 - (K500000000 * tmp132); tmp134 = tmp130 - tmp133; tmp143 = tmp130 + tmp133; } tmp67 = tmp59 - tmp66; tmp71 = K866025403 * (tmp69 + tmp70); tmp72 = tmp59 + (K500000000 * tmp66); tmp73 = tmp71 - tmp72; tmp82 = tmp71 + tmp72; { fftw_real tmp135; fftw_real tmp136; fftw_real tmp76; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp135 = tmp62 - tmp65; tmp136 = tmp70 - tmp69; tmp137 = tmp135 - tmp136; tmp144 = tmp136 + tmp135; tmp76 = tmp74 - tmp75; tmp79 = K866025403 * (tmp77 - tmp78); tmp80 = tmp76 - tmp79; tmp83 = tmp76 + tmp79; } } c_re(output[0]) = tmp1 + tmp24; { fftw_real tmp99; fftw_real tmp109; fftw_real tmp39; fftw_real tmp105; fftw_real tmp89; fftw_real tmp44; fftw_real tmp68; fftw_real tmp85; fftw_real tmp96; fftw_real tmp108; fftw_real tmp90; fftw_real tmp93; fftw_real tmp94; fftw_real tmp106; fftw_real tmp97; fftw_real tmp98; ASSERT_ALIGNED_DOUBLE; tmp97 = (K113854479 * tmp31) - (K503537032 * tmp36); tmp98 = (K387390585 * tmp40) - (K265966249 * tmp41); tmp99 = tmp97 - tmp98; tmp109 = tmp98 + tmp97; { fftw_real tmp42; fftw_real tmp87; fftw_real tmp37; fftw_real tmp38; fftw_real tmp88; ASSERT_ALIGNED_DOUBLE; tmp42 = (K132983124 * tmp40) + (K258260390 * tmp41); tmp87 = tmp43 - tmp42; tmp37 = (K251768516 * tmp31) + (K075902986 * tmp36); tmp38 = tmp1 - (K083333333 * tmp24); tmp88 = tmp38 - tmp37; tmp39 = (K2_000000000 * tmp37) + tmp38; tmp105 = tmp88 - tmp87; tmp89 = tmp87 + tmp88; tmp44 = (K2_000000000 * tmp42) + tmp43; } { fftw_real tmp81; fftw_real tmp84; fftw_real tmp91; fftw_real tmp92; ASSERT_ALIGNED_DOUBLE; tmp68 = (K575140729 * tmp56) + (K174138601 * tmp67); tmp81 = (K011599105 * tmp73) + (K300238635 * tmp80); tmp84 = (K156891391 * tmp82) - (K256247671 * tmp83); tmp85 = tmp81 + tmp84; tmp96 = K1_732050807 * (tmp84 - tmp81); tmp108 = tmp85 - tmp68; tmp90 = (K174138601 * tmp56) - (K575140729 * tmp67); tmp91 = (K300238635 * tmp73) - (K011599105 * tmp80); tmp92 = (K256247671 * tmp82) + (K156891391 * tmp83); tmp93 = tmp91 + tmp92; tmp94 = tmp90 - tmp93; tmp106 = K1_732050807 * (tmp92 - tmp91); } { fftw_real tmp45; fftw_real tmp86; fftw_real tmp101; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp39 - tmp44; tmp86 = tmp68 + (K2_000000000 * tmp85); c_re(output[8 * ostride]) = tmp45 - tmp86; c_re(output[5 * ostride]) = tmp45 + tmp86; { fftw_real tmp103; fftw_real tmp104; fftw_real tmp95; fftw_real tmp100; ASSERT_ALIGNED_DOUBLE; tmp103 = tmp44 + tmp39; tmp104 = tmp90 + (K2_000000000 * tmp93); c_re(output[12 * ostride]) = tmp103 - tmp104; c_re(output[ostride]) = tmp103 + tmp104; tmp95 = tmp89 - tmp94; tmp100 = tmp96 - tmp99; c_re(output[4 * ostride]) = tmp95 - tmp100; c_re(output[10 * ostride]) = tmp100 + tmp95; } tmp101 = tmp89 + tmp94; tmp102 = tmp99 + tmp96; c_re(output[3 * ostride]) = tmp101 - tmp102; c_re(output[9 * ostride]) = tmp102 + tmp101; { fftw_real tmp111; fftw_real tmp112; fftw_real tmp107; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp111 = tmp105 + tmp106; tmp112 = tmp109 + tmp108; c_re(output[2 * ostride]) = tmp111 - tmp112; c_re(output[7 * ostride]) = tmp112 + tmp111; tmp107 = tmp105 - tmp106; tmp110 = tmp108 - tmp109; c_re(output[6 * ostride]) = tmp107 - tmp110; c_re(output[11 * ostride]) = tmp110 + tmp107; } } } c_im(output[0]) = tmp147 + tmp146; { fftw_real tmp160; fftw_real tmp173; fftw_real tmp142; fftw_real tmp170; fftw_real tmp164; fftw_real tmp149; fftw_real tmp117; fftw_real tmp128; fftw_real tmp165; fftw_real tmp169; fftw_real tmp152; fftw_real tmp155; fftw_real tmp157; fftw_real tmp172; fftw_real tmp158; fftw_real tmp159; ASSERT_ALIGNED_DOUBLE; tmp158 = (K387390585 * tmp137) + (K265966249 * tmp134); tmp159 = (K113854479 * tmp144) + (K503537032 * tmp143); tmp160 = tmp158 + tmp159; tmp173 = tmp158 - tmp159; { fftw_real tmp138; fftw_real tmp163; fftw_real tmp145; fftw_real tmp148; fftw_real tmp162; ASSERT_ALIGNED_DOUBLE; tmp138 = (K258260390 * tmp134) - (K132983124 * tmp137); tmp163 = tmp141 - tmp138; tmp145 = (K075902986 * tmp143) - (K251768516 * tmp144); tmp148 = tmp146 - (K083333333 * tmp147); tmp162 = tmp148 - tmp145; tmp142 = (K2_000000000 * tmp138) + tmp141; tmp170 = tmp163 + tmp162; tmp164 = tmp162 - tmp163; tmp149 = (K2_000000000 * tmp145) + tmp148; } { fftw_real tmp124; fftw_real tmp127; fftw_real tmp153; fftw_real tmp154; ASSERT_ALIGNED_DOUBLE; tmp117 = (K575140729 * tmp115) - (K174138601 * tmp116); tmp124 = (K300238635 * tmp120) + (K011599105 * tmp123); tmp127 = (K256247671 * tmp125) + (K156891391 * tmp126); tmp128 = tmp124 - tmp127; tmp165 = K1_732050807 * (tmp127 + tmp124); tmp169 = tmp117 - tmp128; tmp152 = (K575140729 * tmp116) + (K174138601 * tmp115); tmp153 = (K156891391 * tmp125) - (K256247671 * tmp126); tmp154 = (K300238635 * tmp123) - (K011599105 * tmp120); tmp155 = tmp153 + tmp154; tmp157 = tmp155 - tmp152; tmp172 = K1_732050807 * (tmp154 - tmp153); } { fftw_real tmp129; fftw_real tmp150; fftw_real tmp167; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp129 = tmp117 + (K2_000000000 * tmp128); tmp150 = tmp142 + tmp149; c_im(output[ostride]) = tmp129 + tmp150; c_im(output[12 * ostride]) = tmp150 - tmp129; { fftw_real tmp151; fftw_real tmp156; fftw_real tmp161; fftw_real tmp166; ASSERT_ALIGNED_DOUBLE; tmp151 = tmp149 - tmp142; tmp156 = tmp152 + (K2_000000000 * tmp155); c_im(output[5 * ostride]) = tmp151 - tmp156; c_im(output[8 * ostride]) = tmp156 + tmp151; tmp161 = tmp157 + tmp160; tmp166 = tmp164 - tmp165; c_im(output[2 * ostride]) = tmp161 + tmp166; c_im(output[7 * ostride]) = tmp166 - tmp161; } tmp167 = tmp165 + tmp164; tmp168 = tmp160 - tmp157; c_im(output[6 * ostride]) = tmp167 - tmp168; c_im(output[11 * ostride]) = tmp168 + tmp167; { fftw_real tmp175; fftw_real tmp176; fftw_real tmp171; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp175 = tmp170 - tmp169; tmp176 = tmp172 - tmp173; c_im(output[4 * ostride]) = tmp175 - tmp176; c_im(output[10 * ostride]) = tmp176 + tmp175; tmp171 = tmp169 + tmp170; tmp174 = tmp172 + tmp173; c_im(output[3 * ostride]) = tmp171 - tmp174; c_im(output[9 * ostride]) = tmp174 + tmp171; } } } } fftw_codelet_desc fftw_no_twiddle_13_desc = { "fftw_no_twiddle_13", (void (*)()) fftw_no_twiddle_13, 13, FFTW_FORWARD, FFTW_NOTW, 287, 0, (const int *) 0, }; �������������������������������������������fftw-2.1.5/fftw/fn_14.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000027126�07637527117�010216� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:41 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 14 */ /* * This function contains 148 FP additions, 72 FP multiplications, * (or, 148 additions, 72 multiplications, 0 fused multiply/add), * 36 stack variables, and 56 memory accesses */ static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_14(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp25; fftw_real tmp84; fftw_real tmp93; fftw_real tmp10; fftw_real tmp77; fftw_real tmp28; fftw_real tmp97; fftw_real tmp42; fftw_real tmp86; fftw_real tmp65; fftw_real tmp92; fftw_real tmp17; fftw_real tmp79; fftw_real tmp31; fftw_real tmp99; fftw_real tmp56; fftw_real tmp81; fftw_real tmp68; fftw_real tmp94; fftw_real tmp24; fftw_real tmp78; fftw_real tmp34; fftw_real tmp98; fftw_real tmp49; fftw_real tmp85; fftw_real tmp71; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[7 * istride]); tmp3 = tmp1 - tmp2; tmp25 = tmp1 + tmp2; tmp82 = c_im(input[0]); tmp83 = c_im(input[7 * istride]); tmp84 = tmp82 - tmp83; tmp93 = tmp82 + tmp83; } { fftw_real tmp6; fftw_real tmp26; fftw_real tmp9; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[9 * istride]); tmp6 = tmp4 - tmp5; tmp26 = tmp4 + tmp5; tmp7 = c_re(input[12 * istride]); tmp8 = c_re(input[5 * istride]); tmp9 = tmp7 - tmp8; tmp27 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp77 = tmp9 - tmp6; tmp28 = tmp26 + tmp27; tmp97 = tmp27 - tmp26; } { fftw_real tmp38; fftw_real tmp63; fftw_real tmp41; fftw_real tmp64; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp36; fftw_real tmp37; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp36 = c_im(input[2 * istride]); tmp37 = c_im(input[9 * istride]); tmp38 = tmp36 - tmp37; tmp63 = tmp36 + tmp37; tmp39 = c_im(input[12 * istride]); tmp40 = c_im(input[5 * istride]); tmp41 = tmp39 - tmp40; tmp64 = tmp39 + tmp40; } tmp42 = tmp38 - tmp41; tmp86 = tmp38 + tmp41; tmp65 = tmp63 - tmp64; tmp92 = tmp63 + tmp64; } { fftw_real tmp13; fftw_real tmp29; fftw_real tmp16; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[11 * istride]); tmp13 = tmp11 - tmp12; tmp29 = tmp11 + tmp12; tmp14 = c_re(input[10 * istride]); tmp15 = c_re(input[3 * istride]); tmp16 = tmp14 - tmp15; tmp30 = tmp14 + tmp15; } tmp17 = tmp13 + tmp16; tmp79 = tmp16 - tmp13; tmp31 = tmp29 + tmp30; tmp99 = tmp29 - tmp30; } { fftw_real tmp52; fftw_real tmp67; fftw_real tmp55; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp50; fftw_real tmp51; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp50 = c_im(input[4 * istride]); tmp51 = c_im(input[11 * istride]); tmp52 = tmp50 - tmp51; tmp67 = tmp50 + tmp51; tmp53 = c_im(input[10 * istride]); tmp54 = c_im(input[3 * istride]); tmp55 = tmp53 - tmp54; tmp66 = tmp53 + tmp54; } tmp56 = tmp52 - tmp55; tmp81 = tmp52 + tmp55; tmp68 = tmp66 - tmp67; tmp94 = tmp67 + tmp66; } { fftw_real tmp20; fftw_real tmp32; fftw_real tmp23; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp18; fftw_real tmp19; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp18 = c_re(input[6 * istride]); tmp19 = c_re(input[13 * istride]); tmp20 = tmp18 - tmp19; tmp32 = tmp18 + tmp19; tmp21 = c_re(input[8 * istride]); tmp22 = c_re(input[istride]); tmp23 = tmp21 - tmp22; tmp33 = tmp21 + tmp22; } tmp24 = tmp20 + tmp23; tmp78 = tmp23 - tmp20; tmp34 = tmp32 + tmp33; tmp98 = tmp32 - tmp33; } { fftw_real tmp45; fftw_real tmp70; fftw_real tmp48; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp44; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp43 = c_im(input[6 * istride]); tmp44 = c_im(input[13 * istride]); tmp45 = tmp43 - tmp44; tmp70 = tmp43 + tmp44; tmp46 = c_im(input[8 * istride]); tmp47 = c_im(input[istride]); tmp48 = tmp46 - tmp47; tmp69 = tmp46 + tmp47; } tmp49 = tmp45 - tmp48; tmp85 = tmp45 + tmp48; tmp71 = tmp69 - tmp70; tmp95 = tmp70 + tmp69; } { fftw_real tmp57; fftw_real tmp35; fftw_real tmp72; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; c_re(output[7 * ostride]) = tmp3 + tmp10 + tmp17 + tmp24; tmp57 = (K433883739 * tmp42) + (K974927912 * tmp49) - (K781831482 * tmp56); tmp35 = tmp3 + (K623489801 * tmp17) - (K222520933 * tmp24) - (K900968867 * tmp10); c_re(output[11 * ostride]) = tmp35 - tmp57; c_re(output[3 * ostride]) = tmp35 + tmp57; { fftw_real tmp59; fftw_real tmp58; fftw_real tmp61; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp59 = (K974927912 * tmp42) - (K433883739 * tmp56) - (K781831482 * tmp49); tmp58 = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); c_re(output[5 * ostride]) = tmp58 - tmp59; c_re(output[9 * ostride]) = tmp58 + tmp59; tmp61 = (K781831482 * tmp42) + (K433883739 * tmp49) + (K974927912 * tmp56); tmp60 = tmp3 + (K623489801 * tmp10) - (K900968867 * tmp24) - (K222520933 * tmp17); c_re(output[13 * ostride]) = tmp60 - tmp61; c_re(output[ostride]) = tmp60 + tmp61; } c_re(output[0]) = tmp25 + tmp28 + tmp31 + tmp34; tmp72 = (K781831482 * tmp65) - (K974927912 * tmp68) - (K433883739 * tmp71); tmp62 = tmp25 + (K623489801 * tmp28) - (K900968867 * tmp34) - (K222520933 * tmp31); c_re(output[6 * ostride]) = tmp62 - tmp72; c_re(output[8 * ostride]) = tmp62 + tmp72; { fftw_real tmp74; fftw_real tmp73; fftw_real tmp76; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; tmp74 = (K433883739 * tmp65) + (K781831482 * tmp68) - (K974927912 * tmp71); tmp73 = tmp25 + (K623489801 * tmp31) - (K222520933 * tmp34) - (K900968867 * tmp28); c_re(output[4 * ostride]) = tmp73 - tmp74; c_re(output[10 * ostride]) = tmp73 + tmp74; tmp76 = (K974927912 * tmp65) + (K781831482 * tmp71) + (K433883739 * tmp68); tmp75 = tmp25 + (K623489801 * tmp34) - (K900968867 * tmp31) - (K222520933 * tmp28); c_re(output[12 * ostride]) = tmp75 - tmp76; c_re(output[2 * ostride]) = tmp75 + tmp76; } } { fftw_real tmp91; fftw_real tmp90; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; c_im(output[7 * ostride]) = tmp86 + tmp85 + tmp81 + tmp84; tmp91 = (K974927912 * tmp77) - (K781831482 * tmp78) - (K433883739 * tmp79); tmp90 = (K623489801 * tmp85) + tmp84 - (K900968867 * tmp81) - (K222520933 * tmp86); c_im(output[5 * ostride]) = tmp90 - tmp91; c_im(output[9 * ostride]) = tmp91 + tmp90; { fftw_real tmp88; fftw_real tmp89; fftw_real tmp80; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp88 = (K781831482 * tmp77) + (K974927912 * tmp79) + (K433883739 * tmp78); tmp89 = (K623489801 * tmp86) + tmp84 - (K222520933 * tmp81) - (K900968867 * tmp85); c_im(output[ostride]) = tmp88 + tmp89; c_im(output[13 * ostride]) = tmp89 - tmp88; tmp80 = (K433883739 * tmp77) + (K974927912 * tmp78) - (K781831482 * tmp79); tmp87 = (K623489801 * tmp81) + tmp84 - (K222520933 * tmp85) - (K900968867 * tmp86); c_im(output[3 * ostride]) = tmp80 + tmp87; c_im(output[11 * ostride]) = tmp87 - tmp80; } c_im(output[0]) = tmp92 + tmp95 + tmp94 + tmp93; tmp103 = (K974927912 * tmp97) + (K433883739 * tmp99) + (K781831482 * tmp98); tmp104 = (K623489801 * tmp95) + tmp93 - (K900968867 * tmp94) - (K222520933 * tmp92); c_im(output[2 * ostride]) = tmp103 + tmp104; c_im(output[12 * ostride]) = tmp104 - tmp103; { fftw_real tmp100; fftw_real tmp96; fftw_real tmp102; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; tmp100 = (K781831482 * tmp97) - (K433883739 * tmp98) - (K974927912 * tmp99); tmp96 = (K623489801 * tmp92) + tmp93 - (K222520933 * tmp94) - (K900968867 * tmp95); c_im(output[6 * ostride]) = tmp96 - tmp100; c_im(output[8 * ostride]) = tmp100 + tmp96; tmp102 = (K433883739 * tmp97) + (K781831482 * tmp99) - (K974927912 * tmp98); tmp101 = (K623489801 * tmp94) + tmp93 - (K222520933 * tmp95) - (K900968867 * tmp92); c_im(output[4 * ostride]) = tmp101 - tmp102; c_im(output[10 * ostride]) = tmp102 + tmp101; } } } fftw_codelet_desc fftw_no_twiddle_14_desc = { "fftw_no_twiddle_14", (void (*)()) fftw_no_twiddle_14, 14, FFTW_FORWARD, FFTW_NOTW, 309, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_15.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000032012�07637527112�010200� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:42 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 15 */ /* * This function contains 156 FP additions, 56 FP multiplications, * (or, 128 additions, 28 multiplications, 28 fused multiply/add), * 62 stack variables, and 60 memory accesses */ static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_15(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp33; fftw_real tmp57; fftw_real tmp145; fftw_real tmp124; fftw_real tmp136; fftw_real tmp21; fftw_real tmp26; fftw_real tmp27; fftw_real tmp49; fftw_real tmp54; fftw_real tmp55; fftw_real tmp108; fftw_real tmp109; fftw_real tmp147; fftw_real tmp61; fftw_real tmp62; fftw_real tmp63; fftw_real tmp96; fftw_real tmp97; fftw_real tmp138; fftw_real tmp83; fftw_real tmp88; fftw_real tmp118; fftw_real tmp10; fftw_real tmp15; fftw_real tmp16; fftw_real tmp38; fftw_real tmp43; fftw_real tmp44; fftw_real tmp111; fftw_real tmp112; fftw_real tmp146; fftw_real tmp58; fftw_real tmp59; fftw_real tmp60; fftw_real tmp99; fftw_real tmp100; fftw_real tmp137; fftw_real tmp72; fftw_real tmp77; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp121; fftw_real tmp4; fftw_real tmp120; fftw_real tmp32; fftw_real tmp122; fftw_real tmp29; fftw_real tmp123; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp121 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp30; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[5 * istride]); tmp3 = c_re(input[10 * istride]); tmp4 = tmp2 + tmp3; tmp120 = K866025403 * (tmp3 - tmp2); tmp30 = c_im(input[5 * istride]); tmp31 = c_im(input[10 * istride]); tmp32 = K866025403 * (tmp30 - tmp31); tmp122 = tmp30 + tmp31; } tmp5 = tmp1 + tmp4; tmp29 = tmp1 - (K500000000 * tmp4); tmp33 = tmp29 - tmp32; tmp57 = tmp29 + tmp32; tmp145 = tmp122 + tmp121; tmp123 = tmp121 - (K500000000 * tmp122); tmp124 = tmp120 + tmp123; tmp136 = tmp123 - tmp120; } { fftw_real tmp17; fftw_real tmp20; fftw_real tmp45; fftw_real tmp79; fftw_real tmp80; fftw_real tmp81; fftw_real tmp48; fftw_real tmp82; fftw_real tmp22; fftw_real tmp25; fftw_real tmp50; fftw_real tmp84; fftw_real tmp85; fftw_real tmp86; fftw_real tmp53; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp18; fftw_real tmp19; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp17 = c_re(input[6 * istride]); tmp18 = c_re(input[11 * istride]); tmp19 = c_re(input[istride]); tmp20 = tmp18 + tmp19; tmp45 = tmp17 - (K500000000 * tmp20); tmp79 = K866025403 * (tmp19 - tmp18); tmp80 = c_im(input[6 * istride]); tmp46 = c_im(input[11 * istride]); tmp47 = c_im(input[istride]); tmp81 = tmp46 + tmp47; tmp48 = K866025403 * (tmp46 - tmp47); tmp82 = tmp80 - (K500000000 * tmp81); } { fftw_real tmp23; fftw_real tmp24; fftw_real tmp51; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp22 = c_re(input[9 * istride]); tmp23 = c_re(input[14 * istride]); tmp24 = c_re(input[4 * istride]); tmp25 = tmp23 + tmp24; tmp50 = tmp22 - (K500000000 * tmp25); tmp84 = K866025403 * (tmp24 - tmp23); tmp85 = c_im(input[9 * istride]); tmp51 = c_im(input[14 * istride]); tmp52 = c_im(input[4 * istride]); tmp86 = tmp51 + tmp52; tmp53 = K866025403 * (tmp51 - tmp52); tmp87 = tmp85 - (K500000000 * tmp86); } tmp21 = tmp17 + tmp20; tmp26 = tmp22 + tmp25; tmp27 = tmp21 + tmp26; tmp49 = tmp45 - tmp48; tmp54 = tmp50 - tmp53; tmp55 = tmp49 + tmp54; tmp108 = tmp81 + tmp80; tmp109 = tmp86 + tmp85; tmp147 = tmp108 + tmp109; tmp61 = tmp45 + tmp48; tmp62 = tmp50 + tmp53; tmp63 = tmp61 + tmp62; tmp96 = tmp82 - tmp79; tmp97 = tmp87 - tmp84; tmp138 = tmp96 + tmp97; tmp83 = tmp79 + tmp82; tmp88 = tmp84 + tmp87; tmp118 = tmp83 + tmp88; } { fftw_real tmp6; fftw_real tmp9; fftw_real tmp34; fftw_real tmp68; fftw_real tmp69; fftw_real tmp70; fftw_real tmp37; fftw_real tmp71; fftw_real tmp11; fftw_real tmp14; fftw_real tmp39; fftw_real tmp73; fftw_real tmp74; fftw_real tmp75; fftw_real tmp42; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[3 * istride]); tmp7 = c_re(input[8 * istride]); tmp8 = c_re(input[13 * istride]); tmp9 = tmp7 + tmp8; tmp34 = tmp6 - (K500000000 * tmp9); tmp68 = K866025403 * (tmp8 - tmp7); tmp69 = c_im(input[3 * istride]); tmp35 = c_im(input[8 * istride]); tmp36 = c_im(input[13 * istride]); tmp70 = tmp35 + tmp36; tmp37 = K866025403 * (tmp35 - tmp36); tmp71 = tmp69 - (K500000000 * tmp70); } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[12 * istride]); tmp12 = c_re(input[2 * istride]); tmp13 = c_re(input[7 * istride]); tmp14 = tmp12 + tmp13; tmp39 = tmp11 - (K500000000 * tmp14); tmp73 = K866025403 * (tmp13 - tmp12); tmp74 = c_im(input[12 * istride]); tmp40 = c_im(input[2 * istride]); tmp41 = c_im(input[7 * istride]); tmp75 = tmp40 + tmp41; tmp42 = K866025403 * (tmp40 - tmp41); tmp76 = tmp74 - (K500000000 * tmp75); } tmp10 = tmp6 + tmp9; tmp15 = tmp11 + tmp14; tmp16 = tmp10 + tmp15; tmp38 = tmp34 - tmp37; tmp43 = tmp39 - tmp42; tmp44 = tmp38 + tmp43; tmp111 = tmp70 + tmp69; tmp112 = tmp75 + tmp74; tmp146 = tmp111 + tmp112; tmp58 = tmp34 + tmp37; tmp59 = tmp39 + tmp42; tmp60 = tmp58 + tmp59; tmp99 = tmp71 - tmp68; tmp100 = tmp76 - tmp73; tmp137 = tmp99 + tmp100; tmp72 = tmp68 + tmp71; tmp77 = tmp73 + tmp76; tmp117 = tmp72 + tmp77; } { fftw_real tmp106; fftw_real tmp28; fftw_real tmp105; fftw_real tmp114; fftw_real tmp116; fftw_real tmp110; fftw_real tmp113; fftw_real tmp115; fftw_real tmp107; ASSERT_ALIGNED_DOUBLE; tmp106 = K559016994 * (tmp16 - tmp27); tmp28 = tmp16 + tmp27; tmp105 = tmp5 - (K250000000 * tmp28); tmp110 = tmp108 - tmp109; tmp113 = tmp111 - tmp112; tmp114 = (K951056516 * tmp110) - (K587785252 * tmp113); tmp116 = (K951056516 * tmp113) + (K587785252 * tmp110); c_re(output[0]) = tmp5 + tmp28; tmp115 = tmp106 + tmp105; c_re(output[9 * ostride]) = tmp115 - tmp116; c_re(output[6 * ostride]) = tmp115 + tmp116; tmp107 = tmp105 - tmp106; c_re(output[12 * ostride]) = tmp107 - tmp114; c_re(output[3 * ostride]) = tmp107 + tmp114; } { fftw_real tmp94; fftw_real tmp56; fftw_real tmp93; fftw_real tmp102; fftw_real tmp104; fftw_real tmp98; fftw_real tmp101; fftw_real tmp103; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; tmp94 = K559016994 * (tmp44 - tmp55); tmp56 = tmp44 + tmp55; tmp93 = tmp33 - (K250000000 * tmp56); tmp98 = tmp96 - tmp97; tmp101 = tmp99 - tmp100; tmp102 = (K951056516 * tmp98) - (K587785252 * tmp101); tmp104 = (K951056516 * tmp101) + (K587785252 * tmp98); c_re(output[5 * ostride]) = tmp33 + tmp56; tmp103 = tmp94 + tmp93; c_re(output[14 * ostride]) = tmp103 - tmp104; c_re(output[11 * ostride]) = tmp103 + tmp104; tmp95 = tmp93 - tmp94; c_re(output[2 * ostride]) = tmp95 - tmp102; c_re(output[8 * ostride]) = tmp95 + tmp102; } { fftw_real tmp150; fftw_real tmp148; fftw_real tmp149; fftw_real tmp154; fftw_real tmp156; fftw_real tmp152; fftw_real tmp153; fftw_real tmp155; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp150 = K559016994 * (tmp146 - tmp147); tmp148 = tmp146 + tmp147; tmp149 = tmp145 - (K250000000 * tmp148); tmp152 = tmp21 - tmp26; tmp153 = tmp10 - tmp15; tmp154 = (K951056516 * tmp152) - (K587785252 * tmp153); tmp156 = (K951056516 * tmp153) + (K587785252 * tmp152); c_im(output[0]) = tmp148 + tmp145; tmp155 = tmp150 + tmp149; c_im(output[6 * ostride]) = tmp155 - tmp156; c_im(output[9 * ostride]) = tmp156 + tmp155; tmp151 = tmp149 - tmp150; c_im(output[3 * ostride]) = tmp151 - tmp154; c_im(output[12 * ostride]) = tmp154 + tmp151; } { fftw_real tmp141; fftw_real tmp139; fftw_real tmp140; fftw_real tmp135; fftw_real tmp144; fftw_real tmp133; fftw_real tmp134; fftw_real tmp143; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; tmp141 = K559016994 * (tmp137 - tmp138); tmp139 = tmp137 + tmp138; tmp140 = tmp136 - (K250000000 * tmp139); tmp133 = tmp49 - tmp54; tmp134 = tmp38 - tmp43; tmp135 = (K951056516 * tmp133) - (K587785252 * tmp134); tmp144 = (K951056516 * tmp134) + (K587785252 * tmp133); c_im(output[5 * ostride]) = tmp139 + tmp136; tmp143 = tmp141 + tmp140; c_im(output[11 * ostride]) = tmp143 - tmp144; c_im(output[14 * ostride]) = tmp144 + tmp143; tmp142 = tmp140 - tmp141; c_im(output[2 * ostride]) = tmp135 + tmp142; c_im(output[8 * ostride]) = tmp142 - tmp135; } { fftw_real tmp119; fftw_real tmp125; fftw_real tmp126; fftw_real tmp130; fftw_real tmp131; fftw_real tmp128; fftw_real tmp129; fftw_real tmp132; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp119 = K559016994 * (tmp117 - tmp118); tmp125 = tmp117 + tmp118; tmp126 = tmp124 - (K250000000 * tmp125); tmp128 = tmp58 - tmp59; tmp129 = tmp61 - tmp62; tmp130 = (K951056516 * tmp128) + (K587785252 * tmp129); tmp131 = (K951056516 * tmp129) - (K587785252 * tmp128); c_im(output[10 * ostride]) = tmp125 + tmp124; tmp132 = tmp126 - tmp119; c_im(output[7 * ostride]) = tmp131 + tmp132; c_im(output[13 * ostride]) = tmp132 - tmp131; tmp127 = tmp119 + tmp126; c_im(output[ostride]) = tmp127 - tmp130; c_im(output[4 * ostride]) = tmp130 + tmp127; } { fftw_real tmp65; fftw_real tmp64; fftw_real tmp66; fftw_real tmp90; fftw_real tmp92; fftw_real tmp78; fftw_real tmp89; fftw_real tmp91; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; tmp65 = K559016994 * (tmp60 - tmp63); tmp64 = tmp60 + tmp63; tmp66 = tmp57 - (K250000000 * tmp64); tmp78 = tmp72 - tmp77; tmp89 = tmp83 - tmp88; tmp90 = (K951056516 * tmp78) + (K587785252 * tmp89); tmp92 = (K951056516 * tmp89) - (K587785252 * tmp78); c_re(output[10 * ostride]) = tmp57 + tmp64; tmp91 = tmp66 - tmp65; c_re(output[7 * ostride]) = tmp91 - tmp92; c_re(output[13 * ostride]) = tmp91 + tmp92; tmp67 = tmp65 + tmp66; c_re(output[4 * ostride]) = tmp67 - tmp90; c_re(output[ostride]) = tmp67 + tmp90; } } fftw_codelet_desc fftw_no_twiddle_15_desc = { "fftw_no_twiddle_15", (void (*)()) fftw_no_twiddle_15, 15, FFTW_FORWARD, FFTW_NOTW, 331, 0, (const int *) 0, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_16.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000030456�07637527117�010220� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:46 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 16 */ /* * This function contains 144 FP additions, 24 FP multiplications, * (or, 136 additions, 16 multiplications, 8 fused multiply/add), * 46 stack variables, and 64 memory accesses */ static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_16(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp7; fftw_real tmp115; fftw_real tmp38; fftw_real tmp129; fftw_real tmp49; fftw_real tmp95; fftw_real tmp83; fftw_real tmp105; fftw_real tmp29; fftw_real tmp123; fftw_real tmp73; fftw_real tmp101; fftw_real tmp78; fftw_real tmp102; fftw_real tmp126; fftw_real tmp141; fftw_real tmp14; fftw_real tmp130; fftw_real tmp45; fftw_real tmp116; fftw_real tmp52; fftw_real tmp85; fftw_real tmp55; fftw_real tmp84; fftw_real tmp22; fftw_real tmp118; fftw_real tmp62; fftw_real tmp98; fftw_real tmp67; fftw_real tmp99; fftw_real tmp121; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp47; fftw_real tmp34; fftw_real tmp82; fftw_real tmp6; fftw_real tmp81; fftw_real tmp37; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[8 * istride]); tmp3 = tmp1 + tmp2; tmp47 = tmp1 - tmp2; tmp32 = c_im(input[0]); tmp33 = c_im(input[8 * istride]); tmp34 = tmp32 + tmp33; tmp82 = tmp32 - tmp33; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[4 * istride]); tmp5 = c_re(input[12 * istride]); tmp6 = tmp4 + tmp5; tmp81 = tmp4 - tmp5; tmp35 = c_im(input[4 * istride]); tmp36 = c_im(input[12 * istride]); tmp37 = tmp35 + tmp36; tmp48 = tmp35 - tmp36; } tmp7 = tmp3 + tmp6; tmp115 = tmp3 - tmp6; tmp38 = tmp34 + tmp37; tmp129 = tmp34 - tmp37; tmp49 = tmp47 - tmp48; tmp95 = tmp47 + tmp48; tmp83 = tmp81 + tmp82; tmp105 = tmp82 - tmp81; } { fftw_real tmp25; fftw_real tmp69; fftw_real tmp77; fftw_real tmp124; fftw_real tmp28; fftw_real tmp74; fftw_real tmp72; fftw_real tmp125; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[15 * istride]); tmp24 = c_re(input[7 * istride]); tmp25 = tmp23 + tmp24; tmp69 = tmp23 - tmp24; tmp75 = c_im(input[15 * istride]); tmp76 = c_im(input[7 * istride]); tmp77 = tmp75 - tmp76; tmp124 = tmp75 + tmp76; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp70; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[3 * istride]); tmp27 = c_re(input[11 * istride]); tmp28 = tmp26 + tmp27; tmp74 = tmp26 - tmp27; tmp70 = c_im(input[3 * istride]); tmp71 = c_im(input[11 * istride]); tmp72 = tmp70 - tmp71; tmp125 = tmp70 + tmp71; } tmp29 = tmp25 + tmp28; tmp123 = tmp25 - tmp28; tmp73 = tmp69 - tmp72; tmp101 = tmp69 + tmp72; tmp78 = tmp74 + tmp77; tmp102 = tmp77 - tmp74; tmp126 = tmp124 - tmp125; tmp141 = tmp124 + tmp125; } { fftw_real tmp10; fftw_real tmp51; fftw_real tmp41; fftw_real tmp50; fftw_real tmp13; fftw_real tmp53; fftw_real tmp44; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[2 * istride]); tmp9 = c_re(input[10 * istride]); tmp10 = tmp8 + tmp9; tmp51 = tmp8 - tmp9; tmp39 = c_im(input[2 * istride]); tmp40 = c_im(input[10 * istride]); tmp41 = tmp39 + tmp40; tmp50 = tmp39 - tmp40; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp42; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[14 * istride]); tmp12 = c_re(input[6 * istride]); tmp13 = tmp11 + tmp12; tmp53 = tmp11 - tmp12; tmp42 = c_im(input[14 * istride]); tmp43 = c_im(input[6 * istride]); tmp44 = tmp42 + tmp43; tmp54 = tmp42 - tmp43; } tmp14 = tmp10 + tmp13; tmp130 = tmp13 - tmp10; tmp45 = tmp41 + tmp44; tmp116 = tmp41 - tmp44; tmp52 = tmp50 - tmp51; tmp85 = tmp51 + tmp50; tmp55 = tmp53 + tmp54; tmp84 = tmp53 - tmp54; } { fftw_real tmp18; fftw_real tmp63; fftw_real tmp61; fftw_real tmp119; fftw_real tmp21; fftw_real tmp58; fftw_real tmp66; fftw_real tmp120; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[istride]); tmp17 = c_re(input[9 * istride]); tmp18 = tmp16 + tmp17; tmp63 = tmp16 - tmp17; tmp59 = c_im(input[istride]); tmp60 = c_im(input[9 * istride]); tmp61 = tmp59 - tmp60; tmp119 = tmp59 + tmp60; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[5 * istride]); tmp20 = c_re(input[13 * istride]); tmp21 = tmp19 + tmp20; tmp58 = tmp19 - tmp20; tmp64 = c_im(input[5 * istride]); tmp65 = c_im(input[13 * istride]); tmp66 = tmp64 - tmp65; tmp120 = tmp64 + tmp65; } tmp22 = tmp18 + tmp21; tmp118 = tmp18 - tmp21; tmp62 = tmp58 + tmp61; tmp98 = tmp61 - tmp58; tmp67 = tmp63 - tmp66; tmp99 = tmp63 + tmp66; tmp121 = tmp119 - tmp120; tmp140 = tmp119 + tmp120; } { fftw_real tmp15; fftw_real tmp30; fftw_real tmp31; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; c_re(output[8 * ostride]) = tmp15 - tmp30; c_re(output[0]) = tmp15 + tmp30; tmp31 = tmp29 - tmp22; tmp46 = tmp38 - tmp45; c_im(output[4 * ostride]) = tmp31 + tmp46; c_im(output[12 * ostride]) = tmp46 - tmp31; } { fftw_real tmp143; fftw_real tmp144; fftw_real tmp139; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; tmp143 = tmp38 + tmp45; tmp144 = tmp140 + tmp141; c_im(output[8 * ostride]) = tmp143 - tmp144; c_im(output[0]) = tmp143 + tmp144; tmp139 = tmp7 - tmp14; tmp142 = tmp140 - tmp141; c_re(output[12 * ostride]) = tmp139 - tmp142; c_re(output[4 * ostride]) = tmp139 + tmp142; } { fftw_real tmp117; fftw_real tmp131; fftw_real tmp128; fftw_real tmp132; fftw_real tmp122; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp117 = tmp115 + tmp116; tmp131 = tmp129 - tmp130; tmp122 = tmp118 + tmp121; tmp127 = tmp123 - tmp126; tmp128 = K707106781 * (tmp122 + tmp127); tmp132 = K707106781 * (tmp127 - tmp122); c_re(output[10 * ostride]) = tmp117 - tmp128; c_re(output[2 * ostride]) = tmp117 + tmp128; c_im(output[14 * ostride]) = tmp131 - tmp132; c_im(output[6 * ostride]) = tmp131 + tmp132; } { fftw_real tmp133; fftw_real tmp137; fftw_real tmp136; fftw_real tmp138; fftw_real tmp134; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp133 = tmp115 - tmp116; tmp137 = tmp130 + tmp129; tmp134 = tmp121 - tmp118; tmp135 = tmp123 + tmp126; tmp136 = K707106781 * (tmp134 - tmp135); tmp138 = K707106781 * (tmp134 + tmp135); c_re(output[14 * ostride]) = tmp133 - tmp136; c_re(output[6 * ostride]) = tmp133 + tmp136; c_im(output[10 * ostride]) = tmp137 - tmp138; c_im(output[2 * ostride]) = tmp137 + tmp138; } { fftw_real tmp57; fftw_real tmp89; fftw_real tmp92; fftw_real tmp94; fftw_real tmp87; fftw_real tmp93; fftw_real tmp80; fftw_real tmp88; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp56; fftw_real tmp90; fftw_real tmp91; fftw_real tmp86; fftw_real tmp68; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp56 = K707106781 * (tmp52 - tmp55); tmp57 = tmp49 + tmp56; tmp89 = tmp49 - tmp56; tmp90 = (K382683432 * tmp62) - (K923879532 * tmp67); tmp91 = (K382683432 * tmp78) + (K923879532 * tmp73); tmp92 = tmp90 - tmp91; tmp94 = tmp90 + tmp91; tmp86 = K707106781 * (tmp84 - tmp85); tmp87 = tmp83 - tmp86; tmp93 = tmp83 + tmp86; tmp68 = (K923879532 * tmp62) + (K382683432 * tmp67); tmp79 = (K382683432 * tmp73) - (K923879532 * tmp78); tmp80 = tmp68 + tmp79; tmp88 = tmp79 - tmp68; } c_re(output[11 * ostride]) = tmp57 - tmp80; c_re(output[3 * ostride]) = tmp57 + tmp80; c_im(output[15 * ostride]) = tmp87 - tmp88; c_im(output[7 * ostride]) = tmp87 + tmp88; c_re(output[15 * ostride]) = tmp89 - tmp92; c_re(output[7 * ostride]) = tmp89 + tmp92; c_im(output[11 * ostride]) = tmp93 - tmp94; c_im(output[3 * ostride]) = tmp93 + tmp94; } { fftw_real tmp97; fftw_real tmp109; fftw_real tmp112; fftw_real tmp114; fftw_real tmp107; fftw_real tmp113; fftw_real tmp104; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp96; fftw_real tmp110; fftw_real tmp111; fftw_real tmp106; fftw_real tmp100; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp96 = K707106781 * (tmp85 + tmp84); tmp97 = tmp95 + tmp96; tmp109 = tmp95 - tmp96; tmp110 = (K923879532 * tmp98) - (K382683432 * tmp99); tmp111 = (K923879532 * tmp102) + (K382683432 * tmp101); tmp112 = tmp110 - tmp111; tmp114 = tmp110 + tmp111; tmp106 = K707106781 * (tmp52 + tmp55); tmp107 = tmp105 - tmp106; tmp113 = tmp105 + tmp106; tmp100 = (K382683432 * tmp98) + (K923879532 * tmp99); tmp103 = (K923879532 * tmp101) - (K382683432 * tmp102); tmp104 = tmp100 + tmp103; tmp108 = tmp103 - tmp100; } c_re(output[9 * ostride]) = tmp97 - tmp104; c_re(output[ostride]) = tmp97 + tmp104; c_im(output[13 * ostride]) = tmp107 - tmp108; c_im(output[5 * ostride]) = tmp107 + tmp108; c_re(output[13 * ostride]) = tmp109 - tmp112; c_re(output[5 * ostride]) = tmp109 + tmp112; c_im(output[9 * ostride]) = tmp113 - tmp114; c_im(output[ostride]) = tmp113 + tmp114; } } fftw_codelet_desc fftw_no_twiddle_16_desc = { "fftw_no_twiddle_16", (void (*)()) fftw_no_twiddle_16, 16, FFTW_FORWARD, FFTW_NOTW, 353, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_32.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000074125�07637527136�010220� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:49 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 32 */ /* * This function contains 372 FP additions, 84 FP multiplications, * (or, 340 additions, 52 multiplications, 32 fused multiply/add), * 92 stack variables, and 128 memory accesses */ static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_32(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp7; fftw_real tmp275; fftw_real tmp70; fftw_real tmp309; fftw_real tmp97; fftw_real tmp215; fftw_real tmp179; fftw_real tmp241; fftw_real tmp14; fftw_real tmp310; fftw_real tmp77; fftw_real tmp276; fftw_real tmp182; fftw_real tmp216; fftw_real tmp104; fftw_real tmp242; fftw_real tmp153; fftw_real tmp233; fftw_real tmp53; fftw_real tmp60; fftw_real tmp351; fftw_real tmp306; fftw_real tmp330; fftw_real tmp352; fftw_real tmp353; fftw_real tmp354; fftw_real tmp170; fftw_real tmp236; fftw_real tmp301; fftw_real tmp329; fftw_real tmp164; fftw_real tmp237; fftw_real tmp173; fftw_real tmp234; fftw_real tmp22; fftw_real tmp280; fftw_real tmp313; fftw_real tmp85; fftw_real tmp112; fftw_real tmp185; fftw_real tmp220; fftw_real tmp245; fftw_real tmp29; fftw_real tmp283; fftw_real tmp312; fftw_real tmp92; fftw_real tmp119; fftw_real tmp184; fftw_real tmp223; fftw_real tmp244; fftw_real tmp126; fftw_real tmp229; fftw_real tmp38; fftw_real tmp45; fftw_real tmp346; fftw_real tmp295; fftw_real tmp327; fftw_real tmp347; fftw_real tmp348; fftw_real tmp349; fftw_real tmp143; fftw_real tmp226; fftw_real tmp290; fftw_real tmp326; fftw_real tmp137; fftw_real tmp227; fftw_real tmp146; fftw_real tmp230; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp95; fftw_real tmp66; fftw_real tmp178; fftw_real tmp6; fftw_real tmp177; fftw_real tmp69; fftw_real tmp96; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[16 * istride]); tmp3 = tmp1 + tmp2; tmp95 = tmp1 - tmp2; tmp64 = c_im(input[0]); tmp65 = c_im(input[16 * istride]); tmp66 = tmp64 + tmp65; tmp178 = tmp64 - tmp65; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[8 * istride]); tmp5 = c_re(input[24 * istride]); tmp6 = tmp4 + tmp5; tmp177 = tmp4 - tmp5; tmp67 = c_im(input[8 * istride]); tmp68 = c_im(input[24 * istride]); tmp69 = tmp67 + tmp68; tmp96 = tmp67 - tmp68; } tmp7 = tmp3 + tmp6; tmp275 = tmp3 - tmp6; tmp70 = tmp66 + tmp69; tmp309 = tmp66 - tmp69; tmp97 = tmp95 - tmp96; tmp215 = tmp95 + tmp96; tmp179 = tmp177 + tmp178; tmp241 = tmp178 - tmp177; } { fftw_real tmp10; fftw_real tmp99; fftw_real tmp73; fftw_real tmp98; fftw_real tmp13; fftw_real tmp101; fftw_real tmp76; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp71; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[4 * istride]); tmp9 = c_re(input[20 * istride]); tmp10 = tmp8 + tmp9; tmp99 = tmp8 - tmp9; tmp71 = c_im(input[4 * istride]); tmp72 = c_im(input[20 * istride]); tmp73 = tmp71 + tmp72; tmp98 = tmp71 - tmp72; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp74; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[28 * istride]); tmp12 = c_re(input[12 * istride]); tmp13 = tmp11 + tmp12; tmp101 = tmp11 - tmp12; tmp74 = c_im(input[28 * istride]); tmp75 = c_im(input[12 * istride]); tmp76 = tmp74 + tmp75; tmp102 = tmp74 - tmp75; } tmp14 = tmp10 + tmp13; tmp310 = tmp13 - tmp10; tmp77 = tmp73 + tmp76; tmp276 = tmp73 - tmp76; { fftw_real tmp180; fftw_real tmp181; fftw_real tmp100; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp180 = tmp101 - tmp102; tmp181 = tmp99 + tmp98; tmp182 = K707106781 * (tmp180 - tmp181); tmp216 = K707106781 * (tmp181 + tmp180); tmp100 = tmp98 - tmp99; tmp103 = tmp101 + tmp102; tmp104 = K707106781 * (tmp100 - tmp103); tmp242 = K707106781 * (tmp100 + tmp103); } } { fftw_real tmp49; fftw_real tmp149; fftw_real tmp169; fftw_real tmp302; fftw_real tmp52; fftw_real tmp166; fftw_real tmp152; fftw_real tmp303; fftw_real tmp56; fftw_real tmp157; fftw_real tmp156; fftw_real tmp298; fftw_real tmp59; fftw_real tmp159; fftw_real tmp162; fftw_real tmp299; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp167; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp47 = c_re(input[31 * istride]); tmp48 = c_re(input[15 * istride]); tmp49 = tmp47 + tmp48; tmp149 = tmp47 - tmp48; tmp167 = c_im(input[31 * istride]); tmp168 = c_im(input[15 * istride]); tmp169 = tmp167 - tmp168; tmp302 = tmp167 + tmp168; } { fftw_real tmp50; fftw_real tmp51; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(input[7 * istride]); tmp51 = c_re(input[23 * istride]); tmp52 = tmp50 + tmp51; tmp166 = tmp50 - tmp51; tmp150 = c_im(input[7 * istride]); tmp151 = c_im(input[23 * istride]); tmp152 = tmp150 - tmp151; tmp303 = tmp150 + tmp151; } { fftw_real tmp54; fftw_real tmp55; fftw_real tmp154; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp54 = c_re(input[3 * istride]); tmp55 = c_re(input[19 * istride]); tmp56 = tmp54 + tmp55; tmp157 = tmp54 - tmp55; tmp154 = c_im(input[3 * istride]); tmp155 = c_im(input[19 * istride]); tmp156 = tmp154 - tmp155; tmp298 = tmp154 + tmp155; } { fftw_real tmp57; fftw_real tmp58; fftw_real tmp160; fftw_real tmp161; ASSERT_ALIGNED_DOUBLE; tmp57 = c_re(input[27 * istride]); tmp58 = c_re(input[11 * istride]); tmp59 = tmp57 + tmp58; tmp159 = tmp57 - tmp58; tmp160 = c_im(input[27 * istride]); tmp161 = c_im(input[11 * istride]); tmp162 = tmp160 - tmp161; tmp299 = tmp160 + tmp161; } { fftw_real tmp304; fftw_real tmp305; fftw_real tmp297; fftw_real tmp300; ASSERT_ALIGNED_DOUBLE; tmp153 = tmp149 - tmp152; tmp233 = tmp149 + tmp152; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp351 = tmp53 - tmp60; tmp304 = tmp302 - tmp303; tmp305 = tmp59 - tmp56; tmp306 = tmp304 - tmp305; tmp330 = tmp305 + tmp304; tmp352 = tmp302 + tmp303; tmp353 = tmp298 + tmp299; tmp354 = tmp352 - tmp353; tmp170 = tmp166 + tmp169; tmp236 = tmp169 - tmp166; tmp297 = tmp49 - tmp52; tmp300 = tmp298 - tmp299; tmp301 = tmp297 - tmp300; tmp329 = tmp297 + tmp300; { fftw_real tmp158; fftw_real tmp163; fftw_real tmp171; fftw_real tmp172; ASSERT_ALIGNED_DOUBLE; tmp158 = tmp156 - tmp157; tmp163 = tmp159 + tmp162; tmp164 = K707106781 * (tmp158 - tmp163); tmp237 = K707106781 * (tmp158 + tmp163); tmp171 = tmp159 - tmp162; tmp172 = tmp157 + tmp156; tmp173 = K707106781 * (tmp171 - tmp172); tmp234 = K707106781 * (tmp172 + tmp171); } } } { fftw_real tmp18; fftw_real tmp109; fftw_real tmp81; fftw_real tmp107; fftw_real tmp21; fftw_real tmp106; fftw_real tmp84; fftw_real tmp110; fftw_real tmp278; fftw_real tmp279; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[2 * istride]); tmp17 = c_re(input[18 * istride]); tmp18 = tmp16 + tmp17; tmp109 = tmp16 - tmp17; tmp79 = c_im(input[2 * istride]); tmp80 = c_im(input[18 * istride]); tmp81 = tmp79 + tmp80; tmp107 = tmp79 - tmp80; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[10 * istride]); tmp20 = c_re(input[26 * istride]); tmp21 = tmp19 + tmp20; tmp106 = tmp19 - tmp20; tmp82 = c_im(input[10 * istride]); tmp83 = c_im(input[26 * istride]); tmp84 = tmp82 + tmp83; tmp110 = tmp82 - tmp83; } tmp22 = tmp18 + tmp21; tmp278 = tmp81 - tmp84; tmp279 = tmp18 - tmp21; tmp280 = tmp278 - tmp279; tmp313 = tmp279 + tmp278; tmp85 = tmp81 + tmp84; { fftw_real tmp108; fftw_real tmp111; fftw_real tmp218; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; tmp108 = tmp106 + tmp107; tmp111 = tmp109 - tmp110; tmp112 = (K382683432 * tmp108) - (K923879532 * tmp111); tmp185 = (K923879532 * tmp108) + (K382683432 * tmp111); tmp218 = tmp107 - tmp106; tmp219 = tmp109 + tmp110; tmp220 = (K923879532 * tmp218) - (K382683432 * tmp219); tmp245 = (K382683432 * tmp218) + (K923879532 * tmp219); } } { fftw_real tmp25; fftw_real tmp116; fftw_real tmp88; fftw_real tmp114; fftw_real tmp28; fftw_real tmp113; fftw_real tmp91; fftw_real tmp117; fftw_real tmp281; fftw_real tmp282; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp86; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[30 * istride]); tmp24 = c_re(input[14 * istride]); tmp25 = tmp23 + tmp24; tmp116 = tmp23 - tmp24; tmp86 = c_im(input[30 * istride]); tmp87 = c_im(input[14 * istride]); tmp88 = tmp86 + tmp87; tmp114 = tmp86 - tmp87; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp89; fftw_real tmp90; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[6 * istride]); tmp27 = c_re(input[22 * istride]); tmp28 = tmp26 + tmp27; tmp113 = tmp26 - tmp27; tmp89 = c_im(input[6 * istride]); tmp90 = c_im(input[22 * istride]); tmp91 = tmp89 + tmp90; tmp117 = tmp89 - tmp90; } tmp29 = tmp25 + tmp28; tmp281 = tmp25 - tmp28; tmp282 = tmp88 - tmp91; tmp283 = tmp281 + tmp282; tmp312 = tmp281 - tmp282; tmp92 = tmp88 + tmp91; { fftw_real tmp115; fftw_real tmp118; fftw_real tmp221; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; tmp115 = tmp113 + tmp114; tmp118 = tmp116 - tmp117; tmp119 = (K382683432 * tmp115) + (K923879532 * tmp118); tmp184 = (K382683432 * tmp118) - (K923879532 * tmp115); tmp221 = tmp114 - tmp113; tmp222 = tmp116 + tmp117; tmp223 = (K923879532 * tmp221) + (K382683432 * tmp222); tmp244 = (K923879532 * tmp222) - (K382683432 * tmp221); } } { fftw_real tmp34; fftw_real tmp139; fftw_real tmp125; fftw_real tmp286; fftw_real tmp37; fftw_real tmp122; fftw_real tmp142; fftw_real tmp287; fftw_real tmp41; fftw_real tmp132; fftw_real tmp135; fftw_real tmp292; fftw_real tmp44; fftw_real tmp127; fftw_real tmp130; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp123; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(input[istride]); tmp33 = c_re(input[17 * istride]); tmp34 = tmp32 + tmp33; tmp139 = tmp32 - tmp33; tmp123 = c_im(input[istride]); tmp124 = c_im(input[17 * istride]); tmp125 = tmp123 - tmp124; tmp286 = tmp123 + tmp124; } { fftw_real tmp35; fftw_real tmp36; fftw_real tmp140; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp35 = c_re(input[9 * istride]); tmp36 = c_re(input[25 * istride]); tmp37 = tmp35 + tmp36; tmp122 = tmp35 - tmp36; tmp140 = c_im(input[9 * istride]); tmp141 = c_im(input[25 * istride]); tmp142 = tmp140 - tmp141; tmp287 = tmp140 + tmp141; } { fftw_real tmp39; fftw_real tmp40; fftw_real tmp133; fftw_real tmp134; ASSERT_ALIGNED_DOUBLE; tmp39 = c_re(input[5 * istride]); tmp40 = c_re(input[21 * istride]); tmp41 = tmp39 + tmp40; tmp132 = tmp39 - tmp40; tmp133 = c_im(input[5 * istride]); tmp134 = c_im(input[21 * istride]); tmp135 = tmp133 - tmp134; tmp292 = tmp133 + tmp134; } { fftw_real tmp42; fftw_real tmp43; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(input[29 * istride]); tmp43 = c_re(input[13 * istride]); tmp44 = tmp42 + tmp43; tmp127 = tmp42 - tmp43; tmp128 = c_im(input[29 * istride]); tmp129 = c_im(input[13 * istride]); tmp130 = tmp128 - tmp129; tmp293 = tmp128 + tmp129; } { fftw_real tmp291; fftw_real tmp294; fftw_real tmp288; fftw_real tmp289; ASSERT_ALIGNED_DOUBLE; tmp126 = tmp122 + tmp125; tmp229 = tmp125 - tmp122; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp346 = tmp38 - tmp45; tmp291 = tmp34 - tmp37; tmp294 = tmp292 - tmp293; tmp295 = tmp291 - tmp294; tmp327 = tmp291 + tmp294; tmp347 = tmp286 + tmp287; tmp348 = tmp292 + tmp293; tmp349 = tmp347 - tmp348; tmp143 = tmp139 - tmp142; tmp226 = tmp139 + tmp142; tmp288 = tmp286 - tmp287; tmp289 = tmp44 - tmp41; tmp290 = tmp288 - tmp289; tmp326 = tmp289 + tmp288; { fftw_real tmp131; fftw_real tmp136; fftw_real tmp144; fftw_real tmp145; ASSERT_ALIGNED_DOUBLE; tmp131 = tmp127 - tmp130; tmp136 = tmp132 + tmp135; tmp137 = K707106781 * (tmp131 - tmp136); tmp227 = K707106781 * (tmp136 + tmp131); tmp144 = tmp135 - tmp132; tmp145 = tmp127 + tmp130; tmp146 = K707106781 * (tmp144 - tmp145); tmp230 = K707106781 * (tmp144 + tmp145); } } } { fftw_real tmp285; fftw_real tmp317; fftw_real tmp320; fftw_real tmp322; fftw_real tmp308; fftw_real tmp316; fftw_real tmp315; fftw_real tmp321; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp277; fftw_real tmp284; fftw_real tmp318; fftw_real tmp319; ASSERT_ALIGNED_DOUBLE; tmp277 = tmp275 - tmp276; tmp284 = K707106781 * (tmp280 - tmp283); tmp285 = tmp277 + tmp284; tmp317 = tmp277 - tmp284; tmp318 = (K382683432 * tmp290) - (K923879532 * tmp295); tmp319 = (K382683432 * tmp306) + (K923879532 * tmp301); tmp320 = tmp318 - tmp319; tmp322 = tmp318 + tmp319; } { fftw_real tmp296; fftw_real tmp307; fftw_real tmp311; fftw_real tmp314; ASSERT_ALIGNED_DOUBLE; tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); tmp307 = (K382683432 * tmp301) - (K923879532 * tmp306); tmp308 = tmp296 + tmp307; tmp316 = tmp307 - tmp296; tmp311 = tmp309 - tmp310; tmp314 = K707106781 * (tmp312 - tmp313); tmp315 = tmp311 - tmp314; tmp321 = tmp311 + tmp314; } c_re(output[22 * ostride]) = tmp285 - tmp308; c_re(output[6 * ostride]) = tmp285 + tmp308; c_im(output[30 * ostride]) = tmp315 - tmp316; c_im(output[14 * ostride]) = tmp315 + tmp316; c_re(output[30 * ostride]) = tmp317 - tmp320; c_re(output[14 * ostride]) = tmp317 + tmp320; c_im(output[22 * ostride]) = tmp321 - tmp322; c_im(output[6 * ostride]) = tmp321 + tmp322; } { fftw_real tmp325; fftw_real tmp337; fftw_real tmp340; fftw_real tmp342; fftw_real tmp332; fftw_real tmp336; fftw_real tmp335; fftw_real tmp341; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp323; fftw_real tmp324; fftw_real tmp338; fftw_real tmp339; ASSERT_ALIGNED_DOUBLE; tmp323 = tmp275 + tmp276; tmp324 = K707106781 * (tmp313 + tmp312); tmp325 = tmp323 + tmp324; tmp337 = tmp323 - tmp324; tmp338 = (K923879532 * tmp326) - (K382683432 * tmp327); tmp339 = (K923879532 * tmp330) + (K382683432 * tmp329); tmp340 = tmp338 - tmp339; tmp342 = tmp338 + tmp339; } { fftw_real tmp328; fftw_real tmp331; fftw_real tmp333; fftw_real tmp334; ASSERT_ALIGNED_DOUBLE; tmp328 = (K382683432 * tmp326) + (K923879532 * tmp327); tmp331 = (K923879532 * tmp329) - (K382683432 * tmp330); tmp332 = tmp328 + tmp331; tmp336 = tmp331 - tmp328; tmp333 = tmp310 + tmp309; tmp334 = K707106781 * (tmp280 + tmp283); tmp335 = tmp333 - tmp334; tmp341 = tmp333 + tmp334; } c_re(output[18 * ostride]) = tmp325 - tmp332; c_re(output[2 * ostride]) = tmp325 + tmp332; c_im(output[26 * ostride]) = tmp335 - tmp336; c_im(output[10 * ostride]) = tmp335 + tmp336; c_re(output[26 * ostride]) = tmp337 - tmp340; c_re(output[10 * ostride]) = tmp337 + tmp340; c_im(output[18 * ostride]) = tmp341 - tmp342; c_im(output[2 * ostride]) = tmp341 + tmp342; } { fftw_real tmp345; fftw_real tmp361; fftw_real tmp364; fftw_real tmp366; fftw_real tmp356; fftw_real tmp360; fftw_real tmp359; fftw_real tmp365; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp343; fftw_real tmp344; fftw_real tmp362; fftw_real tmp363; ASSERT_ALIGNED_DOUBLE; tmp343 = tmp7 - tmp14; tmp344 = tmp85 - tmp92; tmp345 = tmp343 + tmp344; tmp361 = tmp343 - tmp344; tmp362 = tmp349 - tmp346; tmp363 = tmp351 + tmp354; tmp364 = K707106781 * (tmp362 - tmp363); tmp366 = K707106781 * (tmp362 + tmp363); } { fftw_real tmp350; fftw_real tmp355; fftw_real tmp357; fftw_real tmp358; ASSERT_ALIGNED_DOUBLE; tmp350 = tmp346 + tmp349; tmp355 = tmp351 - tmp354; tmp356 = K707106781 * (tmp350 + tmp355); tmp360 = K707106781 * (tmp355 - tmp350); tmp357 = tmp70 - tmp77; tmp358 = tmp29 - tmp22; tmp359 = tmp357 - tmp358; tmp365 = tmp358 + tmp357; } c_re(output[20 * ostride]) = tmp345 - tmp356; c_re(output[4 * ostride]) = tmp345 + tmp356; c_im(output[28 * ostride]) = tmp359 - tmp360; c_im(output[12 * ostride]) = tmp359 + tmp360; c_re(output[28 * ostride]) = tmp361 - tmp364; c_re(output[12 * ostride]) = tmp361 + tmp364; c_im(output[20 * ostride]) = tmp365 - tmp366; c_im(output[4 * ostride]) = tmp365 + tmp366; } { fftw_real tmp31; fftw_real tmp367; fftw_real tmp370; fftw_real tmp372; fftw_real tmp62; fftw_real tmp63; fftw_real tmp94; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp15; fftw_real tmp30; fftw_real tmp368; fftw_real tmp369; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; tmp31 = tmp15 + tmp30; tmp367 = tmp15 - tmp30; tmp368 = tmp347 + tmp348; tmp369 = tmp352 + tmp353; tmp370 = tmp368 - tmp369; tmp372 = tmp368 + tmp369; } { fftw_real tmp46; fftw_real tmp61; fftw_real tmp78; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp46 = tmp38 + tmp45; tmp61 = tmp53 + tmp60; tmp62 = tmp46 + tmp61; tmp63 = tmp61 - tmp46; tmp78 = tmp70 + tmp77; tmp93 = tmp85 + tmp92; tmp94 = tmp78 - tmp93; tmp371 = tmp78 + tmp93; } c_re(output[16 * ostride]) = tmp31 - tmp62; c_re(output[0]) = tmp31 + tmp62; c_im(output[8 * ostride]) = tmp63 + tmp94; c_im(output[24 * ostride]) = tmp94 - tmp63; c_re(output[24 * ostride]) = tmp367 - tmp370; c_re(output[8 * ostride]) = tmp367 + tmp370; c_im(output[16 * ostride]) = tmp371 - tmp372; c_im(output[0]) = tmp371 + tmp372; } { fftw_real tmp121; fftw_real tmp189; fftw_real tmp187; fftw_real tmp193; fftw_real tmp148; fftw_real tmp190; fftw_real tmp175; fftw_real tmp191; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp105; fftw_real tmp120; fftw_real tmp183; fftw_real tmp186; ASSERT_ALIGNED_DOUBLE; tmp105 = tmp97 - tmp104; tmp120 = tmp112 - tmp119; tmp121 = tmp105 + tmp120; tmp189 = tmp105 - tmp120; tmp183 = tmp179 - tmp182; tmp186 = tmp184 - tmp185; tmp187 = tmp183 - tmp186; tmp193 = tmp183 + tmp186; } { fftw_real tmp138; fftw_real tmp147; fftw_real tmp165; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp138 = tmp126 - tmp137; tmp147 = tmp143 - tmp146; tmp148 = (K980785280 * tmp138) + (K195090322 * tmp147); tmp190 = (K195090322 * tmp138) - (K980785280 * tmp147); tmp165 = tmp153 - tmp164; tmp174 = tmp170 - tmp173; tmp175 = (K195090322 * tmp165) - (K980785280 * tmp174); tmp191 = (K195090322 * tmp174) + (K980785280 * tmp165); } { fftw_real tmp176; fftw_real tmp188; fftw_real tmp192; fftw_real tmp194; ASSERT_ALIGNED_DOUBLE; tmp176 = tmp148 + tmp175; c_re(output[23 * ostride]) = tmp121 - tmp176; c_re(output[7 * ostride]) = tmp121 + tmp176; tmp188 = tmp175 - tmp148; c_im(output[31 * ostride]) = tmp187 - tmp188; c_im(output[15 * ostride]) = tmp187 + tmp188; tmp192 = tmp190 - tmp191; c_re(output[31 * ostride]) = tmp189 - tmp192; c_re(output[15 * ostride]) = tmp189 + tmp192; tmp194 = tmp190 + tmp191; c_im(output[23 * ostride]) = tmp193 - tmp194; c_im(output[7 * ostride]) = tmp193 + tmp194; } } { fftw_real tmp197; fftw_real tmp209; fftw_real tmp207; fftw_real tmp213; fftw_real tmp200; fftw_real tmp210; fftw_real tmp203; fftw_real tmp211; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp195; fftw_real tmp196; fftw_real tmp205; fftw_real tmp206; ASSERT_ALIGNED_DOUBLE; tmp195 = tmp97 + tmp104; tmp196 = tmp185 + tmp184; tmp197 = tmp195 + tmp196; tmp209 = tmp195 - tmp196; tmp205 = tmp179 + tmp182; tmp206 = tmp112 + tmp119; tmp207 = tmp205 - tmp206; tmp213 = tmp205 + tmp206; } { fftw_real tmp198; fftw_real tmp199; fftw_real tmp201; fftw_real tmp202; ASSERT_ALIGNED_DOUBLE; tmp198 = tmp126 + tmp137; tmp199 = tmp143 + tmp146; tmp200 = (K555570233 * tmp198) + (K831469612 * tmp199); tmp210 = (K831469612 * tmp198) - (K555570233 * tmp199); tmp201 = tmp153 + tmp164; tmp202 = tmp170 + tmp173; tmp203 = (K831469612 * tmp201) - (K555570233 * tmp202); tmp211 = (K831469612 * tmp202) + (K555570233 * tmp201); } { fftw_real tmp204; fftw_real tmp208; fftw_real tmp212; fftw_real tmp214; ASSERT_ALIGNED_DOUBLE; tmp204 = tmp200 + tmp203; c_re(output[19 * ostride]) = tmp197 - tmp204; c_re(output[3 * ostride]) = tmp197 + tmp204; tmp208 = tmp203 - tmp200; c_im(output[27 * ostride]) = tmp207 - tmp208; c_im(output[11 * ostride]) = tmp207 + tmp208; tmp212 = tmp210 - tmp211; c_re(output[27 * ostride]) = tmp209 - tmp212; c_re(output[11 * ostride]) = tmp209 + tmp212; tmp214 = tmp210 + tmp211; c_im(output[19 * ostride]) = tmp213 - tmp214; c_im(output[3 * ostride]) = tmp213 + tmp214; } } { fftw_real tmp225; fftw_real tmp249; fftw_real tmp247; fftw_real tmp253; fftw_real tmp232; fftw_real tmp250; fftw_real tmp239; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp217; fftw_real tmp224; fftw_real tmp243; fftw_real tmp246; ASSERT_ALIGNED_DOUBLE; tmp217 = tmp215 - tmp216; tmp224 = tmp220 - tmp223; tmp225 = tmp217 + tmp224; tmp249 = tmp217 - tmp224; tmp243 = tmp241 - tmp242; tmp246 = tmp244 - tmp245; tmp247 = tmp243 - tmp246; tmp253 = tmp243 + tmp246; } { fftw_real tmp228; fftw_real tmp231; fftw_real tmp235; fftw_real tmp238; ASSERT_ALIGNED_DOUBLE; tmp228 = tmp226 - tmp227; tmp231 = tmp229 - tmp230; tmp232 = (K555570233 * tmp228) + (K831469612 * tmp231); tmp250 = (K555570233 * tmp231) - (K831469612 * tmp228); tmp235 = tmp233 - tmp234; tmp238 = tmp236 - tmp237; tmp239 = (K555570233 * tmp235) - (K831469612 * tmp238); tmp251 = (K831469612 * tmp235) + (K555570233 * tmp238); } { fftw_real tmp240; fftw_real tmp248; fftw_real tmp252; fftw_real tmp254; ASSERT_ALIGNED_DOUBLE; tmp240 = tmp232 + tmp239; c_re(output[21 * ostride]) = tmp225 - tmp240; c_re(output[5 * ostride]) = tmp225 + tmp240; tmp248 = tmp239 - tmp232; c_im(output[29 * ostride]) = tmp247 - tmp248; c_im(output[13 * ostride]) = tmp247 + tmp248; tmp252 = tmp250 - tmp251; c_re(output[29 * ostride]) = tmp249 - tmp252; c_re(output[13 * ostride]) = tmp249 + tmp252; tmp254 = tmp250 + tmp251; c_im(output[21 * ostride]) = tmp253 - tmp254; c_im(output[5 * ostride]) = tmp253 + tmp254; } } { fftw_real tmp257; fftw_real tmp269; fftw_real tmp267; fftw_real tmp273; fftw_real tmp260; fftw_real tmp270; fftw_real tmp263; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp255; fftw_real tmp256; fftw_real tmp265; fftw_real tmp266; ASSERT_ALIGNED_DOUBLE; tmp255 = tmp215 + tmp216; tmp256 = tmp245 + tmp244; tmp257 = tmp255 + tmp256; tmp269 = tmp255 - tmp256; tmp265 = tmp241 + tmp242; tmp266 = tmp220 + tmp223; tmp267 = tmp265 - tmp266; tmp273 = tmp265 + tmp266; } { fftw_real tmp258; fftw_real tmp259; fftw_real tmp261; fftw_real tmp262; ASSERT_ALIGNED_DOUBLE; tmp258 = tmp226 + tmp227; tmp259 = tmp229 + tmp230; tmp260 = (K980785280 * tmp258) + (K195090322 * tmp259); tmp270 = (K980785280 * tmp259) - (K195090322 * tmp258); tmp261 = tmp233 + tmp234; tmp262 = tmp236 + tmp237; tmp263 = (K980785280 * tmp261) - (K195090322 * tmp262); tmp271 = (K195090322 * tmp261) + (K980785280 * tmp262); } { fftw_real tmp264; fftw_real tmp268; fftw_real tmp272; fftw_real tmp274; ASSERT_ALIGNED_DOUBLE; tmp264 = tmp260 + tmp263; c_re(output[17 * ostride]) = tmp257 - tmp264; c_re(output[ostride]) = tmp257 + tmp264; tmp268 = tmp263 - tmp260; c_im(output[25 * ostride]) = tmp267 - tmp268; c_im(output[9 * ostride]) = tmp267 + tmp268; tmp272 = tmp270 - tmp271; c_re(output[25 * ostride]) = tmp269 - tmp272; c_re(output[9 * ostride]) = tmp269 + tmp272; tmp274 = tmp270 + tmp271; c_im(output[17 * ostride]) = tmp273 - tmp274; c_im(output[ostride]) = tmp273 + tmp274; } } } fftw_codelet_desc fftw_no_twiddle_32_desc = { "fftw_no_twiddle_32", (void (*)()) fftw_no_twiddle_32, 32, FFTW_FORWARD, FFTW_NOTW, 705, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fn_64.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000216370�07637527207�010224� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddle 64 */ /* * This function contains 912 FP additions, 248 FP multiplications, * (or, 808 additions, 144 multiplications, 104 fused multiply/add), * 156 stack variables, and 256 memory accesses */ static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_no_twiddle_64(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp193; fftw_real tmp471; fftw_real tmp15; fftw_real tmp815; fftw_real tmp719; fftw_real tmp781; fftw_real tmp142; fftw_real tmp849; fftw_real tmp371; fftw_real tmp537; fftw_real tmp637; fftw_real tmp755; fftw_real tmp200; fftw_real tmp538; fftw_real tmp374; fftw_real tmp472; fftw_real tmp109; fftw_real tmp837; fftw_real tmp693; fftw_real tmp773; fftw_real tmp844; fftw_real tmp892; fftw_real tmp710; fftw_real tmp776; fftw_real tmp329; fftw_real tmp429; fftw_real tmp519; fftw_real tmp593; fftw_real tmp362; fftw_real tmp432; fftw_real tmp530; fftw_real tmp596; fftw_real tmp30; fftw_real tmp850; fftw_real tmp640; fftw_real tmp721; fftw_real tmp157; fftw_real tmp816; fftw_real tmp643; fftw_real tmp720; fftw_real tmp208; fftw_real tmp377; fftw_real tmp476; fftw_real tmp541; fftw_real tmp215; fftw_real tmp376; fftw_real tmp479; fftw_real tmp540; fftw_real tmp124; fftw_real tmp845; fftw_real tmp365; fftw_real tmp430; fftw_real tmp352; fftw_real tmp433; fftw_real tmp840; fftw_real tmp893; fftw_real tmp526; fftw_real tmp597; fftw_real tmp533; fftw_real tmp594; fftw_real tmp704; fftw_real tmp777; fftw_real tmp713; fftw_real tmp774; fftw_real tmp46; fftw_real tmp819; fftw_real tmp648; fftw_real tmp758; fftw_real tmp173; fftw_real tmp818; fftw_real tmp651; fftw_real tmp759; fftw_real tmp228; fftw_real tmp414; fftw_real tmp484; fftw_real tmp578; fftw_real tmp235; fftw_real tmp415; fftw_real tmp487; fftw_real tmp579; fftw_real tmp78; fftw_real tmp831; fftw_real tmp666; fftw_real tmp769; fftw_real tmp828; fftw_real tmp887; fftw_real tmp683; fftw_real tmp766; fftw_real tmp274; fftw_real tmp425; fftw_real tmp500; fftw_real tmp589; fftw_real tmp307; fftw_real tmp422; fftw_real tmp511; fftw_real tmp586; fftw_real tmp61; fftw_real tmp821; fftw_real tmp655; fftw_real tmp761; fftw_real tmp188; fftw_real tmp822; fftw_real tmp658; fftw_real tmp762; fftw_real tmp247; fftw_real tmp417; fftw_real tmp491; fftw_real tmp581; fftw_real tmp254; fftw_real tmp418; fftw_real tmp494; fftw_real tmp582; fftw_real tmp93; fftw_real tmp829; fftw_real tmp310; fftw_real tmp426; fftw_real tmp297; fftw_real tmp423; fftw_real tmp834; fftw_real tmp888; fftw_real tmp507; fftw_real tmp587; fftw_real tmp514; fftw_real tmp590; fftw_real tmp677; fftw_real tmp767; fftw_real tmp686; fftw_real tmp770; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp191; fftw_real tmp130; fftw_real tmp370; fftw_real tmp6; fftw_real tmp369; fftw_real tmp133; fftw_real tmp192; fftw_real tmp10; fftw_real tmp195; fftw_real tmp137; fftw_real tmp194; fftw_real tmp13; fftw_real tmp197; fftw_real tmp140; fftw_real tmp198; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[32 * istride]); tmp3 = tmp1 + tmp2; tmp191 = tmp1 - tmp2; tmp128 = c_im(input[0]); tmp129 = c_im(input[32 * istride]); tmp130 = tmp128 + tmp129; tmp370 = tmp128 - tmp129; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp131; fftw_real tmp132; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[16 * istride]); tmp5 = c_re(input[48 * istride]); tmp6 = tmp4 + tmp5; tmp369 = tmp4 - tmp5; tmp131 = c_im(input[16 * istride]); tmp132 = c_im(input[48 * istride]); tmp133 = tmp131 + tmp132; tmp192 = tmp131 - tmp132; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp135; fftw_real tmp136; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[8 * istride]); tmp9 = c_re(input[40 * istride]); tmp10 = tmp8 + tmp9; tmp195 = tmp8 - tmp9; tmp135 = c_im(input[8 * istride]); tmp136 = c_im(input[40 * istride]); tmp137 = tmp135 + tmp136; tmp194 = tmp135 - tmp136; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp138; fftw_real tmp139; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[56 * istride]); tmp12 = c_re(input[24 * istride]); tmp13 = tmp11 + tmp12; tmp197 = tmp11 - tmp12; tmp138 = c_im(input[56 * istride]); tmp139 = c_im(input[24 * istride]); tmp140 = tmp138 + tmp139; tmp198 = tmp138 - tmp139; } { fftw_real tmp7; fftw_real tmp14; fftw_real tmp635; fftw_real tmp636; ASSERT_ALIGNED_DOUBLE; tmp193 = tmp191 - tmp192; tmp471 = tmp191 + tmp192; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; tmp15 = tmp7 + tmp14; tmp815 = tmp7 - tmp14; { fftw_real tmp717; fftw_real tmp718; fftw_real tmp134; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp717 = tmp130 - tmp133; tmp718 = tmp13 - tmp10; tmp719 = tmp717 - tmp718; tmp781 = tmp718 + tmp717; tmp134 = tmp130 + tmp133; tmp141 = tmp137 + tmp140; tmp142 = tmp134 + tmp141; tmp849 = tmp134 - tmp141; } tmp371 = tmp369 + tmp370; tmp537 = tmp370 - tmp369; tmp635 = tmp3 - tmp6; tmp636 = tmp137 - tmp140; tmp637 = tmp635 - tmp636; tmp755 = tmp635 + tmp636; { fftw_real tmp196; fftw_real tmp199; fftw_real tmp372; fftw_real tmp373; ASSERT_ALIGNED_DOUBLE; tmp196 = tmp194 - tmp195; tmp199 = tmp197 + tmp198; tmp200 = K707106781 * (tmp196 - tmp199); tmp538 = K707106781 * (tmp196 + tmp199); tmp372 = tmp197 - tmp198; tmp373 = tmp195 + tmp194; tmp374 = K707106781 * (tmp372 - tmp373); tmp472 = K707106781 * (tmp373 + tmp372); } } } { fftw_real tmp97; fftw_real tmp313; fftw_real tmp357; fftw_real tmp706; fftw_real tmp100; fftw_real tmp354; fftw_real tmp316; fftw_real tmp707; fftw_real tmp107; fftw_real tmp691; fftw_real tmp327; fftw_real tmp359; fftw_real tmp104; fftw_real tmp690; fftw_real tmp322; fftw_real tmp360; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp95; fftw_real tmp96; fftw_real tmp314; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; tmp95 = c_re(input[63 * istride]); tmp96 = c_re(input[31 * istride]); tmp97 = tmp95 + tmp96; tmp313 = tmp95 - tmp96; { fftw_real tmp355; fftw_real tmp356; fftw_real tmp98; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp355 = c_im(input[63 * istride]); tmp356 = c_im(input[31 * istride]); tmp357 = tmp355 - tmp356; tmp706 = tmp355 + tmp356; tmp98 = c_re(input[15 * istride]); tmp99 = c_re(input[47 * istride]); tmp100 = tmp98 + tmp99; tmp354 = tmp98 - tmp99; } tmp314 = c_im(input[15 * istride]); tmp315 = c_im(input[47 * istride]); tmp316 = tmp314 - tmp315; tmp707 = tmp314 + tmp315; { fftw_real tmp105; fftw_real tmp106; fftw_real tmp323; fftw_real tmp324; fftw_real tmp325; fftw_real tmp326; ASSERT_ALIGNED_DOUBLE; tmp105 = c_re(input[55 * istride]); tmp106 = c_re(input[23 * istride]); tmp323 = tmp105 - tmp106; tmp324 = c_im(input[55 * istride]); tmp325 = c_im(input[23 * istride]); tmp326 = tmp324 - tmp325; tmp107 = tmp105 + tmp106; tmp691 = tmp324 + tmp325; tmp327 = tmp323 + tmp326; tmp359 = tmp323 - tmp326; } { fftw_real tmp102; fftw_real tmp103; fftw_real tmp321; fftw_real tmp318; fftw_real tmp319; fftw_real tmp320; ASSERT_ALIGNED_DOUBLE; tmp102 = c_re(input[7 * istride]); tmp103 = c_re(input[39 * istride]); tmp321 = tmp102 - tmp103; tmp318 = c_im(input[7 * istride]); tmp319 = c_im(input[39 * istride]); tmp320 = tmp318 - tmp319; tmp104 = tmp102 + tmp103; tmp690 = tmp318 + tmp319; tmp322 = tmp320 - tmp321; tmp360 = tmp321 + tmp320; } } { fftw_real tmp101; fftw_real tmp108; fftw_real tmp689; fftw_real tmp692; ASSERT_ALIGNED_DOUBLE; tmp101 = tmp97 + tmp100; tmp108 = tmp104 + tmp107; tmp109 = tmp101 + tmp108; tmp837 = tmp101 - tmp108; tmp689 = tmp97 - tmp100; tmp692 = tmp690 - tmp691; tmp693 = tmp689 - tmp692; tmp773 = tmp689 + tmp692; } { fftw_real tmp842; fftw_real tmp843; fftw_real tmp708; fftw_real tmp709; ASSERT_ALIGNED_DOUBLE; tmp842 = tmp706 + tmp707; tmp843 = tmp690 + tmp691; tmp844 = tmp842 - tmp843; tmp892 = tmp842 + tmp843; tmp708 = tmp706 - tmp707; tmp709 = tmp107 - tmp104; tmp710 = tmp708 - tmp709; tmp776 = tmp709 + tmp708; } { fftw_real tmp317; fftw_real tmp328; fftw_real tmp517; fftw_real tmp518; ASSERT_ALIGNED_DOUBLE; tmp317 = tmp313 - tmp316; tmp328 = K707106781 * (tmp322 - tmp327); tmp329 = tmp317 - tmp328; tmp429 = tmp317 + tmp328; tmp517 = tmp313 + tmp316; tmp518 = K707106781 * (tmp360 + tmp359); tmp519 = tmp517 - tmp518; tmp593 = tmp517 + tmp518; } { fftw_real tmp358; fftw_real tmp361; fftw_real tmp528; fftw_real tmp529; ASSERT_ALIGNED_DOUBLE; tmp358 = tmp354 + tmp357; tmp361 = K707106781 * (tmp359 - tmp360); tmp362 = tmp358 - tmp361; tmp432 = tmp358 + tmp361; tmp528 = tmp357 - tmp354; tmp529 = K707106781 * (tmp322 + tmp327); tmp530 = tmp528 - tmp529; tmp596 = tmp528 + tmp529; } } { fftw_real tmp18; fftw_real tmp205; fftw_real tmp145; fftw_real tmp203; fftw_real tmp21; fftw_real tmp202; fftw_real tmp148; fftw_real tmp206; fftw_real tmp25; fftw_real tmp212; fftw_real tmp152; fftw_real tmp210; fftw_real tmp28; fftw_real tmp209; fftw_real tmp155; fftw_real tmp213; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp143; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[4 * istride]); tmp17 = c_re(input[36 * istride]); tmp18 = tmp16 + tmp17; tmp205 = tmp16 - tmp17; tmp143 = c_im(input[4 * istride]); tmp144 = c_im(input[36 * istride]); tmp145 = tmp143 + tmp144; tmp203 = tmp143 - tmp144; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp146; fftw_real tmp147; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[20 * istride]); tmp20 = c_re(input[52 * istride]); tmp21 = tmp19 + tmp20; tmp202 = tmp19 - tmp20; tmp146 = c_im(input[20 * istride]); tmp147 = c_im(input[52 * istride]); tmp148 = tmp146 + tmp147; tmp206 = tmp146 - tmp147; } { fftw_real tmp23; fftw_real tmp24; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[60 * istride]); tmp24 = c_re(input[28 * istride]); tmp25 = tmp23 + tmp24; tmp212 = tmp23 - tmp24; tmp150 = c_im(input[60 * istride]); tmp151 = c_im(input[28 * istride]); tmp152 = tmp150 + tmp151; tmp210 = tmp150 - tmp151; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp153; fftw_real tmp154; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[12 * istride]); tmp27 = c_re(input[44 * istride]); tmp28 = tmp26 + tmp27; tmp209 = tmp26 - tmp27; tmp153 = c_im(input[12 * istride]); tmp154 = c_im(input[44 * istride]); tmp155 = tmp153 + tmp154; tmp213 = tmp153 - tmp154; } { fftw_real tmp22; fftw_real tmp29; fftw_real tmp638; fftw_real tmp639; ASSERT_ALIGNED_DOUBLE; tmp22 = tmp18 + tmp21; tmp29 = tmp25 + tmp28; tmp30 = tmp22 + tmp29; tmp850 = tmp29 - tmp22; tmp638 = tmp145 - tmp148; tmp639 = tmp18 - tmp21; tmp640 = tmp638 - tmp639; tmp721 = tmp639 + tmp638; } { fftw_real tmp149; fftw_real tmp156; fftw_real tmp641; fftw_real tmp642; ASSERT_ALIGNED_DOUBLE; tmp149 = tmp145 + tmp148; tmp156 = tmp152 + tmp155; tmp157 = tmp149 + tmp156; tmp816 = tmp149 - tmp156; tmp641 = tmp25 - tmp28; tmp642 = tmp152 - tmp155; tmp643 = tmp641 + tmp642; tmp720 = tmp641 - tmp642; } { fftw_real tmp204; fftw_real tmp207; fftw_real tmp474; fftw_real tmp475; ASSERT_ALIGNED_DOUBLE; tmp204 = tmp202 + tmp203; tmp207 = tmp205 - tmp206; tmp208 = (K382683432 * tmp204) - (K923879532 * tmp207); tmp377 = (K923879532 * tmp204) + (K382683432 * tmp207); tmp474 = tmp203 - tmp202; tmp475 = tmp205 + tmp206; tmp476 = (K923879532 * tmp474) - (K382683432 * tmp475); tmp541 = (K382683432 * tmp474) + (K923879532 * tmp475); } { fftw_real tmp211; fftw_real tmp214; fftw_real tmp477; fftw_real tmp478; ASSERT_ALIGNED_DOUBLE; tmp211 = tmp209 + tmp210; tmp214 = tmp212 - tmp213; tmp215 = (K382683432 * tmp211) + (K923879532 * tmp214); tmp376 = (K382683432 * tmp214) - (K923879532 * tmp211); tmp477 = tmp210 - tmp209; tmp478 = tmp212 + tmp213; tmp479 = (K923879532 * tmp477) + (K382683432 * tmp478); tmp540 = (K923879532 * tmp478) - (K382683432 * tmp477); } } { fftw_real tmp112; fftw_real tmp694; fftw_real tmp115; fftw_real tmp695; fftw_real tmp334; fftw_real tmp520; fftw_real tmp339; fftw_real tmp521; fftw_real tmp697; fftw_real tmp696; fftw_real tmp119; fftw_real tmp700; fftw_real tmp122; fftw_real tmp701; fftw_real tmp345; fftw_real tmp523; fftw_real tmp350; fftw_real tmp524; fftw_real tmp702; fftw_real tmp699; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp335; fftw_real tmp333; fftw_real tmp330; fftw_real tmp338; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp110; fftw_real tmp111; fftw_real tmp331; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp110 = c_re(input[3 * istride]); tmp111 = c_re(input[35 * istride]); tmp112 = tmp110 + tmp111; tmp335 = tmp110 - tmp111; tmp331 = c_im(input[3 * istride]); tmp332 = c_im(input[35 * istride]); tmp333 = tmp331 - tmp332; tmp694 = tmp331 + tmp332; } { fftw_real tmp113; fftw_real tmp114; fftw_real tmp336; fftw_real tmp337; ASSERT_ALIGNED_DOUBLE; tmp113 = c_re(input[19 * istride]); tmp114 = c_re(input[51 * istride]); tmp115 = tmp113 + tmp114; tmp330 = tmp113 - tmp114; tmp336 = c_im(input[19 * istride]); tmp337 = c_im(input[51 * istride]); tmp338 = tmp336 - tmp337; tmp695 = tmp336 + tmp337; } tmp334 = tmp330 + tmp333; tmp520 = tmp333 - tmp330; tmp339 = tmp335 - tmp338; tmp521 = tmp335 + tmp338; tmp697 = tmp112 - tmp115; tmp696 = tmp694 - tmp695; } { fftw_real tmp346; fftw_real tmp344; fftw_real tmp341; fftw_real tmp349; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp117; fftw_real tmp118; fftw_real tmp342; fftw_real tmp343; ASSERT_ALIGNED_DOUBLE; tmp117 = c_re(input[59 * istride]); tmp118 = c_re(input[27 * istride]); tmp119 = tmp117 + tmp118; tmp346 = tmp117 - tmp118; tmp342 = c_im(input[59 * istride]); tmp343 = c_im(input[27 * istride]); tmp344 = tmp342 - tmp343; tmp700 = tmp342 + tmp343; } { fftw_real tmp120; fftw_real tmp121; fftw_real tmp347; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; tmp120 = c_re(input[11 * istride]); tmp121 = c_re(input[43 * istride]); tmp122 = tmp120 + tmp121; tmp341 = tmp120 - tmp121; tmp347 = c_im(input[11 * istride]); tmp348 = c_im(input[43 * istride]); tmp349 = tmp347 - tmp348; tmp701 = tmp347 + tmp348; } tmp345 = tmp341 + tmp344; tmp523 = tmp344 - tmp341; tmp350 = tmp346 - tmp349; tmp524 = tmp346 + tmp349; tmp702 = tmp700 - tmp701; tmp699 = tmp119 - tmp122; } { fftw_real tmp116; fftw_real tmp123; fftw_real tmp363; fftw_real tmp364; ASSERT_ALIGNED_DOUBLE; tmp116 = tmp112 + tmp115; tmp123 = tmp119 + tmp122; tmp124 = tmp116 + tmp123; tmp845 = tmp123 - tmp116; tmp363 = (K382683432 * tmp350) - (K923879532 * tmp345); tmp364 = (K923879532 * tmp334) + (K382683432 * tmp339); tmp365 = tmp363 - tmp364; tmp430 = tmp364 + tmp363; } { fftw_real tmp340; fftw_real tmp351; fftw_real tmp838; fftw_real tmp839; ASSERT_ALIGNED_DOUBLE; tmp340 = (K382683432 * tmp334) - (K923879532 * tmp339); tmp351 = (K382683432 * tmp345) + (K923879532 * tmp350); tmp352 = tmp340 - tmp351; tmp433 = tmp340 + tmp351; tmp838 = tmp694 + tmp695; tmp839 = tmp700 + tmp701; tmp840 = tmp838 - tmp839; tmp893 = tmp838 + tmp839; } { fftw_real tmp522; fftw_real tmp525; fftw_real tmp531; fftw_real tmp532; ASSERT_ALIGNED_DOUBLE; tmp522 = (K923879532 * tmp520) - (K382683432 * tmp521); tmp525 = (K923879532 * tmp523) + (K382683432 * tmp524); tmp526 = tmp522 - tmp525; tmp597 = tmp522 + tmp525; tmp531 = (K923879532 * tmp524) - (K382683432 * tmp523); tmp532 = (K382683432 * tmp520) + (K923879532 * tmp521); tmp533 = tmp531 - tmp532; tmp594 = tmp532 + tmp531; } { fftw_real tmp698; fftw_real tmp703; fftw_real tmp711; fftw_real tmp712; ASSERT_ALIGNED_DOUBLE; tmp698 = tmp696 - tmp697; tmp703 = tmp699 + tmp702; tmp704 = K707106781 * (tmp698 - tmp703); tmp777 = K707106781 * (tmp698 + tmp703); tmp711 = tmp699 - tmp702; tmp712 = tmp697 + tmp696; tmp713 = K707106781 * (tmp711 - tmp712); tmp774 = K707106781 * (tmp712 + tmp711); } } { fftw_real tmp34; fftw_real tmp229; fftw_real tmp161; fftw_real tmp219; fftw_real tmp37; fftw_real tmp218; fftw_real tmp164; fftw_real tmp230; fftw_real tmp44; fftw_real tmp233; fftw_real tmp223; fftw_real tmp171; fftw_real tmp41; fftw_real tmp232; fftw_real tmp226; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp162; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(input[2 * istride]); tmp33 = c_re(input[34 * istride]); tmp34 = tmp32 + tmp33; tmp229 = tmp32 - tmp33; { fftw_real tmp159; fftw_real tmp160; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp159 = c_im(input[2 * istride]); tmp160 = c_im(input[34 * istride]); tmp161 = tmp159 + tmp160; tmp219 = tmp159 - tmp160; tmp35 = c_re(input[18 * istride]); tmp36 = c_re(input[50 * istride]); tmp37 = tmp35 + tmp36; tmp218 = tmp35 - tmp36; } tmp162 = c_im(input[18 * istride]); tmp163 = c_im(input[50 * istride]); tmp164 = tmp162 + tmp163; tmp230 = tmp162 - tmp163; { fftw_real tmp42; fftw_real tmp43; fftw_real tmp221; fftw_real tmp169; fftw_real tmp170; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(input[58 * istride]); tmp43 = c_re(input[26 * istride]); tmp221 = tmp42 - tmp43; tmp169 = c_im(input[58 * istride]); tmp170 = c_im(input[26 * istride]); tmp222 = tmp169 - tmp170; tmp44 = tmp42 + tmp43; tmp233 = tmp221 + tmp222; tmp223 = tmp221 - tmp222; tmp171 = tmp169 + tmp170; } { fftw_real tmp39; fftw_real tmp40; fftw_real tmp224; fftw_real tmp166; fftw_real tmp167; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp39 = c_re(input[10 * istride]); tmp40 = c_re(input[42 * istride]); tmp224 = tmp39 - tmp40; tmp166 = c_im(input[10 * istride]); tmp167 = c_im(input[42 * istride]); tmp225 = tmp166 - tmp167; tmp41 = tmp39 + tmp40; tmp232 = tmp225 - tmp224; tmp226 = tmp224 + tmp225; tmp168 = tmp166 + tmp167; } } { fftw_real tmp38; fftw_real tmp45; fftw_real tmp646; fftw_real tmp647; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp46 = tmp38 + tmp45; tmp819 = tmp38 - tmp45; tmp646 = tmp161 - tmp164; tmp647 = tmp44 - tmp41; tmp648 = tmp646 - tmp647; tmp758 = tmp647 + tmp646; } { fftw_real tmp165; fftw_real tmp172; fftw_real tmp649; fftw_real tmp650; ASSERT_ALIGNED_DOUBLE; tmp165 = tmp161 + tmp164; tmp172 = tmp168 + tmp171; tmp173 = tmp165 + tmp172; tmp818 = tmp165 - tmp172; tmp649 = tmp34 - tmp37; tmp650 = tmp168 - tmp171; tmp651 = tmp649 - tmp650; tmp759 = tmp649 + tmp650; } { fftw_real tmp220; fftw_real tmp227; fftw_real tmp482; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; tmp220 = tmp218 + tmp219; tmp227 = K707106781 * (tmp223 - tmp226); tmp228 = tmp220 - tmp227; tmp414 = tmp220 + tmp227; tmp482 = tmp219 - tmp218; tmp483 = K707106781 * (tmp232 + tmp233); tmp484 = tmp482 - tmp483; tmp578 = tmp482 + tmp483; } { fftw_real tmp231; fftw_real tmp234; fftw_real tmp485; fftw_real tmp486; ASSERT_ALIGNED_DOUBLE; tmp231 = tmp229 - tmp230; tmp234 = K707106781 * (tmp232 - tmp233); tmp235 = tmp231 - tmp234; tmp415 = tmp231 + tmp234; tmp485 = tmp229 + tmp230; tmp486 = K707106781 * (tmp226 + tmp223); tmp487 = tmp485 - tmp486; tmp579 = tmp485 + tmp486; } } { fftw_real tmp66; fftw_real tmp299; fftw_real tmp261; fftw_real tmp662; fftw_real tmp69; fftw_real tmp258; fftw_real tmp302; fftw_real tmp663; fftw_real tmp76; fftw_real tmp681; fftw_real tmp267; fftw_real tmp305; fftw_real tmp73; fftw_real tmp680; fftw_real tmp272; fftw_real tmp304; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp64; fftw_real tmp65; fftw_real tmp300; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; tmp64 = c_re(input[istride]); tmp65 = c_re(input[33 * istride]); tmp66 = tmp64 + tmp65; tmp299 = tmp64 - tmp65; { fftw_real tmp259; fftw_real tmp260; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp259 = c_im(input[istride]); tmp260 = c_im(input[33 * istride]); tmp261 = tmp259 - tmp260; tmp662 = tmp259 + tmp260; tmp67 = c_re(input[17 * istride]); tmp68 = c_re(input[49 * istride]); tmp69 = tmp67 + tmp68; tmp258 = tmp67 - tmp68; } tmp300 = c_im(input[17 * istride]); tmp301 = c_im(input[49 * istride]); tmp302 = tmp300 - tmp301; tmp663 = tmp300 + tmp301; { fftw_real tmp74; fftw_real tmp75; fftw_real tmp263; fftw_real tmp264; fftw_real tmp265; fftw_real tmp266; ASSERT_ALIGNED_DOUBLE; tmp74 = c_re(input[57 * istride]); tmp75 = c_re(input[25 * istride]); tmp263 = tmp74 - tmp75; tmp264 = c_im(input[57 * istride]); tmp265 = c_im(input[25 * istride]); tmp266 = tmp264 - tmp265; tmp76 = tmp74 + tmp75; tmp681 = tmp264 + tmp265; tmp267 = tmp263 - tmp266; tmp305 = tmp263 + tmp266; } { fftw_real tmp71; fftw_real tmp72; fftw_real tmp268; fftw_real tmp269; fftw_real tmp270; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; tmp71 = c_re(input[9 * istride]); tmp72 = c_re(input[41 * istride]); tmp268 = tmp71 - tmp72; tmp269 = c_im(input[9 * istride]); tmp270 = c_im(input[41 * istride]); tmp271 = tmp269 - tmp270; tmp73 = tmp71 + tmp72; tmp680 = tmp269 + tmp270; tmp272 = tmp268 + tmp271; tmp304 = tmp271 - tmp268; } } { fftw_real tmp70; fftw_real tmp77; fftw_real tmp664; fftw_real tmp665; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp66 + tmp69; tmp77 = tmp73 + tmp76; tmp78 = tmp70 + tmp77; tmp831 = tmp70 - tmp77; tmp664 = tmp662 - tmp663; tmp665 = tmp76 - tmp73; tmp666 = tmp664 - tmp665; tmp769 = tmp665 + tmp664; } { fftw_real tmp826; fftw_real tmp827; fftw_real tmp679; fftw_real tmp682; ASSERT_ALIGNED_DOUBLE; tmp826 = tmp662 + tmp663; tmp827 = tmp680 + tmp681; tmp828 = tmp826 - tmp827; tmp887 = tmp826 + tmp827; tmp679 = tmp66 - tmp69; tmp682 = tmp680 - tmp681; tmp683 = tmp679 - tmp682; tmp766 = tmp679 + tmp682; } { fftw_real tmp262; fftw_real tmp273; fftw_real tmp498; fftw_real tmp499; ASSERT_ALIGNED_DOUBLE; tmp262 = tmp258 + tmp261; tmp273 = K707106781 * (tmp267 - tmp272); tmp274 = tmp262 - tmp273; tmp425 = tmp262 + tmp273; tmp498 = tmp261 - tmp258; tmp499 = K707106781 * (tmp304 + tmp305); tmp500 = tmp498 - tmp499; tmp589 = tmp498 + tmp499; } { fftw_real tmp303; fftw_real tmp306; fftw_real tmp509; fftw_real tmp510; ASSERT_ALIGNED_DOUBLE; tmp303 = tmp299 - tmp302; tmp306 = K707106781 * (tmp304 - tmp305); tmp307 = tmp303 - tmp306; tmp422 = tmp303 + tmp306; tmp509 = tmp299 + tmp302; tmp510 = K707106781 * (tmp272 + tmp267); tmp511 = tmp509 - tmp510; tmp586 = tmp509 + tmp510; } } { fftw_real tmp49; fftw_real tmp248; fftw_real tmp176; fftw_real tmp238; fftw_real tmp52; fftw_real tmp237; fftw_real tmp179; fftw_real tmp249; fftw_real tmp59; fftw_real tmp252; fftw_real tmp242; fftw_real tmp186; fftw_real tmp56; fftw_real tmp251; fftw_real tmp245; fftw_real tmp183; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp177; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; tmp47 = c_re(input[62 * istride]); tmp48 = c_re(input[30 * istride]); tmp49 = tmp47 + tmp48; tmp248 = tmp47 - tmp48; { fftw_real tmp174; fftw_real tmp175; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp174 = c_im(input[62 * istride]); tmp175 = c_im(input[30 * istride]); tmp176 = tmp174 + tmp175; tmp238 = tmp174 - tmp175; tmp50 = c_re(input[14 * istride]); tmp51 = c_re(input[46 * istride]); tmp52 = tmp50 + tmp51; tmp237 = tmp50 - tmp51; } tmp177 = c_im(input[14 * istride]); tmp178 = c_im(input[46 * istride]); tmp179 = tmp177 + tmp178; tmp249 = tmp177 - tmp178; { fftw_real tmp57; fftw_real tmp58; fftw_real tmp240; fftw_real tmp184; fftw_real tmp185; fftw_real tmp241; ASSERT_ALIGNED_DOUBLE; tmp57 = c_re(input[54 * istride]); tmp58 = c_re(input[22 * istride]); tmp240 = tmp57 - tmp58; tmp184 = c_im(input[54 * istride]); tmp185 = c_im(input[22 * istride]); tmp241 = tmp184 - tmp185; tmp59 = tmp57 + tmp58; tmp252 = tmp240 + tmp241; tmp242 = tmp240 - tmp241; tmp186 = tmp184 + tmp185; } { fftw_real tmp54; fftw_real tmp55; fftw_real tmp243; fftw_real tmp181; fftw_real tmp182; fftw_real tmp244; ASSERT_ALIGNED_DOUBLE; tmp54 = c_re(input[6 * istride]); tmp55 = c_re(input[38 * istride]); tmp243 = tmp54 - tmp55; tmp181 = c_im(input[6 * istride]); tmp182 = c_im(input[38 * istride]); tmp244 = tmp181 - tmp182; tmp56 = tmp54 + tmp55; tmp251 = tmp244 - tmp243; tmp245 = tmp243 + tmp244; tmp183 = tmp181 + tmp182; } } { fftw_real tmp53; fftw_real tmp60; fftw_real tmp653; fftw_real tmp654; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp61 = tmp53 + tmp60; tmp821 = tmp53 - tmp60; tmp653 = tmp176 - tmp179; tmp654 = tmp59 - tmp56; tmp655 = tmp653 - tmp654; tmp761 = tmp654 + tmp653; } { fftw_real tmp180; fftw_real tmp187; fftw_real tmp656; fftw_real tmp657; ASSERT_ALIGNED_DOUBLE; tmp180 = tmp176 + tmp179; tmp187 = tmp183 + tmp186; tmp188 = tmp180 + tmp187; tmp822 = tmp180 - tmp187; tmp656 = tmp49 - tmp52; tmp657 = tmp183 - tmp186; tmp658 = tmp656 - tmp657; tmp762 = tmp656 + tmp657; } { fftw_real tmp239; fftw_real tmp246; fftw_real tmp489; fftw_real tmp490; ASSERT_ALIGNED_DOUBLE; tmp239 = tmp237 + tmp238; tmp246 = K707106781 * (tmp242 - tmp245); tmp247 = tmp239 - tmp246; tmp417 = tmp239 + tmp246; tmp489 = tmp248 + tmp249; tmp490 = K707106781 * (tmp245 + tmp242); tmp491 = tmp489 - tmp490; tmp581 = tmp489 + tmp490; } { fftw_real tmp250; fftw_real tmp253; fftw_real tmp492; fftw_real tmp493; ASSERT_ALIGNED_DOUBLE; tmp250 = tmp248 - tmp249; tmp253 = K707106781 * (tmp251 - tmp252); tmp254 = tmp250 - tmp253; tmp418 = tmp250 + tmp253; tmp492 = tmp238 - tmp237; tmp493 = K707106781 * (tmp251 + tmp252); tmp494 = tmp492 - tmp493; tmp582 = tmp492 + tmp493; } } { fftw_real tmp81; fftw_real tmp673; fftw_real tmp84; fftw_real tmp674; fftw_real tmp290; fftw_real tmp504; fftw_real tmp295; fftw_real tmp505; fftw_real tmp675; fftw_real tmp672; fftw_real tmp88; fftw_real tmp668; fftw_real tmp91; fftw_real tmp669; fftw_real tmp279; fftw_real tmp501; fftw_real tmp284; fftw_real tmp502; fftw_real tmp670; fftw_real tmp667; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp291; fftw_real tmp289; fftw_real tmp286; fftw_real tmp294; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp79; fftw_real tmp80; fftw_real tmp287; fftw_real tmp288; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(input[5 * istride]); tmp80 = c_re(input[37 * istride]); tmp81 = tmp79 + tmp80; tmp291 = tmp79 - tmp80; tmp287 = c_im(input[5 * istride]); tmp288 = c_im(input[37 * istride]); tmp289 = tmp287 - tmp288; tmp673 = tmp287 + tmp288; } { fftw_real tmp82; fftw_real tmp83; fftw_real tmp292; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; tmp82 = c_re(input[21 * istride]); tmp83 = c_re(input[53 * istride]); tmp84 = tmp82 + tmp83; tmp286 = tmp82 - tmp83; tmp292 = c_im(input[21 * istride]); tmp293 = c_im(input[53 * istride]); tmp294 = tmp292 - tmp293; tmp674 = tmp292 + tmp293; } tmp290 = tmp286 + tmp289; tmp504 = tmp289 - tmp286; tmp295 = tmp291 - tmp294; tmp505 = tmp291 + tmp294; tmp675 = tmp673 - tmp674; tmp672 = tmp81 - tmp84; } { fftw_real tmp275; fftw_real tmp283; fftw_real tmp280; fftw_real tmp278; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp86; fftw_real tmp87; fftw_real tmp281; fftw_real tmp282; ASSERT_ALIGNED_DOUBLE; tmp86 = c_re(input[61 * istride]); tmp87 = c_re(input[29 * istride]); tmp88 = tmp86 + tmp87; tmp275 = tmp86 - tmp87; tmp281 = c_im(input[61 * istride]); tmp282 = c_im(input[29 * istride]); tmp283 = tmp281 - tmp282; tmp668 = tmp281 + tmp282; } { fftw_real tmp89; fftw_real tmp90; fftw_real tmp276; fftw_real tmp277; ASSERT_ALIGNED_DOUBLE; tmp89 = c_re(input[13 * istride]); tmp90 = c_re(input[45 * istride]); tmp91 = tmp89 + tmp90; tmp280 = tmp89 - tmp90; tmp276 = c_im(input[13 * istride]); tmp277 = c_im(input[45 * istride]); tmp278 = tmp276 - tmp277; tmp669 = tmp276 + tmp277; } tmp279 = tmp275 - tmp278; tmp501 = tmp275 + tmp278; tmp284 = tmp280 + tmp283; tmp502 = tmp283 - tmp280; tmp670 = tmp668 - tmp669; tmp667 = tmp88 - tmp91; } { fftw_real tmp85; fftw_real tmp92; fftw_real tmp308; fftw_real tmp309; ASSERT_ALIGNED_DOUBLE; tmp85 = tmp81 + tmp84; tmp92 = tmp88 + tmp91; tmp93 = tmp85 + tmp92; tmp829 = tmp92 - tmp85; tmp308 = (K382683432 * tmp290) - (K923879532 * tmp295); tmp309 = (K382683432 * tmp284) + (K923879532 * tmp279); tmp310 = tmp308 - tmp309; tmp426 = tmp308 + tmp309; } { fftw_real tmp285; fftw_real tmp296; fftw_real tmp832; fftw_real tmp833; ASSERT_ALIGNED_DOUBLE; tmp285 = (K382683432 * tmp279) - (K923879532 * tmp284); tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); tmp297 = tmp285 - tmp296; tmp423 = tmp296 + tmp285; tmp832 = tmp673 + tmp674; tmp833 = tmp668 + tmp669; tmp834 = tmp832 - tmp833; tmp888 = tmp832 + tmp833; } { fftw_real tmp503; fftw_real tmp506; fftw_real tmp512; fftw_real tmp513; ASSERT_ALIGNED_DOUBLE; tmp503 = (K923879532 * tmp501) - (K382683432 * tmp502); tmp506 = (K382683432 * tmp504) + (K923879532 * tmp505); tmp507 = tmp503 - tmp506; tmp587 = tmp506 + tmp503; tmp512 = (K923879532 * tmp504) - (K382683432 * tmp505); tmp513 = (K923879532 * tmp502) + (K382683432 * tmp501); tmp514 = tmp512 - tmp513; tmp590 = tmp512 + tmp513; } { fftw_real tmp671; fftw_real tmp676; fftw_real tmp684; fftw_real tmp685; ASSERT_ALIGNED_DOUBLE; tmp671 = tmp667 - tmp670; tmp676 = tmp672 + tmp675; tmp677 = K707106781 * (tmp671 - tmp676); tmp767 = K707106781 * (tmp676 + tmp671); tmp684 = tmp675 - tmp672; tmp685 = tmp667 + tmp670; tmp686 = K707106781 * (tmp684 - tmp685); tmp770 = K707106781 * (tmp684 + tmp685); } } { fftw_real tmp63; fftw_real tmp907; fftw_real tmp910; fftw_real tmp912; fftw_real tmp126; fftw_real tmp127; fftw_real tmp190; fftw_real tmp911; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp31; fftw_real tmp62; fftw_real tmp908; fftw_real tmp909; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp15 + tmp30; tmp62 = tmp46 + tmp61; tmp63 = tmp31 + tmp62; tmp907 = tmp31 - tmp62; tmp908 = tmp887 + tmp888; tmp909 = tmp892 + tmp893; tmp910 = tmp908 - tmp909; tmp912 = tmp908 + tmp909; } { fftw_real tmp94; fftw_real tmp125; fftw_real tmp158; fftw_real tmp189; ASSERT_ALIGNED_DOUBLE; tmp94 = tmp78 + tmp93; tmp125 = tmp109 + tmp124; tmp126 = tmp94 + tmp125; tmp127 = tmp125 - tmp94; tmp158 = tmp142 + tmp157; tmp189 = tmp173 + tmp188; tmp190 = tmp158 - tmp189; tmp911 = tmp158 + tmp189; } c_re(output[32 * ostride]) = tmp63 - tmp126; c_re(output[0]) = tmp63 + tmp126; c_im(output[16 * ostride]) = tmp127 + tmp190; c_im(output[48 * ostride]) = tmp190 - tmp127; c_re(output[48 * ostride]) = tmp907 - tmp910; c_re(output[16 * ostride]) = tmp907 + tmp910; c_im(output[32 * ostride]) = tmp911 - tmp912; c_im(output[0]) = tmp911 + tmp912; } { fftw_real tmp885; fftw_real tmp901; fftw_real tmp899; fftw_real tmp905; fftw_real tmp890; fftw_real tmp902; fftw_real tmp895; fftw_real tmp903; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp883; fftw_real tmp884; fftw_real tmp897; fftw_real tmp898; ASSERT_ALIGNED_DOUBLE; tmp883 = tmp15 - tmp30; tmp884 = tmp173 - tmp188; tmp885 = tmp883 + tmp884; tmp901 = tmp883 - tmp884; tmp897 = tmp142 - tmp157; tmp898 = tmp61 - tmp46; tmp899 = tmp897 - tmp898; tmp905 = tmp898 + tmp897; } { fftw_real tmp886; fftw_real tmp889; fftw_real tmp891; fftw_real tmp894; ASSERT_ALIGNED_DOUBLE; tmp886 = tmp78 - tmp93; tmp889 = tmp887 - tmp888; tmp890 = tmp886 + tmp889; tmp902 = tmp889 - tmp886; tmp891 = tmp109 - tmp124; tmp894 = tmp892 - tmp893; tmp895 = tmp891 - tmp894; tmp903 = tmp891 + tmp894; } { fftw_real tmp896; fftw_real tmp900; fftw_real tmp904; fftw_real tmp906; ASSERT_ALIGNED_DOUBLE; tmp896 = K707106781 * (tmp890 + tmp895); c_re(output[40 * ostride]) = tmp885 - tmp896; c_re(output[8 * ostride]) = tmp885 + tmp896; tmp900 = K707106781 * (tmp895 - tmp890); c_im(output[56 * ostride]) = tmp899 - tmp900; c_im(output[24 * ostride]) = tmp899 + tmp900; tmp904 = K707106781 * (tmp902 - tmp903); c_re(output[56 * ostride]) = tmp901 - tmp904; c_re(output[24 * ostride]) = tmp901 + tmp904; tmp906 = K707106781 * (tmp902 + tmp903); c_im(output[40 * ostride]) = tmp905 - tmp906; c_im(output[8 * ostride]) = tmp905 + tmp906; } } { fftw_real tmp217; fftw_real tmp391; fftw_real tmp396; fftw_real tmp406; fftw_real tmp399; fftw_real tmp407; fftw_real tmp367; fftw_real tmp387; fftw_real tmp312; fftw_real tmp386; fftw_real tmp379; fftw_real tmp401; fftw_real tmp382; fftw_real tmp392; fftw_real tmp256; fftw_real tmp402; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp201; fftw_real tmp216; fftw_real tmp394; fftw_real tmp395; ASSERT_ALIGNED_DOUBLE; tmp201 = tmp193 - tmp200; tmp216 = tmp208 - tmp215; tmp217 = tmp201 - tmp216; tmp391 = tmp201 + tmp216; tmp394 = tmp274 + tmp297; tmp395 = tmp307 + tmp310; tmp396 = (K634393284 * tmp394) + (K773010453 * tmp395); tmp406 = (K773010453 * tmp394) - (K634393284 * tmp395); } { fftw_real tmp397; fftw_real tmp398; fftw_real tmp353; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp397 = tmp329 + tmp352; tmp398 = tmp362 + tmp365; tmp399 = (K773010453 * tmp397) - (K634393284 * tmp398); tmp407 = (K773010453 * tmp398) + (K634393284 * tmp397); tmp353 = tmp329 - tmp352; tmp366 = tmp362 - tmp365; tmp367 = (K098017140 * tmp353) - (K995184726 * tmp366); tmp387 = (K098017140 * tmp366) + (K995184726 * tmp353); } { fftw_real tmp298; fftw_real tmp311; fftw_real tmp375; fftw_real tmp378; ASSERT_ALIGNED_DOUBLE; tmp298 = tmp274 - tmp297; tmp311 = tmp307 - tmp310; tmp312 = (K995184726 * tmp298) + (K098017140 * tmp311); tmp386 = (K098017140 * tmp298) - (K995184726 * tmp311); tmp375 = tmp371 - tmp374; tmp378 = tmp376 - tmp377; tmp379 = tmp375 - tmp378; tmp401 = tmp375 + tmp378; } { fftw_real tmp380; fftw_real tmp381; fftw_real tmp236; fftw_real tmp255; ASSERT_ALIGNED_DOUBLE; tmp380 = (K195090322 * tmp254) - (K980785280 * tmp247); tmp381 = (K980785280 * tmp228) + (K195090322 * tmp235); tmp382 = tmp380 - tmp381; tmp392 = tmp381 + tmp380; tmp236 = (K195090322 * tmp228) - (K980785280 * tmp235); tmp255 = (K195090322 * tmp247) + (K980785280 * tmp254); tmp256 = tmp236 - tmp255; tmp402 = tmp236 + tmp255; } { fftw_real tmp257; fftw_real tmp368; fftw_real tmp383; fftw_real tmp384; ASSERT_ALIGNED_DOUBLE; tmp257 = tmp217 + tmp256; tmp368 = tmp312 + tmp367; c_re(output[47 * ostride]) = tmp257 - tmp368; c_re(output[15 * ostride]) = tmp257 + tmp368; tmp383 = tmp379 - tmp382; tmp384 = tmp367 - tmp312; c_im(output[63 * ostride]) = tmp383 - tmp384; c_im(output[31 * ostride]) = tmp383 + tmp384; } { fftw_real tmp389; fftw_real tmp390; fftw_real tmp385; fftw_real tmp388; ASSERT_ALIGNED_DOUBLE; tmp389 = tmp379 + tmp382; tmp390 = tmp386 + tmp387; c_im(output[47 * ostride]) = tmp389 - tmp390; c_im(output[15 * ostride]) = tmp389 + tmp390; tmp385 = tmp217 - tmp256; tmp388 = tmp386 - tmp387; c_re(output[63 * ostride]) = tmp385 - tmp388; c_re(output[31 * ostride]) = tmp385 + tmp388; } { fftw_real tmp393; fftw_real tmp400; fftw_real tmp403; fftw_real tmp404; ASSERT_ALIGNED_DOUBLE; tmp393 = tmp391 + tmp392; tmp400 = tmp396 + tmp399; c_re(output[39 * ostride]) = tmp393 - tmp400; c_re(output[7 * ostride]) = tmp393 + tmp400; tmp403 = tmp401 - tmp402; tmp404 = tmp399 - tmp396; c_im(output[55 * ostride]) = tmp403 - tmp404; c_im(output[23 * ostride]) = tmp403 + tmp404; } { fftw_real tmp409; fftw_real tmp410; fftw_real tmp405; fftw_real tmp408; ASSERT_ALIGNED_DOUBLE; tmp409 = tmp401 + tmp402; tmp410 = tmp406 + tmp407; c_im(output[39 * ostride]) = tmp409 - tmp410; c_im(output[7 * ostride]) = tmp409 + tmp410; tmp405 = tmp391 - tmp392; tmp408 = tmp406 - tmp407; c_re(output[55 * ostride]) = tmp405 - tmp408; c_re(output[23 * ostride]) = tmp405 + tmp408; } } { fftw_real tmp413; fftw_real tmp451; fftw_real tmp456; fftw_real tmp466; fftw_real tmp459; fftw_real tmp467; fftw_real tmp435; fftw_real tmp447; fftw_real tmp428; fftw_real tmp446; fftw_real tmp439; fftw_real tmp461; fftw_real tmp442; fftw_real tmp452; fftw_real tmp420; fftw_real tmp462; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp411; fftw_real tmp412; fftw_real tmp454; fftw_real tmp455; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp193 + tmp200; tmp412 = tmp377 + tmp376; tmp413 = tmp411 - tmp412; tmp451 = tmp411 + tmp412; tmp454 = tmp422 + tmp423; tmp455 = tmp425 + tmp426; tmp456 = (K956940335 * tmp454) + (K290284677 * tmp455); tmp466 = (K956940335 * tmp455) - (K290284677 * tmp454); } { fftw_real tmp457; fftw_real tmp458; fftw_real tmp431; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp457 = tmp429 + tmp430; tmp458 = tmp432 + tmp433; tmp459 = (K956940335 * tmp457) - (K290284677 * tmp458); tmp467 = (K290284677 * tmp457) + (K956940335 * tmp458); tmp431 = tmp429 - tmp430; tmp434 = tmp432 - tmp433; tmp435 = (K471396736 * tmp431) - (K881921264 * tmp434); tmp447 = (K881921264 * tmp431) + (K471396736 * tmp434); } { fftw_real tmp424; fftw_real tmp427; fftw_real tmp437; fftw_real tmp438; ASSERT_ALIGNED_DOUBLE; tmp424 = tmp422 - tmp423; tmp427 = tmp425 - tmp426; tmp428 = (K471396736 * tmp424) + (K881921264 * tmp427); tmp446 = (K471396736 * tmp427) - (K881921264 * tmp424); tmp437 = tmp371 + tmp374; tmp438 = tmp208 + tmp215; tmp439 = tmp437 - tmp438; tmp461 = tmp437 + tmp438; } { fftw_real tmp440; fftw_real tmp441; fftw_real tmp416; fftw_real tmp419; ASSERT_ALIGNED_DOUBLE; tmp440 = (K831469612 * tmp418) - (K555570233 * tmp417); tmp441 = (K555570233 * tmp414) + (K831469612 * tmp415); tmp442 = tmp440 - tmp441; tmp452 = tmp441 + tmp440; tmp416 = (K831469612 * tmp414) - (K555570233 * tmp415); tmp419 = (K831469612 * tmp417) + (K555570233 * tmp418); tmp420 = tmp416 - tmp419; tmp462 = tmp416 + tmp419; } { fftw_real tmp421; fftw_real tmp436; fftw_real tmp443; fftw_real tmp444; ASSERT_ALIGNED_DOUBLE; tmp421 = tmp413 + tmp420; tmp436 = tmp428 + tmp435; c_re(output[43 * ostride]) = tmp421 - tmp436; c_re(output[11 * ostride]) = tmp421 + tmp436; tmp443 = tmp439 - tmp442; tmp444 = tmp435 - tmp428; c_im(output[59 * ostride]) = tmp443 - tmp444; c_im(output[27 * ostride]) = tmp443 + tmp444; } { fftw_real tmp449; fftw_real tmp450; fftw_real tmp445; fftw_real tmp448; ASSERT_ALIGNED_DOUBLE; tmp449 = tmp439 + tmp442; tmp450 = tmp446 + tmp447; c_im(output[43 * ostride]) = tmp449 - tmp450; c_im(output[11 * ostride]) = tmp449 + tmp450; tmp445 = tmp413 - tmp420; tmp448 = tmp446 - tmp447; c_re(output[59 * ostride]) = tmp445 - tmp448; c_re(output[27 * ostride]) = tmp445 + tmp448; } { fftw_real tmp453; fftw_real tmp460; fftw_real tmp463; fftw_real tmp464; ASSERT_ALIGNED_DOUBLE; tmp453 = tmp451 + tmp452; tmp460 = tmp456 + tmp459; c_re(output[35 * ostride]) = tmp453 - tmp460; c_re(output[3 * ostride]) = tmp453 + tmp460; tmp463 = tmp461 - tmp462; tmp464 = tmp459 - tmp456; c_im(output[51 * ostride]) = tmp463 - tmp464; c_im(output[19 * ostride]) = tmp463 + tmp464; } { fftw_real tmp469; fftw_real tmp470; fftw_real tmp465; fftw_real tmp468; ASSERT_ALIGNED_DOUBLE; tmp469 = tmp461 + tmp462; tmp470 = tmp466 + tmp467; c_im(output[35 * ostride]) = tmp469 - tmp470; c_im(output[3 * ostride]) = tmp469 + tmp470; tmp465 = tmp451 - tmp452; tmp468 = tmp466 - tmp467; c_re(output[51 * ostride]) = tmp465 - tmp468; c_re(output[19 * ostride]) = tmp465 + tmp468; } } { fftw_real tmp817; fftw_real tmp863; fftw_real tmp824; fftw_real tmp874; fftw_real tmp854; fftw_real tmp864; fftw_real tmp836; fftw_real tmp858; fftw_real tmp851; fftw_real tmp873; fftw_real tmp868; fftw_real tmp878; fftw_real tmp847; fftw_real tmp859; fftw_real tmp871; fftw_real tmp879; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp820; fftw_real tmp823; fftw_real tmp866; fftw_real tmp867; ASSERT_ALIGNED_DOUBLE; tmp817 = tmp815 - tmp816; tmp863 = tmp815 + tmp816; tmp820 = tmp818 - tmp819; tmp823 = tmp821 + tmp822; tmp824 = K707106781 * (tmp820 - tmp823); tmp874 = K707106781 * (tmp820 + tmp823); { fftw_real tmp852; fftw_real tmp853; fftw_real tmp830; fftw_real tmp835; ASSERT_ALIGNED_DOUBLE; tmp852 = tmp821 - tmp822; tmp853 = tmp819 + tmp818; tmp854 = K707106781 * (tmp852 - tmp853); tmp864 = K707106781 * (tmp853 + tmp852); tmp830 = tmp828 - tmp829; tmp835 = tmp831 - tmp834; tmp836 = (K923879532 * tmp830) + (K382683432 * tmp835); tmp858 = (K382683432 * tmp830) - (K923879532 * tmp835); } tmp851 = tmp849 - tmp850; tmp873 = tmp850 + tmp849; tmp866 = tmp829 + tmp828; tmp867 = tmp831 + tmp834; tmp868 = (K382683432 * tmp866) + (K923879532 * tmp867); tmp878 = (K923879532 * tmp866) - (K382683432 * tmp867); { fftw_real tmp841; fftw_real tmp846; fftw_real tmp869; fftw_real tmp870; ASSERT_ALIGNED_DOUBLE; tmp841 = tmp837 - tmp840; tmp846 = tmp844 - tmp845; tmp847 = (K382683432 * tmp841) - (K923879532 * tmp846); tmp859 = (K382683432 * tmp846) + (K923879532 * tmp841); tmp869 = tmp837 + tmp840; tmp870 = tmp845 + tmp844; tmp871 = (K923879532 * tmp869) - (K382683432 * tmp870); tmp879 = (K923879532 * tmp870) + (K382683432 * tmp869); } } { fftw_real tmp825; fftw_real tmp848; fftw_real tmp855; fftw_real tmp856; ASSERT_ALIGNED_DOUBLE; tmp825 = tmp817 + tmp824; tmp848 = tmp836 + tmp847; c_re(output[44 * ostride]) = tmp825 - tmp848; c_re(output[12 * ostride]) = tmp825 + tmp848; tmp855 = tmp851 - tmp854; tmp856 = tmp847 - tmp836; c_im(output[60 * ostride]) = tmp855 - tmp856; c_im(output[28 * ostride]) = tmp855 + tmp856; } { fftw_real tmp861; fftw_real tmp862; fftw_real tmp857; fftw_real tmp860; ASSERT_ALIGNED_DOUBLE; tmp861 = tmp851 + tmp854; tmp862 = tmp858 + tmp859; c_im(output[44 * ostride]) = tmp861 - tmp862; c_im(output[12 * ostride]) = tmp861 + tmp862; tmp857 = tmp817 - tmp824; tmp860 = tmp858 - tmp859; c_re(output[60 * ostride]) = tmp857 - tmp860; c_re(output[28 * ostride]) = tmp857 + tmp860; } { fftw_real tmp865; fftw_real tmp872; fftw_real tmp875; fftw_real tmp876; ASSERT_ALIGNED_DOUBLE; tmp865 = tmp863 + tmp864; tmp872 = tmp868 + tmp871; c_re(output[36 * ostride]) = tmp865 - tmp872; c_re(output[4 * ostride]) = tmp865 + tmp872; tmp875 = tmp873 - tmp874; tmp876 = tmp871 - tmp868; c_im(output[52 * ostride]) = tmp875 - tmp876; c_im(output[20 * ostride]) = tmp875 + tmp876; } { fftw_real tmp881; fftw_real tmp882; fftw_real tmp877; fftw_real tmp880; ASSERT_ALIGNED_DOUBLE; tmp881 = tmp873 + tmp874; tmp882 = tmp878 + tmp879; c_im(output[36 * ostride]) = tmp881 - tmp882; c_im(output[4 * ostride]) = tmp881 + tmp882; tmp877 = tmp863 - tmp864; tmp880 = tmp878 - tmp879; c_re(output[52 * ostride]) = tmp877 - tmp880; c_re(output[20 * ostride]) = tmp877 + tmp880; } } { fftw_real tmp757; fftw_real tmp795; fftw_real tmp800; fftw_real tmp810; fftw_real tmp803; fftw_real tmp811; fftw_real tmp779; fftw_real tmp791; fftw_real tmp783; fftw_real tmp805; fftw_real tmp764; fftw_real tmp806; fftw_real tmp786; fftw_real tmp796; fftw_real tmp772; fftw_real tmp790; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp756; fftw_real tmp798; fftw_real tmp799; fftw_real tmp782; fftw_real tmp760; fftw_real tmp763; ASSERT_ALIGNED_DOUBLE; tmp756 = K707106781 * (tmp721 + tmp720); tmp757 = tmp755 - tmp756; tmp795 = tmp755 + tmp756; tmp798 = tmp766 + tmp767; tmp799 = tmp769 + tmp770; tmp800 = (K980785280 * tmp798) + (K195090322 * tmp799); tmp810 = (K980785280 * tmp799) - (K195090322 * tmp798); { fftw_real tmp801; fftw_real tmp802; fftw_real tmp775; fftw_real tmp778; ASSERT_ALIGNED_DOUBLE; tmp801 = tmp773 + tmp774; tmp802 = tmp776 + tmp777; tmp803 = (K980785280 * tmp801) - (K195090322 * tmp802); tmp811 = (K195090322 * tmp801) + (K980785280 * tmp802); tmp775 = tmp773 - tmp774; tmp778 = tmp776 - tmp777; tmp779 = (K555570233 * tmp775) - (K831469612 * tmp778); tmp791 = (K831469612 * tmp775) + (K555570233 * tmp778); } tmp782 = K707106781 * (tmp640 + tmp643); tmp783 = tmp781 - tmp782; tmp805 = tmp781 + tmp782; tmp760 = (K923879532 * tmp758) - (K382683432 * tmp759); tmp763 = (K923879532 * tmp761) + (K382683432 * tmp762); tmp764 = tmp760 - tmp763; tmp806 = tmp760 + tmp763; { fftw_real tmp784; fftw_real tmp785; fftw_real tmp768; fftw_real tmp771; ASSERT_ALIGNED_DOUBLE; tmp784 = (K923879532 * tmp762) - (K382683432 * tmp761); tmp785 = (K382683432 * tmp758) + (K923879532 * tmp759); tmp786 = tmp784 - tmp785; tmp796 = tmp785 + tmp784; tmp768 = tmp766 - tmp767; tmp771 = tmp769 - tmp770; tmp772 = (K555570233 * tmp768) + (K831469612 * tmp771); tmp790 = (K555570233 * tmp771) - (K831469612 * tmp768); } } { fftw_real tmp765; fftw_real tmp780; fftw_real tmp787; fftw_real tmp788; ASSERT_ALIGNED_DOUBLE; tmp765 = tmp757 + tmp764; tmp780 = tmp772 + tmp779; c_re(output[42 * ostride]) = tmp765 - tmp780; c_re(output[10 * ostride]) = tmp765 + tmp780; tmp787 = tmp783 - tmp786; tmp788 = tmp779 - tmp772; c_im(output[58 * ostride]) = tmp787 - tmp788; c_im(output[26 * ostride]) = tmp787 + tmp788; } { fftw_real tmp793; fftw_real tmp794; fftw_real tmp789; fftw_real tmp792; ASSERT_ALIGNED_DOUBLE; tmp793 = tmp783 + tmp786; tmp794 = tmp790 + tmp791; c_im(output[42 * ostride]) = tmp793 - tmp794; c_im(output[10 * ostride]) = tmp793 + tmp794; tmp789 = tmp757 - tmp764; tmp792 = tmp790 - tmp791; c_re(output[58 * ostride]) = tmp789 - tmp792; c_re(output[26 * ostride]) = tmp789 + tmp792; } { fftw_real tmp797; fftw_real tmp804; fftw_real tmp807; fftw_real tmp808; ASSERT_ALIGNED_DOUBLE; tmp797 = tmp795 + tmp796; tmp804 = tmp800 + tmp803; c_re(output[34 * ostride]) = tmp797 - tmp804; c_re(output[2 * ostride]) = tmp797 + tmp804; tmp807 = tmp805 - tmp806; tmp808 = tmp803 - tmp800; c_im(output[50 * ostride]) = tmp807 - tmp808; c_im(output[18 * ostride]) = tmp807 + tmp808; } { fftw_real tmp813; fftw_real tmp814; fftw_real tmp809; fftw_real tmp812; ASSERT_ALIGNED_DOUBLE; tmp813 = tmp805 + tmp806; tmp814 = tmp810 + tmp811; c_im(output[34 * ostride]) = tmp813 - tmp814; c_im(output[2 * ostride]) = tmp813 + tmp814; tmp809 = tmp795 - tmp796; tmp812 = tmp810 - tmp811; c_re(output[50 * ostride]) = tmp809 - tmp812; c_re(output[18 * ostride]) = tmp809 + tmp812; } } { fftw_real tmp645; fftw_real tmp735; fftw_real tmp740; fftw_real tmp750; fftw_real tmp743; fftw_real tmp751; fftw_real tmp715; fftw_real tmp731; fftw_real tmp723; fftw_real tmp745; fftw_real tmp660; fftw_real tmp746; fftw_real tmp726; fftw_real tmp736; fftw_real tmp688; fftw_real tmp730; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp644; fftw_real tmp738; fftw_real tmp739; fftw_real tmp722; fftw_real tmp652; fftw_real tmp659; ASSERT_ALIGNED_DOUBLE; tmp644 = K707106781 * (tmp640 - tmp643); tmp645 = tmp637 - tmp644; tmp735 = tmp637 + tmp644; tmp738 = tmp666 + tmp677; tmp739 = tmp683 + tmp686; tmp740 = (K555570233 * tmp738) + (K831469612 * tmp739); tmp750 = (K831469612 * tmp738) - (K555570233 * tmp739); { fftw_real tmp741; fftw_real tmp742; fftw_real tmp705; fftw_real tmp714; ASSERT_ALIGNED_DOUBLE; tmp741 = tmp693 + tmp704; tmp742 = tmp710 + tmp713; tmp743 = (K831469612 * tmp741) - (K555570233 * tmp742); tmp751 = (K831469612 * tmp742) + (K555570233 * tmp741); tmp705 = tmp693 - tmp704; tmp714 = tmp710 - tmp713; tmp715 = (K195090322 * tmp705) - (K980785280 * tmp714); tmp731 = (K195090322 * tmp714) + (K980785280 * tmp705); } tmp722 = K707106781 * (tmp720 - tmp721); tmp723 = tmp719 - tmp722; tmp745 = tmp719 + tmp722; tmp652 = (K382683432 * tmp648) - (K923879532 * tmp651); tmp659 = (K382683432 * tmp655) + (K923879532 * tmp658); tmp660 = tmp652 - tmp659; tmp746 = tmp652 + tmp659; { fftw_real tmp724; fftw_real tmp725; fftw_real tmp678; fftw_real tmp687; ASSERT_ALIGNED_DOUBLE; tmp724 = (K382683432 * tmp658) - (K923879532 * tmp655); tmp725 = (K923879532 * tmp648) + (K382683432 * tmp651); tmp726 = tmp724 - tmp725; tmp736 = tmp725 + tmp724; tmp678 = tmp666 - tmp677; tmp687 = tmp683 - tmp686; tmp688 = (K980785280 * tmp678) + (K195090322 * tmp687); tmp730 = (K195090322 * tmp678) - (K980785280 * tmp687); } } { fftw_real tmp661; fftw_real tmp716; fftw_real tmp727; fftw_real tmp728; ASSERT_ALIGNED_DOUBLE; tmp661 = tmp645 + tmp660; tmp716 = tmp688 + tmp715; c_re(output[46 * ostride]) = tmp661 - tmp716; c_re(output[14 * ostride]) = tmp661 + tmp716; tmp727 = tmp723 - tmp726; tmp728 = tmp715 - tmp688; c_im(output[62 * ostride]) = tmp727 - tmp728; c_im(output[30 * ostride]) = tmp727 + tmp728; } { fftw_real tmp733; fftw_real tmp734; fftw_real tmp729; fftw_real tmp732; ASSERT_ALIGNED_DOUBLE; tmp733 = tmp723 + tmp726; tmp734 = tmp730 + tmp731; c_im(output[46 * ostride]) = tmp733 - tmp734; c_im(output[14 * ostride]) = tmp733 + tmp734; tmp729 = tmp645 - tmp660; tmp732 = tmp730 - tmp731; c_re(output[62 * ostride]) = tmp729 - tmp732; c_re(output[30 * ostride]) = tmp729 + tmp732; } { fftw_real tmp737; fftw_real tmp744; fftw_real tmp747; fftw_real tmp748; ASSERT_ALIGNED_DOUBLE; tmp737 = tmp735 + tmp736; tmp744 = tmp740 + tmp743; c_re(output[38 * ostride]) = tmp737 - tmp744; c_re(output[6 * ostride]) = tmp737 + tmp744; tmp747 = tmp745 - tmp746; tmp748 = tmp743 - tmp740; c_im(output[54 * ostride]) = tmp747 - tmp748; c_im(output[22 * ostride]) = tmp747 + tmp748; } { fftw_real tmp753; fftw_real tmp754; fftw_real tmp749; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp753 = tmp745 + tmp746; tmp754 = tmp750 + tmp751; c_im(output[38 * ostride]) = tmp753 - tmp754; c_im(output[6 * ostride]) = tmp753 + tmp754; tmp749 = tmp735 - tmp736; tmp752 = tmp750 - tmp751; c_re(output[54 * ostride]) = tmp749 - tmp752; c_re(output[22 * ostride]) = tmp749 + tmp752; } } { fftw_real tmp481; fftw_real tmp555; fftw_real tmp560; fftw_real tmp570; fftw_real tmp563; fftw_real tmp571; fftw_real tmp535; fftw_real tmp551; fftw_real tmp516; fftw_real tmp550; fftw_real tmp543; fftw_real tmp565; fftw_real tmp546; fftw_real tmp556; fftw_real tmp496; fftw_real tmp566; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp473; fftw_real tmp480; fftw_real tmp558; fftw_real tmp559; ASSERT_ALIGNED_DOUBLE; tmp473 = tmp471 - tmp472; tmp480 = tmp476 - tmp479; tmp481 = tmp473 - tmp480; tmp555 = tmp473 + tmp480; tmp558 = tmp500 + tmp507; tmp559 = tmp511 + tmp514; tmp560 = (K471396736 * tmp558) + (K881921264 * tmp559); tmp570 = (K881921264 * tmp558) - (K471396736 * tmp559); } { fftw_real tmp561; fftw_real tmp562; fftw_real tmp527; fftw_real tmp534; ASSERT_ALIGNED_DOUBLE; tmp561 = tmp519 + tmp526; tmp562 = tmp530 + tmp533; tmp563 = (K881921264 * tmp561) - (K471396736 * tmp562); tmp571 = (K881921264 * tmp562) + (K471396736 * tmp561); tmp527 = tmp519 - tmp526; tmp534 = tmp530 - tmp533; tmp535 = (K290284677 * tmp527) - (K956940335 * tmp534); tmp551 = (K290284677 * tmp534) + (K956940335 * tmp527); } { fftw_real tmp508; fftw_real tmp515; fftw_real tmp539; fftw_real tmp542; ASSERT_ALIGNED_DOUBLE; tmp508 = tmp500 - tmp507; tmp515 = tmp511 - tmp514; tmp516 = (K956940335 * tmp508) + (K290284677 * tmp515); tmp550 = (K290284677 * tmp508) - (K956940335 * tmp515); tmp539 = tmp537 - tmp538; tmp542 = tmp540 - tmp541; tmp543 = tmp539 - tmp542; tmp565 = tmp539 + tmp542; } { fftw_real tmp544; fftw_real tmp545; fftw_real tmp488; fftw_real tmp495; ASSERT_ALIGNED_DOUBLE; tmp544 = (K555570233 * tmp491) - (K831469612 * tmp494); tmp545 = (K555570233 * tmp487) + (K831469612 * tmp484); tmp546 = tmp544 - tmp545; tmp556 = tmp545 + tmp544; tmp488 = (K555570233 * tmp484) - (K831469612 * tmp487); tmp495 = (K831469612 * tmp491) + (K555570233 * tmp494); tmp496 = tmp488 - tmp495; tmp566 = tmp488 + tmp495; } { fftw_real tmp497; fftw_real tmp536; fftw_real tmp547; fftw_real tmp548; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp481 + tmp496; tmp536 = tmp516 + tmp535; c_re(output[45 * ostride]) = tmp497 - tmp536; c_re(output[13 * ostride]) = tmp497 + tmp536; tmp547 = tmp543 - tmp546; tmp548 = tmp535 - tmp516; c_im(output[61 * ostride]) = tmp547 - tmp548; c_im(output[29 * ostride]) = tmp547 + tmp548; } { fftw_real tmp553; fftw_real tmp554; fftw_real tmp549; fftw_real tmp552; ASSERT_ALIGNED_DOUBLE; tmp553 = tmp543 + tmp546; tmp554 = tmp550 + tmp551; c_im(output[45 * ostride]) = tmp553 - tmp554; c_im(output[13 * ostride]) = tmp553 + tmp554; tmp549 = tmp481 - tmp496; tmp552 = tmp550 - tmp551; c_re(output[61 * ostride]) = tmp549 - tmp552; c_re(output[29 * ostride]) = tmp549 + tmp552; } { fftw_real tmp557; fftw_real tmp564; fftw_real tmp567; fftw_real tmp568; ASSERT_ALIGNED_DOUBLE; tmp557 = tmp555 + tmp556; tmp564 = tmp560 + tmp563; c_re(output[37 * ostride]) = tmp557 - tmp564; c_re(output[5 * ostride]) = tmp557 + tmp564; tmp567 = tmp565 - tmp566; tmp568 = tmp563 - tmp560; c_im(output[53 * ostride]) = tmp567 - tmp568; c_im(output[21 * ostride]) = tmp567 + tmp568; } { fftw_real tmp573; fftw_real tmp574; fftw_real tmp569; fftw_real tmp572; ASSERT_ALIGNED_DOUBLE; tmp573 = tmp565 + tmp566; tmp574 = tmp570 + tmp571; c_im(output[37 * ostride]) = tmp573 - tmp574; c_im(output[5 * ostride]) = tmp573 + tmp574; tmp569 = tmp555 - tmp556; tmp572 = tmp570 - tmp571; c_re(output[53 * ostride]) = tmp569 - tmp572; c_re(output[21 * ostride]) = tmp569 + tmp572; } } { fftw_real tmp577; fftw_real tmp615; fftw_real tmp620; fftw_real tmp630; fftw_real tmp623; fftw_real tmp631; fftw_real tmp599; fftw_real tmp611; fftw_real tmp592; fftw_real tmp610; fftw_real tmp603; fftw_real tmp625; fftw_real tmp606; fftw_real tmp616; fftw_real tmp584; fftw_real tmp626; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp575; fftw_real tmp576; fftw_real tmp618; fftw_real tmp619; ASSERT_ALIGNED_DOUBLE; tmp575 = tmp471 + tmp472; tmp576 = tmp541 + tmp540; tmp577 = tmp575 - tmp576; tmp615 = tmp575 + tmp576; tmp618 = tmp586 + tmp587; tmp619 = tmp589 + tmp590; tmp620 = (K995184726 * tmp618) + (K098017140 * tmp619); tmp630 = (K995184726 * tmp619) - (K098017140 * tmp618); } { fftw_real tmp621; fftw_real tmp622; fftw_real tmp595; fftw_real tmp598; ASSERT_ALIGNED_DOUBLE; tmp621 = tmp593 + tmp594; tmp622 = tmp596 + tmp597; tmp623 = (K995184726 * tmp621) - (K098017140 * tmp622); tmp631 = (K098017140 * tmp621) + (K995184726 * tmp622); tmp595 = tmp593 - tmp594; tmp598 = tmp596 - tmp597; tmp599 = (K634393284 * tmp595) - (K773010453 * tmp598); tmp611 = (K773010453 * tmp595) + (K634393284 * tmp598); } { fftw_real tmp588; fftw_real tmp591; fftw_real tmp601; fftw_real tmp602; ASSERT_ALIGNED_DOUBLE; tmp588 = tmp586 - tmp587; tmp591 = tmp589 - tmp590; tmp592 = (K634393284 * tmp588) + (K773010453 * tmp591); tmp610 = (K634393284 * tmp591) - (K773010453 * tmp588); tmp601 = tmp537 + tmp538; tmp602 = tmp476 + tmp479; tmp603 = tmp601 - tmp602; tmp625 = tmp601 + tmp602; } { fftw_real tmp604; fftw_real tmp605; fftw_real tmp580; fftw_real tmp583; ASSERT_ALIGNED_DOUBLE; tmp604 = (K980785280 * tmp581) - (K195090322 * tmp582); tmp605 = (K980785280 * tmp579) + (K195090322 * tmp578); tmp606 = tmp604 - tmp605; tmp616 = tmp605 + tmp604; tmp580 = (K980785280 * tmp578) - (K195090322 * tmp579); tmp583 = (K195090322 * tmp581) + (K980785280 * tmp582); tmp584 = tmp580 - tmp583; tmp626 = tmp580 + tmp583; } { fftw_real tmp585; fftw_real tmp600; fftw_real tmp607; fftw_real tmp608; ASSERT_ALIGNED_DOUBLE; tmp585 = tmp577 + tmp584; tmp600 = tmp592 + tmp599; c_re(output[41 * ostride]) = tmp585 - tmp600; c_re(output[9 * ostride]) = tmp585 + tmp600; tmp607 = tmp603 - tmp606; tmp608 = tmp599 - tmp592; c_im(output[57 * ostride]) = tmp607 - tmp608; c_im(output[25 * ostride]) = tmp607 + tmp608; } { fftw_real tmp613; fftw_real tmp614; fftw_real tmp609; fftw_real tmp612; ASSERT_ALIGNED_DOUBLE; tmp613 = tmp603 + tmp606; tmp614 = tmp610 + tmp611; c_im(output[41 * ostride]) = tmp613 - tmp614; c_im(output[9 * ostride]) = tmp613 + tmp614; tmp609 = tmp577 - tmp584; tmp612 = tmp610 - tmp611; c_re(output[57 * ostride]) = tmp609 - tmp612; c_re(output[25 * ostride]) = tmp609 + tmp612; } { fftw_real tmp617; fftw_real tmp624; fftw_real tmp627; fftw_real tmp628; ASSERT_ALIGNED_DOUBLE; tmp617 = tmp615 + tmp616; tmp624 = tmp620 + tmp623; c_re(output[33 * ostride]) = tmp617 - tmp624; c_re(output[ostride]) = tmp617 + tmp624; tmp627 = tmp625 - tmp626; tmp628 = tmp623 - tmp620; c_im(output[49 * ostride]) = tmp627 - tmp628; c_im(output[17 * ostride]) = tmp627 + tmp628; } { fftw_real tmp633; fftw_real tmp634; fftw_real tmp629; fftw_real tmp632; ASSERT_ALIGNED_DOUBLE; tmp633 = tmp625 + tmp626; tmp634 = tmp630 + tmp631; c_im(output[33 * ostride]) = tmp633 - tmp634; c_im(output[ostride]) = tmp633 + tmp634; tmp629 = tmp615 - tmp616; tmp632 = tmp630 - tmp631; c_re(output[49 * ostride]) = tmp629 - tmp632; c_re(output[17 * ostride]) = tmp629 + tmp632; } } } fftw_codelet_desc fftw_no_twiddle_64_desc = { "fftw_no_twiddle_64", (void (*)()) fftw_no_twiddle_64, 64, FFTW_FORWARD, FFTW_NOTW, 1409, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_2.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000005046�07637527263�010327� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:31 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 2 */ /* * This function contains 6 FP additions, 4 FP multiplications, * (or, 4 additions, 2 multiplications, 2 fused multiply/add), * 10 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_2(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 1) { fftw_real tmp1; fftw_real tmp8; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp8 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp7 = (tmp4 * tmp3) + (tmp2 * tmp5); } c_re(inout[iostride]) = tmp1 - tmp6; c_re(inout[0]) = tmp1 + tmp6; c_im(inout[0]) = tmp7 + tmp8; c_im(inout[iostride]) = tmp8 - tmp7; } } static const int twiddle_order[] = { 1 }; fftw_codelet_desc fftw_twiddle_2_desc = { "fftw_twiddle_2", (void (*)()) fftw_twiddle_2, 2, FFTW_FORWARD, FFTW_TWIDDLE, 44, 1, twiddle_order, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_3.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000007261�07637527263�010331� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:31 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 3 */ /* * This function contains 16 FP additions, 12 FP multiplications, * (or, 10 additions, 6 multiplications, 6 fused multiply/add), * 14 stack variables, and 12 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) { fftw_real tmp1; fftw_real tmp18; fftw_real tmp6; fftw_real tmp14; fftw_real tmp11; fftw_real tmp15; fftw_real tmp12; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp18 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp14 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[2 * iostride]); tmp10 = c_im(inout[2 * iostride]); tmp7 = c_re(W[1]); tmp9 = c_im(W[1]); tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); tmp15 = (tmp9 * tmp8) + (tmp7 * tmp10); } tmp12 = tmp6 + tmp11; tmp17 = tmp14 + tmp15; { fftw_real tmp13; fftw_real tmp16; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; c_re(inout[0]) = tmp1 + tmp12; tmp13 = tmp1 - (K500000000 * tmp12); tmp16 = K866025403 * (tmp14 - tmp15); c_re(inout[2 * iostride]) = tmp13 - tmp16; c_re(inout[iostride]) = tmp13 + tmp16; c_im(inout[0]) = tmp17 + tmp18; tmp19 = K866025403 * (tmp11 - tmp6); tmp20 = tmp18 - (K500000000 * tmp17); c_im(inout[iostride]) = tmp19 + tmp20; c_im(inout[2 * iostride]) = tmp20 - tmp19; } } } static const int twiddle_order[] = { 1, 2 }; fftw_codelet_desc fftw_twiddle_3_desc = { "fftw_twiddle_3", (void (*)()) fftw_twiddle_3, 3, FFTW_FORWARD, FFTW_TWIDDLE, 66, 2, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_4.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000010160�07637527264�010323� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:31 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 4 */ /* * This function contains 22 FP additions, 12 FP multiplications, * (or, 16 additions, 6 multiplications, 6 fused multiply/add), * 14 stack variables, and 16 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) { fftw_real tmp1; fftw_real tmp25; fftw_real tmp6; fftw_real tmp24; fftw_real tmp12; fftw_real tmp20; fftw_real tmp17; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp25 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[2 * iostride]); tmp5 = c_im(inout[2 * iostride]); tmp2 = c_re(W[1]); tmp4 = c_im(W[1]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp24 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[iostride]); tmp11 = c_im(inout[iostride]); tmp8 = c_re(W[0]); tmp10 = c_im(W[0]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp20 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[3 * iostride]); tmp16 = c_im(inout[3 * iostride]); tmp13 = c_re(W[2]); tmp15 = c_im(W[2]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp21 = (tmp15 * tmp14) + (tmp13 * tmp16); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; c_re(inout[2 * iostride]) = tmp7 - tmp18; c_re(inout[0]) = tmp7 + tmp18; tmp27 = tmp25 - tmp24; tmp28 = tmp12 - tmp17; c_im(inout[iostride]) = tmp27 - tmp28; c_im(inout[3 * iostride]) = tmp28 + tmp27; } { fftw_real tmp23; fftw_real tmp26; fftw_real tmp19; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp23 = tmp20 + tmp21; tmp26 = tmp24 + tmp25; c_im(inout[0]) = tmp23 + tmp26; c_im(inout[2 * iostride]) = tmp26 - tmp23; tmp19 = tmp1 - tmp6; tmp22 = tmp20 - tmp21; c_re(inout[3 * iostride]) = tmp19 - tmp22; c_re(inout[iostride]) = tmp19 + tmp22; } } } static const int twiddle_order[] = { 1, 2, 3 }; fftw_codelet_desc fftw_twiddle_4_desc = { "fftw_twiddle_4", (void (*)()) fftw_twiddle_4, 4, FFTW_FORWARD, FFTW_TWIDDLE, 88, 3, twiddle_order, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_5.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000013666�07637527264�010342� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:32 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 5 */ /* * This function contains 40 FP additions, 28 FP multiplications, * (or, 26 additions, 14 multiplications, 14 fused multiply/add), * 26 stack variables, and 20 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 4) { fftw_real tmp1; fftw_real tmp40; fftw_real tmp30; fftw_real tmp33; fftw_real tmp37; fftw_real tmp38; fftw_real tmp39; fftw_real tmp45; fftw_real tmp44; fftw_real tmp12; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp40 = c_im(inout[0]); { fftw_real tmp6; fftw_real tmp28; fftw_real tmp22; fftw_real tmp32; fftw_real tmp11; fftw_real tmp29; fftw_real tmp17; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp28 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp19; fftw_real tmp21; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(inout[3 * iostride]); tmp21 = c_im(inout[3 * iostride]); tmp18 = c_re(W[2]); tmp20 = c_im(W[2]); tmp22 = (tmp18 * tmp19) - (tmp20 * tmp21); tmp32 = (tmp20 * tmp19) + (tmp18 * tmp21); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[4 * iostride]); tmp10 = c_im(inout[4 * iostride]); tmp7 = c_re(W[3]); tmp9 = c_im(W[3]); tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); tmp29 = (tmp9 * tmp8) + (tmp7 * tmp10); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[2 * iostride]); tmp16 = c_im(inout[2 * iostride]); tmp13 = c_re(W[1]); tmp15 = c_im(W[1]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp31 = (tmp15 * tmp14) + (tmp13 * tmp16); } tmp30 = tmp28 - tmp29; tmp33 = tmp31 - tmp32; tmp37 = tmp28 + tmp29; tmp38 = tmp31 + tmp32; tmp39 = tmp37 + tmp38; tmp45 = tmp17 - tmp22; tmp44 = tmp6 - tmp11; tmp12 = tmp6 + tmp11; tmp23 = tmp17 + tmp22; tmp24 = tmp12 + tmp23; } c_re(inout[0]) = tmp1 + tmp24; { fftw_real tmp34; fftw_real tmp36; fftw_real tmp27; fftw_real tmp35; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp34 = (K951056516 * tmp30) + (K587785252 * tmp33); tmp36 = (K951056516 * tmp33) - (K587785252 * tmp30); tmp25 = K559016994 * (tmp12 - tmp23); tmp26 = tmp1 - (K250000000 * tmp24); tmp27 = tmp25 + tmp26; tmp35 = tmp26 - tmp25; c_re(inout[4 * iostride]) = tmp27 - tmp34; c_re(inout[iostride]) = tmp27 + tmp34; c_re(inout[2 * iostride]) = tmp35 - tmp36; c_re(inout[3 * iostride]) = tmp35 + tmp36; } c_im(inout[0]) = tmp39 + tmp40; { fftw_real tmp46; fftw_real tmp47; fftw_real tmp43; fftw_real tmp48; fftw_real tmp41; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; tmp46 = (K951056516 * tmp44) + (K587785252 * tmp45); tmp47 = (K951056516 * tmp45) - (K587785252 * tmp44); tmp41 = K559016994 * (tmp37 - tmp38); tmp42 = tmp40 - (K250000000 * tmp39); tmp43 = tmp41 + tmp42; tmp48 = tmp42 - tmp41; c_im(inout[iostride]) = tmp43 - tmp46; c_im(inout[4 * iostride]) = tmp46 + tmp43; c_im(inout[2 * iostride]) = tmp47 + tmp48; c_im(inout[3 * iostride]) = tmp48 - tmp47; } } } static const int twiddle_order[] = { 1, 2, 3, 4 }; fftw_codelet_desc fftw_twiddle_5_desc = { "fftw_twiddle_5", (void (*)()) fftw_twiddle_5, 5, FFTW_FORWARD, FFTW_TWIDDLE, 110, 4, twiddle_order, }; ��������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_6.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000014634�07637527265�010340� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:33 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 6 */ /* * This function contains 46 FP additions, 28 FP multiplications, * (or, 32 additions, 14 multiplications, 14 fused multiply/add), * 22 stack variables, and 24 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_6(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 5) { fftw_real tmp7; fftw_real tmp31; fftw_real tmp50; fftw_real tmp54; fftw_real tmp29; fftw_real tmp33; fftw_real tmp41; fftw_real tmp45; fftw_real tmp18; fftw_real tmp32; fftw_real tmp38; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp49; fftw_real tmp6; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp49 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[3 * iostride]); tmp5 = c_im(inout[3 * iostride]); tmp2 = c_re(W[2]); tmp4 = c_im(W[2]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp48 = (tmp4 * tmp3) + (tmp2 * tmp5); } tmp7 = tmp1 - tmp6; tmp31 = tmp1 + tmp6; tmp50 = tmp48 + tmp49; tmp54 = tmp49 - tmp48; } { fftw_real tmp23; fftw_real tmp39; fftw_real tmp28; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[4 * iostride]); tmp22 = c_im(inout[4 * iostride]); tmp19 = c_re(W[3]); tmp21 = c_im(W[3]); tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); tmp39 = (tmp21 * tmp20) + (tmp19 * tmp22); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[iostride]); tmp27 = c_im(inout[iostride]); tmp24 = c_re(W[0]); tmp26 = c_im(W[0]); tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); tmp40 = (tmp26 * tmp25) + (tmp24 * tmp27); } tmp29 = tmp23 - tmp28; tmp33 = tmp23 + tmp28; tmp41 = tmp39 - tmp40; tmp45 = tmp39 + tmp40; } { fftw_real tmp12; fftw_real tmp36; fftw_real tmp17; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp36 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[5 * iostride]); tmp16 = c_im(inout[5 * iostride]); tmp13 = c_re(W[4]); tmp15 = c_im(W[4]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp37 = (tmp15 * tmp14) + (tmp13 * tmp16); } tmp18 = tmp12 - tmp17; tmp32 = tmp12 + tmp17; tmp38 = tmp36 - tmp37; tmp44 = tmp36 + tmp37; } { fftw_real tmp42; fftw_real tmp30; fftw_real tmp35; fftw_real tmp53; fftw_real tmp55; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp42 = K866025403 * (tmp38 - tmp41); tmp30 = tmp18 + tmp29; tmp35 = tmp7 - (K500000000 * tmp30); c_re(inout[3 * iostride]) = tmp7 + tmp30; c_re(inout[iostride]) = tmp35 + tmp42; c_re(inout[5 * iostride]) = tmp35 - tmp42; tmp53 = K866025403 * (tmp29 - tmp18); tmp55 = tmp38 + tmp41; tmp56 = tmp54 - (K500000000 * tmp55); c_im(inout[iostride]) = tmp53 + tmp56; c_im(inout[5 * iostride]) = tmp56 - tmp53; c_im(inout[3 * iostride]) = tmp55 + tmp54; } { fftw_real tmp46; fftw_real tmp34; fftw_real tmp43; fftw_real tmp52; fftw_real tmp47; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp46 = K866025403 * (tmp44 - tmp45); tmp34 = tmp32 + tmp33; tmp43 = tmp31 - (K500000000 * tmp34); c_re(inout[0]) = tmp31 + tmp34; c_re(inout[4 * iostride]) = tmp43 + tmp46; c_re(inout[2 * iostride]) = tmp43 - tmp46; tmp52 = K866025403 * (tmp33 - tmp32); tmp47 = tmp44 + tmp45; tmp51 = tmp50 - (K500000000 * tmp47); c_im(inout[0]) = tmp47 + tmp50; c_im(inout[4 * iostride]) = tmp52 + tmp51; c_im(inout[2 * iostride]) = tmp51 - tmp52; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5 }; fftw_codelet_desc fftw_twiddle_6_desc = { "fftw_twiddle_6", (void (*)()) fftw_twiddle_6, 6, FFTW_FORWARD, FFTW_TWIDDLE, 132, 5, twiddle_order, }; ����������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_7.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000017723�07637527272�010341� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:33 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 7 */ /* * This function contains 72 FP additions, 60 FP multiplications, * (or, 60 additions, 48 multiplications, 12 fused multiply/add), * 24 stack variables, and 28 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_7(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 6) { fftw_real tmp1; fftw_real tmp53; fftw_real tmp12; fftw_real tmp54; fftw_real tmp38; fftw_real tmp50; fftw_real tmp23; fftw_real tmp55; fftw_real tmp44; fftw_real tmp51; fftw_real tmp34; fftw_real tmp56; fftw_real tmp41; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp53 = c_im(inout[0]); { fftw_real tmp6; fftw_real tmp36; fftw_real tmp11; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp36 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[6 * iostride]); tmp10 = c_im(inout[6 * iostride]); tmp7 = c_re(W[5]); tmp9 = c_im(W[5]); tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); tmp37 = (tmp9 * tmp8) + (tmp7 * tmp10); } tmp12 = tmp6 + tmp11; tmp54 = tmp11 - tmp6; tmp38 = tmp36 - tmp37; tmp50 = tmp36 + tmp37; } { fftw_real tmp17; fftw_real tmp42; fftw_real tmp22; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[2 * iostride]); tmp16 = c_im(inout[2 * iostride]); tmp13 = c_re(W[1]); tmp15 = c_im(W[1]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp42 = (tmp15 * tmp14) + (tmp13 * tmp16); } { fftw_real tmp19; fftw_real tmp21; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(inout[5 * iostride]); tmp21 = c_im(inout[5 * iostride]); tmp18 = c_re(W[4]); tmp20 = c_im(W[4]); tmp22 = (tmp18 * tmp19) - (tmp20 * tmp21); tmp43 = (tmp20 * tmp19) + (tmp18 * tmp21); } tmp23 = tmp17 + tmp22; tmp55 = tmp22 - tmp17; tmp44 = tmp42 - tmp43; tmp51 = tmp42 + tmp43; } { fftw_real tmp28; fftw_real tmp39; fftw_real tmp33; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[3 * iostride]); tmp27 = c_im(inout[3 * iostride]); tmp24 = c_re(W[2]); tmp26 = c_im(W[2]); tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); tmp39 = (tmp26 * tmp25) + (tmp24 * tmp27); } { fftw_real tmp30; fftw_real tmp32; fftw_real tmp29; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp30 = c_re(inout[4 * iostride]); tmp32 = c_im(inout[4 * iostride]); tmp29 = c_re(W[3]); tmp31 = c_im(W[3]); tmp33 = (tmp29 * tmp30) - (tmp31 * tmp32); tmp40 = (tmp31 * tmp30) + (tmp29 * tmp32); } tmp34 = tmp28 + tmp33; tmp56 = tmp33 - tmp28; tmp41 = tmp39 - tmp40; tmp52 = tmp39 + tmp40; } { fftw_real tmp47; fftw_real tmp46; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; c_re(inout[0]) = tmp1 + tmp12 + tmp23 + tmp34; tmp47 = (K781831482 * tmp38) + (K974927912 * tmp44) + (K433883739 * tmp41); tmp46 = tmp1 + (K623489801 * tmp12) - (K900968867 * tmp34) - (K222520933 * tmp23); c_re(inout[6 * iostride]) = tmp46 - tmp47; c_re(inout[iostride]) = tmp46 + tmp47; { fftw_real tmp49; fftw_real tmp48; fftw_real tmp45; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp49 = (K433883739 * tmp38) + (K974927912 * tmp41) - (K781831482 * tmp44); tmp48 = tmp1 + (K623489801 * tmp23) - (K222520933 * tmp34) - (K900968867 * tmp12); c_re(inout[4 * iostride]) = tmp48 - tmp49; c_re(inout[3 * iostride]) = tmp48 + tmp49; tmp45 = (K974927912 * tmp38) - (K781831482 * tmp41) - (K433883739 * tmp44); tmp35 = tmp1 + (K623489801 * tmp34) - (K900968867 * tmp23) - (K222520933 * tmp12); c_re(inout[5 * iostride]) = tmp35 - tmp45; c_re(inout[2 * iostride]) = tmp35 + tmp45; } c_im(inout[0]) = tmp50 + tmp51 + tmp52 + tmp53; tmp59 = (K974927912 * tmp54) - (K781831482 * tmp56) - (K433883739 * tmp55); tmp60 = (K623489801 * tmp52) + tmp53 - (K900968867 * tmp51) - (K222520933 * tmp50); c_im(inout[2 * iostride]) = tmp59 + tmp60; c_im(inout[5 * iostride]) = tmp60 - tmp59; { fftw_real tmp61; fftw_real tmp62; fftw_real tmp57; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp61 = (K433883739 * tmp54) + (K974927912 * tmp56) - (K781831482 * tmp55); tmp62 = (K623489801 * tmp51) + tmp53 - (K222520933 * tmp52) - (K900968867 * tmp50); c_im(inout[3 * iostride]) = tmp61 + tmp62; c_im(inout[4 * iostride]) = tmp62 - tmp61; tmp57 = (K781831482 * tmp54) + (K974927912 * tmp55) + (K433883739 * tmp56); tmp58 = (K623489801 * tmp50) + tmp53 - (K900968867 * tmp52) - (K222520933 * tmp51); c_im(inout[iostride]) = tmp57 + tmp58; c_im(inout[6 * iostride]) = tmp58 - tmp57; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6 }; fftw_codelet_desc fftw_twiddle_7_desc = { "fftw_twiddle_7", (void (*)()) fftw_twiddle_7, 7, FFTW_FORWARD, FFTW_TWIDDLE, 154, 6, twiddle_order, }; ���������������������������������������������fftw-2.1.5/fftw/ftw_8.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000017745�07637527273�010347� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:38 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 8 */ /* * This function contains 66 FP additions, 32 FP multiplications, * (or, 52 additions, 18 multiplications, 14 fused multiply/add), * 28 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_8(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 7) { fftw_real tmp7; fftw_real tmp43; fftw_real tmp71; fftw_real tmp76; fftw_real tmp41; fftw_real tmp53; fftw_real tmp56; fftw_real tmp65; fftw_real tmp18; fftw_real tmp77; fftw_real tmp46; fftw_real tmp68; fftw_real tmp30; fftw_real tmp48; fftw_real tmp51; fftw_real tmp64; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp70; fftw_real tmp6; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp70 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[4 * iostride]); tmp5 = c_im(inout[4 * iostride]); tmp2 = c_re(W[3]); tmp4 = c_im(W[3]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp69 = (tmp4 * tmp3) + (tmp2 * tmp5); } tmp7 = tmp1 + tmp6; tmp43 = tmp1 - tmp6; tmp71 = tmp69 + tmp70; tmp76 = tmp70 - tmp69; } { fftw_real tmp35; fftw_real tmp54; fftw_real tmp40; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[7 * iostride]); tmp34 = c_im(inout[7 * iostride]); tmp31 = c_re(W[6]); tmp33 = c_im(W[6]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp54 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[3 * iostride]); tmp39 = c_im(inout[3 * iostride]); tmp36 = c_re(W[2]); tmp38 = c_im(W[2]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp55 = (tmp38 * tmp37) + (tmp36 * tmp39); } tmp41 = tmp35 + tmp40; tmp53 = tmp35 - tmp40; tmp56 = tmp54 - tmp55; tmp65 = tmp54 + tmp55; } { fftw_real tmp12; fftw_real tmp44; fftw_real tmp17; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp44 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[6 * iostride]); tmp16 = c_im(inout[6 * iostride]); tmp13 = c_re(W[5]); tmp15 = c_im(W[5]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp45 = (tmp15 * tmp14) + (tmp13 * tmp16); } tmp18 = tmp12 + tmp17; tmp77 = tmp12 - tmp17; tmp46 = tmp44 - tmp45; tmp68 = tmp44 + tmp45; } { fftw_real tmp24; fftw_real tmp49; fftw_real tmp29; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[iostride]); tmp23 = c_im(inout[iostride]); tmp20 = c_re(W[0]); tmp22 = c_im(W[0]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp49 = (tmp22 * tmp21) + (tmp20 * tmp23); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[5 * iostride]); tmp28 = c_im(inout[5 * iostride]); tmp25 = c_re(W[4]); tmp27 = c_im(W[4]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp50 = (tmp27 * tmp26) + (tmp25 * tmp28); } tmp30 = tmp24 + tmp29; tmp48 = tmp24 - tmp29; tmp51 = tmp49 - tmp50; tmp64 = tmp49 + tmp50; } { fftw_real tmp19; fftw_real tmp42; fftw_real tmp63; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp7 + tmp18; tmp42 = tmp30 + tmp41; c_re(inout[4 * iostride]) = tmp19 - tmp42; c_re(inout[0]) = tmp19 + tmp42; { fftw_real tmp73; fftw_real tmp74; fftw_real tmp67; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp73 = tmp41 - tmp30; tmp74 = tmp71 - tmp68; c_im(inout[2 * iostride]) = tmp73 + tmp74; c_im(inout[6 * iostride]) = tmp74 - tmp73; tmp67 = tmp64 + tmp65; tmp72 = tmp68 + tmp71; c_im(inout[0]) = tmp67 + tmp72; c_im(inout[4 * iostride]) = tmp72 - tmp67; } tmp63 = tmp7 - tmp18; tmp66 = tmp64 - tmp65; c_re(inout[6 * iostride]) = tmp63 - tmp66; c_re(inout[2 * iostride]) = tmp63 + tmp66; { fftw_real tmp59; fftw_real tmp78; fftw_real tmp62; fftw_real tmp75; fftw_real tmp60; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; tmp59 = tmp43 - tmp46; tmp78 = tmp76 - tmp77; tmp60 = tmp51 - tmp48; tmp61 = tmp53 + tmp56; tmp62 = K707106781 * (tmp60 - tmp61); tmp75 = K707106781 * (tmp60 + tmp61); c_re(inout[7 * iostride]) = tmp59 - tmp62; c_re(inout[3 * iostride]) = tmp59 + tmp62; c_im(inout[iostride]) = tmp75 + tmp78; c_im(inout[5 * iostride]) = tmp78 - tmp75; } { fftw_real tmp47; fftw_real tmp80; fftw_real tmp58; fftw_real tmp79; fftw_real tmp52; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp43 + tmp46; tmp80 = tmp77 + tmp76; tmp52 = tmp48 + tmp51; tmp57 = tmp53 - tmp56; tmp58 = K707106781 * (tmp52 + tmp57); tmp79 = K707106781 * (tmp57 - tmp52); c_re(inout[5 * iostride]) = tmp47 - tmp58; c_re(inout[iostride]) = tmp47 + tmp58; c_im(inout[3 * iostride]) = tmp79 + tmp80; c_im(inout[7 * iostride]) = tmp80 - tmp79; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7 }; fftw_codelet_desc fftw_twiddle_8_desc = { "fftw_twiddle_8", (void (*)()) fftw_twiddle_8, 8, FFTW_FORWARD, FFTW_TWIDDLE, 176, 7, twiddle_order, }; ���������������������������fftw-2.1.5/fftw/ftw_9.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000026402�07637527275�010340� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:39 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 9 */ /* * This function contains 96 FP additions, 72 FP multiplications, * (or, 60 additions, 36 multiplications, 36 fused multiply/add), * 34 stack variables, and 36 memory accesses */ static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_9(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 8) { fftw_real tmp1; fftw_real tmp99; fftw_real tmp52; fftw_real tmp98; fftw_real tmp105; fftw_real tmp104; fftw_real tmp12; fftw_real tmp49; fftw_real tmp47; fftw_real tmp69; fftw_real tmp86; fftw_real tmp95; fftw_real tmp74; fftw_real tmp85; fftw_real tmp30; fftw_real tmp58; fftw_real tmp82; fftw_real tmp94; fftw_real tmp63; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp6; fftw_real tmp50; fftw_real tmp11; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp99 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[3 * iostride]); tmp5 = c_im(inout[3 * iostride]); tmp2 = c_re(W[2]); tmp4 = c_im(W[2]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp50 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[6 * iostride]); tmp10 = c_im(inout[6 * iostride]); tmp7 = c_re(W[5]); tmp9 = c_im(W[5]); tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10); tmp51 = (tmp9 * tmp8) + (tmp7 * tmp10); } tmp52 = K866025403 * (tmp50 - tmp51); tmp98 = tmp50 + tmp51; tmp105 = tmp99 - (K500000000 * tmp98); tmp104 = K866025403 * (tmp11 - tmp6); tmp12 = tmp6 + tmp11; tmp49 = tmp1 - (K500000000 * tmp12); } { fftw_real tmp35; fftw_real tmp71; fftw_real tmp40; fftw_real tmp66; fftw_real tmp45; fftw_real tmp67; fftw_real tmp46; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[2 * iostride]); tmp34 = c_im(inout[2 * iostride]); tmp31 = c_re(W[1]); tmp33 = c_im(W[1]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp71 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[5 * iostride]); tmp39 = c_im(inout[5 * iostride]); tmp36 = c_re(W[4]); tmp38 = c_im(W[4]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp66 = (tmp38 * tmp37) + (tmp36 * tmp39); } { fftw_real tmp42; fftw_real tmp44; fftw_real tmp41; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(inout[8 * iostride]); tmp44 = c_im(inout[8 * iostride]); tmp41 = c_re(W[7]); tmp43 = c_im(W[7]); tmp45 = (tmp41 * tmp42) - (tmp43 * tmp44); tmp67 = (tmp43 * tmp42) + (tmp41 * tmp44); } tmp46 = tmp40 + tmp45; tmp72 = tmp66 + tmp67; { fftw_real tmp65; fftw_real tmp68; fftw_real tmp70; fftw_real tmp73; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp35 + tmp46; tmp65 = tmp35 - (K500000000 * tmp46); tmp68 = K866025403 * (tmp66 - tmp67); tmp69 = tmp65 + tmp68; tmp86 = tmp65 - tmp68; tmp95 = tmp71 + tmp72; tmp70 = K866025403 * (tmp45 - tmp40); tmp73 = tmp71 - (K500000000 * tmp72); tmp74 = tmp70 + tmp73; tmp85 = tmp73 - tmp70; } } { fftw_real tmp18; fftw_real tmp60; fftw_real tmp23; fftw_real tmp55; fftw_real tmp28; fftw_real tmp56; fftw_real tmp29; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp15; fftw_real tmp17; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp15 = c_re(inout[iostride]); tmp17 = c_im(inout[iostride]); tmp14 = c_re(W[0]); tmp16 = c_im(W[0]); tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); tmp60 = (tmp16 * tmp15) + (tmp14 * tmp17); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[4 * iostride]); tmp22 = c_im(inout[4 * iostride]); tmp19 = c_re(W[3]); tmp21 = c_im(W[3]); tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); tmp55 = (tmp21 * tmp20) + (tmp19 * tmp22); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[7 * iostride]); tmp27 = c_im(inout[7 * iostride]); tmp24 = c_re(W[6]); tmp26 = c_im(W[6]); tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); tmp56 = (tmp26 * tmp25) + (tmp24 * tmp27); } tmp29 = tmp23 + tmp28; tmp61 = tmp55 + tmp56; { fftw_real tmp54; fftw_real tmp57; fftw_real tmp59; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp18 + tmp29; tmp54 = tmp18 - (K500000000 * tmp29); tmp57 = K866025403 * (tmp55 - tmp56); tmp58 = tmp54 + tmp57; tmp82 = tmp54 - tmp57; tmp94 = tmp60 + tmp61; tmp59 = K866025403 * (tmp28 - tmp23); tmp62 = tmp60 - (K500000000 * tmp61); tmp63 = tmp59 + tmp62; tmp83 = tmp62 - tmp59; } } { fftw_real tmp96; fftw_real tmp13; fftw_real tmp48; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp96 = K866025403 * (tmp94 - tmp95); tmp13 = tmp1 + tmp12; tmp48 = tmp30 + tmp47; tmp93 = tmp13 - (K500000000 * tmp48); c_re(inout[0]) = tmp13 + tmp48; c_re(inout[3 * iostride]) = tmp93 + tmp96; c_re(inout[6 * iostride]) = tmp93 - tmp96; } { fftw_real tmp101; fftw_real tmp97; fftw_real tmp100; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp101 = K866025403 * (tmp47 - tmp30); tmp97 = tmp94 + tmp95; tmp100 = tmp98 + tmp99; tmp102 = tmp100 - (K500000000 * tmp97); c_im(inout[0]) = tmp97 + tmp100; c_im(inout[6 * iostride]) = tmp102 - tmp101; c_im(inout[3 * iostride]) = tmp101 + tmp102; } { fftw_real tmp53; fftw_real tmp106; fftw_real tmp76; fftw_real tmp107; fftw_real tmp80; fftw_real tmp103; fftw_real tmp77; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp49 + tmp52; tmp106 = tmp104 + tmp105; { fftw_real tmp64; fftw_real tmp75; fftw_real tmp78; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp64 = (K766044443 * tmp58) + (K642787609 * tmp63); tmp75 = (K173648177 * tmp69) + (K984807753 * tmp74); tmp76 = tmp64 + tmp75; tmp107 = K866025403 * (tmp75 - tmp64); tmp78 = (K766044443 * tmp63) - (K642787609 * tmp58); tmp79 = (K173648177 * tmp74) - (K984807753 * tmp69); tmp80 = K866025403 * (tmp78 - tmp79); tmp103 = tmp78 + tmp79; } c_re(inout[iostride]) = tmp53 + tmp76; tmp77 = tmp53 - (K500000000 * tmp76); c_re(inout[7 * iostride]) = tmp77 - tmp80; c_re(inout[4 * iostride]) = tmp77 + tmp80; c_im(inout[iostride]) = tmp103 + tmp106; tmp108 = tmp106 - (K500000000 * tmp103); c_im(inout[4 * iostride]) = tmp107 + tmp108; c_im(inout[7 * iostride]) = tmp108 - tmp107; } { fftw_real tmp81; fftw_real tmp110; fftw_real tmp88; fftw_real tmp111; fftw_real tmp92; fftw_real tmp109; fftw_real tmp89; fftw_real tmp112; ASSERT_ALIGNED_DOUBLE; tmp81 = tmp49 - tmp52; tmp110 = tmp105 - tmp104; { fftw_real tmp84; fftw_real tmp87; fftw_real tmp90; fftw_real tmp91; ASSERT_ALIGNED_DOUBLE; tmp84 = (K173648177 * tmp82) + (K984807753 * tmp83); tmp87 = (K342020143 * tmp85) - (K939692620 * tmp86); tmp88 = tmp84 + tmp87; tmp111 = K866025403 * (tmp87 - tmp84); tmp90 = (K173648177 * tmp83) - (K984807753 * tmp82); tmp91 = (K342020143 * tmp86) + (K939692620 * tmp85); tmp92 = K866025403 * (tmp90 + tmp91); tmp109 = tmp90 - tmp91; } c_re(inout[2 * iostride]) = tmp81 + tmp88; tmp89 = tmp81 - (K500000000 * tmp88); c_re(inout[8 * iostride]) = tmp89 - tmp92; c_re(inout[5 * iostride]) = tmp89 + tmp92; c_im(inout[2 * iostride]) = tmp109 + tmp110; tmp112 = tmp110 - (K500000000 * tmp109); c_im(inout[5 * iostride]) = tmp111 + tmp112; c_im(inout[8 * iostride]) = tmp112 - tmp111; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; fftw_codelet_desc fftw_twiddle_9_desc = { "fftw_twiddle_9", (void (*)()) fftw_twiddle_9, 9, FFTW_FORWARD, FFTW_TWIDDLE, 198, 8, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_10.c����������������������������������������������������������������������������0000644�0001754�0000144�00000026256�07637527277�010421� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:41 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 10 */ /* * This function contains 102 FP additions, 60 FP multiplications, * (or, 72 additions, 30 multiplications, 30 fused multiply/add), * 42 stack variables, and 40 memory accesses */ static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_10(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 9) { fftw_real tmp7; fftw_real tmp55; fftw_real tmp100; fftw_real tmp112; fftw_real tmp41; fftw_real tmp52; fftw_real tmp53; fftw_real tmp59; fftw_real tmp60; fftw_real tmp61; fftw_real tmp75; fftw_real tmp78; fftw_real tmp110; fftw_real tmp86; fftw_real tmp87; fftw_real tmp96; fftw_real tmp18; fftw_real tmp29; fftw_real tmp30; fftw_real tmp56; fftw_real tmp57; fftw_real tmp58; fftw_real tmp68; fftw_real tmp71; fftw_real tmp109; fftw_real tmp89; fftw_real tmp90; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp99; fftw_real tmp6; fftw_real tmp98; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp99 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[5 * iostride]); tmp5 = c_im(inout[5 * iostride]); tmp2 = c_re(W[4]); tmp4 = c_im(W[4]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp98 = (tmp4 * tmp3) + (tmp2 * tmp5); } tmp7 = tmp1 - tmp6; tmp55 = tmp1 + tmp6; tmp100 = tmp98 + tmp99; tmp112 = tmp99 - tmp98; } { fftw_real tmp35; fftw_real tmp73; fftw_real tmp51; fftw_real tmp77; fftw_real tmp40; fftw_real tmp74; fftw_real tmp46; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[4 * iostride]); tmp34 = c_im(inout[4 * iostride]); tmp31 = c_re(W[3]); tmp33 = c_im(W[3]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp73 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp48; fftw_real tmp50; fftw_real tmp47; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp48 = c_re(inout[iostride]); tmp50 = c_im(inout[iostride]); tmp47 = c_re(W[0]); tmp49 = c_im(W[0]); tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); tmp77 = (tmp49 * tmp48) + (tmp47 * tmp50); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[9 * iostride]); tmp39 = c_im(inout[9 * iostride]); tmp36 = c_re(W[8]); tmp38 = c_im(W[8]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp74 = (tmp38 * tmp37) + (tmp36 * tmp39); } { fftw_real tmp43; fftw_real tmp45; fftw_real tmp42; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp43 = c_re(inout[6 * iostride]); tmp45 = c_im(inout[6 * iostride]); tmp42 = c_re(W[5]); tmp44 = c_im(W[5]); tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); tmp76 = (tmp44 * tmp43) + (tmp42 * tmp45); } tmp41 = tmp35 - tmp40; tmp52 = tmp46 - tmp51; tmp53 = tmp41 + tmp52; tmp59 = tmp35 + tmp40; tmp60 = tmp46 + tmp51; tmp61 = tmp59 + tmp60; tmp75 = tmp73 - tmp74; tmp78 = tmp76 - tmp77; tmp110 = tmp75 + tmp78; tmp86 = tmp73 + tmp74; tmp87 = tmp76 + tmp77; tmp96 = tmp86 + tmp87; } { fftw_real tmp12; fftw_real tmp66; fftw_real tmp28; fftw_real tmp70; fftw_real tmp17; fftw_real tmp67; fftw_real tmp23; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp66 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[3 * iostride]); tmp27 = c_im(inout[3 * iostride]); tmp24 = c_re(W[2]); tmp26 = c_im(W[2]); tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); tmp70 = (tmp26 * tmp25) + (tmp24 * tmp27); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[7 * iostride]); tmp16 = c_im(inout[7 * iostride]); tmp13 = c_re(W[6]); tmp15 = c_im(W[6]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp67 = (tmp15 * tmp14) + (tmp13 * tmp16); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[8 * iostride]); tmp22 = c_im(inout[8 * iostride]); tmp19 = c_re(W[7]); tmp21 = c_im(W[7]); tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); tmp69 = (tmp21 * tmp20) + (tmp19 * tmp22); } tmp18 = tmp12 - tmp17; tmp29 = tmp23 - tmp28; tmp30 = tmp18 + tmp29; tmp56 = tmp12 + tmp17; tmp57 = tmp23 + tmp28; tmp58 = tmp56 + tmp57; tmp68 = tmp66 - tmp67; tmp71 = tmp69 - tmp70; tmp109 = tmp68 + tmp71; tmp89 = tmp66 + tmp67; tmp90 = tmp69 + tmp70; tmp95 = tmp89 + tmp90; } { fftw_real tmp63; fftw_real tmp54; fftw_real tmp64; fftw_real tmp80; fftw_real tmp82; fftw_real tmp72; fftw_real tmp79; fftw_real tmp81; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp63 = K559016994 * (tmp30 - tmp53); tmp54 = tmp30 + tmp53; tmp64 = tmp7 - (K250000000 * tmp54); tmp72 = tmp68 - tmp71; tmp79 = tmp75 - tmp78; tmp80 = (K951056516 * tmp72) + (K587785252 * tmp79); tmp82 = (K951056516 * tmp79) - (K587785252 * tmp72); c_re(inout[5 * iostride]) = tmp7 + tmp54; tmp81 = tmp64 - tmp63; c_re(inout[7 * iostride]) = tmp81 - tmp82; c_re(inout[3 * iostride]) = tmp81 + tmp82; tmp65 = tmp63 + tmp64; c_re(inout[9 * iostride]) = tmp65 - tmp80; c_re(inout[iostride]) = tmp65 + tmp80; } { fftw_real tmp111; fftw_real tmp113; fftw_real tmp114; fftw_real tmp118; fftw_real tmp120; fftw_real tmp116; fftw_real tmp117; fftw_real tmp119; fftw_real tmp115; ASSERT_ALIGNED_DOUBLE; tmp111 = K559016994 * (tmp109 - tmp110); tmp113 = tmp109 + tmp110; tmp114 = tmp112 - (K250000000 * tmp113); tmp116 = tmp18 - tmp29; tmp117 = tmp41 - tmp52; tmp118 = (K951056516 * tmp116) + (K587785252 * tmp117); tmp120 = (K951056516 * tmp117) - (K587785252 * tmp116); c_im(inout[5 * iostride]) = tmp113 + tmp112; tmp119 = tmp114 - tmp111; c_im(inout[3 * iostride]) = tmp119 - tmp120; c_im(inout[7 * iostride]) = tmp120 + tmp119; tmp115 = tmp111 + tmp114; c_im(inout[iostride]) = tmp115 - tmp118; c_im(inout[9 * iostride]) = tmp118 + tmp115; } { fftw_real tmp84; fftw_real tmp62; fftw_real tmp83; fftw_real tmp92; fftw_real tmp94; fftw_real tmp88; fftw_real tmp91; fftw_real tmp93; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = K559016994 * (tmp58 - tmp61); tmp62 = tmp58 + tmp61; tmp83 = tmp55 - (K250000000 * tmp62); tmp88 = tmp86 - tmp87; tmp91 = tmp89 - tmp90; tmp92 = (K951056516 * tmp88) - (K587785252 * tmp91); tmp94 = (K951056516 * tmp91) + (K587785252 * tmp88); c_re(inout[0]) = tmp55 + tmp62; tmp93 = tmp84 + tmp83; c_re(inout[4 * iostride]) = tmp93 - tmp94; c_re(inout[6 * iostride]) = tmp93 + tmp94; tmp85 = tmp83 - tmp84; c_re(inout[2 * iostride]) = tmp85 - tmp92; c_re(inout[8 * iostride]) = tmp85 + tmp92; } { fftw_real tmp105; fftw_real tmp97; fftw_real tmp104; fftw_real tmp103; fftw_real tmp107; fftw_real tmp101; fftw_real tmp102; fftw_real tmp108; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; tmp105 = K559016994 * (tmp95 - tmp96); tmp97 = tmp95 + tmp96; tmp104 = tmp100 - (K250000000 * tmp97); tmp101 = tmp59 - tmp60; tmp102 = tmp56 - tmp57; tmp103 = (K951056516 * tmp101) - (K587785252 * tmp102); tmp107 = (K951056516 * tmp102) + (K587785252 * tmp101); c_im(inout[0]) = tmp97 + tmp100; tmp108 = tmp105 + tmp104; c_im(inout[4 * iostride]) = tmp107 + tmp108; c_im(inout[6 * iostride]) = tmp108 - tmp107; tmp106 = tmp104 - tmp105; c_im(inout[2 * iostride]) = tmp103 + tmp106; c_im(inout[8 * iostride]) = tmp106 - tmp103; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; fftw_codelet_desc fftw_twiddle_10_desc = { "fftw_twiddle_10", (void (*)()) fftw_twiddle_10, 10, FFTW_FORWARD, FFTW_TWIDDLE, 220, 9, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_16.c����������������������������������������������������������������������������0000644�0001754�0000144�00000042740�07637527304�010412� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:43 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 16 */ /* * This function contains 174 FP additions, 84 FP multiplications, * (or, 136 additions, 46 multiplications, 38 fused multiply/add), * 50 stack variables, and 64 memory accesses */ static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 15) { fftw_real tmp7; fftw_real tmp91; fftw_real tmp180; fftw_real tmp193; fftw_real tmp18; fftw_real tmp194; fftw_real tmp94; fftw_real tmp177; fftw_real tmp77; fftw_real tmp88; fftw_real tmp161; fftw_real tmp128; fftw_real tmp144; fftw_real tmp162; fftw_real tmp163; fftw_real tmp164; fftw_real tmp123; fftw_real tmp143; fftw_real tmp30; fftw_real tmp152; fftw_real tmp100; fftw_real tmp136; fftw_real tmp41; fftw_real tmp153; fftw_real tmp105; fftw_real tmp137; fftw_real tmp54; fftw_real tmp65; fftw_real tmp156; fftw_real tmp117; fftw_real tmp141; fftw_real tmp157; fftw_real tmp158; fftw_real tmp159; fftw_real tmp112; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp179; fftw_real tmp6; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp179 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[8 * iostride]); tmp5 = c_im(inout[8 * iostride]); tmp2 = c_re(W[7]); tmp4 = c_im(W[7]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp178 = (tmp4 * tmp3) + (tmp2 * tmp5); } tmp7 = tmp1 + tmp6; tmp91 = tmp1 - tmp6; tmp180 = tmp178 + tmp179; tmp193 = tmp179 - tmp178; } { fftw_real tmp12; fftw_real tmp92; fftw_real tmp17; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[4 * iostride]); tmp11 = c_im(inout[4 * iostride]); tmp8 = c_re(W[3]); tmp10 = c_im(W[3]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp92 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[12 * iostride]); tmp16 = c_im(inout[12 * iostride]); tmp13 = c_re(W[11]); tmp15 = c_im(W[11]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp93 = (tmp15 * tmp14) + (tmp13 * tmp16); } tmp18 = tmp12 + tmp17; tmp194 = tmp12 - tmp17; tmp94 = tmp92 - tmp93; tmp177 = tmp92 + tmp93; } { fftw_real tmp71; fftw_real tmp124; fftw_real tmp87; fftw_real tmp121; fftw_real tmp76; fftw_real tmp125; fftw_real tmp82; fftw_real tmp120; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[15 * iostride]); tmp70 = c_im(inout[15 * iostride]); tmp67 = c_re(W[14]); tmp69 = c_im(W[14]); tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); tmp124 = (tmp69 * tmp68) + (tmp67 * tmp70); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[11 * iostride]); tmp86 = c_im(inout[11 * iostride]); tmp83 = c_re(W[10]); tmp85 = c_im(W[10]); tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); tmp121 = (tmp85 * tmp84) + (tmp83 * tmp86); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[7 * iostride]); tmp75 = c_im(inout[7 * iostride]); tmp72 = c_re(W[6]); tmp74 = c_im(W[6]); tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); tmp125 = (tmp74 * tmp73) + (tmp72 * tmp75); } { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[3 * iostride]); tmp81 = c_im(inout[3 * iostride]); tmp78 = c_re(W[2]); tmp80 = c_im(W[2]); tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); tmp120 = (tmp80 * tmp79) + (tmp78 * tmp81); } { fftw_real tmp126; fftw_real tmp127; fftw_real tmp119; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp77 = tmp71 + tmp76; tmp88 = tmp82 + tmp87; tmp161 = tmp77 - tmp88; tmp126 = tmp124 - tmp125; tmp127 = tmp82 - tmp87; tmp128 = tmp126 + tmp127; tmp144 = tmp126 - tmp127; tmp162 = tmp124 + tmp125; tmp163 = tmp120 + tmp121; tmp164 = tmp162 - tmp163; tmp119 = tmp71 - tmp76; tmp122 = tmp120 - tmp121; tmp123 = tmp119 - tmp122; tmp143 = tmp119 + tmp122; } } { fftw_real tmp24; fftw_real tmp96; fftw_real tmp29; fftw_real tmp97; fftw_real tmp98; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[2 * iostride]); tmp23 = c_im(inout[2 * iostride]); tmp20 = c_re(W[1]); tmp22 = c_im(W[1]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp96 = (tmp22 * tmp21) + (tmp20 * tmp23); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[10 * iostride]); tmp28 = c_im(inout[10 * iostride]); tmp25 = c_re(W[9]); tmp27 = c_im(W[9]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp97 = (tmp27 * tmp26) + (tmp25 * tmp28); } tmp30 = tmp24 + tmp29; tmp152 = tmp96 + tmp97; tmp98 = tmp96 - tmp97; tmp99 = tmp24 - tmp29; tmp100 = tmp98 - tmp99; tmp136 = tmp99 + tmp98; } { fftw_real tmp35; fftw_real tmp102; fftw_real tmp40; fftw_real tmp103; fftw_real tmp101; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[14 * iostride]); tmp34 = c_im(inout[14 * iostride]); tmp31 = c_re(W[13]); tmp33 = c_im(W[13]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp102 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[6 * iostride]); tmp39 = c_im(inout[6 * iostride]); tmp36 = c_re(W[5]); tmp38 = c_im(W[5]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp103 = (tmp38 * tmp37) + (tmp36 * tmp39); } tmp41 = tmp35 + tmp40; tmp153 = tmp102 + tmp103; tmp101 = tmp35 - tmp40; tmp104 = tmp102 - tmp103; tmp105 = tmp101 + tmp104; tmp137 = tmp101 - tmp104; } { fftw_real tmp48; fftw_real tmp108; fftw_real tmp64; fftw_real tmp115; fftw_real tmp53; fftw_real tmp109; fftw_real tmp59; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[iostride]); tmp47 = c_im(inout[iostride]); tmp44 = c_re(W[0]); tmp46 = c_im(W[0]); tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); tmp108 = (tmp46 * tmp45) + (tmp44 * tmp47); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[13 * iostride]); tmp63 = c_im(inout[13 * iostride]); tmp60 = c_re(W[12]); tmp62 = c_im(W[12]); tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); tmp115 = (tmp62 * tmp61) + (tmp60 * tmp63); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[9 * iostride]); tmp52 = c_im(inout[9 * iostride]); tmp49 = c_re(W[8]); tmp51 = c_im(W[8]); tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); tmp109 = (tmp51 * tmp50) + (tmp49 * tmp52); } { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[5 * iostride]); tmp58 = c_im(inout[5 * iostride]); tmp55 = c_re(W[4]); tmp57 = c_im(W[4]); tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); tmp114 = (tmp57 * tmp56) + (tmp55 * tmp58); } { fftw_real tmp113; fftw_real tmp116; fftw_real tmp110; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp54 = tmp48 + tmp53; tmp65 = tmp59 + tmp64; tmp156 = tmp54 - tmp65; tmp113 = tmp48 - tmp53; tmp116 = tmp114 - tmp115; tmp117 = tmp113 - tmp116; tmp141 = tmp113 + tmp116; tmp157 = tmp108 + tmp109; tmp158 = tmp114 + tmp115; tmp159 = tmp157 - tmp158; tmp110 = tmp108 - tmp109; tmp111 = tmp59 - tmp64; tmp112 = tmp110 + tmp111; tmp140 = tmp110 - tmp111; } } { fftw_real tmp107; fftw_real tmp131; fftw_real tmp202; fftw_real tmp204; fftw_real tmp130; fftw_real tmp203; fftw_real tmp134; fftw_real tmp199; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp95; fftw_real tmp106; fftw_real tmp200; fftw_real tmp201; ASSERT_ALIGNED_DOUBLE; tmp95 = tmp91 - tmp94; tmp106 = K707106781 * (tmp100 - tmp105); tmp107 = tmp95 + tmp106; tmp131 = tmp95 - tmp106; tmp200 = K707106781 * (tmp137 - tmp136); tmp201 = tmp194 + tmp193; tmp202 = tmp200 + tmp201; tmp204 = tmp201 - tmp200; } { fftw_real tmp118; fftw_real tmp129; fftw_real tmp132; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp118 = (K923879532 * tmp112) + (K382683432 * tmp117); tmp129 = (K382683432 * tmp123) - (K923879532 * tmp128); tmp130 = tmp118 + tmp129; tmp203 = tmp129 - tmp118; tmp132 = (K382683432 * tmp112) - (K923879532 * tmp117); tmp133 = (K382683432 * tmp128) + (K923879532 * tmp123); tmp134 = tmp132 - tmp133; tmp199 = tmp132 + tmp133; } c_re(inout[11 * iostride]) = tmp107 - tmp130; c_re(inout[3 * iostride]) = tmp107 + tmp130; c_re(inout[15 * iostride]) = tmp131 - tmp134; c_re(inout[7 * iostride]) = tmp131 + tmp134; c_im(inout[3 * iostride]) = tmp199 + tmp202; c_im(inout[11 * iostride]) = tmp202 - tmp199; c_im(inout[7 * iostride]) = tmp203 + tmp204; c_im(inout[15 * iostride]) = tmp204 - tmp203; } { fftw_real tmp139; fftw_real tmp147; fftw_real tmp196; fftw_real tmp198; fftw_real tmp146; fftw_real tmp197; fftw_real tmp150; fftw_real tmp191; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp135; fftw_real tmp138; fftw_real tmp192; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp135 = tmp91 + tmp94; tmp138 = K707106781 * (tmp136 + tmp137); tmp139 = tmp135 + tmp138; tmp147 = tmp135 - tmp138; tmp192 = K707106781 * (tmp100 + tmp105); tmp195 = tmp193 - tmp194; tmp196 = tmp192 + tmp195; tmp198 = tmp195 - tmp192; } { fftw_real tmp142; fftw_real tmp145; fftw_real tmp148; fftw_real tmp149; ASSERT_ALIGNED_DOUBLE; tmp142 = (K382683432 * tmp140) + (K923879532 * tmp141); tmp145 = (K923879532 * tmp143) - (K382683432 * tmp144); tmp146 = tmp142 + tmp145; tmp197 = tmp145 - tmp142; tmp148 = (K923879532 * tmp140) - (K382683432 * tmp141); tmp149 = (K923879532 * tmp144) + (K382683432 * tmp143); tmp150 = tmp148 - tmp149; tmp191 = tmp148 + tmp149; } c_re(inout[9 * iostride]) = tmp139 - tmp146; c_re(inout[iostride]) = tmp139 + tmp146; c_re(inout[13 * iostride]) = tmp147 - tmp150; c_re(inout[5 * iostride]) = tmp147 + tmp150; c_im(inout[iostride]) = tmp191 + tmp196; c_im(inout[9 * iostride]) = tmp196 - tmp191; c_im(inout[5 * iostride]) = tmp197 + tmp198; c_im(inout[13 * iostride]) = tmp198 - tmp197; } { fftw_real tmp155; fftw_real tmp167; fftw_real tmp188; fftw_real tmp190; fftw_real tmp166; fftw_real tmp189; fftw_real tmp170; fftw_real tmp185; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp151; fftw_real tmp154; fftw_real tmp186; fftw_real tmp187; ASSERT_ALIGNED_DOUBLE; tmp151 = tmp7 - tmp18; tmp154 = tmp152 - tmp153; tmp155 = tmp151 + tmp154; tmp167 = tmp151 - tmp154; tmp186 = tmp41 - tmp30; tmp187 = tmp180 - tmp177; tmp188 = tmp186 + tmp187; tmp190 = tmp187 - tmp186; } { fftw_real tmp160; fftw_real tmp165; fftw_real tmp168; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp160 = tmp156 + tmp159; tmp165 = tmp161 - tmp164; tmp166 = K707106781 * (tmp160 + tmp165); tmp189 = K707106781 * (tmp165 - tmp160); tmp168 = tmp159 - tmp156; tmp169 = tmp161 + tmp164; tmp170 = K707106781 * (tmp168 - tmp169); tmp185 = K707106781 * (tmp168 + tmp169); } c_re(inout[10 * iostride]) = tmp155 - tmp166; c_re(inout[2 * iostride]) = tmp155 + tmp166; c_re(inout[14 * iostride]) = tmp167 - tmp170; c_re(inout[6 * iostride]) = tmp167 + tmp170; c_im(inout[2 * iostride]) = tmp185 + tmp188; c_im(inout[10 * iostride]) = tmp188 - tmp185; c_im(inout[6 * iostride]) = tmp189 + tmp190; c_im(inout[14 * iostride]) = tmp190 - tmp189; } { fftw_real tmp43; fftw_real tmp171; fftw_real tmp182; fftw_real tmp184; fftw_real tmp90; fftw_real tmp183; fftw_real tmp174; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp42; fftw_real tmp176; fftw_real tmp181; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp7 + tmp18; tmp42 = tmp30 + tmp41; tmp43 = tmp19 + tmp42; tmp171 = tmp19 - tmp42; tmp176 = tmp152 + tmp153; tmp181 = tmp177 + tmp180; tmp182 = tmp176 + tmp181; tmp184 = tmp181 - tmp176; } { fftw_real tmp66; fftw_real tmp89; fftw_real tmp172; fftw_real tmp173; ASSERT_ALIGNED_DOUBLE; tmp66 = tmp54 + tmp65; tmp89 = tmp77 + tmp88; tmp90 = tmp66 + tmp89; tmp183 = tmp89 - tmp66; tmp172 = tmp157 + tmp158; tmp173 = tmp162 + tmp163; tmp174 = tmp172 - tmp173; tmp175 = tmp172 + tmp173; } c_re(inout[8 * iostride]) = tmp43 - tmp90; c_re(inout[0]) = tmp43 + tmp90; c_re(inout[12 * iostride]) = tmp171 - tmp174; c_re(inout[4 * iostride]) = tmp171 + tmp174; c_im(inout[0]) = tmp175 + tmp182; c_im(inout[8 * iostride]) = tmp182 - tmp175; c_im(inout[4 * iostride]) = tmp183 + tmp184; c_im(inout[12 * iostride]) = tmp184 - tmp183; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; fftw_codelet_desc fftw_twiddle_16_desc = { "fftw_twiddle_16", (void (*)()) fftw_twiddle_16, 16, FFTW_FORWARD, FFTW_TWIDDLE, 352, 15, twiddle_order, }; ��������������������������������fftw-2.1.5/fftw/ftw_32.c����������������������������������������������������������������������������0000644�0001754�0000144�00000117272�07637527322�010413� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:45 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 32 */ /* * This function contains 434 FP additions, 208 FP multiplications, * (or, 340 additions, 114 multiplications, 94 fused multiply/add), * 90 stack variables, and 128 memory accesses */ static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_32(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 31) { fftw_real tmp19; fftw_real tmp351; fftw_real tmp472; fftw_real tmp486; fftw_real tmp442; fftw_real tmp456; fftw_real tmp191; fftw_real tmp303; fftw_real tmp161; fftw_real tmp379; fftw_real tmp276; fftw_real tmp326; fftw_real tmp386; fftw_real tmp422; fftw_real tmp259; fftw_real tmp323; fftw_real tmp42; fftw_real tmp455; fftw_real tmp201; fftw_real tmp305; fftw_real tmp354; fftw_real tmp437; fftw_real tmp196; fftw_real tmp304; fftw_real tmp184; fftw_real tmp387; fftw_real tmp382; fftw_real tmp423; fftw_real tmp270; fftw_real tmp327; fftw_real tmp279; fftw_real tmp324; fftw_real tmp66; fftw_real tmp359; fftw_real tmp213; fftw_real tmp309; fftw_real tmp358; fftw_real tmp412; fftw_real tmp208; fftw_real tmp308; fftw_real tmp114; fftw_real tmp373; fftw_real tmp249; fftw_real tmp316; fftw_real tmp370; fftw_real tmp417; fftw_real tmp232; fftw_real tmp319; fftw_real tmp89; fftw_real tmp361; fftw_real tmp224; fftw_real tmp312; fftw_real tmp364; fftw_real tmp413; fftw_real tmp219; fftw_real tmp311; fftw_real tmp137; fftw_real tmp371; fftw_real tmp376; fftw_real tmp418; fftw_real tmp243; fftw_real tmp317; fftw_real tmp252; fftw_real tmp320; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp440; fftw_real tmp6; fftw_real tmp439; fftw_real tmp12; fftw_real tmp188; fftw_real tmp17; fftw_real tmp189; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp440 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[16 * iostride]); tmp5 = c_im(inout[16 * iostride]); tmp2 = c_re(W[15]); tmp4 = c_im(W[15]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp439 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[8 * iostride]); tmp11 = c_im(inout[8 * iostride]); tmp8 = c_re(W[7]); tmp10 = c_im(W[7]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp188 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[24 * iostride]); tmp16 = c_im(inout[24 * iostride]); tmp13 = c_re(W[23]); tmp15 = c_im(W[23]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp189 = (tmp15 * tmp14) + (tmp13 * tmp16); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp470; fftw_real tmp471; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; tmp19 = tmp7 + tmp18; tmp351 = tmp7 - tmp18; tmp470 = tmp440 - tmp439; tmp471 = tmp12 - tmp17; tmp472 = tmp470 - tmp471; tmp486 = tmp471 + tmp470; } { fftw_real tmp438; fftw_real tmp441; fftw_real tmp187; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; tmp438 = tmp188 + tmp189; tmp441 = tmp439 + tmp440; tmp442 = tmp438 + tmp441; tmp456 = tmp441 - tmp438; tmp187 = tmp1 - tmp6; tmp190 = tmp188 - tmp189; tmp191 = tmp187 - tmp190; tmp303 = tmp187 + tmp190; } } { fftw_real tmp143; fftw_real tmp272; fftw_real tmp159; fftw_real tmp257; fftw_real tmp148; fftw_real tmp273; fftw_real tmp154; fftw_real tmp256; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp140; fftw_real tmp142; fftw_real tmp139; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp140 = c_re(inout[31 * iostride]); tmp142 = c_im(inout[31 * iostride]); tmp139 = c_re(W[30]); tmp141 = c_im(W[30]); tmp143 = (tmp139 * tmp140) - (tmp141 * tmp142); tmp272 = (tmp141 * tmp140) + (tmp139 * tmp142); } { fftw_real tmp156; fftw_real tmp158; fftw_real tmp155; fftw_real tmp157; ASSERT_ALIGNED_DOUBLE; tmp156 = c_re(inout[23 * iostride]); tmp158 = c_im(inout[23 * iostride]); tmp155 = c_re(W[22]); tmp157 = c_im(W[22]); tmp159 = (tmp155 * tmp156) - (tmp157 * tmp158); tmp257 = (tmp157 * tmp156) + (tmp155 * tmp158); } { fftw_real tmp145; fftw_real tmp147; fftw_real tmp144; fftw_real tmp146; ASSERT_ALIGNED_DOUBLE; tmp145 = c_re(inout[15 * iostride]); tmp147 = c_im(inout[15 * iostride]); tmp144 = c_re(W[14]); tmp146 = c_im(W[14]); tmp148 = (tmp144 * tmp145) - (tmp146 * tmp147); tmp273 = (tmp146 * tmp145) + (tmp144 * tmp147); } { fftw_real tmp151; fftw_real tmp153; fftw_real tmp150; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp151 = c_re(inout[7 * iostride]); tmp153 = c_im(inout[7 * iostride]); tmp150 = c_re(W[6]); tmp152 = c_im(W[6]); tmp154 = (tmp150 * tmp151) - (tmp152 * tmp153); tmp256 = (tmp152 * tmp151) + (tmp150 * tmp153); } { fftw_real tmp149; fftw_real tmp160; fftw_real tmp274; fftw_real tmp275; ASSERT_ALIGNED_DOUBLE; tmp149 = tmp143 + tmp148; tmp160 = tmp154 + tmp159; tmp161 = tmp149 + tmp160; tmp379 = tmp149 - tmp160; tmp274 = tmp272 - tmp273; tmp275 = tmp154 - tmp159; tmp276 = tmp274 + tmp275; tmp326 = tmp274 - tmp275; } { fftw_real tmp384; fftw_real tmp385; fftw_real tmp255; fftw_real tmp258; ASSERT_ALIGNED_DOUBLE; tmp384 = tmp272 + tmp273; tmp385 = tmp256 + tmp257; tmp386 = tmp384 - tmp385; tmp422 = tmp384 + tmp385; tmp255 = tmp143 - tmp148; tmp258 = tmp256 - tmp257; tmp259 = tmp255 - tmp258; tmp323 = tmp255 + tmp258; } } { fftw_real tmp24; fftw_real tmp192; fftw_real tmp40; fftw_real tmp199; fftw_real tmp29; fftw_real tmp193; fftw_real tmp35; fftw_real tmp198; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[4 * iostride]); tmp23 = c_im(inout[4 * iostride]); tmp20 = c_re(W[3]); tmp22 = c_im(W[3]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp192 = (tmp22 * tmp21) + (tmp20 * tmp23); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[12 * iostride]); tmp39 = c_im(inout[12 * iostride]); tmp36 = c_re(W[11]); tmp38 = c_im(W[11]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp199 = (tmp38 * tmp37) + (tmp36 * tmp39); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[20 * iostride]); tmp28 = c_im(inout[20 * iostride]); tmp25 = c_re(W[19]); tmp27 = c_im(W[19]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp193 = (tmp27 * tmp26) + (tmp25 * tmp28); } { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[28 * iostride]); tmp34 = c_im(inout[28 * iostride]); tmp31 = c_re(W[27]); tmp33 = c_im(W[27]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp198 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp30; fftw_real tmp41; fftw_real tmp197; fftw_real tmp200; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp24 + tmp29; tmp41 = tmp35 + tmp40; tmp42 = tmp30 + tmp41; tmp455 = tmp41 - tmp30; tmp197 = tmp35 - tmp40; tmp200 = tmp198 - tmp199; tmp201 = tmp197 + tmp200; tmp305 = tmp197 - tmp200; } { fftw_real tmp352; fftw_real tmp353; fftw_real tmp194; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp352 = tmp192 + tmp193; tmp353 = tmp198 + tmp199; tmp354 = tmp352 - tmp353; tmp437 = tmp352 + tmp353; tmp194 = tmp192 - tmp193; tmp195 = tmp24 - tmp29; tmp196 = tmp194 - tmp195; tmp304 = tmp195 + tmp194; } } { fftw_real tmp166; fftw_real tmp260; fftw_real tmp171; fftw_real tmp261; fftw_real tmp262; fftw_real tmp263; fftw_real tmp177; fftw_real tmp266; fftw_real tmp182; fftw_real tmp267; fftw_real tmp265; fftw_real tmp268; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp163; fftw_real tmp165; fftw_real tmp162; fftw_real tmp164; ASSERT_ALIGNED_DOUBLE; tmp163 = c_re(inout[3 * iostride]); tmp165 = c_im(inout[3 * iostride]); tmp162 = c_re(W[2]); tmp164 = c_im(W[2]); tmp166 = (tmp162 * tmp163) - (tmp164 * tmp165); tmp260 = (tmp164 * tmp163) + (tmp162 * tmp165); } { fftw_real tmp168; fftw_real tmp170; fftw_real tmp167; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp168 = c_re(inout[19 * iostride]); tmp170 = c_im(inout[19 * iostride]); tmp167 = c_re(W[18]); tmp169 = c_im(W[18]); tmp171 = (tmp167 * tmp168) - (tmp169 * tmp170); tmp261 = (tmp169 * tmp168) + (tmp167 * tmp170); } tmp262 = tmp260 - tmp261; tmp263 = tmp166 - tmp171; { fftw_real tmp174; fftw_real tmp176; fftw_real tmp173; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; tmp174 = c_re(inout[27 * iostride]); tmp176 = c_im(inout[27 * iostride]); tmp173 = c_re(W[26]); tmp175 = c_im(W[26]); tmp177 = (tmp173 * tmp174) - (tmp175 * tmp176); tmp266 = (tmp175 * tmp174) + (tmp173 * tmp176); } { fftw_real tmp179; fftw_real tmp181; fftw_real tmp178; fftw_real tmp180; ASSERT_ALIGNED_DOUBLE; tmp179 = c_re(inout[11 * iostride]); tmp181 = c_im(inout[11 * iostride]); tmp178 = c_re(W[10]); tmp180 = c_im(W[10]); tmp182 = (tmp178 * tmp179) - (tmp180 * tmp181); tmp267 = (tmp180 * tmp179) + (tmp178 * tmp181); } tmp265 = tmp177 - tmp182; tmp268 = tmp266 - tmp267; { fftw_real tmp172; fftw_real tmp183; fftw_real tmp380; fftw_real tmp381; ASSERT_ALIGNED_DOUBLE; tmp172 = tmp166 + tmp171; tmp183 = tmp177 + tmp182; tmp184 = tmp172 + tmp183; tmp387 = tmp183 - tmp172; tmp380 = tmp260 + tmp261; tmp381 = tmp266 + tmp267; tmp382 = tmp380 - tmp381; tmp423 = tmp380 + tmp381; } { fftw_real tmp264; fftw_real tmp269; fftw_real tmp277; fftw_real tmp278; ASSERT_ALIGNED_DOUBLE; tmp264 = tmp262 - tmp263; tmp269 = tmp265 + tmp268; tmp270 = K707106781 * (tmp264 - tmp269); tmp327 = K707106781 * (tmp264 + tmp269); tmp277 = tmp265 - tmp268; tmp278 = tmp263 + tmp262; tmp279 = K707106781 * (tmp277 - tmp278); tmp324 = K707106781 * (tmp278 + tmp277); } } { fftw_real tmp48; fftw_real tmp204; fftw_real tmp64; fftw_real tmp211; fftw_real tmp53; fftw_real tmp205; fftw_real tmp59; fftw_real tmp210; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[2 * iostride]); tmp47 = c_im(inout[2 * iostride]); tmp44 = c_re(W[1]); tmp46 = c_im(W[1]); tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); tmp204 = (tmp46 * tmp45) + (tmp44 * tmp47); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[26 * iostride]); tmp63 = c_im(inout[26 * iostride]); tmp60 = c_re(W[25]); tmp62 = c_im(W[25]); tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); tmp211 = (tmp62 * tmp61) + (tmp60 * tmp63); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[18 * iostride]); tmp52 = c_im(inout[18 * iostride]); tmp49 = c_re(W[17]); tmp51 = c_im(W[17]); tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); tmp205 = (tmp51 * tmp50) + (tmp49 * tmp52); } { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[10 * iostride]); tmp58 = c_im(inout[10 * iostride]); tmp55 = c_re(W[9]); tmp57 = c_im(W[9]); tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); tmp210 = (tmp57 * tmp56) + (tmp55 * tmp58); } { fftw_real tmp54; fftw_real tmp65; fftw_real tmp209; fftw_real tmp212; ASSERT_ALIGNED_DOUBLE; tmp54 = tmp48 + tmp53; tmp65 = tmp59 + tmp64; tmp66 = tmp54 + tmp65; tmp359 = tmp54 - tmp65; tmp209 = tmp48 - tmp53; tmp212 = tmp210 - tmp211; tmp213 = tmp209 - tmp212; tmp309 = tmp209 + tmp212; } { fftw_real tmp356; fftw_real tmp357; fftw_real tmp206; fftw_real tmp207; ASSERT_ALIGNED_DOUBLE; tmp356 = tmp204 + tmp205; tmp357 = tmp210 + tmp211; tmp358 = tmp356 - tmp357; tmp412 = tmp356 + tmp357; tmp206 = tmp204 - tmp205; tmp207 = tmp59 - tmp64; tmp208 = tmp206 + tmp207; tmp308 = tmp206 - tmp207; } } { fftw_real tmp96; fftw_real tmp228; fftw_real tmp112; fftw_real tmp247; fftw_real tmp101; fftw_real tmp229; fftw_real tmp107; fftw_real tmp246; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp93; fftw_real tmp95; fftw_real tmp92; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; tmp93 = c_re(inout[iostride]); tmp95 = c_im(inout[iostride]); tmp92 = c_re(W[0]); tmp94 = c_im(W[0]); tmp96 = (tmp92 * tmp93) - (tmp94 * tmp95); tmp228 = (tmp94 * tmp93) + (tmp92 * tmp95); } { fftw_real tmp109; fftw_real tmp111; fftw_real tmp108; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp109 = c_re(inout[25 * iostride]); tmp111 = c_im(inout[25 * iostride]); tmp108 = c_re(W[24]); tmp110 = c_im(W[24]); tmp112 = (tmp108 * tmp109) - (tmp110 * tmp111); tmp247 = (tmp110 * tmp109) + (tmp108 * tmp111); } { fftw_real tmp98; fftw_real tmp100; fftw_real tmp97; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = c_re(inout[17 * iostride]); tmp100 = c_im(inout[17 * iostride]); tmp97 = c_re(W[16]); tmp99 = c_im(W[16]); tmp101 = (tmp97 * tmp98) - (tmp99 * tmp100); tmp229 = (tmp99 * tmp98) + (tmp97 * tmp100); } { fftw_real tmp104; fftw_real tmp106; fftw_real tmp103; fftw_real tmp105; ASSERT_ALIGNED_DOUBLE; tmp104 = c_re(inout[9 * iostride]); tmp106 = c_im(inout[9 * iostride]); tmp103 = c_re(W[8]); tmp105 = c_im(W[8]); tmp107 = (tmp103 * tmp104) - (tmp105 * tmp106); tmp246 = (tmp105 * tmp104) + (tmp103 * tmp106); } { fftw_real tmp102; fftw_real tmp113; fftw_real tmp245; fftw_real tmp248; ASSERT_ALIGNED_DOUBLE; tmp102 = tmp96 + tmp101; tmp113 = tmp107 + tmp112; tmp114 = tmp102 + tmp113; tmp373 = tmp102 - tmp113; tmp245 = tmp96 - tmp101; tmp248 = tmp246 - tmp247; tmp249 = tmp245 - tmp248; tmp316 = tmp245 + tmp248; } { fftw_real tmp368; fftw_real tmp369; fftw_real tmp230; fftw_real tmp231; ASSERT_ALIGNED_DOUBLE; tmp368 = tmp228 + tmp229; tmp369 = tmp246 + tmp247; tmp370 = tmp368 - tmp369; tmp417 = tmp368 + tmp369; tmp230 = tmp228 - tmp229; tmp231 = tmp107 - tmp112; tmp232 = tmp230 + tmp231; tmp319 = tmp230 - tmp231; } } { fftw_real tmp71; fftw_real tmp215; fftw_real tmp87; fftw_real tmp222; fftw_real tmp76; fftw_real tmp216; fftw_real tmp82; fftw_real tmp221; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[30 * iostride]); tmp70 = c_im(inout[30 * iostride]); tmp67 = c_re(W[29]); tmp69 = c_im(W[29]); tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); tmp215 = (tmp69 * tmp68) + (tmp67 * tmp70); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[22 * iostride]); tmp86 = c_im(inout[22 * iostride]); tmp83 = c_re(W[21]); tmp85 = c_im(W[21]); tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); tmp222 = (tmp85 * tmp84) + (tmp83 * tmp86); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[14 * iostride]); tmp75 = c_im(inout[14 * iostride]); tmp72 = c_re(W[13]); tmp74 = c_im(W[13]); tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); tmp216 = (tmp74 * tmp73) + (tmp72 * tmp75); } { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[6 * iostride]); tmp81 = c_im(inout[6 * iostride]); tmp78 = c_re(W[5]); tmp80 = c_im(W[5]); tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); tmp221 = (tmp80 * tmp79) + (tmp78 * tmp81); } { fftw_real tmp77; fftw_real tmp88; fftw_real tmp220; fftw_real tmp223; ASSERT_ALIGNED_DOUBLE; tmp77 = tmp71 + tmp76; tmp88 = tmp82 + tmp87; tmp89 = tmp77 + tmp88; tmp361 = tmp77 - tmp88; tmp220 = tmp71 - tmp76; tmp223 = tmp221 - tmp222; tmp224 = tmp220 - tmp223; tmp312 = tmp220 + tmp223; } { fftw_real tmp362; fftw_real tmp363; fftw_real tmp217; fftw_real tmp218; ASSERT_ALIGNED_DOUBLE; tmp362 = tmp215 + tmp216; tmp363 = tmp221 + tmp222; tmp364 = tmp362 - tmp363; tmp413 = tmp362 + tmp363; tmp217 = tmp215 - tmp216; tmp218 = tmp82 - tmp87; tmp219 = tmp217 + tmp218; tmp311 = tmp217 - tmp218; } } { fftw_real tmp119; fftw_real tmp239; fftw_real tmp124; fftw_real tmp240; fftw_real tmp238; fftw_real tmp241; fftw_real tmp130; fftw_real tmp234; fftw_real tmp135; fftw_real tmp235; fftw_real tmp233; fftw_real tmp236; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp116; fftw_real tmp118; fftw_real tmp115; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp116 = c_re(inout[5 * iostride]); tmp118 = c_im(inout[5 * iostride]); tmp115 = c_re(W[4]); tmp117 = c_im(W[4]); tmp119 = (tmp115 * tmp116) - (tmp117 * tmp118); tmp239 = (tmp117 * tmp116) + (tmp115 * tmp118); } { fftw_real tmp121; fftw_real tmp123; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp121 = c_re(inout[21 * iostride]); tmp123 = c_im(inout[21 * iostride]); tmp120 = c_re(W[20]); tmp122 = c_im(W[20]); tmp124 = (tmp120 * tmp121) - (tmp122 * tmp123); tmp240 = (tmp122 * tmp121) + (tmp120 * tmp123); } tmp238 = tmp119 - tmp124; tmp241 = tmp239 - tmp240; { fftw_real tmp127; fftw_real tmp129; fftw_real tmp126; fftw_real tmp128; ASSERT_ALIGNED_DOUBLE; tmp127 = c_re(inout[29 * iostride]); tmp129 = c_im(inout[29 * iostride]); tmp126 = c_re(W[28]); tmp128 = c_im(W[28]); tmp130 = (tmp126 * tmp127) - (tmp128 * tmp129); tmp234 = (tmp128 * tmp127) + (tmp126 * tmp129); } { fftw_real tmp132; fftw_real tmp134; fftw_real tmp131; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp132 = c_re(inout[13 * iostride]); tmp134 = c_im(inout[13 * iostride]); tmp131 = c_re(W[12]); tmp133 = c_im(W[12]); tmp135 = (tmp131 * tmp132) - (tmp133 * tmp134); tmp235 = (tmp133 * tmp132) + (tmp131 * tmp134); } tmp233 = tmp130 - tmp135; tmp236 = tmp234 - tmp235; { fftw_real tmp125; fftw_real tmp136; fftw_real tmp374; fftw_real tmp375; ASSERT_ALIGNED_DOUBLE; tmp125 = tmp119 + tmp124; tmp136 = tmp130 + tmp135; tmp137 = tmp125 + tmp136; tmp371 = tmp136 - tmp125; tmp374 = tmp239 + tmp240; tmp375 = tmp234 + tmp235; tmp376 = tmp374 - tmp375; tmp418 = tmp374 + tmp375; } { fftw_real tmp237; fftw_real tmp242; fftw_real tmp250; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; tmp237 = tmp233 - tmp236; tmp242 = tmp238 + tmp241; tmp243 = K707106781 * (tmp237 - tmp242); tmp317 = K707106781 * (tmp242 + tmp237); tmp250 = tmp241 - tmp238; tmp251 = tmp233 + tmp236; tmp252 = K707106781 * (tmp250 - tmp251); tmp320 = K707106781 * (tmp250 + tmp251); } } { fftw_real tmp91; fftw_real tmp431; fftw_real tmp444; fftw_real tmp446; fftw_real tmp186; fftw_real tmp445; fftw_real tmp434; fftw_real tmp435; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp90; fftw_real tmp436; fftw_real tmp443; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp19 + tmp42; tmp90 = tmp66 + tmp89; tmp91 = tmp43 + tmp90; tmp431 = tmp43 - tmp90; tmp436 = tmp412 + tmp413; tmp443 = tmp437 + tmp442; tmp444 = tmp436 + tmp443; tmp446 = tmp443 - tmp436; } { fftw_real tmp138; fftw_real tmp185; fftw_real tmp432; fftw_real tmp433; ASSERT_ALIGNED_DOUBLE; tmp138 = tmp114 + tmp137; tmp185 = tmp161 + tmp184; tmp186 = tmp138 + tmp185; tmp445 = tmp185 - tmp138; tmp432 = tmp417 + tmp418; tmp433 = tmp422 + tmp423; tmp434 = tmp432 - tmp433; tmp435 = tmp432 + tmp433; } c_re(inout[16 * iostride]) = tmp91 - tmp186; c_re(inout[0]) = tmp91 + tmp186; c_re(inout[24 * iostride]) = tmp431 - tmp434; c_re(inout[8 * iostride]) = tmp431 + tmp434; c_im(inout[0]) = tmp435 + tmp444; c_im(inout[16 * iostride]) = tmp444 - tmp435; c_im(inout[8 * iostride]) = tmp445 + tmp446; c_im(inout[24 * iostride]) = tmp446 - tmp445; } { fftw_real tmp415; fftw_real tmp427; fftw_real tmp450; fftw_real tmp452; fftw_real tmp420; fftw_real tmp428; fftw_real tmp425; fftw_real tmp429; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp411; fftw_real tmp414; fftw_real tmp448; fftw_real tmp449; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp19 - tmp42; tmp414 = tmp412 - tmp413; tmp415 = tmp411 + tmp414; tmp427 = tmp411 - tmp414; tmp448 = tmp89 - tmp66; tmp449 = tmp442 - tmp437; tmp450 = tmp448 + tmp449; tmp452 = tmp449 - tmp448; } { fftw_real tmp416; fftw_real tmp419; fftw_real tmp421; fftw_real tmp424; ASSERT_ALIGNED_DOUBLE; tmp416 = tmp114 - tmp137; tmp419 = tmp417 - tmp418; tmp420 = tmp416 + tmp419; tmp428 = tmp419 - tmp416; tmp421 = tmp161 - tmp184; tmp424 = tmp422 - tmp423; tmp425 = tmp421 - tmp424; tmp429 = tmp421 + tmp424; } { fftw_real tmp426; fftw_real tmp451; fftw_real tmp430; fftw_real tmp447; ASSERT_ALIGNED_DOUBLE; tmp426 = K707106781 * (tmp420 + tmp425); c_re(inout[20 * iostride]) = tmp415 - tmp426; c_re(inout[4 * iostride]) = tmp415 + tmp426; tmp451 = K707106781 * (tmp425 - tmp420); c_im(inout[12 * iostride]) = tmp451 + tmp452; c_im(inout[28 * iostride]) = tmp452 - tmp451; tmp430 = K707106781 * (tmp428 - tmp429); c_re(inout[28 * iostride]) = tmp427 - tmp430; c_re(inout[12 * iostride]) = tmp427 + tmp430; tmp447 = K707106781 * (tmp428 + tmp429); c_im(inout[4 * iostride]) = tmp447 + tmp450; c_im(inout[20 * iostride]) = tmp450 - tmp447; } } { fftw_real tmp355; fftw_real tmp395; fftw_real tmp366; fftw_real tmp454; fftw_real tmp398; fftw_real tmp462; fftw_real tmp378; fftw_real tmp392; fftw_real tmp457; fftw_real tmp463; fftw_real tmp402; fftw_real tmp408; fftw_real tmp389; fftw_real tmp393; fftw_real tmp405; fftw_real tmp409; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp360; fftw_real tmp365; fftw_real tmp400; fftw_real tmp401; ASSERT_ALIGNED_DOUBLE; tmp355 = tmp351 - tmp354; tmp395 = tmp351 + tmp354; tmp360 = tmp358 - tmp359; tmp365 = tmp361 + tmp364; tmp366 = K707106781 * (tmp360 - tmp365); tmp454 = K707106781 * (tmp360 + tmp365); { fftw_real tmp396; fftw_real tmp397; fftw_real tmp372; fftw_real tmp377; ASSERT_ALIGNED_DOUBLE; tmp396 = tmp359 + tmp358; tmp397 = tmp361 - tmp364; tmp398 = K707106781 * (tmp396 + tmp397); tmp462 = K707106781 * (tmp397 - tmp396); tmp372 = tmp370 - tmp371; tmp377 = tmp373 - tmp376; tmp378 = (K923879532 * tmp372) + (K382683432 * tmp377); tmp392 = (K382683432 * tmp372) - (K923879532 * tmp377); } tmp457 = tmp455 + tmp456; tmp463 = tmp456 - tmp455; tmp400 = tmp370 + tmp371; tmp401 = tmp373 + tmp376; tmp402 = (K382683432 * tmp400) + (K923879532 * tmp401); tmp408 = (K923879532 * tmp400) - (K382683432 * tmp401); { fftw_real tmp383; fftw_real tmp388; fftw_real tmp403; fftw_real tmp404; ASSERT_ALIGNED_DOUBLE; tmp383 = tmp379 - tmp382; tmp388 = tmp386 - tmp387; tmp389 = (K382683432 * tmp383) - (K923879532 * tmp388); tmp393 = (K382683432 * tmp388) + (K923879532 * tmp383); tmp403 = tmp379 + tmp382; tmp404 = tmp386 + tmp387; tmp405 = (K923879532 * tmp403) - (K382683432 * tmp404); tmp409 = (K923879532 * tmp404) + (K382683432 * tmp403); } } { fftw_real tmp367; fftw_real tmp390; fftw_real tmp391; fftw_real tmp394; ASSERT_ALIGNED_DOUBLE; tmp367 = tmp355 + tmp366; tmp390 = tmp378 + tmp389; c_re(inout[22 * iostride]) = tmp367 - tmp390; c_re(inout[6 * iostride]) = tmp367 + tmp390; tmp391 = tmp355 - tmp366; tmp394 = tmp392 - tmp393; c_re(inout[30 * iostride]) = tmp391 - tmp394; c_re(inout[14 * iostride]) = tmp391 + tmp394; } { fftw_real tmp461; fftw_real tmp464; fftw_real tmp465; fftw_real tmp466; ASSERT_ALIGNED_DOUBLE; tmp461 = tmp392 + tmp393; tmp464 = tmp462 + tmp463; c_im(inout[6 * iostride]) = tmp461 + tmp464; c_im(inout[22 * iostride]) = tmp464 - tmp461; tmp465 = tmp389 - tmp378; tmp466 = tmp463 - tmp462; c_im(inout[14 * iostride]) = tmp465 + tmp466; c_im(inout[30 * iostride]) = tmp466 - tmp465; } { fftw_real tmp399; fftw_real tmp406; fftw_real tmp407; fftw_real tmp410; ASSERT_ALIGNED_DOUBLE; tmp399 = tmp395 + tmp398; tmp406 = tmp402 + tmp405; c_re(inout[18 * iostride]) = tmp399 - tmp406; c_re(inout[2 * iostride]) = tmp399 + tmp406; tmp407 = tmp395 - tmp398; tmp410 = tmp408 - tmp409; c_re(inout[26 * iostride]) = tmp407 - tmp410; c_re(inout[10 * iostride]) = tmp407 + tmp410; } { fftw_real tmp453; fftw_real tmp458; fftw_real tmp459; fftw_real tmp460; ASSERT_ALIGNED_DOUBLE; tmp453 = tmp408 + tmp409; tmp458 = tmp454 + tmp457; c_im(inout[2 * iostride]) = tmp453 + tmp458; c_im(inout[18 * iostride]) = tmp458 - tmp453; tmp459 = tmp405 - tmp402; tmp460 = tmp457 - tmp454; c_im(inout[10 * iostride]) = tmp459 + tmp460; c_im(inout[26 * iostride]) = tmp460 - tmp459; } } { fftw_real tmp307; fftw_real tmp335; fftw_real tmp338; fftw_real tmp478; fftw_real tmp473; fftw_real tmp479; fftw_real tmp314; fftw_real tmp468; fftw_real tmp322; fftw_real tmp332; fftw_real tmp342; fftw_real tmp348; fftw_real tmp329; fftw_real tmp333; fftw_real tmp345; fftw_real tmp349; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp306; fftw_real tmp336; fftw_real tmp337; fftw_real tmp469; fftw_real tmp310; fftw_real tmp313; ASSERT_ALIGNED_DOUBLE; tmp306 = K707106781 * (tmp304 + tmp305); tmp307 = tmp303 - tmp306; tmp335 = tmp303 + tmp306; tmp336 = (K382683432 * tmp308) + (K923879532 * tmp309); tmp337 = (K923879532 * tmp312) - (K382683432 * tmp311); tmp338 = tmp336 + tmp337; tmp478 = tmp337 - tmp336; tmp469 = K707106781 * (tmp196 + tmp201); tmp473 = tmp469 + tmp472; tmp479 = tmp472 - tmp469; tmp310 = (K923879532 * tmp308) - (K382683432 * tmp309); tmp313 = (K923879532 * tmp311) + (K382683432 * tmp312); tmp314 = tmp310 - tmp313; tmp468 = tmp310 + tmp313; } { fftw_real tmp318; fftw_real tmp321; fftw_real tmp340; fftw_real tmp341; ASSERT_ALIGNED_DOUBLE; tmp318 = tmp316 - tmp317; tmp321 = tmp319 - tmp320; tmp322 = (K555570233 * tmp318) + (K831469612 * tmp321); tmp332 = (K555570233 * tmp321) - (K831469612 * tmp318); tmp340 = tmp316 + tmp317; tmp341 = tmp319 + tmp320; tmp342 = (K980785280 * tmp340) + (K195090322 * tmp341); tmp348 = (K980785280 * tmp341) - (K195090322 * tmp340); } { fftw_real tmp325; fftw_real tmp328; fftw_real tmp343; fftw_real tmp344; ASSERT_ALIGNED_DOUBLE; tmp325 = tmp323 - tmp324; tmp328 = tmp326 - tmp327; tmp329 = (K555570233 * tmp325) - (K831469612 * tmp328); tmp333 = (K831469612 * tmp325) + (K555570233 * tmp328); tmp343 = tmp323 + tmp324; tmp344 = tmp326 + tmp327; tmp345 = (K980785280 * tmp343) - (K195090322 * tmp344); tmp349 = (K195090322 * tmp343) + (K980785280 * tmp344); } { fftw_real tmp315; fftw_real tmp330; fftw_real tmp331; fftw_real tmp334; ASSERT_ALIGNED_DOUBLE; tmp315 = tmp307 + tmp314; tmp330 = tmp322 + tmp329; c_re(inout[21 * iostride]) = tmp315 - tmp330; c_re(inout[5 * iostride]) = tmp315 + tmp330; tmp331 = tmp307 - tmp314; tmp334 = tmp332 - tmp333; c_re(inout[29 * iostride]) = tmp331 - tmp334; c_re(inout[13 * iostride]) = tmp331 + tmp334; } { fftw_real tmp477; fftw_real tmp480; fftw_real tmp481; fftw_real tmp482; ASSERT_ALIGNED_DOUBLE; tmp477 = tmp332 + tmp333; tmp480 = tmp478 + tmp479; c_im(inout[5 * iostride]) = tmp477 + tmp480; c_im(inout[21 * iostride]) = tmp480 - tmp477; tmp481 = tmp329 - tmp322; tmp482 = tmp479 - tmp478; c_im(inout[13 * iostride]) = tmp481 + tmp482; c_im(inout[29 * iostride]) = tmp482 - tmp481; } { fftw_real tmp339; fftw_real tmp346; fftw_real tmp347; fftw_real tmp350; ASSERT_ALIGNED_DOUBLE; tmp339 = tmp335 + tmp338; tmp346 = tmp342 + tmp345; c_re(inout[17 * iostride]) = tmp339 - tmp346; c_re(inout[iostride]) = tmp339 + tmp346; tmp347 = tmp335 - tmp338; tmp350 = tmp348 - tmp349; c_re(inout[25 * iostride]) = tmp347 - tmp350; c_re(inout[9 * iostride]) = tmp347 + tmp350; } { fftw_real tmp467; fftw_real tmp474; fftw_real tmp475; fftw_real tmp476; ASSERT_ALIGNED_DOUBLE; tmp467 = tmp348 + tmp349; tmp474 = tmp468 + tmp473; c_im(inout[iostride]) = tmp467 + tmp474; c_im(inout[17 * iostride]) = tmp474 - tmp467; tmp475 = tmp345 - tmp342; tmp476 = tmp473 - tmp468; c_im(inout[9 * iostride]) = tmp475 + tmp476; c_im(inout[25 * iostride]) = tmp476 - tmp475; } } { fftw_real tmp203; fftw_real tmp287; fftw_real tmp290; fftw_real tmp492; fftw_real tmp487; fftw_real tmp493; fftw_real tmp226; fftw_real tmp484; fftw_real tmp254; fftw_real tmp284; fftw_real tmp294; fftw_real tmp300; fftw_real tmp281; fftw_real tmp285; fftw_real tmp297; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp202; fftw_real tmp288; fftw_real tmp289; fftw_real tmp485; fftw_real tmp214; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp202 = K707106781 * (tmp196 - tmp201); tmp203 = tmp191 - tmp202; tmp287 = tmp191 + tmp202; tmp288 = (K923879532 * tmp208) + (K382683432 * tmp213); tmp289 = (K382683432 * tmp224) - (K923879532 * tmp219); tmp290 = tmp288 + tmp289; tmp492 = tmp289 - tmp288; tmp485 = K707106781 * (tmp305 - tmp304); tmp487 = tmp485 + tmp486; tmp493 = tmp486 - tmp485; tmp214 = (K382683432 * tmp208) - (K923879532 * tmp213); tmp225 = (K382683432 * tmp219) + (K923879532 * tmp224); tmp226 = tmp214 - tmp225; tmp484 = tmp214 + tmp225; } { fftw_real tmp244; fftw_real tmp253; fftw_real tmp292; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; tmp244 = tmp232 - tmp243; tmp253 = tmp249 - tmp252; tmp254 = (K980785280 * tmp244) + (K195090322 * tmp253); tmp284 = (K195090322 * tmp244) - (K980785280 * tmp253); tmp292 = tmp232 + tmp243; tmp293 = tmp249 + tmp252; tmp294 = (K555570233 * tmp292) + (K831469612 * tmp293); tmp300 = (K831469612 * tmp292) - (K555570233 * tmp293); } { fftw_real tmp271; fftw_real tmp280; fftw_real tmp295; fftw_real tmp296; ASSERT_ALIGNED_DOUBLE; tmp271 = tmp259 - tmp270; tmp280 = tmp276 - tmp279; tmp281 = (K195090322 * tmp271) - (K980785280 * tmp280); tmp285 = (K195090322 * tmp280) + (K980785280 * tmp271); tmp295 = tmp259 + tmp270; tmp296 = tmp276 + tmp279; tmp297 = (K831469612 * tmp295) - (K555570233 * tmp296); tmp301 = (K831469612 * tmp296) + (K555570233 * tmp295); } { fftw_real tmp227; fftw_real tmp282; fftw_real tmp283; fftw_real tmp286; ASSERT_ALIGNED_DOUBLE; tmp227 = tmp203 + tmp226; tmp282 = tmp254 + tmp281; c_re(inout[23 * iostride]) = tmp227 - tmp282; c_re(inout[7 * iostride]) = tmp227 + tmp282; tmp283 = tmp203 - tmp226; tmp286 = tmp284 - tmp285; c_re(inout[31 * iostride]) = tmp283 - tmp286; c_re(inout[15 * iostride]) = tmp283 + tmp286; } { fftw_real tmp491; fftw_real tmp494; fftw_real tmp495; fftw_real tmp496; ASSERT_ALIGNED_DOUBLE; tmp491 = tmp284 + tmp285; tmp494 = tmp492 + tmp493; c_im(inout[7 * iostride]) = tmp491 + tmp494; c_im(inout[23 * iostride]) = tmp494 - tmp491; tmp495 = tmp281 - tmp254; tmp496 = tmp493 - tmp492; c_im(inout[15 * iostride]) = tmp495 + tmp496; c_im(inout[31 * iostride]) = tmp496 - tmp495; } { fftw_real tmp291; fftw_real tmp298; fftw_real tmp299; fftw_real tmp302; ASSERT_ALIGNED_DOUBLE; tmp291 = tmp287 + tmp290; tmp298 = tmp294 + tmp297; c_re(inout[19 * iostride]) = tmp291 - tmp298; c_re(inout[3 * iostride]) = tmp291 + tmp298; tmp299 = tmp287 - tmp290; tmp302 = tmp300 - tmp301; c_re(inout[27 * iostride]) = tmp299 - tmp302; c_re(inout[11 * iostride]) = tmp299 + tmp302; } { fftw_real tmp483; fftw_real tmp488; fftw_real tmp489; fftw_real tmp490; ASSERT_ALIGNED_DOUBLE; tmp483 = tmp300 + tmp301; tmp488 = tmp484 + tmp487; c_im(inout[3 * iostride]) = tmp483 + tmp488; c_im(inout[19 * iostride]) = tmp488 - tmp483; tmp489 = tmp297 - tmp294; tmp490 = tmp487 - tmp484; c_im(inout[11 * iostride]) = tmp489 + tmp490; c_im(inout[27 * iostride]) = tmp490 - tmp489; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; fftw_codelet_desc fftw_twiddle_32_desc = { "fftw_twiddle_32", (void (*)()) fftw_twiddle_32, 32, FFTW_FORWARD, FFTW_TWIDDLE, 704, 31, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftw_64.c����������������������������������������������������������������������������0000644�0001754�0000144�00000263160�07637527403�010416� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:48 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 64 */ /* * This function contains 1038 FP additions, 500 FP multiplications, * (or, 808 additions, 270 multiplications, 230 fused multiply/add), * 162 stack variables, and 256 memory accesses */ static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_twiddle_64(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 63) { fftw_real tmp19; fftw_real tmp791; fftw_real tmp1109; fftw_real tmp1139; fftw_real tmp1047; fftw_real tmp1077; fftw_real tmp383; fftw_real tmp655; fftw_real tmp66; fftw_real tmp800; fftw_real tmp908; fftw_real tmp956; fftw_real tmp406; fftw_real tmp608; fftw_real tmp662; fftw_real tmp744; fftw_real tmp42; fftw_real tmp1076; fftw_real tmp794; fftw_real tmp1042; fftw_real tmp394; fftw_real tmp1106; fftw_real tmp658; fftw_real tmp1138; fftw_real tmp329; fftw_real tmp983; fftw_real tmp863; fftw_real tmp927; fftw_real tmp990; fftw_real tmp1026; fftw_real tmp880; fftw_real tmp930; fftw_real tmp535; fftw_real tmp703; fftw_real tmp576; fftw_real tmp714; fftw_real tmp579; fftw_real tmp704; fftw_real tmp546; fftw_real tmp715; fftw_real tmp376; fftw_real tmp991; fftw_real tmp868; fftw_real tmp882; fftw_real tmp986; fftw_real tmp1027; fftw_real tmp873; fftw_real tmp881; fftw_real tmp558; fftw_real tmp582; fftw_real tmp708; fftw_real tmp718; fftw_real tmp569; fftw_real tmp581; fftw_real tmp711; fftw_real tmp717; fftw_real tmp89; fftw_real tmp805; fftw_real tmp909; fftw_real tmp957; fftw_real tmp417; fftw_real tmp609; fftw_real tmp665; fftw_real tmp745; fftw_real tmp161; fftw_real tmp184; fftw_real tmp965; fftw_real tmp823; fftw_real tmp915; fftw_real tmp966; fftw_real tmp967; fftw_real tmp968; fftw_real tmp828; fftw_real tmp916; fftw_real tmp451; fftw_real tmp678; fftw_real tmp468; fftw_real tmp675; fftw_real tmp471; fftw_real tmp679; fftw_real tmp462; fftw_real tmp676; fftw_real tmp114; fftw_real tmp137; fftw_real tmp963; fftw_real tmp812; fftw_real tmp912; fftw_real tmp960; fftw_real tmp961; fftw_real tmp962; fftw_real tmp817; fftw_real tmp913; fftw_real tmp424; fftw_real tmp668; fftw_real tmp441; fftw_real tmp671; fftw_real tmp444; fftw_real tmp669; fftw_real tmp435; fftw_real tmp672; fftw_real tmp234; fftw_real tmp977; fftw_real tmp836; fftw_real tmp923; fftw_real tmp974; fftw_real tmp1021; fftw_real tmp853; fftw_real tmp920; fftw_real tmp480; fftw_real tmp684; fftw_real tmp521; fftw_real tmp695; fftw_real tmp524; fftw_real tmp685; fftw_real tmp491; fftw_real tmp696; fftw_real tmp281; fftw_real tmp975; fftw_real tmp841; fftw_real tmp855; fftw_real tmp980; fftw_real tmp1022; fftw_real tmp846; fftw_real tmp854; fftw_real tmp503; fftw_real tmp527; fftw_real tmp689; fftw_real tmp699; fftw_real tmp514; fftw_real tmp526; fftw_real tmp692; fftw_real tmp698; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp1045; fftw_real tmp6; fftw_real tmp1044; fftw_real tmp12; fftw_real tmp380; fftw_real tmp17; fftw_real tmp381; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp1045 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[32 * iostride]); tmp5 = c_im(inout[32 * iostride]); tmp2 = c_re(W[31]); tmp4 = c_im(W[31]); tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5); tmp1044 = (tmp4 * tmp3) + (tmp2 * tmp5); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[16 * iostride]); tmp11 = c_im(inout[16 * iostride]); tmp8 = c_re(W[15]); tmp10 = c_im(W[15]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp380 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[48 * iostride]); tmp16 = c_im(inout[48 * iostride]); tmp13 = c_re(W[47]); tmp15 = c_im(W[47]); tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16); tmp381 = (tmp15 * tmp14) + (tmp13 * tmp16); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp1107; fftw_real tmp1108; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; tmp19 = tmp7 + tmp18; tmp791 = tmp7 - tmp18; tmp1107 = tmp1045 - tmp1044; tmp1108 = tmp12 - tmp17; tmp1109 = tmp1107 - tmp1108; tmp1139 = tmp1108 + tmp1107; } { fftw_real tmp1043; fftw_real tmp1046; fftw_real tmp379; fftw_real tmp382; ASSERT_ALIGNED_DOUBLE; tmp1043 = tmp380 + tmp381; tmp1046 = tmp1044 + tmp1045; tmp1047 = tmp1043 + tmp1046; tmp1077 = tmp1046 - tmp1043; tmp379 = tmp1 - tmp6; tmp382 = tmp380 - tmp381; tmp383 = tmp379 - tmp382; tmp655 = tmp379 + tmp382; } } { fftw_real tmp54; fftw_real tmp401; fftw_real tmp398; fftw_real tmp796; fftw_real tmp65; fftw_real tmp399; fftw_real tmp404; fftw_real tmp797; fftw_real tmp798; fftw_real tmp799; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp48; fftw_real tmp396; fftw_real tmp53; fftw_real tmp397; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[4 * iostride]); tmp47 = c_im(inout[4 * iostride]); tmp44 = c_re(W[3]); tmp46 = c_im(W[3]); tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47); tmp396 = (tmp46 * tmp45) + (tmp44 * tmp47); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[36 * iostride]); tmp52 = c_im(inout[36 * iostride]); tmp49 = c_re(W[35]); tmp51 = c_im(W[35]); tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52); tmp397 = (tmp51 * tmp50) + (tmp49 * tmp52); } tmp54 = tmp48 + tmp53; tmp401 = tmp48 - tmp53; tmp398 = tmp396 - tmp397; tmp796 = tmp396 + tmp397; } { fftw_real tmp59; fftw_real tmp402; fftw_real tmp64; fftw_real tmp403; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[20 * iostride]); tmp58 = c_im(inout[20 * iostride]); tmp55 = c_re(W[19]); tmp57 = c_im(W[19]); tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58); tmp402 = (tmp57 * tmp56) + (tmp55 * tmp58); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[52 * iostride]); tmp63 = c_im(inout[52 * iostride]); tmp60 = c_re(W[51]); tmp62 = c_im(W[51]); tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63); tmp403 = (tmp62 * tmp61) + (tmp60 * tmp63); } tmp65 = tmp59 + tmp64; tmp399 = tmp59 - tmp64; tmp404 = tmp402 - tmp403; tmp797 = tmp402 + tmp403; } tmp66 = tmp54 + tmp65; tmp798 = tmp796 - tmp797; tmp799 = tmp54 - tmp65; tmp800 = tmp798 - tmp799; tmp908 = tmp799 + tmp798; tmp956 = tmp796 + tmp797; { fftw_real tmp400; fftw_real tmp405; fftw_real tmp660; fftw_real tmp661; ASSERT_ALIGNED_DOUBLE; tmp400 = tmp398 + tmp399; tmp405 = tmp401 - tmp404; tmp406 = (K382683432 * tmp400) - (K923879532 * tmp405); tmp608 = (K923879532 * tmp400) + (K382683432 * tmp405); tmp660 = tmp398 - tmp399; tmp661 = tmp401 + tmp404; tmp662 = (K923879532 * tmp660) - (K382683432 * tmp661); tmp744 = (K382683432 * tmp660) + (K923879532 * tmp661); } } { fftw_real tmp24; fftw_real tmp384; fftw_real tmp29; fftw_real tmp385; fftw_real tmp386; fftw_real tmp387; fftw_real tmp35; fftw_real tmp390; fftw_real tmp40; fftw_real tmp391; fftw_real tmp389; fftw_real tmp392; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[8 * iostride]); tmp23 = c_im(inout[8 * iostride]); tmp20 = c_re(W[7]); tmp22 = c_im(W[7]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp384 = (tmp22 * tmp21) + (tmp20 * tmp23); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[40 * iostride]); tmp28 = c_im(inout[40 * iostride]); tmp25 = c_re(W[39]); tmp27 = c_im(W[39]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp385 = (tmp27 * tmp26) + (tmp25 * tmp28); } tmp386 = tmp384 - tmp385; tmp387 = tmp24 - tmp29; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[56 * iostride]); tmp34 = c_im(inout[56 * iostride]); tmp31 = c_re(W[55]); tmp33 = c_im(W[55]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp390 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[24 * iostride]); tmp39 = c_im(inout[24 * iostride]); tmp36 = c_re(W[23]); tmp38 = c_im(W[23]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp391 = (tmp38 * tmp37) + (tmp36 * tmp39); } tmp389 = tmp35 - tmp40; tmp392 = tmp390 - tmp391; { fftw_real tmp30; fftw_real tmp41; fftw_real tmp792; fftw_real tmp793; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp24 + tmp29; tmp41 = tmp35 + tmp40; tmp42 = tmp30 + tmp41; tmp1076 = tmp41 - tmp30; tmp792 = tmp384 + tmp385; tmp793 = tmp390 + tmp391; tmp794 = tmp792 - tmp793; tmp1042 = tmp792 + tmp793; } { fftw_real tmp388; fftw_real tmp393; fftw_real tmp656; fftw_real tmp657; ASSERT_ALIGNED_DOUBLE; tmp388 = tmp386 - tmp387; tmp393 = tmp389 + tmp392; tmp394 = K707106781 * (tmp388 - tmp393); tmp1106 = K707106781 * (tmp388 + tmp393); tmp656 = tmp387 + tmp386; tmp657 = tmp389 - tmp392; tmp658 = K707106781 * (tmp656 + tmp657); tmp1138 = K707106781 * (tmp657 - tmp656); } } { fftw_real tmp287; fftw_real tmp572; fftw_real tmp292; fftw_real tmp573; fftw_real tmp293; fftw_real tmp876; fftw_real tmp327; fftw_real tmp541; fftw_real tmp544; fftw_real tmp861; fftw_real tmp298; fftw_real tmp532; fftw_real tmp303; fftw_real tmp533; fftw_real tmp304; fftw_real tmp877; fftw_real tmp316; fftw_real tmp539; fftw_real tmp538; fftw_real tmp860; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp284; fftw_real tmp286; fftw_real tmp283; fftw_real tmp285; ASSERT_ALIGNED_DOUBLE; tmp284 = c_re(inout[63 * iostride]); tmp286 = c_im(inout[63 * iostride]); tmp283 = c_re(W[62]); tmp285 = c_im(W[62]); tmp287 = (tmp283 * tmp284) - (tmp285 * tmp286); tmp572 = (tmp285 * tmp284) + (tmp283 * tmp286); } { fftw_real tmp289; fftw_real tmp291; fftw_real tmp288; fftw_real tmp290; ASSERT_ALIGNED_DOUBLE; tmp289 = c_re(inout[31 * iostride]); tmp291 = c_im(inout[31 * iostride]); tmp288 = c_re(W[30]); tmp290 = c_im(W[30]); tmp292 = (tmp288 * tmp289) - (tmp290 * tmp291); tmp573 = (tmp290 * tmp289) + (tmp288 * tmp291); } tmp293 = tmp287 + tmp292; tmp876 = tmp572 + tmp573; { fftw_real tmp321; fftw_real tmp542; fftw_real tmp326; fftw_real tmp543; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp318; fftw_real tmp320; fftw_real tmp317; fftw_real tmp319; ASSERT_ALIGNED_DOUBLE; tmp318 = c_re(inout[55 * iostride]); tmp320 = c_im(inout[55 * iostride]); tmp317 = c_re(W[54]); tmp319 = c_im(W[54]); tmp321 = (tmp317 * tmp318) - (tmp319 * tmp320); tmp542 = (tmp319 * tmp318) + (tmp317 * tmp320); } { fftw_real tmp323; fftw_real tmp325; fftw_real tmp322; fftw_real tmp324; ASSERT_ALIGNED_DOUBLE; tmp323 = c_re(inout[23 * iostride]); tmp325 = c_im(inout[23 * iostride]); tmp322 = c_re(W[22]); tmp324 = c_im(W[22]); tmp326 = (tmp322 * tmp323) - (tmp324 * tmp325); tmp543 = (tmp324 * tmp323) + (tmp322 * tmp325); } tmp327 = tmp321 + tmp326; tmp541 = tmp321 - tmp326; tmp544 = tmp542 - tmp543; tmp861 = tmp542 + tmp543; } { fftw_real tmp295; fftw_real tmp297; fftw_real tmp294; fftw_real tmp296; ASSERT_ALIGNED_DOUBLE; tmp295 = c_re(inout[15 * iostride]); tmp297 = c_im(inout[15 * iostride]); tmp294 = c_re(W[14]); tmp296 = c_im(W[14]); tmp298 = (tmp294 * tmp295) - (tmp296 * tmp297); tmp532 = (tmp296 * tmp295) + (tmp294 * tmp297); } { fftw_real tmp300; fftw_real tmp302; fftw_real tmp299; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; tmp300 = c_re(inout[47 * iostride]); tmp302 = c_im(inout[47 * iostride]); tmp299 = c_re(W[46]); tmp301 = c_im(W[46]); tmp303 = (tmp299 * tmp300) - (tmp301 * tmp302); tmp533 = (tmp301 * tmp300) + (tmp299 * tmp302); } tmp304 = tmp298 + tmp303; tmp877 = tmp532 + tmp533; { fftw_real tmp310; fftw_real tmp536; fftw_real tmp315; fftw_real tmp537; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp307; fftw_real tmp309; fftw_real tmp306; fftw_real tmp308; ASSERT_ALIGNED_DOUBLE; tmp307 = c_re(inout[7 * iostride]); tmp309 = c_im(inout[7 * iostride]); tmp306 = c_re(W[6]); tmp308 = c_im(W[6]); tmp310 = (tmp306 * tmp307) - (tmp308 * tmp309); tmp536 = (tmp308 * tmp307) + (tmp306 * tmp309); } { fftw_real tmp312; fftw_real tmp314; fftw_real tmp311; fftw_real tmp313; ASSERT_ALIGNED_DOUBLE; tmp312 = c_re(inout[39 * iostride]); tmp314 = c_im(inout[39 * iostride]); tmp311 = c_re(W[38]); tmp313 = c_im(W[38]); tmp315 = (tmp311 * tmp312) - (tmp313 * tmp314); tmp537 = (tmp313 * tmp312) + (tmp311 * tmp314); } tmp316 = tmp310 + tmp315; tmp539 = tmp310 - tmp315; tmp538 = tmp536 - tmp537; tmp860 = tmp536 + tmp537; } { fftw_real tmp305; fftw_real tmp328; fftw_real tmp859; fftw_real tmp862; ASSERT_ALIGNED_DOUBLE; tmp305 = tmp293 + tmp304; tmp328 = tmp316 + tmp327; tmp329 = tmp305 + tmp328; tmp983 = tmp305 - tmp328; tmp859 = tmp293 - tmp304; tmp862 = tmp860 - tmp861; tmp863 = tmp859 - tmp862; tmp927 = tmp859 + tmp862; } { fftw_real tmp988; fftw_real tmp989; fftw_real tmp878; fftw_real tmp879; ASSERT_ALIGNED_DOUBLE; tmp988 = tmp876 + tmp877; tmp989 = tmp860 + tmp861; tmp990 = tmp988 - tmp989; tmp1026 = tmp988 + tmp989; tmp878 = tmp876 - tmp877; tmp879 = tmp327 - tmp316; tmp880 = tmp878 - tmp879; tmp930 = tmp878 + tmp879; } { fftw_real tmp531; fftw_real tmp534; fftw_real tmp574; fftw_real tmp575; ASSERT_ALIGNED_DOUBLE; tmp531 = tmp287 - tmp292; tmp534 = tmp532 - tmp533; tmp535 = tmp531 - tmp534; tmp703 = tmp531 + tmp534; tmp574 = tmp572 - tmp573; tmp575 = tmp298 - tmp303; tmp576 = tmp574 + tmp575; tmp714 = tmp574 - tmp575; } { fftw_real tmp577; fftw_real tmp578; fftw_real tmp540; fftw_real tmp545; ASSERT_ALIGNED_DOUBLE; tmp577 = tmp541 - tmp544; tmp578 = tmp539 + tmp538; tmp579 = K707106781 * (tmp577 - tmp578); tmp704 = K707106781 * (tmp578 + tmp577); tmp540 = tmp538 - tmp539; tmp545 = tmp541 + tmp544; tmp546 = K707106781 * (tmp540 - tmp545); tmp715 = K707106781 * (tmp540 + tmp545); } } { fftw_real tmp340; fftw_real tmp553; fftw_real tmp550; fftw_real tmp864; fftw_real tmp374; fftw_real tmp562; fftw_real tmp567; fftw_real tmp871; fftw_real tmp351; fftw_real tmp551; fftw_real tmp556; fftw_real tmp865; fftw_real tmp363; fftw_real tmp564; fftw_real tmp561; fftw_real tmp870; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp334; fftw_real tmp548; fftw_real tmp339; fftw_real tmp549; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp331; fftw_real tmp333; fftw_real tmp330; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp331 = c_re(inout[3 * iostride]); tmp333 = c_im(inout[3 * iostride]); tmp330 = c_re(W[2]); tmp332 = c_im(W[2]); tmp334 = (tmp330 * tmp331) - (tmp332 * tmp333); tmp548 = (tmp332 * tmp331) + (tmp330 * tmp333); } { fftw_real tmp336; fftw_real tmp338; fftw_real tmp335; fftw_real tmp337; ASSERT_ALIGNED_DOUBLE; tmp336 = c_re(inout[35 * iostride]); tmp338 = c_im(inout[35 * iostride]); tmp335 = c_re(W[34]); tmp337 = c_im(W[34]); tmp339 = (tmp335 * tmp336) - (tmp337 * tmp338); tmp549 = (tmp337 * tmp336) + (tmp335 * tmp338); } tmp340 = tmp334 + tmp339; tmp553 = tmp334 - tmp339; tmp550 = tmp548 - tmp549; tmp864 = tmp548 + tmp549; } { fftw_real tmp368; fftw_real tmp565; fftw_real tmp373; fftw_real tmp566; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp365; fftw_real tmp367; fftw_real tmp364; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp365 = c_re(inout[11 * iostride]); tmp367 = c_im(inout[11 * iostride]); tmp364 = c_re(W[10]); tmp366 = c_im(W[10]); tmp368 = (tmp364 * tmp365) - (tmp366 * tmp367); tmp565 = (tmp366 * tmp365) + (tmp364 * tmp367); } { fftw_real tmp370; fftw_real tmp372; fftw_real tmp369; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; tmp370 = c_re(inout[43 * iostride]); tmp372 = c_im(inout[43 * iostride]); tmp369 = c_re(W[42]); tmp371 = c_im(W[42]); tmp373 = (tmp369 * tmp370) - (tmp371 * tmp372); tmp566 = (tmp371 * tmp370) + (tmp369 * tmp372); } tmp374 = tmp368 + tmp373; tmp562 = tmp368 - tmp373; tmp567 = tmp565 - tmp566; tmp871 = tmp565 + tmp566; } { fftw_real tmp345; fftw_real tmp554; fftw_real tmp350; fftw_real tmp555; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp342; fftw_real tmp344; fftw_real tmp341; fftw_real tmp343; ASSERT_ALIGNED_DOUBLE; tmp342 = c_re(inout[19 * iostride]); tmp344 = c_im(inout[19 * iostride]); tmp341 = c_re(W[18]); tmp343 = c_im(W[18]); tmp345 = (tmp341 * tmp342) - (tmp343 * tmp344); tmp554 = (tmp343 * tmp342) + (tmp341 * tmp344); } { fftw_real tmp347; fftw_real tmp349; fftw_real tmp346; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; tmp347 = c_re(inout[51 * iostride]); tmp349 = c_im(inout[51 * iostride]); tmp346 = c_re(W[50]); tmp348 = c_im(W[50]); tmp350 = (tmp346 * tmp347) - (tmp348 * tmp349); tmp555 = (tmp348 * tmp347) + (tmp346 * tmp349); } tmp351 = tmp345 + tmp350; tmp551 = tmp345 - tmp350; tmp556 = tmp554 - tmp555; tmp865 = tmp554 + tmp555; } { fftw_real tmp357; fftw_real tmp559; fftw_real tmp362; fftw_real tmp560; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp354; fftw_real tmp356; fftw_real tmp353; fftw_real tmp355; ASSERT_ALIGNED_DOUBLE; tmp354 = c_re(inout[59 * iostride]); tmp356 = c_im(inout[59 * iostride]); tmp353 = c_re(W[58]); tmp355 = c_im(W[58]); tmp357 = (tmp353 * tmp354) - (tmp355 * tmp356); tmp559 = (tmp355 * tmp354) + (tmp353 * tmp356); } { fftw_real tmp359; fftw_real tmp361; fftw_real tmp358; fftw_real tmp360; ASSERT_ALIGNED_DOUBLE; tmp359 = c_re(inout[27 * iostride]); tmp361 = c_im(inout[27 * iostride]); tmp358 = c_re(W[26]); tmp360 = c_im(W[26]); tmp362 = (tmp358 * tmp359) - (tmp360 * tmp361); tmp560 = (tmp360 * tmp359) + (tmp358 * tmp361); } tmp363 = tmp357 + tmp362; tmp564 = tmp357 - tmp362; tmp561 = tmp559 - tmp560; tmp870 = tmp559 + tmp560; } { fftw_real tmp352; fftw_real tmp375; fftw_real tmp866; fftw_real tmp867; ASSERT_ALIGNED_DOUBLE; tmp352 = tmp340 + tmp351; tmp375 = tmp363 + tmp374; tmp376 = tmp352 + tmp375; tmp991 = tmp375 - tmp352; tmp866 = tmp864 - tmp865; tmp867 = tmp340 - tmp351; tmp868 = tmp866 - tmp867; tmp882 = tmp867 + tmp866; } { fftw_real tmp984; fftw_real tmp985; fftw_real tmp869; fftw_real tmp872; ASSERT_ALIGNED_DOUBLE; tmp984 = tmp864 + tmp865; tmp985 = tmp870 + tmp871; tmp986 = tmp984 - tmp985; tmp1027 = tmp984 + tmp985; tmp869 = tmp363 - tmp374; tmp872 = tmp870 - tmp871; tmp873 = tmp869 + tmp872; tmp881 = tmp869 - tmp872; } { fftw_real tmp552; fftw_real tmp557; fftw_real tmp706; fftw_real tmp707; ASSERT_ALIGNED_DOUBLE; tmp552 = tmp550 + tmp551; tmp557 = tmp553 - tmp556; tmp558 = (K382683432 * tmp552) - (K923879532 * tmp557); tmp582 = (K923879532 * tmp552) + (K382683432 * tmp557); tmp706 = tmp550 - tmp551; tmp707 = tmp553 + tmp556; tmp708 = (K923879532 * tmp706) - (K382683432 * tmp707); tmp718 = (K382683432 * tmp706) + (K923879532 * tmp707); } { fftw_real tmp563; fftw_real tmp568; fftw_real tmp709; fftw_real tmp710; ASSERT_ALIGNED_DOUBLE; tmp563 = tmp561 + tmp562; tmp568 = tmp564 - tmp567; tmp569 = (K382683432 * tmp563) + (K923879532 * tmp568); tmp581 = (K382683432 * tmp568) - (K923879532 * tmp563); tmp709 = tmp561 - tmp562; tmp710 = tmp564 + tmp567; tmp711 = (K923879532 * tmp709) + (K382683432 * tmp710); tmp717 = (K923879532 * tmp710) - (K382683432 * tmp709); } } { fftw_real tmp77; fftw_real tmp412; fftw_real tmp409; fftw_real tmp802; fftw_real tmp88; fftw_real tmp410; fftw_real tmp415; fftw_real tmp803; fftw_real tmp801; fftw_real tmp804; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp71; fftw_real tmp407; fftw_real tmp76; fftw_real tmp408; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[60 * iostride]); tmp70 = c_im(inout[60 * iostride]); tmp67 = c_re(W[59]); tmp69 = c_im(W[59]); tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70); tmp407 = (tmp69 * tmp68) + (tmp67 * tmp70); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[28 * iostride]); tmp75 = c_im(inout[28 * iostride]); tmp72 = c_re(W[27]); tmp74 = c_im(W[27]); tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); tmp408 = (tmp74 * tmp73) + (tmp72 * tmp75); } tmp77 = tmp71 + tmp76; tmp412 = tmp71 - tmp76; tmp409 = tmp407 - tmp408; tmp802 = tmp407 + tmp408; } { fftw_real tmp82; fftw_real tmp413; fftw_real tmp87; fftw_real tmp414; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[12 * iostride]); tmp81 = c_im(inout[12 * iostride]); tmp78 = c_re(W[11]); tmp80 = c_im(W[11]); tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); tmp413 = (tmp80 * tmp79) + (tmp78 * tmp81); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[44 * iostride]); tmp86 = c_im(inout[44 * iostride]); tmp83 = c_re(W[43]); tmp85 = c_im(W[43]); tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); tmp414 = (tmp85 * tmp84) + (tmp83 * tmp86); } tmp88 = tmp82 + tmp87; tmp410 = tmp82 - tmp87; tmp415 = tmp413 - tmp414; tmp803 = tmp413 + tmp414; } tmp89 = tmp77 + tmp88; tmp801 = tmp77 - tmp88; tmp804 = tmp802 - tmp803; tmp805 = tmp801 + tmp804; tmp909 = tmp801 - tmp804; tmp957 = tmp802 + tmp803; { fftw_real tmp411; fftw_real tmp416; fftw_real tmp663; fftw_real tmp664; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp409 + tmp410; tmp416 = tmp412 - tmp415; tmp417 = (K382683432 * tmp411) + (K923879532 * tmp416); tmp609 = (K382683432 * tmp416) - (K923879532 * tmp411); tmp663 = tmp409 - tmp410; tmp664 = tmp412 + tmp415; tmp665 = (K923879532 * tmp663) + (K382683432 * tmp664); tmp745 = (K923879532 * tmp664) - (K382683432 * tmp663); } } { fftw_real tmp143; fftw_real tmp447; fftw_real tmp148; fftw_real tmp448; fftw_real tmp149; fftw_real tmp819; fftw_real tmp183; fftw_real tmp452; fftw_real tmp455; fftw_real tmp826; fftw_real tmp154; fftw_real tmp465; fftw_real tmp159; fftw_real tmp466; fftw_real tmp160; fftw_real tmp820; fftw_real tmp172; fftw_real tmp457; fftw_real tmp460; fftw_real tmp825; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp140; fftw_real tmp142; fftw_real tmp139; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp140 = c_re(inout[62 * iostride]); tmp142 = c_im(inout[62 * iostride]); tmp139 = c_re(W[61]); tmp141 = c_im(W[61]); tmp143 = (tmp139 * tmp140) - (tmp141 * tmp142); tmp447 = (tmp141 * tmp140) + (tmp139 * tmp142); } { fftw_real tmp145; fftw_real tmp147; fftw_real tmp144; fftw_real tmp146; ASSERT_ALIGNED_DOUBLE; tmp145 = c_re(inout[30 * iostride]); tmp147 = c_im(inout[30 * iostride]); tmp144 = c_re(W[29]); tmp146 = c_im(W[29]); tmp148 = (tmp144 * tmp145) - (tmp146 * tmp147); tmp448 = (tmp146 * tmp145) + (tmp144 * tmp147); } tmp149 = tmp143 + tmp148; tmp819 = tmp447 + tmp448; { fftw_real tmp177; fftw_real tmp453; fftw_real tmp182; fftw_real tmp454; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp174; fftw_real tmp176; fftw_real tmp173; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; tmp174 = c_re(inout[54 * iostride]); tmp176 = c_im(inout[54 * iostride]); tmp173 = c_re(W[53]); tmp175 = c_im(W[53]); tmp177 = (tmp173 * tmp174) - (tmp175 * tmp176); tmp453 = (tmp175 * tmp174) + (tmp173 * tmp176); } { fftw_real tmp179; fftw_real tmp181; fftw_real tmp178; fftw_real tmp180; ASSERT_ALIGNED_DOUBLE; tmp179 = c_re(inout[22 * iostride]); tmp181 = c_im(inout[22 * iostride]); tmp178 = c_re(W[21]); tmp180 = c_im(W[21]); tmp182 = (tmp178 * tmp179) - (tmp180 * tmp181); tmp454 = (tmp180 * tmp179) + (tmp178 * tmp181); } tmp183 = tmp177 + tmp182; tmp452 = tmp177 - tmp182; tmp455 = tmp453 - tmp454; tmp826 = tmp453 + tmp454; } { fftw_real tmp151; fftw_real tmp153; fftw_real tmp150; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp151 = c_re(inout[14 * iostride]); tmp153 = c_im(inout[14 * iostride]); tmp150 = c_re(W[13]); tmp152 = c_im(W[13]); tmp154 = (tmp150 * tmp151) - (tmp152 * tmp153); tmp465 = (tmp152 * tmp151) + (tmp150 * tmp153); } { fftw_real tmp156; fftw_real tmp158; fftw_real tmp155; fftw_real tmp157; ASSERT_ALIGNED_DOUBLE; tmp156 = c_re(inout[46 * iostride]); tmp158 = c_im(inout[46 * iostride]); tmp155 = c_re(W[45]); tmp157 = c_im(W[45]); tmp159 = (tmp155 * tmp156) - (tmp157 * tmp158); tmp466 = (tmp157 * tmp156) + (tmp155 * tmp158); } tmp160 = tmp154 + tmp159; tmp820 = tmp465 + tmp466; { fftw_real tmp166; fftw_real tmp458; fftw_real tmp171; fftw_real tmp459; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp163; fftw_real tmp165; fftw_real tmp162; fftw_real tmp164; ASSERT_ALIGNED_DOUBLE; tmp163 = c_re(inout[6 * iostride]); tmp165 = c_im(inout[6 * iostride]); tmp162 = c_re(W[5]); tmp164 = c_im(W[5]); tmp166 = (tmp162 * tmp163) - (tmp164 * tmp165); tmp458 = (tmp164 * tmp163) + (tmp162 * tmp165); } { fftw_real tmp168; fftw_real tmp170; fftw_real tmp167; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp168 = c_re(inout[38 * iostride]); tmp170 = c_im(inout[38 * iostride]); tmp167 = c_re(W[37]); tmp169 = c_im(W[37]); tmp171 = (tmp167 * tmp168) - (tmp169 * tmp170); tmp459 = (tmp169 * tmp168) + (tmp167 * tmp170); } tmp172 = tmp166 + tmp171; tmp457 = tmp166 - tmp171; tmp460 = tmp458 - tmp459; tmp825 = tmp458 + tmp459; } { fftw_real tmp821; fftw_real tmp822; fftw_real tmp824; fftw_real tmp827; ASSERT_ALIGNED_DOUBLE; tmp161 = tmp149 + tmp160; tmp184 = tmp172 + tmp183; tmp965 = tmp161 - tmp184; tmp821 = tmp819 - tmp820; tmp822 = tmp183 - tmp172; tmp823 = tmp821 - tmp822; tmp915 = tmp821 + tmp822; tmp966 = tmp819 + tmp820; tmp967 = tmp825 + tmp826; tmp968 = tmp966 - tmp967; tmp824 = tmp149 - tmp160; tmp827 = tmp825 - tmp826; tmp828 = tmp824 - tmp827; tmp916 = tmp824 + tmp827; } { fftw_real tmp449; fftw_real tmp450; fftw_real tmp464; fftw_real tmp467; ASSERT_ALIGNED_DOUBLE; tmp449 = tmp447 - tmp448; tmp450 = tmp154 - tmp159; tmp451 = tmp449 + tmp450; tmp678 = tmp449 - tmp450; tmp464 = tmp143 - tmp148; tmp467 = tmp465 - tmp466; tmp468 = tmp464 - tmp467; tmp675 = tmp464 + tmp467; } { fftw_real tmp469; fftw_real tmp470; fftw_real tmp456; fftw_real tmp461; ASSERT_ALIGNED_DOUBLE; tmp469 = tmp460 - tmp457; tmp470 = tmp452 + tmp455; tmp471 = K707106781 * (tmp469 - tmp470); tmp679 = K707106781 * (tmp469 + tmp470); tmp456 = tmp452 - tmp455; tmp461 = tmp457 + tmp460; tmp462 = K707106781 * (tmp456 - tmp461); tmp676 = K707106781 * (tmp461 + tmp456); } } { fftw_real tmp96; fftw_real tmp420; fftw_real tmp101; fftw_real tmp421; fftw_real tmp102; fftw_real tmp808; fftw_real tmp136; fftw_real tmp425; fftw_real tmp428; fftw_real tmp815; fftw_real tmp107; fftw_real tmp438; fftw_real tmp112; fftw_real tmp439; fftw_real tmp113; fftw_real tmp809; fftw_real tmp125; fftw_real tmp430; fftw_real tmp433; fftw_real tmp814; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp93; fftw_real tmp95; fftw_real tmp92; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; tmp93 = c_re(inout[2 * iostride]); tmp95 = c_im(inout[2 * iostride]); tmp92 = c_re(W[1]); tmp94 = c_im(W[1]); tmp96 = (tmp92 * tmp93) - (tmp94 * tmp95); tmp420 = (tmp94 * tmp93) + (tmp92 * tmp95); } { fftw_real tmp98; fftw_real tmp100; fftw_real tmp97; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = c_re(inout[34 * iostride]); tmp100 = c_im(inout[34 * iostride]); tmp97 = c_re(W[33]); tmp99 = c_im(W[33]); tmp101 = (tmp97 * tmp98) - (tmp99 * tmp100); tmp421 = (tmp99 * tmp98) + (tmp97 * tmp100); } tmp102 = tmp96 + tmp101; tmp808 = tmp420 + tmp421; { fftw_real tmp130; fftw_real tmp426; fftw_real tmp135; fftw_real tmp427; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp127; fftw_real tmp129; fftw_real tmp126; fftw_real tmp128; ASSERT_ALIGNED_DOUBLE; tmp127 = c_re(inout[58 * iostride]); tmp129 = c_im(inout[58 * iostride]); tmp126 = c_re(W[57]); tmp128 = c_im(W[57]); tmp130 = (tmp126 * tmp127) - (tmp128 * tmp129); tmp426 = (tmp128 * tmp127) + (tmp126 * tmp129); } { fftw_real tmp132; fftw_real tmp134; fftw_real tmp131; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp132 = c_re(inout[26 * iostride]); tmp134 = c_im(inout[26 * iostride]); tmp131 = c_re(W[25]); tmp133 = c_im(W[25]); tmp135 = (tmp131 * tmp132) - (tmp133 * tmp134); tmp427 = (tmp133 * tmp132) + (tmp131 * tmp134); } tmp136 = tmp130 + tmp135; tmp425 = tmp130 - tmp135; tmp428 = tmp426 - tmp427; tmp815 = tmp426 + tmp427; } { fftw_real tmp104; fftw_real tmp106; fftw_real tmp103; fftw_real tmp105; ASSERT_ALIGNED_DOUBLE; tmp104 = c_re(inout[18 * iostride]); tmp106 = c_im(inout[18 * iostride]); tmp103 = c_re(W[17]); tmp105 = c_im(W[17]); tmp107 = (tmp103 * tmp104) - (tmp105 * tmp106); tmp438 = (tmp105 * tmp104) + (tmp103 * tmp106); } { fftw_real tmp109; fftw_real tmp111; fftw_real tmp108; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp109 = c_re(inout[50 * iostride]); tmp111 = c_im(inout[50 * iostride]); tmp108 = c_re(W[49]); tmp110 = c_im(W[49]); tmp112 = (tmp108 * tmp109) - (tmp110 * tmp111); tmp439 = (tmp110 * tmp109) + (tmp108 * tmp111); } tmp113 = tmp107 + tmp112; tmp809 = tmp438 + tmp439; { fftw_real tmp119; fftw_real tmp431; fftw_real tmp124; fftw_real tmp432; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp116; fftw_real tmp118; fftw_real tmp115; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp116 = c_re(inout[10 * iostride]); tmp118 = c_im(inout[10 * iostride]); tmp115 = c_re(W[9]); tmp117 = c_im(W[9]); tmp119 = (tmp115 * tmp116) - (tmp117 * tmp118); tmp431 = (tmp117 * tmp116) + (tmp115 * tmp118); } { fftw_real tmp121; fftw_real tmp123; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp121 = c_re(inout[42 * iostride]); tmp123 = c_im(inout[42 * iostride]); tmp120 = c_re(W[41]); tmp122 = c_im(W[41]); tmp124 = (tmp120 * tmp121) - (tmp122 * tmp123); tmp432 = (tmp122 * tmp121) + (tmp120 * tmp123); } tmp125 = tmp119 + tmp124; tmp430 = tmp119 - tmp124; tmp433 = tmp431 - tmp432; tmp814 = tmp431 + tmp432; } { fftw_real tmp810; fftw_real tmp811; fftw_real tmp813; fftw_real tmp816; ASSERT_ALIGNED_DOUBLE; tmp114 = tmp102 + tmp113; tmp137 = tmp125 + tmp136; tmp963 = tmp114 - tmp137; tmp810 = tmp808 - tmp809; tmp811 = tmp136 - tmp125; tmp812 = tmp810 - tmp811; tmp912 = tmp810 + tmp811; tmp960 = tmp808 + tmp809; tmp961 = tmp814 + tmp815; tmp962 = tmp960 - tmp961; tmp813 = tmp102 - tmp113; tmp816 = tmp814 - tmp815; tmp817 = tmp813 - tmp816; tmp913 = tmp813 + tmp816; } { fftw_real tmp422; fftw_real tmp423; fftw_real tmp437; fftw_real tmp440; ASSERT_ALIGNED_DOUBLE; tmp422 = tmp420 - tmp421; tmp423 = tmp107 - tmp112; tmp424 = tmp422 + tmp423; tmp668 = tmp422 - tmp423; tmp437 = tmp96 - tmp101; tmp440 = tmp438 - tmp439; tmp441 = tmp437 - tmp440; tmp671 = tmp437 + tmp440; } { fftw_real tmp442; fftw_real tmp443; fftw_real tmp429; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp442 = tmp433 - tmp430; tmp443 = tmp425 + tmp428; tmp444 = K707106781 * (tmp442 - tmp443); tmp669 = K707106781 * (tmp442 + tmp443); tmp429 = tmp425 - tmp428; tmp434 = tmp430 + tmp433; tmp435 = K707106781 * (tmp429 - tmp434); tmp672 = K707106781 * (tmp434 + tmp429); } } { fftw_real tmp192; fftw_real tmp476; fftw_real tmp197; fftw_real tmp477; fftw_real tmp198; fftw_real tmp832; fftw_real tmp232; fftw_real tmp481; fftw_real tmp484; fftw_real tmp851; fftw_real tmp203; fftw_real tmp518; fftw_real tmp208; fftw_real tmp519; fftw_real tmp209; fftw_real tmp833; fftw_real tmp221; fftw_real tmp486; fftw_real tmp489; fftw_real tmp850; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp189; fftw_real tmp191; fftw_real tmp188; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; tmp189 = c_re(inout[iostride]); tmp191 = c_im(inout[iostride]); tmp188 = c_re(W[0]); tmp190 = c_im(W[0]); tmp192 = (tmp188 * tmp189) - (tmp190 * tmp191); tmp476 = (tmp190 * tmp189) + (tmp188 * tmp191); } { fftw_real tmp194; fftw_real tmp196; fftw_real tmp193; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp194 = c_re(inout[33 * iostride]); tmp196 = c_im(inout[33 * iostride]); tmp193 = c_re(W[32]); tmp195 = c_im(W[32]); tmp197 = (tmp193 * tmp194) - (tmp195 * tmp196); tmp477 = (tmp195 * tmp194) + (tmp193 * tmp196); } tmp198 = tmp192 + tmp197; tmp832 = tmp476 + tmp477; { fftw_real tmp226; fftw_real tmp482; fftw_real tmp231; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp223; fftw_real tmp225; fftw_real tmp222; fftw_real tmp224; ASSERT_ALIGNED_DOUBLE; tmp223 = c_re(inout[57 * iostride]); tmp225 = c_im(inout[57 * iostride]); tmp222 = c_re(W[56]); tmp224 = c_im(W[56]); tmp226 = (tmp222 * tmp223) - (tmp224 * tmp225); tmp482 = (tmp224 * tmp223) + (tmp222 * tmp225); } { fftw_real tmp228; fftw_real tmp230; fftw_real tmp227; fftw_real tmp229; ASSERT_ALIGNED_DOUBLE; tmp228 = c_re(inout[25 * iostride]); tmp230 = c_im(inout[25 * iostride]); tmp227 = c_re(W[24]); tmp229 = c_im(W[24]); tmp231 = (tmp227 * tmp228) - (tmp229 * tmp230); tmp483 = (tmp229 * tmp228) + (tmp227 * tmp230); } tmp232 = tmp226 + tmp231; tmp481 = tmp226 - tmp231; tmp484 = tmp482 - tmp483; tmp851 = tmp482 + tmp483; } { fftw_real tmp200; fftw_real tmp202; fftw_real tmp199; fftw_real tmp201; ASSERT_ALIGNED_DOUBLE; tmp200 = c_re(inout[17 * iostride]); tmp202 = c_im(inout[17 * iostride]); tmp199 = c_re(W[16]); tmp201 = c_im(W[16]); tmp203 = (tmp199 * tmp200) - (tmp201 * tmp202); tmp518 = (tmp201 * tmp200) + (tmp199 * tmp202); } { fftw_real tmp205; fftw_real tmp207; fftw_real tmp204; fftw_real tmp206; ASSERT_ALIGNED_DOUBLE; tmp205 = c_re(inout[49 * iostride]); tmp207 = c_im(inout[49 * iostride]); tmp204 = c_re(W[48]); tmp206 = c_im(W[48]); tmp208 = (tmp204 * tmp205) - (tmp206 * tmp207); tmp519 = (tmp206 * tmp205) + (tmp204 * tmp207); } tmp209 = tmp203 + tmp208; tmp833 = tmp518 + tmp519; { fftw_real tmp215; fftw_real tmp487; fftw_real tmp220; fftw_real tmp488; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp212; fftw_real tmp214; fftw_real tmp211; fftw_real tmp213; ASSERT_ALIGNED_DOUBLE; tmp212 = c_re(inout[9 * iostride]); tmp214 = c_im(inout[9 * iostride]); tmp211 = c_re(W[8]); tmp213 = c_im(W[8]); tmp215 = (tmp211 * tmp212) - (tmp213 * tmp214); tmp487 = (tmp213 * tmp212) + (tmp211 * tmp214); } { fftw_real tmp217; fftw_real tmp219; fftw_real tmp216; fftw_real tmp218; ASSERT_ALIGNED_DOUBLE; tmp217 = c_re(inout[41 * iostride]); tmp219 = c_im(inout[41 * iostride]); tmp216 = c_re(W[40]); tmp218 = c_im(W[40]); tmp220 = (tmp216 * tmp217) - (tmp218 * tmp219); tmp488 = (tmp218 * tmp217) + (tmp216 * tmp219); } tmp221 = tmp215 + tmp220; tmp486 = tmp215 - tmp220; tmp489 = tmp487 - tmp488; tmp850 = tmp487 + tmp488; } { fftw_real tmp210; fftw_real tmp233; fftw_real tmp834; fftw_real tmp835; ASSERT_ALIGNED_DOUBLE; tmp210 = tmp198 + tmp209; tmp233 = tmp221 + tmp232; tmp234 = tmp210 + tmp233; tmp977 = tmp210 - tmp233; tmp834 = tmp832 - tmp833; tmp835 = tmp232 - tmp221; tmp836 = tmp834 - tmp835; tmp923 = tmp834 + tmp835; } { fftw_real tmp972; fftw_real tmp973; fftw_real tmp849; fftw_real tmp852; ASSERT_ALIGNED_DOUBLE; tmp972 = tmp832 + tmp833; tmp973 = tmp850 + tmp851; tmp974 = tmp972 - tmp973; tmp1021 = tmp972 + tmp973; tmp849 = tmp198 - tmp209; tmp852 = tmp850 - tmp851; tmp853 = tmp849 - tmp852; tmp920 = tmp849 + tmp852; } { fftw_real tmp478; fftw_real tmp479; fftw_real tmp517; fftw_real tmp520; ASSERT_ALIGNED_DOUBLE; tmp478 = tmp476 - tmp477; tmp479 = tmp203 - tmp208; tmp480 = tmp478 + tmp479; tmp684 = tmp478 - tmp479; tmp517 = tmp192 - tmp197; tmp520 = tmp518 - tmp519; tmp521 = tmp517 - tmp520; tmp695 = tmp517 + tmp520; } { fftw_real tmp522; fftw_real tmp523; fftw_real tmp485; fftw_real tmp490; ASSERT_ALIGNED_DOUBLE; tmp522 = tmp489 - tmp486; tmp523 = tmp481 + tmp484; tmp524 = K707106781 * (tmp522 - tmp523); tmp685 = K707106781 * (tmp522 + tmp523); tmp485 = tmp481 - tmp484; tmp490 = tmp486 + tmp489; tmp491 = K707106781 * (tmp485 - tmp490); tmp696 = K707106781 * (tmp490 + tmp485); } } { fftw_real tmp245; fftw_real tmp509; fftw_real tmp506; fftw_real tmp843; fftw_real tmp279; fftw_real tmp501; fftw_real tmp496; fftw_real tmp839; fftw_real tmp256; fftw_real tmp507; fftw_real tmp512; fftw_real tmp844; fftw_real tmp268; fftw_real tmp493; fftw_real tmp500; fftw_real tmp838; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp239; fftw_real tmp504; fftw_real tmp244; fftw_real tmp505; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp236; fftw_real tmp238; fftw_real tmp235; fftw_real tmp237; ASSERT_ALIGNED_DOUBLE; tmp236 = c_re(inout[5 * iostride]); tmp238 = c_im(inout[5 * iostride]); tmp235 = c_re(W[4]); tmp237 = c_im(W[4]); tmp239 = (tmp235 * tmp236) - (tmp237 * tmp238); tmp504 = (tmp237 * tmp236) + (tmp235 * tmp238); } { fftw_real tmp241; fftw_real tmp243; fftw_real tmp240; fftw_real tmp242; ASSERT_ALIGNED_DOUBLE; tmp241 = c_re(inout[37 * iostride]); tmp243 = c_im(inout[37 * iostride]); tmp240 = c_re(W[36]); tmp242 = c_im(W[36]); tmp244 = (tmp240 * tmp241) - (tmp242 * tmp243); tmp505 = (tmp242 * tmp241) + (tmp240 * tmp243); } tmp245 = tmp239 + tmp244; tmp509 = tmp239 - tmp244; tmp506 = tmp504 - tmp505; tmp843 = tmp504 + tmp505; } { fftw_real tmp273; fftw_real tmp494; fftw_real tmp278; fftw_real tmp495; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp270; fftw_real tmp272; fftw_real tmp269; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; tmp270 = c_re(inout[13 * iostride]); tmp272 = c_im(inout[13 * iostride]); tmp269 = c_re(W[12]); tmp271 = c_im(W[12]); tmp273 = (tmp269 * tmp270) - (tmp271 * tmp272); tmp494 = (tmp271 * tmp270) + (tmp269 * tmp272); } { fftw_real tmp275; fftw_real tmp277; fftw_real tmp274; fftw_real tmp276; ASSERT_ALIGNED_DOUBLE; tmp275 = c_re(inout[45 * iostride]); tmp277 = c_im(inout[45 * iostride]); tmp274 = c_re(W[44]); tmp276 = c_im(W[44]); tmp278 = (tmp274 * tmp275) - (tmp276 * tmp277); tmp495 = (tmp276 * tmp275) + (tmp274 * tmp277); } tmp279 = tmp273 + tmp278; tmp501 = tmp273 - tmp278; tmp496 = tmp494 - tmp495; tmp839 = tmp494 + tmp495; } { fftw_real tmp250; fftw_real tmp510; fftw_real tmp255; fftw_real tmp511; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp247; fftw_real tmp249; fftw_real tmp246; fftw_real tmp248; ASSERT_ALIGNED_DOUBLE; tmp247 = c_re(inout[21 * iostride]); tmp249 = c_im(inout[21 * iostride]); tmp246 = c_re(W[20]); tmp248 = c_im(W[20]); tmp250 = (tmp246 * tmp247) - (tmp248 * tmp249); tmp510 = (tmp248 * tmp247) + (tmp246 * tmp249); } { fftw_real tmp252; fftw_real tmp254; fftw_real tmp251; fftw_real tmp253; ASSERT_ALIGNED_DOUBLE; tmp252 = c_re(inout[53 * iostride]); tmp254 = c_im(inout[53 * iostride]); tmp251 = c_re(W[52]); tmp253 = c_im(W[52]); tmp255 = (tmp251 * tmp252) - (tmp253 * tmp254); tmp511 = (tmp253 * tmp252) + (tmp251 * tmp254); } tmp256 = tmp250 + tmp255; tmp507 = tmp250 - tmp255; tmp512 = tmp510 - tmp511; tmp844 = tmp510 + tmp511; } { fftw_real tmp262; fftw_real tmp498; fftw_real tmp267; fftw_real tmp499; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp259; fftw_real tmp261; fftw_real tmp258; fftw_real tmp260; ASSERT_ALIGNED_DOUBLE; tmp259 = c_re(inout[61 * iostride]); tmp261 = c_im(inout[61 * iostride]); tmp258 = c_re(W[60]); tmp260 = c_im(W[60]); tmp262 = (tmp258 * tmp259) - (tmp260 * tmp261); tmp498 = (tmp260 * tmp259) + (tmp258 * tmp261); } { fftw_real tmp264; fftw_real tmp266; fftw_real tmp263; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; tmp264 = c_re(inout[29 * iostride]); tmp266 = c_im(inout[29 * iostride]); tmp263 = c_re(W[28]); tmp265 = c_im(W[28]); tmp267 = (tmp263 * tmp264) - (tmp265 * tmp266); tmp499 = (tmp265 * tmp264) + (tmp263 * tmp266); } tmp268 = tmp262 + tmp267; tmp493 = tmp262 - tmp267; tmp500 = tmp498 - tmp499; tmp838 = tmp498 + tmp499; } { fftw_real tmp257; fftw_real tmp280; fftw_real tmp837; fftw_real tmp840; ASSERT_ALIGNED_DOUBLE; tmp257 = tmp245 + tmp256; tmp280 = tmp268 + tmp279; tmp281 = tmp257 + tmp280; tmp975 = tmp280 - tmp257; tmp837 = tmp268 - tmp279; tmp840 = tmp838 - tmp839; tmp841 = tmp837 - tmp840; tmp855 = tmp837 + tmp840; } { fftw_real tmp978; fftw_real tmp979; fftw_real tmp842; fftw_real tmp845; ASSERT_ALIGNED_DOUBLE; tmp978 = tmp843 + tmp844; tmp979 = tmp838 + tmp839; tmp980 = tmp978 - tmp979; tmp1022 = tmp978 + tmp979; tmp842 = tmp245 - tmp256; tmp845 = tmp843 - tmp844; tmp846 = tmp842 + tmp845; tmp854 = tmp845 - tmp842; } { fftw_real tmp497; fftw_real tmp502; fftw_real tmp687; fftw_real tmp688; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp493 - tmp496; tmp502 = tmp500 + tmp501; tmp503 = (K382683432 * tmp497) - (K923879532 * tmp502); tmp527 = (K382683432 * tmp502) + (K923879532 * tmp497); tmp687 = tmp493 + tmp496; tmp688 = tmp500 - tmp501; tmp689 = (K923879532 * tmp687) - (K382683432 * tmp688); tmp699 = (K923879532 * tmp688) + (K382683432 * tmp687); } { fftw_real tmp508; fftw_real tmp513; fftw_real tmp690; fftw_real tmp691; ASSERT_ALIGNED_DOUBLE; tmp508 = tmp506 + tmp507; tmp513 = tmp509 - tmp512; tmp514 = (K923879532 * tmp508) + (K382683432 * tmp513); tmp526 = (K382683432 * tmp508) - (K923879532 * tmp513); tmp690 = tmp506 - tmp507; tmp691 = tmp509 + tmp512; tmp692 = (K382683432 * tmp690) + (K923879532 * tmp691); tmp698 = (K923879532 * tmp690) - (K382683432 * tmp691); } } { fftw_real tmp91; fftw_real tmp1015; fftw_real tmp1038; fftw_real tmp1039; fftw_real tmp1049; fftw_real tmp1055; fftw_real tmp186; fftw_real tmp1054; fftw_real tmp1024; fftw_real tmp1032; fftw_real tmp378; fftw_real tmp1051; fftw_real tmp1029; fftw_real tmp1033; fftw_real tmp1018; fftw_real tmp1040; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp90; fftw_real tmp1036; fftw_real tmp1037; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp19 + tmp42; tmp90 = tmp66 + tmp89; tmp91 = tmp43 + tmp90; tmp1015 = tmp43 - tmp90; tmp1036 = tmp1021 + tmp1022; tmp1037 = tmp1026 + tmp1027; tmp1038 = tmp1036 - tmp1037; tmp1039 = tmp1036 + tmp1037; } { fftw_real tmp1041; fftw_real tmp1048; fftw_real tmp138; fftw_real tmp185; ASSERT_ALIGNED_DOUBLE; tmp1041 = tmp956 + tmp957; tmp1048 = tmp1042 + tmp1047; tmp1049 = tmp1041 + tmp1048; tmp1055 = tmp1048 - tmp1041; tmp138 = tmp114 + tmp137; tmp185 = tmp161 + tmp184; tmp186 = tmp138 + tmp185; tmp1054 = tmp185 - tmp138; } { fftw_real tmp1020; fftw_real tmp1023; fftw_real tmp282; fftw_real tmp377; ASSERT_ALIGNED_DOUBLE; tmp1020 = tmp234 - tmp281; tmp1023 = tmp1021 - tmp1022; tmp1024 = tmp1020 + tmp1023; tmp1032 = tmp1023 - tmp1020; tmp282 = tmp234 + tmp281; tmp377 = tmp329 + tmp376; tmp378 = tmp282 + tmp377; tmp1051 = tmp377 - tmp282; } { fftw_real tmp1025; fftw_real tmp1028; fftw_real tmp1016; fftw_real tmp1017; ASSERT_ALIGNED_DOUBLE; tmp1025 = tmp329 - tmp376; tmp1028 = tmp1026 - tmp1027; tmp1029 = tmp1025 - tmp1028; tmp1033 = tmp1025 + tmp1028; tmp1016 = tmp960 + tmp961; tmp1017 = tmp966 + tmp967; tmp1018 = tmp1016 - tmp1017; tmp1040 = tmp1016 + tmp1017; } { fftw_real tmp187; fftw_real tmp1035; fftw_real tmp1050; fftw_real tmp1052; ASSERT_ALIGNED_DOUBLE; tmp187 = tmp91 + tmp186; c_re(inout[32 * iostride]) = tmp187 - tmp378; c_re(inout[0]) = tmp187 + tmp378; tmp1035 = tmp91 - tmp186; c_re(inout[48 * iostride]) = tmp1035 - tmp1038; c_re(inout[16 * iostride]) = tmp1035 + tmp1038; { fftw_real tmp1019; fftw_real tmp1030; fftw_real tmp1057; fftw_real tmp1058; ASSERT_ALIGNED_DOUBLE; tmp1019 = tmp1015 + tmp1018; tmp1030 = K707106781 * (tmp1024 + tmp1029); c_re(inout[40 * iostride]) = tmp1019 - tmp1030; c_re(inout[8 * iostride]) = tmp1019 + tmp1030; tmp1057 = K707106781 * (tmp1029 - tmp1024); tmp1058 = tmp1055 - tmp1054; c_im(inout[24 * iostride]) = tmp1057 + tmp1058; c_im(inout[56 * iostride]) = tmp1058 - tmp1057; } tmp1050 = tmp1040 + tmp1049; c_im(inout[0]) = tmp1039 + tmp1050; c_im(inout[32 * iostride]) = tmp1050 - tmp1039; tmp1052 = tmp1049 - tmp1040; c_im(inout[16 * iostride]) = tmp1051 + tmp1052; c_im(inout[48 * iostride]) = tmp1052 - tmp1051; { fftw_real tmp1053; fftw_real tmp1056; fftw_real tmp1031; fftw_real tmp1034; ASSERT_ALIGNED_DOUBLE; tmp1053 = K707106781 * (tmp1032 + tmp1033); tmp1056 = tmp1054 + tmp1055; c_im(inout[8 * iostride]) = tmp1053 + tmp1056; c_im(inout[40 * iostride]) = tmp1056 - tmp1053; tmp1031 = tmp1015 - tmp1018; tmp1034 = K707106781 * (tmp1032 - tmp1033); c_re(inout[56 * iostride]) = tmp1031 - tmp1034; c_re(inout[24 * iostride]) = tmp1031 + tmp1034; } } } { fftw_real tmp959; fftw_real tmp999; fftw_real tmp1002; fftw_real tmp1068; fftw_real tmp970; fftw_real tmp1060; fftw_real tmp1063; fftw_real tmp1069; fftw_real tmp982; fftw_real tmp996; fftw_real tmp1006; fftw_real tmp1012; fftw_real tmp993; fftw_real tmp997; fftw_real tmp1009; fftw_real tmp1013; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp955; fftw_real tmp958; fftw_real tmp1000; fftw_real tmp1001; ASSERT_ALIGNED_DOUBLE; tmp955 = tmp19 - tmp42; tmp958 = tmp956 - tmp957; tmp959 = tmp955 - tmp958; tmp999 = tmp955 + tmp958; tmp1000 = tmp963 + tmp962; tmp1001 = tmp965 - tmp968; tmp1002 = K707106781 * (tmp1000 + tmp1001); tmp1068 = K707106781 * (tmp1001 - tmp1000); } { fftw_real tmp964; fftw_real tmp969; fftw_real tmp1061; fftw_real tmp1062; ASSERT_ALIGNED_DOUBLE; tmp964 = tmp962 - tmp963; tmp969 = tmp965 + tmp968; tmp970 = K707106781 * (tmp964 - tmp969); tmp1060 = K707106781 * (tmp964 + tmp969); tmp1061 = tmp89 - tmp66; tmp1062 = tmp1047 - tmp1042; tmp1063 = tmp1061 + tmp1062; tmp1069 = tmp1062 - tmp1061; } { fftw_real tmp976; fftw_real tmp981; fftw_real tmp1004; fftw_real tmp1005; ASSERT_ALIGNED_DOUBLE; tmp976 = tmp974 - tmp975; tmp981 = tmp977 - tmp980; tmp982 = (K923879532 * tmp976) + (K382683432 * tmp981); tmp996 = (K382683432 * tmp976) - (K923879532 * tmp981); tmp1004 = tmp974 + tmp975; tmp1005 = tmp977 + tmp980; tmp1006 = (K382683432 * tmp1004) + (K923879532 * tmp1005); tmp1012 = (K923879532 * tmp1004) - (K382683432 * tmp1005); } { fftw_real tmp987; fftw_real tmp992; fftw_real tmp1007; fftw_real tmp1008; ASSERT_ALIGNED_DOUBLE; tmp987 = tmp983 - tmp986; tmp992 = tmp990 - tmp991; tmp993 = (K382683432 * tmp987) - (K923879532 * tmp992); tmp997 = (K382683432 * tmp992) + (K923879532 * tmp987); tmp1007 = tmp983 + tmp986; tmp1008 = tmp990 + tmp991; tmp1009 = (K923879532 * tmp1007) - (K382683432 * tmp1008); tmp1013 = (K923879532 * tmp1008) + (K382683432 * tmp1007); } { fftw_real tmp971; fftw_real tmp994; fftw_real tmp995; fftw_real tmp998; ASSERT_ALIGNED_DOUBLE; tmp971 = tmp959 + tmp970; tmp994 = tmp982 + tmp993; c_re(inout[44 * iostride]) = tmp971 - tmp994; c_re(inout[12 * iostride]) = tmp971 + tmp994; tmp995 = tmp959 - tmp970; tmp998 = tmp996 - tmp997; c_re(inout[60 * iostride]) = tmp995 - tmp998; c_re(inout[28 * iostride]) = tmp995 + tmp998; } { fftw_real tmp1067; fftw_real tmp1070; fftw_real tmp1071; fftw_real tmp1072; ASSERT_ALIGNED_DOUBLE; tmp1067 = tmp996 + tmp997; tmp1070 = tmp1068 + tmp1069; c_im(inout[12 * iostride]) = tmp1067 + tmp1070; c_im(inout[44 * iostride]) = tmp1070 - tmp1067; tmp1071 = tmp993 - tmp982; tmp1072 = tmp1069 - tmp1068; c_im(inout[28 * iostride]) = tmp1071 + tmp1072; c_im(inout[60 * iostride]) = tmp1072 - tmp1071; } { fftw_real tmp1003; fftw_real tmp1010; fftw_real tmp1011; fftw_real tmp1014; ASSERT_ALIGNED_DOUBLE; tmp1003 = tmp999 + tmp1002; tmp1010 = tmp1006 + tmp1009; c_re(inout[36 * iostride]) = tmp1003 - tmp1010; c_re(inout[4 * iostride]) = tmp1003 + tmp1010; tmp1011 = tmp999 - tmp1002; tmp1014 = tmp1012 - tmp1013; c_re(inout[52 * iostride]) = tmp1011 - tmp1014; c_re(inout[20 * iostride]) = tmp1011 + tmp1014; } { fftw_real tmp1059; fftw_real tmp1064; fftw_real tmp1065; fftw_real tmp1066; ASSERT_ALIGNED_DOUBLE; tmp1059 = tmp1012 + tmp1013; tmp1064 = tmp1060 + tmp1063; c_im(inout[4 * iostride]) = tmp1059 + tmp1064; c_im(inout[36 * iostride]) = tmp1064 - tmp1059; tmp1065 = tmp1009 - tmp1006; tmp1066 = tmp1063 - tmp1060; c_im(inout[20 * iostride]) = tmp1065 + tmp1066; c_im(inout[52 * iostride]) = tmp1066 - tmp1065; } } { fftw_real tmp419; fftw_real tmp591; fftw_real tmp1155; fftw_real tmp1161; fftw_real tmp474; fftw_real tmp1152; fftw_real tmp594; fftw_real tmp1160; fftw_real tmp530; fftw_real tmp588; fftw_real tmp598; fftw_real tmp604; fftw_real tmp585; fftw_real tmp589; fftw_real tmp601; fftw_real tmp605; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp395; fftw_real tmp418; fftw_real tmp1153; fftw_real tmp1154; ASSERT_ALIGNED_DOUBLE; tmp395 = tmp383 - tmp394; tmp418 = tmp406 - tmp417; tmp419 = tmp395 - tmp418; tmp591 = tmp395 + tmp418; tmp1153 = tmp609 - tmp608; tmp1154 = tmp1139 - tmp1138; tmp1155 = tmp1153 + tmp1154; tmp1161 = tmp1154 - tmp1153; } { fftw_real tmp446; fftw_real tmp592; fftw_real tmp473; fftw_real tmp593; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp436; fftw_real tmp445; fftw_real tmp463; fftw_real tmp472; ASSERT_ALIGNED_DOUBLE; tmp436 = tmp424 - tmp435; tmp445 = tmp441 - tmp444; tmp446 = (K195090322 * tmp436) - (K980785280 * tmp445); tmp592 = (K980785280 * tmp436) + (K195090322 * tmp445); tmp463 = tmp451 - tmp462; tmp472 = tmp468 - tmp471; tmp473 = (K195090322 * tmp463) + (K980785280 * tmp472); tmp593 = (K195090322 * tmp472) - (K980785280 * tmp463); } tmp474 = tmp446 - tmp473; tmp1152 = tmp446 + tmp473; tmp594 = tmp592 + tmp593; tmp1160 = tmp593 - tmp592; } { fftw_real tmp516; fftw_real tmp596; fftw_real tmp529; fftw_real tmp597; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp492; fftw_real tmp515; fftw_real tmp525; fftw_real tmp528; ASSERT_ALIGNED_DOUBLE; tmp492 = tmp480 - tmp491; tmp515 = tmp503 - tmp514; tmp516 = tmp492 - tmp515; tmp596 = tmp492 + tmp515; tmp525 = tmp521 - tmp524; tmp528 = tmp526 - tmp527; tmp529 = tmp525 - tmp528; tmp597 = tmp525 + tmp528; } tmp530 = (K995184726 * tmp516) + (K098017140 * tmp529); tmp588 = (K098017140 * tmp516) - (K995184726 * tmp529); tmp598 = (K634393284 * tmp596) + (K773010453 * tmp597); tmp604 = (K773010453 * tmp596) - (K634393284 * tmp597); } { fftw_real tmp571; fftw_real tmp599; fftw_real tmp584; fftw_real tmp600; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp547; fftw_real tmp570; fftw_real tmp580; fftw_real tmp583; ASSERT_ALIGNED_DOUBLE; tmp547 = tmp535 - tmp546; tmp570 = tmp558 - tmp569; tmp571 = tmp547 - tmp570; tmp599 = tmp547 + tmp570; tmp580 = tmp576 - tmp579; tmp583 = tmp581 - tmp582; tmp584 = tmp580 - tmp583; tmp600 = tmp580 + tmp583; } tmp585 = (K098017140 * tmp571) - (K995184726 * tmp584); tmp589 = (K098017140 * tmp584) + (K995184726 * tmp571); tmp601 = (K773010453 * tmp599) - (K634393284 * tmp600); tmp605 = (K773010453 * tmp600) + (K634393284 * tmp599); } { fftw_real tmp475; fftw_real tmp586; fftw_real tmp587; fftw_real tmp590; ASSERT_ALIGNED_DOUBLE; tmp475 = tmp419 + tmp474; tmp586 = tmp530 + tmp585; c_re(inout[47 * iostride]) = tmp475 - tmp586; c_re(inout[15 * iostride]) = tmp475 + tmp586; tmp587 = tmp419 - tmp474; tmp590 = tmp588 - tmp589; c_re(inout[63 * iostride]) = tmp587 - tmp590; c_re(inout[31 * iostride]) = tmp587 + tmp590; } { fftw_real tmp1159; fftw_real tmp1162; fftw_real tmp1163; fftw_real tmp1164; ASSERT_ALIGNED_DOUBLE; tmp1159 = tmp588 + tmp589; tmp1162 = tmp1160 + tmp1161; c_im(inout[15 * iostride]) = tmp1159 + tmp1162; c_im(inout[47 * iostride]) = tmp1162 - tmp1159; tmp1163 = tmp585 - tmp530; tmp1164 = tmp1161 - tmp1160; c_im(inout[31 * iostride]) = tmp1163 + tmp1164; c_im(inout[63 * iostride]) = tmp1164 - tmp1163; } { fftw_real tmp595; fftw_real tmp602; fftw_real tmp603; fftw_real tmp606; ASSERT_ALIGNED_DOUBLE; tmp595 = tmp591 + tmp594; tmp602 = tmp598 + tmp601; c_re(inout[39 * iostride]) = tmp595 - tmp602; c_re(inout[7 * iostride]) = tmp595 + tmp602; tmp603 = tmp591 - tmp594; tmp606 = tmp604 - tmp605; c_re(inout[55 * iostride]) = tmp603 - tmp606; c_re(inout[23 * iostride]) = tmp603 + tmp606; } { fftw_real tmp1151; fftw_real tmp1156; fftw_real tmp1157; fftw_real tmp1158; ASSERT_ALIGNED_DOUBLE; tmp1151 = tmp604 + tmp605; tmp1156 = tmp1152 + tmp1155; c_im(inout[7 * iostride]) = tmp1151 + tmp1156; c_im(inout[39 * iostride]) = tmp1156 - tmp1151; tmp1157 = tmp601 - tmp598; tmp1158 = tmp1155 - tmp1152; c_im(inout[23 * iostride]) = tmp1157 + tmp1158; c_im(inout[55 * iostride]) = tmp1158 - tmp1157; } } { fftw_real tmp611; fftw_real tmp639; fftw_real tmp1141; fftw_real tmp1147; fftw_real tmp618; fftw_real tmp1136; fftw_real tmp642; fftw_real tmp1146; fftw_real tmp626; fftw_real tmp636; fftw_real tmp646; fftw_real tmp652; fftw_real tmp633; fftw_real tmp637; fftw_real tmp649; fftw_real tmp653; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp607; fftw_real tmp610; fftw_real tmp1137; fftw_real tmp1140; ASSERT_ALIGNED_DOUBLE; tmp607 = tmp383 + tmp394; tmp610 = tmp608 + tmp609; tmp611 = tmp607 - tmp610; tmp639 = tmp607 + tmp610; tmp1137 = tmp406 + tmp417; tmp1140 = tmp1138 + tmp1139; tmp1141 = tmp1137 + tmp1140; tmp1147 = tmp1140 - tmp1137; } { fftw_real tmp614; fftw_real tmp640; fftw_real tmp617; fftw_real tmp641; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp612; fftw_real tmp613; fftw_real tmp615; fftw_real tmp616; ASSERT_ALIGNED_DOUBLE; tmp612 = tmp424 + tmp435; tmp613 = tmp441 + tmp444; tmp614 = (K831469612 * tmp612) - (K555570233 * tmp613); tmp640 = (K555570233 * tmp612) + (K831469612 * tmp613); tmp615 = tmp451 + tmp462; tmp616 = tmp468 + tmp471; tmp617 = (K831469612 * tmp615) + (K555570233 * tmp616); tmp641 = (K831469612 * tmp616) - (K555570233 * tmp615); } tmp618 = tmp614 - tmp617; tmp1136 = tmp614 + tmp617; tmp642 = tmp640 + tmp641; tmp1146 = tmp641 - tmp640; } { fftw_real tmp622; fftw_real tmp644; fftw_real tmp625; fftw_real tmp645; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp620; fftw_real tmp621; fftw_real tmp623; fftw_real tmp624; ASSERT_ALIGNED_DOUBLE; tmp620 = tmp521 + tmp524; tmp621 = tmp514 + tmp503; tmp622 = tmp620 - tmp621; tmp644 = tmp620 + tmp621; tmp623 = tmp480 + tmp491; tmp624 = tmp526 + tmp527; tmp625 = tmp623 - tmp624; tmp645 = tmp623 + tmp624; } tmp626 = (K471396736 * tmp622) + (K881921264 * tmp625); tmp636 = (K471396736 * tmp625) - (K881921264 * tmp622); tmp646 = (K956940335 * tmp644) + (K290284677 * tmp645); tmp652 = (K956940335 * tmp645) - (K290284677 * tmp644); } { fftw_real tmp629; fftw_real tmp647; fftw_real tmp632; fftw_real tmp648; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp627; fftw_real tmp628; fftw_real tmp630; fftw_real tmp631; ASSERT_ALIGNED_DOUBLE; tmp627 = tmp535 + tmp546; tmp628 = tmp582 + tmp581; tmp629 = tmp627 - tmp628; tmp647 = tmp627 + tmp628; tmp630 = tmp576 + tmp579; tmp631 = tmp558 + tmp569; tmp632 = tmp630 - tmp631; tmp648 = tmp630 + tmp631; } tmp633 = (K471396736 * tmp629) - (K881921264 * tmp632); tmp637 = (K881921264 * tmp629) + (K471396736 * tmp632); tmp649 = (K956940335 * tmp647) - (K290284677 * tmp648); tmp653 = (K290284677 * tmp647) + (K956940335 * tmp648); } { fftw_real tmp619; fftw_real tmp634; fftw_real tmp635; fftw_real tmp638; ASSERT_ALIGNED_DOUBLE; tmp619 = tmp611 + tmp618; tmp634 = tmp626 + tmp633; c_re(inout[43 * iostride]) = tmp619 - tmp634; c_re(inout[11 * iostride]) = tmp619 + tmp634; tmp635 = tmp611 - tmp618; tmp638 = tmp636 - tmp637; c_re(inout[59 * iostride]) = tmp635 - tmp638; c_re(inout[27 * iostride]) = tmp635 + tmp638; } { fftw_real tmp1145; fftw_real tmp1148; fftw_real tmp1149; fftw_real tmp1150; ASSERT_ALIGNED_DOUBLE; tmp1145 = tmp636 + tmp637; tmp1148 = tmp1146 + tmp1147; c_im(inout[11 * iostride]) = tmp1145 + tmp1148; c_im(inout[43 * iostride]) = tmp1148 - tmp1145; tmp1149 = tmp633 - tmp626; tmp1150 = tmp1147 - tmp1146; c_im(inout[27 * iostride]) = tmp1149 + tmp1150; c_im(inout[59 * iostride]) = tmp1150 - tmp1149; } { fftw_real tmp643; fftw_real tmp650; fftw_real tmp651; fftw_real tmp654; ASSERT_ALIGNED_DOUBLE; tmp643 = tmp639 + tmp642; tmp650 = tmp646 + tmp649; c_re(inout[35 * iostride]) = tmp643 - tmp650; c_re(inout[3 * iostride]) = tmp643 + tmp650; tmp651 = tmp639 - tmp642; tmp654 = tmp652 - tmp653; c_re(inout[51 * iostride]) = tmp651 - tmp654; c_re(inout[19 * iostride]) = tmp651 + tmp654; } { fftw_real tmp1135; fftw_real tmp1142; fftw_real tmp1143; fftw_real tmp1144; ASSERT_ALIGNED_DOUBLE; tmp1135 = tmp652 + tmp653; tmp1142 = tmp1136 + tmp1141; c_im(inout[3 * iostride]) = tmp1135 + tmp1142; c_im(inout[35 * iostride]) = tmp1142 - tmp1135; tmp1143 = tmp649 - tmp646; tmp1144 = tmp1141 - tmp1136; c_im(inout[19 * iostride]) = tmp1143 + tmp1144; c_im(inout[51 * iostride]) = tmp1144 - tmp1143; } } { fftw_real tmp807; fftw_real tmp891; fftw_real tmp830; fftw_real tmp1090; fftw_real tmp1093; fftw_real tmp1099; fftw_real tmp894; fftw_real tmp1098; fftw_real tmp885; fftw_real tmp889; fftw_real tmp901; fftw_real tmp905; fftw_real tmp858; fftw_real tmp888; fftw_real tmp898; fftw_real tmp904; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp795; fftw_real tmp806; fftw_real tmp892; fftw_real tmp893; ASSERT_ALIGNED_DOUBLE; tmp795 = tmp791 - tmp794; tmp806 = K707106781 * (tmp800 - tmp805); tmp807 = tmp795 - tmp806; tmp891 = tmp795 + tmp806; { fftw_real tmp818; fftw_real tmp829; fftw_real tmp1091; fftw_real tmp1092; ASSERT_ALIGNED_DOUBLE; tmp818 = (K382683432 * tmp812) - (K923879532 * tmp817); tmp829 = (K382683432 * tmp823) + (K923879532 * tmp828); tmp830 = tmp818 - tmp829; tmp1090 = tmp818 + tmp829; tmp1091 = K707106781 * (tmp909 - tmp908); tmp1092 = tmp1077 - tmp1076; tmp1093 = tmp1091 + tmp1092; tmp1099 = tmp1092 - tmp1091; } tmp892 = (K923879532 * tmp812) + (K382683432 * tmp817); tmp893 = (K382683432 * tmp828) - (K923879532 * tmp823); tmp894 = tmp892 + tmp893; tmp1098 = tmp893 - tmp892; { fftw_real tmp875; fftw_real tmp899; fftw_real tmp884; fftw_real tmp900; fftw_real tmp874; fftw_real tmp883; ASSERT_ALIGNED_DOUBLE; tmp874 = K707106781 * (tmp868 - tmp873); tmp875 = tmp863 - tmp874; tmp899 = tmp863 + tmp874; tmp883 = K707106781 * (tmp881 - tmp882); tmp884 = tmp880 - tmp883; tmp900 = tmp880 + tmp883; tmp885 = (K195090322 * tmp875) - (K980785280 * tmp884); tmp889 = (K195090322 * tmp884) + (K980785280 * tmp875); tmp901 = (K831469612 * tmp899) - (K555570233 * tmp900); tmp905 = (K831469612 * tmp900) + (K555570233 * tmp899); } { fftw_real tmp848; fftw_real tmp896; fftw_real tmp857; fftw_real tmp897; fftw_real tmp847; fftw_real tmp856; ASSERT_ALIGNED_DOUBLE; tmp847 = K707106781 * (tmp841 - tmp846); tmp848 = tmp836 - tmp847; tmp896 = tmp836 + tmp847; tmp856 = K707106781 * (tmp854 - tmp855); tmp857 = tmp853 - tmp856; tmp897 = tmp853 + tmp856; tmp858 = (K980785280 * tmp848) + (K195090322 * tmp857); tmp888 = (K195090322 * tmp848) - (K980785280 * tmp857); tmp898 = (K555570233 * tmp896) + (K831469612 * tmp897); tmp904 = (K831469612 * tmp896) - (K555570233 * tmp897); } } { fftw_real tmp831; fftw_real tmp886; fftw_real tmp887; fftw_real tmp890; ASSERT_ALIGNED_DOUBLE; tmp831 = tmp807 + tmp830; tmp886 = tmp858 + tmp885; c_re(inout[46 * iostride]) = tmp831 - tmp886; c_re(inout[14 * iostride]) = tmp831 + tmp886; tmp887 = tmp807 - tmp830; tmp890 = tmp888 - tmp889; c_re(inout[62 * iostride]) = tmp887 - tmp890; c_re(inout[30 * iostride]) = tmp887 + tmp890; } { fftw_real tmp1097; fftw_real tmp1100; fftw_real tmp1101; fftw_real tmp1102; ASSERT_ALIGNED_DOUBLE; tmp1097 = tmp888 + tmp889; tmp1100 = tmp1098 + tmp1099; c_im(inout[14 * iostride]) = tmp1097 + tmp1100; c_im(inout[46 * iostride]) = tmp1100 - tmp1097; tmp1101 = tmp885 - tmp858; tmp1102 = tmp1099 - tmp1098; c_im(inout[30 * iostride]) = tmp1101 + tmp1102; c_im(inout[62 * iostride]) = tmp1102 - tmp1101; } { fftw_real tmp895; fftw_real tmp902; fftw_real tmp903; fftw_real tmp906; ASSERT_ALIGNED_DOUBLE; tmp895 = tmp891 + tmp894; tmp902 = tmp898 + tmp901; c_re(inout[38 * iostride]) = tmp895 - tmp902; c_re(inout[6 * iostride]) = tmp895 + tmp902; tmp903 = tmp891 - tmp894; tmp906 = tmp904 - tmp905; c_re(inout[54 * iostride]) = tmp903 - tmp906; c_re(inout[22 * iostride]) = tmp903 + tmp906; } { fftw_real tmp1089; fftw_real tmp1094; fftw_real tmp1095; fftw_real tmp1096; ASSERT_ALIGNED_DOUBLE; tmp1089 = tmp904 + tmp905; tmp1094 = tmp1090 + tmp1093; c_im(inout[6 * iostride]) = tmp1089 + tmp1094; c_im(inout[38 * iostride]) = tmp1094 - tmp1089; tmp1095 = tmp901 - tmp898; tmp1096 = tmp1093 - tmp1090; c_im(inout[22 * iostride]) = tmp1095 + tmp1096; c_im(inout[54 * iostride]) = tmp1096 - tmp1095; } } { fftw_real tmp911; fftw_real tmp939; fftw_real tmp918; fftw_real tmp1074; fftw_real tmp1079; fftw_real tmp1085; fftw_real tmp942; fftw_real tmp1084; fftw_real tmp933; fftw_real tmp937; fftw_real tmp949; fftw_real tmp953; fftw_real tmp926; fftw_real tmp936; fftw_real tmp946; fftw_real tmp952; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp907; fftw_real tmp910; fftw_real tmp940; fftw_real tmp941; ASSERT_ALIGNED_DOUBLE; tmp907 = tmp791 + tmp794; tmp910 = K707106781 * (tmp908 + tmp909); tmp911 = tmp907 - tmp910; tmp939 = tmp907 + tmp910; { fftw_real tmp914; fftw_real tmp917; fftw_real tmp1075; fftw_real tmp1078; ASSERT_ALIGNED_DOUBLE; tmp914 = (K923879532 * tmp912) - (K382683432 * tmp913); tmp917 = (K923879532 * tmp915) + (K382683432 * tmp916); tmp918 = tmp914 - tmp917; tmp1074 = tmp914 + tmp917; tmp1075 = K707106781 * (tmp800 + tmp805); tmp1078 = tmp1076 + tmp1077; tmp1079 = tmp1075 + tmp1078; tmp1085 = tmp1078 - tmp1075; } tmp940 = (K382683432 * tmp912) + (K923879532 * tmp913); tmp941 = (K923879532 * tmp916) - (K382683432 * tmp915); tmp942 = tmp940 + tmp941; tmp1084 = tmp941 - tmp940; { fftw_real tmp929; fftw_real tmp947; fftw_real tmp932; fftw_real tmp948; fftw_real tmp928; fftw_real tmp931; ASSERT_ALIGNED_DOUBLE; tmp928 = K707106781 * (tmp882 + tmp881); tmp929 = tmp927 - tmp928; tmp947 = tmp927 + tmp928; tmp931 = K707106781 * (tmp868 + tmp873); tmp932 = tmp930 - tmp931; tmp948 = tmp930 + tmp931; tmp933 = (K555570233 * tmp929) - (K831469612 * tmp932); tmp937 = (K831469612 * tmp929) + (K555570233 * tmp932); tmp949 = (K980785280 * tmp947) - (K195090322 * tmp948); tmp953 = (K195090322 * tmp947) + (K980785280 * tmp948); } { fftw_real tmp922; fftw_real tmp944; fftw_real tmp925; fftw_real tmp945; fftw_real tmp921; fftw_real tmp924; ASSERT_ALIGNED_DOUBLE; tmp921 = K707106781 * (tmp846 + tmp841); tmp922 = tmp920 - tmp921; tmp944 = tmp920 + tmp921; tmp924 = K707106781 * (tmp854 + tmp855); tmp925 = tmp923 - tmp924; tmp945 = tmp923 + tmp924; tmp926 = (K555570233 * tmp922) + (K831469612 * tmp925); tmp936 = (K555570233 * tmp925) - (K831469612 * tmp922); tmp946 = (K980785280 * tmp944) + (K195090322 * tmp945); tmp952 = (K980785280 * tmp945) - (K195090322 * tmp944); } } { fftw_real tmp919; fftw_real tmp934; fftw_real tmp935; fftw_real tmp938; ASSERT_ALIGNED_DOUBLE; tmp919 = tmp911 + tmp918; tmp934 = tmp926 + tmp933; c_re(inout[42 * iostride]) = tmp919 - tmp934; c_re(inout[10 * iostride]) = tmp919 + tmp934; tmp935 = tmp911 - tmp918; tmp938 = tmp936 - tmp937; c_re(inout[58 * iostride]) = tmp935 - tmp938; c_re(inout[26 * iostride]) = tmp935 + tmp938; } { fftw_real tmp1083; fftw_real tmp1086; fftw_real tmp1087; fftw_real tmp1088; ASSERT_ALIGNED_DOUBLE; tmp1083 = tmp936 + tmp937; tmp1086 = tmp1084 + tmp1085; c_im(inout[10 * iostride]) = tmp1083 + tmp1086; c_im(inout[42 * iostride]) = tmp1086 - tmp1083; tmp1087 = tmp933 - tmp926; tmp1088 = tmp1085 - tmp1084; c_im(inout[26 * iostride]) = tmp1087 + tmp1088; c_im(inout[58 * iostride]) = tmp1088 - tmp1087; } { fftw_real tmp943; fftw_real tmp950; fftw_real tmp951; fftw_real tmp954; ASSERT_ALIGNED_DOUBLE; tmp943 = tmp939 + tmp942; tmp950 = tmp946 + tmp949; c_re(inout[34 * iostride]) = tmp943 - tmp950; c_re(inout[2 * iostride]) = tmp943 + tmp950; tmp951 = tmp939 - tmp942; tmp954 = tmp952 - tmp953; c_re(inout[50 * iostride]) = tmp951 - tmp954; c_re(inout[18 * iostride]) = tmp951 + tmp954; } { fftw_real tmp1073; fftw_real tmp1080; fftw_real tmp1081; fftw_real tmp1082; ASSERT_ALIGNED_DOUBLE; tmp1073 = tmp952 + tmp953; tmp1080 = tmp1074 + tmp1079; c_im(inout[2 * iostride]) = tmp1073 + tmp1080; c_im(inout[34 * iostride]) = tmp1080 - tmp1073; tmp1081 = tmp949 - tmp946; tmp1082 = tmp1079 - tmp1074; c_im(inout[18 * iostride]) = tmp1081 + tmp1082; c_im(inout[50 * iostride]) = tmp1082 - tmp1081; } } { fftw_real tmp667; fftw_real tmp727; fftw_real tmp1125; fftw_real tmp1131; fftw_real tmp682; fftw_real tmp1122; fftw_real tmp730; fftw_real tmp1130; fftw_real tmp702; fftw_real tmp724; fftw_real tmp734; fftw_real tmp740; fftw_real tmp721; fftw_real tmp725; fftw_real tmp737; fftw_real tmp741; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp659; fftw_real tmp666; fftw_real tmp1123; fftw_real tmp1124; ASSERT_ALIGNED_DOUBLE; tmp659 = tmp655 - tmp658; tmp666 = tmp662 - tmp665; tmp667 = tmp659 - tmp666; tmp727 = tmp659 + tmp666; tmp1123 = tmp745 - tmp744; tmp1124 = tmp1109 - tmp1106; tmp1125 = tmp1123 + tmp1124; tmp1131 = tmp1124 - tmp1123; } { fftw_real tmp674; fftw_real tmp728; fftw_real tmp681; fftw_real tmp729; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp670; fftw_real tmp673; fftw_real tmp677; fftw_real tmp680; ASSERT_ALIGNED_DOUBLE; tmp670 = tmp668 - tmp669; tmp673 = tmp671 - tmp672; tmp674 = (K555570233 * tmp670) - (K831469612 * tmp673); tmp728 = (K555570233 * tmp673) + (K831469612 * tmp670); tmp677 = tmp675 - tmp676; tmp680 = tmp678 - tmp679; tmp681 = (K831469612 * tmp677) + (K555570233 * tmp680); tmp729 = (K555570233 * tmp677) - (K831469612 * tmp680); } tmp682 = tmp674 - tmp681; tmp1122 = tmp674 + tmp681; tmp730 = tmp728 + tmp729; tmp1130 = tmp729 - tmp728; } { fftw_real tmp694; fftw_real tmp732; fftw_real tmp701; fftw_real tmp733; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp686; fftw_real tmp693; fftw_real tmp697; fftw_real tmp700; ASSERT_ALIGNED_DOUBLE; tmp686 = tmp684 - tmp685; tmp693 = tmp689 - tmp692; tmp694 = tmp686 - tmp693; tmp732 = tmp686 + tmp693; tmp697 = tmp695 - tmp696; tmp700 = tmp698 - tmp699; tmp701 = tmp697 - tmp700; tmp733 = tmp697 + tmp700; } tmp702 = (K956940335 * tmp694) + (K290284677 * tmp701); tmp724 = (K290284677 * tmp694) - (K956940335 * tmp701); tmp734 = (K471396736 * tmp732) + (K881921264 * tmp733); tmp740 = (K881921264 * tmp732) - (K471396736 * tmp733); } { fftw_real tmp713; fftw_real tmp735; fftw_real tmp720; fftw_real tmp736; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp705; fftw_real tmp712; fftw_real tmp716; fftw_real tmp719; ASSERT_ALIGNED_DOUBLE; tmp705 = tmp703 - tmp704; tmp712 = tmp708 - tmp711; tmp713 = tmp705 - tmp712; tmp735 = tmp705 + tmp712; tmp716 = tmp714 - tmp715; tmp719 = tmp717 - tmp718; tmp720 = tmp716 - tmp719; tmp736 = tmp716 + tmp719; } tmp721 = (K290284677 * tmp713) - (K956940335 * tmp720); tmp725 = (K290284677 * tmp720) + (K956940335 * tmp713); tmp737 = (K881921264 * tmp735) - (K471396736 * tmp736); tmp741 = (K881921264 * tmp736) + (K471396736 * tmp735); } { fftw_real tmp683; fftw_real tmp722; fftw_real tmp723; fftw_real tmp726; ASSERT_ALIGNED_DOUBLE; tmp683 = tmp667 + tmp682; tmp722 = tmp702 + tmp721; c_re(inout[45 * iostride]) = tmp683 - tmp722; c_re(inout[13 * iostride]) = tmp683 + tmp722; tmp723 = tmp667 - tmp682; tmp726 = tmp724 - tmp725; c_re(inout[61 * iostride]) = tmp723 - tmp726; c_re(inout[29 * iostride]) = tmp723 + tmp726; } { fftw_real tmp1129; fftw_real tmp1132; fftw_real tmp1133; fftw_real tmp1134; ASSERT_ALIGNED_DOUBLE; tmp1129 = tmp724 + tmp725; tmp1132 = tmp1130 + tmp1131; c_im(inout[13 * iostride]) = tmp1129 + tmp1132; c_im(inout[45 * iostride]) = tmp1132 - tmp1129; tmp1133 = tmp721 - tmp702; tmp1134 = tmp1131 - tmp1130; c_im(inout[29 * iostride]) = tmp1133 + tmp1134; c_im(inout[61 * iostride]) = tmp1134 - tmp1133; } { fftw_real tmp731; fftw_real tmp738; fftw_real tmp739; fftw_real tmp742; ASSERT_ALIGNED_DOUBLE; tmp731 = tmp727 + tmp730; tmp738 = tmp734 + tmp737; c_re(inout[37 * iostride]) = tmp731 - tmp738; c_re(inout[5 * iostride]) = tmp731 + tmp738; tmp739 = tmp727 - tmp730; tmp742 = tmp740 - tmp741; c_re(inout[53 * iostride]) = tmp739 - tmp742; c_re(inout[21 * iostride]) = tmp739 + tmp742; } { fftw_real tmp1121; fftw_real tmp1126; fftw_real tmp1127; fftw_real tmp1128; ASSERT_ALIGNED_DOUBLE; tmp1121 = tmp740 + tmp741; tmp1126 = tmp1122 + tmp1125; c_im(inout[5 * iostride]) = tmp1121 + tmp1126; c_im(inout[37 * iostride]) = tmp1126 - tmp1121; tmp1127 = tmp737 - tmp734; tmp1128 = tmp1125 - tmp1122; c_im(inout[21 * iostride]) = tmp1127 + tmp1128; c_im(inout[53 * iostride]) = tmp1128 - tmp1127; } } { fftw_real tmp747; fftw_real tmp775; fftw_real tmp1111; fftw_real tmp1117; fftw_real tmp754; fftw_real tmp1104; fftw_real tmp778; fftw_real tmp1116; fftw_real tmp762; fftw_real tmp772; fftw_real tmp782; fftw_real tmp788; fftw_real tmp769; fftw_real tmp773; fftw_real tmp785; fftw_real tmp789; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp743; fftw_real tmp746; fftw_real tmp1105; fftw_real tmp1110; ASSERT_ALIGNED_DOUBLE; tmp743 = tmp655 + tmp658; tmp746 = tmp744 + tmp745; tmp747 = tmp743 - tmp746; tmp775 = tmp743 + tmp746; tmp1105 = tmp662 + tmp665; tmp1110 = tmp1106 + tmp1109; tmp1111 = tmp1105 + tmp1110; tmp1117 = tmp1110 - tmp1105; } { fftw_real tmp750; fftw_real tmp776; fftw_real tmp753; fftw_real tmp777; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp748; fftw_real tmp749; fftw_real tmp751; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp748 = tmp668 + tmp669; tmp749 = tmp671 + tmp672; tmp750 = (K980785280 * tmp748) - (K195090322 * tmp749); tmp776 = (K980785280 * tmp749) + (K195090322 * tmp748); tmp751 = tmp675 + tmp676; tmp752 = tmp678 + tmp679; tmp753 = (K195090322 * tmp751) + (K980785280 * tmp752); tmp777 = (K980785280 * tmp751) - (K195090322 * tmp752); } tmp754 = tmp750 - tmp753; tmp1104 = tmp750 + tmp753; tmp778 = tmp776 + tmp777; tmp1116 = tmp777 - tmp776; } { fftw_real tmp758; fftw_real tmp780; fftw_real tmp761; fftw_real tmp781; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp756; fftw_real tmp757; fftw_real tmp759; fftw_real tmp760; ASSERT_ALIGNED_DOUBLE; tmp756 = tmp695 + tmp696; tmp757 = tmp692 + tmp689; tmp758 = tmp756 - tmp757; tmp780 = tmp756 + tmp757; tmp759 = tmp684 + tmp685; tmp760 = tmp698 + tmp699; tmp761 = tmp759 - tmp760; tmp781 = tmp759 + tmp760; } tmp762 = (K634393284 * tmp758) + (K773010453 * tmp761); tmp772 = (K634393284 * tmp761) - (K773010453 * tmp758); tmp782 = (K995184726 * tmp780) + (K098017140 * tmp781); tmp788 = (K995184726 * tmp781) - (K098017140 * tmp780); } { fftw_real tmp765; fftw_real tmp783; fftw_real tmp768; fftw_real tmp784; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp763; fftw_real tmp764; fftw_real tmp766; fftw_real tmp767; ASSERT_ALIGNED_DOUBLE; tmp763 = tmp703 + tmp704; tmp764 = tmp718 + tmp717; tmp765 = tmp763 - tmp764; tmp783 = tmp763 + tmp764; tmp766 = tmp714 + tmp715; tmp767 = tmp708 + tmp711; tmp768 = tmp766 - tmp767; tmp784 = tmp766 + tmp767; } tmp769 = (K634393284 * tmp765) - (K773010453 * tmp768); tmp773 = (K773010453 * tmp765) + (K634393284 * tmp768); tmp785 = (K995184726 * tmp783) - (K098017140 * tmp784); tmp789 = (K098017140 * tmp783) + (K995184726 * tmp784); } { fftw_real tmp755; fftw_real tmp770; fftw_real tmp771; fftw_real tmp774; ASSERT_ALIGNED_DOUBLE; tmp755 = tmp747 + tmp754; tmp770 = tmp762 + tmp769; c_re(inout[41 * iostride]) = tmp755 - tmp770; c_re(inout[9 * iostride]) = tmp755 + tmp770; tmp771 = tmp747 - tmp754; tmp774 = tmp772 - tmp773; c_re(inout[57 * iostride]) = tmp771 - tmp774; c_re(inout[25 * iostride]) = tmp771 + tmp774; } { fftw_real tmp1115; fftw_real tmp1118; fftw_real tmp1119; fftw_real tmp1120; ASSERT_ALIGNED_DOUBLE; tmp1115 = tmp772 + tmp773; tmp1118 = tmp1116 + tmp1117; c_im(inout[9 * iostride]) = tmp1115 + tmp1118; c_im(inout[41 * iostride]) = tmp1118 - tmp1115; tmp1119 = tmp769 - tmp762; tmp1120 = tmp1117 - tmp1116; c_im(inout[25 * iostride]) = tmp1119 + tmp1120; c_im(inout[57 * iostride]) = tmp1120 - tmp1119; } { fftw_real tmp779; fftw_real tmp786; fftw_real tmp787; fftw_real tmp790; ASSERT_ALIGNED_DOUBLE; tmp779 = tmp775 + tmp778; tmp786 = tmp782 + tmp785; c_re(inout[33 * iostride]) = tmp779 - tmp786; c_re(inout[iostride]) = tmp779 + tmp786; tmp787 = tmp775 - tmp778; tmp790 = tmp788 - tmp789; c_re(inout[49 * iostride]) = tmp787 - tmp790; c_re(inout[17 * iostride]) = tmp787 + tmp790; } { fftw_real tmp1103; fftw_real tmp1112; fftw_real tmp1113; fftw_real tmp1114; ASSERT_ALIGNED_DOUBLE; tmp1103 = tmp788 + tmp789; tmp1112 = tmp1104 + tmp1111; c_im(inout[iostride]) = tmp1103 + tmp1112; c_im(inout[33 * iostride]) = tmp1112 - tmp1103; tmp1113 = tmp785 - tmp782; tmp1114 = tmp1111 - tmp1104; c_im(inout[17 * iostride]) = tmp1113 + tmp1114; c_im(inout[49 * iostride]) = tmp1114 - tmp1113; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }; fftw_codelet_desc fftw_twiddle_64_desc = { "fftw_twiddle_64", (void (*)()) fftw_twiddle_64, 64, FFTW_FORWARD, FFTW_TWIDDLE, 1408, 63, twiddle_order, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_1.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000003663�07637527152�010302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 1 */ /* * This function contains 0 FP additions, 0 FP multiplications, * (or, 0 additions, 0 multiplications, 0 fused multiply/add), * 2 stack variables, and 4 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_1(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); c_re(output[0]) = tmp1; tmp2 = c_im(input[0]); c_im(output[0]) = tmp2; } fftw_codelet_desc fftwi_no_twiddle_1_desc = { "fftwi_no_twiddle_1", (void (*)()) fftwi_no_twiddle_1, 1, FFTW_BACKWARD, FFTW_NOTW, 34, 0, (const int *) 0, }; �����������������������������������������������������������������������������fftw-2.1.5/fftw/fni_2.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000004203�07637527152�010272� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 2 */ /* * This function contains 4 FP additions, 0 FP multiplications, * (or, 4 additions, 0 multiplications, 0 fused multiply/add), * 4 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_2(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[istride]); c_re(output[ostride]) = tmp1 - tmp2; c_re(output[0]) = tmp1 + tmp2; tmp3 = c_im(input[0]); tmp4 = c_im(input[istride]); c_im(output[ostride]) = tmp3 - tmp4; c_im(output[0]) = tmp3 + tmp4; } fftw_codelet_desc fftwi_no_twiddle_2_desc = { "fftwi_no_twiddle_2", (void (*)()) fftwi_no_twiddle_2, 2, FFTW_BACKWARD, FFTW_NOTW, 56, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_3.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000005611�07637527152�010277� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 3 */ /* * This function contains 12 FP additions, 4 FP multiplications, * (or, 10 additions, 2 multiplications, 2 fused multiply/add), * 12 stack variables, and 12 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_3(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp6; fftw_real tmp4; fftw_real tmp5; fftw_real tmp9; fftw_real tmp12; fftw_real tmp11; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp6 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[2 * istride]); tmp4 = tmp2 + tmp3; tmp5 = K866025403 * (tmp2 - tmp3); tmp7 = c_im(input[istride]); tmp8 = c_im(input[2 * istride]); tmp9 = tmp7 + tmp8; tmp12 = K866025403 * (tmp8 - tmp7); } c_re(output[0]) = tmp1 + tmp4; tmp11 = tmp1 - (K500000000 * tmp4); c_re(output[2 * ostride]) = tmp11 - tmp12; c_re(output[ostride]) = tmp11 + tmp12; c_im(output[0]) = tmp6 + tmp9; tmp10 = tmp6 - (K500000000 * tmp9); c_im(output[ostride]) = tmp5 + tmp10; c_im(output[2 * ostride]) = tmp10 - tmp5; } fftw_codelet_desc fftwi_no_twiddle_3_desc = { "fftwi_no_twiddle_3", (void (*)()) fftwi_no_twiddle_3, 3, FFTW_BACKWARD, FFTW_NOTW, 78, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_4.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000005730�07637527152�010302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 4 */ /* * This function contains 16 FP additions, 0 FP multiplications, * (or, 16 additions, 0 multiplications, 0 fused multiply/add), * 12 stack variables, and 16 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_4(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp11; fftw_real tmp10; fftw_real tmp15; fftw_real tmp6; fftw_real tmp7; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[2 * istride]); tmp3 = tmp1 + tmp2; tmp11 = tmp1 - tmp2; tmp8 = c_im(input[0]); tmp9 = c_im(input[2 * istride]); tmp10 = tmp8 - tmp9; tmp15 = tmp8 + tmp9; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp12; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[istride]); tmp5 = c_re(input[3 * istride]); tmp6 = tmp4 + tmp5; tmp7 = tmp4 - tmp5; tmp12 = c_im(input[istride]); tmp13 = c_im(input[3 * istride]); tmp14 = tmp12 - tmp13; tmp16 = tmp12 + tmp13; } c_re(output[2 * ostride]) = tmp3 - tmp6; c_re(output[0]) = tmp3 + tmp6; c_im(output[ostride]) = tmp7 + tmp10; c_im(output[3 * ostride]) = tmp10 - tmp7; c_re(output[ostride]) = tmp11 - tmp14; c_re(output[3 * ostride]) = tmp11 + tmp14; c_im(output[2 * ostride]) = tmp15 - tmp16; c_im(output[0]) = tmp15 + tmp16; } fftw_codelet_desc fftwi_no_twiddle_4_desc = { "fftwi_no_twiddle_4", (void (*)()) fftwi_no_twiddle_4, 4, FFTW_BACKWARD, FFTW_NOTW, 100, 0, (const int *) 0, }; ����������������������������������������fftw-2.1.5/fftw/fni_5.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000010663�07637527153�010305� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 5 */ /* * This function contains 32 FP additions, 12 FP multiplications, * (or, 26 additions, 6 multiplications, 6 fused multiply/add), * 16 stack variables, and 20 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_5(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp27; fftw_real tmp8; fftw_real tmp10; fftw_real tmp21; fftw_real tmp22; fftw_real tmp14; fftw_real tmp28; fftw_real tmp26; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp27 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[4 * istride]); tmp4 = tmp2 + tmp3; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[3 * istride]); tmp7 = tmp5 + tmp6; tmp8 = tmp4 + tmp7; tmp10 = K559016994 * (tmp4 - tmp7); tmp21 = tmp2 - tmp3; tmp22 = tmp5 - tmp6; } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp24; fftw_real tmp15; fftw_real tmp16; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp12 = c_im(input[istride]); tmp13 = c_im(input[4 * istride]); tmp24 = tmp12 + tmp13; tmp15 = c_im(input[2 * istride]); tmp16 = c_im(input[3 * istride]); tmp25 = tmp15 + tmp16; tmp14 = tmp12 - tmp13; tmp28 = tmp24 + tmp25; tmp26 = K559016994 * (tmp24 - tmp25); tmp17 = tmp15 - tmp16; } c_re(output[0]) = tmp1 + tmp8; { fftw_real tmp18; fftw_real tmp20; fftw_real tmp11; fftw_real tmp19; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp18 = (K587785252 * tmp14) - (K951056516 * tmp17); tmp20 = (K951056516 * tmp14) + (K587785252 * tmp17); tmp9 = tmp1 - (K250000000 * tmp8); tmp11 = tmp9 - tmp10; tmp19 = tmp10 + tmp9; c_re(output[2 * ostride]) = tmp11 - tmp18; c_re(output[3 * ostride]) = tmp11 + tmp18; c_re(output[ostride]) = tmp19 - tmp20; c_re(output[4 * ostride]) = tmp19 + tmp20; } c_im(output[0]) = tmp28 + tmp27; { fftw_real tmp23; fftw_real tmp31; fftw_real tmp30; fftw_real tmp32; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp23 = (K951056516 * tmp21) + (K587785252 * tmp22); tmp31 = (K587785252 * tmp21) - (K951056516 * tmp22); tmp29 = tmp27 - (K250000000 * tmp28); tmp30 = tmp26 + tmp29; tmp32 = tmp29 - tmp26; c_im(output[ostride]) = tmp23 + tmp30; c_im(output[4 * ostride]) = tmp30 - tmp23; c_im(output[2 * ostride]) = tmp31 + tmp32; c_im(output[3 * ostride]) = tmp32 - tmp31; } } fftw_codelet_desc fftwi_no_twiddle_5_desc = { "fftwi_no_twiddle_5", (void (*)()) fftwi_no_twiddle_5, 5, FFTW_BACKWARD, FFTW_NOTW, 122, 0, (const int *) 0, }; �����������������������������������������������������������������������������fftw-2.1.5/fftw/fni_6.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000011020�07637527154�010273� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:19 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 6 */ /* * This function contains 36 FP additions, 8 FP multiplications, * (or, 32 additions, 4 multiplications, 4 fused multiply/add), * 20 stack variables, and 24 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_6(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp11; fftw_real tmp26; fftw_real tmp29; fftw_real tmp6; fftw_real tmp12; fftw_real tmp9; fftw_real tmp13; fftw_real tmp10; fftw_real tmp14; fftw_real tmp18; fftw_real tmp31; fftw_real tmp21; fftw_real tmp30; fftw_real tmp27; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[3 * istride]); tmp3 = tmp1 - tmp2; tmp11 = tmp1 + tmp2; tmp24 = c_im(input[0]); tmp25 = c_im(input[3 * istride]); tmp26 = tmp24 - tmp25; tmp29 = tmp24 + tmp25; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[5 * istride]); tmp6 = tmp4 - tmp5; tmp12 = tmp4 + tmp5; tmp7 = c_re(input[4 * istride]); tmp8 = c_re(input[istride]); tmp9 = tmp7 - tmp8; tmp13 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp14 = tmp12 + tmp13; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = c_im(input[4 * istride]); tmp17 = c_im(input[istride]); tmp18 = tmp16 - tmp17; tmp31 = tmp16 + tmp17; tmp19 = c_im(input[2 * istride]); tmp20 = c_im(input[5 * istride]); tmp21 = tmp19 - tmp20; tmp30 = tmp19 + tmp20; } tmp27 = tmp21 + tmp18; tmp32 = tmp30 + tmp31; { fftw_real tmp15; fftw_real tmp22; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; c_re(output[3 * ostride]) = tmp3 + tmp10; tmp15 = tmp3 - (K500000000 * tmp10); tmp22 = K866025403 * (tmp18 - tmp21); c_re(output[5 * ostride]) = tmp15 - tmp22; c_re(output[ostride]) = tmp15 + tmp22; c_re(output[0]) = tmp11 + tmp14; tmp35 = tmp11 - (K500000000 * tmp14); tmp36 = K866025403 * (tmp31 - tmp30); c_re(output[2 * ostride]) = tmp35 - tmp36; c_re(output[4 * ostride]) = tmp35 + tmp36; } { fftw_real tmp23; fftw_real tmp28; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; c_im(output[3 * ostride]) = tmp26 + tmp27; tmp23 = K866025403 * (tmp6 - tmp9); tmp28 = tmp26 - (K500000000 * tmp27); c_im(output[ostride]) = tmp23 + tmp28; c_im(output[5 * ostride]) = tmp28 - tmp23; c_im(output[0]) = tmp29 + tmp32; tmp33 = tmp29 - (K500000000 * tmp32); tmp34 = K866025403 * (tmp12 - tmp13); c_im(output[2 * ostride]) = tmp33 - tmp34; c_im(output[4 * ostride]) = tmp34 + tmp33; } } fftw_codelet_desc fftwi_no_twiddle_6_desc = { "fftwi_no_twiddle_6", (void (*)()) fftwi_no_twiddle_6, 6, FFTW_BACKWARD, FFTW_NOTW, 144, 0, (const int *) 0, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_7.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000013730�07637527161�010304� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:20 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 7 */ /* * This function contains 60 FP additions, 36 FP multiplications, * (or, 60 additions, 36 multiplications, 0 fused multiply/add), * 22 stack variables, and 28 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_7(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp15; fftw_real tmp4; fftw_real tmp11; fftw_real tmp21; fftw_real tmp31; fftw_real tmp7; fftw_real tmp13; fftw_real tmp24; fftw_real tmp33; fftw_real tmp10; fftw_real tmp12; fftw_real tmp18; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp15 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[6 * istride]); tmp4 = tmp2 + tmp3; tmp11 = tmp2 - tmp3; tmp19 = c_im(input[istride]); tmp20 = c_im(input[6 * istride]); tmp21 = tmp19 + tmp20; tmp31 = tmp20 - tmp19; } { fftw_real tmp5; fftw_real tmp6; fftw_real tmp22; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[5 * istride]); tmp7 = tmp5 + tmp6; tmp13 = tmp5 - tmp6; tmp22 = c_im(input[2 * istride]); tmp23 = c_im(input[5 * istride]); tmp24 = tmp22 + tmp23; tmp33 = tmp23 - tmp22; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[3 * istride]); tmp9 = c_re(input[4 * istride]); tmp10 = tmp8 + tmp9; tmp12 = tmp8 - tmp9; tmp16 = c_im(input[3 * istride]); tmp17 = c_im(input[4 * istride]); tmp18 = tmp16 + tmp17; tmp32 = tmp17 - tmp16; } { fftw_real tmp36; fftw_real tmp35; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10; tmp36 = (K974927912 * tmp33) + (K433883739 * tmp32) + (K781831482 * tmp31); tmp35 = tmp1 + (K623489801 * tmp4) - (K900968867 * tmp10) - (K222520933 * tmp7); c_re(output[6 * ostride]) = tmp35 - tmp36; c_re(output[ostride]) = tmp35 + tmp36; { fftw_real tmp38; fftw_real tmp37; fftw_real tmp34; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp38 = (K974927912 * tmp32) + (K433883739 * tmp31) - (K781831482 * tmp33); tmp37 = tmp1 + (K623489801 * tmp7) - (K222520933 * tmp10) - (K900968867 * tmp4); c_re(output[4 * ostride]) = tmp37 - tmp38; c_re(output[3 * ostride]) = tmp37 + tmp38; tmp34 = (K974927912 * tmp31) - (K781831482 * tmp32) - (K433883739 * tmp33); tmp30 = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); c_re(output[5 * ostride]) = tmp30 - tmp34; c_re(output[2 * ostride]) = tmp30 + tmp34; } c_im(output[0]) = tmp15 + tmp24 + tmp18 + tmp21; tmp26 = (K433883739 * tmp11) + (K974927912 * tmp12) - (K781831482 * tmp13); tmp27 = tmp15 + (K623489801 * tmp24) - (K900968867 * tmp21) - (K222520933 * tmp18); c_im(output[3 * ostride]) = tmp26 + tmp27; c_im(output[4 * ostride]) = tmp27 - tmp26; { fftw_real tmp14; fftw_real tmp25; fftw_real tmp28; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp14 = (K974927912 * tmp11) - (K781831482 * tmp12) - (K433883739 * tmp13); tmp25 = tmp15 + (K623489801 * tmp18) - (K222520933 * tmp21) - (K900968867 * tmp24); c_im(output[2 * ostride]) = tmp14 + tmp25; c_im(output[5 * ostride]) = tmp25 - tmp14; tmp28 = (K781831482 * tmp11) + (K974927912 * tmp13) + (K433883739 * tmp12); tmp29 = tmp15 + (K623489801 * tmp21) - (K900968867 * tmp18) - (K222520933 * tmp24); c_im(output[ostride]) = tmp28 + tmp29; c_im(output[6 * ostride]) = tmp29 - tmp28; } } } fftw_codelet_desc fftwi_no_twiddle_7_desc = { "fftwi_no_twiddle_7", (void (*)()) fftwi_no_twiddle_7, 7, FFTW_BACKWARD, FFTW_NOTW, 166, 0, (const int *) 0, }; ����������������������������������������fftw-2.1.5/fftw/fni_8.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000013205�07637527161�010302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:25 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 8 */ /* * This function contains 52 FP additions, 4 FP multiplications, * (or, 52 additions, 4 multiplications, 0 fused multiply/add), * 26 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_8(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp37; fftw_real tmp18; fftw_real tmp23; fftw_real tmp6; fftw_real tmp24; fftw_real tmp21; fftw_real tmp38; fftw_real tmp13; fftw_real tmp49; fftw_real tmp35; fftw_real tmp43; fftw_real tmp10; fftw_real tmp48; fftw_real tmp30; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[4 * istride]); tmp3 = tmp1 + tmp2; tmp37 = tmp1 - tmp2; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp16 = c_im(input[0]); tmp17 = c_im(input[4 * istride]); tmp18 = tmp16 + tmp17; tmp23 = tmp16 - tmp17; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[6 * istride]); tmp6 = tmp4 + tmp5; tmp24 = tmp4 - tmp5; } tmp19 = c_im(input[2 * istride]); tmp20 = c_im(input[6 * istride]); tmp21 = tmp19 + tmp20; tmp38 = tmp19 - tmp20; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp31; fftw_real tmp32; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[7 * istride]); tmp12 = c_re(input[3 * istride]); tmp31 = tmp11 - tmp12; tmp32 = c_im(input[7 * istride]); tmp33 = c_im(input[3 * istride]); tmp34 = tmp32 - tmp33; tmp13 = tmp11 + tmp12; tmp49 = tmp32 + tmp33; tmp35 = tmp31 + tmp34; tmp43 = tmp34 - tmp31; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp26; fftw_real tmp27; fftw_real tmp28; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[istride]); tmp9 = c_re(input[5 * istride]); tmp26 = tmp8 - tmp9; tmp27 = c_im(input[istride]); tmp28 = c_im(input[5 * istride]); tmp29 = tmp27 - tmp28; tmp10 = tmp8 + tmp9; tmp48 = tmp27 + tmp28; tmp30 = tmp26 - tmp29; tmp42 = tmp26 + tmp29; } } { fftw_real tmp7; fftw_real tmp14; fftw_real tmp15; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; c_re(output[4 * ostride]) = tmp7 - tmp14; c_re(output[0]) = tmp7 + tmp14; tmp15 = tmp10 - tmp13; tmp22 = tmp18 - tmp21; c_im(output[2 * ostride]) = tmp15 + tmp22; c_im(output[6 * ostride]) = tmp22 - tmp15; } { fftw_real tmp47; fftw_real tmp50; fftw_real tmp51; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp18 + tmp21; tmp50 = tmp48 + tmp49; c_im(output[4 * ostride]) = tmp47 - tmp50; c_im(output[0]) = tmp47 + tmp50; tmp51 = tmp3 - tmp6; tmp52 = tmp49 - tmp48; c_re(output[6 * ostride]) = tmp51 - tmp52; c_re(output[2 * ostride]) = tmp51 + tmp52; } { fftw_real tmp25; fftw_real tmp36; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp25 = tmp23 - tmp24; tmp36 = K707106781 * (tmp30 - tmp35); c_im(output[7 * ostride]) = tmp25 - tmp36; c_im(output[3 * ostride]) = tmp25 + tmp36; tmp39 = tmp37 - tmp38; tmp40 = K707106781 * (tmp30 + tmp35); c_re(output[5 * ostride]) = tmp39 - tmp40; c_re(output[ostride]) = tmp39 + tmp40; } { fftw_real tmp45; fftw_real tmp46; fftw_real tmp41; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp37 + tmp38; tmp46 = K707106781 * (tmp43 - tmp42); c_re(output[7 * ostride]) = tmp45 - tmp46; c_re(output[3 * ostride]) = tmp45 + tmp46; tmp41 = tmp24 + tmp23; tmp44 = K707106781 * (tmp42 + tmp43); c_im(output[5 * ostride]) = tmp41 - tmp44; c_im(output[ostride]) = tmp41 + tmp44; } } fftw_codelet_desc fftwi_no_twiddle_8_desc = { "fftwi_no_twiddle_8", (void (*)()) fftwi_no_twiddle_8, 8, FFTW_BACKWARD, FFTW_NOTW, 188, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_9.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000020561�07637527164�010311� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:25 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 9 */ /* * This function contains 80 FP additions, 40 FP multiplications, * (or, 60 additions, 20 multiplications, 20 fused multiply/add), * 30 stack variables, and 36 memory accesses */ static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_9(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp37; fftw_real tmp57; fftw_real tmp22; fftw_real tmp56; fftw_real tmp38; fftw_real tmp10; fftw_real tmp42; fftw_real tmp66; fftw_real tmp27; fftw_real tmp45; fftw_real tmp67; fftw_real tmp15; fftw_real tmp52; fftw_real tmp69; fftw_real tmp32; fftw_real tmp49; fftw_real tmp70; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[3 * istride]); tmp3 = c_re(input[6 * istride]); tmp4 = tmp2 + tmp3; tmp5 = tmp1 + tmp4; tmp37 = tmp1 - (K500000000 * tmp4); tmp57 = K866025403 * (tmp2 - tmp3); } { fftw_real tmp18; fftw_real tmp19; fftw_real tmp20; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp18 = c_im(input[0]); tmp19 = c_im(input[3 * istride]); tmp20 = c_im(input[6 * istride]); tmp21 = tmp19 + tmp20; tmp22 = tmp18 + tmp21; tmp56 = tmp18 - (K500000000 * tmp21); tmp38 = K866025403 * (tmp20 - tmp19); } { fftw_real tmp6; fftw_real tmp23; fftw_real tmp9; fftw_real tmp44; fftw_real tmp26; fftw_real tmp41; fftw_real tmp40; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[istride]); tmp23 = c_im(input[istride]); { fftw_real tmp7; fftw_real tmp8; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[4 * istride]); tmp8 = c_re(input[7 * istride]); tmp9 = tmp7 + tmp8; tmp44 = K866025403 * (tmp7 - tmp8); tmp24 = c_im(input[4 * istride]); tmp25 = c_im(input[7 * istride]); tmp26 = tmp24 + tmp25; tmp41 = K866025403 * (tmp25 - tmp24); } tmp10 = tmp6 + tmp9; tmp40 = tmp6 - (K500000000 * tmp9); tmp42 = tmp40 - tmp41; tmp66 = tmp40 + tmp41; tmp27 = tmp23 + tmp26; tmp43 = tmp23 - (K500000000 * tmp26); tmp45 = tmp43 - tmp44; tmp67 = tmp44 + tmp43; } { fftw_real tmp11; fftw_real tmp28; fftw_real tmp14; fftw_real tmp48; fftw_real tmp31; fftw_real tmp51; fftw_real tmp50; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[2 * istride]); tmp28 = c_im(input[2 * istride]); { fftw_real tmp12; fftw_real tmp13; fftw_real tmp29; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp12 = c_re(input[5 * istride]); tmp13 = c_re(input[8 * istride]); tmp14 = tmp12 + tmp13; tmp48 = K866025403 * (tmp12 - tmp13); tmp29 = c_im(input[5 * istride]); tmp30 = c_im(input[8 * istride]); tmp31 = tmp29 + tmp30; tmp51 = K866025403 * (tmp30 - tmp29); } tmp15 = tmp11 + tmp14; tmp50 = tmp11 - (K500000000 * tmp14); tmp52 = tmp50 - tmp51; tmp69 = tmp50 + tmp51; tmp32 = tmp28 + tmp31; tmp47 = tmp28 - (K500000000 * tmp31); tmp49 = tmp47 - tmp48; tmp70 = tmp48 + tmp47; } { fftw_real tmp36; fftw_real tmp16; fftw_real tmp35; fftw_real tmp17; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp36 = K866025403 * (tmp32 - tmp27); tmp16 = tmp10 + tmp15; tmp35 = tmp5 - (K500000000 * tmp16); c_re(output[0]) = tmp5 + tmp16; c_re(output[3 * ostride]) = tmp35 + tmp36; c_re(output[6 * ostride]) = tmp35 - tmp36; tmp17 = K866025403 * (tmp10 - tmp15); tmp33 = tmp27 + tmp32; tmp34 = tmp22 - (K500000000 * tmp33); c_im(output[3 * ostride]) = tmp17 + tmp34; c_im(output[6 * ostride]) = tmp34 - tmp17; c_im(output[0]) = tmp22 + tmp33; } { fftw_real tmp39; fftw_real tmp61; fftw_real tmp64; fftw_real tmp58; fftw_real tmp54; fftw_real tmp55; fftw_real tmp63; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp59; fftw_real tmp60; fftw_real tmp46; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; tmp39 = tmp37 - tmp38; tmp59 = (K173648177 * tmp45) + (K984807753 * tmp42); tmp60 = (K342020143 * tmp52) - (K939692620 * tmp49); tmp61 = tmp59 + tmp60; tmp64 = K866025403 * (tmp60 - tmp59); tmp58 = tmp56 - tmp57; tmp46 = (K173648177 * tmp42) - (K984807753 * tmp45); tmp53 = (K342020143 * tmp49) + (K939692620 * tmp52); tmp54 = tmp46 - tmp53; tmp55 = K866025403 * (tmp46 + tmp53); } c_re(output[2 * ostride]) = tmp39 + tmp54; tmp63 = tmp39 - (K500000000 * tmp54); c_re(output[8 * ostride]) = tmp63 - tmp64; c_re(output[5 * ostride]) = tmp63 + tmp64; c_im(output[2 * ostride]) = tmp58 + tmp61; tmp62 = tmp58 - (K500000000 * tmp61); c_im(output[5 * ostride]) = tmp55 + tmp62; c_im(output[8 * ostride]) = tmp62 - tmp55; } { fftw_real tmp65; fftw_real tmp77; fftw_real tmp80; fftw_real tmp74; fftw_real tmp72; fftw_real tmp73; fftw_real tmp79; fftw_real tmp78; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp75; fftw_real tmp76; fftw_real tmp68; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; tmp65 = tmp37 + tmp38; tmp75 = (K766044443 * tmp67) + (K642787609 * tmp66); tmp76 = (K173648177 * tmp70) + (K984807753 * tmp69); tmp77 = tmp75 + tmp76; tmp80 = K866025403 * (tmp76 - tmp75); tmp74 = tmp57 + tmp56; tmp68 = (K766044443 * tmp66) - (K642787609 * tmp67); tmp71 = (K173648177 * tmp69) - (K984807753 * tmp70); tmp72 = tmp68 + tmp71; tmp73 = K866025403 * (tmp68 - tmp71); } c_re(output[ostride]) = tmp65 + tmp72; tmp79 = tmp65 - (K500000000 * tmp72); c_re(output[7 * ostride]) = tmp79 - tmp80; c_re(output[4 * ostride]) = tmp79 + tmp80; c_im(output[ostride]) = tmp74 + tmp77; tmp78 = tmp74 - (K500000000 * tmp77); c_im(output[4 * ostride]) = tmp73 + tmp78; c_im(output[7 * ostride]) = tmp78 - tmp73; } } fftw_codelet_desc fftwi_no_twiddle_9_desc = { "fftwi_no_twiddle_9", (void (*)()) fftwi_no_twiddle_9, 9, FFTW_BACKWARD, FFTW_NOTW, 210, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_10.c����������������������������������������������������������������������������0000644�0001754�0000144�00000020052�07637527165�010355� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:28 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 10 */ /* * This function contains 84 FP additions, 24 FP multiplications, * (or, 72 additions, 12 multiplications, 12 fused multiply/add), * 36 stack variables, and 40 memory accesses */ static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_10(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp19; fftw_real tmp67; fftw_real tmp76; fftw_real tmp59; fftw_real tmp60; fftw_real tmp10; fftw_real tmp17; fftw_real tmp18; fftw_real tmp74; fftw_real tmp73; fftw_real tmp22; fftw_real tmp25; fftw_real tmp26; fftw_real tmp36; fftw_real tmp43; fftw_real tmp62; fftw_real tmp63; fftw_real tmp68; fftw_real tmp52; fftw_real tmp55; fftw_real tmp77; fftw_real tmp78; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp65; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[5 * istride]); tmp3 = tmp1 - tmp2; tmp19 = tmp1 + tmp2; tmp65 = c_im(input[0]); tmp66 = c_im(input[5 * istride]); tmp67 = tmp65 - tmp66; tmp76 = tmp65 + tmp66; } { fftw_real tmp6; fftw_real tmp20; fftw_real tmp16; fftw_real tmp24; fftw_real tmp9; fftw_real tmp21; fftw_real tmp13; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[7 * istride]); tmp6 = tmp4 - tmp5; tmp20 = tmp4 + tmp5; tmp14 = c_re(input[6 * istride]); tmp15 = c_re(input[istride]); tmp16 = tmp14 - tmp15; tmp24 = tmp14 + tmp15; } { fftw_real tmp7; fftw_real tmp8; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[8 * istride]); tmp8 = c_re(input[3 * istride]); tmp9 = tmp7 - tmp8; tmp21 = tmp7 + tmp8; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[9 * istride]); tmp13 = tmp11 - tmp12; tmp23 = tmp11 + tmp12; } tmp59 = tmp6 - tmp9; tmp60 = tmp13 - tmp16; tmp10 = tmp6 + tmp9; tmp17 = tmp13 + tmp16; tmp18 = tmp10 + tmp17; tmp74 = tmp23 - tmp24; tmp73 = tmp20 - tmp21; tmp22 = tmp20 + tmp21; tmp25 = tmp23 + tmp24; tmp26 = tmp22 + tmp25; } { fftw_real tmp32; fftw_real tmp50; fftw_real tmp42; fftw_real tmp54; fftw_real tmp35; fftw_real tmp51; fftw_real tmp39; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp30; fftw_real tmp31; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp30 = c_im(input[2 * istride]); tmp31 = c_im(input[7 * istride]); tmp32 = tmp30 - tmp31; tmp50 = tmp30 + tmp31; tmp40 = c_im(input[6 * istride]); tmp41 = c_im(input[istride]); tmp42 = tmp40 - tmp41; tmp54 = tmp40 + tmp41; } { fftw_real tmp33; fftw_real tmp34; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp33 = c_im(input[8 * istride]); tmp34 = c_im(input[3 * istride]); tmp35 = tmp33 - tmp34; tmp51 = tmp33 + tmp34; tmp37 = c_im(input[4 * istride]); tmp38 = c_im(input[9 * istride]); tmp39 = tmp37 - tmp38; tmp53 = tmp37 + tmp38; } tmp36 = tmp32 - tmp35; tmp43 = tmp39 - tmp42; tmp62 = tmp32 + tmp35; tmp63 = tmp39 + tmp42; tmp68 = tmp62 + tmp63; tmp52 = tmp50 - tmp51; tmp55 = tmp53 - tmp54; tmp77 = tmp50 + tmp51; tmp78 = tmp53 + tmp54; tmp79 = tmp77 + tmp78; } c_re(output[5 * ostride]) = tmp3 + tmp18; { fftw_real tmp44; fftw_real tmp46; fftw_real tmp29; fftw_real tmp45; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp44 = (K587785252 * tmp36) - (K951056516 * tmp43); tmp46 = (K951056516 * tmp36) + (K587785252 * tmp43); tmp27 = tmp3 - (K250000000 * tmp18); tmp28 = K559016994 * (tmp10 - tmp17); tmp29 = tmp27 - tmp28; tmp45 = tmp28 + tmp27; c_re(output[7 * ostride]) = tmp29 - tmp44; c_re(output[3 * ostride]) = tmp29 + tmp44; c_re(output[ostride]) = tmp45 - tmp46; c_re(output[9 * ostride]) = tmp45 + tmp46; } c_re(output[0]) = tmp19 + tmp26; { fftw_real tmp56; fftw_real tmp58; fftw_real tmp49; fftw_real tmp57; fftw_real tmp47; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp56 = (K587785252 * tmp52) - (K951056516 * tmp55); tmp58 = (K951056516 * tmp52) + (K587785252 * tmp55); tmp47 = tmp19 - (K250000000 * tmp26); tmp48 = K559016994 * (tmp22 - tmp25); tmp49 = tmp47 - tmp48; tmp57 = tmp48 + tmp47; c_re(output[2 * ostride]) = tmp49 - tmp56; c_re(output[8 * ostride]) = tmp49 + tmp56; c_re(output[6 * ostride]) = tmp57 - tmp58; c_re(output[4 * ostride]) = tmp57 + tmp58; } c_im(output[5 * ostride]) = tmp68 + tmp67; { fftw_real tmp61; fftw_real tmp72; fftw_real tmp70; fftw_real tmp71; fftw_real tmp64; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp61 = (K951056516 * tmp59) + (K587785252 * tmp60); tmp72 = (K587785252 * tmp59) - (K951056516 * tmp60); tmp64 = K559016994 * (tmp62 - tmp63); tmp69 = tmp67 - (K250000000 * tmp68); tmp70 = tmp64 + tmp69; tmp71 = tmp69 - tmp64; c_im(output[ostride]) = tmp61 + tmp70; c_im(output[9 * ostride]) = tmp70 - tmp61; c_im(output[3 * ostride]) = tmp71 - tmp72; c_im(output[7 * ostride]) = tmp72 + tmp71; } c_im(output[0]) = tmp79 + tmp76; { fftw_real tmp75; fftw_real tmp84; fftw_real tmp82; fftw_real tmp83; fftw_real tmp80; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp75 = (K587785252 * tmp73) - (K951056516 * tmp74); tmp84 = (K951056516 * tmp73) + (K587785252 * tmp74); tmp80 = tmp76 - (K250000000 * tmp79); tmp81 = K559016994 * (tmp77 - tmp78); tmp82 = tmp80 - tmp81; tmp83 = tmp81 + tmp80; c_im(output[2 * ostride]) = tmp75 + tmp82; c_im(output[8 * ostride]) = tmp82 - tmp75; c_im(output[4 * ostride]) = tmp83 - tmp84; c_im(output[6 * ostride]) = tmp84 + tmp83; } } fftw_codelet_desc fftwi_no_twiddle_10_desc = { "fftwi_no_twiddle_10", (void (*)()) fftwi_no_twiddle_10, 10, FFTW_BACKWARD, FFTW_NOTW, 232, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_11.c����������������������������������������������������������������������������0000644�0001754�0000144�00000023632�07637527205�010360� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:29 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 11 */ /* * This function contains 140 FP additions, 100 FP multiplications, * (or, 140 additions, 100 multiplications, 0 fused multiply/add), * 30 stack variables, and 44 memory accesses */ static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_11(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp23; fftw_real tmp4; fftw_real tmp17; fftw_real tmp32; fftw_real tmp51; fftw_real tmp38; fftw_real tmp53; fftw_real tmp7; fftw_real tmp21; fftw_real tmp10; fftw_real tmp18; fftw_real tmp29; fftw_real tmp50; fftw_real tmp13; fftw_real tmp19; fftw_real tmp35; fftw_real tmp49; fftw_real tmp26; fftw_real tmp52; fftw_real tmp16; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp30; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp23 = c_im(input[0]); tmp2 = c_re(input[istride]); tmp3 = c_re(input[10 * istride]); tmp4 = tmp2 + tmp3; tmp17 = tmp2 - tmp3; tmp30 = c_im(input[istride]); tmp31 = c_im(input[10 * istride]); tmp32 = tmp30 + tmp31; tmp51 = tmp31 - tmp30; { fftw_real tmp36; fftw_real tmp37; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp36 = c_im(input[2 * istride]); tmp37 = c_im(input[9 * istride]); tmp38 = tmp36 + tmp37; tmp53 = tmp37 - tmp36; tmp5 = c_re(input[2 * istride]); tmp6 = c_re(input[9 * istride]); tmp7 = tmp5 + tmp6; tmp21 = tmp5 - tmp6; } } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[3 * istride]); tmp9 = c_re(input[8 * istride]); tmp10 = tmp8 + tmp9; tmp18 = tmp8 - tmp9; { fftw_real tmp27; fftw_real tmp28; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp27 = c_im(input[3 * istride]); tmp28 = c_im(input[8 * istride]); tmp29 = tmp27 + tmp28; tmp50 = tmp28 - tmp27; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[7 * istride]); tmp13 = tmp11 + tmp12; tmp19 = tmp11 - tmp12; } tmp33 = c_im(input[4 * istride]); tmp34 = c_im(input[7 * istride]); tmp35 = tmp33 + tmp34; tmp49 = tmp34 - tmp33; { fftw_real tmp24; fftw_real tmp25; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp24 = c_im(input[5 * istride]); tmp25 = c_im(input[6 * istride]); tmp26 = tmp24 + tmp25; tmp52 = tmp25 - tmp24; tmp14 = c_re(input[5 * istride]); tmp15 = c_re(input[6 * istride]); tmp16 = tmp14 + tmp15; tmp20 = tmp14 - tmp15; } } { fftw_real tmp56; fftw_real tmp55; fftw_real tmp44; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; c_re(output[0]) = tmp1 + tmp4 + tmp7 + tmp10 + tmp13 + tmp16; { fftw_real tmp62; fftw_real tmp61; fftw_real tmp58; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp62 = (K989821441 * tmp52) + (K755749574 * tmp50) + (K281732556 * tmp51) - (K909631995 * tmp49) - (K540640817 * tmp53); tmp61 = tmp1 + (K841253532 * tmp7) + (K415415013 * tmp13) - (K142314838 * tmp16) - (K654860733 * tmp10) - (K959492973 * tmp4); c_re(output[6 * ostride]) = tmp61 - tmp62; c_re(output[5 * ostride]) = tmp61 + tmp62; tmp58 = (K909631995 * tmp53) + (K755749574 * tmp49) + (K281732556 * tmp52) + (K989821441 * tmp50) + (K540640817 * tmp51); tmp57 = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp7) - (K959492973 * tmp16) - (K654860733 * tmp13) - (K142314838 * tmp10); c_re(output[10 * ostride]) = tmp57 - tmp58; c_re(output[ostride]) = tmp57 + tmp58; } tmp56 = (K755749574 * tmp53) + (K909631995 * tmp51) - (K281732556 * tmp50) - (K540640817 * tmp52) - (K989821441 * tmp49); tmp55 = tmp1 + (K415415013 * tmp4) + (K841253532 * tmp16) - (K142314838 * tmp13) - (K959492973 * tmp10) - (K654860733 * tmp7); c_re(output[9 * ostride]) = tmp55 - tmp56; c_re(output[2 * ostride]) = tmp55 + tmp56; { fftw_real tmp60; fftw_real tmp59; fftw_real tmp54; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp60 = (K540640817 * tmp49) + (K755749574 * tmp52) + (K989821441 * tmp51) - (K909631995 * tmp50) - (K281732556 * tmp53); tmp59 = tmp1 + (K415415013 * tmp10) + (K841253532 * tmp13) - (K654860733 * tmp16) - (K959492973 * tmp7) - (K142314838 * tmp4); c_re(output[8 * ostride]) = tmp59 - tmp60; c_re(output[3 * ostride]) = tmp59 + tmp60; tmp54 = (K281732556 * tmp49) + (K540640817 * tmp50) + (K755749574 * tmp51) - (K909631995 * tmp52) - (K989821441 * tmp53); tmp48 = tmp1 + (K841253532 * tmp10) + (K415415013 * tmp16) - (K959492973 * tmp13) - (K142314838 * tmp7) - (K654860733 * tmp4); c_re(output[7 * ostride]) = tmp48 - tmp54; c_re(output[4 * ostride]) = tmp48 + tmp54; } c_im(output[0]) = tmp23 + tmp38 + tmp35 + tmp26 + tmp29 + tmp32; { fftw_real tmp22; fftw_real tmp39; fftw_real tmp42; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp22 = (K755749574 * tmp17) + (K540640817 * tmp18) + (K281732556 * tmp19) - (K909631995 * tmp20) - (K989821441 * tmp21); tmp39 = tmp23 + (K415415013 * tmp26) + (K841253532 * tmp29) - (K654860733 * tmp32) - (K959492973 * tmp35) - (K142314838 * tmp38); c_im(output[4 * ostride]) = tmp22 + tmp39; c_im(output[7 * ostride]) = tmp39 - tmp22; tmp42 = (K281732556 * tmp17) + (K755749574 * tmp18) + (K989821441 * tmp20) - (K909631995 * tmp19) - (K540640817 * tmp21); tmp43 = tmp23 + (K841253532 * tmp38) + (K415415013 * tmp35) - (K959492973 * tmp32) - (K654860733 * tmp29) - (K142314838 * tmp26); c_im(output[5 * ostride]) = tmp42 + tmp43; c_im(output[6 * ostride]) = tmp43 - tmp42; } tmp44 = (K540640817 * tmp17) + (K909631995 * tmp21) + (K989821441 * tmp18) + (K755749574 * tmp19) + (K281732556 * tmp20); tmp45 = tmp23 + (K415415013 * tmp38) + (K841253532 * tmp32) - (K142314838 * tmp29) - (K959492973 * tmp26) - (K654860733 * tmp35); c_im(output[ostride]) = tmp44 + tmp45; c_im(output[10 * ostride]) = tmp45 - tmp44; { fftw_real tmp40; fftw_real tmp41; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp40 = (K989821441 * tmp17) + (K540640817 * tmp19) + (K755749574 * tmp20) - (K909631995 * tmp18) - (K281732556 * tmp21); tmp41 = tmp23 + (K841253532 * tmp35) + (K415415013 * tmp29) - (K142314838 * tmp32) - (K654860733 * tmp26) - (K959492973 * tmp38); c_im(output[3 * ostride]) = tmp40 + tmp41; c_im(output[8 * ostride]) = tmp41 - tmp40; tmp46 = (K909631995 * tmp17) + (K755749574 * tmp21) - (K540640817 * tmp20) - (K989821441 * tmp19) - (K281732556 * tmp18); tmp47 = tmp23 + (K841253532 * tmp26) + (K415415013 * tmp32) - (K959492973 * tmp29) - (K142314838 * tmp35) - (K654860733 * tmp38); c_im(output[2 * ostride]) = tmp46 + tmp47; c_im(output[9 * ostride]) = tmp47 - tmp46; } } } fftw_codelet_desc fftwi_no_twiddle_11_desc = { "fftwi_no_twiddle_11", (void (*)()) fftwi_no_twiddle_11, 11, FFTW_BACKWARD, FFTW_NOTW, 254, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_12.c����������������������������������������������������������������������������0000644�0001754�0000144�00000021537�07637527175�010371� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:36 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 12 */ /* * This function contains 96 FP additions, 16 FP multiplications, * (or, 88 additions, 8 multiplications, 8 fused multiply/add), * 40 stack variables, and 48 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_12(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp35; fftw_real tmp57; fftw_real tmp27; fftw_real tmp58; fftw_real tmp36; fftw_real tmp10; fftw_real tmp38; fftw_real tmp60; fftw_real tmp32; fftw_real tmp61; fftw_real tmp39; fftw_real tmp16; fftw_real tmp82; fftw_real tmp42; fftw_real tmp47; fftw_real tmp76; fftw_real tmp83; fftw_real tmp21; fftw_real tmp85; fftw_real tmp49; fftw_real tmp54; fftw_real tmp77; fftw_real tmp86; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[4 * istride]); tmp3 = c_re(input[8 * istride]); tmp4 = tmp2 + tmp3; tmp5 = tmp1 + tmp4; tmp35 = tmp1 - (K500000000 * tmp4); tmp57 = K866025403 * (tmp2 - tmp3); } { fftw_real tmp23; fftw_real tmp24; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp23 = c_im(input[0]); tmp24 = c_im(input[4 * istride]); tmp25 = c_im(input[8 * istride]); tmp26 = tmp24 + tmp25; tmp27 = tmp23 + tmp26; tmp58 = tmp23 - (K500000000 * tmp26); tmp36 = K866025403 * (tmp25 - tmp24); } { fftw_real tmp6; fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[6 * istride]); tmp7 = c_re(input[10 * istride]); tmp8 = c_re(input[2 * istride]); tmp9 = tmp7 + tmp8; tmp10 = tmp6 + tmp9; tmp38 = tmp6 - (K500000000 * tmp9); tmp60 = K866025403 * (tmp7 - tmp8); } { fftw_real tmp28; fftw_real tmp29; fftw_real tmp30; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp28 = c_im(input[6 * istride]); tmp29 = c_im(input[10 * istride]); tmp30 = c_im(input[2 * istride]); tmp31 = tmp29 + tmp30; tmp32 = tmp28 + tmp31; tmp61 = tmp28 - (K500000000 * tmp31); tmp39 = K866025403 * (tmp30 - tmp29); } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp12 = c_re(input[3 * istride]); tmp13 = c_re(input[7 * istride]); tmp14 = c_re(input[11 * istride]); tmp15 = tmp13 + tmp14; tmp16 = tmp12 + tmp15; tmp82 = tmp12 - (K500000000 * tmp15); tmp42 = K866025403 * (tmp13 - tmp14); } { fftw_real tmp43; fftw_real tmp44; fftw_real tmp45; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp43 = c_im(input[3 * istride]); tmp44 = c_im(input[7 * istride]); tmp45 = c_im(input[11 * istride]); tmp46 = tmp44 + tmp45; tmp47 = tmp43 - (K500000000 * tmp46); tmp76 = tmp43 + tmp46; tmp83 = K866025403 * (tmp45 - tmp44); } { fftw_real tmp17; fftw_real tmp18; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp17 = c_re(input[9 * istride]); tmp18 = c_re(input[istride]); tmp19 = c_re(input[5 * istride]); tmp20 = tmp18 + tmp19; tmp21 = tmp17 + tmp20; tmp85 = tmp17 - (K500000000 * tmp20); tmp49 = K866025403 * (tmp18 - tmp19); } { fftw_real tmp50; fftw_real tmp51; fftw_real tmp52; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; tmp50 = c_im(input[9 * istride]); tmp51 = c_im(input[istride]); tmp52 = c_im(input[5 * istride]); tmp53 = tmp51 + tmp52; tmp54 = tmp50 - (K500000000 * tmp53); tmp77 = tmp50 + tmp53; tmp86 = K866025403 * (tmp52 - tmp51); } { fftw_real tmp11; fftw_real tmp22; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp11 = tmp5 + tmp10; tmp22 = tmp16 + tmp21; c_re(output[6 * ostride]) = tmp11 - tmp22; c_re(output[0]) = tmp11 + tmp22; { fftw_real tmp75; fftw_real tmp78; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp75 = tmp5 - tmp10; tmp78 = tmp76 - tmp77; c_re(output[9 * ostride]) = tmp75 - tmp78; c_re(output[3 * ostride]) = tmp75 + tmp78; tmp79 = tmp27 + tmp32; tmp80 = tmp76 + tmp77; c_im(output[6 * ostride]) = tmp79 - tmp80; c_im(output[0]) = tmp79 + tmp80; } tmp33 = tmp27 - tmp32; tmp34 = tmp16 - tmp21; c_im(output[3 * ostride]) = tmp33 - tmp34; c_im(output[9 * ostride]) = tmp34 + tmp33; { fftw_real tmp67; fftw_real tmp89; fftw_real tmp88; fftw_real tmp90; fftw_real tmp70; fftw_real tmp74; fftw_real tmp73; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp65; fftw_real tmp66; fftw_real tmp84; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp65 = tmp35 - tmp36; tmp66 = tmp38 - tmp39; tmp67 = tmp65 - tmp66; tmp89 = tmp65 + tmp66; tmp84 = tmp82 - tmp83; tmp87 = tmp85 - tmp86; tmp88 = tmp84 - tmp87; tmp90 = tmp84 + tmp87; } { fftw_real tmp68; fftw_real tmp69; fftw_real tmp71; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp68 = tmp47 - tmp42; tmp69 = tmp54 - tmp49; tmp70 = tmp68 - tmp69; tmp74 = tmp68 + tmp69; tmp71 = tmp58 - tmp57; tmp72 = tmp61 - tmp60; tmp73 = tmp71 + tmp72; tmp81 = tmp71 - tmp72; } c_re(output[5 * ostride]) = tmp67 - tmp70; c_re(output[11 * ostride]) = tmp67 + tmp70; c_im(output[2 * ostride]) = tmp73 - tmp74; c_im(output[8 * ostride]) = tmp73 + tmp74; c_im(output[11 * ostride]) = tmp81 - tmp88; c_im(output[5 * ostride]) = tmp81 + tmp88; c_re(output[2 * ostride]) = tmp89 - tmp90; c_re(output[8 * ostride]) = tmp89 + tmp90; } { fftw_real tmp41; fftw_real tmp95; fftw_real tmp94; fftw_real tmp96; fftw_real tmp56; fftw_real tmp64; fftw_real tmp63; fftw_real tmp91; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp37; fftw_real tmp40; fftw_real tmp92; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp37 = tmp35 + tmp36; tmp40 = tmp38 + tmp39; tmp41 = tmp37 - tmp40; tmp95 = tmp37 + tmp40; tmp92 = tmp82 + tmp83; tmp93 = tmp85 + tmp86; tmp94 = tmp92 - tmp93; tmp96 = tmp92 + tmp93; } { fftw_real tmp48; fftw_real tmp55; fftw_real tmp59; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp48 = tmp42 + tmp47; tmp55 = tmp49 + tmp54; tmp56 = tmp48 - tmp55; tmp64 = tmp48 + tmp55; tmp59 = tmp57 + tmp58; tmp62 = tmp60 + tmp61; tmp63 = tmp59 + tmp62; tmp91 = tmp59 - tmp62; } c_re(output[ostride]) = tmp41 - tmp56; c_re(output[7 * ostride]) = tmp41 + tmp56; c_im(output[10 * ostride]) = tmp63 - tmp64; c_im(output[4 * ostride]) = tmp63 + tmp64; c_im(output[7 * ostride]) = tmp91 - tmp94; c_im(output[ostride]) = tmp91 + tmp94; c_re(output[10 * ostride]) = tmp95 - tmp96; c_re(output[4 * ostride]) = tmp95 + tmp96; } } } fftw_codelet_desc fftwi_no_twiddle_12_desc = { "fftwi_no_twiddle_12", (void (*)()) fftwi_no_twiddle_12, 12, FFTW_BACKWARD, FFTW_NOTW, 276, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_13.c����������������������������������������������������������������������������0000644�0001754�0000144�00000040736�07637527206�010367� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:37 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 13 */ /* * This function contains 176 FP additions, 68 FP multiplications, * (or, 138 additions, 30 multiplications, 38 fused multiply/add), * 50 stack variables, and 52 memory accesses */ static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_13(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp1; fftw_real tmp146; fftw_real tmp113; fftw_real tmp24; fftw_real tmp38; fftw_real tmp36; fftw_real tmp41; fftw_real tmp116; fftw_real tmp120; fftw_real tmp125; fftw_real tmp31; fftw_real tmp40; fftw_real tmp123; fftw_real tmp126; fftw_real tmp56; fftw_real tmp80; fftw_real tmp82; fftw_real tmp137; fftw_real tmp144; fftw_real tmp67; fftw_real tmp141; fftw_real tmp147; fftw_real tmp134; fftw_real tmp143; fftw_real tmp75; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp146 = c_im(input[0]); { fftw_real tmp15; fftw_real tmp114; fftw_real tmp18; fftw_real tmp26; fftw_real tmp21; fftw_real tmp25; fftw_real tmp22; fftw_real tmp115; fftw_real tmp6; fftw_real tmp32; fftw_real tmp28; fftw_real tmp11; fftw_real tmp33; fftw_real tmp29; fftw_real tmp13; fftw_real tmp14; fftw_real tmp118; fftw_real tmp119; ASSERT_ALIGNED_DOUBLE; tmp13 = c_re(input[8 * istride]); tmp14 = c_re(input[5 * istride]); tmp15 = tmp13 + tmp14; tmp114 = tmp13 - tmp14; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[6 * istride]); tmp17 = c_re(input[11 * istride]); tmp18 = tmp16 + tmp17; tmp26 = tmp16 - tmp17; tmp19 = c_re(input[2 * istride]); tmp20 = c_re(input[7 * istride]); tmp21 = tmp19 + tmp20; tmp25 = tmp19 - tmp20; } tmp22 = tmp18 + tmp21; tmp115 = tmp26 + tmp25; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[istride]); tmp3 = c_re(input[3 * istride]); tmp4 = c_re(input[9 * istride]); tmp5 = tmp3 + tmp4; tmp6 = tmp2 + tmp5; tmp32 = tmp2 - (K500000000 * tmp5); tmp28 = tmp3 - tmp4; } { fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp7 = c_re(input[12 * istride]); tmp8 = c_re(input[4 * istride]); tmp9 = c_re(input[10 * istride]); tmp10 = tmp8 + tmp9; tmp11 = tmp7 + tmp10; tmp33 = tmp7 - (K500000000 * tmp10); tmp29 = tmp8 - tmp9; } tmp113 = tmp6 - tmp11; { fftw_real tmp12; fftw_real tmp23; fftw_real tmp34; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp12 = tmp6 + tmp11; tmp23 = tmp15 + tmp22; tmp24 = tmp12 + tmp23; tmp38 = K300462606 * (tmp12 - tmp23); tmp34 = tmp32 + tmp33; tmp35 = tmp15 - (K500000000 * tmp22); tmp36 = tmp34 - tmp35; tmp41 = tmp34 + tmp35; } tmp116 = tmp114 - tmp115; tmp118 = K866025403 * (tmp28 + tmp29); tmp119 = tmp114 + (K500000000 * tmp115); tmp120 = tmp118 + tmp119; tmp125 = tmp119 - tmp118; { fftw_real tmp27; fftw_real tmp30; fftw_real tmp121; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp27 = tmp25 - tmp26; tmp30 = tmp28 - tmp29; tmp31 = tmp27 - tmp30; tmp40 = tmp30 + tmp27; tmp121 = tmp32 - tmp33; tmp122 = K866025403 * (tmp18 - tmp21); tmp123 = tmp121 - tmp122; tmp126 = tmp121 + tmp122; } } { fftw_real tmp48; fftw_real tmp131; fftw_real tmp66; fftw_real tmp70; fftw_real tmp77; fftw_real tmp61; fftw_real tmp69; fftw_real tmp76; fftw_real tmp51; fftw_real tmp73; fftw_real tmp54; fftw_real tmp72; fftw_real tmp55; fftw_real tmp132; fftw_real tmp46; fftw_real tmp47; fftw_real tmp139; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; tmp46 = c_im(input[8 * istride]); tmp47 = c_im(input[5 * istride]); tmp48 = tmp46 - tmp47; tmp131 = tmp46 + tmp47; { fftw_real tmp62; fftw_real tmp63; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp62 = c_im(input[12 * istride]); tmp63 = c_im(input[4 * istride]); tmp64 = c_im(input[10 * istride]); tmp65 = tmp63 + tmp64; tmp66 = tmp62 + tmp65; tmp70 = tmp62 - (K500000000 * tmp65); tmp77 = tmp63 - tmp64; } { fftw_real tmp57; fftw_real tmp58; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp57 = c_im(input[istride]); tmp58 = c_im(input[3 * istride]); tmp59 = c_im(input[9 * istride]); tmp60 = tmp58 + tmp59; tmp61 = tmp57 + tmp60; tmp69 = tmp57 - (K500000000 * tmp60); tmp76 = tmp58 - tmp59; } { fftw_real tmp49; fftw_real tmp50; fftw_real tmp52; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; tmp49 = c_im(input[6 * istride]); tmp50 = c_im(input[11 * istride]); tmp51 = tmp49 - tmp50; tmp73 = tmp49 + tmp50; tmp52 = c_im(input[2 * istride]); tmp53 = c_im(input[7 * istride]); tmp54 = tmp52 - tmp53; tmp72 = tmp52 + tmp53; } tmp55 = tmp51 + tmp54; tmp132 = tmp73 + tmp72; tmp56 = tmp48 - tmp55; { fftw_real tmp78; fftw_real tmp79; fftw_real tmp135; fftw_real tmp136; ASSERT_ALIGNED_DOUBLE; tmp78 = K866025403 * (tmp76 + tmp77); tmp79 = tmp48 + (K500000000 * tmp55); tmp80 = tmp78 - tmp79; tmp82 = tmp78 + tmp79; tmp135 = tmp51 - tmp54; tmp136 = tmp77 - tmp76; tmp137 = tmp135 - tmp136; tmp144 = tmp136 + tmp135; } tmp67 = tmp61 - tmp66; tmp139 = tmp61 + tmp66; tmp140 = tmp131 + tmp132; tmp141 = K300462606 * (tmp139 - tmp140); tmp147 = tmp139 + tmp140; { fftw_real tmp130; fftw_real tmp133; fftw_real tmp71; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp130 = tmp69 + tmp70; tmp133 = tmp131 - (K500000000 * tmp132); tmp134 = tmp130 - tmp133; tmp143 = tmp130 + tmp133; tmp71 = tmp69 - tmp70; tmp74 = K866025403 * (tmp72 - tmp73); tmp75 = tmp71 - tmp74; tmp83 = tmp71 + tmp74; } } c_re(output[0]) = tmp1 + tmp24; { fftw_real tmp100; fftw_real tmp108; fftw_real tmp39; fftw_real tmp105; fftw_real tmp95; fftw_real tmp44; fftw_real tmp68; fftw_real tmp85; fftw_real tmp96; fftw_real tmp106; fftw_real tmp88; fftw_real tmp91; fftw_real tmp101; fftw_real tmp109; fftw_real tmp98; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = (K387390585 * tmp31) - (K265966249 * tmp36); tmp99 = (K113854479 * tmp40) - (K503537032 * tmp41); tmp100 = tmp98 + tmp99; tmp108 = tmp99 - tmp98; { fftw_real tmp37; fftw_real tmp94; fftw_real tmp42; fftw_real tmp43; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp37 = (K132983124 * tmp31) + (K258260390 * tmp36); tmp94 = tmp38 - tmp37; tmp42 = (K251768516 * tmp40) + (K075902986 * tmp41); tmp43 = tmp1 - (K083333333 * tmp24); tmp93 = tmp43 - tmp42; tmp39 = (K2_000000000 * tmp37) + tmp38; tmp105 = tmp94 + tmp93; tmp95 = tmp93 - tmp94; tmp44 = (K2_000000000 * tmp42) + tmp43; } { fftw_real tmp81; fftw_real tmp84; fftw_real tmp89; fftw_real tmp90; ASSERT_ALIGNED_DOUBLE; tmp68 = (K575140729 * tmp56) - (K174138601 * tmp67); tmp81 = (K011599105 * tmp75) - (K300238635 * tmp80); tmp84 = (K256247671 * tmp82) + (K156891391 * tmp83); tmp85 = tmp81 - tmp84; tmp96 = K1_732050807 * (tmp81 + tmp84); tmp106 = tmp68 - tmp85; tmp88 = (K575140729 * tmp67) + (K174138601 * tmp56); tmp89 = (K256247671 * tmp83) - (K156891391 * tmp82); tmp90 = (K011599105 * tmp80) + (K300238635 * tmp75); tmp91 = tmp89 - tmp90; tmp101 = tmp88 + tmp91; tmp109 = K1_732050807 * (tmp90 + tmp89); } { fftw_real tmp45; fftw_real tmp86; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp39 + tmp44; tmp86 = tmp68 + (K2_000000000 * tmp85); c_re(output[12 * ostride]) = tmp45 - tmp86; c_re(output[ostride]) = tmp45 + tmp86; { fftw_real tmp87; fftw_real tmp92; fftw_real tmp97; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp87 = tmp44 - tmp39; tmp92 = tmp88 - (K2_000000000 * tmp91); c_re(output[5 * ostride]) = tmp87 - tmp92; c_re(output[8 * ostride]) = tmp87 + tmp92; tmp97 = tmp95 - tmp96; tmp102 = tmp100 + tmp101; c_re(output[2 * ostride]) = tmp97 - tmp102; c_re(output[7 * ostride]) = tmp97 + tmp102; } tmp103 = tmp95 + tmp96; tmp104 = tmp101 - tmp100; c_re(output[6 * ostride]) = tmp103 - tmp104; c_re(output[11 * ostride]) = tmp103 + tmp104; { fftw_real tmp111; fftw_real tmp112; fftw_real tmp107; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp111 = tmp105 - tmp106; tmp112 = tmp109 - tmp108; c_re(output[4 * ostride]) = tmp111 - tmp112; c_re(output[10 * ostride]) = tmp111 + tmp112; tmp107 = tmp105 + tmp106; tmp110 = tmp108 + tmp109; c_re(output[3 * ostride]) = tmp107 - tmp110; c_re(output[9 * ostride]) = tmp107 + tmp110; } } } c_im(output[0]) = tmp147 + tmp146; { fftw_real tmp160; fftw_real tmp173; fftw_real tmp142; fftw_real tmp170; fftw_real tmp165; fftw_real tmp149; fftw_real tmp117; fftw_real tmp128; fftw_real tmp162; fftw_real tmp169; fftw_real tmp151; fftw_real tmp154; fftw_real tmp157; fftw_real tmp172; fftw_real tmp158; fftw_real tmp159; ASSERT_ALIGNED_DOUBLE; tmp158 = (K387390585 * tmp137) + (K265966249 * tmp134); tmp159 = (K113854479 * tmp144) + (K503537032 * tmp143); tmp160 = tmp158 + tmp159; tmp173 = tmp158 - tmp159; { fftw_real tmp138; fftw_real tmp164; fftw_real tmp145; fftw_real tmp148; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; tmp138 = (K258260390 * tmp134) - (K132983124 * tmp137); tmp164 = tmp141 - tmp138; tmp145 = (K075902986 * tmp143) - (K251768516 * tmp144); tmp148 = tmp146 - (K083333333 * tmp147); tmp163 = tmp148 - tmp145; tmp142 = (K2_000000000 * tmp138) + tmp141; tmp170 = tmp164 + tmp163; tmp165 = tmp163 - tmp164; tmp149 = (K2_000000000 * tmp145) + tmp148; } { fftw_real tmp124; fftw_real tmp127; fftw_real tmp152; fftw_real tmp153; ASSERT_ALIGNED_DOUBLE; tmp117 = (K174138601 * tmp113) - (K575140729 * tmp116); tmp124 = (K256247671 * tmp120) + (K156891391 * tmp123); tmp127 = (K300238635 * tmp125) + (K011599105 * tmp126); tmp128 = tmp124 - tmp127; tmp162 = K1_732050807 * (tmp124 + tmp127); tmp169 = tmp117 - tmp128; tmp151 = (K575140729 * tmp113) + (K174138601 * tmp116); tmp152 = (K256247671 * tmp123) - (K156891391 * tmp120); tmp153 = (K011599105 * tmp125) - (K300238635 * tmp126); tmp154 = tmp152 + tmp153; tmp157 = tmp151 + tmp154; tmp172 = K1_732050807 * (tmp153 - tmp152); } { fftw_real tmp129; fftw_real tmp150; fftw_real tmp167; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp129 = tmp117 + (K2_000000000 * tmp128); tmp150 = tmp142 + tmp149; c_im(output[ostride]) = tmp129 + tmp150; c_im(output[12 * ostride]) = tmp150 - tmp129; { fftw_real tmp155; fftw_real tmp156; fftw_real tmp161; fftw_real tmp166; ASSERT_ALIGNED_DOUBLE; tmp155 = tmp151 - (K2_000000000 * tmp154); tmp156 = tmp149 - tmp142; c_im(output[5 * ostride]) = tmp155 + tmp156; c_im(output[8 * ostride]) = tmp156 - tmp155; tmp161 = tmp157 + tmp160; tmp166 = tmp162 + tmp165; c_im(output[2 * ostride]) = tmp161 + tmp166; c_im(output[7 * ostride]) = tmp166 - tmp161; } tmp167 = tmp165 - tmp162; tmp168 = tmp160 - tmp157; c_im(output[6 * ostride]) = tmp167 - tmp168; c_im(output[11 * ostride]) = tmp168 + tmp167; { fftw_real tmp175; fftw_real tmp176; fftw_real tmp171; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp175 = tmp170 - tmp169; tmp176 = tmp172 - tmp173; c_im(output[4 * ostride]) = tmp175 - tmp176; c_im(output[10 * ostride]) = tmp176 + tmp175; tmp171 = tmp169 + tmp170; tmp174 = tmp172 + tmp173; c_im(output[3 * ostride]) = tmp171 - tmp174; c_im(output[9 * ostride]) = tmp174 + tmp171; } } } } fftw_codelet_desc fftwi_no_twiddle_13_desc = { "fftwi_no_twiddle_13", (void (*)()) fftwi_no_twiddle_13, 13, FFTW_BACKWARD, FFTW_NOTW, 298, 0, (const int *) 0, }; ����������������������������������fftw-2.1.5/fftw/fni_14.c����������������������������������������������������������������������������0000644�0001754�0000144�00000027137�07637527217�010372� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:45 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 14 */ /* * This function contains 148 FP additions, 72 FP multiplications, * (or, 148 additions, 72 multiplications, 0 fused multiply/add), * 36 stack variables, and 56 memory accesses */ static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_14(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp3; fftw_real tmp25; fftw_real tmp84; fftw_real tmp93; fftw_real tmp10; fftw_real tmp77; fftw_real tmp28; fftw_real tmp97; fftw_real tmp42; fftw_real tmp86; fftw_real tmp65; fftw_real tmp92; fftw_real tmp17; fftw_real tmp79; fftw_real tmp31; fftw_real tmp99; fftw_real tmp56; fftw_real tmp81; fftw_real tmp68; fftw_real tmp94; fftw_real tmp24; fftw_real tmp78; fftw_real tmp34; fftw_real tmp98; fftw_real tmp49; fftw_real tmp85; fftw_real tmp71; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[7 * istride]); tmp3 = tmp1 - tmp2; tmp25 = tmp1 + tmp2; tmp82 = c_im(input[0]); tmp83 = c_im(input[7 * istride]); tmp84 = tmp82 - tmp83; tmp93 = tmp82 + tmp83; } { fftw_real tmp6; fftw_real tmp26; fftw_real tmp9; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[2 * istride]); tmp5 = c_re(input[9 * istride]); tmp6 = tmp4 - tmp5; tmp26 = tmp4 + tmp5; tmp7 = c_re(input[12 * istride]); tmp8 = c_re(input[5 * istride]); tmp9 = tmp7 - tmp8; tmp27 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp77 = tmp6 - tmp9; tmp28 = tmp26 + tmp27; tmp97 = tmp26 - tmp27; } { fftw_real tmp38; fftw_real tmp63; fftw_real tmp41; fftw_real tmp64; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp36; fftw_real tmp37; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp36 = c_im(input[12 * istride]); tmp37 = c_im(input[5 * istride]); tmp38 = tmp36 - tmp37; tmp63 = tmp36 + tmp37; tmp39 = c_im(input[2 * istride]); tmp40 = c_im(input[9 * istride]); tmp41 = tmp39 - tmp40; tmp64 = tmp39 + tmp40; } tmp42 = tmp38 - tmp41; tmp86 = tmp38 + tmp41; tmp65 = tmp63 - tmp64; tmp92 = tmp63 + tmp64; } { fftw_real tmp13; fftw_real tmp29; fftw_real tmp16; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[4 * istride]); tmp12 = c_re(input[11 * istride]); tmp13 = tmp11 - tmp12; tmp29 = tmp11 + tmp12; tmp14 = c_re(input[10 * istride]); tmp15 = c_re(input[3 * istride]); tmp16 = tmp14 - tmp15; tmp30 = tmp14 + tmp15; } tmp17 = tmp13 + tmp16; tmp79 = tmp13 - tmp16; tmp31 = tmp29 + tmp30; tmp99 = tmp30 - tmp29; } { fftw_real tmp52; fftw_real tmp67; fftw_real tmp55; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp50; fftw_real tmp51; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp50 = c_im(input[10 * istride]); tmp51 = c_im(input[3 * istride]); tmp52 = tmp50 - tmp51; tmp67 = tmp50 + tmp51; tmp53 = c_im(input[4 * istride]); tmp54 = c_im(input[11 * istride]); tmp55 = tmp53 - tmp54; tmp66 = tmp53 + tmp54; } tmp56 = tmp52 - tmp55; tmp81 = tmp52 + tmp55; tmp68 = tmp66 - tmp67; tmp94 = tmp67 + tmp66; } { fftw_real tmp20; fftw_real tmp32; fftw_real tmp23; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp18; fftw_real tmp19; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp18 = c_re(input[6 * istride]); tmp19 = c_re(input[13 * istride]); tmp20 = tmp18 - tmp19; tmp32 = tmp18 + tmp19; tmp21 = c_re(input[8 * istride]); tmp22 = c_re(input[istride]); tmp23 = tmp21 - tmp22; tmp33 = tmp21 + tmp22; } tmp24 = tmp20 + tmp23; tmp78 = tmp20 - tmp23; tmp34 = tmp32 + tmp33; tmp98 = tmp33 - tmp32; } { fftw_real tmp45; fftw_real tmp70; fftw_real tmp48; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp44; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp43 = c_im(input[8 * istride]); tmp44 = c_im(input[istride]); tmp45 = tmp43 - tmp44; tmp70 = tmp43 + tmp44; tmp46 = c_im(input[6 * istride]); tmp47 = c_im(input[13 * istride]); tmp48 = tmp46 - tmp47; tmp69 = tmp46 + tmp47; } tmp49 = tmp45 - tmp48; tmp85 = tmp45 + tmp48; tmp71 = tmp69 - tmp70; tmp95 = tmp70 + tmp69; } { fftw_real tmp57; fftw_real tmp35; fftw_real tmp72; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; c_re(output[7 * ostride]) = tmp3 + tmp10 + tmp17 + tmp24; tmp57 = (K433883739 * tmp42) + (K974927912 * tmp49) - (K781831482 * tmp56); tmp35 = tmp3 + (K623489801 * tmp17) - (K222520933 * tmp24) - (K900968867 * tmp10); c_re(output[11 * ostride]) = tmp35 - tmp57; c_re(output[3 * ostride]) = tmp35 + tmp57; { fftw_real tmp59; fftw_real tmp58; fftw_real tmp61; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp59 = (K974927912 * tmp42) - (K433883739 * tmp56) - (K781831482 * tmp49); tmp58 = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); c_re(output[5 * ostride]) = tmp58 - tmp59; c_re(output[9 * ostride]) = tmp58 + tmp59; tmp61 = (K781831482 * tmp42) + (K433883739 * tmp49) + (K974927912 * tmp56); tmp60 = tmp3 + (K623489801 * tmp10) - (K900968867 * tmp24) - (K222520933 * tmp17); c_re(output[13 * ostride]) = tmp60 - tmp61; c_re(output[ostride]) = tmp60 + tmp61; } c_re(output[0]) = tmp25 + tmp28 + tmp31 + tmp34; tmp72 = (K781831482 * tmp65) - (K974927912 * tmp68) - (K433883739 * tmp71); tmp62 = tmp25 + (K623489801 * tmp28) - (K900968867 * tmp34) - (K222520933 * tmp31); c_re(output[6 * ostride]) = tmp62 - tmp72; c_re(output[8 * ostride]) = tmp62 + tmp72; { fftw_real tmp74; fftw_real tmp73; fftw_real tmp76; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; tmp74 = (K433883739 * tmp65) + (K781831482 * tmp68) - (K974927912 * tmp71); tmp73 = tmp25 + (K623489801 * tmp31) - (K222520933 * tmp34) - (K900968867 * tmp28); c_re(output[4 * ostride]) = tmp73 - tmp74; c_re(output[10 * ostride]) = tmp73 + tmp74; tmp76 = (K974927912 * tmp65) + (K781831482 * tmp71) + (K433883739 * tmp68); tmp75 = tmp25 + (K623489801 * tmp34) - (K900968867 * tmp31) - (K222520933 * tmp28); c_re(output[12 * ostride]) = tmp75 - tmp76; c_re(output[2 * ostride]) = tmp75 + tmp76; } } { fftw_real tmp91; fftw_real tmp90; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; c_im(output[7 * ostride]) = tmp86 + tmp85 + tmp81 + tmp84; tmp91 = (K974927912 * tmp77) - (K781831482 * tmp78) - (K433883739 * tmp79); tmp90 = (K623489801 * tmp85) + tmp84 - (K900968867 * tmp81) - (K222520933 * tmp86); c_im(output[5 * ostride]) = tmp90 - tmp91; c_im(output[9 * ostride]) = tmp91 + tmp90; { fftw_real tmp88; fftw_real tmp89; fftw_real tmp80; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp88 = (K781831482 * tmp77) + (K974927912 * tmp79) + (K433883739 * tmp78); tmp89 = (K623489801 * tmp86) + tmp84 - (K222520933 * tmp81) - (K900968867 * tmp85); c_im(output[ostride]) = tmp88 + tmp89; c_im(output[13 * ostride]) = tmp89 - tmp88; tmp80 = (K433883739 * tmp77) + (K974927912 * tmp78) - (K781831482 * tmp79); tmp87 = (K623489801 * tmp81) + tmp84 - (K222520933 * tmp85) - (K900968867 * tmp86); c_im(output[3 * ostride]) = tmp80 + tmp87; c_im(output[11 * ostride]) = tmp87 - tmp80; } c_im(output[0]) = tmp92 + tmp95 + tmp94 + tmp93; tmp103 = (K974927912 * tmp97) + (K433883739 * tmp99) + (K781831482 * tmp98); tmp104 = (K623489801 * tmp95) + tmp93 - (K900968867 * tmp94) - (K222520933 * tmp92); c_im(output[2 * ostride]) = tmp103 + tmp104; c_im(output[12 * ostride]) = tmp104 - tmp103; { fftw_real tmp100; fftw_real tmp96; fftw_real tmp102; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; tmp100 = (K781831482 * tmp97) - (K433883739 * tmp98) - (K974927912 * tmp99); tmp96 = (K623489801 * tmp92) + tmp93 - (K222520933 * tmp94) - (K900968867 * tmp95); c_im(output[6 * ostride]) = tmp96 - tmp100; c_im(output[8 * ostride]) = tmp100 + tmp96; tmp102 = (K433883739 * tmp97) + (K781831482 * tmp99) - (K974927912 * tmp98); tmp101 = (K623489801 * tmp94) + tmp93 - (K222520933 * tmp95) - (K900968867 * tmp92); c_im(output[4 * ostride]) = tmp101 - tmp102; c_im(output[10 * ostride]) = tmp102 + tmp101; } } } fftw_codelet_desc fftwi_no_twiddle_14_desc = { "fftwi_no_twiddle_14", (void (*)()) fftwi_no_twiddle_14, 14, FFTW_BACKWARD, FFTW_NOTW, 320, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_15.c����������������������������������������������������������������������������0000644�0001754�0000144�00000032023�07637527212�010354� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:46 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 15 */ /* * This function contains 156 FP additions, 56 FP multiplications, * (or, 128 additions, 28 multiplications, 28 fused multiply/add), * 62 stack variables, and 60 memory accesses */ static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_15(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp5; fftw_real tmp121; fftw_real tmp148; fftw_real tmp87; fftw_real tmp35; fftw_real tmp67; fftw_real tmp21; fftw_real tmp26; fftw_real tmp27; fftw_real tmp111; fftw_real tmp114; fftw_real tmp123; fftw_real tmp139; fftw_real tmp140; fftw_real tmp146; fftw_real tmp81; fftw_real tmp82; fftw_real tmp89; fftw_real tmp71; fftw_real tmp72; fftw_real tmp73; fftw_real tmp57; fftw_real tmp64; fftw_real tmp65; fftw_real tmp10; fftw_real tmp15; fftw_real tmp16; fftw_real tmp104; fftw_real tmp107; fftw_real tmp122; fftw_real tmp136; fftw_real tmp137; fftw_real tmp145; fftw_real tmp78; fftw_real tmp79; fftw_real tmp88; fftw_real tmp68; fftw_real tmp69; fftw_real tmp70; fftw_real tmp42; fftw_real tmp49; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp30; fftw_real tmp4; fftw_real tmp29; fftw_real tmp33; fftw_real tmp120; fftw_real tmp119; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp30 = c_im(input[0]); { fftw_real tmp2; fftw_real tmp3; fftw_real tmp31; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp2 = c_re(input[5 * istride]); tmp3 = c_re(input[10 * istride]); tmp4 = tmp2 + tmp3; tmp29 = K866025403 * (tmp2 - tmp3); tmp31 = c_im(input[5 * istride]); tmp32 = c_im(input[10 * istride]); tmp33 = tmp31 + tmp32; tmp120 = K866025403 * (tmp32 - tmp31); } tmp5 = tmp1 + tmp4; tmp119 = tmp1 - (K500000000 * tmp4); tmp121 = tmp119 - tmp120; tmp148 = tmp119 + tmp120; tmp87 = tmp30 + tmp33; tmp34 = tmp30 - (K500000000 * tmp33); tmp35 = tmp29 + tmp34; tmp67 = tmp34 - tmp29; } { fftw_real tmp17; fftw_real tmp20; fftw_real tmp51; fftw_real tmp109; fftw_real tmp52; fftw_real tmp55; fftw_real tmp56; fftw_real tmp110; fftw_real tmp22; fftw_real tmp25; fftw_real tmp58; fftw_real tmp112; fftw_real tmp59; fftw_real tmp62; fftw_real tmp63; fftw_real tmp113; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp18; fftw_real tmp19; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp17 = c_re(input[6 * istride]); tmp18 = c_re(input[11 * istride]); tmp19 = c_re(input[istride]); tmp20 = tmp18 + tmp19; tmp51 = K866025403 * (tmp18 - tmp19); tmp109 = tmp17 - (K500000000 * tmp20); tmp52 = c_im(input[6 * istride]); tmp53 = c_im(input[11 * istride]); tmp54 = c_im(input[istride]); tmp55 = tmp53 + tmp54; tmp56 = tmp52 - (K500000000 * tmp55); tmp110 = K866025403 * (tmp54 - tmp53); } { fftw_real tmp23; fftw_real tmp24; fftw_real tmp60; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; tmp22 = c_re(input[9 * istride]); tmp23 = c_re(input[14 * istride]); tmp24 = c_re(input[4 * istride]); tmp25 = tmp23 + tmp24; tmp58 = K866025403 * (tmp23 - tmp24); tmp112 = tmp22 - (K500000000 * tmp25); tmp59 = c_im(input[9 * istride]); tmp60 = c_im(input[14 * istride]); tmp61 = c_im(input[4 * istride]); tmp62 = tmp60 + tmp61; tmp63 = tmp59 - (K500000000 * tmp62); tmp113 = K866025403 * (tmp61 - tmp60); } tmp21 = tmp17 + tmp20; tmp26 = tmp22 + tmp25; tmp27 = tmp21 + tmp26; tmp111 = tmp109 - tmp110; tmp114 = tmp112 - tmp113; tmp123 = tmp111 + tmp114; tmp139 = tmp109 + tmp110; tmp140 = tmp112 + tmp113; tmp146 = tmp139 + tmp140; tmp81 = tmp52 + tmp55; tmp82 = tmp59 + tmp62; tmp89 = tmp81 + tmp82; tmp71 = tmp56 - tmp51; tmp72 = tmp63 - tmp58; tmp73 = tmp71 + tmp72; tmp57 = tmp51 + tmp56; tmp64 = tmp58 + tmp63; tmp65 = tmp57 + tmp64; } { fftw_real tmp6; fftw_real tmp9; fftw_real tmp36; fftw_real tmp102; fftw_real tmp37; fftw_real tmp40; fftw_real tmp41; fftw_real tmp103; fftw_real tmp11; fftw_real tmp14; fftw_real tmp43; fftw_real tmp105; fftw_real tmp44; fftw_real tmp47; fftw_real tmp48; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp38; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp6 = c_re(input[3 * istride]); tmp7 = c_re(input[8 * istride]); tmp8 = c_re(input[13 * istride]); tmp9 = tmp7 + tmp8; tmp36 = K866025403 * (tmp7 - tmp8); tmp102 = tmp6 - (K500000000 * tmp9); tmp37 = c_im(input[3 * istride]); tmp38 = c_im(input[8 * istride]); tmp39 = c_im(input[13 * istride]); tmp40 = tmp38 + tmp39; tmp41 = tmp37 - (K500000000 * tmp40); tmp103 = K866025403 * (tmp39 - tmp38); } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp45; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[12 * istride]); tmp12 = c_re(input[2 * istride]); tmp13 = c_re(input[7 * istride]); tmp14 = tmp12 + tmp13; tmp43 = K866025403 * (tmp12 - tmp13); tmp105 = tmp11 - (K500000000 * tmp14); tmp44 = c_im(input[12 * istride]); tmp45 = c_im(input[2 * istride]); tmp46 = c_im(input[7 * istride]); tmp47 = tmp45 + tmp46; tmp48 = tmp44 - (K500000000 * tmp47); tmp106 = K866025403 * (tmp46 - tmp45); } tmp10 = tmp6 + tmp9; tmp15 = tmp11 + tmp14; tmp16 = tmp10 + tmp15; tmp104 = tmp102 - tmp103; tmp107 = tmp105 - tmp106; tmp122 = tmp104 + tmp107; tmp136 = tmp102 + tmp103; tmp137 = tmp105 + tmp106; tmp145 = tmp136 + tmp137; tmp78 = tmp37 + tmp40; tmp79 = tmp44 + tmp47; tmp88 = tmp78 + tmp79; tmp68 = tmp41 - tmp36; tmp69 = tmp48 - tmp43; tmp70 = tmp68 + tmp69; tmp42 = tmp36 + tmp41; tmp49 = tmp43 + tmp48; tmp50 = tmp42 + tmp49; } { fftw_real tmp76; fftw_real tmp28; fftw_real tmp75; fftw_real tmp84; fftw_real tmp86; fftw_real tmp80; fftw_real tmp83; fftw_real tmp85; fftw_real tmp77; ASSERT_ALIGNED_DOUBLE; tmp76 = K559016994 * (tmp16 - tmp27); tmp28 = tmp16 + tmp27; tmp75 = tmp5 - (K250000000 * tmp28); tmp80 = tmp78 - tmp79; tmp83 = tmp81 - tmp82; tmp84 = (K587785252 * tmp80) - (K951056516 * tmp83); tmp86 = (K951056516 * tmp80) + (K587785252 * tmp83); c_re(output[0]) = tmp5 + tmp28; tmp85 = tmp76 + tmp75; c_re(output[6 * ostride]) = tmp85 - tmp86; c_re(output[9 * ostride]) = tmp85 + tmp86; tmp77 = tmp75 - tmp76; c_re(output[12 * ostride]) = tmp77 - tmp84; c_re(output[3 * ostride]) = tmp77 + tmp84; } { fftw_real tmp134; fftw_real tmp66; fftw_real tmp133; fftw_real tmp142; fftw_real tmp144; fftw_real tmp138; fftw_real tmp141; fftw_real tmp143; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp134 = K559016994 * (tmp50 - tmp65); tmp66 = tmp50 + tmp65; tmp133 = tmp35 - (K250000000 * tmp66); tmp138 = tmp136 - tmp137; tmp141 = tmp139 - tmp140; tmp142 = (K587785252 * tmp138) - (K951056516 * tmp141); tmp144 = (K951056516 * tmp138) + (K587785252 * tmp141); c_im(output[10 * ostride]) = tmp35 + tmp66; tmp143 = tmp134 + tmp133; c_im(output[4 * ostride]) = tmp143 - tmp144; c_im(output[ostride]) = tmp143 + tmp144; tmp135 = tmp133 - tmp134; c_im(output[13 * ostride]) = tmp135 - tmp142; c_im(output[7 * ostride]) = tmp135 + tmp142; } { fftw_real tmp147; fftw_real tmp149; fftw_real tmp150; fftw_real tmp154; fftw_real tmp156; fftw_real tmp152; fftw_real tmp153; fftw_real tmp155; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp147 = K559016994 * (tmp145 - tmp146); tmp149 = tmp145 + tmp146; tmp150 = tmp148 - (K250000000 * tmp149); tmp152 = tmp42 - tmp49; tmp153 = tmp57 - tmp64; tmp154 = (K951056516 * tmp152) + (K587785252 * tmp153); tmp156 = (K587785252 * tmp152) - (K951056516 * tmp153); c_re(output[10 * ostride]) = tmp148 + tmp149; tmp155 = tmp150 - tmp147; c_re(output[7 * ostride]) = tmp155 - tmp156; c_re(output[13 * ostride]) = tmp156 + tmp155; tmp151 = tmp147 + tmp150; c_re(output[ostride]) = tmp151 - tmp154; c_re(output[4 * ostride]) = tmp154 + tmp151; } { fftw_real tmp126; fftw_real tmp124; fftw_real tmp125; fftw_real tmp130; fftw_real tmp132; fftw_real tmp128; fftw_real tmp129; fftw_real tmp131; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp126 = K559016994 * (tmp122 - tmp123); tmp124 = tmp122 + tmp123; tmp125 = tmp121 - (K250000000 * tmp124); tmp128 = tmp68 - tmp69; tmp129 = tmp71 - tmp72; tmp130 = (K587785252 * tmp128) - (K951056516 * tmp129); tmp132 = (K951056516 * tmp128) + (K587785252 * tmp129); c_re(output[5 * ostride]) = tmp121 + tmp124; tmp131 = tmp126 + tmp125; c_re(output[11 * ostride]) = tmp131 - tmp132; c_re(output[14 * ostride]) = tmp132 + tmp131; tmp127 = tmp125 - tmp126; c_re(output[2 * ostride]) = tmp127 - tmp130; c_re(output[8 * ostride]) = tmp130 + tmp127; } { fftw_real tmp92; fftw_real tmp90; fftw_real tmp91; fftw_real tmp96; fftw_real tmp97; fftw_real tmp94; fftw_real tmp95; fftw_real tmp98; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp92 = K559016994 * (tmp88 - tmp89); tmp90 = tmp88 + tmp89; tmp91 = tmp87 - (K250000000 * tmp90); tmp94 = tmp10 - tmp15; tmp95 = tmp21 - tmp26; tmp96 = (K587785252 * tmp94) - (K951056516 * tmp95); tmp97 = (K951056516 * tmp94) + (K587785252 * tmp95); c_im(output[0]) = tmp87 + tmp90; tmp98 = tmp92 + tmp91; c_im(output[6 * ostride]) = tmp97 + tmp98; c_im(output[9 * ostride]) = tmp98 - tmp97; tmp93 = tmp91 - tmp92; c_im(output[3 * ostride]) = tmp93 - tmp96; c_im(output[12 * ostride]) = tmp96 + tmp93; } { fftw_real tmp100; fftw_real tmp74; fftw_real tmp99; fftw_real tmp116; fftw_real tmp118; fftw_real tmp108; fftw_real tmp115; fftw_real tmp117; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; tmp100 = K559016994 * (tmp70 - tmp73); tmp74 = tmp70 + tmp73; tmp99 = tmp67 - (K250000000 * tmp74); tmp108 = tmp104 - tmp107; tmp115 = tmp111 - tmp114; tmp116 = (K587785252 * tmp108) - (K951056516 * tmp115); tmp118 = (K951056516 * tmp108) + (K587785252 * tmp115); c_im(output[5 * ostride]) = tmp67 + tmp74; tmp117 = tmp100 + tmp99; c_im(output[14 * ostride]) = tmp117 - tmp118; c_im(output[11 * ostride]) = tmp117 + tmp118; tmp101 = tmp99 - tmp100; c_im(output[8 * ostride]) = tmp101 - tmp116; c_im(output[2 * ostride]) = tmp101 + tmp116; } } fftw_codelet_desc fftwi_no_twiddle_15_desc = { "fftwi_no_twiddle_15", (void (*)()) fftwi_no_twiddle_15, 15, FFTW_BACKWARD, FFTW_NOTW, 342, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_16.c����������������������������������������������������������������������������0000644�0001754�0000144�00000030467�07637527213�010370� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:47 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 16 */ /* * This function contains 144 FP additions, 24 FP multiplications, * (or, 136 additions, 16 multiplications, 8 fused multiply/add), * 46 stack variables, and 64 memory accesses */ static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_16(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp7; fftw_real tmp129; fftw_real tmp38; fftw_real tmp115; fftw_real tmp49; fftw_real tmp95; fftw_real tmp83; fftw_real tmp105; fftw_real tmp29; fftw_real tmp123; fftw_real tmp73; fftw_real tmp101; fftw_real tmp78; fftw_real tmp102; fftw_real tmp126; fftw_real tmp141; fftw_real tmp14; fftw_real tmp116; fftw_real tmp45; fftw_real tmp130; fftw_real tmp52; fftw_real tmp84; fftw_real tmp55; fftw_real tmp85; fftw_real tmp22; fftw_real tmp118; fftw_real tmp62; fftw_real tmp98; fftw_real tmp67; fftw_real tmp99; fftw_real tmp121; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp81; fftw_real tmp34; fftw_real tmp48; fftw_real tmp6; fftw_real tmp47; fftw_real tmp37; fftw_real tmp82; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[8 * istride]); tmp3 = tmp1 + tmp2; tmp81 = tmp1 - tmp2; tmp32 = c_im(input[0]); tmp33 = c_im(input[8 * istride]); tmp34 = tmp32 + tmp33; tmp48 = tmp32 - tmp33; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[4 * istride]); tmp5 = c_re(input[12 * istride]); tmp6 = tmp4 + tmp5; tmp47 = tmp4 - tmp5; tmp35 = c_im(input[4 * istride]); tmp36 = c_im(input[12 * istride]); tmp37 = tmp35 + tmp36; tmp82 = tmp35 - tmp36; } tmp7 = tmp3 + tmp6; tmp129 = tmp3 - tmp6; tmp38 = tmp34 + tmp37; tmp115 = tmp34 - tmp37; tmp49 = tmp47 + tmp48; tmp95 = tmp48 - tmp47; tmp83 = tmp81 - tmp82; tmp105 = tmp81 + tmp82; } { fftw_real tmp25; fftw_real tmp74; fftw_real tmp72; fftw_real tmp124; fftw_real tmp28; fftw_real tmp69; fftw_real tmp77; fftw_real tmp125; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp70; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[15 * istride]); tmp24 = c_re(input[7 * istride]); tmp25 = tmp23 + tmp24; tmp74 = tmp23 - tmp24; tmp70 = c_im(input[15 * istride]); tmp71 = c_im(input[7 * istride]); tmp72 = tmp70 - tmp71; tmp124 = tmp70 + tmp71; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[3 * istride]); tmp27 = c_re(input[11 * istride]); tmp28 = tmp26 + tmp27; tmp69 = tmp26 - tmp27; tmp75 = c_im(input[3 * istride]); tmp76 = c_im(input[11 * istride]); tmp77 = tmp75 - tmp76; tmp125 = tmp75 + tmp76; } tmp29 = tmp25 + tmp28; tmp123 = tmp25 - tmp28; tmp73 = tmp69 + tmp72; tmp101 = tmp72 - tmp69; tmp78 = tmp74 - tmp77; tmp102 = tmp74 + tmp77; tmp126 = tmp124 - tmp125; tmp141 = tmp124 + tmp125; } { fftw_real tmp10; fftw_real tmp50; fftw_real tmp41; fftw_real tmp51; fftw_real tmp13; fftw_real tmp54; fftw_real tmp44; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[2 * istride]); tmp9 = c_re(input[10 * istride]); tmp10 = tmp8 + tmp9; tmp50 = tmp8 - tmp9; tmp39 = c_im(input[2 * istride]); tmp40 = c_im(input[10 * istride]); tmp41 = tmp39 + tmp40; tmp51 = tmp39 - tmp40; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp42; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[14 * istride]); tmp12 = c_re(input[6 * istride]); tmp13 = tmp11 + tmp12; tmp54 = tmp11 - tmp12; tmp42 = c_im(input[14 * istride]); tmp43 = c_im(input[6 * istride]); tmp44 = tmp42 + tmp43; tmp53 = tmp42 - tmp43; } tmp14 = tmp10 + tmp13; tmp116 = tmp10 - tmp13; tmp45 = tmp41 + tmp44; tmp130 = tmp44 - tmp41; tmp52 = tmp50 + tmp51; tmp84 = tmp50 - tmp51; tmp55 = tmp53 - tmp54; tmp85 = tmp54 + tmp53; } { fftw_real tmp18; fftw_real tmp63; fftw_real tmp61; fftw_real tmp119; fftw_real tmp21; fftw_real tmp58; fftw_real tmp66; fftw_real tmp120; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[istride]); tmp17 = c_re(input[9 * istride]); tmp18 = tmp16 + tmp17; tmp63 = tmp16 - tmp17; tmp59 = c_im(input[istride]); tmp60 = c_im(input[9 * istride]); tmp61 = tmp59 - tmp60; tmp119 = tmp59 + tmp60; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[5 * istride]); tmp20 = c_re(input[13 * istride]); tmp21 = tmp19 + tmp20; tmp58 = tmp19 - tmp20; tmp64 = c_im(input[5 * istride]); tmp65 = c_im(input[13 * istride]); tmp66 = tmp64 - tmp65; tmp120 = tmp64 + tmp65; } tmp22 = tmp18 + tmp21; tmp118 = tmp18 - tmp21; tmp62 = tmp58 + tmp61; tmp98 = tmp61 - tmp58; tmp67 = tmp63 - tmp66; tmp99 = tmp63 + tmp66; tmp121 = tmp119 - tmp120; tmp140 = tmp119 + tmp120; } { fftw_real tmp15; fftw_real tmp30; fftw_real tmp31; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; c_re(output[8 * ostride]) = tmp15 - tmp30; c_re(output[0]) = tmp15 + tmp30; tmp31 = tmp22 - tmp29; tmp46 = tmp38 - tmp45; c_im(output[4 * ostride]) = tmp31 + tmp46; c_im(output[12 * ostride]) = tmp46 - tmp31; } { fftw_real tmp139; fftw_real tmp142; fftw_real tmp143; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp139 = tmp38 + tmp45; tmp142 = tmp140 + tmp141; c_im(output[8 * ostride]) = tmp139 - tmp142; c_im(output[0]) = tmp139 + tmp142; tmp143 = tmp7 - tmp14; tmp144 = tmp141 - tmp140; c_re(output[12 * ostride]) = tmp143 - tmp144; c_re(output[4 * ostride]) = tmp143 + tmp144; } { fftw_real tmp117; fftw_real tmp131; fftw_real tmp128; fftw_real tmp132; fftw_real tmp122; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp117 = tmp115 - tmp116; tmp131 = tmp129 + tmp130; tmp122 = tmp118 - tmp121; tmp127 = tmp123 + tmp126; tmp128 = K707106781 * (tmp122 - tmp127); tmp132 = K707106781 * (tmp122 + tmp127); c_im(output[14 * ostride]) = tmp117 - tmp128; c_im(output[6 * ostride]) = tmp117 + tmp128; c_re(output[10 * ostride]) = tmp131 - tmp132; c_re(output[2 * ostride]) = tmp131 + tmp132; } { fftw_real tmp133; fftw_real tmp137; fftw_real tmp136; fftw_real tmp138; fftw_real tmp134; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp133 = tmp116 + tmp115; tmp137 = tmp129 - tmp130; tmp134 = tmp118 + tmp121; tmp135 = tmp126 - tmp123; tmp136 = K707106781 * (tmp134 + tmp135); tmp138 = K707106781 * (tmp135 - tmp134); c_im(output[10 * ostride]) = tmp133 - tmp136; c_im(output[2 * ostride]) = tmp133 + tmp136; c_re(output[14 * ostride]) = tmp137 - tmp138; c_re(output[6 * ostride]) = tmp137 + tmp138; } { fftw_real tmp57; fftw_real tmp89; fftw_real tmp92; fftw_real tmp94; fftw_real tmp87; fftw_real tmp93; fftw_real tmp80; fftw_real tmp88; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp56; fftw_real tmp90; fftw_real tmp91; fftw_real tmp86; fftw_real tmp68; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp56 = K707106781 * (tmp52 + tmp55); tmp57 = tmp49 + tmp56; tmp89 = tmp49 - tmp56; tmp90 = (K923879532 * tmp67) - (K382683432 * tmp62); tmp91 = (K382683432 * tmp73) + (K923879532 * tmp78); tmp92 = tmp90 - tmp91; tmp94 = tmp90 + tmp91; tmp86 = K707106781 * (tmp84 + tmp85); tmp87 = tmp83 - tmp86; tmp93 = tmp83 + tmp86; tmp68 = (K923879532 * tmp62) + (K382683432 * tmp67); tmp79 = (K923879532 * tmp73) - (K382683432 * tmp78); tmp80 = tmp68 + tmp79; tmp88 = tmp79 - tmp68; } c_im(output[9 * ostride]) = tmp57 - tmp80; c_im(output[ostride]) = tmp57 + tmp80; c_re(output[13 * ostride]) = tmp87 - tmp88; c_re(output[5 * ostride]) = tmp87 + tmp88; c_im(output[13 * ostride]) = tmp89 - tmp92; c_im(output[5 * ostride]) = tmp89 + tmp92; c_re(output[9 * ostride]) = tmp93 - tmp94; c_re(output[ostride]) = tmp93 + tmp94; } { fftw_real tmp97; fftw_real tmp109; fftw_real tmp112; fftw_real tmp114; fftw_real tmp107; fftw_real tmp113; fftw_real tmp104; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp96; fftw_real tmp110; fftw_real tmp111; fftw_real tmp106; fftw_real tmp100; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp96 = K707106781 * (tmp84 - tmp85); tmp97 = tmp95 + tmp96; tmp109 = tmp95 - tmp96; tmp110 = (K382683432 * tmp99) - (K923879532 * tmp98); tmp111 = (K923879532 * tmp101) + (K382683432 * tmp102); tmp112 = tmp110 - tmp111; tmp114 = tmp110 + tmp111; tmp106 = K707106781 * (tmp55 - tmp52); tmp107 = tmp105 - tmp106; tmp113 = tmp105 + tmp106; tmp100 = (K382683432 * tmp98) + (K923879532 * tmp99); tmp103 = (K382683432 * tmp101) - (K923879532 * tmp102); tmp104 = tmp100 + tmp103; tmp108 = tmp103 - tmp100; } c_im(output[11 * ostride]) = tmp97 - tmp104; c_im(output[3 * ostride]) = tmp97 + tmp104; c_re(output[15 * ostride]) = tmp107 - tmp108; c_re(output[7 * ostride]) = tmp107 + tmp108; c_im(output[15 * ostride]) = tmp109 - tmp112; c_im(output[7 * ostride]) = tmp109 + tmp112; c_re(output[11 * ostride]) = tmp113 - tmp114; c_re(output[3 * ostride]) = tmp113 + tmp114; } } fftw_codelet_desc fftwi_no_twiddle_16_desc = { "fftwi_no_twiddle_16", (void (*)()) fftwi_no_twiddle_16, 16, FFTW_BACKWARD, FFTW_NOTW, 364, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_32.c����������������������������������������������������������������������������0000644�0001754�0000144�00000074136�07637527233�010371� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:50 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 32 */ /* * This function contains 372 FP additions, 84 FP multiplications, * (or, 340 additions, 52 multiplications, 32 fused multiply/add), * 92 stack variables, and 128 memory accesses */ static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_32(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp7; fftw_real tmp339; fftw_real tmp70; fftw_real tmp313; fftw_real tmp97; fftw_real tmp215; fftw_real tmp179; fftw_real tmp241; fftw_real tmp14; fftw_real tmp314; fftw_real tmp77; fftw_real tmp340; fftw_real tmp182; fftw_real tmp216; fftw_real tmp104; fftw_real tmp242; fftw_real tmp153; fftw_real tmp236; fftw_real tmp53; fftw_real tmp60; fftw_real tmp287; fftw_real tmp336; fftw_real tmp360; fftw_real tmp290; fftw_real tmp293; fftw_real tmp294; fftw_real tmp170; fftw_real tmp233; fftw_real tmp333; fftw_real tmp359; fftw_real tmp164; fftw_real tmp234; fftw_real tmp173; fftw_real tmp237; fftw_real tmp22; fftw_real tmp318; fftw_real tmp343; fftw_real tmp85; fftw_real tmp112; fftw_real tmp185; fftw_real tmp220; fftw_real tmp245; fftw_real tmp29; fftw_real tmp321; fftw_real tmp342; fftw_real tmp92; fftw_real tmp119; fftw_real tmp184; fftw_real tmp223; fftw_real tmp244; fftw_real tmp126; fftw_real tmp229; fftw_real tmp38; fftw_real tmp45; fftw_real tmp278; fftw_real tmp329; fftw_real tmp357; fftw_real tmp281; fftw_real tmp284; fftw_real tmp285; fftw_real tmp143; fftw_real tmp226; fftw_real tmp326; fftw_real tmp356; fftw_real tmp137; fftw_real tmp227; fftw_real tmp146; fftw_real tmp230; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp177; fftw_real tmp66; fftw_real tmp96; fftw_real tmp6; fftw_real tmp95; fftw_real tmp69; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[16 * istride]); tmp3 = tmp1 + tmp2; tmp177 = tmp1 - tmp2; tmp64 = c_im(input[0]); tmp65 = c_im(input[16 * istride]); tmp66 = tmp64 + tmp65; tmp96 = tmp64 - tmp65; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[8 * istride]); tmp5 = c_re(input[24 * istride]); tmp6 = tmp4 + tmp5; tmp95 = tmp4 - tmp5; tmp67 = c_im(input[8 * istride]); tmp68 = c_im(input[24 * istride]); tmp69 = tmp67 + tmp68; tmp178 = tmp67 - tmp68; } tmp7 = tmp3 + tmp6; tmp339 = tmp3 - tmp6; tmp70 = tmp66 + tmp69; tmp313 = tmp66 - tmp69; tmp97 = tmp95 + tmp96; tmp215 = tmp96 - tmp95; tmp179 = tmp177 - tmp178; tmp241 = tmp177 + tmp178; } { fftw_real tmp10; fftw_real tmp98; fftw_real tmp73; fftw_real tmp99; fftw_real tmp13; fftw_real tmp102; fftw_real tmp76; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp71; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[4 * istride]); tmp9 = c_re(input[20 * istride]); tmp10 = tmp8 + tmp9; tmp98 = tmp8 - tmp9; tmp71 = c_im(input[4 * istride]); tmp72 = c_im(input[20 * istride]); tmp73 = tmp71 + tmp72; tmp99 = tmp71 - tmp72; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp74; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[28 * istride]); tmp12 = c_re(input[12 * istride]); tmp13 = tmp11 + tmp12; tmp102 = tmp11 - tmp12; tmp74 = c_im(input[28 * istride]); tmp75 = c_im(input[12 * istride]); tmp76 = tmp74 + tmp75; tmp101 = tmp74 - tmp75; } tmp14 = tmp10 + tmp13; tmp314 = tmp10 - tmp13; tmp77 = tmp73 + tmp76; tmp340 = tmp76 - tmp73; { fftw_real tmp180; fftw_real tmp181; fftw_real tmp100; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp180 = tmp98 - tmp99; tmp181 = tmp102 + tmp101; tmp182 = K707106781 * (tmp180 + tmp181); tmp216 = K707106781 * (tmp180 - tmp181); tmp100 = tmp98 + tmp99; tmp103 = tmp101 - tmp102; tmp104 = K707106781 * (tmp100 + tmp103); tmp242 = K707106781 * (tmp103 - tmp100); } } { fftw_real tmp49; fftw_real tmp149; fftw_real tmp169; fftw_real tmp288; fftw_real tmp52; fftw_real tmp166; fftw_real tmp152; fftw_real tmp289; fftw_real tmp56; fftw_real tmp154; fftw_real tmp157; fftw_real tmp291; fftw_real tmp59; fftw_real tmp159; fftw_real tmp162; fftw_real tmp292; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp167; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp47 = c_re(input[31 * istride]); tmp48 = c_re(input[15 * istride]); tmp49 = tmp47 + tmp48; tmp149 = tmp47 - tmp48; tmp167 = c_im(input[31 * istride]); tmp168 = c_im(input[15 * istride]); tmp169 = tmp167 - tmp168; tmp288 = tmp167 + tmp168; } { fftw_real tmp50; fftw_real tmp51; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(input[7 * istride]); tmp51 = c_re(input[23 * istride]); tmp52 = tmp50 + tmp51; tmp166 = tmp50 - tmp51; tmp150 = c_im(input[7 * istride]); tmp151 = c_im(input[23 * istride]); tmp152 = tmp150 - tmp151; tmp289 = tmp150 + tmp151; } { fftw_real tmp54; fftw_real tmp55; fftw_real tmp155; fftw_real tmp156; ASSERT_ALIGNED_DOUBLE; tmp54 = c_re(input[3 * istride]); tmp55 = c_re(input[19 * istride]); tmp56 = tmp54 + tmp55; tmp154 = tmp54 - tmp55; tmp155 = c_im(input[3 * istride]); tmp156 = c_im(input[19 * istride]); tmp157 = tmp155 - tmp156; tmp291 = tmp155 + tmp156; } { fftw_real tmp57; fftw_real tmp58; fftw_real tmp160; fftw_real tmp161; ASSERT_ALIGNED_DOUBLE; tmp57 = c_re(input[27 * istride]); tmp58 = c_re(input[11 * istride]); tmp59 = tmp57 + tmp58; tmp159 = tmp57 - tmp58; tmp160 = c_im(input[27 * istride]); tmp161 = c_im(input[11 * istride]); tmp162 = tmp160 - tmp161; tmp292 = tmp160 + tmp161; } { fftw_real tmp334; fftw_real tmp335; fftw_real tmp331; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp153 = tmp149 - tmp152; tmp236 = tmp149 + tmp152; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp287 = tmp53 - tmp60; tmp334 = tmp49 - tmp52; tmp335 = tmp292 - tmp291; tmp336 = tmp334 - tmp335; tmp360 = tmp334 + tmp335; tmp290 = tmp288 + tmp289; tmp293 = tmp291 + tmp292; tmp294 = tmp290 - tmp293; tmp170 = tmp166 + tmp169; tmp233 = tmp169 - tmp166; tmp331 = tmp288 - tmp289; tmp332 = tmp56 - tmp59; tmp333 = tmp331 - tmp332; tmp359 = tmp332 + tmp331; { fftw_real tmp158; fftw_real tmp163; fftw_real tmp171; fftw_real tmp172; ASSERT_ALIGNED_DOUBLE; tmp158 = tmp154 - tmp157; tmp163 = tmp159 + tmp162; tmp164 = K707106781 * (tmp158 + tmp163); tmp234 = K707106781 * (tmp158 - tmp163); tmp171 = tmp154 + tmp157; tmp172 = tmp162 - tmp159; tmp173 = K707106781 * (tmp171 + tmp172); tmp237 = K707106781 * (tmp172 - tmp171); } } } { fftw_real tmp18; fftw_real tmp106; fftw_real tmp81; fftw_real tmp110; fftw_real tmp21; fftw_real tmp109; fftw_real tmp84; fftw_real tmp107; fftw_real tmp316; fftw_real tmp317; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[2 * istride]); tmp17 = c_re(input[18 * istride]); tmp18 = tmp16 + tmp17; tmp106 = tmp16 - tmp17; tmp79 = c_im(input[2 * istride]); tmp80 = c_im(input[18 * istride]); tmp81 = tmp79 + tmp80; tmp110 = tmp79 - tmp80; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[10 * istride]); tmp20 = c_re(input[26 * istride]); tmp21 = tmp19 + tmp20; tmp109 = tmp19 - tmp20; tmp82 = c_im(input[10 * istride]); tmp83 = c_im(input[26 * istride]); tmp84 = tmp82 + tmp83; tmp107 = tmp82 - tmp83; } tmp22 = tmp18 + tmp21; tmp316 = tmp18 - tmp21; tmp317 = tmp81 - tmp84; tmp318 = tmp316 - tmp317; tmp343 = tmp316 + tmp317; tmp85 = tmp81 + tmp84; { fftw_real tmp108; fftw_real tmp111; fftw_real tmp218; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; tmp108 = tmp106 - tmp107; tmp111 = tmp109 + tmp110; tmp112 = (K923879532 * tmp108) - (K382683432 * tmp111); tmp185 = (K923879532 * tmp111) + (K382683432 * tmp108); tmp218 = tmp106 + tmp107; tmp219 = tmp110 - tmp109; tmp220 = (K382683432 * tmp218) - (K923879532 * tmp219); tmp245 = (K382683432 * tmp219) + (K923879532 * tmp218); } } { fftw_real tmp25; fftw_real tmp116; fftw_real tmp88; fftw_real tmp114; fftw_real tmp28; fftw_real tmp113; fftw_real tmp91; fftw_real tmp117; fftw_real tmp319; fftw_real tmp320; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp86; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[30 * istride]); tmp24 = c_re(input[14 * istride]); tmp25 = tmp23 + tmp24; tmp116 = tmp23 - tmp24; tmp86 = c_im(input[30 * istride]); tmp87 = c_im(input[14 * istride]); tmp88 = tmp86 + tmp87; tmp114 = tmp86 - tmp87; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp89; fftw_real tmp90; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[6 * istride]); tmp27 = c_re(input[22 * istride]); tmp28 = tmp26 + tmp27; tmp113 = tmp26 - tmp27; tmp89 = c_im(input[6 * istride]); tmp90 = c_im(input[22 * istride]); tmp91 = tmp89 + tmp90; tmp117 = tmp89 - tmp90; } tmp29 = tmp25 + tmp28; tmp319 = tmp25 - tmp28; tmp320 = tmp88 - tmp91; tmp321 = tmp319 + tmp320; tmp342 = tmp320 - tmp319; tmp92 = tmp88 + tmp91; { fftw_real tmp115; fftw_real tmp118; fftw_real tmp221; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; tmp115 = tmp113 + tmp114; tmp118 = tmp116 - tmp117; tmp119 = (K382683432 * tmp115) + (K923879532 * tmp118); tmp184 = (K923879532 * tmp115) - (K382683432 * tmp118); tmp221 = tmp114 - tmp113; tmp222 = tmp116 + tmp117; tmp223 = (K923879532 * tmp221) + (K382683432 * tmp222); tmp244 = (K382683432 * tmp221) - (K923879532 * tmp222); } } { fftw_real tmp34; fftw_real tmp122; fftw_real tmp142; fftw_real tmp279; fftw_real tmp37; fftw_real tmp139; fftw_real tmp125; fftw_real tmp280; fftw_real tmp41; fftw_real tmp127; fftw_real tmp130; fftw_real tmp282; fftw_real tmp44; fftw_real tmp132; fftw_real tmp135; fftw_real tmp283; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp140; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(input[istride]); tmp33 = c_re(input[17 * istride]); tmp34 = tmp32 + tmp33; tmp122 = tmp32 - tmp33; tmp140 = c_im(input[istride]); tmp141 = c_im(input[17 * istride]); tmp142 = tmp140 - tmp141; tmp279 = tmp140 + tmp141; } { fftw_real tmp35; fftw_real tmp36; fftw_real tmp123; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; tmp35 = c_re(input[9 * istride]); tmp36 = c_re(input[25 * istride]); tmp37 = tmp35 + tmp36; tmp139 = tmp35 - tmp36; tmp123 = c_im(input[9 * istride]); tmp124 = c_im(input[25 * istride]); tmp125 = tmp123 - tmp124; tmp280 = tmp123 + tmp124; } { fftw_real tmp39; fftw_real tmp40; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp39 = c_re(input[5 * istride]); tmp40 = c_re(input[21 * istride]); tmp41 = tmp39 + tmp40; tmp127 = tmp39 - tmp40; tmp128 = c_im(input[5 * istride]); tmp129 = c_im(input[21 * istride]); tmp130 = tmp128 - tmp129; tmp282 = tmp128 + tmp129; } { fftw_real tmp42; fftw_real tmp43; fftw_real tmp133; fftw_real tmp134; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(input[29 * istride]); tmp43 = c_re(input[13 * istride]); tmp44 = tmp42 + tmp43; tmp132 = tmp42 - tmp43; tmp133 = c_im(input[29 * istride]); tmp134 = c_im(input[13 * istride]); tmp135 = tmp133 - tmp134; tmp283 = tmp133 + tmp134; } { fftw_real tmp327; fftw_real tmp328; fftw_real tmp324; fftw_real tmp325; ASSERT_ALIGNED_DOUBLE; tmp126 = tmp122 - tmp125; tmp229 = tmp122 + tmp125; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp278 = tmp38 - tmp45; tmp327 = tmp34 - tmp37; tmp328 = tmp283 - tmp282; tmp329 = tmp327 - tmp328; tmp357 = tmp327 + tmp328; tmp281 = tmp279 + tmp280; tmp284 = tmp282 + tmp283; tmp285 = tmp281 - tmp284; tmp143 = tmp139 + tmp142; tmp226 = tmp142 - tmp139; tmp324 = tmp279 - tmp280; tmp325 = tmp41 - tmp44; tmp326 = tmp324 - tmp325; tmp356 = tmp325 + tmp324; { fftw_real tmp131; fftw_real tmp136; fftw_real tmp144; fftw_real tmp145; ASSERT_ALIGNED_DOUBLE; tmp131 = tmp127 - tmp130; tmp136 = tmp132 + tmp135; tmp137 = K707106781 * (tmp131 + tmp136); tmp227 = K707106781 * (tmp131 - tmp136); tmp144 = tmp127 + tmp130; tmp145 = tmp135 - tmp132; tmp146 = K707106781 * (tmp144 + tmp145); tmp230 = K707106781 * (tmp145 - tmp144); } } } { fftw_real tmp277; fftw_real tmp301; fftw_real tmp304; fftw_real tmp306; fftw_real tmp296; fftw_real tmp300; fftw_real tmp299; fftw_real tmp305; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp275; fftw_real tmp276; fftw_real tmp302; fftw_real tmp303; ASSERT_ALIGNED_DOUBLE; tmp275 = tmp70 - tmp77; tmp276 = tmp22 - tmp29; tmp277 = tmp275 - tmp276; tmp301 = tmp276 + tmp275; tmp302 = tmp278 + tmp285; tmp303 = tmp294 - tmp287; tmp304 = K707106781 * (tmp302 + tmp303); tmp306 = K707106781 * (tmp303 - tmp302); } { fftw_real tmp286; fftw_real tmp295; fftw_real tmp297; fftw_real tmp298; ASSERT_ALIGNED_DOUBLE; tmp286 = tmp278 - tmp285; tmp295 = tmp287 + tmp294; tmp296 = K707106781 * (tmp286 - tmp295); tmp300 = K707106781 * (tmp286 + tmp295); tmp297 = tmp7 - tmp14; tmp298 = tmp92 - tmp85; tmp299 = tmp297 + tmp298; tmp305 = tmp297 - tmp298; } c_im(output[28 * ostride]) = tmp277 - tmp296; c_im(output[12 * ostride]) = tmp277 + tmp296; c_re(output[20 * ostride]) = tmp299 - tmp300; c_re(output[4 * ostride]) = tmp299 + tmp300; c_im(output[20 * ostride]) = tmp301 - tmp304; c_im(output[4 * ostride]) = tmp301 + tmp304; c_re(output[28 * ostride]) = tmp305 - tmp306; c_re(output[12 * ostride]) = tmp305 + tmp306; } { fftw_real tmp31; fftw_real tmp311; fftw_real tmp310; fftw_real tmp312; fftw_real tmp62; fftw_real tmp63; fftw_real tmp94; fftw_real tmp307; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp15; fftw_real tmp30; fftw_real tmp308; fftw_real tmp309; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; tmp31 = tmp15 + tmp30; tmp311 = tmp15 - tmp30; tmp308 = tmp281 + tmp284; tmp309 = tmp290 + tmp293; tmp310 = tmp308 + tmp309; tmp312 = tmp309 - tmp308; } { fftw_real tmp46; fftw_real tmp61; fftw_real tmp78; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp46 = tmp38 + tmp45; tmp61 = tmp53 + tmp60; tmp62 = tmp46 + tmp61; tmp63 = tmp46 - tmp61; tmp78 = tmp70 + tmp77; tmp93 = tmp85 + tmp92; tmp94 = tmp78 - tmp93; tmp307 = tmp78 + tmp93; } c_re(output[16 * ostride]) = tmp31 - tmp62; c_re(output[0]) = tmp31 + tmp62; c_im(output[8 * ostride]) = tmp63 + tmp94; c_im(output[24 * ostride]) = tmp94 - tmp63; c_im(output[16 * ostride]) = tmp307 - tmp310; c_im(output[0]) = tmp307 + tmp310; c_re(output[24 * ostride]) = tmp311 - tmp312; c_re(output[8 * ostride]) = tmp311 + tmp312; } { fftw_real tmp121; fftw_real tmp189; fftw_real tmp187; fftw_real tmp193; fftw_real tmp148; fftw_real tmp190; fftw_real tmp175; fftw_real tmp191; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp105; fftw_real tmp120; fftw_real tmp183; fftw_real tmp186; ASSERT_ALIGNED_DOUBLE; tmp105 = tmp97 - tmp104; tmp120 = tmp112 - tmp119; tmp121 = tmp105 - tmp120; tmp189 = tmp105 + tmp120; tmp183 = tmp179 - tmp182; tmp186 = tmp184 - tmp185; tmp187 = tmp183 + tmp186; tmp193 = tmp183 - tmp186; } { fftw_real tmp138; fftw_real tmp147; fftw_real tmp165; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp138 = tmp126 - tmp137; tmp147 = tmp143 - tmp146; tmp148 = (K555570233 * tmp138) - (K831469612 * tmp147); tmp190 = (K831469612 * tmp138) + (K555570233 * tmp147); tmp165 = tmp153 - tmp164; tmp174 = tmp170 - tmp173; tmp175 = (K555570233 * tmp165) + (K831469612 * tmp174); tmp191 = (K555570233 * tmp174) - (K831469612 * tmp165); } { fftw_real tmp176; fftw_real tmp188; fftw_real tmp192; fftw_real tmp194; ASSERT_ALIGNED_DOUBLE; tmp176 = tmp148 - tmp175; c_im(output[29 * ostride]) = tmp121 - tmp176; c_im(output[13 * ostride]) = tmp121 + tmp176; tmp188 = tmp148 + tmp175; c_re(output[21 * ostride]) = tmp187 - tmp188; c_re(output[5 * ostride]) = tmp187 + tmp188; tmp192 = tmp190 + tmp191; c_im(output[21 * ostride]) = tmp189 - tmp192; c_im(output[5 * ostride]) = tmp189 + tmp192; tmp194 = tmp191 - tmp190; c_re(output[29 * ostride]) = tmp193 - tmp194; c_re(output[13 * ostride]) = tmp193 + tmp194; } } { fftw_real tmp197; fftw_real tmp209; fftw_real tmp207; fftw_real tmp213; fftw_real tmp200; fftw_real tmp210; fftw_real tmp203; fftw_real tmp211; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp195; fftw_real tmp196; fftw_real tmp205; fftw_real tmp206; ASSERT_ALIGNED_DOUBLE; tmp195 = tmp97 + tmp104; tmp196 = tmp185 + tmp184; tmp197 = tmp195 - tmp196; tmp209 = tmp195 + tmp196; tmp205 = tmp179 + tmp182; tmp206 = tmp112 + tmp119; tmp207 = tmp205 + tmp206; tmp213 = tmp205 - tmp206; } { fftw_real tmp198; fftw_real tmp199; fftw_real tmp201; fftw_real tmp202; ASSERT_ALIGNED_DOUBLE; tmp198 = tmp126 + tmp137; tmp199 = tmp143 + tmp146; tmp200 = (K980785280 * tmp198) - (K195090322 * tmp199); tmp210 = (K195090322 * tmp198) + (K980785280 * tmp199); tmp201 = tmp153 + tmp164; tmp202 = tmp170 + tmp173; tmp203 = (K980785280 * tmp201) + (K195090322 * tmp202); tmp211 = (K980785280 * tmp202) - (K195090322 * tmp201); } { fftw_real tmp204; fftw_real tmp208; fftw_real tmp212; fftw_real tmp214; ASSERT_ALIGNED_DOUBLE; tmp204 = tmp200 - tmp203; c_im(output[25 * ostride]) = tmp197 - tmp204; c_im(output[9 * ostride]) = tmp197 + tmp204; tmp208 = tmp200 + tmp203; c_re(output[17 * ostride]) = tmp207 - tmp208; c_re(output[ostride]) = tmp207 + tmp208; tmp212 = tmp210 + tmp211; c_im(output[17 * ostride]) = tmp209 - tmp212; c_im(output[ostride]) = tmp209 + tmp212; tmp214 = tmp211 - tmp210; c_re(output[25 * ostride]) = tmp213 - tmp214; c_re(output[9 * ostride]) = tmp213 + tmp214; } } { fftw_real tmp323; fftw_real tmp347; fftw_real tmp350; fftw_real tmp352; fftw_real tmp338; fftw_real tmp346; fftw_real tmp345; fftw_real tmp351; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp315; fftw_real tmp322; fftw_real tmp348; fftw_real tmp349; ASSERT_ALIGNED_DOUBLE; tmp315 = tmp313 - tmp314; tmp322 = K707106781 * (tmp318 - tmp321); tmp323 = tmp315 + tmp322; tmp347 = tmp315 - tmp322; tmp348 = (K382683432 * tmp329) - (K923879532 * tmp326); tmp349 = (K923879532 * tmp333) + (K382683432 * tmp336); tmp350 = tmp348 - tmp349; tmp352 = tmp348 + tmp349; } { fftw_real tmp330; fftw_real tmp337; fftw_real tmp341; fftw_real tmp344; ASSERT_ALIGNED_DOUBLE; tmp330 = (K382683432 * tmp326) + (K923879532 * tmp329); tmp337 = (K382683432 * tmp333) - (K923879532 * tmp336); tmp338 = tmp330 + tmp337; tmp346 = tmp337 - tmp330; tmp341 = tmp339 - tmp340; tmp344 = K707106781 * (tmp342 - tmp343); tmp345 = tmp341 - tmp344; tmp351 = tmp341 + tmp344; } c_im(output[22 * ostride]) = tmp323 - tmp338; c_im(output[6 * ostride]) = tmp323 + tmp338; c_re(output[30 * ostride]) = tmp345 - tmp346; c_re(output[14 * ostride]) = tmp345 + tmp346; c_im(output[30 * ostride]) = tmp347 - tmp350; c_im(output[14 * ostride]) = tmp347 + tmp350; c_re(output[22 * ostride]) = tmp351 - tmp352; c_re(output[6 * ostride]) = tmp351 + tmp352; } { fftw_real tmp355; fftw_real tmp367; fftw_real tmp370; fftw_real tmp372; fftw_real tmp362; fftw_real tmp366; fftw_real tmp365; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp353; fftw_real tmp354; fftw_real tmp368; fftw_real tmp369; ASSERT_ALIGNED_DOUBLE; tmp353 = tmp314 + tmp313; tmp354 = K707106781 * (tmp343 + tmp342); tmp355 = tmp353 + tmp354; tmp367 = tmp353 - tmp354; tmp368 = (K923879532 * tmp357) - (K382683432 * tmp356); tmp369 = (K382683432 * tmp359) + (K923879532 * tmp360); tmp370 = tmp368 - tmp369; tmp372 = tmp368 + tmp369; } { fftw_real tmp358; fftw_real tmp361; fftw_real tmp363; fftw_real tmp364; ASSERT_ALIGNED_DOUBLE; tmp358 = (K923879532 * tmp356) + (K382683432 * tmp357); tmp361 = (K923879532 * tmp359) - (K382683432 * tmp360); tmp362 = tmp358 + tmp361; tmp366 = tmp361 - tmp358; tmp363 = tmp339 + tmp340; tmp364 = K707106781 * (tmp318 + tmp321); tmp365 = tmp363 - tmp364; tmp371 = tmp363 + tmp364; } c_im(output[18 * ostride]) = tmp355 - tmp362; c_im(output[2 * ostride]) = tmp355 + tmp362; c_re(output[26 * ostride]) = tmp365 - tmp366; c_re(output[10 * ostride]) = tmp365 + tmp366; c_im(output[26 * ostride]) = tmp367 - tmp370; c_im(output[10 * ostride]) = tmp367 + tmp370; c_re(output[18 * ostride]) = tmp371 - tmp372; c_re(output[2 * ostride]) = tmp371 + tmp372; } { fftw_real tmp225; fftw_real tmp249; fftw_real tmp247; fftw_real tmp253; fftw_real tmp232; fftw_real tmp250; fftw_real tmp239; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp217; fftw_real tmp224; fftw_real tmp243; fftw_real tmp246; ASSERT_ALIGNED_DOUBLE; tmp217 = tmp215 - tmp216; tmp224 = tmp220 - tmp223; tmp225 = tmp217 + tmp224; tmp249 = tmp217 - tmp224; tmp243 = tmp241 - tmp242; tmp246 = tmp244 - tmp245; tmp247 = tmp243 - tmp246; tmp253 = tmp243 + tmp246; } { fftw_real tmp228; fftw_real tmp231; fftw_real tmp235; fftw_real tmp238; ASSERT_ALIGNED_DOUBLE; tmp228 = tmp226 - tmp227; tmp231 = tmp229 - tmp230; tmp232 = (K195090322 * tmp228) + (K980785280 * tmp231); tmp250 = (K195090322 * tmp231) - (K980785280 * tmp228); tmp235 = tmp233 - tmp234; tmp238 = tmp236 - tmp237; tmp239 = (K195090322 * tmp235) - (K980785280 * tmp238); tmp251 = (K980785280 * tmp235) + (K195090322 * tmp238); } { fftw_real tmp240; fftw_real tmp248; fftw_real tmp252; fftw_real tmp254; ASSERT_ALIGNED_DOUBLE; tmp240 = tmp232 + tmp239; c_im(output[23 * ostride]) = tmp225 - tmp240; c_im(output[7 * ostride]) = tmp225 + tmp240; tmp248 = tmp239 - tmp232; c_re(output[31 * ostride]) = tmp247 - tmp248; c_re(output[15 * ostride]) = tmp247 + tmp248; tmp252 = tmp250 - tmp251; c_im(output[31 * ostride]) = tmp249 - tmp252; c_im(output[15 * ostride]) = tmp249 + tmp252; tmp254 = tmp250 + tmp251; c_re(output[23 * ostride]) = tmp253 - tmp254; c_re(output[7 * ostride]) = tmp253 + tmp254; } } { fftw_real tmp257; fftw_real tmp269; fftw_real tmp267; fftw_real tmp273; fftw_real tmp260; fftw_real tmp270; fftw_real tmp263; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp255; fftw_real tmp256; fftw_real tmp265; fftw_real tmp266; ASSERT_ALIGNED_DOUBLE; tmp255 = tmp215 + tmp216; tmp256 = tmp245 + tmp244; tmp257 = tmp255 + tmp256; tmp269 = tmp255 - tmp256; tmp265 = tmp241 + tmp242; tmp266 = tmp220 + tmp223; tmp267 = tmp265 - tmp266; tmp273 = tmp265 + tmp266; } { fftw_real tmp258; fftw_real tmp259; fftw_real tmp261; fftw_real tmp262; ASSERT_ALIGNED_DOUBLE; tmp258 = tmp226 + tmp227; tmp259 = tmp229 + tmp230; tmp260 = (K831469612 * tmp258) + (K555570233 * tmp259); tmp270 = (K831469612 * tmp259) - (K555570233 * tmp258); tmp261 = tmp233 + tmp234; tmp262 = tmp236 + tmp237; tmp263 = (K831469612 * tmp261) - (K555570233 * tmp262); tmp271 = (K555570233 * tmp261) + (K831469612 * tmp262); } { fftw_real tmp264; fftw_real tmp268; fftw_real tmp272; fftw_real tmp274; ASSERT_ALIGNED_DOUBLE; tmp264 = tmp260 + tmp263; c_im(output[19 * ostride]) = tmp257 - tmp264; c_im(output[3 * ostride]) = tmp257 + tmp264; tmp268 = tmp263 - tmp260; c_re(output[27 * ostride]) = tmp267 - tmp268; c_re(output[11 * ostride]) = tmp267 + tmp268; tmp272 = tmp270 - tmp271; c_im(output[27 * ostride]) = tmp269 - tmp272; c_im(output[11 * ostride]) = tmp269 + tmp272; tmp274 = tmp270 + tmp271; c_re(output[19 * ostride]) = tmp273 - tmp274; c_re(output[3 * ostride]) = tmp273 + tmp274; } } } fftw_codelet_desc fftwi_no_twiddle_32_desc = { "fftwi_no_twiddle_32", (void (*)()) fftwi_no_twiddle_32, 32, FFTW_BACKWARD, FFTW_NOTW, 716, 0, (const int *) 0, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fni_64.c����������������������������������������������������������������������������0000644�0001754�0000144�00000216401�07637527304�010366� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -notwiddleinv 64 */ /* * This function contains 912 FP additions, 248 FP multiplications, * (or, 808 additions, 144 multiplications, 104 fused multiply/add), * 156 stack variables, and 256 memory accesses */ static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_no_twiddle_64(const fftw_complex *input, fftw_complex *output, int istride, int ostride) { fftw_real tmp193; fftw_real tmp471; fftw_real tmp15; fftw_real tmp879; fftw_real tmp719; fftw_real tmp781; fftw_real tmp142; fftw_real tmp853; fftw_real tmp371; fftw_real tmp537; fftw_real tmp637; fftw_real tmp755; fftw_real tmp200; fftw_real tmp538; fftw_real tmp374; fftw_real tmp472; fftw_real tmp109; fftw_real tmp874; fftw_real tmp693; fftw_real tmp776; fftw_real tmp830; fftw_real tmp871; fftw_real tmp710; fftw_real tmp773; fftw_real tmp329; fftw_real tmp432; fftw_real tmp519; fftw_real tmp596; fftw_real tmp362; fftw_real tmp429; fftw_real tmp530; fftw_real tmp593; fftw_real tmp30; fftw_real tmp854; fftw_real tmp640; fftw_real tmp720; fftw_real tmp157; fftw_real tmp880; fftw_real tmp643; fftw_real tmp721; fftw_real tmp208; fftw_real tmp377; fftw_real tmp476; fftw_real tmp541; fftw_real tmp215; fftw_real tmp376; fftw_real tmp479; fftw_real tmp540; fftw_real tmp124; fftw_real tmp872; fftw_real tmp365; fftw_real tmp433; fftw_real tmp352; fftw_real tmp430; fftw_real tmp833; fftw_real tmp875; fftw_real tmp526; fftw_real tmp594; fftw_real tmp533; fftw_real tmp597; fftw_real tmp704; fftw_real tmp774; fftw_real tmp713; fftw_real tmp777; fftw_real tmp46; fftw_real tmp856; fftw_real tmp648; fftw_real tmp758; fftw_real tmp173; fftw_real tmp857; fftw_real tmp651; fftw_real tmp759; fftw_real tmp228; fftw_real tmp414; fftw_real tmp484; fftw_real tmp578; fftw_real tmp235; fftw_real tmp415; fftw_real tmp487; fftw_real tmp579; fftw_real tmp78; fftw_real tmp867; fftw_real tmp666; fftw_real tmp769; fftw_real tmp821; fftw_real tmp864; fftw_real tmp683; fftw_real tmp766; fftw_real tmp274; fftw_real tmp425; fftw_real tmp500; fftw_real tmp589; fftw_real tmp307; fftw_real tmp422; fftw_real tmp511; fftw_real tmp586; fftw_real tmp61; fftw_real tmp859; fftw_real tmp655; fftw_real tmp761; fftw_real tmp188; fftw_real tmp860; fftw_real tmp658; fftw_real tmp762; fftw_real tmp247; fftw_real tmp417; fftw_real tmp491; fftw_real tmp581; fftw_real tmp254; fftw_real tmp418; fftw_real tmp494; fftw_real tmp582; fftw_real tmp93; fftw_real tmp865; fftw_real tmp310; fftw_real tmp426; fftw_real tmp297; fftw_real tmp423; fftw_real tmp824; fftw_real tmp868; fftw_real tmp507; fftw_real tmp587; fftw_real tmp514; fftw_real tmp590; fftw_real tmp677; fftw_real tmp767; fftw_real tmp686; fftw_real tmp770; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp369; fftw_real tmp130; fftw_real tmp192; fftw_real tmp6; fftw_real tmp191; fftw_real tmp133; fftw_real tmp370; fftw_real tmp10; fftw_real tmp194; fftw_real tmp137; fftw_real tmp195; fftw_real tmp13; fftw_real tmp198; fftw_real tmp140; fftw_real tmp197; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(input[0]); tmp2 = c_re(input[32 * istride]); tmp3 = tmp1 + tmp2; tmp369 = tmp1 - tmp2; tmp128 = c_im(input[0]); tmp129 = c_im(input[32 * istride]); tmp130 = tmp128 + tmp129; tmp192 = tmp128 - tmp129; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp131; fftw_real tmp132; ASSERT_ALIGNED_DOUBLE; tmp4 = c_re(input[16 * istride]); tmp5 = c_re(input[48 * istride]); tmp6 = tmp4 + tmp5; tmp191 = tmp4 - tmp5; tmp131 = c_im(input[16 * istride]); tmp132 = c_im(input[48 * istride]); tmp133 = tmp131 + tmp132; tmp370 = tmp131 - tmp132; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp135; fftw_real tmp136; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(input[8 * istride]); tmp9 = c_re(input[40 * istride]); tmp10 = tmp8 + tmp9; tmp194 = tmp8 - tmp9; tmp135 = c_im(input[8 * istride]); tmp136 = c_im(input[40 * istride]); tmp137 = tmp135 + tmp136; tmp195 = tmp135 - tmp136; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp138; fftw_real tmp139; ASSERT_ALIGNED_DOUBLE; tmp11 = c_re(input[56 * istride]); tmp12 = c_re(input[24 * istride]); tmp13 = tmp11 + tmp12; tmp198 = tmp11 - tmp12; tmp138 = c_im(input[56 * istride]); tmp139 = c_im(input[24 * istride]); tmp140 = tmp138 + tmp139; tmp197 = tmp138 - tmp139; } { fftw_real tmp7; fftw_real tmp14; fftw_real tmp635; fftw_real tmp636; ASSERT_ALIGNED_DOUBLE; tmp193 = tmp191 + tmp192; tmp471 = tmp192 - tmp191; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; tmp15 = tmp7 + tmp14; tmp879 = tmp7 - tmp14; { fftw_real tmp717; fftw_real tmp718; fftw_real tmp134; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp717 = tmp3 - tmp6; tmp718 = tmp140 - tmp137; tmp719 = tmp717 + tmp718; tmp781 = tmp717 - tmp718; tmp134 = tmp130 + tmp133; tmp141 = tmp137 + tmp140; tmp142 = tmp134 + tmp141; tmp853 = tmp134 - tmp141; } tmp371 = tmp369 - tmp370; tmp537 = tmp369 + tmp370; tmp635 = tmp10 - tmp13; tmp636 = tmp130 - tmp133; tmp637 = tmp635 + tmp636; tmp755 = tmp636 - tmp635; { fftw_real tmp196; fftw_real tmp199; fftw_real tmp372; fftw_real tmp373; ASSERT_ALIGNED_DOUBLE; tmp196 = tmp194 + tmp195; tmp199 = tmp197 - tmp198; tmp200 = K707106781 * (tmp196 + tmp199); tmp538 = K707106781 * (tmp199 - tmp196); tmp372 = tmp194 - tmp195; tmp373 = tmp198 + tmp197; tmp374 = K707106781 * (tmp372 + tmp373); tmp472 = K707106781 * (tmp372 - tmp373); } } } { fftw_real tmp97; fftw_real tmp313; fftw_real tmp357; fftw_real tmp707; fftw_real tmp100; fftw_real tmp354; fftw_real tmp316; fftw_real tmp708; fftw_real tmp107; fftw_real tmp690; fftw_real tmp327; fftw_real tmp360; fftw_real tmp104; fftw_real tmp691; fftw_real tmp322; fftw_real tmp359; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp95; fftw_real tmp96; fftw_real tmp314; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; tmp95 = c_re(input[63 * istride]); tmp96 = c_re(input[31 * istride]); tmp97 = tmp95 + tmp96; tmp313 = tmp95 - tmp96; { fftw_real tmp355; fftw_real tmp356; fftw_real tmp98; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp355 = c_im(input[63 * istride]); tmp356 = c_im(input[31 * istride]); tmp357 = tmp355 - tmp356; tmp707 = tmp355 + tmp356; tmp98 = c_re(input[15 * istride]); tmp99 = c_re(input[47 * istride]); tmp100 = tmp98 + tmp99; tmp354 = tmp98 - tmp99; } tmp314 = c_im(input[15 * istride]); tmp315 = c_im(input[47 * istride]); tmp316 = tmp314 - tmp315; tmp708 = tmp314 + tmp315; { fftw_real tmp105; fftw_real tmp106; fftw_real tmp323; fftw_real tmp324; fftw_real tmp325; fftw_real tmp326; ASSERT_ALIGNED_DOUBLE; tmp105 = c_re(input[55 * istride]); tmp106 = c_re(input[23 * istride]); tmp323 = tmp105 - tmp106; tmp324 = c_im(input[55 * istride]); tmp325 = c_im(input[23 * istride]); tmp326 = tmp324 - tmp325; tmp107 = tmp105 + tmp106; tmp690 = tmp324 + tmp325; tmp327 = tmp323 + tmp326; tmp360 = tmp326 - tmp323; } { fftw_real tmp102; fftw_real tmp103; fftw_real tmp318; fftw_real tmp319; fftw_real tmp320; fftw_real tmp321; ASSERT_ALIGNED_DOUBLE; tmp102 = c_re(input[7 * istride]); tmp103 = c_re(input[39 * istride]); tmp318 = tmp102 - tmp103; tmp319 = c_im(input[7 * istride]); tmp320 = c_im(input[39 * istride]); tmp321 = tmp319 - tmp320; tmp104 = tmp102 + tmp103; tmp691 = tmp319 + tmp320; tmp322 = tmp318 - tmp321; tmp359 = tmp318 + tmp321; } } { fftw_real tmp101; fftw_real tmp108; fftw_real tmp689; fftw_real tmp692; ASSERT_ALIGNED_DOUBLE; tmp101 = tmp97 + tmp100; tmp108 = tmp104 + tmp107; tmp109 = tmp101 + tmp108; tmp874 = tmp101 - tmp108; tmp689 = tmp97 - tmp100; tmp692 = tmp690 - tmp691; tmp693 = tmp689 + tmp692; tmp776 = tmp689 - tmp692; } { fftw_real tmp828; fftw_real tmp829; fftw_real tmp706; fftw_real tmp709; ASSERT_ALIGNED_DOUBLE; tmp828 = tmp707 + tmp708; tmp829 = tmp691 + tmp690; tmp830 = tmp828 + tmp829; tmp871 = tmp828 - tmp829; tmp706 = tmp104 - tmp107; tmp709 = tmp707 - tmp708; tmp710 = tmp706 + tmp709; tmp773 = tmp709 - tmp706; } { fftw_real tmp317; fftw_real tmp328; fftw_real tmp517; fftw_real tmp518; ASSERT_ALIGNED_DOUBLE; tmp317 = tmp313 - tmp316; tmp328 = K707106781 * (tmp322 + tmp327); tmp329 = tmp317 - tmp328; tmp432 = tmp317 + tmp328; tmp517 = tmp313 + tmp316; tmp518 = K707106781 * (tmp360 - tmp359); tmp519 = tmp517 - tmp518; tmp596 = tmp517 + tmp518; } { fftw_real tmp358; fftw_real tmp361; fftw_real tmp528; fftw_real tmp529; ASSERT_ALIGNED_DOUBLE; tmp358 = tmp354 + tmp357; tmp361 = K707106781 * (tmp359 + tmp360); tmp362 = tmp358 - tmp361; tmp429 = tmp358 + tmp361; tmp528 = tmp357 - tmp354; tmp529 = K707106781 * (tmp322 - tmp327); tmp530 = tmp528 - tmp529; tmp593 = tmp528 + tmp529; } } { fftw_real tmp18; fftw_real tmp202; fftw_real tmp145; fftw_real tmp206; fftw_real tmp21; fftw_real tmp205; fftw_real tmp148; fftw_real tmp203; fftw_real tmp25; fftw_real tmp212; fftw_real tmp152; fftw_real tmp210; fftw_real tmp28; fftw_real tmp209; fftw_real tmp155; fftw_real tmp213; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp143; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp16 = c_re(input[4 * istride]); tmp17 = c_re(input[36 * istride]); tmp18 = tmp16 + tmp17; tmp202 = tmp16 - tmp17; tmp143 = c_im(input[4 * istride]); tmp144 = c_im(input[36 * istride]); tmp145 = tmp143 + tmp144; tmp206 = tmp143 - tmp144; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp146; fftw_real tmp147; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(input[20 * istride]); tmp20 = c_re(input[52 * istride]); tmp21 = tmp19 + tmp20; tmp205 = tmp19 - tmp20; tmp146 = c_im(input[20 * istride]); tmp147 = c_im(input[52 * istride]); tmp148 = tmp146 + tmp147; tmp203 = tmp146 - tmp147; } { fftw_real tmp23; fftw_real tmp24; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp23 = c_re(input[60 * istride]); tmp24 = c_re(input[28 * istride]); tmp25 = tmp23 + tmp24; tmp212 = tmp23 - tmp24; tmp150 = c_im(input[60 * istride]); tmp151 = c_im(input[28 * istride]); tmp152 = tmp150 + tmp151; tmp210 = tmp150 - tmp151; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp153; fftw_real tmp154; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(input[12 * istride]); tmp27 = c_re(input[44 * istride]); tmp28 = tmp26 + tmp27; tmp209 = tmp26 - tmp27; tmp153 = c_im(input[12 * istride]); tmp154 = c_im(input[44 * istride]); tmp155 = tmp153 + tmp154; tmp213 = tmp153 - tmp154; } { fftw_real tmp22; fftw_real tmp29; fftw_real tmp638; fftw_real tmp639; ASSERT_ALIGNED_DOUBLE; tmp22 = tmp18 + tmp21; tmp29 = tmp25 + tmp28; tmp30 = tmp22 + tmp29; tmp854 = tmp22 - tmp29; tmp638 = tmp18 - tmp21; tmp639 = tmp145 - tmp148; tmp640 = tmp638 + tmp639; tmp720 = tmp638 - tmp639; } { fftw_real tmp149; fftw_real tmp156; fftw_real tmp641; fftw_real tmp642; ASSERT_ALIGNED_DOUBLE; tmp149 = tmp145 + tmp148; tmp156 = tmp152 + tmp155; tmp157 = tmp149 + tmp156; tmp880 = tmp156 - tmp149; tmp641 = tmp152 - tmp155; tmp642 = tmp25 - tmp28; tmp643 = tmp641 - tmp642; tmp721 = tmp642 + tmp641; } { fftw_real tmp204; fftw_real tmp207; fftw_real tmp474; fftw_real tmp475; ASSERT_ALIGNED_DOUBLE; tmp204 = tmp202 - tmp203; tmp207 = tmp205 + tmp206; tmp208 = (K923879532 * tmp204) - (K382683432 * tmp207); tmp377 = (K923879532 * tmp207) + (K382683432 * tmp204); tmp474 = tmp202 + tmp203; tmp475 = tmp206 - tmp205; tmp476 = (K382683432 * tmp474) - (K923879532 * tmp475); tmp541 = (K382683432 * tmp475) + (K923879532 * tmp474); } { fftw_real tmp211; fftw_real tmp214; fftw_real tmp477; fftw_real tmp478; ASSERT_ALIGNED_DOUBLE; tmp211 = tmp209 + tmp210; tmp214 = tmp212 - tmp213; tmp215 = (K382683432 * tmp211) + (K923879532 * tmp214); tmp376 = (K923879532 * tmp211) - (K382683432 * tmp214); tmp477 = tmp210 - tmp209; tmp478 = tmp212 + tmp213; tmp479 = (K923879532 * tmp477) + (K382683432 * tmp478); tmp540 = (K382683432 * tmp477) - (K923879532 * tmp478); } } { fftw_real tmp112; fftw_real tmp695; fftw_real tmp115; fftw_real tmp696; fftw_real tmp345; fftw_real tmp523; fftw_real tmp350; fftw_real tmp524; fftw_real tmp697; fftw_real tmp694; fftw_real tmp119; fftw_real tmp700; fftw_real tmp122; fftw_real tmp701; fftw_real tmp334; fftw_real tmp520; fftw_real tmp339; fftw_real tmp521; fftw_real tmp702; fftw_real tmp699; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp346; fftw_real tmp344; fftw_real tmp341; fftw_real tmp349; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp110; fftw_real tmp111; fftw_real tmp342; fftw_real tmp343; ASSERT_ALIGNED_DOUBLE; tmp110 = c_re(input[3 * istride]); tmp111 = c_re(input[35 * istride]); tmp112 = tmp110 + tmp111; tmp346 = tmp110 - tmp111; tmp342 = c_im(input[3 * istride]); tmp343 = c_im(input[35 * istride]); tmp344 = tmp342 - tmp343; tmp695 = tmp342 + tmp343; } { fftw_real tmp113; fftw_real tmp114; fftw_real tmp347; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; tmp113 = c_re(input[19 * istride]); tmp114 = c_re(input[51 * istride]); tmp115 = tmp113 + tmp114; tmp341 = tmp113 - tmp114; tmp347 = c_im(input[19 * istride]); tmp348 = c_im(input[51 * istride]); tmp349 = tmp347 - tmp348; tmp696 = tmp347 + tmp348; } tmp345 = tmp341 + tmp344; tmp523 = tmp344 - tmp341; tmp350 = tmp346 - tmp349; tmp524 = tmp346 + tmp349; tmp697 = tmp695 - tmp696; tmp694 = tmp112 - tmp115; } { fftw_real tmp335; fftw_real tmp333; fftw_real tmp330; fftw_real tmp338; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp117; fftw_real tmp118; fftw_real tmp331; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp117 = c_re(input[59 * istride]); tmp118 = c_re(input[27 * istride]); tmp119 = tmp117 + tmp118; tmp335 = tmp117 - tmp118; tmp331 = c_im(input[59 * istride]); tmp332 = c_im(input[27 * istride]); tmp333 = tmp331 - tmp332; tmp700 = tmp331 + tmp332; } { fftw_real tmp120; fftw_real tmp121; fftw_real tmp336; fftw_real tmp337; ASSERT_ALIGNED_DOUBLE; tmp120 = c_re(input[11 * istride]); tmp121 = c_re(input[43 * istride]); tmp122 = tmp120 + tmp121; tmp330 = tmp120 - tmp121; tmp336 = c_im(input[11 * istride]); tmp337 = c_im(input[43 * istride]); tmp338 = tmp336 - tmp337; tmp701 = tmp336 + tmp337; } tmp334 = tmp330 + tmp333; tmp520 = tmp333 - tmp330; tmp339 = tmp335 - tmp338; tmp521 = tmp335 + tmp338; tmp702 = tmp700 - tmp701; tmp699 = tmp119 - tmp122; } { fftw_real tmp116; fftw_real tmp123; fftw_real tmp363; fftw_real tmp364; ASSERT_ALIGNED_DOUBLE; tmp116 = tmp112 + tmp115; tmp123 = tmp119 + tmp122; tmp124 = tmp116 + tmp123; tmp872 = tmp116 - tmp123; tmp363 = (K923879532 * tmp350) - (K382683432 * tmp345); tmp364 = (K382683432 * tmp334) + (K923879532 * tmp339); tmp365 = tmp363 - tmp364; tmp433 = tmp363 + tmp364; } { fftw_real tmp340; fftw_real tmp351; fftw_real tmp831; fftw_real tmp832; ASSERT_ALIGNED_DOUBLE; tmp340 = (K923879532 * tmp334) - (K382683432 * tmp339); tmp351 = (K923879532 * tmp345) + (K382683432 * tmp350); tmp352 = tmp340 - tmp351; tmp430 = tmp351 + tmp340; tmp831 = tmp695 + tmp696; tmp832 = tmp700 + tmp701; tmp833 = tmp831 + tmp832; tmp875 = tmp832 - tmp831; } { fftw_real tmp522; fftw_real tmp525; fftw_real tmp531; fftw_real tmp532; ASSERT_ALIGNED_DOUBLE; tmp522 = (K382683432 * tmp520) - (K923879532 * tmp521); tmp525 = (K382683432 * tmp523) + (K923879532 * tmp524); tmp526 = tmp522 - tmp525; tmp594 = tmp525 + tmp522; tmp531 = (K382683432 * tmp524) - (K923879532 * tmp523); tmp532 = (K923879532 * tmp520) + (K382683432 * tmp521); tmp533 = tmp531 - tmp532; tmp597 = tmp531 + tmp532; } { fftw_real tmp698; fftw_real tmp703; fftw_real tmp711; fftw_real tmp712; ASSERT_ALIGNED_DOUBLE; tmp698 = tmp694 - tmp697; tmp703 = tmp699 + tmp702; tmp704 = K707106781 * (tmp698 + tmp703); tmp774 = K707106781 * (tmp698 - tmp703); tmp711 = tmp694 + tmp697; tmp712 = tmp702 - tmp699; tmp713 = K707106781 * (tmp711 + tmp712); tmp777 = K707106781 * (tmp712 - tmp711); } } { fftw_real tmp34; fftw_real tmp218; fftw_real tmp161; fftw_real tmp230; fftw_real tmp37; fftw_real tmp229; fftw_real tmp164; fftw_real tmp219; fftw_real tmp44; fftw_real tmp233; fftw_real tmp226; fftw_real tmp171; fftw_real tmp41; fftw_real tmp232; fftw_real tmp223; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp162; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(input[2 * istride]); tmp33 = c_re(input[34 * istride]); tmp34 = tmp32 + tmp33; tmp218 = tmp32 - tmp33; { fftw_real tmp159; fftw_real tmp160; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp159 = c_im(input[2 * istride]); tmp160 = c_im(input[34 * istride]); tmp161 = tmp159 + tmp160; tmp230 = tmp159 - tmp160; tmp35 = c_re(input[18 * istride]); tmp36 = c_re(input[50 * istride]); tmp37 = tmp35 + tmp36; tmp229 = tmp35 - tmp36; } tmp162 = c_im(input[18 * istride]); tmp163 = c_im(input[50 * istride]); tmp164 = tmp162 + tmp163; tmp219 = tmp162 - tmp163; { fftw_real tmp42; fftw_real tmp43; fftw_real tmp224; fftw_real tmp169; fftw_real tmp170; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(input[58 * istride]); tmp43 = c_re(input[26 * istride]); tmp224 = tmp42 - tmp43; tmp169 = c_im(input[58 * istride]); tmp170 = c_im(input[26 * istride]); tmp225 = tmp169 - tmp170; tmp44 = tmp42 + tmp43; tmp233 = tmp225 - tmp224; tmp226 = tmp224 + tmp225; tmp171 = tmp169 + tmp170; } { fftw_real tmp39; fftw_real tmp40; fftw_real tmp221; fftw_real tmp166; fftw_real tmp167; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; tmp39 = c_re(input[10 * istride]); tmp40 = c_re(input[42 * istride]); tmp221 = tmp39 - tmp40; tmp166 = c_im(input[10 * istride]); tmp167 = c_im(input[42 * istride]); tmp222 = tmp166 - tmp167; tmp41 = tmp39 + tmp40; tmp232 = tmp221 + tmp222; tmp223 = tmp221 - tmp222; tmp168 = tmp166 + tmp167; } } { fftw_real tmp38; fftw_real tmp45; fftw_real tmp646; fftw_real tmp647; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp46 = tmp38 + tmp45; tmp856 = tmp38 - tmp45; tmp646 = tmp34 - tmp37; tmp647 = tmp171 - tmp168; tmp648 = tmp646 + tmp647; tmp758 = tmp646 - tmp647; } { fftw_real tmp165; fftw_real tmp172; fftw_real tmp649; fftw_real tmp650; ASSERT_ALIGNED_DOUBLE; tmp165 = tmp161 + tmp164; tmp172 = tmp168 + tmp171; tmp173 = tmp165 + tmp172; tmp857 = tmp165 - tmp172; tmp649 = tmp41 - tmp44; tmp650 = tmp161 - tmp164; tmp651 = tmp649 + tmp650; tmp759 = tmp650 - tmp649; } { fftw_real tmp220; fftw_real tmp227; fftw_real tmp482; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; tmp220 = tmp218 - tmp219; tmp227 = K707106781 * (tmp223 + tmp226); tmp228 = tmp220 - tmp227; tmp414 = tmp220 + tmp227; tmp482 = tmp218 + tmp219; tmp483 = K707106781 * (tmp233 - tmp232); tmp484 = tmp482 - tmp483; tmp578 = tmp482 + tmp483; } { fftw_real tmp231; fftw_real tmp234; fftw_real tmp485; fftw_real tmp486; ASSERT_ALIGNED_DOUBLE; tmp231 = tmp229 + tmp230; tmp234 = K707106781 * (tmp232 + tmp233); tmp235 = tmp231 - tmp234; tmp415 = tmp231 + tmp234; tmp485 = tmp230 - tmp229; tmp486 = K707106781 * (tmp223 - tmp226); tmp487 = tmp485 - tmp486; tmp579 = tmp485 + tmp486; } } { fftw_real tmp66; fftw_real tmp258; fftw_real tmp302; fftw_real tmp680; fftw_real tmp69; fftw_real tmp299; fftw_real tmp261; fftw_real tmp681; fftw_real tmp76; fftw_real tmp663; fftw_real tmp272; fftw_real tmp305; fftw_real tmp73; fftw_real tmp664; fftw_real tmp267; fftw_real tmp304; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp64; fftw_real tmp65; fftw_real tmp259; fftw_real tmp260; ASSERT_ALIGNED_DOUBLE; tmp64 = c_re(input[istride]); tmp65 = c_re(input[33 * istride]); tmp66 = tmp64 + tmp65; tmp258 = tmp64 - tmp65; { fftw_real tmp300; fftw_real tmp301; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp300 = c_im(input[istride]); tmp301 = c_im(input[33 * istride]); tmp302 = tmp300 - tmp301; tmp680 = tmp300 + tmp301; tmp67 = c_re(input[17 * istride]); tmp68 = c_re(input[49 * istride]); tmp69 = tmp67 + tmp68; tmp299 = tmp67 - tmp68; } tmp259 = c_im(input[17 * istride]); tmp260 = c_im(input[49 * istride]); tmp261 = tmp259 - tmp260; tmp681 = tmp259 + tmp260; { fftw_real tmp74; fftw_real tmp75; fftw_real tmp268; fftw_real tmp269; fftw_real tmp270; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; tmp74 = c_re(input[57 * istride]); tmp75 = c_re(input[25 * istride]); tmp268 = tmp74 - tmp75; tmp269 = c_im(input[57 * istride]); tmp270 = c_im(input[25 * istride]); tmp271 = tmp269 - tmp270; tmp76 = tmp74 + tmp75; tmp663 = tmp269 + tmp270; tmp272 = tmp268 + tmp271; tmp305 = tmp271 - tmp268; } { fftw_real tmp71; fftw_real tmp72; fftw_real tmp263; fftw_real tmp264; fftw_real tmp265; fftw_real tmp266; ASSERT_ALIGNED_DOUBLE; tmp71 = c_re(input[9 * istride]); tmp72 = c_re(input[41 * istride]); tmp263 = tmp71 - tmp72; tmp264 = c_im(input[9 * istride]); tmp265 = c_im(input[41 * istride]); tmp266 = tmp264 - tmp265; tmp73 = tmp71 + tmp72; tmp664 = tmp264 + tmp265; tmp267 = tmp263 - tmp266; tmp304 = tmp263 + tmp266; } } { fftw_real tmp70; fftw_real tmp77; fftw_real tmp662; fftw_real tmp665; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp66 + tmp69; tmp77 = tmp73 + tmp76; tmp78 = tmp70 + tmp77; tmp867 = tmp70 - tmp77; tmp662 = tmp66 - tmp69; tmp665 = tmp663 - tmp664; tmp666 = tmp662 + tmp665; tmp769 = tmp662 - tmp665; } { fftw_real tmp819; fftw_real tmp820; fftw_real tmp679; fftw_real tmp682; ASSERT_ALIGNED_DOUBLE; tmp819 = tmp680 + tmp681; tmp820 = tmp664 + tmp663; tmp821 = tmp819 + tmp820; tmp864 = tmp819 - tmp820; tmp679 = tmp73 - tmp76; tmp682 = tmp680 - tmp681; tmp683 = tmp679 + tmp682; tmp766 = tmp682 - tmp679; } { fftw_real tmp262; fftw_real tmp273; fftw_real tmp498; fftw_real tmp499; ASSERT_ALIGNED_DOUBLE; tmp262 = tmp258 - tmp261; tmp273 = K707106781 * (tmp267 + tmp272); tmp274 = tmp262 - tmp273; tmp425 = tmp262 + tmp273; tmp498 = tmp258 + tmp261; tmp499 = K707106781 * (tmp305 - tmp304); tmp500 = tmp498 - tmp499; tmp589 = tmp498 + tmp499; } { fftw_real tmp303; fftw_real tmp306; fftw_real tmp509; fftw_real tmp510; ASSERT_ALIGNED_DOUBLE; tmp303 = tmp299 + tmp302; tmp306 = K707106781 * (tmp304 + tmp305); tmp307 = tmp303 - tmp306; tmp422 = tmp303 + tmp306; tmp509 = tmp302 - tmp299; tmp510 = K707106781 * (tmp267 - tmp272); tmp511 = tmp509 - tmp510; tmp586 = tmp509 + tmp510; } } { fftw_real tmp49; fftw_real tmp237; fftw_real tmp176; fftw_real tmp249; fftw_real tmp52; fftw_real tmp248; fftw_real tmp179; fftw_real tmp238; fftw_real tmp59; fftw_real tmp252; fftw_real tmp245; fftw_real tmp186; fftw_real tmp56; fftw_real tmp251; fftw_real tmp242; fftw_real tmp183; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp177; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; tmp47 = c_re(input[62 * istride]); tmp48 = c_re(input[30 * istride]); tmp49 = tmp47 + tmp48; tmp237 = tmp47 - tmp48; { fftw_real tmp174; fftw_real tmp175; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp174 = c_im(input[62 * istride]); tmp175 = c_im(input[30 * istride]); tmp176 = tmp174 + tmp175; tmp249 = tmp174 - tmp175; tmp50 = c_re(input[14 * istride]); tmp51 = c_re(input[46 * istride]); tmp52 = tmp50 + tmp51; tmp248 = tmp50 - tmp51; } tmp177 = c_im(input[14 * istride]); tmp178 = c_im(input[46 * istride]); tmp179 = tmp177 + tmp178; tmp238 = tmp177 - tmp178; { fftw_real tmp57; fftw_real tmp58; fftw_real tmp243; fftw_real tmp184; fftw_real tmp185; fftw_real tmp244; ASSERT_ALIGNED_DOUBLE; tmp57 = c_re(input[54 * istride]); tmp58 = c_re(input[22 * istride]); tmp243 = tmp57 - tmp58; tmp184 = c_im(input[54 * istride]); tmp185 = c_im(input[22 * istride]); tmp244 = tmp184 - tmp185; tmp59 = tmp57 + tmp58; tmp252 = tmp244 - tmp243; tmp245 = tmp243 + tmp244; tmp186 = tmp184 + tmp185; } { fftw_real tmp54; fftw_real tmp55; fftw_real tmp240; fftw_real tmp181; fftw_real tmp182; fftw_real tmp241; ASSERT_ALIGNED_DOUBLE; tmp54 = c_re(input[6 * istride]); tmp55 = c_re(input[38 * istride]); tmp240 = tmp54 - tmp55; tmp181 = c_im(input[6 * istride]); tmp182 = c_im(input[38 * istride]); tmp241 = tmp181 - tmp182; tmp56 = tmp54 + tmp55; tmp251 = tmp240 + tmp241; tmp242 = tmp240 - tmp241; tmp183 = tmp181 + tmp182; } } { fftw_real tmp53; fftw_real tmp60; fftw_real tmp653; fftw_real tmp654; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp61 = tmp53 + tmp60; tmp859 = tmp53 - tmp60; tmp653 = tmp56 - tmp59; tmp654 = tmp176 - tmp179; tmp655 = tmp653 + tmp654; tmp761 = tmp654 - tmp653; } { fftw_real tmp180; fftw_real tmp187; fftw_real tmp656; fftw_real tmp657; ASSERT_ALIGNED_DOUBLE; tmp180 = tmp176 + tmp179; tmp187 = tmp183 + tmp186; tmp188 = tmp180 + tmp187; tmp860 = tmp180 - tmp187; tmp656 = tmp49 - tmp52; tmp657 = tmp186 - tmp183; tmp658 = tmp656 + tmp657; tmp762 = tmp656 - tmp657; } { fftw_real tmp239; fftw_real tmp246; fftw_real tmp489; fftw_real tmp490; ASSERT_ALIGNED_DOUBLE; tmp239 = tmp237 - tmp238; tmp246 = K707106781 * (tmp242 + tmp245); tmp247 = tmp239 - tmp246; tmp417 = tmp239 + tmp246; tmp489 = tmp249 - tmp248; tmp490 = K707106781 * (tmp242 - tmp245); tmp491 = tmp489 - tmp490; tmp581 = tmp489 + tmp490; } { fftw_real tmp250; fftw_real tmp253; fftw_real tmp492; fftw_real tmp493; ASSERT_ALIGNED_DOUBLE; tmp250 = tmp248 + tmp249; tmp253 = K707106781 * (tmp251 + tmp252); tmp254 = tmp250 - tmp253; tmp418 = tmp250 + tmp253; tmp492 = tmp237 + tmp238; tmp493 = K707106781 * (tmp252 - tmp251); tmp494 = tmp492 - tmp493; tmp582 = tmp492 + tmp493; } } { fftw_real tmp81; fftw_real tmp668; fftw_real tmp84; fftw_real tmp669; fftw_real tmp290; fftw_real tmp504; fftw_real tmp295; fftw_real tmp505; fftw_real tmp670; fftw_real tmp667; fftw_real tmp88; fftw_real tmp673; fftw_real tmp91; fftw_real tmp674; fftw_real tmp279; fftw_real tmp501; fftw_real tmp284; fftw_real tmp502; fftw_real tmp675; fftw_real tmp672; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp291; fftw_real tmp289; fftw_real tmp286; fftw_real tmp294; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp79; fftw_real tmp80; fftw_real tmp287; fftw_real tmp288; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(input[5 * istride]); tmp80 = c_re(input[37 * istride]); tmp81 = tmp79 + tmp80; tmp291 = tmp79 - tmp80; tmp287 = c_im(input[5 * istride]); tmp288 = c_im(input[37 * istride]); tmp289 = tmp287 - tmp288; tmp668 = tmp287 + tmp288; } { fftw_real tmp82; fftw_real tmp83; fftw_real tmp292; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; tmp82 = c_re(input[21 * istride]); tmp83 = c_re(input[53 * istride]); tmp84 = tmp82 + tmp83; tmp286 = tmp82 - tmp83; tmp292 = c_im(input[21 * istride]); tmp293 = c_im(input[53 * istride]); tmp294 = tmp292 - tmp293; tmp669 = tmp292 + tmp293; } tmp290 = tmp286 + tmp289; tmp504 = tmp289 - tmp286; tmp295 = tmp291 - tmp294; tmp505 = tmp291 + tmp294; tmp670 = tmp668 - tmp669; tmp667 = tmp81 - tmp84; } { fftw_real tmp280; fftw_real tmp278; fftw_real tmp275; fftw_real tmp283; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp86; fftw_real tmp87; fftw_real tmp276; fftw_real tmp277; ASSERT_ALIGNED_DOUBLE; tmp86 = c_re(input[61 * istride]); tmp87 = c_re(input[29 * istride]); tmp88 = tmp86 + tmp87; tmp280 = tmp86 - tmp87; tmp276 = c_im(input[61 * istride]); tmp277 = c_im(input[29 * istride]); tmp278 = tmp276 - tmp277; tmp673 = tmp276 + tmp277; } { fftw_real tmp89; fftw_real tmp90; fftw_real tmp281; fftw_real tmp282; ASSERT_ALIGNED_DOUBLE; tmp89 = c_re(input[13 * istride]); tmp90 = c_re(input[45 * istride]); tmp91 = tmp89 + tmp90; tmp275 = tmp89 - tmp90; tmp281 = c_im(input[13 * istride]); tmp282 = c_im(input[45 * istride]); tmp283 = tmp281 - tmp282; tmp674 = tmp281 + tmp282; } tmp279 = tmp275 + tmp278; tmp501 = tmp278 - tmp275; tmp284 = tmp280 - tmp283; tmp502 = tmp280 + tmp283; tmp675 = tmp673 - tmp674; tmp672 = tmp88 - tmp91; } { fftw_real tmp85; fftw_real tmp92; fftw_real tmp308; fftw_real tmp309; ASSERT_ALIGNED_DOUBLE; tmp85 = tmp81 + tmp84; tmp92 = tmp88 + tmp91; tmp93 = tmp85 + tmp92; tmp865 = tmp85 - tmp92; tmp308 = (K923879532 * tmp295) - (K382683432 * tmp290); tmp309 = (K382683432 * tmp279) + (K923879532 * tmp284); tmp310 = tmp308 - tmp309; tmp426 = tmp308 + tmp309; } { fftw_real tmp285; fftw_real tmp296; fftw_real tmp822; fftw_real tmp823; ASSERT_ALIGNED_DOUBLE; tmp285 = (K923879532 * tmp279) - (K382683432 * tmp284); tmp296 = (K923879532 * tmp290) + (K382683432 * tmp295); tmp297 = tmp285 - tmp296; tmp423 = tmp296 + tmp285; tmp822 = tmp668 + tmp669; tmp823 = tmp673 + tmp674; tmp824 = tmp822 + tmp823; tmp868 = tmp823 - tmp822; } { fftw_real tmp503; fftw_real tmp506; fftw_real tmp512; fftw_real tmp513; ASSERT_ALIGNED_DOUBLE; tmp503 = (K382683432 * tmp501) - (K923879532 * tmp502); tmp506 = (K382683432 * tmp504) + (K923879532 * tmp505); tmp507 = tmp503 - tmp506; tmp587 = tmp506 + tmp503; tmp512 = (K382683432 * tmp505) - (K923879532 * tmp504); tmp513 = (K923879532 * tmp501) + (K382683432 * tmp502); tmp514 = tmp512 - tmp513; tmp590 = tmp512 + tmp513; } { fftw_real tmp671; fftw_real tmp676; fftw_real tmp684; fftw_real tmp685; ASSERT_ALIGNED_DOUBLE; tmp671 = tmp667 - tmp670; tmp676 = tmp672 + tmp675; tmp677 = K707106781 * (tmp671 + tmp676); tmp767 = K707106781 * (tmp671 - tmp676); tmp684 = tmp667 + tmp670; tmp685 = tmp675 - tmp672; tmp686 = K707106781 * (tmp684 + tmp685); tmp770 = K707106781 * (tmp685 - tmp684); } } { fftw_real tmp63; fftw_real tmp851; fftw_real tmp850; fftw_real tmp852; fftw_real tmp126; fftw_real tmp127; fftw_real tmp190; fftw_real tmp847; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp31; fftw_real tmp62; fftw_real tmp848; fftw_real tmp849; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp15 + tmp30; tmp62 = tmp46 + tmp61; tmp63 = tmp31 + tmp62; tmp851 = tmp31 - tmp62; tmp848 = tmp821 + tmp824; tmp849 = tmp830 + tmp833; tmp850 = tmp848 + tmp849; tmp852 = tmp849 - tmp848; } { fftw_real tmp94; fftw_real tmp125; fftw_real tmp158; fftw_real tmp189; ASSERT_ALIGNED_DOUBLE; tmp94 = tmp78 + tmp93; tmp125 = tmp109 + tmp124; tmp126 = tmp94 + tmp125; tmp127 = tmp94 - tmp125; tmp158 = tmp142 + tmp157; tmp189 = tmp173 + tmp188; tmp190 = tmp158 - tmp189; tmp847 = tmp158 + tmp189; } c_re(output[32 * ostride]) = tmp63 - tmp126; c_re(output[0]) = tmp63 + tmp126; c_im(output[16 * ostride]) = tmp127 + tmp190; c_im(output[48 * ostride]) = tmp190 - tmp127; c_im(output[32 * ostride]) = tmp847 - tmp850; c_im(output[0]) = tmp847 + tmp850; c_re(output[48 * ostride]) = tmp851 - tmp852; c_re(output[16 * ostride]) = tmp851 + tmp852; } { fftw_real tmp817; fftw_real tmp841; fftw_real tmp839; fftw_real tmp845; fftw_real tmp826; fftw_real tmp842; fftw_real tmp835; fftw_real tmp843; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp815; fftw_real tmp816; fftw_real tmp837; fftw_real tmp838; ASSERT_ALIGNED_DOUBLE; tmp815 = tmp142 - tmp157; tmp816 = tmp46 - tmp61; tmp817 = tmp815 - tmp816; tmp841 = tmp816 + tmp815; tmp837 = tmp15 - tmp30; tmp838 = tmp188 - tmp173; tmp839 = tmp837 + tmp838; tmp845 = tmp837 - tmp838; } { fftw_real tmp818; fftw_real tmp825; fftw_real tmp827; fftw_real tmp834; ASSERT_ALIGNED_DOUBLE; tmp818 = tmp78 - tmp93; tmp825 = tmp821 - tmp824; tmp826 = tmp818 - tmp825; tmp842 = tmp818 + tmp825; tmp827 = tmp109 - tmp124; tmp834 = tmp830 - tmp833; tmp835 = tmp827 + tmp834; tmp843 = tmp834 - tmp827; } { fftw_real tmp836; fftw_real tmp840; fftw_real tmp844; fftw_real tmp846; ASSERT_ALIGNED_DOUBLE; tmp836 = K707106781 * (tmp826 - tmp835); c_im(output[56 * ostride]) = tmp817 - tmp836; c_im(output[24 * ostride]) = tmp817 + tmp836; tmp840 = K707106781 * (tmp826 + tmp835); c_re(output[40 * ostride]) = tmp839 - tmp840; c_re(output[8 * ostride]) = tmp839 + tmp840; tmp844 = K707106781 * (tmp842 + tmp843); c_im(output[40 * ostride]) = tmp841 - tmp844; c_im(output[8 * ostride]) = tmp841 + tmp844; tmp846 = K707106781 * (tmp843 - tmp842); c_re(output[56 * ostride]) = tmp845 - tmp846; c_re(output[24 * ostride]) = tmp845 + tmp846; } } { fftw_real tmp217; fftw_real tmp391; fftw_real tmp396; fftw_real tmp406; fftw_real tmp399; fftw_real tmp407; fftw_real tmp367; fftw_real tmp387; fftw_real tmp312; fftw_real tmp386; fftw_real tmp379; fftw_real tmp401; fftw_real tmp382; fftw_real tmp392; fftw_real tmp256; fftw_real tmp402; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp201; fftw_real tmp216; fftw_real tmp394; fftw_real tmp395; ASSERT_ALIGNED_DOUBLE; tmp201 = tmp193 - tmp200; tmp216 = tmp208 - tmp215; tmp217 = tmp201 - tmp216; tmp391 = tmp201 + tmp216; tmp394 = tmp274 + tmp297; tmp395 = tmp307 + tmp310; tmp396 = (K881921264 * tmp394) - (K471396736 * tmp395); tmp406 = (K471396736 * tmp394) + (K881921264 * tmp395); } { fftw_real tmp397; fftw_real tmp398; fftw_real tmp353; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp397 = tmp329 + tmp352; tmp398 = tmp362 + tmp365; tmp399 = (K881921264 * tmp397) + (K471396736 * tmp398); tmp407 = (K881921264 * tmp398) - (K471396736 * tmp397); tmp353 = tmp329 - tmp352; tmp366 = tmp362 - tmp365; tmp367 = (K290284677 * tmp353) + (K956940335 * tmp366); tmp387 = (K290284677 * tmp366) - (K956940335 * tmp353); } { fftw_real tmp298; fftw_real tmp311; fftw_real tmp375; fftw_real tmp378; ASSERT_ALIGNED_DOUBLE; tmp298 = tmp274 - tmp297; tmp311 = tmp307 - tmp310; tmp312 = (K290284677 * tmp298) - (K956940335 * tmp311); tmp386 = (K956940335 * tmp298) + (K290284677 * tmp311); tmp375 = tmp371 - tmp374; tmp378 = tmp376 - tmp377; tmp379 = tmp375 - tmp378; tmp401 = tmp375 + tmp378; } { fftw_real tmp380; fftw_real tmp381; fftw_real tmp236; fftw_real tmp255; ASSERT_ALIGNED_DOUBLE; tmp380 = (K555570233 * tmp254) - (K831469612 * tmp247); tmp381 = (K831469612 * tmp228) + (K555570233 * tmp235); tmp382 = tmp380 - tmp381; tmp392 = tmp381 + tmp380; tmp236 = (K555570233 * tmp228) - (K831469612 * tmp235); tmp255 = (K555570233 * tmp247) + (K831469612 * tmp254); tmp256 = tmp236 - tmp255; tmp402 = tmp236 + tmp255; } { fftw_real tmp257; fftw_real tmp368; fftw_real tmp383; fftw_real tmp384; ASSERT_ALIGNED_DOUBLE; tmp257 = tmp217 - tmp256; tmp368 = tmp312 - tmp367; c_im(output[61 * ostride]) = tmp257 - tmp368; c_im(output[29 * ostride]) = tmp257 + tmp368; tmp383 = tmp379 + tmp382; tmp384 = tmp312 + tmp367; c_re(output[45 * ostride]) = tmp383 - tmp384; c_re(output[13 * ostride]) = tmp383 + tmp384; } { fftw_real tmp389; fftw_real tmp390; fftw_real tmp385; fftw_real tmp388; ASSERT_ALIGNED_DOUBLE; tmp389 = tmp379 - tmp382; tmp390 = tmp387 - tmp386; c_re(output[61 * ostride]) = tmp389 - tmp390; c_re(output[29 * ostride]) = tmp389 + tmp390; tmp385 = tmp217 + tmp256; tmp388 = tmp386 + tmp387; c_im(output[45 * ostride]) = tmp385 - tmp388; c_im(output[13 * ostride]) = tmp385 + tmp388; } { fftw_real tmp393; fftw_real tmp400; fftw_real tmp403; fftw_real tmp404; ASSERT_ALIGNED_DOUBLE; tmp393 = tmp391 - tmp392; tmp400 = tmp396 - tmp399; c_im(output[53 * ostride]) = tmp393 - tmp400; c_im(output[21 * ostride]) = tmp393 + tmp400; tmp403 = tmp401 + tmp402; tmp404 = tmp396 + tmp399; c_re(output[37 * ostride]) = tmp403 - tmp404; c_re(output[5 * ostride]) = tmp403 + tmp404; } { fftw_real tmp409; fftw_real tmp410; fftw_real tmp405; fftw_real tmp408; ASSERT_ALIGNED_DOUBLE; tmp409 = tmp401 - tmp402; tmp410 = tmp407 - tmp406; c_re(output[53 * ostride]) = tmp409 - tmp410; c_re(output[21 * ostride]) = tmp409 + tmp410; tmp405 = tmp391 + tmp392; tmp408 = tmp406 + tmp407; c_im(output[37 * ostride]) = tmp405 - tmp408; c_im(output[5 * ostride]) = tmp405 + tmp408; } } { fftw_real tmp413; fftw_real tmp451; fftw_real tmp456; fftw_real tmp466; fftw_real tmp459; fftw_real tmp467; fftw_real tmp435; fftw_real tmp447; fftw_real tmp428; fftw_real tmp446; fftw_real tmp439; fftw_real tmp461; fftw_real tmp442; fftw_real tmp452; fftw_real tmp420; fftw_real tmp462; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp411; fftw_real tmp412; fftw_real tmp454; fftw_real tmp455; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp193 + tmp200; tmp412 = tmp377 + tmp376; tmp413 = tmp411 - tmp412; tmp451 = tmp411 + tmp412; tmp454 = tmp422 + tmp423; tmp455 = tmp425 + tmp426; tmp456 = (K995184726 * tmp454) + (K098017140 * tmp455); tmp466 = (K995184726 * tmp455) - (K098017140 * tmp454); } { fftw_real tmp457; fftw_real tmp458; fftw_real tmp431; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp457 = tmp429 + tmp430; tmp458 = tmp432 + tmp433; tmp459 = (K995184726 * tmp457) - (K098017140 * tmp458); tmp467 = (K098017140 * tmp457) + (K995184726 * tmp458); tmp431 = tmp429 - tmp430; tmp434 = tmp432 - tmp433; tmp435 = (K634393284 * tmp431) - (K773010453 * tmp434); tmp447 = (K773010453 * tmp431) + (K634393284 * tmp434); } { fftw_real tmp424; fftw_real tmp427; fftw_real tmp437; fftw_real tmp438; ASSERT_ALIGNED_DOUBLE; tmp424 = tmp422 - tmp423; tmp427 = tmp425 - tmp426; tmp428 = (K634393284 * tmp424) + (K773010453 * tmp427); tmp446 = (K634393284 * tmp427) - (K773010453 * tmp424); tmp437 = tmp371 + tmp374; tmp438 = tmp208 + tmp215; tmp439 = tmp437 - tmp438; tmp461 = tmp437 + tmp438; } { fftw_real tmp440; fftw_real tmp441; fftw_real tmp416; fftw_real tmp419; ASSERT_ALIGNED_DOUBLE; tmp440 = (K980785280 * tmp418) - (K195090322 * tmp417); tmp441 = (K195090322 * tmp414) + (K980785280 * tmp415); tmp442 = tmp440 - tmp441; tmp452 = tmp441 + tmp440; tmp416 = (K980785280 * tmp414) - (K195090322 * tmp415); tmp419 = (K980785280 * tmp417) + (K195090322 * tmp418); tmp420 = tmp416 - tmp419; tmp462 = tmp416 + tmp419; } { fftw_real tmp421; fftw_real tmp436; fftw_real tmp443; fftw_real tmp444; ASSERT_ALIGNED_DOUBLE; tmp421 = tmp413 + tmp420; tmp436 = tmp428 + tmp435; c_im(output[41 * ostride]) = tmp421 - tmp436; c_im(output[9 * ostride]) = tmp421 + tmp436; tmp443 = tmp439 - tmp442; tmp444 = tmp435 - tmp428; c_re(output[57 * ostride]) = tmp443 - tmp444; c_re(output[25 * ostride]) = tmp443 + tmp444; } { fftw_real tmp449; fftw_real tmp450; fftw_real tmp445; fftw_real tmp448; ASSERT_ALIGNED_DOUBLE; tmp449 = tmp439 + tmp442; tmp450 = tmp446 + tmp447; c_re(output[41 * ostride]) = tmp449 - tmp450; c_re(output[9 * ostride]) = tmp449 + tmp450; tmp445 = tmp413 - tmp420; tmp448 = tmp446 - tmp447; c_im(output[57 * ostride]) = tmp445 - tmp448; c_im(output[25 * ostride]) = tmp445 + tmp448; } { fftw_real tmp453; fftw_real tmp460; fftw_real tmp463; fftw_real tmp464; ASSERT_ALIGNED_DOUBLE; tmp453 = tmp451 + tmp452; tmp460 = tmp456 + tmp459; c_im(output[33 * ostride]) = tmp453 - tmp460; c_im(output[ostride]) = tmp453 + tmp460; tmp463 = tmp461 - tmp462; tmp464 = tmp459 - tmp456; c_re(output[49 * ostride]) = tmp463 - tmp464; c_re(output[17 * ostride]) = tmp463 + tmp464; } { fftw_real tmp469; fftw_real tmp470; fftw_real tmp465; fftw_real tmp468; ASSERT_ALIGNED_DOUBLE; tmp469 = tmp461 + tmp462; tmp470 = tmp466 + tmp467; c_re(output[33 * ostride]) = tmp469 - tmp470; c_re(output[ostride]) = tmp469 + tmp470; tmp465 = tmp451 - tmp452; tmp468 = tmp466 - tmp467; c_im(output[49 * ostride]) = tmp465 - tmp468; c_im(output[17 * ostride]) = tmp465 + tmp468; } } { fftw_real tmp855; fftw_real tmp893; fftw_real tmp862; fftw_real tmp904; fftw_real tmp884; fftw_real tmp894; fftw_real tmp870; fftw_real tmp888; fftw_real tmp881; fftw_real tmp903; fftw_real tmp898; fftw_real tmp908; fftw_real tmp877; fftw_real tmp889; fftw_real tmp901; fftw_real tmp909; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp858; fftw_real tmp861; fftw_real tmp896; fftw_real tmp897; ASSERT_ALIGNED_DOUBLE; tmp855 = tmp853 - tmp854; tmp893 = tmp854 + tmp853; tmp858 = tmp856 - tmp857; tmp861 = tmp859 + tmp860; tmp862 = K707106781 * (tmp858 - tmp861); tmp904 = K707106781 * (tmp858 + tmp861); { fftw_real tmp882; fftw_real tmp883; fftw_real tmp866; fftw_real tmp869; ASSERT_ALIGNED_DOUBLE; tmp882 = tmp860 - tmp859; tmp883 = tmp856 + tmp857; tmp884 = K707106781 * (tmp882 - tmp883); tmp894 = K707106781 * (tmp883 + tmp882); tmp866 = tmp864 - tmp865; tmp869 = tmp867 - tmp868; tmp870 = (K382683432 * tmp866) + (K923879532 * tmp869); tmp888 = (K382683432 * tmp869) - (K923879532 * tmp866); } tmp881 = tmp879 - tmp880; tmp903 = tmp879 + tmp880; tmp896 = tmp865 + tmp864; tmp897 = tmp867 + tmp868; tmp898 = (K923879532 * tmp896) + (K382683432 * tmp897); tmp908 = (K923879532 * tmp897) - (K382683432 * tmp896); { fftw_real tmp873; fftw_real tmp876; fftw_real tmp899; fftw_real tmp900; ASSERT_ALIGNED_DOUBLE; tmp873 = tmp871 - tmp872; tmp876 = tmp874 - tmp875; tmp877 = (K382683432 * tmp873) - (K923879532 * tmp876); tmp889 = (K923879532 * tmp873) + (K382683432 * tmp876); tmp899 = tmp872 + tmp871; tmp900 = tmp874 + tmp875; tmp901 = (K923879532 * tmp899) - (K382683432 * tmp900); tmp909 = (K382683432 * tmp899) + (K923879532 * tmp900); } } { fftw_real tmp863; fftw_real tmp878; fftw_real tmp885; fftw_real tmp886; ASSERT_ALIGNED_DOUBLE; tmp863 = tmp855 + tmp862; tmp878 = tmp870 + tmp877; c_im(output[44 * ostride]) = tmp863 - tmp878; c_im(output[12 * ostride]) = tmp863 + tmp878; tmp885 = tmp881 - tmp884; tmp886 = tmp877 - tmp870; c_re(output[60 * ostride]) = tmp885 - tmp886; c_re(output[28 * ostride]) = tmp885 + tmp886; } { fftw_real tmp891; fftw_real tmp892; fftw_real tmp887; fftw_real tmp890; ASSERT_ALIGNED_DOUBLE; tmp891 = tmp881 + tmp884; tmp892 = tmp888 + tmp889; c_re(output[44 * ostride]) = tmp891 - tmp892; c_re(output[12 * ostride]) = tmp891 + tmp892; tmp887 = tmp855 - tmp862; tmp890 = tmp888 - tmp889; c_im(output[60 * ostride]) = tmp887 - tmp890; c_im(output[28 * ostride]) = tmp887 + tmp890; } { fftw_real tmp895; fftw_real tmp902; fftw_real tmp905; fftw_real tmp906; ASSERT_ALIGNED_DOUBLE; tmp895 = tmp893 + tmp894; tmp902 = tmp898 + tmp901; c_im(output[36 * ostride]) = tmp895 - tmp902; c_im(output[4 * ostride]) = tmp895 + tmp902; tmp905 = tmp903 - tmp904; tmp906 = tmp901 - tmp898; c_re(output[52 * ostride]) = tmp905 - tmp906; c_re(output[20 * ostride]) = tmp905 + tmp906; } { fftw_real tmp911; fftw_real tmp912; fftw_real tmp907; fftw_real tmp910; ASSERT_ALIGNED_DOUBLE; tmp911 = tmp903 + tmp904; tmp912 = tmp908 + tmp909; c_re(output[36 * ostride]) = tmp911 - tmp912; c_re(output[4 * ostride]) = tmp911 + tmp912; tmp907 = tmp893 - tmp894; tmp910 = tmp908 - tmp909; c_im(output[52 * ostride]) = tmp907 - tmp910; c_im(output[20 * ostride]) = tmp907 + tmp910; } } { fftw_real tmp757; fftw_real tmp795; fftw_real tmp800; fftw_real tmp810; fftw_real tmp803; fftw_real tmp811; fftw_real tmp779; fftw_real tmp791; fftw_real tmp783; fftw_real tmp805; fftw_real tmp764; fftw_real tmp806; fftw_real tmp786; fftw_real tmp796; fftw_real tmp772; fftw_real tmp790; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp756; fftw_real tmp798; fftw_real tmp799; fftw_real tmp782; fftw_real tmp760; fftw_real tmp763; ASSERT_ALIGNED_DOUBLE; tmp756 = K707106781 * (tmp720 - tmp721); tmp757 = tmp755 - tmp756; tmp795 = tmp755 + tmp756; tmp798 = tmp766 + tmp767; tmp799 = tmp769 + tmp770; tmp800 = (K831469612 * tmp798) + (K555570233 * tmp799); tmp810 = (K831469612 * tmp799) - (K555570233 * tmp798); { fftw_real tmp801; fftw_real tmp802; fftw_real tmp775; fftw_real tmp778; ASSERT_ALIGNED_DOUBLE; tmp801 = tmp773 + tmp774; tmp802 = tmp776 + tmp777; tmp803 = (K831469612 * tmp801) - (K555570233 * tmp802); tmp811 = (K555570233 * tmp801) + (K831469612 * tmp802); tmp775 = tmp773 - tmp774; tmp778 = tmp776 - tmp777; tmp779 = (K195090322 * tmp775) - (K980785280 * tmp778); tmp791 = (K980785280 * tmp775) + (K195090322 * tmp778); } tmp782 = K707106781 * (tmp643 - tmp640); tmp783 = tmp781 - tmp782; tmp805 = tmp781 + tmp782; tmp760 = (K382683432 * tmp758) - (K923879532 * tmp759); tmp763 = (K923879532 * tmp761) + (K382683432 * tmp762); tmp764 = tmp760 - tmp763; tmp806 = tmp760 + tmp763; { fftw_real tmp784; fftw_real tmp785; fftw_real tmp768; fftw_real tmp771; ASSERT_ALIGNED_DOUBLE; tmp784 = (K382683432 * tmp761) - (K923879532 * tmp762); tmp785 = (K382683432 * tmp759) + (K923879532 * tmp758); tmp786 = tmp784 - tmp785; tmp796 = tmp785 + tmp784; tmp768 = tmp766 - tmp767; tmp771 = tmp769 - tmp770; tmp772 = (K195090322 * tmp768) + (K980785280 * tmp771); tmp790 = (K195090322 * tmp771) - (K980785280 * tmp768); } } { fftw_real tmp765; fftw_real tmp780; fftw_real tmp787; fftw_real tmp788; ASSERT_ALIGNED_DOUBLE; tmp765 = tmp757 + tmp764; tmp780 = tmp772 + tmp779; c_im(output[46 * ostride]) = tmp765 - tmp780; c_im(output[14 * ostride]) = tmp765 + tmp780; tmp787 = tmp783 - tmp786; tmp788 = tmp779 - tmp772; c_re(output[62 * ostride]) = tmp787 - tmp788; c_re(output[30 * ostride]) = tmp787 + tmp788; } { fftw_real tmp793; fftw_real tmp794; fftw_real tmp789; fftw_real tmp792; ASSERT_ALIGNED_DOUBLE; tmp793 = tmp783 + tmp786; tmp794 = tmp790 + tmp791; c_re(output[46 * ostride]) = tmp793 - tmp794; c_re(output[14 * ostride]) = tmp793 + tmp794; tmp789 = tmp757 - tmp764; tmp792 = tmp790 - tmp791; c_im(output[62 * ostride]) = tmp789 - tmp792; c_im(output[30 * ostride]) = tmp789 + tmp792; } { fftw_real tmp797; fftw_real tmp804; fftw_real tmp807; fftw_real tmp808; ASSERT_ALIGNED_DOUBLE; tmp797 = tmp795 + tmp796; tmp804 = tmp800 + tmp803; c_im(output[38 * ostride]) = tmp797 - tmp804; c_im(output[6 * ostride]) = tmp797 + tmp804; tmp807 = tmp805 - tmp806; tmp808 = tmp803 - tmp800; c_re(output[54 * ostride]) = tmp807 - tmp808; c_re(output[22 * ostride]) = tmp807 + tmp808; } { fftw_real tmp813; fftw_real tmp814; fftw_real tmp809; fftw_real tmp812; ASSERT_ALIGNED_DOUBLE; tmp813 = tmp805 + tmp806; tmp814 = tmp810 + tmp811; c_re(output[38 * ostride]) = tmp813 - tmp814; c_re(output[6 * ostride]) = tmp813 + tmp814; tmp809 = tmp795 - tmp796; tmp812 = tmp810 - tmp811; c_im(output[54 * ostride]) = tmp809 - tmp812; c_im(output[22 * ostride]) = tmp809 + tmp812; } } { fftw_real tmp645; fftw_real tmp735; fftw_real tmp740; fftw_real tmp750; fftw_real tmp743; fftw_real tmp751; fftw_real tmp715; fftw_real tmp731; fftw_real tmp723; fftw_real tmp745; fftw_real tmp660; fftw_real tmp746; fftw_real tmp726; fftw_real tmp736; fftw_real tmp688; fftw_real tmp730; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp644; fftw_real tmp738; fftw_real tmp739; fftw_real tmp722; fftw_real tmp652; fftw_real tmp659; ASSERT_ALIGNED_DOUBLE; tmp644 = K707106781 * (tmp640 + tmp643); tmp645 = tmp637 - tmp644; tmp735 = tmp637 + tmp644; tmp738 = tmp666 + tmp677; tmp739 = tmp683 + tmp686; tmp740 = (K980785280 * tmp738) - (K195090322 * tmp739); tmp750 = (K195090322 * tmp738) + (K980785280 * tmp739); { fftw_real tmp741; fftw_real tmp742; fftw_real tmp705; fftw_real tmp714; ASSERT_ALIGNED_DOUBLE; tmp741 = tmp693 + tmp704; tmp742 = tmp710 + tmp713; tmp743 = (K980785280 * tmp741) + (K195090322 * tmp742); tmp751 = (K980785280 * tmp742) - (K195090322 * tmp741); tmp705 = tmp693 - tmp704; tmp714 = tmp710 - tmp713; tmp715 = (K555570233 * tmp705) + (K831469612 * tmp714); tmp731 = (K555570233 * tmp714) - (K831469612 * tmp705); } tmp722 = K707106781 * (tmp720 + tmp721); tmp723 = tmp719 - tmp722; tmp745 = tmp719 + tmp722; tmp652 = (K923879532 * tmp648) - (K382683432 * tmp651); tmp659 = (K382683432 * tmp655) + (K923879532 * tmp658); tmp660 = tmp652 - tmp659; tmp746 = tmp652 + tmp659; { fftw_real tmp724; fftw_real tmp725; fftw_real tmp678; fftw_real tmp687; ASSERT_ALIGNED_DOUBLE; tmp724 = (K923879532 * tmp655) - (K382683432 * tmp658); tmp725 = (K923879532 * tmp651) + (K382683432 * tmp648); tmp726 = tmp724 - tmp725; tmp736 = tmp725 + tmp724; tmp678 = tmp666 - tmp677; tmp687 = tmp683 - tmp686; tmp688 = (K555570233 * tmp678) - (K831469612 * tmp687); tmp730 = (K831469612 * tmp678) + (K555570233 * tmp687); } } { fftw_real tmp661; fftw_real tmp716; fftw_real tmp727; fftw_real tmp728; ASSERT_ALIGNED_DOUBLE; tmp661 = tmp645 - tmp660; tmp716 = tmp688 - tmp715; c_im(output[58 * ostride]) = tmp661 - tmp716; c_im(output[26 * ostride]) = tmp661 + tmp716; tmp727 = tmp723 + tmp726; tmp728 = tmp688 + tmp715; c_re(output[42 * ostride]) = tmp727 - tmp728; c_re(output[10 * ostride]) = tmp727 + tmp728; } { fftw_real tmp733; fftw_real tmp734; fftw_real tmp729; fftw_real tmp732; ASSERT_ALIGNED_DOUBLE; tmp733 = tmp723 - tmp726; tmp734 = tmp731 - tmp730; c_re(output[58 * ostride]) = tmp733 - tmp734; c_re(output[26 * ostride]) = tmp733 + tmp734; tmp729 = tmp645 + tmp660; tmp732 = tmp730 + tmp731; c_im(output[42 * ostride]) = tmp729 - tmp732; c_im(output[10 * ostride]) = tmp729 + tmp732; } { fftw_real tmp737; fftw_real tmp744; fftw_real tmp747; fftw_real tmp748; ASSERT_ALIGNED_DOUBLE; tmp737 = tmp735 - tmp736; tmp744 = tmp740 - tmp743; c_im(output[50 * ostride]) = tmp737 - tmp744; c_im(output[18 * ostride]) = tmp737 + tmp744; tmp747 = tmp745 + tmp746; tmp748 = tmp740 + tmp743; c_re(output[34 * ostride]) = tmp747 - tmp748; c_re(output[2 * ostride]) = tmp747 + tmp748; } { fftw_real tmp753; fftw_real tmp754; fftw_real tmp749; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp753 = tmp745 - tmp746; tmp754 = tmp751 - tmp750; c_re(output[50 * ostride]) = tmp753 - tmp754; c_re(output[18 * ostride]) = tmp753 + tmp754; tmp749 = tmp735 + tmp736; tmp752 = tmp750 + tmp751; c_im(output[34 * ostride]) = tmp749 - tmp752; c_im(output[2 * ostride]) = tmp749 + tmp752; } } { fftw_real tmp481; fftw_real tmp555; fftw_real tmp560; fftw_real tmp570; fftw_real tmp563; fftw_real tmp571; fftw_real tmp535; fftw_real tmp551; fftw_real tmp516; fftw_real tmp550; fftw_real tmp543; fftw_real tmp565; fftw_real tmp546; fftw_real tmp556; fftw_real tmp496; fftw_real tmp566; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp473; fftw_real tmp480; fftw_real tmp558; fftw_real tmp559; ASSERT_ALIGNED_DOUBLE; tmp473 = tmp471 - tmp472; tmp480 = tmp476 - tmp479; tmp481 = tmp473 - tmp480; tmp555 = tmp473 + tmp480; tmp558 = tmp500 + tmp507; tmp559 = tmp511 + tmp514; tmp560 = (K773010453 * tmp558) - (K634393284 * tmp559); tmp570 = (K634393284 * tmp558) + (K773010453 * tmp559); } { fftw_real tmp561; fftw_real tmp562; fftw_real tmp527; fftw_real tmp534; ASSERT_ALIGNED_DOUBLE; tmp561 = tmp519 + tmp526; tmp562 = tmp530 + tmp533; tmp563 = (K773010453 * tmp561) + (K634393284 * tmp562); tmp571 = (K773010453 * tmp562) - (K634393284 * tmp561); tmp527 = tmp519 - tmp526; tmp534 = tmp530 - tmp533; tmp535 = (K098017140 * tmp527) + (K995184726 * tmp534); tmp551 = (K098017140 * tmp534) - (K995184726 * tmp527); } { fftw_real tmp508; fftw_real tmp515; fftw_real tmp539; fftw_real tmp542; ASSERT_ALIGNED_DOUBLE; tmp508 = tmp500 - tmp507; tmp515 = tmp511 - tmp514; tmp516 = (K098017140 * tmp508) - (K995184726 * tmp515); tmp550 = (K995184726 * tmp508) + (K098017140 * tmp515); tmp539 = tmp537 - tmp538; tmp542 = tmp540 - tmp541; tmp543 = tmp539 - tmp542; tmp565 = tmp539 + tmp542; } { fftw_real tmp544; fftw_real tmp545; fftw_real tmp488; fftw_real tmp495; ASSERT_ALIGNED_DOUBLE; tmp544 = (K195090322 * tmp491) - (K980785280 * tmp494); tmp545 = (K195090322 * tmp487) + (K980785280 * tmp484); tmp546 = tmp544 - tmp545; tmp556 = tmp545 + tmp544; tmp488 = (K195090322 * tmp484) - (K980785280 * tmp487); tmp495 = (K980785280 * tmp491) + (K195090322 * tmp494); tmp496 = tmp488 - tmp495; tmp566 = tmp488 + tmp495; } { fftw_real tmp497; fftw_real tmp536; fftw_real tmp547; fftw_real tmp548; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp481 - tmp496; tmp536 = tmp516 - tmp535; c_im(output[63 * ostride]) = tmp497 - tmp536; c_im(output[31 * ostride]) = tmp497 + tmp536; tmp547 = tmp543 + tmp546; tmp548 = tmp516 + tmp535; c_re(output[47 * ostride]) = tmp547 - tmp548; c_re(output[15 * ostride]) = tmp547 + tmp548; } { fftw_real tmp553; fftw_real tmp554; fftw_real tmp549; fftw_real tmp552; ASSERT_ALIGNED_DOUBLE; tmp553 = tmp543 - tmp546; tmp554 = tmp551 - tmp550; c_re(output[63 * ostride]) = tmp553 - tmp554; c_re(output[31 * ostride]) = tmp553 + tmp554; tmp549 = tmp481 + tmp496; tmp552 = tmp550 + tmp551; c_im(output[47 * ostride]) = tmp549 - tmp552; c_im(output[15 * ostride]) = tmp549 + tmp552; } { fftw_real tmp557; fftw_real tmp564; fftw_real tmp567; fftw_real tmp568; ASSERT_ALIGNED_DOUBLE; tmp557 = tmp555 - tmp556; tmp564 = tmp560 - tmp563; c_im(output[55 * ostride]) = tmp557 - tmp564; c_im(output[23 * ostride]) = tmp557 + tmp564; tmp567 = tmp565 + tmp566; tmp568 = tmp560 + tmp563; c_re(output[39 * ostride]) = tmp567 - tmp568; c_re(output[7 * ostride]) = tmp567 + tmp568; } { fftw_real tmp573; fftw_real tmp574; fftw_real tmp569; fftw_real tmp572; ASSERT_ALIGNED_DOUBLE; tmp573 = tmp565 - tmp566; tmp574 = tmp571 - tmp570; c_re(output[55 * ostride]) = tmp573 - tmp574; c_re(output[23 * ostride]) = tmp573 + tmp574; tmp569 = tmp555 + tmp556; tmp572 = tmp570 + tmp571; c_im(output[39 * ostride]) = tmp569 - tmp572; c_im(output[7 * ostride]) = tmp569 + tmp572; } } { fftw_real tmp577; fftw_real tmp615; fftw_real tmp620; fftw_real tmp630; fftw_real tmp623; fftw_real tmp631; fftw_real tmp599; fftw_real tmp611; fftw_real tmp592; fftw_real tmp610; fftw_real tmp603; fftw_real tmp625; fftw_real tmp606; fftw_real tmp616; fftw_real tmp584; fftw_real tmp626; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp575; fftw_real tmp576; fftw_real tmp618; fftw_real tmp619; ASSERT_ALIGNED_DOUBLE; tmp575 = tmp471 + tmp472; tmp576 = tmp541 + tmp540; tmp577 = tmp575 - tmp576; tmp615 = tmp575 + tmp576; tmp618 = tmp586 + tmp587; tmp619 = tmp589 + tmp590; tmp620 = (K956940335 * tmp618) + (K290284677 * tmp619); tmp630 = (K956940335 * tmp619) - (K290284677 * tmp618); } { fftw_real tmp621; fftw_real tmp622; fftw_real tmp595; fftw_real tmp598; ASSERT_ALIGNED_DOUBLE; tmp621 = tmp593 + tmp594; tmp622 = tmp596 + tmp597; tmp623 = (K956940335 * tmp621) - (K290284677 * tmp622); tmp631 = (K290284677 * tmp621) + (K956940335 * tmp622); tmp595 = tmp593 - tmp594; tmp598 = tmp596 - tmp597; tmp599 = (K471396736 * tmp595) - (K881921264 * tmp598); tmp611 = (K881921264 * tmp595) + (K471396736 * tmp598); } { fftw_real tmp588; fftw_real tmp591; fftw_real tmp601; fftw_real tmp602; ASSERT_ALIGNED_DOUBLE; tmp588 = tmp586 - tmp587; tmp591 = tmp589 - tmp590; tmp592 = (K471396736 * tmp588) + (K881921264 * tmp591); tmp610 = (K471396736 * tmp591) - (K881921264 * tmp588); tmp601 = tmp537 + tmp538; tmp602 = tmp476 + tmp479; tmp603 = tmp601 - tmp602; tmp625 = tmp601 + tmp602; } { fftw_real tmp604; fftw_real tmp605; fftw_real tmp580; fftw_real tmp583; ASSERT_ALIGNED_DOUBLE; tmp604 = (K831469612 * tmp581) - (K555570233 * tmp582); tmp605 = (K831469612 * tmp579) + (K555570233 * tmp578); tmp606 = tmp604 - tmp605; tmp616 = tmp605 + tmp604; tmp580 = (K831469612 * tmp578) - (K555570233 * tmp579); tmp583 = (K555570233 * tmp581) + (K831469612 * tmp582); tmp584 = tmp580 - tmp583; tmp626 = tmp580 + tmp583; } { fftw_real tmp585; fftw_real tmp600; fftw_real tmp607; fftw_real tmp608; ASSERT_ALIGNED_DOUBLE; tmp585 = tmp577 + tmp584; tmp600 = tmp592 + tmp599; c_im(output[43 * ostride]) = tmp585 - tmp600; c_im(output[11 * ostride]) = tmp585 + tmp600; tmp607 = tmp603 - tmp606; tmp608 = tmp599 - tmp592; c_re(output[59 * ostride]) = tmp607 - tmp608; c_re(output[27 * ostride]) = tmp607 + tmp608; } { fftw_real tmp613; fftw_real tmp614; fftw_real tmp609; fftw_real tmp612; ASSERT_ALIGNED_DOUBLE; tmp613 = tmp603 + tmp606; tmp614 = tmp610 + tmp611; c_re(output[43 * ostride]) = tmp613 - tmp614; c_re(output[11 * ostride]) = tmp613 + tmp614; tmp609 = tmp577 - tmp584; tmp612 = tmp610 - tmp611; c_im(output[59 * ostride]) = tmp609 - tmp612; c_im(output[27 * ostride]) = tmp609 + tmp612; } { fftw_real tmp617; fftw_real tmp624; fftw_real tmp627; fftw_real tmp628; ASSERT_ALIGNED_DOUBLE; tmp617 = tmp615 + tmp616; tmp624 = tmp620 + tmp623; c_im(output[35 * ostride]) = tmp617 - tmp624; c_im(output[3 * ostride]) = tmp617 + tmp624; tmp627 = tmp625 - tmp626; tmp628 = tmp623 - tmp620; c_re(output[51 * ostride]) = tmp627 - tmp628; c_re(output[19 * ostride]) = tmp627 + tmp628; } { fftw_real tmp633; fftw_real tmp634; fftw_real tmp629; fftw_real tmp632; ASSERT_ALIGNED_DOUBLE; tmp633 = tmp625 + tmp626; tmp634 = tmp630 + tmp631; c_re(output[35 * ostride]) = tmp633 - tmp634; c_re(output[3 * ostride]) = tmp633 + tmp634; tmp629 = tmp615 - tmp616; tmp632 = tmp630 - tmp631; c_im(output[51 * ostride]) = tmp629 - tmp632; c_im(output[19 * ostride]) = tmp629 + tmp632; } } } fftw_codelet_desc fftwi_no_twiddle_64_desc = { "fftwi_no_twiddle_64", (void (*)()) fftwi_no_twiddle_64, 64, FFTW_BACKWARD, FFTW_NOTW, 1420, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_2.c����������������������������������������������������������������������������0000644�0001754�0000144�00000005057�07637527350�010477� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:24 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 2 */ /* * This function contains 6 FP additions, 4 FP multiplications, * (or, 4 additions, 2 multiplications, 2 fused multiply/add), * 10 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_2(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 1) { fftw_real tmp1; fftw_real tmp8; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp8 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp7 = (tmp2 * tmp5) - (tmp4 * tmp3); } c_re(inout[iostride]) = tmp1 - tmp6; c_re(inout[0]) = tmp1 + tmp6; c_im(inout[0]) = tmp7 + tmp8; c_im(inout[iostride]) = tmp8 - tmp7; } } static const int twiddle_order[] = { 1 }; fftw_codelet_desc fftwi_twiddle_2_desc = { "fftwi_twiddle_2", (void (*)()) fftwi_twiddle_2, 2, FFTW_BACKWARD, FFTW_TWIDDLE, 55, 1, twiddle_order, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_3.c����������������������������������������������������������������������������0000644�0001754�0000144�00000007272�07637527351�010502� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:24 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 3 */ /* * This function contains 16 FP additions, 12 FP multiplications, * (or, 10 additions, 6 multiplications, 6 fused multiply/add), * 14 stack variables, and 12 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) { fftw_real tmp1; fftw_real tmp18; fftw_real tmp6; fftw_real tmp15; fftw_real tmp11; fftw_real tmp14; fftw_real tmp12; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp18 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp15 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[2 * iostride]); tmp10 = c_im(inout[2 * iostride]); tmp7 = c_re(W[1]); tmp9 = c_im(W[1]); tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); tmp14 = (tmp7 * tmp10) - (tmp9 * tmp8); } tmp12 = tmp6 + tmp11; tmp17 = tmp15 + tmp14; { fftw_real tmp13; fftw_real tmp16; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; c_re(inout[0]) = tmp1 + tmp12; tmp13 = tmp1 - (K500000000 * tmp12); tmp16 = K866025403 * (tmp14 - tmp15); c_re(inout[2 * iostride]) = tmp13 - tmp16; c_re(inout[iostride]) = tmp13 + tmp16; c_im(inout[0]) = tmp17 + tmp18; tmp19 = K866025403 * (tmp6 - tmp11); tmp20 = tmp18 - (K500000000 * tmp17); c_im(inout[iostride]) = tmp19 + tmp20; c_im(inout[2 * iostride]) = tmp20 - tmp19; } } } static const int twiddle_order[] = { 1, 2 }; fftw_codelet_desc fftwi_twiddle_3_desc = { "fftwi_twiddle_3", (void (*)()) fftwi_twiddle_3, 3, FFTW_BACKWARD, FFTW_TWIDDLE, 77, 2, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_4.c����������������������������������������������������������������������������0000644�0001754�0000144�00000010171�07637527351�010473� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:25 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 4 */ /* * This function contains 22 FP additions, 12 FP multiplications, * (or, 16 additions, 6 multiplications, 6 fused multiply/add), * 14 stack variables, and 16 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) { fftw_real tmp1; fftw_real tmp25; fftw_real tmp6; fftw_real tmp24; fftw_real tmp12; fftw_real tmp20; fftw_real tmp17; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp25 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[2 * iostride]); tmp5 = c_im(inout[2 * iostride]); tmp2 = c_re(W[1]); tmp4 = c_im(W[1]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp24 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[iostride]); tmp11 = c_im(inout[iostride]); tmp8 = c_re(W[0]); tmp10 = c_im(W[0]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp20 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[3 * iostride]); tmp16 = c_im(inout[3 * iostride]); tmp13 = c_re(W[2]); tmp15 = c_im(W[2]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp21 = (tmp13 * tmp16) - (tmp15 * tmp14); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; c_re(inout[2 * iostride]) = tmp7 - tmp18; c_re(inout[0]) = tmp7 + tmp18; tmp27 = tmp12 - tmp17; tmp28 = tmp25 - tmp24; c_im(inout[iostride]) = tmp27 + tmp28; c_im(inout[3 * iostride]) = tmp28 - tmp27; } { fftw_real tmp23; fftw_real tmp26; fftw_real tmp19; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp23 = tmp20 + tmp21; tmp26 = tmp24 + tmp25; c_im(inout[0]) = tmp23 + tmp26; c_im(inout[2 * iostride]) = tmp26 - tmp23; tmp19 = tmp1 - tmp6; tmp22 = tmp20 - tmp21; c_re(inout[iostride]) = tmp19 - tmp22; c_re(inout[3 * iostride]) = tmp19 + tmp22; } } } static const int twiddle_order[] = { 1, 2, 3 }; fftw_codelet_desc fftwi_twiddle_4_desc = { "fftwi_twiddle_4", (void (*)()) fftwi_twiddle_4, 4, FFTW_BACKWARD, FFTW_TWIDDLE, 99, 3, twiddle_order, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_5.c����������������������������������������������������������������������������0000644�0001754�0000144�00000013677�07637527352�010513� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:25 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 5 */ /* * This function contains 40 FP additions, 28 FP multiplications, * (or, 26 additions, 14 multiplications, 14 fused multiply/add), * 26 stack variables, and 20 memory accesses */ static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 4) { fftw_real tmp1; fftw_real tmp40; fftw_real tmp30; fftw_real tmp33; fftw_real tmp37; fftw_real tmp38; fftw_real tmp39; fftw_real tmp42; fftw_real tmp41; fftw_real tmp12; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp40 = c_im(inout[0]); { fftw_real tmp6; fftw_real tmp28; fftw_real tmp22; fftw_real tmp32; fftw_real tmp11; fftw_real tmp29; fftw_real tmp17; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp28 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp19; fftw_real tmp21; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(inout[3 * iostride]); tmp21 = c_im(inout[3 * iostride]); tmp18 = c_re(W[2]); tmp20 = c_im(W[2]); tmp22 = (tmp18 * tmp19) + (tmp20 * tmp21); tmp32 = (tmp18 * tmp21) - (tmp20 * tmp19); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[4 * iostride]); tmp10 = c_im(inout[4 * iostride]); tmp7 = c_re(W[3]); tmp9 = c_im(W[3]); tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); tmp29 = (tmp7 * tmp10) - (tmp9 * tmp8); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[2 * iostride]); tmp16 = c_im(inout[2 * iostride]); tmp13 = c_re(W[1]); tmp15 = c_im(W[1]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp31 = (tmp13 * tmp16) - (tmp15 * tmp14); } tmp30 = tmp28 - tmp29; tmp33 = tmp31 - tmp32; tmp37 = tmp28 + tmp29; tmp38 = tmp31 + tmp32; tmp39 = tmp37 + tmp38; tmp42 = tmp17 - tmp22; tmp41 = tmp6 - tmp11; tmp12 = tmp6 + tmp11; tmp23 = tmp17 + tmp22; tmp24 = tmp12 + tmp23; } c_re(inout[0]) = tmp1 + tmp24; { fftw_real tmp34; fftw_real tmp36; fftw_real tmp27; fftw_real tmp35; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp34 = (K587785252 * tmp30) - (K951056516 * tmp33); tmp36 = (K951056516 * tmp30) + (K587785252 * tmp33); tmp25 = tmp1 - (K250000000 * tmp24); tmp26 = K559016994 * (tmp12 - tmp23); tmp27 = tmp25 - tmp26; tmp35 = tmp26 + tmp25; c_re(inout[2 * iostride]) = tmp27 - tmp34; c_re(inout[3 * iostride]) = tmp27 + tmp34; c_re(inout[iostride]) = tmp35 - tmp36; c_re(inout[4 * iostride]) = tmp35 + tmp36; } c_im(inout[0]) = tmp39 + tmp40; { fftw_real tmp43; fftw_real tmp47; fftw_real tmp46; fftw_real tmp48; fftw_real tmp44; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; tmp43 = (K951056516 * tmp41) + (K587785252 * tmp42); tmp47 = (K587785252 * tmp41) - (K951056516 * tmp42); tmp44 = K559016994 * (tmp37 - tmp38); tmp45 = tmp40 - (K250000000 * tmp39); tmp46 = tmp44 + tmp45; tmp48 = tmp45 - tmp44; c_im(inout[iostride]) = tmp43 + tmp46; c_im(inout[4 * iostride]) = tmp46 - tmp43; c_im(inout[2 * iostride]) = tmp47 + tmp48; c_im(inout[3 * iostride]) = tmp48 - tmp47; } } } static const int twiddle_order[] = { 1, 2, 3, 4 }; fftw_codelet_desc fftwi_twiddle_5_desc = { "fftwi_twiddle_5", (void (*)()) fftwi_twiddle_5, 5, FFTW_BACKWARD, FFTW_TWIDDLE, 121, 4, twiddle_order, }; �����������������������������������������������������������������fftw-2.1.5/fftw/ftwi_6.c����������������������������������������������������������������������������0000644�0001754�0000144�00000014645�07637527352�010510� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:26 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 6 */ /* * This function contains 46 FP additions, 28 FP multiplications, * (or, 32 additions, 14 multiplications, 14 fused multiply/add), * 22 stack variables, and 24 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_6(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 5) { fftw_real tmp7; fftw_real tmp31; fftw_real tmp50; fftw_real tmp54; fftw_real tmp29; fftw_real tmp33; fftw_real tmp38; fftw_real tmp44; fftw_real tmp18; fftw_real tmp32; fftw_real tmp41; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp49; fftw_real tmp6; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp49 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[3 * iostride]); tmp5 = c_im(inout[3 * iostride]); tmp2 = c_re(W[2]); tmp4 = c_im(W[2]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp48 = (tmp2 * tmp5) - (tmp4 * tmp3); } tmp7 = tmp1 - tmp6; tmp31 = tmp1 + tmp6; tmp50 = tmp48 + tmp49; tmp54 = tmp49 - tmp48; } { fftw_real tmp23; fftw_real tmp36; fftw_real tmp28; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[4 * iostride]); tmp22 = c_im(inout[4 * iostride]); tmp19 = c_re(W[3]); tmp21 = c_im(W[3]); tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); tmp36 = (tmp19 * tmp22) - (tmp21 * tmp20); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[iostride]); tmp27 = c_im(inout[iostride]); tmp24 = c_re(W[0]); tmp26 = c_im(W[0]); tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); tmp37 = (tmp24 * tmp27) - (tmp26 * tmp25); } tmp29 = tmp23 - tmp28; tmp33 = tmp23 + tmp28; tmp38 = tmp36 - tmp37; tmp44 = tmp36 + tmp37; } { fftw_real tmp12; fftw_real tmp39; fftw_real tmp17; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp39 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[5 * iostride]); tmp16 = c_im(inout[5 * iostride]); tmp13 = c_re(W[4]); tmp15 = c_im(W[4]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp40 = (tmp13 * tmp16) - (tmp15 * tmp14); } tmp18 = tmp12 - tmp17; tmp32 = tmp12 + tmp17; tmp41 = tmp39 - tmp40; tmp45 = tmp39 + tmp40; } { fftw_real tmp42; fftw_real tmp30; fftw_real tmp35; fftw_real tmp53; fftw_real tmp55; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp42 = K866025403 * (tmp38 - tmp41); tmp30 = tmp18 + tmp29; tmp35 = tmp7 - (K500000000 * tmp30); c_re(inout[3 * iostride]) = tmp7 + tmp30; c_re(inout[iostride]) = tmp35 + tmp42; c_re(inout[5 * iostride]) = tmp35 - tmp42; tmp53 = K866025403 * (tmp18 - tmp29); tmp55 = tmp41 + tmp38; tmp56 = tmp54 - (K500000000 * tmp55); c_im(inout[iostride]) = tmp53 + tmp56; c_im(inout[5 * iostride]) = tmp56 - tmp53; c_im(inout[3 * iostride]) = tmp55 + tmp54; } { fftw_real tmp46; fftw_real tmp34; fftw_real tmp43; fftw_real tmp52; fftw_real tmp47; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp46 = K866025403 * (tmp44 - tmp45); tmp34 = tmp32 + tmp33; tmp43 = tmp31 - (K500000000 * tmp34); c_re(inout[0]) = tmp31 + tmp34; c_re(inout[4 * iostride]) = tmp43 + tmp46; c_re(inout[2 * iostride]) = tmp43 - tmp46; tmp52 = K866025403 * (tmp32 - tmp33); tmp47 = tmp45 + tmp44; tmp51 = tmp50 - (K500000000 * tmp47); c_im(inout[0]) = tmp47 + tmp50; c_im(inout[4 * iostride]) = tmp52 + tmp51; c_im(inout[2 * iostride]) = tmp51 - tmp52; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5 }; fftw_codelet_desc fftwi_twiddle_6_desc = { "fftwi_twiddle_6", (void (*)()) fftwi_twiddle_6, 6, FFTW_BACKWARD, FFTW_TWIDDLE, 143, 5, twiddle_order, }; �������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_7.c����������������������������������������������������������������������������0000644�0001754�0000144�00000017734�07637527357�010520� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:26 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 7 */ /* * This function contains 72 FP additions, 60 FP multiplications, * (or, 60 additions, 48 multiplications, 12 fused multiply/add), * 24 stack variables, and 28 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_7(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 6) { fftw_real tmp1; fftw_real tmp53; fftw_real tmp12; fftw_real tmp54; fftw_real tmp38; fftw_real tmp50; fftw_real tmp23; fftw_real tmp55; fftw_real tmp44; fftw_real tmp51; fftw_real tmp34; fftw_real tmp56; fftw_real tmp41; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp53 = c_im(inout[0]); { fftw_real tmp6; fftw_real tmp37; fftw_real tmp11; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[iostride]); tmp5 = c_im(inout[iostride]); tmp2 = c_re(W[0]); tmp4 = c_im(W[0]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp37 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[6 * iostride]); tmp10 = c_im(inout[6 * iostride]); tmp7 = c_re(W[5]); tmp9 = c_im(W[5]); tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); tmp36 = (tmp7 * tmp10) - (tmp9 * tmp8); } tmp12 = tmp6 + tmp11; tmp54 = tmp6 - tmp11; tmp38 = tmp36 - tmp37; tmp50 = tmp37 + tmp36; } { fftw_real tmp17; fftw_real tmp43; fftw_real tmp22; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[2 * iostride]); tmp16 = c_im(inout[2 * iostride]); tmp13 = c_re(W[1]); tmp15 = c_im(W[1]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp43 = (tmp13 * tmp16) - (tmp15 * tmp14); } { fftw_real tmp19; fftw_real tmp21; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp19 = c_re(inout[5 * iostride]); tmp21 = c_im(inout[5 * iostride]); tmp18 = c_re(W[4]); tmp20 = c_im(W[4]); tmp22 = (tmp18 * tmp19) + (tmp20 * tmp21); tmp42 = (tmp18 * tmp21) - (tmp20 * tmp19); } tmp23 = tmp17 + tmp22; tmp55 = tmp17 - tmp22; tmp44 = tmp42 - tmp43; tmp51 = tmp43 + tmp42; } { fftw_real tmp28; fftw_real tmp40; fftw_real tmp33; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[3 * iostride]); tmp27 = c_im(inout[3 * iostride]); tmp24 = c_re(W[2]); tmp26 = c_im(W[2]); tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); tmp40 = (tmp24 * tmp27) - (tmp26 * tmp25); } { fftw_real tmp30; fftw_real tmp32; fftw_real tmp29; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp30 = c_re(inout[4 * iostride]); tmp32 = c_im(inout[4 * iostride]); tmp29 = c_re(W[3]); tmp31 = c_im(W[3]); tmp33 = (tmp29 * tmp30) + (tmp31 * tmp32); tmp39 = (tmp29 * tmp32) - (tmp31 * tmp30); } tmp34 = tmp28 + tmp33; tmp56 = tmp28 - tmp33; tmp41 = tmp39 - tmp40; tmp52 = tmp40 + tmp39; } { fftw_real tmp47; fftw_real tmp46; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; c_re(inout[0]) = tmp1 + tmp12 + tmp23 + tmp34; tmp47 = (K781831482 * tmp38) + (K974927912 * tmp44) + (K433883739 * tmp41); tmp46 = tmp1 + (K623489801 * tmp12) - (K900968867 * tmp34) - (K222520933 * tmp23); c_re(inout[6 * iostride]) = tmp46 - tmp47; c_re(inout[iostride]) = tmp46 + tmp47; { fftw_real tmp49; fftw_real tmp48; fftw_real tmp45; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp49 = (K433883739 * tmp38) + (K974927912 * tmp41) - (K781831482 * tmp44); tmp48 = tmp1 + (K623489801 * tmp23) - (K222520933 * tmp34) - (K900968867 * tmp12); c_re(inout[4 * iostride]) = tmp48 - tmp49; c_re(inout[3 * iostride]) = tmp48 + tmp49; tmp45 = (K974927912 * tmp38) - (K781831482 * tmp41) - (K433883739 * tmp44); tmp35 = tmp1 + (K623489801 * tmp34) - (K900968867 * tmp23) - (K222520933 * tmp12); c_re(inout[5 * iostride]) = tmp35 - tmp45; c_re(inout[2 * iostride]) = tmp35 + tmp45; } c_im(inout[0]) = tmp50 + tmp51 + tmp52 + tmp53; tmp59 = (K974927912 * tmp54) - (K781831482 * tmp56) - (K433883739 * tmp55); tmp60 = (K623489801 * tmp52) + tmp53 - (K900968867 * tmp51) - (K222520933 * tmp50); c_im(inout[2 * iostride]) = tmp59 + tmp60; c_im(inout[5 * iostride]) = tmp60 - tmp59; { fftw_real tmp61; fftw_real tmp62; fftw_real tmp57; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp61 = (K433883739 * tmp54) + (K974927912 * tmp56) - (K781831482 * tmp55); tmp62 = (K623489801 * tmp51) + tmp53 - (K222520933 * tmp52) - (K900968867 * tmp50); c_im(inout[3 * iostride]) = tmp61 + tmp62; c_im(inout[4 * iostride]) = tmp62 - tmp61; tmp57 = (K781831482 * tmp54) + (K974927912 * tmp55) + (K433883739 * tmp56); tmp58 = (K623489801 * tmp50) + tmp53 - (K900968867 * tmp52) - (K222520933 * tmp51); c_im(inout[iostride]) = tmp57 + tmp58; c_im(inout[6 * iostride]) = tmp58 - tmp57; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6 }; fftw_codelet_desc fftwi_twiddle_7_desc = { "fftwi_twiddle_7", (void (*)()) fftwi_twiddle_7, 7, FFTW_BACKWARD, FFTW_TWIDDLE, 165, 6, twiddle_order, }; ������������������������������������fftw-2.1.5/fftw/ftwi_8.c����������������������������������������������������������������������������0000644�0001754�0000144�00000017756�07637527360�010517� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:32 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 8 */ /* * This function contains 66 FP additions, 32 FP multiplications, * (or, 52 additions, 18 multiplications, 14 fused multiply/add), * 28 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_8(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 7) { fftw_real tmp7; fftw_real tmp43; fftw_real tmp71; fftw_real tmp77; fftw_real tmp41; fftw_real tmp53; fftw_real tmp56; fftw_real tmp64; fftw_real tmp18; fftw_real tmp76; fftw_real tmp46; fftw_real tmp68; fftw_real tmp30; fftw_real tmp48; fftw_real tmp51; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp70; fftw_real tmp6; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp70 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[4 * iostride]); tmp5 = c_im(inout[4 * iostride]); tmp2 = c_re(W[3]); tmp4 = c_im(W[3]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp69 = (tmp2 * tmp5) - (tmp4 * tmp3); } tmp7 = tmp1 + tmp6; tmp43 = tmp1 - tmp6; tmp71 = tmp69 + tmp70; tmp77 = tmp70 - tmp69; } { fftw_real tmp35; fftw_real tmp54; fftw_real tmp40; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[7 * iostride]); tmp34 = c_im(inout[7 * iostride]); tmp31 = c_re(W[6]); tmp33 = c_im(W[6]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp54 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[3 * iostride]); tmp39 = c_im(inout[3 * iostride]); tmp36 = c_re(W[2]); tmp38 = c_im(W[2]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp55 = (tmp36 * tmp39) - (tmp38 * tmp37); } tmp41 = tmp35 + tmp40; tmp53 = tmp35 - tmp40; tmp56 = tmp54 - tmp55; tmp64 = tmp54 + tmp55; } { fftw_real tmp12; fftw_real tmp44; fftw_real tmp17; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp44 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[6 * iostride]); tmp16 = c_im(inout[6 * iostride]); tmp13 = c_re(W[5]); tmp15 = c_im(W[5]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp45 = (tmp13 * tmp16) - (tmp15 * tmp14); } tmp18 = tmp12 + tmp17; tmp76 = tmp12 - tmp17; tmp46 = tmp44 - tmp45; tmp68 = tmp44 + tmp45; } { fftw_real tmp24; fftw_real tmp49; fftw_real tmp29; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[iostride]); tmp23 = c_im(inout[iostride]); tmp20 = c_re(W[0]); tmp22 = c_im(W[0]); tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); tmp49 = (tmp20 * tmp23) - (tmp22 * tmp21); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[5 * iostride]); tmp28 = c_im(inout[5 * iostride]); tmp25 = c_re(W[4]); tmp27 = c_im(W[4]); tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); tmp50 = (tmp25 * tmp28) - (tmp27 * tmp26); } tmp30 = tmp24 + tmp29; tmp48 = tmp24 - tmp29; tmp51 = tmp49 - tmp50; tmp65 = tmp49 + tmp50; } { fftw_real tmp19; fftw_real tmp42; fftw_real tmp63; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp7 + tmp18; tmp42 = tmp30 + tmp41; c_re(inout[4 * iostride]) = tmp19 - tmp42; c_re(inout[0]) = tmp19 + tmp42; { fftw_real tmp73; fftw_real tmp74; fftw_real tmp67; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp73 = tmp30 - tmp41; tmp74 = tmp71 - tmp68; c_im(inout[2 * iostride]) = tmp73 + tmp74; c_im(inout[6 * iostride]) = tmp74 - tmp73; tmp67 = tmp65 + tmp64; tmp72 = tmp68 + tmp71; c_im(inout[0]) = tmp67 + tmp72; c_im(inout[4 * iostride]) = tmp72 - tmp67; } tmp63 = tmp7 - tmp18; tmp66 = tmp64 - tmp65; c_re(inout[6 * iostride]) = tmp63 - tmp66; c_re(inout[2 * iostride]) = tmp63 + tmp66; { fftw_real tmp59; fftw_real tmp78; fftw_real tmp62; fftw_real tmp75; fftw_real tmp60; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; tmp59 = tmp43 + tmp46; tmp78 = tmp76 + tmp77; tmp60 = tmp56 - tmp53; tmp61 = tmp48 + tmp51; tmp62 = K707106781 * (tmp60 - tmp61); tmp75 = K707106781 * (tmp61 + tmp60); c_re(inout[7 * iostride]) = tmp59 - tmp62; c_re(inout[3 * iostride]) = tmp59 + tmp62; c_im(inout[iostride]) = tmp75 + tmp78; c_im(inout[5 * iostride]) = tmp78 - tmp75; } { fftw_real tmp47; fftw_real tmp80; fftw_real tmp58; fftw_real tmp79; fftw_real tmp52; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp43 - tmp46; tmp80 = tmp77 - tmp76; tmp52 = tmp48 - tmp51; tmp57 = tmp53 + tmp56; tmp58 = K707106781 * (tmp52 + tmp57); tmp79 = K707106781 * (tmp52 - tmp57); c_re(inout[5 * iostride]) = tmp47 - tmp58; c_re(inout[iostride]) = tmp47 + tmp58; c_im(inout[3 * iostride]) = tmp79 + tmp80; c_im(inout[7 * iostride]) = tmp80 - tmp79; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7 }; fftw_codelet_desc fftwi_twiddle_8_desc = { "fftwi_twiddle_8", (void (*)()) fftwi_twiddle_8, 8, FFTW_BACKWARD, FFTW_TWIDDLE, 187, 7, twiddle_order, }; ������������������fftw-2.1.5/fftw/ftwi_9.c����������������������������������������������������������������������������0000644�0001754�0000144�00000026413�07637527363�010511� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:32 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 9 */ /* * This function contains 96 FP additions, 72 FP multiplications, * (or, 60 additions, 36 multiplications, 36 fused multiply/add), * 34 stack variables, and 36 memory accesses */ static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_9(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 8) { fftw_real tmp1; fftw_real tmp99; fftw_real tmp64; fftw_real tmp98; fftw_real tmp105; fftw_real tmp104; fftw_real tmp12; fftw_real tmp61; fftw_real tmp47; fftw_real tmp78; fftw_real tmp89; fftw_real tmp54; fftw_real tmp75; fftw_real tmp90; fftw_real tmp30; fftw_real tmp68; fftw_real tmp86; fftw_real tmp59; fftw_real tmp71; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp6; fftw_real tmp63; fftw_real tmp11; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp99 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[3 * iostride]); tmp5 = c_im(inout[3 * iostride]); tmp2 = c_re(W[2]); tmp4 = c_im(W[2]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp63 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp8; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp8 = c_re(inout[6 * iostride]); tmp10 = c_im(inout[6 * iostride]); tmp7 = c_re(W[5]); tmp9 = c_im(W[5]); tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10); tmp62 = (tmp7 * tmp10) - (tmp9 * tmp8); } tmp64 = K866025403 * (tmp62 - tmp63); tmp98 = tmp63 + tmp62; tmp105 = tmp99 - (K500000000 * tmp98); tmp104 = K866025403 * (tmp6 - tmp11); tmp12 = tmp6 + tmp11; tmp61 = tmp1 - (K500000000 * tmp12); } { fftw_real tmp35; fftw_real tmp50; fftw_real tmp40; fftw_real tmp51; fftw_real tmp45; fftw_real tmp52; fftw_real tmp46; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[2 * iostride]); tmp34 = c_im(inout[2 * iostride]); tmp31 = c_re(W[1]); tmp33 = c_im(W[1]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp50 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[5 * iostride]); tmp39 = c_im(inout[5 * iostride]); tmp36 = c_re(W[4]); tmp38 = c_im(W[4]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp51 = (tmp36 * tmp39) - (tmp38 * tmp37); } { fftw_real tmp42; fftw_real tmp44; fftw_real tmp41; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp42 = c_re(inout[8 * iostride]); tmp44 = c_im(inout[8 * iostride]); tmp41 = c_re(W[7]); tmp43 = c_im(W[7]); tmp45 = (tmp41 * tmp42) + (tmp43 * tmp44); tmp52 = (tmp41 * tmp44) - (tmp43 * tmp42); } tmp46 = tmp40 + tmp45; tmp53 = tmp51 + tmp52; { fftw_real tmp76; fftw_real tmp77; fftw_real tmp73; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp35 + tmp46; tmp76 = tmp35 - (K500000000 * tmp46); tmp77 = K866025403 * (tmp52 - tmp51); tmp78 = tmp76 - tmp77; tmp89 = tmp76 + tmp77; tmp54 = tmp50 + tmp53; tmp73 = tmp50 - (K500000000 * tmp53); tmp74 = K866025403 * (tmp40 - tmp45); tmp75 = tmp73 - tmp74; tmp90 = tmp74 + tmp73; } } { fftw_real tmp18; fftw_real tmp55; fftw_real tmp23; fftw_real tmp56; fftw_real tmp28; fftw_real tmp57; fftw_real tmp29; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp15; fftw_real tmp17; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp15 = c_re(inout[iostride]); tmp17 = c_im(inout[iostride]); tmp14 = c_re(W[0]); tmp16 = c_im(W[0]); tmp18 = (tmp14 * tmp15) + (tmp16 * tmp17); tmp55 = (tmp14 * tmp17) - (tmp16 * tmp15); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[4 * iostride]); tmp22 = c_im(inout[4 * iostride]); tmp19 = c_re(W[3]); tmp21 = c_im(W[3]); tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); tmp56 = (tmp19 * tmp22) - (tmp21 * tmp20); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[7 * iostride]); tmp27 = c_im(inout[7 * iostride]); tmp24 = c_re(W[6]); tmp26 = c_im(W[6]); tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); tmp57 = (tmp24 * tmp27) - (tmp26 * tmp25); } tmp29 = tmp23 + tmp28; tmp58 = tmp56 + tmp57; { fftw_real tmp66; fftw_real tmp67; fftw_real tmp69; fftw_real tmp70; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp18 + tmp29; tmp66 = tmp18 - (K500000000 * tmp29); tmp67 = K866025403 * (tmp57 - tmp56); tmp68 = tmp66 - tmp67; tmp86 = tmp66 + tmp67; tmp59 = tmp55 + tmp58; tmp69 = tmp55 - (K500000000 * tmp58); tmp70 = K866025403 * (tmp23 - tmp28); tmp71 = tmp69 - tmp70; tmp87 = tmp70 + tmp69; } } { fftw_real tmp60; fftw_real tmp13; fftw_real tmp48; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp60 = K866025403 * (tmp54 - tmp59); tmp13 = tmp1 + tmp12; tmp48 = tmp30 + tmp47; tmp49 = tmp13 - (K500000000 * tmp48); c_re(inout[0]) = tmp13 + tmp48; c_re(inout[3 * iostride]) = tmp49 + tmp60; c_re(inout[6 * iostride]) = tmp49 - tmp60; } { fftw_real tmp101; fftw_real tmp97; fftw_real tmp100; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp101 = K866025403 * (tmp30 - tmp47); tmp97 = tmp59 + tmp54; tmp100 = tmp98 + tmp99; tmp102 = tmp100 - (K500000000 * tmp97); c_im(inout[0]) = tmp97 + tmp100; c_im(inout[6 * iostride]) = tmp102 - tmp101; c_im(inout[3 * iostride]) = tmp101 + tmp102; } { fftw_real tmp65; fftw_real tmp110; fftw_real tmp80; fftw_real tmp111; fftw_real tmp84; fftw_real tmp109; fftw_real tmp81; fftw_real tmp112; ASSERT_ALIGNED_DOUBLE; tmp65 = tmp61 - tmp64; tmp110 = tmp105 - tmp104; { fftw_real tmp72; fftw_real tmp79; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp72 = (K173648177 * tmp68) - (K984807753 * tmp71); tmp79 = (K342020143 * tmp75) + (K939692620 * tmp78); tmp80 = tmp72 - tmp79; tmp111 = K866025403 * (tmp72 + tmp79); tmp82 = (K342020143 * tmp78) - (K939692620 * tmp75); tmp83 = (K173648177 * tmp71) + (K984807753 * tmp68); tmp84 = K866025403 * (tmp82 - tmp83); tmp109 = tmp83 + tmp82; } c_re(inout[2 * iostride]) = tmp65 + tmp80; tmp81 = tmp65 - (K500000000 * tmp80); c_re(inout[8 * iostride]) = tmp81 - tmp84; c_re(inout[5 * iostride]) = tmp81 + tmp84; c_im(inout[2 * iostride]) = tmp109 + tmp110; tmp112 = tmp110 - (K500000000 * tmp109); c_im(inout[5 * iostride]) = tmp111 + tmp112; c_im(inout[8 * iostride]) = tmp112 - tmp111; } { fftw_real tmp85; fftw_real tmp106; fftw_real tmp92; fftw_real tmp107; fftw_real tmp96; fftw_real tmp103; fftw_real tmp93; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; tmp85 = tmp61 + tmp64; tmp106 = tmp104 + tmp105; { fftw_real tmp88; fftw_real tmp91; fftw_real tmp94; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; tmp88 = (K766044443 * tmp86) - (K642787609 * tmp87); tmp91 = (K173648177 * tmp89) - (K984807753 * tmp90); tmp92 = tmp88 + tmp91; tmp107 = K866025403 * (tmp88 - tmp91); tmp94 = (K173648177 * tmp90) + (K984807753 * tmp89); tmp95 = (K766044443 * tmp87) + (K642787609 * tmp86); tmp96 = K866025403 * (tmp94 - tmp95); tmp103 = tmp95 + tmp94; } c_re(inout[iostride]) = tmp85 + tmp92; tmp93 = tmp85 - (K500000000 * tmp92); c_re(inout[7 * iostride]) = tmp93 - tmp96; c_re(inout[4 * iostride]) = tmp93 + tmp96; c_im(inout[iostride]) = tmp103 + tmp106; tmp108 = tmp106 - (K500000000 * tmp103); c_im(inout[4 * iostride]) = tmp107 + tmp108; c_im(inout[7 * iostride]) = tmp108 - tmp107; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; fftw_codelet_desc fftwi_twiddle_9_desc = { "fftwi_twiddle_9", (void (*)()) fftwi_twiddle_9, 9, FFTW_BACKWARD, FFTW_TWIDDLE, 209, 8, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_10.c���������������������������������������������������������������������������0000644�0001754�0000144�00000026267�07637527363�010570� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:33 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 10 */ /* * This function contains 102 FP additions, 60 FP multiplications, * (or, 72 additions, 30 multiplications, 30 fused multiply/add), * 42 stack variables, and 40 memory accesses */ static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_10(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 9) { fftw_real tmp7; fftw_real tmp55; fftw_real tmp100; fftw_real tmp115; fftw_real tmp41; fftw_real tmp52; fftw_real tmp53; fftw_real tmp59; fftw_real tmp60; fftw_real tmp61; fftw_real tmp75; fftw_real tmp78; fftw_real tmp113; fftw_real tmp89; fftw_real tmp90; fftw_real tmp96; fftw_real tmp18; fftw_real tmp29; fftw_real tmp30; fftw_real tmp56; fftw_real tmp57; fftw_real tmp58; fftw_real tmp68; fftw_real tmp71; fftw_real tmp112; fftw_real tmp86; fftw_real tmp87; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp99; fftw_real tmp6; fftw_real tmp98; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp99 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[5 * iostride]); tmp5 = c_im(inout[5 * iostride]); tmp2 = c_re(W[4]); tmp4 = c_im(W[4]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp98 = (tmp2 * tmp5) - (tmp4 * tmp3); } tmp7 = tmp1 - tmp6; tmp55 = tmp1 + tmp6; tmp100 = tmp98 + tmp99; tmp115 = tmp99 - tmp98; } { fftw_real tmp35; fftw_real tmp73; fftw_real tmp51; fftw_real tmp77; fftw_real tmp40; fftw_real tmp74; fftw_real tmp46; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[4 * iostride]); tmp34 = c_im(inout[4 * iostride]); tmp31 = c_re(W[3]); tmp33 = c_im(W[3]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp73 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp48; fftw_real tmp50; fftw_real tmp47; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp48 = c_re(inout[iostride]); tmp50 = c_im(inout[iostride]); tmp47 = c_re(W[0]); tmp49 = c_im(W[0]); tmp51 = (tmp47 * tmp48) + (tmp49 * tmp50); tmp77 = (tmp47 * tmp50) - (tmp49 * tmp48); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[9 * iostride]); tmp39 = c_im(inout[9 * iostride]); tmp36 = c_re(W[8]); tmp38 = c_im(W[8]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp74 = (tmp36 * tmp39) - (tmp38 * tmp37); } { fftw_real tmp43; fftw_real tmp45; fftw_real tmp42; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp43 = c_re(inout[6 * iostride]); tmp45 = c_im(inout[6 * iostride]); tmp42 = c_re(W[5]); tmp44 = c_im(W[5]); tmp46 = (tmp42 * tmp43) + (tmp44 * tmp45); tmp76 = (tmp42 * tmp45) - (tmp44 * tmp43); } tmp41 = tmp35 - tmp40; tmp52 = tmp46 - tmp51; tmp53 = tmp41 + tmp52; tmp59 = tmp35 + tmp40; tmp60 = tmp46 + tmp51; tmp61 = tmp59 + tmp60; tmp75 = tmp73 - tmp74; tmp78 = tmp76 - tmp77; tmp113 = tmp75 + tmp78; tmp89 = tmp73 + tmp74; tmp90 = tmp76 + tmp77; tmp96 = tmp89 + tmp90; } { fftw_real tmp12; fftw_real tmp66; fftw_real tmp28; fftw_real tmp70; fftw_real tmp17; fftw_real tmp67; fftw_real tmp23; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[2 * iostride]); tmp11 = c_im(inout[2 * iostride]); tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp66 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = c_re(inout[3 * iostride]); tmp27 = c_im(inout[3 * iostride]); tmp24 = c_re(W[2]); tmp26 = c_im(W[2]); tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27); tmp70 = (tmp24 * tmp27) - (tmp26 * tmp25); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[7 * iostride]); tmp16 = c_im(inout[7 * iostride]); tmp13 = c_re(W[6]); tmp15 = c_im(W[6]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp67 = (tmp13 * tmp16) - (tmp15 * tmp14); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = c_re(inout[8 * iostride]); tmp22 = c_im(inout[8 * iostride]); tmp19 = c_re(W[7]); tmp21 = c_im(W[7]); tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22); tmp69 = (tmp19 * tmp22) - (tmp21 * tmp20); } tmp18 = tmp12 - tmp17; tmp29 = tmp23 - tmp28; tmp30 = tmp18 + tmp29; tmp56 = tmp12 + tmp17; tmp57 = tmp23 + tmp28; tmp58 = tmp56 + tmp57; tmp68 = tmp66 - tmp67; tmp71 = tmp69 - tmp70; tmp112 = tmp68 + tmp71; tmp86 = tmp66 + tmp67; tmp87 = tmp69 + tmp70; tmp95 = tmp86 + tmp87; } { fftw_real tmp64; fftw_real tmp54; fftw_real tmp63; fftw_real tmp80; fftw_real tmp82; fftw_real tmp72; fftw_real tmp79; fftw_real tmp81; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp64 = K559016994 * (tmp30 - tmp53); tmp54 = tmp30 + tmp53; tmp63 = tmp7 - (K250000000 * tmp54); tmp72 = tmp68 - tmp71; tmp79 = tmp75 - tmp78; tmp80 = (K587785252 * tmp72) - (K951056516 * tmp79); tmp82 = (K951056516 * tmp72) + (K587785252 * tmp79); c_re(inout[5 * iostride]) = tmp7 + tmp54; tmp81 = tmp64 + tmp63; c_re(inout[iostride]) = tmp81 - tmp82; c_re(inout[9 * iostride]) = tmp81 + tmp82; tmp65 = tmp63 - tmp64; c_re(inout[7 * iostride]) = tmp65 - tmp80; c_re(inout[3 * iostride]) = tmp65 + tmp80; } { fftw_real tmp114; fftw_real tmp116; fftw_real tmp117; fftw_real tmp111; fftw_real tmp120; fftw_real tmp109; fftw_real tmp110; fftw_real tmp119; fftw_real tmp118; ASSERT_ALIGNED_DOUBLE; tmp114 = K559016994 * (tmp112 - tmp113); tmp116 = tmp112 + tmp113; tmp117 = tmp115 - (K250000000 * tmp116); tmp109 = tmp18 - tmp29; tmp110 = tmp41 - tmp52; tmp111 = (K951056516 * tmp109) + (K587785252 * tmp110); tmp120 = (K587785252 * tmp109) - (K951056516 * tmp110); c_im(inout[5 * iostride]) = tmp116 + tmp115; tmp119 = tmp117 - tmp114; c_im(inout[3 * iostride]) = tmp119 - tmp120; c_im(inout[7 * iostride]) = tmp120 + tmp119; tmp118 = tmp114 + tmp117; c_im(inout[iostride]) = tmp111 + tmp118; c_im(inout[9 * iostride]) = tmp118 - tmp111; } { fftw_real tmp84; fftw_real tmp62; fftw_real tmp83; fftw_real tmp92; fftw_real tmp94; fftw_real tmp88; fftw_real tmp91; fftw_real tmp93; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = K559016994 * (tmp58 - tmp61); tmp62 = tmp58 + tmp61; tmp83 = tmp55 - (K250000000 * tmp62); tmp88 = tmp86 - tmp87; tmp91 = tmp89 - tmp90; tmp92 = (K587785252 * tmp88) - (K951056516 * tmp91); tmp94 = (K951056516 * tmp88) + (K587785252 * tmp91); c_re(inout[0]) = tmp55 + tmp62; tmp93 = tmp84 + tmp83; c_re(inout[6 * iostride]) = tmp93 - tmp94; c_re(inout[4 * iostride]) = tmp93 + tmp94; tmp85 = tmp83 - tmp84; c_re(inout[2 * iostride]) = tmp85 - tmp92; c_re(inout[8 * iostride]) = tmp85 + tmp92; } { fftw_real tmp105; fftw_real tmp97; fftw_real tmp104; fftw_real tmp103; fftw_real tmp108; fftw_real tmp101; fftw_real tmp102; fftw_real tmp107; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; tmp105 = K559016994 * (tmp95 - tmp96); tmp97 = tmp95 + tmp96; tmp104 = tmp100 - (K250000000 * tmp97); tmp101 = tmp56 - tmp57; tmp102 = tmp59 - tmp60; tmp103 = (K587785252 * tmp101) - (K951056516 * tmp102); tmp108 = (K951056516 * tmp101) + (K587785252 * tmp102); c_im(inout[0]) = tmp97 + tmp100; tmp107 = tmp105 + tmp104; c_im(inout[4 * iostride]) = tmp107 - tmp108; c_im(inout[6 * iostride]) = tmp108 + tmp107; tmp106 = tmp104 - tmp105; c_im(inout[2 * iostride]) = tmp103 + tmp106; c_im(inout[8 * iostride]) = tmp106 - tmp103; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; fftw_codelet_desc fftwi_twiddle_10_desc = { "fftwi_twiddle_10", (void (*)()) fftwi_twiddle_10, 10, FFTW_BACKWARD, FFTW_TWIDDLE, 231, 9, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_16.c���������������������������������������������������������������������������0000644�0001754�0000144�00000042751�07637527370�010570� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:35 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 16 */ /* * This function contains 174 FP additions, 84 FP multiplications, * (or, 136 additions, 46 multiplications, 38 fused multiply/add), * 50 stack variables, and 64 memory accesses */ static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 15) { fftw_real tmp7; fftw_real tmp91; fftw_real tmp180; fftw_real tmp194; fftw_real tmp18; fftw_real tmp193; fftw_real tmp94; fftw_real tmp177; fftw_real tmp77; fftw_real tmp88; fftw_real tmp161; fftw_real tmp117; fftw_real tmp141; fftw_real tmp162; fftw_real tmp163; fftw_real tmp164; fftw_real tmp112; fftw_real tmp140; fftw_real tmp30; fftw_real tmp153; fftw_real tmp100; fftw_real tmp137; fftw_real tmp41; fftw_real tmp152; fftw_real tmp105; fftw_real tmp136; fftw_real tmp54; fftw_real tmp65; fftw_real tmp156; fftw_real tmp128; fftw_real tmp144; fftw_real tmp157; fftw_real tmp158; fftw_real tmp159; fftw_real tmp123; fftw_real tmp143; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp179; fftw_real tmp6; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp179 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[8 * iostride]); tmp5 = c_im(inout[8 * iostride]); tmp2 = c_re(W[7]); tmp4 = c_im(W[7]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp178 = (tmp2 * tmp5) - (tmp4 * tmp3); } tmp7 = tmp1 + tmp6; tmp91 = tmp1 - tmp6; tmp180 = tmp178 + tmp179; tmp194 = tmp179 - tmp178; } { fftw_real tmp12; fftw_real tmp92; fftw_real tmp17; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[4 * iostride]); tmp11 = c_im(inout[4 * iostride]); tmp8 = c_re(W[3]); tmp10 = c_im(W[3]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp92 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[12 * iostride]); tmp16 = c_im(inout[12 * iostride]); tmp13 = c_re(W[11]); tmp15 = c_im(W[11]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp93 = (tmp13 * tmp16) - (tmp15 * tmp14); } tmp18 = tmp12 + tmp17; tmp193 = tmp12 - tmp17; tmp94 = tmp92 - tmp93; tmp177 = tmp92 + tmp93; } { fftw_real tmp71; fftw_real tmp108; fftw_real tmp87; fftw_real tmp115; fftw_real tmp76; fftw_real tmp109; fftw_real tmp82; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[15 * iostride]); tmp70 = c_im(inout[15 * iostride]); tmp67 = c_re(W[14]); tmp69 = c_im(W[14]); tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); tmp108 = (tmp67 * tmp70) - (tmp69 * tmp68); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[11 * iostride]); tmp86 = c_im(inout[11 * iostride]); tmp83 = c_re(W[10]); tmp85 = c_im(W[10]); tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); tmp115 = (tmp83 * tmp86) - (tmp85 * tmp84); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[7 * iostride]); tmp75 = c_im(inout[7 * iostride]); tmp72 = c_re(W[6]); tmp74 = c_im(W[6]); tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); tmp109 = (tmp72 * tmp75) - (tmp74 * tmp73); } { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[3 * iostride]); tmp81 = c_im(inout[3 * iostride]); tmp78 = c_re(W[2]); tmp80 = c_im(W[2]); tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); tmp114 = (tmp78 * tmp81) - (tmp80 * tmp79); } { fftw_real tmp113; fftw_real tmp116; fftw_real tmp110; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp77 = tmp71 + tmp76; tmp88 = tmp82 + tmp87; tmp161 = tmp77 - tmp88; tmp113 = tmp71 - tmp76; tmp116 = tmp114 - tmp115; tmp117 = tmp113 - tmp116; tmp141 = tmp113 + tmp116; tmp162 = tmp108 + tmp109; tmp163 = tmp114 + tmp115; tmp164 = tmp162 - tmp163; tmp110 = tmp108 - tmp109; tmp111 = tmp82 - tmp87; tmp112 = tmp110 + tmp111; tmp140 = tmp110 - tmp111; } } { fftw_real tmp24; fftw_real tmp97; fftw_real tmp29; fftw_real tmp98; fftw_real tmp96; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[2 * iostride]); tmp23 = c_im(inout[2 * iostride]); tmp20 = c_re(W[1]); tmp22 = c_im(W[1]); tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); tmp97 = (tmp20 * tmp23) - (tmp22 * tmp21); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[10 * iostride]); tmp28 = c_im(inout[10 * iostride]); tmp25 = c_re(W[9]); tmp27 = c_im(W[9]); tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); tmp98 = (tmp25 * tmp28) - (tmp27 * tmp26); } tmp30 = tmp24 + tmp29; tmp153 = tmp97 + tmp98; tmp96 = tmp24 - tmp29; tmp99 = tmp97 - tmp98; tmp100 = tmp96 - tmp99; tmp137 = tmp96 + tmp99; } { fftw_real tmp35; fftw_real tmp102; fftw_real tmp40; fftw_real tmp103; fftw_real tmp101; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[14 * iostride]); tmp34 = c_im(inout[14 * iostride]); tmp31 = c_re(W[13]); tmp33 = c_im(W[13]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp102 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[6 * iostride]); tmp39 = c_im(inout[6 * iostride]); tmp36 = c_re(W[5]); tmp38 = c_im(W[5]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp103 = (tmp36 * tmp39) - (tmp38 * tmp37); } tmp41 = tmp35 + tmp40; tmp152 = tmp102 + tmp103; tmp101 = tmp35 - tmp40; tmp104 = tmp102 - tmp103; tmp105 = tmp101 + tmp104; tmp136 = tmp104 - tmp101; } { fftw_real tmp48; fftw_real tmp119; fftw_real tmp64; fftw_real tmp126; fftw_real tmp53; fftw_real tmp120; fftw_real tmp59; fftw_real tmp125; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[iostride]); tmp47 = c_im(inout[iostride]); tmp44 = c_re(W[0]); tmp46 = c_im(W[0]); tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); tmp119 = (tmp44 * tmp47) - (tmp46 * tmp45); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[13 * iostride]); tmp63 = c_im(inout[13 * iostride]); tmp60 = c_re(W[12]); tmp62 = c_im(W[12]); tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); tmp126 = (tmp60 * tmp63) - (tmp62 * tmp61); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[9 * iostride]); tmp52 = c_im(inout[9 * iostride]); tmp49 = c_re(W[8]); tmp51 = c_im(W[8]); tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); tmp120 = (tmp49 * tmp52) - (tmp51 * tmp50); } { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[5 * iostride]); tmp58 = c_im(inout[5 * iostride]); tmp55 = c_re(W[4]); tmp57 = c_im(W[4]); tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); tmp125 = (tmp55 * tmp58) - (tmp57 * tmp56); } { fftw_real tmp124; fftw_real tmp127; fftw_real tmp121; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp54 = tmp48 + tmp53; tmp65 = tmp59 + tmp64; tmp156 = tmp54 - tmp65; tmp124 = tmp48 - tmp53; tmp127 = tmp125 - tmp126; tmp128 = tmp124 - tmp127; tmp144 = tmp124 + tmp127; tmp157 = tmp119 + tmp120; tmp158 = tmp125 + tmp126; tmp159 = tmp157 - tmp158; tmp121 = tmp119 - tmp120; tmp122 = tmp59 - tmp64; tmp123 = tmp121 + tmp122; tmp143 = tmp121 - tmp122; } } { fftw_real tmp107; fftw_real tmp131; fftw_real tmp196; fftw_real tmp198; fftw_real tmp130; fftw_real tmp191; fftw_real tmp134; fftw_real tmp197; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp95; fftw_real tmp106; fftw_real tmp192; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp95 = tmp91 - tmp94; tmp106 = K707106781 * (tmp100 + tmp105); tmp107 = tmp95 - tmp106; tmp131 = tmp95 + tmp106; tmp192 = K707106781 * (tmp137 + tmp136); tmp195 = tmp193 + tmp194; tmp196 = tmp192 + tmp195; tmp198 = tmp195 - tmp192; } { fftw_real tmp118; fftw_real tmp129; fftw_real tmp132; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp118 = (K923879532 * tmp112) - (K382683432 * tmp117); tmp129 = (K923879532 * tmp123) + (K382683432 * tmp128); tmp130 = tmp118 - tmp129; tmp191 = tmp129 + tmp118; tmp132 = (K923879532 * tmp128) - (K382683432 * tmp123); tmp133 = (K382683432 * tmp112) + (K923879532 * tmp117); tmp134 = tmp132 + tmp133; tmp197 = tmp132 - tmp133; } c_re(inout[13 * iostride]) = tmp107 - tmp130; c_re(inout[5 * iostride]) = tmp107 + tmp130; c_re(inout[9 * iostride]) = tmp131 - tmp134; c_re(inout[iostride]) = tmp131 + tmp134; c_im(inout[iostride]) = tmp191 + tmp196; c_im(inout[9 * iostride]) = tmp196 - tmp191; c_im(inout[5 * iostride]) = tmp197 + tmp198; c_im(inout[13 * iostride]) = tmp198 - tmp197; } { fftw_real tmp139; fftw_real tmp147; fftw_real tmp202; fftw_real tmp204; fftw_real tmp146; fftw_real tmp199; fftw_real tmp150; fftw_real tmp203; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp135; fftw_real tmp138; fftw_real tmp200; fftw_real tmp201; ASSERT_ALIGNED_DOUBLE; tmp135 = tmp91 + tmp94; tmp138 = K707106781 * (tmp136 - tmp137); tmp139 = tmp135 - tmp138; tmp147 = tmp135 + tmp138; tmp200 = K707106781 * (tmp100 - tmp105); tmp201 = tmp194 - tmp193; tmp202 = tmp200 + tmp201; tmp204 = tmp201 - tmp200; } { fftw_real tmp142; fftw_real tmp145; fftw_real tmp148; fftw_real tmp149; ASSERT_ALIGNED_DOUBLE; tmp142 = (K382683432 * tmp140) - (K923879532 * tmp141); tmp145 = (K382683432 * tmp143) + (K923879532 * tmp144); tmp146 = tmp142 - tmp145; tmp199 = tmp145 + tmp142; tmp148 = (K382683432 * tmp144) - (K923879532 * tmp143); tmp149 = (K923879532 * tmp140) + (K382683432 * tmp141); tmp150 = tmp148 + tmp149; tmp203 = tmp148 - tmp149; } c_re(inout[15 * iostride]) = tmp139 - tmp146; c_re(inout[7 * iostride]) = tmp139 + tmp146; c_re(inout[11 * iostride]) = tmp147 - tmp150; c_re(inout[3 * iostride]) = tmp147 + tmp150; c_im(inout[3 * iostride]) = tmp199 + tmp202; c_im(inout[11 * iostride]) = tmp202 - tmp199; c_im(inout[7 * iostride]) = tmp203 + tmp204; c_im(inout[15 * iostride]) = tmp204 - tmp203; } { fftw_real tmp155; fftw_real tmp167; fftw_real tmp188; fftw_real tmp190; fftw_real tmp166; fftw_real tmp189; fftw_real tmp170; fftw_real tmp185; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp151; fftw_real tmp154; fftw_real tmp186; fftw_real tmp187; ASSERT_ALIGNED_DOUBLE; tmp151 = tmp7 - tmp18; tmp154 = tmp152 - tmp153; tmp155 = tmp151 + tmp154; tmp167 = tmp151 - tmp154; tmp186 = tmp30 - tmp41; tmp187 = tmp180 - tmp177; tmp188 = tmp186 + tmp187; tmp190 = tmp187 - tmp186; } { fftw_real tmp160; fftw_real tmp165; fftw_real tmp168; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp160 = tmp156 - tmp159; tmp165 = tmp161 + tmp164; tmp166 = K707106781 * (tmp160 + tmp165); tmp189 = K707106781 * (tmp160 - tmp165); tmp168 = tmp164 - tmp161; tmp169 = tmp156 + tmp159; tmp170 = K707106781 * (tmp168 - tmp169); tmp185 = K707106781 * (tmp169 + tmp168); } c_re(inout[10 * iostride]) = tmp155 - tmp166; c_re(inout[2 * iostride]) = tmp155 + tmp166; c_re(inout[14 * iostride]) = tmp167 - tmp170; c_re(inout[6 * iostride]) = tmp167 + tmp170; c_im(inout[2 * iostride]) = tmp185 + tmp188; c_im(inout[10 * iostride]) = tmp188 - tmp185; c_im(inout[6 * iostride]) = tmp189 + tmp190; c_im(inout[14 * iostride]) = tmp190 - tmp189; } { fftw_real tmp43; fftw_real tmp171; fftw_real tmp182; fftw_real tmp184; fftw_real tmp90; fftw_real tmp183; fftw_real tmp174; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp42; fftw_real tmp176; fftw_real tmp181; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp7 + tmp18; tmp42 = tmp30 + tmp41; tmp43 = tmp19 + tmp42; tmp171 = tmp19 - tmp42; tmp176 = tmp153 + tmp152; tmp181 = tmp177 + tmp180; tmp182 = tmp176 + tmp181; tmp184 = tmp181 - tmp176; } { fftw_real tmp66; fftw_real tmp89; fftw_real tmp172; fftw_real tmp173; ASSERT_ALIGNED_DOUBLE; tmp66 = tmp54 + tmp65; tmp89 = tmp77 + tmp88; tmp90 = tmp66 + tmp89; tmp183 = tmp66 - tmp89; tmp172 = tmp162 + tmp163; tmp173 = tmp157 + tmp158; tmp174 = tmp172 - tmp173; tmp175 = tmp173 + tmp172; } c_re(inout[8 * iostride]) = tmp43 - tmp90; c_re(inout[0]) = tmp43 + tmp90; c_re(inout[12 * iostride]) = tmp171 - tmp174; c_re(inout[4 * iostride]) = tmp171 + tmp174; c_im(inout[0]) = tmp175 + tmp182; c_im(inout[8 * iostride]) = tmp182 - tmp175; c_im(inout[4 * iostride]) = tmp183 + tmp184; c_im(inout[12 * iostride]) = tmp184 - tmp183; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; fftw_codelet_desc fftwi_twiddle_16_desc = { "fftwi_twiddle_16", (void (*)()) fftwi_twiddle_16, 16, FFTW_BACKWARD, FFTW_TWIDDLE, 363, 15, twiddle_order, }; �����������������������fftw-2.1.5/fftw/ftwi_32.c���������������������������������������������������������������������������0000644�0001754�0000144�00000117303�07637527405�010561� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:35 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 32 */ /* * This function contains 434 FP additions, 208 FP multiplications, * (or, 340 additions, 114 multiplications, 94 fused multiply/add), * 90 stack variables, and 128 memory accesses */ static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_32(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 31) { fftw_real tmp19; fftw_real tmp387; fftw_real tmp472; fftw_real tmp486; fftw_real tmp442; fftw_real tmp456; fftw_real tmp191; fftw_real tmp303; fftw_real tmp161; fftw_real tmp403; fftw_real tmp276; fftw_real tmp316; fftw_real tmp372; fftw_real tmp400; fftw_real tmp259; fftw_real tmp319; fftw_real tmp42; fftw_real tmp455; fftw_real tmp201; fftw_real tmp304; fftw_real tmp390; fftw_real tmp437; fftw_real tmp196; fftw_real tmp305; fftw_real tmp184; fftw_real tmp401; fftw_real tmp375; fftw_real tmp404; fftw_real tmp270; fftw_real tmp317; fftw_real tmp279; fftw_real tmp320; fftw_real tmp66; fftw_real tmp395; fftw_real tmp224; fftw_real tmp312; fftw_real tmp357; fftw_real tmp396; fftw_real tmp219; fftw_real tmp311; fftw_real tmp114; fftw_real tmp410; fftw_real tmp249; fftw_real tmp323; fftw_real tmp363; fftw_real tmp407; fftw_real tmp232; fftw_real tmp326; fftw_real tmp89; fftw_real tmp393; fftw_real tmp213; fftw_real tmp309; fftw_real tmp354; fftw_real tmp392; fftw_real tmp208; fftw_real tmp308; fftw_real tmp137; fftw_real tmp408; fftw_real tmp366; fftw_real tmp411; fftw_real tmp243; fftw_real tmp324; fftw_real tmp252; fftw_real tmp327; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp440; fftw_real tmp6; fftw_real tmp439; fftw_real tmp12; fftw_real tmp188; fftw_real tmp17; fftw_real tmp189; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp440 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[16 * iostride]); tmp5 = c_im(inout[16 * iostride]); tmp2 = c_re(W[15]); tmp4 = c_im(W[15]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp439 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[8 * iostride]); tmp11 = c_im(inout[8 * iostride]); tmp8 = c_re(W[7]); tmp10 = c_im(W[7]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp188 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[24 * iostride]); tmp16 = c_im(inout[24 * iostride]); tmp13 = c_re(W[23]); tmp15 = c_im(W[23]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp189 = (tmp13 * tmp16) - (tmp15 * tmp14); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp470; fftw_real tmp471; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; tmp19 = tmp7 + tmp18; tmp387 = tmp7 - tmp18; tmp470 = tmp12 - tmp17; tmp471 = tmp440 - tmp439; tmp472 = tmp470 + tmp471; tmp486 = tmp471 - tmp470; } { fftw_real tmp438; fftw_real tmp441; fftw_real tmp187; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; tmp438 = tmp188 + tmp189; tmp441 = tmp439 + tmp440; tmp442 = tmp438 + tmp441; tmp456 = tmp441 - tmp438; tmp187 = tmp1 - tmp6; tmp190 = tmp188 - tmp189; tmp191 = tmp187 - tmp190; tmp303 = tmp187 + tmp190; } } { fftw_real tmp143; fftw_real tmp272; fftw_real tmp159; fftw_real tmp257; fftw_real tmp148; fftw_real tmp273; fftw_real tmp154; fftw_real tmp256; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp140; fftw_real tmp142; fftw_real tmp139; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp140 = c_re(inout[31 * iostride]); tmp142 = c_im(inout[31 * iostride]); tmp139 = c_re(W[30]); tmp141 = c_im(W[30]); tmp143 = (tmp139 * tmp140) + (tmp141 * tmp142); tmp272 = (tmp139 * tmp142) - (tmp141 * tmp140); } { fftw_real tmp156; fftw_real tmp158; fftw_real tmp155; fftw_real tmp157; ASSERT_ALIGNED_DOUBLE; tmp156 = c_re(inout[23 * iostride]); tmp158 = c_im(inout[23 * iostride]); tmp155 = c_re(W[22]); tmp157 = c_im(W[22]); tmp159 = (tmp155 * tmp156) + (tmp157 * tmp158); tmp257 = (tmp155 * tmp158) - (tmp157 * tmp156); } { fftw_real tmp145; fftw_real tmp147; fftw_real tmp144; fftw_real tmp146; ASSERT_ALIGNED_DOUBLE; tmp145 = c_re(inout[15 * iostride]); tmp147 = c_im(inout[15 * iostride]); tmp144 = c_re(W[14]); tmp146 = c_im(W[14]); tmp148 = (tmp144 * tmp145) + (tmp146 * tmp147); tmp273 = (tmp144 * tmp147) - (tmp146 * tmp145); } { fftw_real tmp151; fftw_real tmp153; fftw_real tmp150; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp151 = c_re(inout[7 * iostride]); tmp153 = c_im(inout[7 * iostride]); tmp150 = c_re(W[6]); tmp152 = c_im(W[6]); tmp154 = (tmp150 * tmp151) + (tmp152 * tmp153); tmp256 = (tmp150 * tmp153) - (tmp152 * tmp151); } { fftw_real tmp149; fftw_real tmp160; fftw_real tmp274; fftw_real tmp275; ASSERT_ALIGNED_DOUBLE; tmp149 = tmp143 + tmp148; tmp160 = tmp154 + tmp159; tmp161 = tmp149 + tmp160; tmp403 = tmp149 - tmp160; tmp274 = tmp272 - tmp273; tmp275 = tmp154 - tmp159; tmp276 = tmp274 + tmp275; tmp316 = tmp274 - tmp275; } { fftw_real tmp370; fftw_real tmp371; fftw_real tmp255; fftw_real tmp258; ASSERT_ALIGNED_DOUBLE; tmp370 = tmp272 + tmp273; tmp371 = tmp256 + tmp257; tmp372 = tmp370 + tmp371; tmp400 = tmp370 - tmp371; tmp255 = tmp143 - tmp148; tmp258 = tmp256 - tmp257; tmp259 = tmp255 - tmp258; tmp319 = tmp255 + tmp258; } } { fftw_real tmp24; fftw_real tmp193; fftw_real tmp40; fftw_real tmp199; fftw_real tmp29; fftw_real tmp194; fftw_real tmp35; fftw_real tmp198; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[4 * iostride]); tmp23 = c_im(inout[4 * iostride]); tmp20 = c_re(W[3]); tmp22 = c_im(W[3]); tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); tmp193 = (tmp20 * tmp23) - (tmp22 * tmp21); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[12 * iostride]); tmp39 = c_im(inout[12 * iostride]); tmp36 = c_re(W[11]); tmp38 = c_im(W[11]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp199 = (tmp36 * tmp39) - (tmp38 * tmp37); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[20 * iostride]); tmp28 = c_im(inout[20 * iostride]); tmp25 = c_re(W[19]); tmp27 = c_im(W[19]); tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); tmp194 = (tmp25 * tmp28) - (tmp27 * tmp26); } { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[28 * iostride]); tmp34 = c_im(inout[28 * iostride]); tmp31 = c_re(W[27]); tmp33 = c_im(W[27]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp198 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp30; fftw_real tmp41; fftw_real tmp197; fftw_real tmp200; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp24 + tmp29; tmp41 = tmp35 + tmp40; tmp42 = tmp30 + tmp41; tmp455 = tmp30 - tmp41; tmp197 = tmp35 - tmp40; tmp200 = tmp198 - tmp199; tmp201 = tmp197 + tmp200; tmp304 = tmp200 - tmp197; } { fftw_real tmp388; fftw_real tmp389; fftw_real tmp192; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp388 = tmp198 + tmp199; tmp389 = tmp193 + tmp194; tmp390 = tmp388 - tmp389; tmp437 = tmp389 + tmp388; tmp192 = tmp24 - tmp29; tmp195 = tmp193 - tmp194; tmp196 = tmp192 - tmp195; tmp305 = tmp192 + tmp195; } } { fftw_real tmp166; fftw_real tmp261; fftw_real tmp171; fftw_real tmp262; fftw_real tmp260; fftw_real tmp263; fftw_real tmp177; fftw_real tmp266; fftw_real tmp182; fftw_real tmp267; fftw_real tmp265; fftw_real tmp268; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp163; fftw_real tmp165; fftw_real tmp162; fftw_real tmp164; ASSERT_ALIGNED_DOUBLE; tmp163 = c_re(inout[3 * iostride]); tmp165 = c_im(inout[3 * iostride]); tmp162 = c_re(W[2]); tmp164 = c_im(W[2]); tmp166 = (tmp162 * tmp163) + (tmp164 * tmp165); tmp261 = (tmp162 * tmp165) - (tmp164 * tmp163); } { fftw_real tmp168; fftw_real tmp170; fftw_real tmp167; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp168 = c_re(inout[19 * iostride]); tmp170 = c_im(inout[19 * iostride]); tmp167 = c_re(W[18]); tmp169 = c_im(W[18]); tmp171 = (tmp167 * tmp168) + (tmp169 * tmp170); tmp262 = (tmp167 * tmp170) - (tmp169 * tmp168); } tmp260 = tmp166 - tmp171; tmp263 = tmp261 - tmp262; { fftw_real tmp174; fftw_real tmp176; fftw_real tmp173; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; tmp174 = c_re(inout[27 * iostride]); tmp176 = c_im(inout[27 * iostride]); tmp173 = c_re(W[26]); tmp175 = c_im(W[26]); tmp177 = (tmp173 * tmp174) + (tmp175 * tmp176); tmp266 = (tmp173 * tmp176) - (tmp175 * tmp174); } { fftw_real tmp179; fftw_real tmp181; fftw_real tmp178; fftw_real tmp180; ASSERT_ALIGNED_DOUBLE; tmp179 = c_re(inout[11 * iostride]); tmp181 = c_im(inout[11 * iostride]); tmp178 = c_re(W[10]); tmp180 = c_im(W[10]); tmp182 = (tmp178 * tmp179) + (tmp180 * tmp181); tmp267 = (tmp178 * tmp181) - (tmp180 * tmp179); } tmp265 = tmp177 - tmp182; tmp268 = tmp266 - tmp267; { fftw_real tmp172; fftw_real tmp183; fftw_real tmp373; fftw_real tmp374; ASSERT_ALIGNED_DOUBLE; tmp172 = tmp166 + tmp171; tmp183 = tmp177 + tmp182; tmp184 = tmp172 + tmp183; tmp401 = tmp172 - tmp183; tmp373 = tmp261 + tmp262; tmp374 = tmp266 + tmp267; tmp375 = tmp373 + tmp374; tmp404 = tmp374 - tmp373; } { fftw_real tmp264; fftw_real tmp269; fftw_real tmp277; fftw_real tmp278; ASSERT_ALIGNED_DOUBLE; tmp264 = tmp260 - tmp263; tmp269 = tmp265 + tmp268; tmp270 = K707106781 * (tmp264 + tmp269); tmp317 = K707106781 * (tmp264 - tmp269); tmp277 = tmp260 + tmp263; tmp278 = tmp268 - tmp265; tmp279 = K707106781 * (tmp277 + tmp278); tmp320 = K707106781 * (tmp278 - tmp277); } } { fftw_real tmp48; fftw_real tmp215; fftw_real tmp64; fftw_real tmp222; fftw_real tmp53; fftw_real tmp216; fftw_real tmp59; fftw_real tmp221; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[2 * iostride]); tmp47 = c_im(inout[2 * iostride]); tmp44 = c_re(W[1]); tmp46 = c_im(W[1]); tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); tmp215 = (tmp44 * tmp47) - (tmp46 * tmp45); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[26 * iostride]); tmp63 = c_im(inout[26 * iostride]); tmp60 = c_re(W[25]); tmp62 = c_im(W[25]); tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); tmp222 = (tmp60 * tmp63) - (tmp62 * tmp61); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[18 * iostride]); tmp52 = c_im(inout[18 * iostride]); tmp49 = c_re(W[17]); tmp51 = c_im(W[17]); tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); tmp216 = (tmp49 * tmp52) - (tmp51 * tmp50); } { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[10 * iostride]); tmp58 = c_im(inout[10 * iostride]); tmp55 = c_re(W[9]); tmp57 = c_im(W[9]); tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); tmp221 = (tmp55 * tmp58) - (tmp57 * tmp56); } { fftw_real tmp54; fftw_real tmp65; fftw_real tmp220; fftw_real tmp223; ASSERT_ALIGNED_DOUBLE; tmp54 = tmp48 + tmp53; tmp65 = tmp59 + tmp64; tmp66 = tmp54 + tmp65; tmp395 = tmp54 - tmp65; tmp220 = tmp48 - tmp53; tmp223 = tmp221 - tmp222; tmp224 = tmp220 - tmp223; tmp312 = tmp220 + tmp223; } { fftw_real tmp355; fftw_real tmp356; fftw_real tmp217; fftw_real tmp218; ASSERT_ALIGNED_DOUBLE; tmp355 = tmp215 + tmp216; tmp356 = tmp221 + tmp222; tmp357 = tmp355 + tmp356; tmp396 = tmp355 - tmp356; tmp217 = tmp215 - tmp216; tmp218 = tmp59 - tmp64; tmp219 = tmp217 + tmp218; tmp311 = tmp217 - tmp218; } } { fftw_real tmp96; fftw_real tmp245; fftw_real tmp112; fftw_real tmp230; fftw_real tmp101; fftw_real tmp246; fftw_real tmp107; fftw_real tmp229; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp93; fftw_real tmp95; fftw_real tmp92; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; tmp93 = c_re(inout[iostride]); tmp95 = c_im(inout[iostride]); tmp92 = c_re(W[0]); tmp94 = c_im(W[0]); tmp96 = (tmp92 * tmp93) + (tmp94 * tmp95); tmp245 = (tmp92 * tmp95) - (tmp94 * tmp93); } { fftw_real tmp109; fftw_real tmp111; fftw_real tmp108; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp109 = c_re(inout[25 * iostride]); tmp111 = c_im(inout[25 * iostride]); tmp108 = c_re(W[24]); tmp110 = c_im(W[24]); tmp112 = (tmp108 * tmp109) + (tmp110 * tmp111); tmp230 = (tmp108 * tmp111) - (tmp110 * tmp109); } { fftw_real tmp98; fftw_real tmp100; fftw_real tmp97; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = c_re(inout[17 * iostride]); tmp100 = c_im(inout[17 * iostride]); tmp97 = c_re(W[16]); tmp99 = c_im(W[16]); tmp101 = (tmp97 * tmp98) + (tmp99 * tmp100); tmp246 = (tmp97 * tmp100) - (tmp99 * tmp98); } { fftw_real tmp104; fftw_real tmp106; fftw_real tmp103; fftw_real tmp105; ASSERT_ALIGNED_DOUBLE; tmp104 = c_re(inout[9 * iostride]); tmp106 = c_im(inout[9 * iostride]); tmp103 = c_re(W[8]); tmp105 = c_im(W[8]); tmp107 = (tmp103 * tmp104) + (tmp105 * tmp106); tmp229 = (tmp103 * tmp106) - (tmp105 * tmp104); } { fftw_real tmp102; fftw_real tmp113; fftw_real tmp247; fftw_real tmp248; ASSERT_ALIGNED_DOUBLE; tmp102 = tmp96 + tmp101; tmp113 = tmp107 + tmp112; tmp114 = tmp102 + tmp113; tmp410 = tmp102 - tmp113; tmp247 = tmp245 - tmp246; tmp248 = tmp107 - tmp112; tmp249 = tmp247 + tmp248; tmp323 = tmp247 - tmp248; } { fftw_real tmp361; fftw_real tmp362; fftw_real tmp228; fftw_real tmp231; ASSERT_ALIGNED_DOUBLE; tmp361 = tmp245 + tmp246; tmp362 = tmp229 + tmp230; tmp363 = tmp361 + tmp362; tmp407 = tmp361 - tmp362; tmp228 = tmp96 - tmp101; tmp231 = tmp229 - tmp230; tmp232 = tmp228 - tmp231; tmp326 = tmp228 + tmp231; } } { fftw_real tmp71; fftw_real tmp204; fftw_real tmp87; fftw_real tmp211; fftw_real tmp76; fftw_real tmp205; fftw_real tmp82; fftw_real tmp210; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[30 * iostride]); tmp70 = c_im(inout[30 * iostride]); tmp67 = c_re(W[29]); tmp69 = c_im(W[29]); tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); tmp204 = (tmp67 * tmp70) - (tmp69 * tmp68); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[22 * iostride]); tmp86 = c_im(inout[22 * iostride]); tmp83 = c_re(W[21]); tmp85 = c_im(W[21]); tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); tmp211 = (tmp83 * tmp86) - (tmp85 * tmp84); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[14 * iostride]); tmp75 = c_im(inout[14 * iostride]); tmp72 = c_re(W[13]); tmp74 = c_im(W[13]); tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); tmp205 = (tmp72 * tmp75) - (tmp74 * tmp73); } { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[6 * iostride]); tmp81 = c_im(inout[6 * iostride]); tmp78 = c_re(W[5]); tmp80 = c_im(W[5]); tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); tmp210 = (tmp78 * tmp81) - (tmp80 * tmp79); } { fftw_real tmp77; fftw_real tmp88; fftw_real tmp209; fftw_real tmp212; ASSERT_ALIGNED_DOUBLE; tmp77 = tmp71 + tmp76; tmp88 = tmp82 + tmp87; tmp89 = tmp77 + tmp88; tmp393 = tmp77 - tmp88; tmp209 = tmp71 - tmp76; tmp212 = tmp210 - tmp211; tmp213 = tmp209 - tmp212; tmp309 = tmp209 + tmp212; } { fftw_real tmp352; fftw_real tmp353; fftw_real tmp206; fftw_real tmp207; ASSERT_ALIGNED_DOUBLE; tmp352 = tmp204 + tmp205; tmp353 = tmp210 + tmp211; tmp354 = tmp352 + tmp353; tmp392 = tmp352 - tmp353; tmp206 = tmp204 - tmp205; tmp207 = tmp82 - tmp87; tmp208 = tmp206 + tmp207; tmp308 = tmp206 - tmp207; } } { fftw_real tmp119; fftw_real tmp234; fftw_real tmp124; fftw_real tmp235; fftw_real tmp233; fftw_real tmp236; fftw_real tmp130; fftw_real tmp239; fftw_real tmp135; fftw_real tmp240; fftw_real tmp238; fftw_real tmp241; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp116; fftw_real tmp118; fftw_real tmp115; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp116 = c_re(inout[5 * iostride]); tmp118 = c_im(inout[5 * iostride]); tmp115 = c_re(W[4]); tmp117 = c_im(W[4]); tmp119 = (tmp115 * tmp116) + (tmp117 * tmp118); tmp234 = (tmp115 * tmp118) - (tmp117 * tmp116); } { fftw_real tmp121; fftw_real tmp123; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp121 = c_re(inout[21 * iostride]); tmp123 = c_im(inout[21 * iostride]); tmp120 = c_re(W[20]); tmp122 = c_im(W[20]); tmp124 = (tmp120 * tmp121) + (tmp122 * tmp123); tmp235 = (tmp120 * tmp123) - (tmp122 * tmp121); } tmp233 = tmp119 - tmp124; tmp236 = tmp234 - tmp235; { fftw_real tmp127; fftw_real tmp129; fftw_real tmp126; fftw_real tmp128; ASSERT_ALIGNED_DOUBLE; tmp127 = c_re(inout[29 * iostride]); tmp129 = c_im(inout[29 * iostride]); tmp126 = c_re(W[28]); tmp128 = c_im(W[28]); tmp130 = (tmp126 * tmp127) + (tmp128 * tmp129); tmp239 = (tmp126 * tmp129) - (tmp128 * tmp127); } { fftw_real tmp132; fftw_real tmp134; fftw_real tmp131; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp132 = c_re(inout[13 * iostride]); tmp134 = c_im(inout[13 * iostride]); tmp131 = c_re(W[12]); tmp133 = c_im(W[12]); tmp135 = (tmp131 * tmp132) + (tmp133 * tmp134); tmp240 = (tmp131 * tmp134) - (tmp133 * tmp132); } tmp238 = tmp130 - tmp135; tmp241 = tmp239 - tmp240; { fftw_real tmp125; fftw_real tmp136; fftw_real tmp364; fftw_real tmp365; ASSERT_ALIGNED_DOUBLE; tmp125 = tmp119 + tmp124; tmp136 = tmp130 + tmp135; tmp137 = tmp125 + tmp136; tmp408 = tmp125 - tmp136; tmp364 = tmp234 + tmp235; tmp365 = tmp239 + tmp240; tmp366 = tmp364 + tmp365; tmp411 = tmp365 - tmp364; } { fftw_real tmp237; fftw_real tmp242; fftw_real tmp250; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; tmp237 = tmp233 - tmp236; tmp242 = tmp238 + tmp241; tmp243 = K707106781 * (tmp237 + tmp242); tmp324 = K707106781 * (tmp237 - tmp242); tmp250 = tmp233 + tmp236; tmp251 = tmp241 - tmp238; tmp252 = K707106781 * (tmp250 + tmp251); tmp327 = K707106781 * (tmp251 - tmp250); } } { fftw_real tmp91; fftw_real tmp383; fftw_real tmp444; fftw_real tmp446; fftw_real tmp186; fftw_real tmp445; fftw_real tmp386; fftw_real tmp435; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp90; fftw_real tmp436; fftw_real tmp443; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp19 + tmp42; tmp90 = tmp66 + tmp89; tmp91 = tmp43 + tmp90; tmp383 = tmp43 - tmp90; tmp436 = tmp357 + tmp354; tmp443 = tmp437 + tmp442; tmp444 = tmp436 + tmp443; tmp446 = tmp443 - tmp436; } { fftw_real tmp138; fftw_real tmp185; fftw_real tmp384; fftw_real tmp385; ASSERT_ALIGNED_DOUBLE; tmp138 = tmp114 + tmp137; tmp185 = tmp161 + tmp184; tmp186 = tmp138 + tmp185; tmp445 = tmp138 - tmp185; tmp384 = tmp372 + tmp375; tmp385 = tmp363 + tmp366; tmp386 = tmp384 - tmp385; tmp435 = tmp385 + tmp384; } c_re(inout[16 * iostride]) = tmp91 - tmp186; c_re(inout[0]) = tmp91 + tmp186; c_re(inout[24 * iostride]) = tmp383 - tmp386; c_re(inout[8 * iostride]) = tmp383 + tmp386; c_im(inout[0]) = tmp435 + tmp444; c_im(inout[16 * iostride]) = tmp444 - tmp435; c_im(inout[8 * iostride]) = tmp445 + tmp446; c_im(inout[24 * iostride]) = tmp446 - tmp445; } { fftw_real tmp359; fftw_real tmp379; fftw_real tmp450; fftw_real tmp452; fftw_real tmp368; fftw_real tmp381; fftw_real tmp377; fftw_real tmp380; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp351; fftw_real tmp358; fftw_real tmp448; fftw_real tmp449; ASSERT_ALIGNED_DOUBLE; tmp351 = tmp19 - tmp42; tmp358 = tmp354 - tmp357; tmp359 = tmp351 + tmp358; tmp379 = tmp351 - tmp358; tmp448 = tmp66 - tmp89; tmp449 = tmp442 - tmp437; tmp450 = tmp448 + tmp449; tmp452 = tmp449 - tmp448; } { fftw_real tmp360; fftw_real tmp367; fftw_real tmp369; fftw_real tmp376; ASSERT_ALIGNED_DOUBLE; tmp360 = tmp114 - tmp137; tmp367 = tmp363 - tmp366; tmp368 = tmp360 - tmp367; tmp381 = tmp360 + tmp367; tmp369 = tmp161 - tmp184; tmp376 = tmp372 - tmp375; tmp377 = tmp369 + tmp376; tmp380 = tmp376 - tmp369; } { fftw_real tmp378; fftw_real tmp451; fftw_real tmp382; fftw_real tmp447; ASSERT_ALIGNED_DOUBLE; tmp378 = K707106781 * (tmp368 + tmp377); c_re(inout[20 * iostride]) = tmp359 - tmp378; c_re(inout[4 * iostride]) = tmp359 + tmp378; tmp451 = K707106781 * (tmp368 - tmp377); c_im(inout[12 * iostride]) = tmp451 + tmp452; c_im(inout[28 * iostride]) = tmp452 - tmp451; tmp382 = K707106781 * (tmp380 - tmp381); c_re(inout[28 * iostride]) = tmp379 - tmp382; c_re(inout[12 * iostride]) = tmp379 + tmp382; tmp447 = K707106781 * (tmp381 + tmp380); c_im(inout[4 * iostride]) = tmp447 + tmp450; c_im(inout[20 * iostride]) = tmp450 - tmp447; } } { fftw_real tmp391; fftw_real tmp419; fftw_real tmp398; fftw_real tmp454; fftw_real tmp422; fftw_real tmp462; fftw_real tmp406; fftw_real tmp417; fftw_real tmp457; fftw_real tmp463; fftw_real tmp426; fftw_real tmp433; fftw_real tmp413; fftw_real tmp416; fftw_real tmp429; fftw_real tmp432; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp394; fftw_real tmp397; fftw_real tmp424; fftw_real tmp425; ASSERT_ALIGNED_DOUBLE; tmp391 = tmp387 - tmp390; tmp419 = tmp387 + tmp390; tmp394 = tmp392 - tmp393; tmp397 = tmp395 + tmp396; tmp398 = K707106781 * (tmp394 - tmp397); tmp454 = K707106781 * (tmp397 + tmp394); { fftw_real tmp420; fftw_real tmp421; fftw_real tmp402; fftw_real tmp405; ASSERT_ALIGNED_DOUBLE; tmp420 = tmp395 - tmp396; tmp421 = tmp393 + tmp392; tmp422 = K707106781 * (tmp420 + tmp421); tmp462 = K707106781 * (tmp420 - tmp421); tmp402 = tmp400 - tmp401; tmp405 = tmp403 - tmp404; tmp406 = (K382683432 * tmp402) - (K923879532 * tmp405); tmp417 = (K923879532 * tmp402) + (K382683432 * tmp405); } tmp457 = tmp455 + tmp456; tmp463 = tmp456 - tmp455; tmp424 = tmp400 + tmp401; tmp425 = tmp403 + tmp404; tmp426 = (K923879532 * tmp424) - (K382683432 * tmp425); tmp433 = (K382683432 * tmp424) + (K923879532 * tmp425); { fftw_real tmp409; fftw_real tmp412; fftw_real tmp427; fftw_real tmp428; ASSERT_ALIGNED_DOUBLE; tmp409 = tmp407 - tmp408; tmp412 = tmp410 - tmp411; tmp413 = (K382683432 * tmp409) + (K923879532 * tmp412); tmp416 = (K382683432 * tmp412) - (K923879532 * tmp409); tmp427 = tmp407 + tmp408; tmp428 = tmp410 + tmp411; tmp429 = (K923879532 * tmp427) + (K382683432 * tmp428); tmp432 = (K923879532 * tmp428) - (K382683432 * tmp427); } } { fftw_real tmp399; fftw_real tmp414; fftw_real tmp415; fftw_real tmp418; ASSERT_ALIGNED_DOUBLE; tmp399 = tmp391 - tmp398; tmp414 = tmp406 - tmp413; c_re(inout[30 * iostride]) = tmp399 - tmp414; c_re(inout[14 * iostride]) = tmp399 + tmp414; tmp415 = tmp391 + tmp398; tmp418 = tmp416 + tmp417; c_re(inout[22 * iostride]) = tmp415 - tmp418; c_re(inout[6 * iostride]) = tmp415 + tmp418; } { fftw_real tmp465; fftw_real tmp466; fftw_real tmp461; fftw_real tmp464; ASSERT_ALIGNED_DOUBLE; tmp465 = tmp416 - tmp417; tmp466 = tmp463 - tmp462; c_im(inout[14 * iostride]) = tmp465 + tmp466; c_im(inout[30 * iostride]) = tmp466 - tmp465; tmp461 = tmp413 + tmp406; tmp464 = tmp462 + tmp463; c_im(inout[6 * iostride]) = tmp461 + tmp464; c_im(inout[22 * iostride]) = tmp464 - tmp461; } { fftw_real tmp423; fftw_real tmp430; fftw_real tmp431; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp423 = tmp419 - tmp422; tmp430 = tmp426 - tmp429; c_re(inout[26 * iostride]) = tmp423 - tmp430; c_re(inout[10 * iostride]) = tmp423 + tmp430; tmp431 = tmp419 + tmp422; tmp434 = tmp432 + tmp433; c_re(inout[18 * iostride]) = tmp431 - tmp434; c_re(inout[2 * iostride]) = tmp431 + tmp434; } { fftw_real tmp459; fftw_real tmp460; fftw_real tmp453; fftw_real tmp458; ASSERT_ALIGNED_DOUBLE; tmp459 = tmp432 - tmp433; tmp460 = tmp457 - tmp454; c_im(inout[10 * iostride]) = tmp459 + tmp460; c_im(inout[26 * iostride]) = tmp460 - tmp459; tmp453 = tmp429 + tmp426; tmp458 = tmp454 + tmp457; c_im(inout[2 * iostride]) = tmp453 + tmp458; c_im(inout[18 * iostride]) = tmp458 - tmp453; } } { fftw_real tmp307; fftw_real tmp335; fftw_real tmp338; fftw_real tmp492; fftw_real tmp487; fftw_real tmp493; fftw_real tmp314; fftw_real tmp484; fftw_real tmp322; fftw_real tmp333; fftw_real tmp342; fftw_real tmp349; fftw_real tmp329; fftw_real tmp332; fftw_real tmp345; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp306; fftw_real tmp336; fftw_real tmp337; fftw_real tmp485; fftw_real tmp310; fftw_real tmp313; ASSERT_ALIGNED_DOUBLE; tmp306 = K707106781 * (tmp304 - tmp305); tmp307 = tmp303 - tmp306; tmp335 = tmp303 + tmp306; tmp336 = (K382683432 * tmp312) - (K923879532 * tmp311); tmp337 = (K923879532 * tmp308) + (K382683432 * tmp309); tmp338 = tmp336 + tmp337; tmp492 = tmp336 - tmp337; tmp485 = K707106781 * (tmp196 - tmp201); tmp487 = tmp485 + tmp486; tmp493 = tmp486 - tmp485; tmp310 = (K382683432 * tmp308) - (K923879532 * tmp309); tmp313 = (K382683432 * tmp311) + (K923879532 * tmp312); tmp314 = tmp310 - tmp313; tmp484 = tmp313 + tmp310; } { fftw_real tmp318; fftw_real tmp321; fftw_real tmp340; fftw_real tmp341; ASSERT_ALIGNED_DOUBLE; tmp318 = tmp316 - tmp317; tmp321 = tmp319 - tmp320; tmp322 = (K195090322 * tmp318) - (K980785280 * tmp321); tmp333 = (K980785280 * tmp318) + (K195090322 * tmp321); tmp340 = tmp316 + tmp317; tmp341 = tmp319 + tmp320; tmp342 = (K831469612 * tmp340) - (K555570233 * tmp341); tmp349 = (K555570233 * tmp340) + (K831469612 * tmp341); } { fftw_real tmp325; fftw_real tmp328; fftw_real tmp343; fftw_real tmp344; ASSERT_ALIGNED_DOUBLE; tmp325 = tmp323 - tmp324; tmp328 = tmp326 - tmp327; tmp329 = (K195090322 * tmp325) + (K980785280 * tmp328); tmp332 = (K195090322 * tmp328) - (K980785280 * tmp325); tmp343 = tmp323 + tmp324; tmp344 = tmp326 + tmp327; tmp345 = (K831469612 * tmp343) + (K555570233 * tmp344); tmp348 = (K831469612 * tmp344) - (K555570233 * tmp343); } { fftw_real tmp315; fftw_real tmp330; fftw_real tmp331; fftw_real tmp334; ASSERT_ALIGNED_DOUBLE; tmp315 = tmp307 - tmp314; tmp330 = tmp322 - tmp329; c_re(inout[31 * iostride]) = tmp315 - tmp330; c_re(inout[15 * iostride]) = tmp315 + tmp330; tmp331 = tmp307 + tmp314; tmp334 = tmp332 + tmp333; c_re(inout[23 * iostride]) = tmp331 - tmp334; c_re(inout[7 * iostride]) = tmp331 + tmp334; } { fftw_real tmp495; fftw_real tmp496; fftw_real tmp491; fftw_real tmp494; ASSERT_ALIGNED_DOUBLE; tmp495 = tmp332 - tmp333; tmp496 = tmp493 - tmp492; c_im(inout[15 * iostride]) = tmp495 + tmp496; c_im(inout[31 * iostride]) = tmp496 - tmp495; tmp491 = tmp329 + tmp322; tmp494 = tmp492 + tmp493; c_im(inout[7 * iostride]) = tmp491 + tmp494; c_im(inout[23 * iostride]) = tmp494 - tmp491; } { fftw_real tmp339; fftw_real tmp346; fftw_real tmp347; fftw_real tmp350; ASSERT_ALIGNED_DOUBLE; tmp339 = tmp335 - tmp338; tmp346 = tmp342 - tmp345; c_re(inout[27 * iostride]) = tmp339 - tmp346; c_re(inout[11 * iostride]) = tmp339 + tmp346; tmp347 = tmp335 + tmp338; tmp350 = tmp348 + tmp349; c_re(inout[19 * iostride]) = tmp347 - tmp350; c_re(inout[3 * iostride]) = tmp347 + tmp350; } { fftw_real tmp489; fftw_real tmp490; fftw_real tmp483; fftw_real tmp488; ASSERT_ALIGNED_DOUBLE; tmp489 = tmp348 - tmp349; tmp490 = tmp487 - tmp484; c_im(inout[11 * iostride]) = tmp489 + tmp490; c_im(inout[27 * iostride]) = tmp490 - tmp489; tmp483 = tmp345 + tmp342; tmp488 = tmp484 + tmp487; c_im(inout[3 * iostride]) = tmp483 + tmp488; c_im(inout[19 * iostride]) = tmp488 - tmp483; } } { fftw_real tmp203; fftw_real tmp287; fftw_real tmp290; fftw_real tmp478; fftw_real tmp473; fftw_real tmp479; fftw_real tmp226; fftw_real tmp468; fftw_real tmp254; fftw_real tmp285; fftw_real tmp294; fftw_real tmp301; fftw_real tmp281; fftw_real tmp284; fftw_real tmp297; fftw_real tmp300; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp202; fftw_real tmp288; fftw_real tmp289; fftw_real tmp469; fftw_real tmp214; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp202 = K707106781 * (tmp196 + tmp201); tmp203 = tmp191 - tmp202; tmp287 = tmp191 + tmp202; tmp288 = (K923879532 * tmp224) - (K382683432 * tmp219); tmp289 = (K382683432 * tmp208) + (K923879532 * tmp213); tmp290 = tmp288 + tmp289; tmp478 = tmp288 - tmp289; tmp469 = K707106781 * (tmp305 + tmp304); tmp473 = tmp469 + tmp472; tmp479 = tmp472 - tmp469; tmp214 = (K923879532 * tmp208) - (K382683432 * tmp213); tmp225 = (K923879532 * tmp219) + (K382683432 * tmp224); tmp226 = tmp214 - tmp225; tmp468 = tmp225 + tmp214; } { fftw_real tmp244; fftw_real tmp253; fftw_real tmp292; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; tmp244 = tmp232 - tmp243; tmp253 = tmp249 - tmp252; tmp254 = (K555570233 * tmp244) - (K831469612 * tmp253); tmp285 = (K831469612 * tmp244) + (K555570233 * tmp253); tmp292 = tmp232 + tmp243; tmp293 = tmp249 + tmp252; tmp294 = (K980785280 * tmp292) - (K195090322 * tmp293); tmp301 = (K195090322 * tmp292) + (K980785280 * tmp293); } { fftw_real tmp271; fftw_real tmp280; fftw_real tmp295; fftw_real tmp296; ASSERT_ALIGNED_DOUBLE; tmp271 = tmp259 - tmp270; tmp280 = tmp276 - tmp279; tmp281 = (K555570233 * tmp271) + (K831469612 * tmp280); tmp284 = (K555570233 * tmp280) - (K831469612 * tmp271); tmp295 = tmp259 + tmp270; tmp296 = tmp276 + tmp279; tmp297 = (K980785280 * tmp295) + (K195090322 * tmp296); tmp300 = (K980785280 * tmp296) - (K195090322 * tmp295); } { fftw_real tmp227; fftw_real tmp282; fftw_real tmp283; fftw_real tmp286; ASSERT_ALIGNED_DOUBLE; tmp227 = tmp203 + tmp226; tmp282 = tmp254 + tmp281; c_re(inout[21 * iostride]) = tmp227 - tmp282; c_re(inout[5 * iostride]) = tmp227 + tmp282; tmp283 = tmp203 - tmp226; tmp286 = tmp284 - tmp285; c_re(inout[29 * iostride]) = tmp283 - tmp286; c_re(inout[13 * iostride]) = tmp283 + tmp286; } { fftw_real tmp477; fftw_real tmp480; fftw_real tmp481; fftw_real tmp482; ASSERT_ALIGNED_DOUBLE; tmp477 = tmp285 + tmp284; tmp480 = tmp478 + tmp479; c_im(inout[5 * iostride]) = tmp477 + tmp480; c_im(inout[21 * iostride]) = tmp480 - tmp477; tmp481 = tmp254 - tmp281; tmp482 = tmp479 - tmp478; c_im(inout[13 * iostride]) = tmp481 + tmp482; c_im(inout[29 * iostride]) = tmp482 - tmp481; } { fftw_real tmp291; fftw_real tmp298; fftw_real tmp299; fftw_real tmp302; ASSERT_ALIGNED_DOUBLE; tmp291 = tmp287 + tmp290; tmp298 = tmp294 + tmp297; c_re(inout[17 * iostride]) = tmp291 - tmp298; c_re(inout[iostride]) = tmp291 + tmp298; tmp299 = tmp287 - tmp290; tmp302 = tmp300 - tmp301; c_re(inout[25 * iostride]) = tmp299 - tmp302; c_re(inout[9 * iostride]) = tmp299 + tmp302; } { fftw_real tmp467; fftw_real tmp474; fftw_real tmp475; fftw_real tmp476; ASSERT_ALIGNED_DOUBLE; tmp467 = tmp301 + tmp300; tmp474 = tmp468 + tmp473; c_im(inout[iostride]) = tmp467 + tmp474; c_im(inout[17 * iostride]) = tmp474 - tmp467; tmp475 = tmp294 - tmp297; tmp476 = tmp473 - tmp468; c_im(inout[9 * iostride]) = tmp475 + tmp476; c_im(inout[25 * iostride]) = tmp476 - tmp475; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; fftw_codelet_desc fftwi_twiddle_32_desc = { "fftwi_twiddle_32", (void (*)()) fftwi_twiddle_32, 32, FFTW_BACKWARD, FFTW_TWIDDLE, 715, 31, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/ftwi_64.c���������������������������������������������������������������������������0000644�0001754�0000144�00000263205�07637527451�010572� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:40 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddleinv 64 */ /* * This function contains 1038 FP additions, 500 FP multiplications, * (or, 808 additions, 270 multiplications, 230 fused multiply/add), * 162 stack variables, and 256 memory accesses */ static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftwi_twiddle_64(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_complex *inout; inout = A; for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 63) { fftw_real tmp19; fftw_real tmp791; fftw_real tmp1109; fftw_real tmp1139; fftw_real tmp1047; fftw_real tmp1077; fftw_real tmp383; fftw_real tmp655; fftw_real tmp66; fftw_real tmp800; fftw_real tmp909; fftw_real tmp993; fftw_real tmp417; fftw_real tmp608; fftw_real tmp665; fftw_real tmp744; fftw_real tmp42; fftw_real tmp1076; fftw_real tmp794; fftw_real tmp1042; fftw_real tmp394; fftw_real tmp1138; fftw_real tmp658; fftw_real tmp1106; fftw_real tmp329; fftw_real tmp1007; fftw_real tmp863; fftw_real tmp923; fftw_real tmp976; fftw_real tmp1004; fftw_real tmp880; fftw_real tmp920; fftw_real tmp535; fftw_real tmp703; fftw_real tmp576; fftw_real tmp714; fftw_real tmp579; fftw_real tmp704; fftw_real tmp546; fftw_real tmp715; fftw_real tmp376; fftw_real tmp1005; fftw_real tmp868; fftw_real tmp881; fftw_real tmp979; fftw_real tmp1008; fftw_real tmp873; fftw_real tmp882; fftw_real tmp558; fftw_real tmp582; fftw_real tmp708; fftw_real tmp718; fftw_real tmp569; fftw_real tmp581; fftw_real tmp711; fftw_real tmp717; fftw_real tmp89; fftw_real tmp805; fftw_real tmp908; fftw_real tmp992; fftw_real tmp406; fftw_real tmp609; fftw_real tmp662; fftw_real tmp745; fftw_real tmp161; fftw_real tmp184; fftw_real tmp997; fftw_real tmp812; fftw_real tmp912; fftw_real tmp956; fftw_real tmp957; fftw_real tmp996; fftw_real tmp817; fftw_real tmp913; fftw_real tmp424; fftw_real tmp668; fftw_real tmp441; fftw_real tmp671; fftw_real tmp444; fftw_real tmp669; fftw_real tmp435; fftw_real tmp672; fftw_real tmp114; fftw_real tmp137; fftw_real tmp999; fftw_real tmp823; fftw_real tmp915; fftw_real tmp959; fftw_real tmp960; fftw_real tmp1000; fftw_real tmp828; fftw_real tmp916; fftw_real tmp451; fftw_real tmp678; fftw_real tmp468; fftw_real tmp675; fftw_real tmp471; fftw_real tmp679; fftw_real tmp462; fftw_real tmp676; fftw_real tmp234; fftw_real tmp1014; fftw_real tmp836; fftw_real tmp930; fftw_real tmp967; fftw_real tmp1011; fftw_real tmp853; fftw_real tmp927; fftw_real tmp480; fftw_real tmp684; fftw_real tmp521; fftw_real tmp695; fftw_real tmp524; fftw_real tmp685; fftw_real tmp491; fftw_real tmp696; fftw_real tmp281; fftw_real tmp1012; fftw_real tmp841; fftw_real tmp854; fftw_real tmp970; fftw_real tmp1015; fftw_real tmp846; fftw_real tmp855; fftw_real tmp503; fftw_real tmp527; fftw_real tmp689; fftw_real tmp699; fftw_real tmp514; fftw_real tmp526; fftw_real tmp692; fftw_real tmp698; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp1045; fftw_real tmp6; fftw_real tmp1044; fftw_real tmp12; fftw_real tmp380; fftw_real tmp17; fftw_real tmp381; ASSERT_ALIGNED_DOUBLE; tmp1 = c_re(inout[0]); tmp1045 = c_im(inout[0]); { fftw_real tmp3; fftw_real tmp5; fftw_real tmp2; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp3 = c_re(inout[32 * iostride]); tmp5 = c_im(inout[32 * iostride]); tmp2 = c_re(W[31]); tmp4 = c_im(W[31]); tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); tmp1044 = (tmp2 * tmp5) - (tmp4 * tmp3); } { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = c_re(inout[16 * iostride]); tmp11 = c_im(inout[16 * iostride]); tmp8 = c_re(W[15]); tmp10 = c_im(W[15]); tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); tmp380 = (tmp8 * tmp11) - (tmp10 * tmp9); } { fftw_real tmp14; fftw_real tmp16; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = c_re(inout[48 * iostride]); tmp16 = c_im(inout[48 * iostride]); tmp13 = c_re(W[47]); tmp15 = c_im(W[47]); tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); tmp381 = (tmp13 * tmp16) - (tmp15 * tmp14); } { fftw_real tmp7; fftw_real tmp18; fftw_real tmp1107; fftw_real tmp1108; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp1 + tmp6; tmp18 = tmp12 + tmp17; tmp19 = tmp7 + tmp18; tmp791 = tmp7 - tmp18; tmp1107 = tmp12 - tmp17; tmp1108 = tmp1045 - tmp1044; tmp1109 = tmp1107 + tmp1108; tmp1139 = tmp1108 - tmp1107; } { fftw_real tmp1043; fftw_real tmp1046; fftw_real tmp379; fftw_real tmp382; ASSERT_ALIGNED_DOUBLE; tmp1043 = tmp380 + tmp381; tmp1046 = tmp1044 + tmp1045; tmp1047 = tmp1043 + tmp1046; tmp1077 = tmp1046 - tmp1043; tmp379 = tmp1 - tmp6; tmp382 = tmp380 - tmp381; tmp383 = tmp379 - tmp382; tmp655 = tmp379 + tmp382; } } { fftw_real tmp54; fftw_real tmp412; fftw_real tmp409; fftw_real tmp797; fftw_real tmp65; fftw_real tmp410; fftw_real tmp415; fftw_real tmp798; fftw_real tmp796; fftw_real tmp799; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp48; fftw_real tmp407; fftw_real tmp53; fftw_real tmp408; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp45; fftw_real tmp47; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp45 = c_re(inout[4 * iostride]); tmp47 = c_im(inout[4 * iostride]); tmp44 = c_re(W[3]); tmp46 = c_im(W[3]); tmp48 = (tmp44 * tmp45) + (tmp46 * tmp47); tmp407 = (tmp44 * tmp47) - (tmp46 * tmp45); } { fftw_real tmp50; fftw_real tmp52; fftw_real tmp49; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = c_re(inout[36 * iostride]); tmp52 = c_im(inout[36 * iostride]); tmp49 = c_re(W[35]); tmp51 = c_im(W[35]); tmp53 = (tmp49 * tmp50) + (tmp51 * tmp52); tmp408 = (tmp49 * tmp52) - (tmp51 * tmp50); } tmp54 = tmp48 + tmp53; tmp412 = tmp48 - tmp53; tmp409 = tmp407 - tmp408; tmp797 = tmp407 + tmp408; } { fftw_real tmp59; fftw_real tmp413; fftw_real tmp64; fftw_real tmp414; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp56; fftw_real tmp58; fftw_real tmp55; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp56 = c_re(inout[20 * iostride]); tmp58 = c_im(inout[20 * iostride]); tmp55 = c_re(W[19]); tmp57 = c_im(W[19]); tmp59 = (tmp55 * tmp56) + (tmp57 * tmp58); tmp413 = (tmp55 * tmp58) - (tmp57 * tmp56); } { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = c_re(inout[52 * iostride]); tmp63 = c_im(inout[52 * iostride]); tmp60 = c_re(W[51]); tmp62 = c_im(W[51]); tmp64 = (tmp60 * tmp61) + (tmp62 * tmp63); tmp414 = (tmp60 * tmp63) - (tmp62 * tmp61); } tmp65 = tmp59 + tmp64; tmp410 = tmp59 - tmp64; tmp415 = tmp413 - tmp414; tmp798 = tmp413 + tmp414; } tmp66 = tmp54 + tmp65; tmp796 = tmp54 - tmp65; tmp799 = tmp797 - tmp798; tmp800 = tmp796 - tmp799; tmp909 = tmp796 + tmp799; tmp993 = tmp797 + tmp798; { fftw_real tmp411; fftw_real tmp416; fftw_real tmp663; fftw_real tmp664; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp409 + tmp410; tmp416 = tmp412 - tmp415; tmp417 = (K923879532 * tmp411) + (K382683432 * tmp416); tmp608 = (K923879532 * tmp416) - (K382683432 * tmp411); tmp663 = tmp409 - tmp410; tmp664 = tmp412 + tmp415; tmp665 = (K382683432 * tmp663) + (K923879532 * tmp664); tmp744 = (K382683432 * tmp664) - (K923879532 * tmp663); } } { fftw_real tmp24; fftw_real tmp385; fftw_real tmp29; fftw_real tmp386; fftw_real tmp384; fftw_real tmp387; fftw_real tmp35; fftw_real tmp390; fftw_real tmp40; fftw_real tmp391; fftw_real tmp389; fftw_real tmp392; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = c_re(inout[8 * iostride]); tmp23 = c_im(inout[8 * iostride]); tmp20 = c_re(W[7]); tmp22 = c_im(W[7]); tmp24 = (tmp20 * tmp21) + (tmp22 * tmp23); tmp385 = (tmp20 * tmp23) - (tmp22 * tmp21); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = c_re(inout[40 * iostride]); tmp28 = c_im(inout[40 * iostride]); tmp25 = c_re(W[39]); tmp27 = c_im(W[39]); tmp29 = (tmp25 * tmp26) + (tmp27 * tmp28); tmp386 = (tmp25 * tmp28) - (tmp27 * tmp26); } tmp384 = tmp24 - tmp29; tmp387 = tmp385 - tmp386; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = c_re(inout[56 * iostride]); tmp34 = c_im(inout[56 * iostride]); tmp31 = c_re(W[55]); tmp33 = c_im(W[55]); tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34); tmp390 = (tmp31 * tmp34) - (tmp33 * tmp32); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = c_re(inout[24 * iostride]); tmp39 = c_im(inout[24 * iostride]); tmp36 = c_re(W[23]); tmp38 = c_im(W[23]); tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39); tmp391 = (tmp36 * tmp39) - (tmp38 * tmp37); } tmp389 = tmp35 - tmp40; tmp392 = tmp390 - tmp391; { fftw_real tmp30; fftw_real tmp41; fftw_real tmp792; fftw_real tmp793; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp24 + tmp29; tmp41 = tmp35 + tmp40; tmp42 = tmp30 + tmp41; tmp1076 = tmp30 - tmp41; tmp792 = tmp390 + tmp391; tmp793 = tmp385 + tmp386; tmp794 = tmp792 - tmp793; tmp1042 = tmp793 + tmp792; } { fftw_real tmp388; fftw_real tmp393; fftw_real tmp656; fftw_real tmp657; ASSERT_ALIGNED_DOUBLE; tmp388 = tmp384 - tmp387; tmp393 = tmp389 + tmp392; tmp394 = K707106781 * (tmp388 + tmp393); tmp1138 = K707106781 * (tmp388 - tmp393); tmp656 = tmp392 - tmp389; tmp657 = tmp384 + tmp387; tmp658 = K707106781 * (tmp656 - tmp657); tmp1106 = K707106781 * (tmp657 + tmp656); } } { fftw_real tmp287; fftw_real tmp572; fftw_real tmp292; fftw_real tmp573; fftw_real tmp293; fftw_real tmp876; fftw_real tmp327; fftw_real tmp541; fftw_real tmp544; fftw_real tmp860; fftw_real tmp298; fftw_real tmp532; fftw_real tmp303; fftw_real tmp533; fftw_real tmp304; fftw_real tmp877; fftw_real tmp316; fftw_real tmp536; fftw_real tmp539; fftw_real tmp861; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp284; fftw_real tmp286; fftw_real tmp283; fftw_real tmp285; ASSERT_ALIGNED_DOUBLE; tmp284 = c_re(inout[63 * iostride]); tmp286 = c_im(inout[63 * iostride]); tmp283 = c_re(W[62]); tmp285 = c_im(W[62]); tmp287 = (tmp283 * tmp284) + (tmp285 * tmp286); tmp572 = (tmp283 * tmp286) - (tmp285 * tmp284); } { fftw_real tmp289; fftw_real tmp291; fftw_real tmp288; fftw_real tmp290; ASSERT_ALIGNED_DOUBLE; tmp289 = c_re(inout[31 * iostride]); tmp291 = c_im(inout[31 * iostride]); tmp288 = c_re(W[30]); tmp290 = c_im(W[30]); tmp292 = (tmp288 * tmp289) + (tmp290 * tmp291); tmp573 = (tmp288 * tmp291) - (tmp290 * tmp289); } tmp293 = tmp287 + tmp292; tmp876 = tmp572 + tmp573; { fftw_real tmp321; fftw_real tmp542; fftw_real tmp326; fftw_real tmp543; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp318; fftw_real tmp320; fftw_real tmp317; fftw_real tmp319; ASSERT_ALIGNED_DOUBLE; tmp318 = c_re(inout[55 * iostride]); tmp320 = c_im(inout[55 * iostride]); tmp317 = c_re(W[54]); tmp319 = c_im(W[54]); tmp321 = (tmp317 * tmp318) + (tmp319 * tmp320); tmp542 = (tmp317 * tmp320) - (tmp319 * tmp318); } { fftw_real tmp323; fftw_real tmp325; fftw_real tmp322; fftw_real tmp324; ASSERT_ALIGNED_DOUBLE; tmp323 = c_re(inout[23 * iostride]); tmp325 = c_im(inout[23 * iostride]); tmp322 = c_re(W[22]); tmp324 = c_im(W[22]); tmp326 = (tmp322 * tmp323) + (tmp324 * tmp325); tmp543 = (tmp322 * tmp325) - (tmp324 * tmp323); } tmp327 = tmp321 + tmp326; tmp541 = tmp321 - tmp326; tmp544 = tmp542 - tmp543; tmp860 = tmp542 + tmp543; } { fftw_real tmp295; fftw_real tmp297; fftw_real tmp294; fftw_real tmp296; ASSERT_ALIGNED_DOUBLE; tmp295 = c_re(inout[15 * iostride]); tmp297 = c_im(inout[15 * iostride]); tmp294 = c_re(W[14]); tmp296 = c_im(W[14]); tmp298 = (tmp294 * tmp295) + (tmp296 * tmp297); tmp532 = (tmp294 * tmp297) - (tmp296 * tmp295); } { fftw_real tmp300; fftw_real tmp302; fftw_real tmp299; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; tmp300 = c_re(inout[47 * iostride]); tmp302 = c_im(inout[47 * iostride]); tmp299 = c_re(W[46]); tmp301 = c_im(W[46]); tmp303 = (tmp299 * tmp300) + (tmp301 * tmp302); tmp533 = (tmp299 * tmp302) - (tmp301 * tmp300); } tmp304 = tmp298 + tmp303; tmp877 = tmp532 + tmp533; { fftw_real tmp310; fftw_real tmp537; fftw_real tmp315; fftw_real tmp538; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp307; fftw_real tmp309; fftw_real tmp306; fftw_real tmp308; ASSERT_ALIGNED_DOUBLE; tmp307 = c_re(inout[7 * iostride]); tmp309 = c_im(inout[7 * iostride]); tmp306 = c_re(W[6]); tmp308 = c_im(W[6]); tmp310 = (tmp306 * tmp307) + (tmp308 * tmp309); tmp537 = (tmp306 * tmp309) - (tmp308 * tmp307); } { fftw_real tmp312; fftw_real tmp314; fftw_real tmp311; fftw_real tmp313; ASSERT_ALIGNED_DOUBLE; tmp312 = c_re(inout[39 * iostride]); tmp314 = c_im(inout[39 * iostride]); tmp311 = c_re(W[38]); tmp313 = c_im(W[38]); tmp315 = (tmp311 * tmp312) + (tmp313 * tmp314); tmp538 = (tmp311 * tmp314) - (tmp313 * tmp312); } tmp316 = tmp310 + tmp315; tmp536 = tmp310 - tmp315; tmp539 = tmp537 - tmp538; tmp861 = tmp537 + tmp538; } { fftw_real tmp305; fftw_real tmp328; fftw_real tmp859; fftw_real tmp862; ASSERT_ALIGNED_DOUBLE; tmp305 = tmp293 + tmp304; tmp328 = tmp316 + tmp327; tmp329 = tmp305 + tmp328; tmp1007 = tmp305 - tmp328; tmp859 = tmp293 - tmp304; tmp862 = tmp860 - tmp861; tmp863 = tmp859 + tmp862; tmp923 = tmp859 - tmp862; } { fftw_real tmp974; fftw_real tmp975; fftw_real tmp878; fftw_real tmp879; ASSERT_ALIGNED_DOUBLE; tmp974 = tmp876 + tmp877; tmp975 = tmp861 + tmp860; tmp976 = tmp974 + tmp975; tmp1004 = tmp974 - tmp975; tmp878 = tmp876 - tmp877; tmp879 = tmp316 - tmp327; tmp880 = tmp878 + tmp879; tmp920 = tmp878 - tmp879; } { fftw_real tmp531; fftw_real tmp534; fftw_real tmp574; fftw_real tmp575; ASSERT_ALIGNED_DOUBLE; tmp531 = tmp287 - tmp292; tmp534 = tmp532 - tmp533; tmp535 = tmp531 - tmp534; tmp703 = tmp531 + tmp534; tmp574 = tmp572 - tmp573; tmp575 = tmp298 - tmp303; tmp576 = tmp574 + tmp575; tmp714 = tmp574 - tmp575; } { fftw_real tmp577; fftw_real tmp578; fftw_real tmp540; fftw_real tmp545; ASSERT_ALIGNED_DOUBLE; tmp577 = tmp536 + tmp539; tmp578 = tmp544 - tmp541; tmp579 = K707106781 * (tmp577 + tmp578); tmp704 = K707106781 * (tmp578 - tmp577); tmp540 = tmp536 - tmp539; tmp545 = tmp541 + tmp544; tmp546 = K707106781 * (tmp540 + tmp545); tmp715 = K707106781 * (tmp540 - tmp545); } } { fftw_real tmp340; fftw_real tmp564; fftw_real tmp561; fftw_real tmp865; fftw_real tmp374; fftw_real tmp551; fftw_real tmp556; fftw_real tmp871; fftw_real tmp351; fftw_real tmp562; fftw_real tmp567; fftw_real tmp866; fftw_real tmp363; fftw_real tmp553; fftw_real tmp550; fftw_real tmp870; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp334; fftw_real tmp559; fftw_real tmp339; fftw_real tmp560; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp331; fftw_real tmp333; fftw_real tmp330; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp331 = c_re(inout[3 * iostride]); tmp333 = c_im(inout[3 * iostride]); tmp330 = c_re(W[2]); tmp332 = c_im(W[2]); tmp334 = (tmp330 * tmp331) + (tmp332 * tmp333); tmp559 = (tmp330 * tmp333) - (tmp332 * tmp331); } { fftw_real tmp336; fftw_real tmp338; fftw_real tmp335; fftw_real tmp337; ASSERT_ALIGNED_DOUBLE; tmp336 = c_re(inout[35 * iostride]); tmp338 = c_im(inout[35 * iostride]); tmp335 = c_re(W[34]); tmp337 = c_im(W[34]); tmp339 = (tmp335 * tmp336) + (tmp337 * tmp338); tmp560 = (tmp335 * tmp338) - (tmp337 * tmp336); } tmp340 = tmp334 + tmp339; tmp564 = tmp334 - tmp339; tmp561 = tmp559 - tmp560; tmp865 = tmp559 + tmp560; } { fftw_real tmp368; fftw_real tmp554; fftw_real tmp373; fftw_real tmp555; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp365; fftw_real tmp367; fftw_real tmp364; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp365 = c_re(inout[11 * iostride]); tmp367 = c_im(inout[11 * iostride]); tmp364 = c_re(W[10]); tmp366 = c_im(W[10]); tmp368 = (tmp364 * tmp365) + (tmp366 * tmp367); tmp554 = (tmp364 * tmp367) - (tmp366 * tmp365); } { fftw_real tmp370; fftw_real tmp372; fftw_real tmp369; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; tmp370 = c_re(inout[43 * iostride]); tmp372 = c_im(inout[43 * iostride]); tmp369 = c_re(W[42]); tmp371 = c_im(W[42]); tmp373 = (tmp369 * tmp370) + (tmp371 * tmp372); tmp555 = (tmp369 * tmp372) - (tmp371 * tmp370); } tmp374 = tmp368 + tmp373; tmp551 = tmp368 - tmp373; tmp556 = tmp554 - tmp555; tmp871 = tmp554 + tmp555; } { fftw_real tmp345; fftw_real tmp565; fftw_real tmp350; fftw_real tmp566; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp342; fftw_real tmp344; fftw_real tmp341; fftw_real tmp343; ASSERT_ALIGNED_DOUBLE; tmp342 = c_re(inout[19 * iostride]); tmp344 = c_im(inout[19 * iostride]); tmp341 = c_re(W[18]); tmp343 = c_im(W[18]); tmp345 = (tmp341 * tmp342) + (tmp343 * tmp344); tmp565 = (tmp341 * tmp344) - (tmp343 * tmp342); } { fftw_real tmp347; fftw_real tmp349; fftw_real tmp346; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; tmp347 = c_re(inout[51 * iostride]); tmp349 = c_im(inout[51 * iostride]); tmp346 = c_re(W[50]); tmp348 = c_im(W[50]); tmp350 = (tmp346 * tmp347) + (tmp348 * tmp349); tmp566 = (tmp346 * tmp349) - (tmp348 * tmp347); } tmp351 = tmp345 + tmp350; tmp562 = tmp345 - tmp350; tmp567 = tmp565 - tmp566; tmp866 = tmp565 + tmp566; } { fftw_real tmp357; fftw_real tmp548; fftw_real tmp362; fftw_real tmp549; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp354; fftw_real tmp356; fftw_real tmp353; fftw_real tmp355; ASSERT_ALIGNED_DOUBLE; tmp354 = c_re(inout[59 * iostride]); tmp356 = c_im(inout[59 * iostride]); tmp353 = c_re(W[58]); tmp355 = c_im(W[58]); tmp357 = (tmp353 * tmp354) + (tmp355 * tmp356); tmp548 = (tmp353 * tmp356) - (tmp355 * tmp354); } { fftw_real tmp359; fftw_real tmp361; fftw_real tmp358; fftw_real tmp360; ASSERT_ALIGNED_DOUBLE; tmp359 = c_re(inout[27 * iostride]); tmp361 = c_im(inout[27 * iostride]); tmp358 = c_re(W[26]); tmp360 = c_im(W[26]); tmp362 = (tmp358 * tmp359) + (tmp360 * tmp361); tmp549 = (tmp358 * tmp361) - (tmp360 * tmp359); } tmp363 = tmp357 + tmp362; tmp553 = tmp357 - tmp362; tmp550 = tmp548 - tmp549; tmp870 = tmp548 + tmp549; } { fftw_real tmp352; fftw_real tmp375; fftw_real tmp864; fftw_real tmp867; ASSERT_ALIGNED_DOUBLE; tmp352 = tmp340 + tmp351; tmp375 = tmp363 + tmp374; tmp376 = tmp352 + tmp375; tmp1005 = tmp352 - tmp375; tmp864 = tmp340 - tmp351; tmp867 = tmp865 - tmp866; tmp868 = tmp864 - tmp867; tmp881 = tmp864 + tmp867; } { fftw_real tmp977; fftw_real tmp978; fftw_real tmp869; fftw_real tmp872; ASSERT_ALIGNED_DOUBLE; tmp977 = tmp865 + tmp866; tmp978 = tmp870 + tmp871; tmp979 = tmp977 + tmp978; tmp1008 = tmp978 - tmp977; tmp869 = tmp363 - tmp374; tmp872 = tmp870 - tmp871; tmp873 = tmp869 + tmp872; tmp882 = tmp872 - tmp869; } { fftw_real tmp552; fftw_real tmp557; fftw_real tmp706; fftw_real tmp707; ASSERT_ALIGNED_DOUBLE; tmp552 = tmp550 + tmp551; tmp557 = tmp553 - tmp556; tmp558 = (K923879532 * tmp552) - (K382683432 * tmp557); tmp582 = (K382683432 * tmp552) + (K923879532 * tmp557); tmp706 = tmp550 - tmp551; tmp707 = tmp553 + tmp556; tmp708 = (K382683432 * tmp706) - (K923879532 * tmp707); tmp718 = (K923879532 * tmp706) + (K382683432 * tmp707); } { fftw_real tmp563; fftw_real tmp568; fftw_real tmp709; fftw_real tmp710; ASSERT_ALIGNED_DOUBLE; tmp563 = tmp561 + tmp562; tmp568 = tmp564 - tmp567; tmp569 = (K923879532 * tmp563) + (K382683432 * tmp568); tmp581 = (K923879532 * tmp568) - (K382683432 * tmp563); tmp709 = tmp561 - tmp562; tmp710 = tmp564 + tmp567; tmp711 = (K382683432 * tmp709) + (K923879532 * tmp710); tmp717 = (K382683432 * tmp710) - (K923879532 * tmp709); } } { fftw_real tmp77; fftw_real tmp401; fftw_real tmp398; fftw_real tmp802; fftw_real tmp88; fftw_real tmp399; fftw_real tmp404; fftw_real tmp803; fftw_real tmp801; fftw_real tmp804; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp71; fftw_real tmp396; fftw_real tmp76; fftw_real tmp397; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp70; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; tmp68 = c_re(inout[60 * iostride]); tmp70 = c_im(inout[60 * iostride]); tmp67 = c_re(W[59]); tmp69 = c_im(W[59]); tmp71 = (tmp67 * tmp68) + (tmp69 * tmp70); tmp396 = (tmp67 * tmp70) - (tmp69 * tmp68); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = c_re(inout[28 * iostride]); tmp75 = c_im(inout[28 * iostride]); tmp72 = c_re(W[27]); tmp74 = c_im(W[27]); tmp76 = (tmp72 * tmp73) + (tmp74 * tmp75); tmp397 = (tmp72 * tmp75) - (tmp74 * tmp73); } tmp77 = tmp71 + tmp76; tmp401 = tmp71 - tmp76; tmp398 = tmp396 - tmp397; tmp802 = tmp396 + tmp397; } { fftw_real tmp82; fftw_real tmp402; fftw_real tmp87; fftw_real tmp403; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = c_re(inout[12 * iostride]); tmp81 = c_im(inout[12 * iostride]); tmp78 = c_re(W[11]); tmp80 = c_im(W[11]); tmp82 = (tmp78 * tmp79) + (tmp80 * tmp81); tmp402 = (tmp78 * tmp81) - (tmp80 * tmp79); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = c_re(inout[44 * iostride]); tmp86 = c_im(inout[44 * iostride]); tmp83 = c_re(W[43]); tmp85 = c_im(W[43]); tmp87 = (tmp83 * tmp84) + (tmp85 * tmp86); tmp403 = (tmp83 * tmp86) - (tmp85 * tmp84); } tmp88 = tmp82 + tmp87; tmp399 = tmp82 - tmp87; tmp404 = tmp402 - tmp403; tmp803 = tmp402 + tmp403; } tmp89 = tmp77 + tmp88; tmp801 = tmp77 - tmp88; tmp804 = tmp802 - tmp803; tmp805 = tmp801 + tmp804; tmp908 = tmp804 - tmp801; tmp992 = tmp802 + tmp803; { fftw_real tmp400; fftw_real tmp405; fftw_real tmp660; fftw_real tmp661; ASSERT_ALIGNED_DOUBLE; tmp400 = tmp398 + tmp399; tmp405 = tmp401 - tmp404; tmp406 = (K923879532 * tmp400) - (K382683432 * tmp405); tmp609 = (K382683432 * tmp400) + (K923879532 * tmp405); tmp660 = tmp398 - tmp399; tmp661 = tmp401 + tmp404; tmp662 = (K382683432 * tmp660) - (K923879532 * tmp661); tmp745 = (K923879532 * tmp660) + (K382683432 * tmp661); } } { fftw_real tmp143; fftw_real tmp420; fftw_real tmp148; fftw_real tmp421; fftw_real tmp149; fftw_real tmp808; fftw_real tmp183; fftw_real tmp433; fftw_real tmp432; fftw_real tmp814; fftw_real tmp154; fftw_real tmp438; fftw_real tmp159; fftw_real tmp439; fftw_real tmp160; fftw_real tmp809; fftw_real tmp172; fftw_real tmp425; fftw_real tmp428; fftw_real tmp815; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp140; fftw_real tmp142; fftw_real tmp139; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; tmp140 = c_re(inout[62 * iostride]); tmp142 = c_im(inout[62 * iostride]); tmp139 = c_re(W[61]); tmp141 = c_im(W[61]); tmp143 = (tmp139 * tmp140) + (tmp141 * tmp142); tmp420 = (tmp139 * tmp142) - (tmp141 * tmp140); } { fftw_real tmp145; fftw_real tmp147; fftw_real tmp144; fftw_real tmp146; ASSERT_ALIGNED_DOUBLE; tmp145 = c_re(inout[30 * iostride]); tmp147 = c_im(inout[30 * iostride]); tmp144 = c_re(W[29]); tmp146 = c_im(W[29]); tmp148 = (tmp144 * tmp145) + (tmp146 * tmp147); tmp421 = (tmp144 * tmp147) - (tmp146 * tmp145); } tmp149 = tmp143 + tmp148; tmp808 = tmp420 + tmp421; { fftw_real tmp177; fftw_real tmp430; fftw_real tmp182; fftw_real tmp431; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp174; fftw_real tmp176; fftw_real tmp173; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; tmp174 = c_re(inout[54 * iostride]); tmp176 = c_im(inout[54 * iostride]); tmp173 = c_re(W[53]); tmp175 = c_im(W[53]); tmp177 = (tmp173 * tmp174) + (tmp175 * tmp176); tmp430 = (tmp173 * tmp176) - (tmp175 * tmp174); } { fftw_real tmp179; fftw_real tmp181; fftw_real tmp178; fftw_real tmp180; ASSERT_ALIGNED_DOUBLE; tmp179 = c_re(inout[22 * iostride]); tmp181 = c_im(inout[22 * iostride]); tmp178 = c_re(W[21]); tmp180 = c_im(W[21]); tmp182 = (tmp178 * tmp179) + (tmp180 * tmp181); tmp431 = (tmp178 * tmp181) - (tmp180 * tmp179); } tmp183 = tmp177 + tmp182; tmp433 = tmp177 - tmp182; tmp432 = tmp430 - tmp431; tmp814 = tmp430 + tmp431; } { fftw_real tmp151; fftw_real tmp153; fftw_real tmp150; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp151 = c_re(inout[14 * iostride]); tmp153 = c_im(inout[14 * iostride]); tmp150 = c_re(W[13]); tmp152 = c_im(W[13]); tmp154 = (tmp150 * tmp151) + (tmp152 * tmp153); tmp438 = (tmp150 * tmp153) - (tmp152 * tmp151); } { fftw_real tmp156; fftw_real tmp158; fftw_real tmp155; fftw_real tmp157; ASSERT_ALIGNED_DOUBLE; tmp156 = c_re(inout[46 * iostride]); tmp158 = c_im(inout[46 * iostride]); tmp155 = c_re(W[45]); tmp157 = c_im(W[45]); tmp159 = (tmp155 * tmp156) + (tmp157 * tmp158); tmp439 = (tmp155 * tmp158) - (tmp157 * tmp156); } tmp160 = tmp154 + tmp159; tmp809 = tmp438 + tmp439; { fftw_real tmp166; fftw_real tmp426; fftw_real tmp171; fftw_real tmp427; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp163; fftw_real tmp165; fftw_real tmp162; fftw_real tmp164; ASSERT_ALIGNED_DOUBLE; tmp163 = c_re(inout[6 * iostride]); tmp165 = c_im(inout[6 * iostride]); tmp162 = c_re(W[5]); tmp164 = c_im(W[5]); tmp166 = (tmp162 * tmp163) + (tmp164 * tmp165); tmp426 = (tmp162 * tmp165) - (tmp164 * tmp163); } { fftw_real tmp168; fftw_real tmp170; fftw_real tmp167; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp168 = c_re(inout[38 * iostride]); tmp170 = c_im(inout[38 * iostride]); tmp167 = c_re(W[37]); tmp169 = c_im(W[37]); tmp171 = (tmp167 * tmp168) + (tmp169 * tmp170); tmp427 = (tmp167 * tmp170) - (tmp169 * tmp168); } tmp172 = tmp166 + tmp171; tmp425 = tmp166 - tmp171; tmp428 = tmp426 - tmp427; tmp815 = tmp426 + tmp427; } { fftw_real tmp810; fftw_real tmp811; fftw_real tmp813; fftw_real tmp816; ASSERT_ALIGNED_DOUBLE; tmp161 = tmp149 + tmp160; tmp184 = tmp172 + tmp183; tmp997 = tmp161 - tmp184; tmp810 = tmp808 - tmp809; tmp811 = tmp172 - tmp183; tmp812 = tmp810 + tmp811; tmp912 = tmp810 - tmp811; tmp956 = tmp808 + tmp809; tmp957 = tmp815 + tmp814; tmp996 = tmp956 - tmp957; tmp813 = tmp149 - tmp160; tmp816 = tmp814 - tmp815; tmp817 = tmp813 + tmp816; tmp913 = tmp813 - tmp816; } { fftw_real tmp422; fftw_real tmp423; fftw_real tmp437; fftw_real tmp440; ASSERT_ALIGNED_DOUBLE; tmp422 = tmp420 - tmp421; tmp423 = tmp154 - tmp159; tmp424 = tmp422 + tmp423; tmp668 = tmp422 - tmp423; tmp437 = tmp143 - tmp148; tmp440 = tmp438 - tmp439; tmp441 = tmp437 - tmp440; tmp671 = tmp437 + tmp440; } { fftw_real tmp442; fftw_real tmp443; fftw_real tmp429; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp442 = tmp425 - tmp428; tmp443 = tmp433 + tmp432; tmp444 = K707106781 * (tmp442 + tmp443); tmp669 = K707106781 * (tmp442 - tmp443); tmp429 = tmp425 + tmp428; tmp434 = tmp432 - tmp433; tmp435 = K707106781 * (tmp429 + tmp434); tmp672 = K707106781 * (tmp434 - tmp429); } } { fftw_real tmp96; fftw_real tmp464; fftw_real tmp101; fftw_real tmp465; fftw_real tmp102; fftw_real tmp819; fftw_real tmp136; fftw_real tmp457; fftw_real tmp460; fftw_real tmp825; fftw_real tmp107; fftw_real tmp448; fftw_real tmp112; fftw_real tmp449; fftw_real tmp113; fftw_real tmp820; fftw_real tmp125; fftw_real tmp452; fftw_real tmp455; fftw_real tmp826; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp93; fftw_real tmp95; fftw_real tmp92; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; tmp93 = c_re(inout[2 * iostride]); tmp95 = c_im(inout[2 * iostride]); tmp92 = c_re(W[1]); tmp94 = c_im(W[1]); tmp96 = (tmp92 * tmp93) + (tmp94 * tmp95); tmp464 = (tmp92 * tmp95) - (tmp94 * tmp93); } { fftw_real tmp98; fftw_real tmp100; fftw_real tmp97; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = c_re(inout[34 * iostride]); tmp100 = c_im(inout[34 * iostride]); tmp97 = c_re(W[33]); tmp99 = c_im(W[33]); tmp101 = (tmp97 * tmp98) + (tmp99 * tmp100); tmp465 = (tmp97 * tmp100) - (tmp99 * tmp98); } tmp102 = tmp96 + tmp101; tmp819 = tmp464 + tmp465; { fftw_real tmp130; fftw_real tmp458; fftw_real tmp135; fftw_real tmp459; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp127; fftw_real tmp129; fftw_real tmp126; fftw_real tmp128; ASSERT_ALIGNED_DOUBLE; tmp127 = c_re(inout[58 * iostride]); tmp129 = c_im(inout[58 * iostride]); tmp126 = c_re(W[57]); tmp128 = c_im(W[57]); tmp130 = (tmp126 * tmp127) + (tmp128 * tmp129); tmp458 = (tmp126 * tmp129) - (tmp128 * tmp127); } { fftw_real tmp132; fftw_real tmp134; fftw_real tmp131; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp132 = c_re(inout[26 * iostride]); tmp134 = c_im(inout[26 * iostride]); tmp131 = c_re(W[25]); tmp133 = c_im(W[25]); tmp135 = (tmp131 * tmp132) + (tmp133 * tmp134); tmp459 = (tmp131 * tmp134) - (tmp133 * tmp132); } tmp136 = tmp130 + tmp135; tmp457 = tmp130 - tmp135; tmp460 = tmp458 - tmp459; tmp825 = tmp458 + tmp459; } { fftw_real tmp104; fftw_real tmp106; fftw_real tmp103; fftw_real tmp105; ASSERT_ALIGNED_DOUBLE; tmp104 = c_re(inout[18 * iostride]); tmp106 = c_im(inout[18 * iostride]); tmp103 = c_re(W[17]); tmp105 = c_im(W[17]); tmp107 = (tmp103 * tmp104) + (tmp105 * tmp106); tmp448 = (tmp103 * tmp106) - (tmp105 * tmp104); } { fftw_real tmp109; fftw_real tmp111; fftw_real tmp108; fftw_real tmp110; ASSERT_ALIGNED_DOUBLE; tmp109 = c_re(inout[50 * iostride]); tmp111 = c_im(inout[50 * iostride]); tmp108 = c_re(W[49]); tmp110 = c_im(W[49]); tmp112 = (tmp108 * tmp109) + (tmp110 * tmp111); tmp449 = (tmp108 * tmp111) - (tmp110 * tmp109); } tmp113 = tmp107 + tmp112; tmp820 = tmp448 + tmp449; { fftw_real tmp119; fftw_real tmp453; fftw_real tmp124; fftw_real tmp454; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp116; fftw_real tmp118; fftw_real tmp115; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp116 = c_re(inout[10 * iostride]); tmp118 = c_im(inout[10 * iostride]); tmp115 = c_re(W[9]); tmp117 = c_im(W[9]); tmp119 = (tmp115 * tmp116) + (tmp117 * tmp118); tmp453 = (tmp115 * tmp118) - (tmp117 * tmp116); } { fftw_real tmp121; fftw_real tmp123; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp121 = c_re(inout[42 * iostride]); tmp123 = c_im(inout[42 * iostride]); tmp120 = c_re(W[41]); tmp122 = c_im(W[41]); tmp124 = (tmp120 * tmp121) + (tmp122 * tmp123); tmp454 = (tmp120 * tmp123) - (tmp122 * tmp121); } tmp125 = tmp119 + tmp124; tmp452 = tmp119 - tmp124; tmp455 = tmp453 - tmp454; tmp826 = tmp453 + tmp454; } { fftw_real tmp821; fftw_real tmp822; fftw_real tmp824; fftw_real tmp827; ASSERT_ALIGNED_DOUBLE; tmp114 = tmp102 + tmp113; tmp137 = tmp125 + tmp136; tmp999 = tmp114 - tmp137; tmp821 = tmp819 - tmp820; tmp822 = tmp125 - tmp136; tmp823 = tmp821 + tmp822; tmp915 = tmp821 - tmp822; tmp959 = tmp819 + tmp820; tmp960 = tmp826 + tmp825; tmp1000 = tmp959 - tmp960; tmp824 = tmp102 - tmp113; tmp827 = tmp825 - tmp826; tmp828 = tmp824 + tmp827; tmp916 = tmp824 - tmp827; } { fftw_real tmp447; fftw_real tmp450; fftw_real tmp466; fftw_real tmp467; ASSERT_ALIGNED_DOUBLE; tmp447 = tmp96 - tmp101; tmp450 = tmp448 - tmp449; tmp451 = tmp447 - tmp450; tmp678 = tmp447 + tmp450; tmp466 = tmp464 - tmp465; tmp467 = tmp107 - tmp112; tmp468 = tmp466 + tmp467; tmp675 = tmp466 - tmp467; } { fftw_real tmp469; fftw_real tmp470; fftw_real tmp456; fftw_real tmp461; ASSERT_ALIGNED_DOUBLE; tmp469 = tmp452 + tmp455; tmp470 = tmp460 - tmp457; tmp471 = K707106781 * (tmp469 + tmp470); tmp679 = K707106781 * (tmp470 - tmp469); tmp456 = tmp452 - tmp455; tmp461 = tmp457 + tmp460; tmp462 = K707106781 * (tmp456 + tmp461); tmp676 = K707106781 * (tmp456 - tmp461); } } { fftw_real tmp192; fftw_real tmp517; fftw_real tmp197; fftw_real tmp518; fftw_real tmp198; fftw_real tmp849; fftw_real tmp232; fftw_real tmp486; fftw_real tmp489; fftw_real tmp833; fftw_real tmp203; fftw_real tmp477; fftw_real tmp208; fftw_real tmp478; fftw_real tmp209; fftw_real tmp850; fftw_real tmp221; fftw_real tmp481; fftw_real tmp484; fftw_real tmp834; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp189; fftw_real tmp191; fftw_real tmp188; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; tmp189 = c_re(inout[iostride]); tmp191 = c_im(inout[iostride]); tmp188 = c_re(W[0]); tmp190 = c_im(W[0]); tmp192 = (tmp188 * tmp189) + (tmp190 * tmp191); tmp517 = (tmp188 * tmp191) - (tmp190 * tmp189); } { fftw_real tmp194; fftw_real tmp196; fftw_real tmp193; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp194 = c_re(inout[33 * iostride]); tmp196 = c_im(inout[33 * iostride]); tmp193 = c_re(W[32]); tmp195 = c_im(W[32]); tmp197 = (tmp193 * tmp194) + (tmp195 * tmp196); tmp518 = (tmp193 * tmp196) - (tmp195 * tmp194); } tmp198 = tmp192 + tmp197; tmp849 = tmp517 + tmp518; { fftw_real tmp226; fftw_real tmp487; fftw_real tmp231; fftw_real tmp488; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp223; fftw_real tmp225; fftw_real tmp222; fftw_real tmp224; ASSERT_ALIGNED_DOUBLE; tmp223 = c_re(inout[57 * iostride]); tmp225 = c_im(inout[57 * iostride]); tmp222 = c_re(W[56]); tmp224 = c_im(W[56]); tmp226 = (tmp222 * tmp223) + (tmp224 * tmp225); tmp487 = (tmp222 * tmp225) - (tmp224 * tmp223); } { fftw_real tmp228; fftw_real tmp230; fftw_real tmp227; fftw_real tmp229; ASSERT_ALIGNED_DOUBLE; tmp228 = c_re(inout[25 * iostride]); tmp230 = c_im(inout[25 * iostride]); tmp227 = c_re(W[24]); tmp229 = c_im(W[24]); tmp231 = (tmp227 * tmp228) + (tmp229 * tmp230); tmp488 = (tmp227 * tmp230) - (tmp229 * tmp228); } tmp232 = tmp226 + tmp231; tmp486 = tmp226 - tmp231; tmp489 = tmp487 - tmp488; tmp833 = tmp487 + tmp488; } { fftw_real tmp200; fftw_real tmp202; fftw_real tmp199; fftw_real tmp201; ASSERT_ALIGNED_DOUBLE; tmp200 = c_re(inout[17 * iostride]); tmp202 = c_im(inout[17 * iostride]); tmp199 = c_re(W[16]); tmp201 = c_im(W[16]); tmp203 = (tmp199 * tmp200) + (tmp201 * tmp202); tmp477 = (tmp199 * tmp202) - (tmp201 * tmp200); } { fftw_real tmp205; fftw_real tmp207; fftw_real tmp204; fftw_real tmp206; ASSERT_ALIGNED_DOUBLE; tmp205 = c_re(inout[49 * iostride]); tmp207 = c_im(inout[49 * iostride]); tmp204 = c_re(W[48]); tmp206 = c_im(W[48]); tmp208 = (tmp204 * tmp205) + (tmp206 * tmp207); tmp478 = (tmp204 * tmp207) - (tmp206 * tmp205); } tmp209 = tmp203 + tmp208; tmp850 = tmp477 + tmp478; { fftw_real tmp215; fftw_real tmp482; fftw_real tmp220; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp212; fftw_real tmp214; fftw_real tmp211; fftw_real tmp213; ASSERT_ALIGNED_DOUBLE; tmp212 = c_re(inout[9 * iostride]); tmp214 = c_im(inout[9 * iostride]); tmp211 = c_re(W[8]); tmp213 = c_im(W[8]); tmp215 = (tmp211 * tmp212) + (tmp213 * tmp214); tmp482 = (tmp211 * tmp214) - (tmp213 * tmp212); } { fftw_real tmp217; fftw_real tmp219; fftw_real tmp216; fftw_real tmp218; ASSERT_ALIGNED_DOUBLE; tmp217 = c_re(inout[41 * iostride]); tmp219 = c_im(inout[41 * iostride]); tmp216 = c_re(W[40]); tmp218 = c_im(W[40]); tmp220 = (tmp216 * tmp217) + (tmp218 * tmp219); tmp483 = (tmp216 * tmp219) - (tmp218 * tmp217); } tmp221 = tmp215 + tmp220; tmp481 = tmp215 - tmp220; tmp484 = tmp482 - tmp483; tmp834 = tmp482 + tmp483; } { fftw_real tmp210; fftw_real tmp233; fftw_real tmp832; fftw_real tmp835; ASSERT_ALIGNED_DOUBLE; tmp210 = tmp198 + tmp209; tmp233 = tmp221 + tmp232; tmp234 = tmp210 + tmp233; tmp1014 = tmp210 - tmp233; tmp832 = tmp198 - tmp209; tmp835 = tmp833 - tmp834; tmp836 = tmp832 + tmp835; tmp930 = tmp832 - tmp835; } { fftw_real tmp965; fftw_real tmp966; fftw_real tmp851; fftw_real tmp852; ASSERT_ALIGNED_DOUBLE; tmp965 = tmp849 + tmp850; tmp966 = tmp834 + tmp833; tmp967 = tmp965 + tmp966; tmp1011 = tmp965 - tmp966; tmp851 = tmp849 - tmp850; tmp852 = tmp221 - tmp232; tmp853 = tmp851 + tmp852; tmp927 = tmp851 - tmp852; } { fftw_real tmp476; fftw_real tmp479; fftw_real tmp519; fftw_real tmp520; ASSERT_ALIGNED_DOUBLE; tmp476 = tmp192 - tmp197; tmp479 = tmp477 - tmp478; tmp480 = tmp476 - tmp479; tmp684 = tmp476 + tmp479; tmp519 = tmp517 - tmp518; tmp520 = tmp203 - tmp208; tmp521 = tmp519 + tmp520; tmp695 = tmp519 - tmp520; } { fftw_real tmp522; fftw_real tmp523; fftw_real tmp485; fftw_real tmp490; ASSERT_ALIGNED_DOUBLE; tmp522 = tmp481 + tmp484; tmp523 = tmp489 - tmp486; tmp524 = K707106781 * (tmp522 + tmp523); tmp685 = K707106781 * (tmp523 - tmp522); tmp485 = tmp481 - tmp484; tmp490 = tmp486 + tmp489; tmp491 = K707106781 * (tmp485 + tmp490); tmp696 = K707106781 * (tmp485 - tmp490); } } { fftw_real tmp245; fftw_real tmp509; fftw_real tmp506; fftw_real tmp838; fftw_real tmp279; fftw_real tmp496; fftw_real tmp501; fftw_real tmp844; fftw_real tmp256; fftw_real tmp507; fftw_real tmp512; fftw_real tmp839; fftw_real tmp268; fftw_real tmp498; fftw_real tmp495; fftw_real tmp843; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp239; fftw_real tmp504; fftw_real tmp244; fftw_real tmp505; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp236; fftw_real tmp238; fftw_real tmp235; fftw_real tmp237; ASSERT_ALIGNED_DOUBLE; tmp236 = c_re(inout[5 * iostride]); tmp238 = c_im(inout[5 * iostride]); tmp235 = c_re(W[4]); tmp237 = c_im(W[4]); tmp239 = (tmp235 * tmp236) + (tmp237 * tmp238); tmp504 = (tmp235 * tmp238) - (tmp237 * tmp236); } { fftw_real tmp241; fftw_real tmp243; fftw_real tmp240; fftw_real tmp242; ASSERT_ALIGNED_DOUBLE; tmp241 = c_re(inout[37 * iostride]); tmp243 = c_im(inout[37 * iostride]); tmp240 = c_re(W[36]); tmp242 = c_im(W[36]); tmp244 = (tmp240 * tmp241) + (tmp242 * tmp243); tmp505 = (tmp240 * tmp243) - (tmp242 * tmp241); } tmp245 = tmp239 + tmp244; tmp509 = tmp239 - tmp244; tmp506 = tmp504 - tmp505; tmp838 = tmp504 + tmp505; } { fftw_real tmp273; fftw_real tmp499; fftw_real tmp278; fftw_real tmp500; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp270; fftw_real tmp272; fftw_real tmp269; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; tmp270 = c_re(inout[13 * iostride]); tmp272 = c_im(inout[13 * iostride]); tmp269 = c_re(W[12]); tmp271 = c_im(W[12]); tmp273 = (tmp269 * tmp270) + (tmp271 * tmp272); tmp499 = (tmp269 * tmp272) - (tmp271 * tmp270); } { fftw_real tmp275; fftw_real tmp277; fftw_real tmp274; fftw_real tmp276; ASSERT_ALIGNED_DOUBLE; tmp275 = c_re(inout[45 * iostride]); tmp277 = c_im(inout[45 * iostride]); tmp274 = c_re(W[44]); tmp276 = c_im(W[44]); tmp278 = (tmp274 * tmp275) + (tmp276 * tmp277); tmp500 = (tmp274 * tmp277) - (tmp276 * tmp275); } tmp279 = tmp273 + tmp278; tmp496 = tmp273 - tmp278; tmp501 = tmp499 - tmp500; tmp844 = tmp499 + tmp500; } { fftw_real tmp250; fftw_real tmp510; fftw_real tmp255; fftw_real tmp511; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp247; fftw_real tmp249; fftw_real tmp246; fftw_real tmp248; ASSERT_ALIGNED_DOUBLE; tmp247 = c_re(inout[21 * iostride]); tmp249 = c_im(inout[21 * iostride]); tmp246 = c_re(W[20]); tmp248 = c_im(W[20]); tmp250 = (tmp246 * tmp247) + (tmp248 * tmp249); tmp510 = (tmp246 * tmp249) - (tmp248 * tmp247); } { fftw_real tmp252; fftw_real tmp254; fftw_real tmp251; fftw_real tmp253; ASSERT_ALIGNED_DOUBLE; tmp252 = c_re(inout[53 * iostride]); tmp254 = c_im(inout[53 * iostride]); tmp251 = c_re(W[52]); tmp253 = c_im(W[52]); tmp255 = (tmp251 * tmp252) + (tmp253 * tmp254); tmp511 = (tmp251 * tmp254) - (tmp253 * tmp252); } tmp256 = tmp250 + tmp255; tmp507 = tmp250 - tmp255; tmp512 = tmp510 - tmp511; tmp839 = tmp510 + tmp511; } { fftw_real tmp262; fftw_real tmp493; fftw_real tmp267; fftw_real tmp494; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp259; fftw_real tmp261; fftw_real tmp258; fftw_real tmp260; ASSERT_ALIGNED_DOUBLE; tmp259 = c_re(inout[61 * iostride]); tmp261 = c_im(inout[61 * iostride]); tmp258 = c_re(W[60]); tmp260 = c_im(W[60]); tmp262 = (tmp258 * tmp259) + (tmp260 * tmp261); tmp493 = (tmp258 * tmp261) - (tmp260 * tmp259); } { fftw_real tmp264; fftw_real tmp266; fftw_real tmp263; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; tmp264 = c_re(inout[29 * iostride]); tmp266 = c_im(inout[29 * iostride]); tmp263 = c_re(W[28]); tmp265 = c_im(W[28]); tmp267 = (tmp263 * tmp264) + (tmp265 * tmp266); tmp494 = (tmp263 * tmp266) - (tmp265 * tmp264); } tmp268 = tmp262 + tmp267; tmp498 = tmp262 - tmp267; tmp495 = tmp493 - tmp494; tmp843 = tmp493 + tmp494; } { fftw_real tmp257; fftw_real tmp280; fftw_real tmp837; fftw_real tmp840; ASSERT_ALIGNED_DOUBLE; tmp257 = tmp245 + tmp256; tmp280 = tmp268 + tmp279; tmp281 = tmp257 + tmp280; tmp1012 = tmp257 - tmp280; tmp837 = tmp245 - tmp256; tmp840 = tmp838 - tmp839; tmp841 = tmp837 - tmp840; tmp854 = tmp837 + tmp840; } { fftw_real tmp968; fftw_real tmp969; fftw_real tmp842; fftw_real tmp845; ASSERT_ALIGNED_DOUBLE; tmp968 = tmp838 + tmp839; tmp969 = tmp843 + tmp844; tmp970 = tmp968 + tmp969; tmp1015 = tmp969 - tmp968; tmp842 = tmp268 - tmp279; tmp845 = tmp843 - tmp844; tmp846 = tmp842 + tmp845; tmp855 = tmp845 - tmp842; } { fftw_real tmp497; fftw_real tmp502; fftw_real tmp687; fftw_real tmp688; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp495 + tmp496; tmp502 = tmp498 - tmp501; tmp503 = (K923879532 * tmp497) - (K382683432 * tmp502); tmp527 = (K382683432 * tmp497) + (K923879532 * tmp502); tmp687 = tmp495 - tmp496; tmp688 = tmp498 + tmp501; tmp689 = (K382683432 * tmp687) - (K923879532 * tmp688); tmp699 = (K923879532 * tmp687) + (K382683432 * tmp688); } { fftw_real tmp508; fftw_real tmp513; fftw_real tmp690; fftw_real tmp691; ASSERT_ALIGNED_DOUBLE; tmp508 = tmp506 + tmp507; tmp513 = tmp509 - tmp512; tmp514 = (K923879532 * tmp508) + (K382683432 * tmp513); tmp526 = (K923879532 * tmp513) - (K382683432 * tmp508); tmp690 = tmp506 - tmp507; tmp691 = tmp509 + tmp512; tmp692 = (K382683432 * tmp690) + (K923879532 * tmp691); tmp698 = (K382683432 * tmp691) - (K923879532 * tmp690); } } { fftw_real tmp91; fftw_real tmp955; fftw_real tmp990; fftw_real tmp1039; fftw_real tmp1049; fftw_real tmp1055; fftw_real tmp186; fftw_real tmp1054; fftw_real tmp972; fftw_real tmp985; fftw_real tmp378; fftw_real tmp1051; fftw_real tmp981; fftw_real tmp984; fftw_real tmp962; fftw_real tmp1040; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp90; fftw_real tmp988; fftw_real tmp989; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp19 + tmp42; tmp90 = tmp66 + tmp89; tmp91 = tmp43 + tmp90; tmp955 = tmp43 - tmp90; tmp988 = tmp976 + tmp979; tmp989 = tmp967 + tmp970; tmp990 = tmp988 - tmp989; tmp1039 = tmp989 + tmp988; } { fftw_real tmp1041; fftw_real tmp1048; fftw_real tmp138; fftw_real tmp185; ASSERT_ALIGNED_DOUBLE; tmp1041 = tmp993 + tmp992; tmp1048 = tmp1042 + tmp1047; tmp1049 = tmp1041 + tmp1048; tmp1055 = tmp1048 - tmp1041; tmp138 = tmp114 + tmp137; tmp185 = tmp161 + tmp184; tmp186 = tmp138 + tmp185; tmp1054 = tmp138 - tmp185; } { fftw_real tmp964; fftw_real tmp971; fftw_real tmp282; fftw_real tmp377; ASSERT_ALIGNED_DOUBLE; tmp964 = tmp234 - tmp281; tmp971 = tmp967 - tmp970; tmp972 = tmp964 - tmp971; tmp985 = tmp964 + tmp971; tmp282 = tmp234 + tmp281; tmp377 = tmp329 + tmp376; tmp378 = tmp282 + tmp377; tmp1051 = tmp282 - tmp377; } { fftw_real tmp973; fftw_real tmp980; fftw_real tmp958; fftw_real tmp961; ASSERT_ALIGNED_DOUBLE; tmp973 = tmp329 - tmp376; tmp980 = tmp976 - tmp979; tmp981 = tmp973 + tmp980; tmp984 = tmp980 - tmp973; tmp958 = tmp956 + tmp957; tmp961 = tmp959 + tmp960; tmp962 = tmp958 - tmp961; tmp1040 = tmp961 + tmp958; } { fftw_real tmp187; fftw_real tmp987; fftw_real tmp1050; fftw_real tmp1052; ASSERT_ALIGNED_DOUBLE; tmp187 = tmp91 + tmp186; c_re(inout[32 * iostride]) = tmp187 - tmp378; c_re(inout[0]) = tmp187 + tmp378; tmp987 = tmp91 - tmp186; c_re(inout[48 * iostride]) = tmp987 - tmp990; c_re(inout[16 * iostride]) = tmp987 + tmp990; { fftw_real tmp963; fftw_real tmp982; fftw_real tmp1057; fftw_real tmp1058; ASSERT_ALIGNED_DOUBLE; tmp963 = tmp955 + tmp962; tmp982 = K707106781 * (tmp972 + tmp981); c_re(inout[40 * iostride]) = tmp963 - tmp982; c_re(inout[8 * iostride]) = tmp963 + tmp982; tmp1057 = K707106781 * (tmp972 - tmp981); tmp1058 = tmp1055 - tmp1054; c_im(inout[24 * iostride]) = tmp1057 + tmp1058; c_im(inout[56 * iostride]) = tmp1058 - tmp1057; } tmp1050 = tmp1040 + tmp1049; c_im(inout[0]) = tmp1039 + tmp1050; c_im(inout[32 * iostride]) = tmp1050 - tmp1039; tmp1052 = tmp1049 - tmp1040; c_im(inout[16 * iostride]) = tmp1051 + tmp1052; c_im(inout[48 * iostride]) = tmp1052 - tmp1051; { fftw_real tmp1053; fftw_real tmp1056; fftw_real tmp983; fftw_real tmp986; ASSERT_ALIGNED_DOUBLE; tmp1053 = K707106781 * (tmp985 + tmp984); tmp1056 = tmp1054 + tmp1055; c_im(inout[8 * iostride]) = tmp1053 + tmp1056; c_im(inout[40 * iostride]) = tmp1056 - tmp1053; tmp983 = tmp955 - tmp962; tmp986 = K707106781 * (tmp984 - tmp985); c_re(inout[56 * iostride]) = tmp983 - tmp986; c_re(inout[24 * iostride]) = tmp983 + tmp986; } } } { fftw_real tmp995; fftw_real tmp1023; fftw_real tmp1026; fftw_real tmp1068; fftw_real tmp1002; fftw_real tmp1060; fftw_real tmp1063; fftw_real tmp1069; fftw_real tmp1010; fftw_real tmp1021; fftw_real tmp1030; fftw_real tmp1037; fftw_real tmp1017; fftw_real tmp1020; fftw_real tmp1033; fftw_real tmp1036; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp991; fftw_real tmp994; fftw_real tmp1024; fftw_real tmp1025; ASSERT_ALIGNED_DOUBLE; tmp991 = tmp19 - tmp42; tmp994 = tmp992 - tmp993; tmp995 = tmp991 - tmp994; tmp1023 = tmp991 + tmp994; tmp1024 = tmp999 - tmp1000; tmp1025 = tmp997 + tmp996; tmp1026 = K707106781 * (tmp1024 + tmp1025); tmp1068 = K707106781 * (tmp1024 - tmp1025); } { fftw_real tmp998; fftw_real tmp1001; fftw_real tmp1061; fftw_real tmp1062; ASSERT_ALIGNED_DOUBLE; tmp998 = tmp996 - tmp997; tmp1001 = tmp999 + tmp1000; tmp1002 = K707106781 * (tmp998 - tmp1001); tmp1060 = K707106781 * (tmp1001 + tmp998); tmp1061 = tmp66 - tmp89; tmp1062 = tmp1047 - tmp1042; tmp1063 = tmp1061 + tmp1062; tmp1069 = tmp1062 - tmp1061; } { fftw_real tmp1006; fftw_real tmp1009; fftw_real tmp1028; fftw_real tmp1029; ASSERT_ALIGNED_DOUBLE; tmp1006 = tmp1004 - tmp1005; tmp1009 = tmp1007 - tmp1008; tmp1010 = (K382683432 * tmp1006) - (K923879532 * tmp1009); tmp1021 = (K923879532 * tmp1006) + (K382683432 * tmp1009); tmp1028 = tmp1004 + tmp1005; tmp1029 = tmp1007 + tmp1008; tmp1030 = (K923879532 * tmp1028) - (K382683432 * tmp1029); tmp1037 = (K382683432 * tmp1028) + (K923879532 * tmp1029); } { fftw_real tmp1013; fftw_real tmp1016; fftw_real tmp1031; fftw_real tmp1032; ASSERT_ALIGNED_DOUBLE; tmp1013 = tmp1011 - tmp1012; tmp1016 = tmp1014 - tmp1015; tmp1017 = (K382683432 * tmp1013) + (K923879532 * tmp1016); tmp1020 = (K382683432 * tmp1016) - (K923879532 * tmp1013); tmp1031 = tmp1011 + tmp1012; tmp1032 = tmp1014 + tmp1015; tmp1033 = (K923879532 * tmp1031) + (K382683432 * tmp1032); tmp1036 = (K923879532 * tmp1032) - (K382683432 * tmp1031); } { fftw_real tmp1003; fftw_real tmp1018; fftw_real tmp1019; fftw_real tmp1022; ASSERT_ALIGNED_DOUBLE; tmp1003 = tmp995 - tmp1002; tmp1018 = tmp1010 - tmp1017; c_re(inout[60 * iostride]) = tmp1003 - tmp1018; c_re(inout[28 * iostride]) = tmp1003 + tmp1018; tmp1019 = tmp995 + tmp1002; tmp1022 = tmp1020 + tmp1021; c_re(inout[44 * iostride]) = tmp1019 - tmp1022; c_re(inout[12 * iostride]) = tmp1019 + tmp1022; } { fftw_real tmp1071; fftw_real tmp1072; fftw_real tmp1067; fftw_real tmp1070; ASSERT_ALIGNED_DOUBLE; tmp1071 = tmp1020 - tmp1021; tmp1072 = tmp1069 - tmp1068; c_im(inout[28 * iostride]) = tmp1071 + tmp1072; c_im(inout[60 * iostride]) = tmp1072 - tmp1071; tmp1067 = tmp1017 + tmp1010; tmp1070 = tmp1068 + tmp1069; c_im(inout[12 * iostride]) = tmp1067 + tmp1070; c_im(inout[44 * iostride]) = tmp1070 - tmp1067; } { fftw_real tmp1027; fftw_real tmp1034; fftw_real tmp1035; fftw_real tmp1038; ASSERT_ALIGNED_DOUBLE; tmp1027 = tmp1023 - tmp1026; tmp1034 = tmp1030 - tmp1033; c_re(inout[52 * iostride]) = tmp1027 - tmp1034; c_re(inout[20 * iostride]) = tmp1027 + tmp1034; tmp1035 = tmp1023 + tmp1026; tmp1038 = tmp1036 + tmp1037; c_re(inout[36 * iostride]) = tmp1035 - tmp1038; c_re(inout[4 * iostride]) = tmp1035 + tmp1038; } { fftw_real tmp1065; fftw_real tmp1066; fftw_real tmp1059; fftw_real tmp1064; ASSERT_ALIGNED_DOUBLE; tmp1065 = tmp1036 - tmp1037; tmp1066 = tmp1063 - tmp1060; c_im(inout[20 * iostride]) = tmp1065 + tmp1066; c_im(inout[52 * iostride]) = tmp1066 - tmp1065; tmp1059 = tmp1033 + tmp1030; tmp1064 = tmp1060 + tmp1063; c_im(inout[4 * iostride]) = tmp1059 + tmp1064; c_im(inout[36 * iostride]) = tmp1064 - tmp1059; } } { fftw_real tmp419; fftw_real tmp591; fftw_real tmp1125; fftw_real tmp1131; fftw_real tmp474; fftw_real tmp1122; fftw_real tmp594; fftw_real tmp1130; fftw_real tmp530; fftw_real tmp589; fftw_real tmp598; fftw_real tmp605; fftw_real tmp585; fftw_real tmp588; fftw_real tmp601; fftw_real tmp604; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp395; fftw_real tmp418; fftw_real tmp1123; fftw_real tmp1124; ASSERT_ALIGNED_DOUBLE; tmp395 = tmp383 - tmp394; tmp418 = tmp406 - tmp417; tmp419 = tmp395 - tmp418; tmp591 = tmp395 + tmp418; tmp1123 = tmp608 - tmp609; tmp1124 = tmp1109 - tmp1106; tmp1125 = tmp1123 + tmp1124; tmp1131 = tmp1124 - tmp1123; } { fftw_real tmp446; fftw_real tmp593; fftw_real tmp473; fftw_real tmp592; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp436; fftw_real tmp445; fftw_real tmp463; fftw_real tmp472; ASSERT_ALIGNED_DOUBLE; tmp436 = tmp424 - tmp435; tmp445 = tmp441 - tmp444; tmp446 = (K555570233 * tmp436) - (K831469612 * tmp445); tmp593 = (K555570233 * tmp445) + (K831469612 * tmp436); tmp463 = tmp451 - tmp462; tmp472 = tmp468 - tmp471; tmp473 = (K831469612 * tmp463) + (K555570233 * tmp472); tmp592 = (K555570233 * tmp463) - (K831469612 * tmp472); } tmp474 = tmp446 - tmp473; tmp1122 = tmp473 + tmp446; tmp594 = tmp592 + tmp593; tmp1130 = tmp592 - tmp593; } { fftw_real tmp516; fftw_real tmp596; fftw_real tmp529; fftw_real tmp597; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp492; fftw_real tmp515; fftw_real tmp525; fftw_real tmp528; ASSERT_ALIGNED_DOUBLE; tmp492 = tmp480 - tmp491; tmp515 = tmp503 - tmp514; tmp516 = tmp492 - tmp515; tmp596 = tmp492 + tmp515; tmp525 = tmp521 - tmp524; tmp528 = tmp526 - tmp527; tmp529 = tmp525 - tmp528; tmp597 = tmp525 + tmp528; } tmp530 = (K290284677 * tmp516) - (K956940335 * tmp529); tmp589 = (K956940335 * tmp516) + (K290284677 * tmp529); tmp598 = (K881921264 * tmp596) - (K471396736 * tmp597); tmp605 = (K471396736 * tmp596) + (K881921264 * tmp597); } { fftw_real tmp571; fftw_real tmp599; fftw_real tmp584; fftw_real tmp600; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp547; fftw_real tmp570; fftw_real tmp580; fftw_real tmp583; ASSERT_ALIGNED_DOUBLE; tmp547 = tmp535 - tmp546; tmp570 = tmp558 - tmp569; tmp571 = tmp547 - tmp570; tmp599 = tmp547 + tmp570; tmp580 = tmp576 - tmp579; tmp583 = tmp581 - tmp582; tmp584 = tmp580 - tmp583; tmp600 = tmp580 + tmp583; } tmp585 = (K290284677 * tmp571) + (K956940335 * tmp584); tmp588 = (K290284677 * tmp584) - (K956940335 * tmp571); tmp601 = (K881921264 * tmp599) + (K471396736 * tmp600); tmp604 = (K881921264 * tmp600) - (K471396736 * tmp599); } { fftw_real tmp475; fftw_real tmp586; fftw_real tmp587; fftw_real tmp590; ASSERT_ALIGNED_DOUBLE; tmp475 = tmp419 + tmp474; tmp586 = tmp530 + tmp585; c_re(inout[45 * iostride]) = tmp475 - tmp586; c_re(inout[13 * iostride]) = tmp475 + tmp586; tmp587 = tmp419 - tmp474; tmp590 = tmp588 - tmp589; c_re(inout[61 * iostride]) = tmp587 - tmp590; c_re(inout[29 * iostride]) = tmp587 + tmp590; } { fftw_real tmp1129; fftw_real tmp1132; fftw_real tmp1133; fftw_real tmp1134; ASSERT_ALIGNED_DOUBLE; tmp1129 = tmp589 + tmp588; tmp1132 = tmp1130 + tmp1131; c_im(inout[13 * iostride]) = tmp1129 + tmp1132; c_im(inout[45 * iostride]) = tmp1132 - tmp1129; tmp1133 = tmp530 - tmp585; tmp1134 = tmp1131 - tmp1130; c_im(inout[29 * iostride]) = tmp1133 + tmp1134; c_im(inout[61 * iostride]) = tmp1134 - tmp1133; } { fftw_real tmp595; fftw_real tmp602; fftw_real tmp603; fftw_real tmp606; ASSERT_ALIGNED_DOUBLE; tmp595 = tmp591 + tmp594; tmp602 = tmp598 + tmp601; c_re(inout[37 * iostride]) = tmp595 - tmp602; c_re(inout[5 * iostride]) = tmp595 + tmp602; tmp603 = tmp591 - tmp594; tmp606 = tmp604 - tmp605; c_re(inout[53 * iostride]) = tmp603 - tmp606; c_re(inout[21 * iostride]) = tmp603 + tmp606; } { fftw_real tmp1121; fftw_real tmp1126; fftw_real tmp1127; fftw_real tmp1128; ASSERT_ALIGNED_DOUBLE; tmp1121 = tmp605 + tmp604; tmp1126 = tmp1122 + tmp1125; c_im(inout[5 * iostride]) = tmp1121 + tmp1126; c_im(inout[37 * iostride]) = tmp1126 - tmp1121; tmp1127 = tmp598 - tmp601; tmp1128 = tmp1125 - tmp1122; c_im(inout[21 * iostride]) = tmp1127 + tmp1128; c_im(inout[53 * iostride]) = tmp1128 - tmp1127; } } { fftw_real tmp611; fftw_real tmp639; fftw_real tmp1111; fftw_real tmp1117; fftw_real tmp618; fftw_real tmp1104; fftw_real tmp642; fftw_real tmp1116; fftw_real tmp626; fftw_real tmp637; fftw_real tmp646; fftw_real tmp653; fftw_real tmp633; fftw_real tmp636; fftw_real tmp649; fftw_real tmp652; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp607; fftw_real tmp610; fftw_real tmp1105; fftw_real tmp1110; ASSERT_ALIGNED_DOUBLE; tmp607 = tmp383 + tmp394; tmp610 = tmp608 + tmp609; tmp611 = tmp607 - tmp610; tmp639 = tmp607 + tmp610; tmp1105 = tmp417 + tmp406; tmp1110 = tmp1106 + tmp1109; tmp1111 = tmp1105 + tmp1110; tmp1117 = tmp1110 - tmp1105; } { fftw_real tmp614; fftw_real tmp641; fftw_real tmp617; fftw_real tmp640; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp612; fftw_real tmp613; fftw_real tmp615; fftw_real tmp616; ASSERT_ALIGNED_DOUBLE; tmp612 = tmp424 + tmp435; tmp613 = tmp441 + tmp444; tmp614 = (K980785280 * tmp612) - (K195090322 * tmp613); tmp641 = (K980785280 * tmp613) + (K195090322 * tmp612); tmp615 = tmp451 + tmp462; tmp616 = tmp468 + tmp471; tmp617 = (K195090322 * tmp615) + (K980785280 * tmp616); tmp640 = (K980785280 * tmp615) - (K195090322 * tmp616); } tmp618 = tmp614 - tmp617; tmp1104 = tmp617 + tmp614; tmp642 = tmp640 + tmp641; tmp1116 = tmp640 - tmp641; } { fftw_real tmp622; fftw_real tmp644; fftw_real tmp625; fftw_real tmp645; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp620; fftw_real tmp621; fftw_real tmp623; fftw_real tmp624; ASSERT_ALIGNED_DOUBLE; tmp620 = tmp576 + tmp579; tmp621 = tmp569 + tmp558; tmp622 = tmp620 - tmp621; tmp644 = tmp620 + tmp621; tmp623 = tmp535 + tmp546; tmp624 = tmp581 + tmp582; tmp625 = tmp623 - tmp624; tmp645 = tmp623 + tmp624; } tmp626 = (K634393284 * tmp622) - (K773010453 * tmp625); tmp637 = (K773010453 * tmp622) + (K634393284 * tmp625); tmp646 = (K995184726 * tmp644) - (K098017140 * tmp645); tmp653 = (K098017140 * tmp644) + (K995184726 * tmp645); } { fftw_real tmp629; fftw_real tmp647; fftw_real tmp632; fftw_real tmp648; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp627; fftw_real tmp628; fftw_real tmp630; fftw_real tmp631; ASSERT_ALIGNED_DOUBLE; tmp627 = tmp521 + tmp524; tmp628 = tmp514 + tmp503; tmp629 = tmp627 - tmp628; tmp647 = tmp627 + tmp628; tmp630 = tmp480 + tmp491; tmp631 = tmp526 + tmp527; tmp632 = tmp630 - tmp631; tmp648 = tmp630 + tmp631; } tmp633 = (K634393284 * tmp629) + (K773010453 * tmp632); tmp636 = (K634393284 * tmp632) - (K773010453 * tmp629); tmp649 = (K995184726 * tmp647) + (K098017140 * tmp648); tmp652 = (K995184726 * tmp648) - (K098017140 * tmp647); } { fftw_real tmp619; fftw_real tmp634; fftw_real tmp635; fftw_real tmp638; ASSERT_ALIGNED_DOUBLE; tmp619 = tmp611 - tmp618; tmp634 = tmp626 - tmp633; c_re(inout[57 * iostride]) = tmp619 - tmp634; c_re(inout[25 * iostride]) = tmp619 + tmp634; tmp635 = tmp611 + tmp618; tmp638 = tmp636 + tmp637; c_re(inout[41 * iostride]) = tmp635 - tmp638; c_re(inout[9 * iostride]) = tmp635 + tmp638; } { fftw_real tmp1119; fftw_real tmp1120; fftw_real tmp1115; fftw_real tmp1118; ASSERT_ALIGNED_DOUBLE; tmp1119 = tmp636 - tmp637; tmp1120 = tmp1117 - tmp1116; c_im(inout[25 * iostride]) = tmp1119 + tmp1120; c_im(inout[57 * iostride]) = tmp1120 - tmp1119; tmp1115 = tmp633 + tmp626; tmp1118 = tmp1116 + tmp1117; c_im(inout[9 * iostride]) = tmp1115 + tmp1118; c_im(inout[41 * iostride]) = tmp1118 - tmp1115; } { fftw_real tmp643; fftw_real tmp650; fftw_real tmp651; fftw_real tmp654; ASSERT_ALIGNED_DOUBLE; tmp643 = tmp639 - tmp642; tmp650 = tmp646 - tmp649; c_re(inout[49 * iostride]) = tmp643 - tmp650; c_re(inout[17 * iostride]) = tmp643 + tmp650; tmp651 = tmp639 + tmp642; tmp654 = tmp652 + tmp653; c_re(inout[33 * iostride]) = tmp651 - tmp654; c_re(inout[iostride]) = tmp651 + tmp654; } { fftw_real tmp1113; fftw_real tmp1114; fftw_real tmp1103; fftw_real tmp1112; ASSERT_ALIGNED_DOUBLE; tmp1113 = tmp652 - tmp653; tmp1114 = tmp1111 - tmp1104; c_im(inout[17 * iostride]) = tmp1113 + tmp1114; c_im(inout[49 * iostride]) = tmp1114 - tmp1113; tmp1103 = tmp649 + tmp646; tmp1112 = tmp1104 + tmp1111; c_im(inout[iostride]) = tmp1103 + tmp1112; c_im(inout[33 * iostride]) = tmp1112 - tmp1103; } } { fftw_real tmp807; fftw_real tmp891; fftw_real tmp830; fftw_real tmp1074; fftw_real tmp1079; fftw_real tmp1085; fftw_real tmp894; fftw_real tmp1084; fftw_real tmp885; fftw_real tmp888; fftw_real tmp901; fftw_real tmp904; fftw_real tmp858; fftw_real tmp889; fftw_real tmp898; fftw_real tmp905; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp795; fftw_real tmp806; fftw_real tmp892; fftw_real tmp893; ASSERT_ALIGNED_DOUBLE; tmp795 = tmp791 + tmp794; tmp806 = K707106781 * (tmp800 + tmp805); tmp807 = tmp795 - tmp806; tmp891 = tmp795 + tmp806; { fftw_real tmp818; fftw_real tmp829; fftw_real tmp1075; fftw_real tmp1078; ASSERT_ALIGNED_DOUBLE; tmp818 = (K923879532 * tmp812) - (K382683432 * tmp817); tmp829 = (K923879532 * tmp823) + (K382683432 * tmp828); tmp830 = tmp818 - tmp829; tmp1074 = tmp829 + tmp818; tmp1075 = K707106781 * (tmp909 + tmp908); tmp1078 = tmp1076 + tmp1077; tmp1079 = tmp1075 + tmp1078; tmp1085 = tmp1078 - tmp1075; } tmp892 = (K923879532 * tmp828) - (K382683432 * tmp823); tmp893 = (K382683432 * tmp812) + (K923879532 * tmp817); tmp894 = tmp892 + tmp893; tmp1084 = tmp892 - tmp893; { fftw_real tmp875; fftw_real tmp899; fftw_real tmp884; fftw_real tmp900; fftw_real tmp874; fftw_real tmp883; ASSERT_ALIGNED_DOUBLE; tmp874 = K707106781 * (tmp868 + tmp873); tmp875 = tmp863 - tmp874; tmp899 = tmp863 + tmp874; tmp883 = K707106781 * (tmp881 + tmp882); tmp884 = tmp880 - tmp883; tmp900 = tmp880 + tmp883; tmp885 = (K555570233 * tmp875) + (K831469612 * tmp884); tmp888 = (K555570233 * tmp884) - (K831469612 * tmp875); tmp901 = (K980785280 * tmp899) + (K195090322 * tmp900); tmp904 = (K980785280 * tmp900) - (K195090322 * tmp899); } { fftw_real tmp848; fftw_real tmp896; fftw_real tmp857; fftw_real tmp897; fftw_real tmp847; fftw_real tmp856; ASSERT_ALIGNED_DOUBLE; tmp847 = K707106781 * (tmp841 + tmp846); tmp848 = tmp836 - tmp847; tmp896 = tmp836 + tmp847; tmp856 = K707106781 * (tmp854 + tmp855); tmp857 = tmp853 - tmp856; tmp897 = tmp853 + tmp856; tmp858 = (K555570233 * tmp848) - (K831469612 * tmp857); tmp889 = (K831469612 * tmp848) + (K555570233 * tmp857); tmp898 = (K980785280 * tmp896) - (K195090322 * tmp897); tmp905 = (K195090322 * tmp896) + (K980785280 * tmp897); } } { fftw_real tmp831; fftw_real tmp886; fftw_real tmp887; fftw_real tmp890; ASSERT_ALIGNED_DOUBLE; tmp831 = tmp807 + tmp830; tmp886 = tmp858 + tmp885; c_re(inout[42 * iostride]) = tmp831 - tmp886; c_re(inout[10 * iostride]) = tmp831 + tmp886; tmp887 = tmp807 - tmp830; tmp890 = tmp888 - tmp889; c_re(inout[58 * iostride]) = tmp887 - tmp890; c_re(inout[26 * iostride]) = tmp887 + tmp890; } { fftw_real tmp1083; fftw_real tmp1086; fftw_real tmp1087; fftw_real tmp1088; ASSERT_ALIGNED_DOUBLE; tmp1083 = tmp889 + tmp888; tmp1086 = tmp1084 + tmp1085; c_im(inout[10 * iostride]) = tmp1083 + tmp1086; c_im(inout[42 * iostride]) = tmp1086 - tmp1083; tmp1087 = tmp858 - tmp885; tmp1088 = tmp1085 - tmp1084; c_im(inout[26 * iostride]) = tmp1087 + tmp1088; c_im(inout[58 * iostride]) = tmp1088 - tmp1087; } { fftw_real tmp895; fftw_real tmp902; fftw_real tmp903; fftw_real tmp906; ASSERT_ALIGNED_DOUBLE; tmp895 = tmp891 + tmp894; tmp902 = tmp898 + tmp901; c_re(inout[34 * iostride]) = tmp895 - tmp902; c_re(inout[2 * iostride]) = tmp895 + tmp902; tmp903 = tmp891 - tmp894; tmp906 = tmp904 - tmp905; c_re(inout[50 * iostride]) = tmp903 - tmp906; c_re(inout[18 * iostride]) = tmp903 + tmp906; } { fftw_real tmp1073; fftw_real tmp1080; fftw_real tmp1081; fftw_real tmp1082; ASSERT_ALIGNED_DOUBLE; tmp1073 = tmp905 + tmp904; tmp1080 = tmp1074 + tmp1079; c_im(inout[2 * iostride]) = tmp1073 + tmp1080; c_im(inout[34 * iostride]) = tmp1080 - tmp1073; tmp1081 = tmp898 - tmp901; tmp1082 = tmp1079 - tmp1074; c_im(inout[18 * iostride]) = tmp1081 + tmp1082; c_im(inout[50 * iostride]) = tmp1082 - tmp1081; } } { fftw_real tmp911; fftw_real tmp939; fftw_real tmp918; fftw_real tmp1090; fftw_real tmp1093; fftw_real tmp1099; fftw_real tmp942; fftw_real tmp1098; fftw_real tmp933; fftw_real tmp936; fftw_real tmp949; fftw_real tmp952; fftw_real tmp926; fftw_real tmp937; fftw_real tmp946; fftw_real tmp953; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp907; fftw_real tmp910; fftw_real tmp940; fftw_real tmp941; ASSERT_ALIGNED_DOUBLE; tmp907 = tmp791 - tmp794; tmp910 = K707106781 * (tmp908 - tmp909); tmp911 = tmp907 - tmp910; tmp939 = tmp907 + tmp910; { fftw_real tmp914; fftw_real tmp917; fftw_real tmp1091; fftw_real tmp1092; ASSERT_ALIGNED_DOUBLE; tmp914 = (K382683432 * tmp912) - (K923879532 * tmp913); tmp917 = (K382683432 * tmp915) + (K923879532 * tmp916); tmp918 = tmp914 - tmp917; tmp1090 = tmp917 + tmp914; tmp1091 = K707106781 * (tmp800 - tmp805); tmp1092 = tmp1077 - tmp1076; tmp1093 = tmp1091 + tmp1092; tmp1099 = tmp1092 - tmp1091; } tmp940 = (K382683432 * tmp916) - (K923879532 * tmp915); tmp941 = (K923879532 * tmp912) + (K382683432 * tmp913); tmp942 = tmp940 + tmp941; tmp1098 = tmp940 - tmp941; { fftw_real tmp929; fftw_real tmp947; fftw_real tmp932; fftw_real tmp948; fftw_real tmp928; fftw_real tmp931; ASSERT_ALIGNED_DOUBLE; tmp928 = K707106781 * (tmp841 - tmp846); tmp929 = tmp927 - tmp928; tmp947 = tmp927 + tmp928; tmp931 = K707106781 * (tmp855 - tmp854); tmp932 = tmp930 - tmp931; tmp948 = tmp930 + tmp931; tmp933 = (K195090322 * tmp929) + (K980785280 * tmp932); tmp936 = (K195090322 * tmp932) - (K980785280 * tmp929); tmp949 = (K831469612 * tmp947) + (K555570233 * tmp948); tmp952 = (K831469612 * tmp948) - (K555570233 * tmp947); } { fftw_real tmp922; fftw_real tmp944; fftw_real tmp925; fftw_real tmp945; fftw_real tmp921; fftw_real tmp924; ASSERT_ALIGNED_DOUBLE; tmp921 = K707106781 * (tmp868 - tmp873); tmp922 = tmp920 - tmp921; tmp944 = tmp920 + tmp921; tmp924 = K707106781 * (tmp882 - tmp881); tmp925 = tmp923 - tmp924; tmp945 = tmp923 + tmp924; tmp926 = (K195090322 * tmp922) - (K980785280 * tmp925); tmp937 = (K980785280 * tmp922) + (K195090322 * tmp925); tmp946 = (K831469612 * tmp944) - (K555570233 * tmp945); tmp953 = (K555570233 * tmp944) + (K831469612 * tmp945); } } { fftw_real tmp919; fftw_real tmp934; fftw_real tmp935; fftw_real tmp938; ASSERT_ALIGNED_DOUBLE; tmp919 = tmp911 - tmp918; tmp934 = tmp926 - tmp933; c_re(inout[62 * iostride]) = tmp919 - tmp934; c_re(inout[30 * iostride]) = tmp919 + tmp934; tmp935 = tmp911 + tmp918; tmp938 = tmp936 + tmp937; c_re(inout[46 * iostride]) = tmp935 - tmp938; c_re(inout[14 * iostride]) = tmp935 + tmp938; } { fftw_real tmp1101; fftw_real tmp1102; fftw_real tmp1097; fftw_real tmp1100; ASSERT_ALIGNED_DOUBLE; tmp1101 = tmp936 - tmp937; tmp1102 = tmp1099 - tmp1098; c_im(inout[30 * iostride]) = tmp1101 + tmp1102; c_im(inout[62 * iostride]) = tmp1102 - tmp1101; tmp1097 = tmp933 + tmp926; tmp1100 = tmp1098 + tmp1099; c_im(inout[14 * iostride]) = tmp1097 + tmp1100; c_im(inout[46 * iostride]) = tmp1100 - tmp1097; } { fftw_real tmp943; fftw_real tmp950; fftw_real tmp951; fftw_real tmp954; ASSERT_ALIGNED_DOUBLE; tmp943 = tmp939 - tmp942; tmp950 = tmp946 - tmp949; c_re(inout[54 * iostride]) = tmp943 - tmp950; c_re(inout[22 * iostride]) = tmp943 + tmp950; tmp951 = tmp939 + tmp942; tmp954 = tmp952 + tmp953; c_re(inout[38 * iostride]) = tmp951 - tmp954; c_re(inout[6 * iostride]) = tmp951 + tmp954; } { fftw_real tmp1095; fftw_real tmp1096; fftw_real tmp1089; fftw_real tmp1094; ASSERT_ALIGNED_DOUBLE; tmp1095 = tmp952 - tmp953; tmp1096 = tmp1093 - tmp1090; c_im(inout[22 * iostride]) = tmp1095 + tmp1096; c_im(inout[54 * iostride]) = tmp1096 - tmp1095; tmp1089 = tmp949 + tmp946; tmp1094 = tmp1090 + tmp1093; c_im(inout[6 * iostride]) = tmp1089 + tmp1094; c_im(inout[38 * iostride]) = tmp1094 - tmp1089; } } { fftw_real tmp667; fftw_real tmp727; fftw_real tmp1155; fftw_real tmp1161; fftw_real tmp682; fftw_real tmp1152; fftw_real tmp730; fftw_real tmp1160; fftw_real tmp702; fftw_real tmp725; fftw_real tmp734; fftw_real tmp741; fftw_real tmp721; fftw_real tmp724; fftw_real tmp737; fftw_real tmp740; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp659; fftw_real tmp666; fftw_real tmp1153; fftw_real tmp1154; ASSERT_ALIGNED_DOUBLE; tmp659 = tmp655 - tmp658; tmp666 = tmp662 - tmp665; tmp667 = tmp659 - tmp666; tmp727 = tmp659 + tmp666; tmp1153 = tmp744 - tmp745; tmp1154 = tmp1139 - tmp1138; tmp1155 = tmp1153 + tmp1154; tmp1161 = tmp1154 - tmp1153; } { fftw_real tmp674; fftw_real tmp729; fftw_real tmp681; fftw_real tmp728; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp670; fftw_real tmp673; fftw_real tmp677; fftw_real tmp680; ASSERT_ALIGNED_DOUBLE; tmp670 = tmp668 - tmp669; tmp673 = tmp671 - tmp672; tmp674 = (K195090322 * tmp670) - (K980785280 * tmp673); tmp729 = (K980785280 * tmp670) + (K195090322 * tmp673); tmp677 = tmp675 - tmp676; tmp680 = tmp678 - tmp679; tmp681 = (K195090322 * tmp677) + (K980785280 * tmp680); tmp728 = (K195090322 * tmp680) - (K980785280 * tmp677); } tmp682 = tmp674 - tmp681; tmp1152 = tmp681 + tmp674; tmp730 = tmp728 + tmp729; tmp1160 = tmp728 - tmp729; } { fftw_real tmp694; fftw_real tmp732; fftw_real tmp701; fftw_real tmp733; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp686; fftw_real tmp693; fftw_real tmp697; fftw_real tmp700; ASSERT_ALIGNED_DOUBLE; tmp686 = tmp684 - tmp685; tmp693 = tmp689 - tmp692; tmp694 = tmp686 - tmp693; tmp732 = tmp686 + tmp693; tmp697 = tmp695 - tmp696; tmp700 = tmp698 - tmp699; tmp701 = tmp697 - tmp700; tmp733 = tmp697 + tmp700; } tmp702 = (K098017140 * tmp694) - (K995184726 * tmp701); tmp725 = (K995184726 * tmp694) + (K098017140 * tmp701); tmp734 = (K773010453 * tmp732) - (K634393284 * tmp733); tmp741 = (K634393284 * tmp732) + (K773010453 * tmp733); } { fftw_real tmp713; fftw_real tmp735; fftw_real tmp720; fftw_real tmp736; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp705; fftw_real tmp712; fftw_real tmp716; fftw_real tmp719; ASSERT_ALIGNED_DOUBLE; tmp705 = tmp703 - tmp704; tmp712 = tmp708 - tmp711; tmp713 = tmp705 - tmp712; tmp735 = tmp705 + tmp712; tmp716 = tmp714 - tmp715; tmp719 = tmp717 - tmp718; tmp720 = tmp716 - tmp719; tmp736 = tmp716 + tmp719; } tmp721 = (K098017140 * tmp713) + (K995184726 * tmp720); tmp724 = (K098017140 * tmp720) - (K995184726 * tmp713); tmp737 = (K773010453 * tmp735) + (K634393284 * tmp736); tmp740 = (K773010453 * tmp736) - (K634393284 * tmp735); } { fftw_real tmp683; fftw_real tmp722; fftw_real tmp723; fftw_real tmp726; ASSERT_ALIGNED_DOUBLE; tmp683 = tmp667 + tmp682; tmp722 = tmp702 + tmp721; c_re(inout[47 * iostride]) = tmp683 - tmp722; c_re(inout[15 * iostride]) = tmp683 + tmp722; tmp723 = tmp667 - tmp682; tmp726 = tmp724 - tmp725; c_re(inout[63 * iostride]) = tmp723 - tmp726; c_re(inout[31 * iostride]) = tmp723 + tmp726; } { fftw_real tmp1159; fftw_real tmp1162; fftw_real tmp1163; fftw_real tmp1164; ASSERT_ALIGNED_DOUBLE; tmp1159 = tmp725 + tmp724; tmp1162 = tmp1160 + tmp1161; c_im(inout[15 * iostride]) = tmp1159 + tmp1162; c_im(inout[47 * iostride]) = tmp1162 - tmp1159; tmp1163 = tmp702 - tmp721; tmp1164 = tmp1161 - tmp1160; c_im(inout[31 * iostride]) = tmp1163 + tmp1164; c_im(inout[63 * iostride]) = tmp1164 - tmp1163; } { fftw_real tmp731; fftw_real tmp738; fftw_real tmp739; fftw_real tmp742; ASSERT_ALIGNED_DOUBLE; tmp731 = tmp727 + tmp730; tmp738 = tmp734 + tmp737; c_re(inout[39 * iostride]) = tmp731 - tmp738; c_re(inout[7 * iostride]) = tmp731 + tmp738; tmp739 = tmp727 - tmp730; tmp742 = tmp740 - tmp741; c_re(inout[55 * iostride]) = tmp739 - tmp742; c_re(inout[23 * iostride]) = tmp739 + tmp742; } { fftw_real tmp1151; fftw_real tmp1156; fftw_real tmp1157; fftw_real tmp1158; ASSERT_ALIGNED_DOUBLE; tmp1151 = tmp741 + tmp740; tmp1156 = tmp1152 + tmp1155; c_im(inout[7 * iostride]) = tmp1151 + tmp1156; c_im(inout[39 * iostride]) = tmp1156 - tmp1151; tmp1157 = tmp734 - tmp737; tmp1158 = tmp1155 - tmp1152; c_im(inout[23 * iostride]) = tmp1157 + tmp1158; c_im(inout[55 * iostride]) = tmp1158 - tmp1157; } } { fftw_real tmp747; fftw_real tmp775; fftw_real tmp1141; fftw_real tmp1147; fftw_real tmp754; fftw_real tmp1136; fftw_real tmp778; fftw_real tmp1146; fftw_real tmp762; fftw_real tmp773; fftw_real tmp782; fftw_real tmp789; fftw_real tmp769; fftw_real tmp772; fftw_real tmp785; fftw_real tmp788; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp743; fftw_real tmp746; fftw_real tmp1137; fftw_real tmp1140; ASSERT_ALIGNED_DOUBLE; tmp743 = tmp655 + tmp658; tmp746 = tmp744 + tmp745; tmp747 = tmp743 - tmp746; tmp775 = tmp743 + tmp746; tmp1137 = tmp665 + tmp662; tmp1140 = tmp1138 + tmp1139; tmp1141 = tmp1137 + tmp1140; tmp1147 = tmp1140 - tmp1137; } { fftw_real tmp750; fftw_real tmp777; fftw_real tmp753; fftw_real tmp776; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp748; fftw_real tmp749; fftw_real tmp751; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp748 = tmp668 + tmp669; tmp749 = tmp671 + tmp672; tmp750 = (K831469612 * tmp748) - (K555570233 * tmp749); tmp777 = (K555570233 * tmp748) + (K831469612 * tmp749); tmp751 = tmp675 + tmp676; tmp752 = tmp678 + tmp679; tmp753 = (K831469612 * tmp751) + (K555570233 * tmp752); tmp776 = (K831469612 * tmp752) - (K555570233 * tmp751); } tmp754 = tmp750 - tmp753; tmp1136 = tmp753 + tmp750; tmp778 = tmp776 + tmp777; tmp1146 = tmp776 - tmp777; } { fftw_real tmp758; fftw_real tmp780; fftw_real tmp761; fftw_real tmp781; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp756; fftw_real tmp757; fftw_real tmp759; fftw_real tmp760; ASSERT_ALIGNED_DOUBLE; tmp756 = tmp714 + tmp715; tmp757 = tmp711 + tmp708; tmp758 = tmp756 - tmp757; tmp780 = tmp756 + tmp757; tmp759 = tmp703 + tmp704; tmp760 = tmp717 + tmp718; tmp761 = tmp759 - tmp760; tmp781 = tmp759 + tmp760; } tmp762 = (K471396736 * tmp758) - (K881921264 * tmp761); tmp773 = (K881921264 * tmp758) + (K471396736 * tmp761); tmp782 = (K956940335 * tmp780) - (K290284677 * tmp781); tmp789 = (K290284677 * tmp780) + (K956940335 * tmp781); } { fftw_real tmp765; fftw_real tmp783; fftw_real tmp768; fftw_real tmp784; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp763; fftw_real tmp764; fftw_real tmp766; fftw_real tmp767; ASSERT_ALIGNED_DOUBLE; tmp763 = tmp695 + tmp696; tmp764 = tmp692 + tmp689; tmp765 = tmp763 - tmp764; tmp783 = tmp763 + tmp764; tmp766 = tmp684 + tmp685; tmp767 = tmp698 + tmp699; tmp768 = tmp766 - tmp767; tmp784 = tmp766 + tmp767; } tmp769 = (K471396736 * tmp765) + (K881921264 * tmp768); tmp772 = (K471396736 * tmp768) - (K881921264 * tmp765); tmp785 = (K956940335 * tmp783) + (K290284677 * tmp784); tmp788 = (K956940335 * tmp784) - (K290284677 * tmp783); } { fftw_real tmp755; fftw_real tmp770; fftw_real tmp771; fftw_real tmp774; ASSERT_ALIGNED_DOUBLE; tmp755 = tmp747 - tmp754; tmp770 = tmp762 - tmp769; c_re(inout[59 * iostride]) = tmp755 - tmp770; c_re(inout[27 * iostride]) = tmp755 + tmp770; tmp771 = tmp747 + tmp754; tmp774 = tmp772 + tmp773; c_re(inout[43 * iostride]) = tmp771 - tmp774; c_re(inout[11 * iostride]) = tmp771 + tmp774; } { fftw_real tmp1149; fftw_real tmp1150; fftw_real tmp1145; fftw_real tmp1148; ASSERT_ALIGNED_DOUBLE; tmp1149 = tmp772 - tmp773; tmp1150 = tmp1147 - tmp1146; c_im(inout[27 * iostride]) = tmp1149 + tmp1150; c_im(inout[59 * iostride]) = tmp1150 - tmp1149; tmp1145 = tmp769 + tmp762; tmp1148 = tmp1146 + tmp1147; c_im(inout[11 * iostride]) = tmp1145 + tmp1148; c_im(inout[43 * iostride]) = tmp1148 - tmp1145; } { fftw_real tmp779; fftw_real tmp786; fftw_real tmp787; fftw_real tmp790; ASSERT_ALIGNED_DOUBLE; tmp779 = tmp775 - tmp778; tmp786 = tmp782 - tmp785; c_re(inout[51 * iostride]) = tmp779 - tmp786; c_re(inout[19 * iostride]) = tmp779 + tmp786; tmp787 = tmp775 + tmp778; tmp790 = tmp788 + tmp789; c_re(inout[35 * iostride]) = tmp787 - tmp790; c_re(inout[3 * iostride]) = tmp787 + tmp790; } { fftw_real tmp1143; fftw_real tmp1144; fftw_real tmp1135; fftw_real tmp1142; ASSERT_ALIGNED_DOUBLE; tmp1143 = tmp788 - tmp789; tmp1144 = tmp1141 - tmp1136; c_im(inout[19 * iostride]) = tmp1143 + tmp1144; c_im(inout[51 * iostride]) = tmp1144 - tmp1143; tmp1135 = tmp785 + tmp782; tmp1142 = tmp1136 + tmp1141; c_im(inout[3 * iostride]) = tmp1135 + tmp1142; c_im(inout[35 * iostride]) = tmp1142 - tmp1135; } } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }; fftw_codelet_desc fftwi_twiddle_64_desc = { "fftwi_twiddle_64", (void (*)()) fftwi_twiddle_64, 64, FFTW_BACKWARD, FFTW_TWIDDLE, 1419, 63, twiddle_order, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/timer.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000007315�07635206062�010414� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * timer.c -- this file measures the execution time of * ffts. This information is used by the planner. */ /* $Id: timer.c,v 1.45 2003/03/16 23:43:46 stevenj Exp $ */ #include #include "fftw-int.h" #include #include /********************* System-specific Timing Support *********************/ #if defined(HAVE_MAC_TIMER) && !defined(HAVE_MAC_PCI_TIMER) /* Use Macintosh Time Manager to get the time: */ /* * make sure compiler (CW) recognizes the pascal keywords that are in * Timer.h */ #pragma only_std_keywords off #include #pragma only_std_keywords reset fftw_time get_Mac_microseconds(void) { fftw_time t; UnsignedWide microsec; /* * microsec.lo and microsec.hi are * unsigned long's, and are the two parts * of a 64 bit unsigned integer */ Microseconds(µsec); /* get time in microseconds */ /* store lo and hi words into our structure: */ t.lo = microsec.lo; t.hi = microsec.hi; return t; } fftw_time fftw_time_diff(fftw_time t1, fftw_time t2) /* * This function takes the difference t1 - t2 of two 64 bit * integers, represented by the 32 bit lo and hi words. * if t1 < t2, returns 0. */ { fftw_time diff; if (t1.hi < t2.hi) { /* something is wrong...t1 < t2! */ diff.hi = diff.lo = 0; return diff; } else diff.hi = t1.hi - t2.hi; if (t1.lo < t2.lo) { if (diff.hi > 0) diff.hi -= 1; /* carry */ else { /* something is wrong...t1 < t2! */ diff.hi = diff.lo = 0; return diff; } } diff.lo = t1.lo - t2.lo; return diff; } #endif #ifdef HAVE_WIN32_TIMER #include static LARGE_INTEGER gFreq; static int gHaveHiResTimer = 0; static int gFirstTime = 1; unsigned long GetPerfTime(void) { LARGE_INTEGER lCounter; if (gFirstTime) { gFirstTime = 0; if (QueryPerformanceFrequency(&gFreq)) { gHaveHiResTimer = 1; } } if (gHaveHiResTimer) { QueryPerformanceCounter(&lCounter); return lCounter.u.LowPart; } else { return (unsigned long) clock(); } } double GetPerfSec(double pTime) { if (gHaveHiResTimer) { return pTime / gFreq.u.LowPart; // assumes HighPart==0 } else { return pTime / CLOCKS_PER_SEC; } } #endif /* HAVE_WIN32_TIMER */ #if defined(FFTW_USE_GETTIMEOFDAY) /* timer support routines for systems having gettimeofday */ #if defined(HAVE_BSDGETTIMEOFDAY) && ! defined(HAVE_GETTIMEOFDAY) #define gettimeofday BSDgettimeofday #endif fftw_time fftw_gettimeofday_get_time(void) { struct timeval tv; gettimeofday(&tv, 0); return tv; } fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2) { fftw_time diff; diff.tv_sec = t1.tv_sec - t2.tv_sec; diff.tv_usec = t1.tv_usec - t2.tv_usec; /* normalize */ while (diff.tv_usec < 0) { diff.tv_usec += 1000000L; diff.tv_sec -= 1; } return diff; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/config.c����������������������������������������������������������������������������0000644�0001754�0000144�00000013154�07637527464�010555� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* config.c -- this file contains all the codelets the system knows about */ /* $Id: config_prelude,v 1.7 2000/03/02 21:58:53 stevenj Exp $ */ #include "fftw-int.h" /* the signature is the same as the size, for now */ #define NOTW_CODELET(x) \ &fftw_no_twiddle_##x##_desc #define NOTWI_CODELET(x) \ &fftwi_no_twiddle_##x##_desc #define TWIDDLE_CODELET(x) \ &fftw_twiddle_##x##_desc #define TWIDDLEI_CODELET(x) \ &fftwi_twiddle_##x##_desc /* automatically-generated list of codelets */ extern fftw_codelet_desc fftw_no_twiddle_1_desc; extern fftw_codelet_desc fftwi_no_twiddle_1_desc; extern fftw_codelet_desc fftw_no_twiddle_2_desc; extern fftw_codelet_desc fftwi_no_twiddle_2_desc; extern fftw_codelet_desc fftw_no_twiddle_3_desc; extern fftw_codelet_desc fftwi_no_twiddle_3_desc; extern fftw_codelet_desc fftw_no_twiddle_4_desc; extern fftw_codelet_desc fftwi_no_twiddle_4_desc; extern fftw_codelet_desc fftw_no_twiddle_5_desc; extern fftw_codelet_desc fftwi_no_twiddle_5_desc; extern fftw_codelet_desc fftw_no_twiddle_6_desc; extern fftw_codelet_desc fftwi_no_twiddle_6_desc; extern fftw_codelet_desc fftw_no_twiddle_7_desc; extern fftw_codelet_desc fftwi_no_twiddle_7_desc; extern fftw_codelet_desc fftw_no_twiddle_8_desc; extern fftw_codelet_desc fftwi_no_twiddle_8_desc; extern fftw_codelet_desc fftw_no_twiddle_9_desc; extern fftw_codelet_desc fftwi_no_twiddle_9_desc; extern fftw_codelet_desc fftw_no_twiddle_10_desc; extern fftw_codelet_desc fftwi_no_twiddle_10_desc; extern fftw_codelet_desc fftw_no_twiddle_11_desc; extern fftw_codelet_desc fftwi_no_twiddle_11_desc; extern fftw_codelet_desc fftw_no_twiddle_12_desc; extern fftw_codelet_desc fftwi_no_twiddle_12_desc; extern fftw_codelet_desc fftw_no_twiddle_13_desc; extern fftw_codelet_desc fftwi_no_twiddle_13_desc; extern fftw_codelet_desc fftw_no_twiddle_14_desc; extern fftw_codelet_desc fftwi_no_twiddle_14_desc; extern fftw_codelet_desc fftw_no_twiddle_15_desc; extern fftw_codelet_desc fftwi_no_twiddle_15_desc; extern fftw_codelet_desc fftw_no_twiddle_16_desc; extern fftw_codelet_desc fftwi_no_twiddle_16_desc; extern fftw_codelet_desc fftw_no_twiddle_32_desc; extern fftw_codelet_desc fftwi_no_twiddle_32_desc; extern fftw_codelet_desc fftw_no_twiddle_64_desc; extern fftw_codelet_desc fftwi_no_twiddle_64_desc; extern fftw_codelet_desc fftw_twiddle_2_desc; extern fftw_codelet_desc fftwi_twiddle_2_desc; extern fftw_codelet_desc fftw_twiddle_3_desc; extern fftw_codelet_desc fftwi_twiddle_3_desc; extern fftw_codelet_desc fftw_twiddle_4_desc; extern fftw_codelet_desc fftwi_twiddle_4_desc; extern fftw_codelet_desc fftw_twiddle_5_desc; extern fftw_codelet_desc fftwi_twiddle_5_desc; extern fftw_codelet_desc fftw_twiddle_6_desc; extern fftw_codelet_desc fftwi_twiddle_6_desc; extern fftw_codelet_desc fftw_twiddle_7_desc; extern fftw_codelet_desc fftwi_twiddle_7_desc; extern fftw_codelet_desc fftw_twiddle_8_desc; extern fftw_codelet_desc fftwi_twiddle_8_desc; extern fftw_codelet_desc fftw_twiddle_9_desc; extern fftw_codelet_desc fftwi_twiddle_9_desc; extern fftw_codelet_desc fftw_twiddle_10_desc; extern fftw_codelet_desc fftwi_twiddle_10_desc; extern fftw_codelet_desc fftw_twiddle_16_desc; extern fftw_codelet_desc fftwi_twiddle_16_desc; extern fftw_codelet_desc fftw_twiddle_32_desc; extern fftw_codelet_desc fftwi_twiddle_32_desc; extern fftw_codelet_desc fftw_twiddle_64_desc; extern fftw_codelet_desc fftwi_twiddle_64_desc; fftw_codelet_desc *fftw_config[] = { NOTW_CODELET(1), NOTWI_CODELET(1), NOTW_CODELET(2), NOTWI_CODELET(2), NOTW_CODELET(3), NOTWI_CODELET(3), NOTW_CODELET(4), NOTWI_CODELET(4), NOTW_CODELET(5), NOTWI_CODELET(5), NOTW_CODELET(6), NOTWI_CODELET(6), NOTW_CODELET(7), NOTWI_CODELET(7), NOTW_CODELET(8), NOTWI_CODELET(8), NOTW_CODELET(9), NOTWI_CODELET(9), NOTW_CODELET(10), NOTWI_CODELET(10), NOTW_CODELET(11), NOTWI_CODELET(11), NOTW_CODELET(12), NOTWI_CODELET(12), NOTW_CODELET(13), NOTWI_CODELET(13), NOTW_CODELET(14), NOTWI_CODELET(14), NOTW_CODELET(15), NOTWI_CODELET(15), NOTW_CODELET(16), NOTWI_CODELET(16), NOTW_CODELET(32), NOTWI_CODELET(32), NOTW_CODELET(64), NOTWI_CODELET(64), TWIDDLE_CODELET(2), TWIDDLEI_CODELET(2), TWIDDLE_CODELET(3), TWIDDLEI_CODELET(3), TWIDDLE_CODELET(4), TWIDDLEI_CODELET(4), TWIDDLE_CODELET(5), TWIDDLEI_CODELET(5), TWIDDLE_CODELET(6), TWIDDLEI_CODELET(6), TWIDDLE_CODELET(7), TWIDDLEI_CODELET(7), TWIDDLE_CODELET(8), TWIDDLEI_CODELET(8), TWIDDLE_CODELET(9), TWIDDLEI_CODELET(9), TWIDDLE_CODELET(10), TWIDDLEI_CODELET(10), TWIDDLE_CODELET(16), TWIDDLEI_CODELET(16), TWIDDLE_CODELET(32), TWIDDLEI_CODELET(32), TWIDDLE_CODELET(64), TWIDDLEI_CODELET(64), (fftw_codelet_desc *) 0 }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/planner.c���������������������������������������������������������������������������0000644�0001754�0000144�00000031120�07635206062�010722� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * planner.c -- find the optimal plan */ /* $Id: planner.c,v 1.88 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include extern fftw_generic_codelet fftw_twiddle_generic; extern fftw_generic_codelet fftwi_twiddle_generic; extern fftw_codelet_desc *fftw_config[]; fftw_plan_hook_ptr fftw_plan_hook = (fftw_plan_hook_ptr) NULL; static void init_test_array(fftw_complex *arr, int stride, int n) { int j; for (j = 0; j < n; ++j) { c_re(arr[stride * j]) = 0.0; c_im(arr[stride * j]) = 0.0; } } /* * The timer keeps doubling the number of iterations * until the program runs for more than FFTW_TIME_MIN */ static double fftw_measure_runtime(fftw_plan plan, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_time begin, end, start; double t, tmax, tmin; int i, iter; int n; int repeat; int howmany = plan->vector_size; n = plan->n; iter = 1; for (;;) { tmin = 1.0E10; tmax = -1.0E10; init_test_array(in, istride, n * howmany); start = fftw_get_time(); /* repeat the measurement FFTW_TIME_REPEAT times */ for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { begin = fftw_get_time(); for (i = 0; i < iter; ++i) { fftw(plan, howmany, in, istride, istride, out, ostride, ostride); } end = fftw_get_time(); t = fftw_time_to_sec(fftw_time_diff(end, begin)); if (t < tmin) tmin = t; if (t > tmax) tmax = t; /* do not run for too long */ t = fftw_time_to_sec(fftw_time_diff(end, start)); if (t > FFTW_TIME_LIMIT) break; } if (tmin >= FFTW_TIME_MIN) break; iter *= 2; } tmin /= (double) iter; tmax /= (double) iter; return tmin; } /* auxiliary functions */ static void compute_cost(fftw_plan plan, fftw_complex *in, int istride, fftw_complex *out, int ostride) { if (plan->flags & FFTW_MEASURE) plan->cost = fftw_measure_runtime(plan, in, istride, out, ostride); else { double c; c = plan->n * fftw_estimate_node(plan->root) * plan->vector_size; plan->cost = c; } } static void run_plan_hooks(fftw_plan p) { if (fftw_plan_hook && p) { fftw_complete_twiddle(p->root, p->n); fftw_plan_hook(p); } } /* macrology */ #define FOR_ALL_CODELETS(p) \ fftw_codelet_desc **__q, *p; \ for (__q = &fftw_config[0]; (p = (*__q)); ++__q) /****************************************** * Recursive planner * ******************************************/ static fftw_plan planner(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_complex *, int, fftw_complex *, int); /* * the planner consists of two parts: one that tries to * use accumulated wisdom, and one that does not. * A small driver invokes both parts in sequence */ /* planner with wisdom: look up the codelet suggested by the wisdom */ static fftw_plan planner_wisdom(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan best = (fftw_plan) 0; fftw_plan_node *node; int have_wisdom; enum fftw_node_type wisdom_type; int wisdom_signature; fftw_recurse_kind wisdom_recurse_kind; /* see if we remember any wisdom for this case */ have_wisdom = fftw_wisdom_lookup(n, flags, dir, FFTW_WISDOM, istride, ostride, &wisdom_type, &wisdom_signature, &wisdom_recurse_kind, 0); if (!have_wisdom) return best; if (wisdom_type == FFTW_NOTW) { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == wisdom_type) { /* see if wisdom applies */ if (wisdom_signature == p->signature && p->size == n) { node = fftw_make_node_notw(n, p); best = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(best); run_plan_hooks(best); return best; } } } } if (wisdom_type == FFTW_TWIDDLE) { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == wisdom_type) { /* see if wisdom applies */ if (wisdom_signature == p->signature && p->size > 1 && (n % p->size) == 0) { fftw_plan r = planner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, wisdom_recurse_kind == FFTW_VECTOR_RECURSE ? p->size : vector_size, in, istride, out, ostride); node = fftw_make_node_twiddle(n, p, r->root, flags); best = fftw_make_plan(n, dir, node, flags, p->type, p->signature, wisdom_recurse_kind, vector_size); fftw_use_plan(best); run_plan_hooks(best); fftw_destroy_plan_internal(r); return best; } } } } /* * BUG (or: TODO) Can we have generic wisdom? This is probably * an academic question */ return best; } /* * planner with no wisdom: try all combinations and pick * the best */ static fftw_plan planner_normal(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan best = (fftw_plan) 0; fftw_plan newplan; fftw_plan_node *node; /* see if we have any codelet that solves the problem */ { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == FFTW_NOTW) { if (p->size == n) { node = fftw_make_node_notw(n, p); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); compute_cost(newplan, in, istride, out, ostride); run_plan_hooks(newplan); best = fftw_pick_better(newplan, best); } } } } /* Then, try all available twiddle codelets */ { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == FFTW_TWIDDLE) { if ((n % p->size) == 0 && p->size > 1 && (!best || n != p->size)) { fftw_plan r = planner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, vector_size, in, istride, out, ostride); node = fftw_make_node_twiddle(n, p, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); fftw_destroy_plan_internal(r); compute_cost(newplan, in, istride, out, ostride); run_plan_hooks(newplan); best = fftw_pick_better(newplan, best); } } } } /* try vector recursion unless prohibited by the flags: */ if (! (flags & FFTW_NO_VECTOR_RECURSE)) { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == FFTW_TWIDDLE) { if ((n % p->size) == 0 && p->size > 1 && (!best || n != p->size)) { fftw_plan r = planner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, p->size, in, istride, out, ostride); node = fftw_make_node_twiddle(n, p, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_VECTOR_RECURSE, vector_size); fftw_use_plan(newplan); fftw_destroy_plan_internal(r); compute_cost(newplan, in, istride, out, ostride); run_plan_hooks(newplan); best = fftw_pick_better(newplan, best); } } } } /* * resort to generic or rader codelets for unknown factors */ { fftw_generic_codelet *codelet = (dir == FFTW_FORWARD ? fftw_twiddle_generic : fftwi_twiddle_generic); int size, prev_size = 0, remaining_factors = n; fftw_plan r; while (remaining_factors > 1) { size = fftw_factor(remaining_factors); remaining_factors /= size; /* don't try the same factor more than once */ if (size == prev_size) continue; prev_size = size; /* Look for codelets corresponding to this factor. */ { FOR_ALL_CODELETS(p) { if (p->dir == dir && p->type == FFTW_TWIDDLE && p->size == size) { size = 0; break; } } } /* * only try a generic/rader codelet if there were no * twiddle codelets for this factor */ if (!size) continue; r = planner(table, n / size, dir, flags | FFTW_NO_VECTOR_RECURSE, vector_size, in, istride, out, ostride); /* Try Rader codelet: */ node = fftw_make_node_rader(n, size, dir, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, FFTW_RADER, 0, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); compute_cost(newplan, in, istride, out, ostride); run_plan_hooks(newplan); best = fftw_pick_better(newplan, best); if (size < 100) { /* * only try generic for small * sizes */ /* Try generic codelet: */ node = fftw_make_node_generic(n, size, codelet, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, FFTW_GENERIC, 0, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); compute_cost(newplan, in, istride, out, ostride); run_plan_hooks(newplan); best = fftw_pick_better(newplan, best); } fftw_destroy_plan_internal(r); } } if (!best) fftw_die("bug in planner\n"); return best; } static fftw_plan planner(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan best = (fftw_plan) 0; if (vector_size > 1) flags |= FFTW_NO_VECTOR_RECURSE; /* see if plan has already been computed */ best = fftw_lookup(table, n, flags, vector_size); if (best) { fftw_use_plan(best); return best; } /* try a wise plan */ best = planner_wisdom(table, n, dir, flags, vector_size, in, istride, out, ostride); if (!best) { /* No wisdom. Plan normally. */ best = planner_normal(table, n, dir, flags, vector_size, in, istride, out, ostride); } if (best) { fftw_insert(table, best); /* remember the wisdom */ fftw_wisdom_add(n, flags, dir, FFTW_WISDOM, istride, ostride, best->wisdom_type, best->wisdom_signature, best->recurse_kind); } return best; } fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan table; fftw_plan p1; /* validate parameters */ if (n <= 0) return (fftw_plan) 0; #ifndef FFTW_ENABLE_VECTOR_RECURSE /* TEMPORARY: disable vector recursion until it is more tested. */ flags |= FFTW_NO_VECTOR_RECURSE; #endif if ((dir != FFTW_FORWARD) && (dir != FFTW_BACKWARD)) return (fftw_plan) 0; fftw_make_empty_table(&table); p1 = planner(&table, n, dir, flags, 1, in, istride, out, ostride); fftw_destroy_table(&table); if (p1) fftw_complete_twiddle(p1->root, n); return p1; } fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags) { fftw_complex *tmp_in, *tmp_out; fftw_plan p; if (flags & FFTW_MEASURE) { tmp_in = (fftw_complex *) fftw_malloc(2 * n * sizeof(fftw_complex)); if (!tmp_in) return 0; tmp_out = tmp_in + n; p = fftw_create_plan_specific(n, dir, flags, tmp_in, 1, tmp_out, 1); fftw_free(tmp_in); } else p = fftw_create_plan_specific(n, dir, flags, (fftw_complex *) 0, 1, (fftw_complex *) 0, 1); return p; } void fftw_destroy_plan(fftw_plan plan) { fftw_destroy_plan_internal(plan); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/twiddle.c���������������������������������������������������������������������������0000644�0001754�0000144�00000013502�07635206062�010723� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * twiddle.c -- compute twiddle factors * These are the twiddle factors for *direct* fft. Flip sign to get * the inverse */ /* $Id: twiddle.c,v 1.42 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include #include #ifndef TRUE #define TRUE (1 == 1) #endif #ifndef FALSE #define FALSE (1 == 0) #endif #ifdef USE_FFTW_SAFE_MULMOD /* compute (x * y) mod p, but watch out for integer overflows; we must have x, y >= 0, p > 0. This routine is slow. */ int fftw_safe_mulmod(int x, int y, int p) { if (y == 0 || x <= INT_MAX / y) return((x * y) % p); else { int y2 = y/2; return((fftw_safe_mulmod(x, y2, p) + fftw_safe_mulmod(x, y - y2, p)) % p); } } #endif /* USE_FFTW_SAFE_MULMOD */ static fftw_complex *fftw_compute_rader_twiddle(int n, int r, int g) { FFTW_TRIG_REAL twoPiOverN; int m = n / r; int i, j, gpower; fftw_complex *W; twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) n; W = (fftw_complex *) fftw_malloc((r - 1) * m * sizeof(fftw_complex)); for (i = 0; i < m; ++i) for (gpower = 1, j = 0; j < r - 1; ++j, gpower = MULMOD(gpower, g, r)) { int k = i * (r - 1) + j; FFTW_TRIG_REAL ij = (FFTW_TRIG_REAL) (i * gpower); c_re(W[k]) = FFTW_TRIG_COS(twoPiOverN * ij); c_im(W[k]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * ij); } return W; } /* * compute the W coefficients (that is, powers of the root of 1) * and store them into an array. */ static fftw_complex *fftw_compute_twiddle(int n, const fftw_codelet_desc *d) { FFTW_TRIG_REAL twoPiOverN; int i, j; fftw_complex *W; twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) n; if (!d) { /* generic codelet, needs all twiddles in order */ W = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); for (i = 0; i < n; ++i) { c_re(W[i]) = FFTW_TRIG_COS(twoPiOverN * (FFTW_TRIG_REAL) i); c_im(W[i]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * (FFTW_TRIG_REAL) i); } } else if (d->type == FFTW_RADER) W = fftw_compute_rader_twiddle(n, d->size, d->signature); else { int r = d->size; int m = n / r, m_alloc; int r1 = d->ntwiddle; int istart; if (d->type == FFTW_TWIDDLE) { istart = 0; m_alloc = m; } else if (d->type == FFTW_HC2HC) { /* * This is tricky, do not change lightly. */ m = (m + 1) / 2; m_alloc = m - 1; istart = 1; } else { fftw_die("compute_twiddle: invalid argument\n"); /* paranoia for gcc */ m_alloc = 0; istart = 0; } W = (fftw_complex *) fftw_malloc(r1 * m_alloc * sizeof(fftw_complex)); for (i = istart; i < m; ++i) for (j = 0; j < r1; ++j) { int k = (i - istart) * r1 + j; FFTW_TRIG_REAL ij = (FFTW_TRIG_REAL) (i * d->twiddle_order[j]); c_re(W[k]) = FFTW_TRIG_COS(twoPiOverN * ij); c_im(W[k]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * ij); } } return W; } /* * these routines implement a simple reference-count-based * management of twiddle structures */ static fftw_twiddle *twlist = (fftw_twiddle *) 0; int fftw_twiddle_size = 0; /* total allocated size, for debugging */ /* true if the two codelets can share the same twiddle factors */ static int compatible(const fftw_codelet_desc *d1, const fftw_codelet_desc *d2) { int i; /* true if they are the same codelet */ if (d1 == d2) return TRUE; /* false if one is null and the other is not */ if (!d1 || !d2) return FALSE; /* false if size is different */ if (d1->size != d2->size) return FALSE; /* false if different types (FFTW_TWIDDLE/FFTW_HC2HC/FFTW_RADER) */ if (d1->type != d2->type) return FALSE; /* false if they need different # of twiddles */ if (d1->ntwiddle != d2->ntwiddle) return FALSE; /* false if the twiddle orders are different */ for (i = 0; i < d1->ntwiddle; ++i) if (d1->twiddle_order[i] != d2->twiddle_order[i]) return FALSE; return TRUE; } fftw_twiddle *fftw_create_twiddle(int n, const fftw_codelet_desc *d) { fftw_twiddle *tw; /* lookup this n in the twiddle list */ for (tw = twlist; tw; tw = tw->next) if (n == tw->n && compatible(d, tw->cdesc)) { ++tw->refcnt; return tw; } /* not found --- allocate a new struct twiddle */ tw = (fftw_twiddle *) fftw_malloc(sizeof(fftw_twiddle)); fftw_twiddle_size += n; tw->n = n; tw->cdesc = d; tw->twarray = fftw_compute_twiddle(n, d); tw->refcnt = 1; /* enqueue the new struct */ tw->next = twlist; twlist = tw; return tw; } void fftw_destroy_twiddle(fftw_twiddle * tw) { fftw_twiddle **p; --tw->refcnt; if (tw->refcnt == 0) { /* remove from the list of known twiddle factors */ for (p = &twlist; p; p = &((*p)->next)) if (*p == tw) { *p = tw->next; fftw_twiddle_size -= tw->n; fftw_free(tw->twarray); fftw_free(tw); return; } fftw_die("BUG in fftw_destroy_twiddle\n"); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/executor.c��������������������������������������������������������������������������0000644�0001754�0000144�00000026462�07635206062�011136� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * executor.c -- execute the fft */ /* $Id: executor.c,v 1.68 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include const char *fftw_version = "FFTW V" FFTW_VERSION " ($Id: executor.c,v 1.68 2003/03/16 23:43:46 stevenj Exp $)"; /* * This function is called in other files, so we cannot declare * it static. */ void fftw_strided_copy(int n, fftw_complex *in, int ostride, fftw_complex *out) { int i; fftw_real r0, r1, i0, i1; fftw_real r2, r3, i2, i3; i = 0; for (; i < (n & 3); ++i) { out[i * ostride] = in[i]; } for (; i < n; i += 4) { r0 = c_re(in[i]); i0 = c_im(in[i]); r1 = c_re(in[i + 1]); i1 = c_im(in[i + 1]); r2 = c_re(in[i + 2]); i2 = c_im(in[i + 2]); r3 = c_re(in[i + 3]); i3 = c_im(in[i + 3]); c_re(out[i * ostride]) = r0; c_im(out[i * ostride]) = i0; c_re(out[(i + 1) * ostride]) = r1; c_im(out[(i + 1) * ostride]) = i1; c_re(out[(i + 2) * ostride]) = r2; c_im(out[(i + 2) * ostride]) = i2; c_re(out[(i + 3) * ostride]) = r3; c_im(out[(i + 3) * ostride]) = i3; } } static void executor_many(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist, fftw_recurse_kind recurse_kind) { int s; switch (p->type) { case FFTW_NOTW: { fftw_notw_codelet *codelet = p->nodeu.notw.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, istride, ostride); break; } default: for (s = 0; s < howmany; ++s) fftw_executor_simple(n, in + s * idist, out + s * odist, p, istride, ostride, recurse_kind); } } #ifdef FFTW_ENABLE_VECTOR_RECURSE /* executor_many_vector is like executor_many, but it pushes the howmany loop down to the leaves of the transform: */ static void executor_many_vector(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist) { int s; switch (p->type) { case FFTW_NOTW: { fftw_notw_codelet *codelet = p->nodeu.notw.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, istride, ostride); break; } case FFTW_TWIDDLE: { int r = p->nodeu.twiddle.size; int m = n / r; fftw_twiddle_codelet *codelet; fftw_complex *W; for (s = 0; s < r; ++s) executor_many_vector(m, in + s * istride, out + s * (m * ostride), p->nodeu.twiddle.recurse, istride * r, ostride, howmany, idist, odist); codelet = p->nodeu.twiddle.codelet; W = p->nodeu.twiddle.tw->twarray; /* This may not be the right thing. We maybe should have the howmany loop for the twiddle codelets at the topmost level of the recursion, since odist is big; i.e. separate recursions for twiddle and notwiddle. */ HACK_ALIGN_STACK_EVEN; for (s = 0; s < howmany; ++s) codelet(out + s * odist, W, m * ostride, m, ostride); break; } case FFTW_GENERIC: { int r = p->nodeu.generic.size; int m = n / r; fftw_generic_codelet *codelet; fftw_complex *W; for (s = 0; s < r; ++s) executor_many_vector(m, in + s * istride, out + s * (m * ostride), p->nodeu.generic.recurse, istride * r, ostride, howmany, idist, odist); codelet = p->nodeu.generic.codelet; W = p->nodeu.generic.tw->twarray; for (s = 0; s < howmany; ++s) codelet(out + s * odist, W, m, r, n, ostride); break; } case FFTW_RADER: { int r = p->nodeu.rader.size; int m = n / r; fftw_rader_codelet *codelet; fftw_complex *W; for (s = 0; s < r; ++s) executor_many_vector(m, in + s * istride, out + s * (m * ostride), p->nodeu.rader.recurse, istride * r, ostride, howmany, idist, odist); codelet = p->nodeu.rader.codelet; W = p->nodeu.rader.tw->twarray; for (s = 0; s < howmany; ++s) codelet(out + s * odist, W, m, r, ostride, p->nodeu.rader.rader_data); break; } default: fftw_die("BUG in executor: invalid plan\n"); break; } } #endif /* FFTW_ENABLE_VECTOR_RECURSE */ /* * Do *not* declare simple executor static--we need to call it * from other files...also, preface its name with "fftw_" * to avoid any possible name collisions. */ void fftw_executor_simple(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_NOTW: HACK_ALIGN_STACK_ODD; (p->nodeu.notw.codelet)(in, out, istride, ostride); break; case FFTW_TWIDDLE: { int r = p->nodeu.twiddle.size; int m = n / r; fftw_twiddle_codelet *codelet; fftw_complex *W; #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif executor_many(m, in, out, p->nodeu.twiddle.recurse, istride * r, ostride, r, istride, m * ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else executor_many_vector(m, in, out, p->nodeu.twiddle.recurse, istride * r, ostride, r, istride, m * ostride); #endif codelet = p->nodeu.twiddle.codelet; W = p->nodeu.twiddle.tw->twarray; HACK_ALIGN_STACK_EVEN; codelet(out, W, m * ostride, m, ostride); break; } case FFTW_GENERIC: { int r = p->nodeu.generic.size; int m = n / r; fftw_generic_codelet *codelet; fftw_complex *W; #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif executor_many(m, in, out, p->nodeu.generic.recurse, istride * r, ostride, r, istride, m * ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else executor_many_vector(m, in, out, p->nodeu.generic.recurse, istride * r, ostride, r, istride, m * ostride); #endif codelet = p->nodeu.generic.codelet; W = p->nodeu.generic.tw->twarray; codelet(out, W, m, r, n, ostride); break; } case FFTW_RADER: { int r = p->nodeu.rader.size; int m = n / r; fftw_rader_codelet *codelet; fftw_complex *W; #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif executor_many(m, in, out, p->nodeu.rader.recurse, istride * r, ostride, r, istride, m * ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else executor_many_vector(m, in, out, p->nodeu.rader.recurse, istride * r, ostride, r, istride, m * ostride); #endif codelet = p->nodeu.rader.codelet; W = p->nodeu.rader.tw->twarray; codelet(out, W, m, r, ostride, p->nodeu.rader.rader_data); break; } default: fftw_die("BUG in executor: invalid plan\n"); break; } } static void executor_simple_inplace(int n, fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_NOTW: HACK_ALIGN_STACK_ODD; (p->nodeu.notw.codelet)(in, in, istride, istride); break; default: { fftw_complex *tmp; if (out) tmp = out; else tmp = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); fftw_executor_simple(n, in, tmp, p, istride, 1, recurse_kind); fftw_strided_copy(n, tmp, istride, in); if (!out) fftw_free(tmp); } } } static void executor_many_inplace(int n, fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int howmany, int idist, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_NOTW: { fftw_notw_codelet *codelet = p->nodeu.notw.codelet; int s; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + s * idist, istride, istride); break; } default: { int s; fftw_complex *tmp; if (out) tmp = out; else tmp = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); for (s = 0; s < howmany; ++s) { fftw_executor_simple(n, in + s * idist, tmp, p, istride, 1, recurse_kind); fftw_strided_copy(n, tmp, istride, in + s * idist); } if (!out) fftw_free(tmp); } } } /* user interface */ void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) { if (howmany == 1) { executor_simple_inplace(n, in, out, plan->root, istride, plan->recurse_kind); } else { executor_many_inplace(n, in, out, plan->root, istride, howmany, idist, plan->recurse_kind); } } else { if (howmany == 1) { fftw_executor_simple(n, in, out, plan->root, istride, ostride, plan->recurse_kind); } else { #ifdef FFTW_ENABLE_VECTOR_RECURSE int vector_size = plan->vector_size; if (vector_size <= 1) #endif executor_many(n, in, out, plan->root, istride, ostride, howmany, idist, odist, plan->recurse_kind); #ifdef FFTW_ENABLE_VECTOR_RECURSE else { int s; int num_vects = howmany / vector_size; fftw_plan_node *root = plan->root; for (s = 0; s < num_vects; ++s) executor_many_vector(n, in + s * (vector_size * idist), out + s * (vector_size * odist), root, istride, ostride, vector_size, idist, odist); s = howmany % vector_size; if (s > 0) executor_many(n, in + num_vects * (vector_size * idist), out + num_vects * (vector_size * odist), root, istride, ostride, s, idist, odist, FFTW_NORMAL_RECURSE); } #endif } } } void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) executor_simple_inplace(n, in, out, plan->root, 1, plan->recurse_kind); else fftw_executor_simple(n, in, out, plan->root, 1, 1, plan->recurse_kind); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/generic.c���������������������������������������������������������������������������0000644�0001754�0000144�00000005326�07635206026�010710� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * generic.c -- "generic" codelets. They work for all n (and they are * slow) */ #include "fftw-int.h" #include void fftw_twiddle_generic(fftw_complex *A, const fftw_complex *W, int m, int r, int n, int stride) { int i, j, k; const fftw_complex *jp; fftw_complex *kp; fftw_complex *tmp = (fftw_complex *) fftw_malloc(r * sizeof(fftw_complex)); for (i = 0; i < m; ++i) { for (k = 0, kp = tmp; k < r; ++k, kp++) { fftw_real r0, i0, rt, it, rw, iw; int l1 = i + m * k; int l0; r0 = i0 = 0.0; for (j = 0, jp = A + i * stride, l0 = 0; j < r; ++j, jp += m * stride) { rw = c_re(W[l0]); iw = c_im(W[l0]); rt = c_re(*jp); it = c_im(*jp); r0 += rt * rw - it * iw; i0 += rt * iw + it * rw; l0 += l1; if (l0 >= n) l0 -= n; } c_re(*kp) = r0; c_im(*kp) = i0; } for (k = 0, kp = A + i * stride; k < r; ++k, kp += m * stride) *kp = tmp[k]; } fftw_free(tmp); } void fftwi_twiddle_generic(fftw_complex *A, const fftw_complex *W, int m, int r, int n, int stride) { int i, j, k; const fftw_complex *jp; fftw_complex *kp; fftw_complex *tmp = (fftw_complex *) fftw_malloc(r * sizeof(fftw_complex)); for (i = 0; i < m; ++i) { for (k = 0, kp = tmp; k < r; ++k, kp++) { fftw_real r0, i0, rt, it, rw, iw; int l1 = i + m * k; int l0; r0 = i0 = 0.0; for (j = 0, jp = A + i * stride, l0 = 0; j < r; ++j, jp += m * stride) { rw = c_re(W[l0]); iw = c_im(W[l0]); rt = c_re(*jp); it = c_im(*jp); r0 += rt * rw + it * iw; i0 += it * rw - rt * iw; l0 += l1; if (l0 >= n) l0 -= n; } c_re(*kp) = r0; c_im(*kp) = i0; } for (k = 0, kp = A + i * stride; k < r; ++k, kp += m * stride) *kp = tmp[k]; } fftw_free(tmp); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fftwnd.c����������������������������������������������������������������������������0000644�0001754�0000144�00000051335�07635206062�010565� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* $Id: fftwnd.c,v 1.44 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" /* the number of buffers to use for buffered transforms: */ #define FFTWND_NBUFFERS 8 /* the default number of buffers to use: */ #define FFTWND_DEFAULT_NBUFFERS 0 /* the number of "padding" elements between consecutive buffer lines */ #define FFTWND_BUFFER_PADDING 8 static void destroy_plan_array(int rank, fftw_plan *plans); static void init_test_array(fftw_complex *arr, int stride, int n) { int j; for (j = 0; j < n; ++j) { c_re(arr[stride * j]) = 0.0; c_im(arr[stride * j]) = 0.0; } } /* * Same as fftw_measure_runtime, except for fftwnd plan. */ double fftwnd_measure_runtime(fftwnd_plan plan, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_time begin, end, start; double t, tmax, tmin; int i, iter; int n; int repeat; if (plan->rank == 0) return 0.0; n = 1; for (i = 0; i < plan->rank; ++i) n *= plan->n[i]; iter = 1; for (;;) { tmin = 1.0E10; tmax = -1.0E10; init_test_array(in, istride, n); start = fftw_get_time(); /* repeat the measurement FFTW_TIME_REPEAT times */ for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { begin = fftw_get_time(); for (i = 0; i < iter; ++i) { fftwnd(plan, 1, in, istride, 0, out, ostride, 0); } end = fftw_get_time(); t = fftw_time_to_sec(fftw_time_diff(end, begin)); if (t < tmin) tmin = t; if (t > tmax) tmax = t; /* do not run for too long */ t = fftw_time_to_sec(fftw_time_diff(end, start)); if (t > FFTW_TIME_LIMIT) break; } if (tmin >= FFTW_TIME_MIN) break; iter *= 2; } tmin /= (double) iter; tmax /= (double) iter; return tmin; } /********************** Initializing the FFTWND Plan ***********************/ /* Initialize everything except for the 1D plans and the work array: */ fftwnd_plan fftwnd_create_plan_aux(int rank, const int *n, fftw_direction dir, int flags) { int i; fftwnd_plan p; if (rank < 0) return 0; for (i = 0; i < rank; ++i) if (n[i] <= 0) return 0; p = (fftwnd_plan) fftw_malloc(sizeof(fftwnd_data)); p->n = 0; p->n_before = 0; p->n_after = 0; p->plans = 0; p->work = 0; p->dir = dir; p->rank = rank; p->is_in_place = flags & FFTW_IN_PLACE; p->nwork = 0; p->nbuffers = 0; if (rank == 0) return 0; p->n = (int *) fftw_malloc(sizeof(int) * rank); p->n_before = (int *) fftw_malloc(sizeof(int) * rank); p->n_after = (int *) fftw_malloc(sizeof(int) * rank); p->n_before[0] = 1; p->n_after[rank - 1] = 1; for (i = 0; i < rank; ++i) { p->n[i] = n[i]; if (i) { p->n_before[i] = p->n_before[i - 1] * n[i - 1]; p->n_after[rank - 1 - i] = p->n_after[rank - i] * n[rank - i]; } } return p; } /* create an empty new array of rank 1d plans */ fftw_plan *fftwnd_new_plan_array(int rank) { fftw_plan *plans; int i; plans = (fftw_plan *) fftw_malloc(rank * sizeof(fftw_plan)); if (!plans) return 0; for (i = 0; i < rank; ++i) plans[i] = 0; return plans; } /* * create an array of plans using the ordinary 1d fftw_create_plan, * which allocates its own array and creates plans optimized for * contiguous data. */ fftw_plan *fftwnd_create_plans_generic(fftw_plan *plans, int rank, const int *n, fftw_direction dir, int flags) { if (rank <= 0) return 0; if (plans) { int i, j; int cur_flags; for (i = 0; i < rank; ++i) { if (i < rank - 1 || (flags & FFTW_IN_PLACE)) { /* * fft's except the last dimension are always in-place */ cur_flags = flags | FFTW_IN_PLACE; for (j = i - 1; j >= 0 && n[i] != n[j]; --j); } else { cur_flags = flags; /* * we must create a separate plan for the last * dimension */ j = -1; } if (j >= 0) { /* * If a plan already exists for this size * array, reuse it: */ plans[i] = plans[j]; } else { /* generate a new plan: */ plans[i] = fftw_create_plan(n[i], dir, cur_flags); if (!plans[i]) { destroy_plan_array(rank, plans); return 0; } } } } return plans; } static int get_maxdim(int rank, const int *n, int flags) { int i; int maxdim = 0; for (i = 0; i < rank - 1; ++i) if (n[i] > maxdim) maxdim = n[i]; if (rank > 0 && flags & FFTW_IN_PLACE && n[rank - 1] > maxdim) maxdim = n[rank - 1]; return maxdim; } /* compute number of elements required for work array (has to be big enough to hold ncopies of the largest dimension in n that will need an in-place transform. */ int fftwnd_work_size(int rank, const int *n, int flags, int ncopies) { return (ncopies * get_maxdim(rank, n, flags) + (ncopies - 1) * FFTWND_BUFFER_PADDING); } /* * create plans using the fftw_create_plan_specific planner, which * allows us to create plans for each dimension that are specialized * for the strides that we are going to use. */ fftw_plan *fftwnd_create_plans_specific(fftw_plan *plans, int rank, const int *n, const int *n_after, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride) { if (rank <= 0) return 0; if (plans) { int i, stride, cur_flags; fftw_complex *work = 0; int nwork; nwork = fftwnd_work_size(rank, n, flags, 1); if (nwork) work = (fftw_complex*)fftw_malloc(nwork * sizeof(fftw_complex)); for (i = 0; i < rank; ++i) { /* fft's except the last dimension are always in-place */ if (i < rank - 1) cur_flags = flags | FFTW_IN_PLACE; else cur_flags = flags; /* stride for transforming ith dimension */ stride = n_after[i]; if (cur_flags & FFTW_IN_PLACE) plans[i] = fftw_create_plan_specific(n[i], dir, cur_flags, in, istride * stride, work, 1); else plans[i] = fftw_create_plan_specific(n[i], dir, cur_flags, in, istride * stride, out, ostride * stride); if (!plans[i]) { destroy_plan_array(rank, plans); fftw_free(work); return 0; } } if (work) fftw_free(work); } return plans; } /* * Create an fftwnd_plan specialized for specific arrays. (These * arrays are ignored, however, if they are NULL or if the flags do * not include FFTW_MEASURE.) The main advantage of being provided * arrays like this is that we can do runtime timing measurements of * our options, without worrying about allocating excessive scratch * space. */ fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftwnd_plan p; if (!(p = fftwnd_create_plan_aux(rank, n, dir, flags))) return 0; if (!(flags & FFTW_MEASURE) || in == 0 || (!p->is_in_place && out == 0)) { /**** use default plan ****/ p->plans = fftwnd_create_plans_generic(fftwnd_new_plan_array(rank), rank, n, dir, flags); if (!p->plans) { fftwnd_destroy_plan(p); return 0; } if (flags & FFTWND_FORCE_BUFFERED) p->nbuffers = FFTWND_NBUFFERS; else p->nbuffers = FFTWND_DEFAULT_NBUFFERS; p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); if (p->nwork && !(flags & FFTW_THREADSAFE)) { p->work = (fftw_complex*) fftw_malloc(p->nwork * sizeof(fftw_complex)); if (!p->work) { fftwnd_destroy_plan(p); return 0; } } } else { /**** use runtime measurements to pick plan ****/ fftw_plan *plans_buf, *plans_nobuf; double t_buf, t_nobuf; p->nwork = fftwnd_work_size(rank, n, flags, FFTWND_NBUFFERS + 1); if (p->nwork && !(flags & FFTW_THREADSAFE)) { p->work = (fftw_complex*) fftw_malloc(p->nwork * sizeof(fftw_complex)); if (!p->work) { fftwnd_destroy_plan(p); return 0; } } else p->work = (fftw_complex*) NULL; /* two possible sets of 1D plans: */ plans_buf = fftwnd_create_plans_generic(fftwnd_new_plan_array(rank), rank, n, dir, flags); plans_nobuf = fftwnd_create_plans_specific(fftwnd_new_plan_array(rank), rank, n, p->n_after, dir, flags, in, istride, out, ostride); if (!plans_buf || !plans_nobuf) { destroy_plan_array(rank, plans_nobuf); destroy_plan_array(rank, plans_buf); fftwnd_destroy_plan(p); return 0; } /* time the two possible plans */ p->plans = plans_nobuf; p->nbuffers = 0; p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); t_nobuf = fftwnd_measure_runtime(p, in, istride, out, ostride); p->plans = plans_buf; p->nbuffers = FFTWND_NBUFFERS; p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); t_buf = fftwnd_measure_runtime(p, in, istride, out, ostride); /* pick the better one: */ if (t_nobuf < t_buf) { /* use unbuffered transform */ p->plans = plans_nobuf; p->nbuffers = 0; /* work array is unnecessarily large */ if (p->work) fftw_free(p->work); p->work = 0; destroy_plan_array(rank, plans_buf); /* allocate a work array of the correct size: */ p->nwork = fftwnd_work_size(rank, n, flags, p->nbuffers + 1); if (p->nwork && !(flags & FFTW_THREADSAFE)) { p->work = (fftw_complex*) fftw_malloc(p->nwork * sizeof(fftw_complex)); if (!p->work) { fftwnd_destroy_plan(p); return 0; } } } else { /* use buffered transform */ destroy_plan_array(rank, plans_nobuf); } } return p; } fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride) { int n[2]; n[0] = nx; n[1] = ny; return fftwnd_create_plan_specific(2, n, dir, flags, in, istride, out, ostride); } fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride) { int n[3]; n[0] = nx; n[1] = ny; n[2] = nz; return fftwnd_create_plan_specific(3, n, dir, flags, in, istride, out, ostride); } /* Create a generic fftwnd plan: */ fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags) { return fftwnd_create_plan_specific(rank, n, dir, flags, 0, 1, 0, 1); } fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags) { return fftw2d_create_plan_specific(nx, ny, dir, flags, 0, 1, 0, 1); } fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags) { return fftw3d_create_plan_specific(nx, ny, nz, dir, flags, 0, 1, 0, 1); } /************************ Freeing the FFTWND Plan ************************/ static void destroy_plan_array(int rank, fftw_plan *plans) { if (plans) { int i, j; for (i = 0; i < rank; ++i) { for (j = i - 1; j >= 0 && plans[i] != plans[j]; --j); if (j < 0 && plans[i]) fftw_destroy_plan(plans[i]); } fftw_free(plans); } } void fftwnd_destroy_plan(fftwnd_plan plan) { if (plan) { destroy_plan_array(plan->rank, plan->plans); if (plan->n) fftw_free(plan->n); if (plan->n_before) fftw_free(plan->n_before); if (plan->n_after) fftw_free(plan->n_after); if (plan->work) fftw_free(plan->work); fftw_free(plan); } } /************************ Printing the FFTWND Plan ************************/ void fftwnd_fprint_plan(FILE *f, fftwnd_plan plan) { if (plan) { int i, j; if (plan->rank == 0) { fprintf(f, "plan for rank 0 (null) transform.\n"); return; } fprintf(f, "plan for "); for (i = 0; i < plan->rank; ++i) fprintf(f, "%s%d", i ? "x" : "", plan->n[i]); fprintf(f, " transform:\n"); if (plan->nbuffers > 0) fprintf(f, " -- using buffered transforms (%d buffers)\n", plan->nbuffers); else fprintf(f, " -- using unbuffered transform\n"); for (i = 0; i < plan->rank; ++i) { fprintf(f, "* dimension %d (size %d) ", i, plan->n[i]); for (j = i - 1; j >= 0; --j) if (plan->plans[j] == plan->plans[i]) break; if (j < 0) fftw_fprint_plan(f, plan->plans[i]); else fprintf(f, "plan is same as dimension %d plan.\n", j); } } } void fftwnd_print_plan(fftwnd_plan plan) { fftwnd_fprint_plan(stdout, plan); } /********************* Buffered FFTW (in-place) *********************/ void fftw_buffered(fftw_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *work, int nbuffers, fftw_complex *buffers) { int i = 0, n, nb; n = p->n; nb = n + FFTWND_BUFFER_PADDING; do { for (; i <= howmany - nbuffers; i += nbuffers) { fftw_complex *cur_in = in + i * idist; int j, buf; /* * First, copy nbuffers strided arrays to the * contiguous buffer arrays (reading consecutive * locations, assuming that idist is 1): */ for (j = 0; j < n; ++j) { fftw_complex *cur_in2 = cur_in + j * istride; fftw_complex *cur_buffers = buffers + j; for (buf = 0; buf <= nbuffers - 4; buf += 4) { fftw_real r0, i0, r1, i1, r2, i2, r3, i3; r0 = c_re(cur_in2[0]); i0 = c_im(cur_in2[0]); r1 = c_re(cur_in2[idist]); i1 = c_im(cur_in2[idist]); r2 = c_re(cur_in2[2 * idist]); i2 = c_im(cur_in2[2 * idist]); r3 = c_re(cur_in2[3 * idist]); i3 = c_im(cur_in2[3 * idist]); c_re(cur_buffers[0]) = r0; c_im(cur_buffers[0]) = i0; c_re(cur_buffers[nb]) = r1; c_im(cur_buffers[nb]) = i1; c_re(cur_buffers[2 * nb]) = r2; c_im(cur_buffers[2 * nb]) = i2; c_re(cur_buffers[3 * nb]) = r3; c_im(cur_buffers[3 * nb]) = i3; cur_buffers += 4 * nb; cur_in2 += 4 * idist; } for (; buf < nbuffers; ++buf) { *cur_buffers = *cur_in2; cur_buffers += nb; cur_in2 += idist; } } /* * Now, compute the FFTs in the buffers (in-place * using work): */ fftw(p, nbuffers, buffers, 1, nb, work, 1, 0); /* * Finally, copy the results back from the contiguous * buffers to the strided arrays (writing consecutive * locations): */ for (j = 0; j < n; ++j) { fftw_complex *cur_in2 = cur_in + j * istride; fftw_complex *cur_buffers = buffers + j; for (buf = 0; buf <= nbuffers - 4; buf += 4) { fftw_real r0, i0, r1, i1, r2, i2, r3, i3; r0 = c_re(cur_buffers[0]); i0 = c_im(cur_buffers[0]); r1 = c_re(cur_buffers[nb]); i1 = c_im(cur_buffers[nb]); r2 = c_re(cur_buffers[2 * nb]); i2 = c_im(cur_buffers[2 * nb]); r3 = c_re(cur_buffers[3 * nb]); i3 = c_im(cur_buffers[3 * nb]); c_re(cur_in2[0]) = r0; c_im(cur_in2[0]) = i0; c_re(cur_in2[idist]) = r1; c_im(cur_in2[idist]) = i1; c_re(cur_in2[2 * idist]) = r2; c_im(cur_in2[2 * idist]) = i2; c_re(cur_in2[3 * idist]) = r3; c_im(cur_in2[3 * idist]) = i3; cur_buffers += 4 * nb; cur_in2 += 4 * idist; } for (; buf < nbuffers; ++buf) { *cur_in2 = *cur_buffers; cur_buffers += nb; cur_in2 += idist; } } } /* * we skip howmany % nbuffers ffts at the end of the loop, * so we have to go back and do them: */ nbuffers = howmany - i; } while (i < howmany); } /********************* Computing the N-Dimensional FFT *********************/ void fftwnd_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_complex *out, int ostride, fftw_complex *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) fftw(p->plans[p->rank - 1], n, in, istride, n_after * istride, work, 1, 0); else fftw(p->plans[p->rank - 1], n, in, istride, n_after * istride, out, ostride, n_after * ostride); } else { /* we have at least two dimensions to go */ int i; /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ for (i = 0; i < n; ++i) fftwnd_aux(p, cur_dim + 1, in + i * n_after * istride, istride, out + i * n_after * ostride, ostride, work); } /* do the current dimension (in-place): */ if (p->nbuffers == 0) { fftw(p->plans[cur_dim], n_after, out, n_after * ostride, ostride, work, 1, 0); } else /* using contiguous copy buffers: */ fftw_buffered(p->plans[cur_dim], n_after, out, n_after * ostride, ostride, work, p->nbuffers, work + n); } /* * alternate version of fftwnd_aux -- this version pushes the howmany * loop down to the leaves of the computation, for greater locality in * cases where dist < stride */ void fftwnd_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; int k; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) for (k = 0; k < n; ++k) fftw(p->plans[p->rank - 1], howmany, in + k * n_after * istride, istride, idist, work, 1, 0); else for (k = 0; k < n; ++k) fftw(p->plans[p->rank - 1], howmany, in + k * n_after * istride, istride, idist, out + k * n_after * ostride, ostride, odist); } else { /* we have at least two dimensions to go */ int i; /* * process the subsequent dimensions recursively, in * hyperslabs, to get maximum locality: */ for (i = 0; i < n; ++i) fftwnd_aux_howmany(p, cur_dim + 1, howmany, in + i * n_after * istride, istride, idist, out + i * n_after * ostride, ostride, odist, work); } /* do the current dimension (in-place): */ if (p->nbuffers == 0) for (k = 0; k < n_after; ++k) fftw(p->plans[cur_dim], howmany, out + k * ostride, n_after * ostride, odist, work, 1, 0); else /* using contiguous copy buffers: */ for (k = 0; k < n_after; ++k) fftw_buffered(p->plans[cur_dim], howmany, out + k * ostride, n_after * ostride, odist, work, p->nbuffers, work + n); } void fftwnd(fftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { fftw_complex *work; #ifdef FFTW_DEBUG if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) && p->nwork && p->work) fftw_die("bug with FFTW_THREADSAFE flag\n"); #endif if (p->nwork && !p->work) work = (fftw_complex *) fftw_malloc(p->nwork * sizeof(fftw_complex)); else work = p->work; switch (p->rank) { case 0: break; case 1: if (p->is_in_place) /* fft is in-place */ fftw(p->plans[0], howmany, in, istride, idist, work, 1, 0); else fftw(p->plans[0], howmany, in, istride, idist, out, ostride, odist); break; default: /* rank >= 2 */ { if (p->is_in_place) { out = in; ostride = istride; odist = idist; } if (howmany > 1 && odist < ostride) fftwnd_aux_howmany(p, 0, howmany, in, istride, idist, out, ostride, odist, work); else { int i; for (i = 0; i < howmany; ++i) fftwnd_aux(p, 0, in + i * idist, istride, out + i * odist, ostride, work); } } } if (p->nwork && !p->work) fftw_free(work); } void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out) { fftwnd(p, 1, in, 1, 1, out, 1, 1); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/malloc.c����������������������������������������������������������������������������0000644�0001754�0000144�00000013353�07635206062�010542� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * malloc.c -- memory allocation related functions */ /* $Id: malloc.c,v 1.40 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include #ifdef HAVE_MALLOC_H #include #endif fftw_malloc_type_function fftw_malloc_hook = 0; fftw_free_type_function fftw_free_hook = 0; fftw_die_type_function fftw_die_hook = 0; /********************************************************** * DEBUGGING CODE **********************************************************/ #ifdef FFTW_DEBUG static int fftw_malloc_cnt = 0; /* * debugging malloc/free. Initialize every malloced and freed area to * random values, just to make sure we are not using uninitialized * pointers. Also check for writes past the ends of allocated blocks, * and a couple of other things. * * This code is a quick and dirty hack -- use at your own risk. */ static int fftw_malloc_total = 0, fftw_malloc_max = 0, fftw_malloc_cnt_max = 0; #define MAGIC 0xABadCafe #define PAD_FACTOR 2 #define TWOINTS (2 * sizeof(int)) #define VERBOSE_ALLOCATION 0 #if VERBOSE_ALLOCATION #define WHEN_VERBOSE(a) a #else #define WHEN_VERBOSE(a) #endif void *fftw_malloc(size_t n) { char *p; int i; fftw_malloc_total += n; if (fftw_malloc_total > fftw_malloc_max) fftw_malloc_max = fftw_malloc_total; p = (char *) malloc(PAD_FACTOR * n + TWOINTS); if (!p) fftw_die("fftw_malloc: out of memory\n"); /* store the size in a known position */ ((int *) p)[0] = n; ((int *) p)[1] = MAGIC; for (i = 0; i < PAD_FACTOR * n; ++i) p[i + TWOINTS] = (char) (i ^ 0xDEADBEEF); ++fftw_malloc_cnt; if (fftw_malloc_cnt > fftw_malloc_cnt_max) fftw_malloc_cnt_max = fftw_malloc_cnt; /* skip the size we stored previously */ return (void *) (p + TWOINTS); } void fftw_free(void *p) { char *q; if (!p) return; q = ((char *) p) - TWOINTS; if (!q) fftw_die("fftw_free: tried to free NULL+TWOINTS pointer!\n"); { int n = ((int *) q)[0]; int magic = ((int *) q)[1]; int i; WHEN_VERBOSE( { printf("FFTW_FREE %d\n", n); fflush(stdout); }) *((int *) q) = 0; /* set to zero to detect duplicate free's */ if (magic != MAGIC) fftw_die("Wrong magic in fftw_free()!\n"); ((int *) q)[1] = ~MAGIC; if (n < 0) fftw_die("Tried to free block with corrupt size descriptor!\n"); fftw_malloc_total -= n; if (fftw_malloc_total < 0) fftw_die("fftw_malloc_total went negative!\n"); /* check for writing past end of array: */ for (i = n; i < PAD_FACTOR * n; ++i) if (q[i + TWOINTS] != (char) (i ^ 0xDEADBEEF)) { fflush(stdout); fprintf(stderr, "Byte %d past end of array has changed!\n", i - n + 1); fftw_die("Array bounds overwritten!\n"); } for (i = 0; i < PAD_FACTOR * n; ++i) q[i + TWOINTS] = (char) (i ^ 0xBEEFDEAD); --fftw_malloc_cnt; if (fftw_malloc_cnt < 0) fftw_die("fftw_malloc_cnt went negative!\n"); if (fftw_malloc_cnt == 0 && fftw_malloc_total > 0 || fftw_malloc_cnt > 0 && fftw_malloc_total == 0) fftw_die("fftw_malloc_cnt/total not zero at the same time!\n"); free(q); } } #else /********************************************************** * NON DEBUGGING CODE **********************************************************/ /* production version, no hacks */ void *fftw_malloc(size_t n) { void *p; if (fftw_malloc_hook) return fftw_malloc_hook(n); if (n == 0) n = 1; p = malloc(n); if (!p) fftw_die("fftw_malloc: out of memory\n"); return p; } void fftw_free(void *p) { if (p) { if (fftw_free_hook) { fftw_free_hook(p); return; } free(p); } } #endif /* die when fatal errors occur */ void fftw_die(const char *s) { if (fftw_die_hook) fftw_die_hook(s); fflush(stdout); fprintf(stderr, "fftw: %s", s); exit(EXIT_FAILURE); } /* check for memory leaks when debugging */ void fftw_check_memory_leaks(void) { extern int fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size; #ifdef FFTW_DEBUG if (fftw_malloc_cnt || fftw_malloc_total || fftw_node_cnt || fftw_plan_cnt || fftw_twiddle_size) { fflush(stdout); fprintf(stderr, "MEMORY LEAK!!!\n" "fftw_malloc = %d" " node=%d plan=%d twiddle=%d\n" "fftw_malloc_total = %d\n", fftw_malloc_cnt, fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size, fftw_malloc_total); exit(EXIT_FAILURE); } #else if (fftw_node_cnt || fftw_plan_cnt || fftw_twiddle_size) { fflush(stdout); fprintf(stderr, "MEMORY LEAK!!!\n" " node=%d plan=%d twiddle=%d\n", fftw_node_cnt, fftw_plan_cnt, fftw_twiddle_size); exit(EXIT_FAILURE); } #endif } void fftw_print_max_memory_usage(void) { #ifdef FFTW_DEBUG printf("\nMaximum number of blocks allocated = %d\n" "Maximum number of bytes allocated = %0.3f kB\n", fftw_malloc_cnt_max, fftw_malloc_max / 1024.0); #endif } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/wisdom.c����������������������������������������������������������������������������0000644�0001754�0000144�00000017247�07635206026�010603� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * wisdom.c -- manage the wisdom */ #include "fftw-int.h" #include #include #include struct wisdom { int n; int flags; fftw_direction dir; enum fftw_wisdom_category category; int istride; int ostride; int vector_size; enum fftw_node_type type; /* this is the wisdom */ int signature; /* this is the wisdom */ fftw_recurse_kind recurse_kind; /* this is the wisdom */ struct wisdom *next; }; /* list of wisdom */ static struct wisdom *wisdom_list = (struct wisdom *) 0; int fftw_wisdom_lookup(int n, int flags, fftw_direction dir, enum fftw_wisdom_category category, int istride, int ostride, enum fftw_node_type *type, int *signature, fftw_recurse_kind *recurse_kind, int replacep) { struct wisdom *p; if (!(flags & FFTW_USE_WISDOM)) return 0; /* simply ignore if wisdom is disabled */ flags |= FFTW_MEASURE; /* * always use (only) wisdom from * measurements */ for (p = wisdom_list; p; p = p->next) { if (p->n == n && p->flags == flags && p->dir == dir && p->istride == istride && p->ostride == ostride && p->category == category) { /* found wisdom */ if (replacep) { /* replace old wisdom with new */ p->type = *type; p->signature = *signature; p->recurse_kind = *recurse_kind; } else { *type = p->type; *signature = p->signature; *recurse_kind = p->recurse_kind; } return 1; } } return 0; } void fftw_wisdom_add(int n, int flags, fftw_direction dir, enum fftw_wisdom_category category, int istride, int ostride, enum fftw_node_type type, int signature, fftw_recurse_kind recurse_kind) { struct wisdom *p; if ((flags & FFTW_NO_VECTOR_RECURSE) && recurse_kind == FFTW_VECTOR_RECURSE) fftw_die("bug in planner (conflicting plan options)\n"); if (!(flags & FFTW_USE_WISDOM)) return; /* simply ignore if wisdom is disabled */ if (!(flags & FFTW_MEASURE)) return; /* only measurements produce wisdom */ if (fftw_wisdom_lookup(n, flags, dir, category, istride, ostride, &type, &signature, &recurse_kind, 1)) return; /* wisdom overwrote old wisdom */ p = (struct wisdom *) fftw_malloc(sizeof(struct wisdom)); p->n = n; p->flags = flags; p->dir = dir; p->category = category; p->istride = istride; p->ostride = ostride; p->type = type; p->signature = signature; p->recurse_kind = recurse_kind; /* remember this wisdom */ p->next = wisdom_list; wisdom_list = p; } void fftw_forget_wisdom(void) { while (wisdom_list) { struct wisdom *p; p = wisdom_list; wisdom_list = wisdom_list->next; fftw_free(p); } } /* * user-visible routines, to convert wisdom into strings etc. */ static const char *WISDOM_FORMAT_VERSION = "FFTW-" FFTW_VERSION; static void (*emit) (char c, void *data); static void emit_string(const char *s, void *data) { while (*s) emit(*s++, data); } static void emit_int(int n, void *data) { char buf[128]; sprintf(buf, "%d", n); emit_string(buf, data); } /* dump wisdom in lisp-like format */ void fftw_export_wisdom(void (*emitter) (char c, void *), void *data) { struct wisdom *p; /* install the output handler */ emit = emitter; emit('(', data); emit_string(WISDOM_FORMAT_VERSION, data); for (p = wisdom_list; p; p = p->next) { emit(' ', data); /* separator to make the output nicer */ emit('(', data); emit_int((int) p->n, data); emit(' ', data); emit_int((int) p->flags, data); emit(' ', data); emit_int((int) p->dir, data); emit(' ', data); emit_int((int) p->category, data); emit(' ', data); emit_int((int) p->istride, data); emit(' ', data); emit_int((int) p->ostride, data); emit(' ', data); emit_int((int) p->type, data); emit(' ', data); emit_int((int) p->signature, data); emit(' ', data); emit_int((int) p->recurse_kind, data); emit(')', data); } emit(')', data); } /* input part */ static int next_char; static int (*get_input) (void *data); static fftw_status input_error; static void read_char(void *data) { next_char = get_input(data); if (next_char == 0 || next_char == EOF) input_error = FFTW_FAILURE; } /* skip blanks, newlines, tabs, etc */ static void eat_blanks(void *data) { while (isspace(next_char)) read_char(data); } static int read_int(void *data) { int sign = 1; int n = 0; eat_blanks(data); if (next_char == '-') { sign = -1; read_char(data); eat_blanks(data); } if (!isdigit(next_char)) { /* error, no digit */ input_error = FFTW_FAILURE; return 0; } while (isdigit(next_char)) { n = n * 10 + (next_char - '0'); read_char(data); } return sign * n; } #define EXPECT(c) \ { \ eat_blanks(data); \ if (input_error == FFTW_FAILURE || \ next_char != c) \ return FFTW_FAILURE; \ read_char(data); \ } #define EXPECT_INT(n) \ { \ n = read_int(data); \ if (input_error == FFTW_FAILURE) \ return FFTW_FAILURE; \ } #define EXPECT_STRING(s) \ { \ const char *s1 = s; \ while (*s1) { \ EXPECT(*s1); \ ++s1; \ } \ } fftw_status fftw_import_wisdom(int (*g) (void *), void *data) { int n; int flags; fftw_direction dir; int dir_int; enum fftw_wisdom_category category; int category_int; enum fftw_node_type type; int recurse_kind_int; fftw_recurse_kind recurse_kind; int type_int; int signature; int istride, ostride; get_input = g; input_error = FFTW_SUCCESS; read_char(data); eat_blanks(data); EXPECT('('); eat_blanks(data); EXPECT_STRING(WISDOM_FORMAT_VERSION); eat_blanks(data); while (next_char != ')') { EXPECT('('); EXPECT_INT(n); EXPECT_INT(flags); /* paranoid respect for enumerated types */ EXPECT_INT(dir_int); dir = (fftw_direction) dir_int; EXPECT_INT(category_int); category = (enum fftw_wisdom_category) category_int; EXPECT_INT(istride); EXPECT_INT(ostride); EXPECT_INT(type_int); type = (enum fftw_node_type) type_int; EXPECT_INT(signature); EXPECT_INT(recurse_kind_int); recurse_kind = (fftw_recurse_kind) recurse_kind_int; eat_blanks(data); EXPECT(')'); /* the wisdom has been read properly. Add it */ fftw_wisdom_add(n, flags, dir, category, istride, ostride, type, signature, recurse_kind); /* prepare for next morsel of wisdom */ eat_blanks(data); } return FFTW_SUCCESS; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/wisdomio.c��������������������������������������������������������������������������0000644�0001754�0000144�00000004743�07635206026�011130� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include "fftw-int.h" /**************** import/export using file ***************/ static void file_emitter(char c, void *data) { putc(c, (FILE *) data); } void fftw_export_wisdom_to_file(FILE *output_file) { if (output_file) fftw_export_wisdom(file_emitter, (void *) output_file); } static int file_get_input(void *data) { return getc((FILE *) data); } fftw_status fftw_import_wisdom_from_file(FILE *input_file) { if (!input_file) return FFTW_FAILURE; return fftw_import_wisdom(file_get_input, (void *) input_file); } /*************** import/export using string **************/ static void emission_counter(char c, void *data) { int *counter = (int *) data; ++*counter; } static void string_emitter(char c, void *data) { char **output_string = (char **) data; *((*output_string)++) = c; **output_string = 0; } char *fftw_export_wisdom_to_string(void) { int string_length = 0; char *s, *s2; fftw_export_wisdom(emission_counter, (void *) &string_length); s = (char *) fftw_malloc(sizeof(char) * (string_length + 1)); if (!s) return 0; s2 = s; fftw_export_wisdom(string_emitter, (void *) &s2); if (s + string_length != s2) fftw_die("Unexpected output string length!\n"); return s; } static int string_get_input(void *data) { char **input_string = (char **) data; if (**input_string) return *((*input_string)++); else return 0; } fftw_status fftw_import_wisdom_from_string(const char *input_string) { const char *s = input_string; if (!input_string) return FFTW_FAILURE; return fftw_import_wisdom(string_get_input, (void *) &s); } �����������������������������fftw-2.1.5/fftw/putils.c����������������������������������������������������������������������������0000644�0001754�0000144�00000033316�07635206062�010614� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * putils.c -- plan utilities shared by planner.c and rplanner.c */ /* $Id: putils.c,v 1.21 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include int fftw_node_cnt = 0; int fftw_plan_cnt = 0; /* * These two constants are used for the FFTW_ESTIMATE flag to help * create a heuristic plan. They don't affect FFTW_MEASURE. */ #define NOTW_OPTIMAL_SIZE 32 #define TWIDDLE_OPTIMAL_SIZE 12 #define IS_POWER_OF_TWO(n) (((n) & ((n) - 1)) == 0) /* constructors --- I wish I had ML */ fftw_plan_node *fftw_make_node(void) { fftw_plan_node *p = (fftw_plan_node *) fftw_malloc(sizeof(fftw_plan_node)); p->refcnt = 0; fftw_node_cnt++; return p; } void fftw_use_node(fftw_plan_node *p) { ++p->refcnt; } fftw_plan_node *fftw_make_node_notw(int size, const fftw_codelet_desc *config) { fftw_plan_node *p = fftw_make_node(); p->type = config->type; p->nodeu.notw.size = size; p->nodeu.notw.codelet = (fftw_notw_codelet *) config->codelet; p->nodeu.notw.codelet_desc = config; return p; } fftw_plan_node *fftw_make_node_real2hc(int size, const fftw_codelet_desc *config) { fftw_plan_node *p = fftw_make_node(); p->type = config->type; p->nodeu.real2hc.size = size; p->nodeu.real2hc.codelet = (fftw_real2hc_codelet *) config->codelet; p->nodeu.real2hc.codelet_desc = config; return p; } fftw_plan_node *fftw_make_node_hc2real(int size, const fftw_codelet_desc *config) { fftw_plan_node *p = fftw_make_node(); p->type = config->type; p->nodeu.hc2real.size = size; p->nodeu.hc2real.codelet = (fftw_hc2real_codelet *) config->codelet; p->nodeu.hc2real.codelet_desc = config; return p; } fftw_plan_node *fftw_make_node_twiddle(int n, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags) { fftw_plan_node *p = fftw_make_node(); p->type = config->type; p->nodeu.twiddle.size = config->size; p->nodeu.twiddle.codelet = (fftw_twiddle_codelet *) config->codelet; p->nodeu.twiddle.recurse = recurse; p->nodeu.twiddle.codelet_desc = config; fftw_use_node(recurse); if (flags & FFTW_MEASURE) p->nodeu.twiddle.tw = fftw_create_twiddle(n, config); else p->nodeu.twiddle.tw = 0; return p; } fftw_plan_node *fftw_make_node_hc2hc(int n, fftw_direction dir, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags) { fftw_plan_node *p = fftw_make_node(); p->type = config->type; p->nodeu.hc2hc.size = config->size; p->nodeu.hc2hc.dir = dir; p->nodeu.hc2hc.codelet = (fftw_hc2hc_codelet *) config->codelet; p->nodeu.hc2hc.recurse = recurse; p->nodeu.hc2hc.codelet_desc = config; fftw_use_node(recurse); if (flags & FFTW_MEASURE) p->nodeu.hc2hc.tw = fftw_create_twiddle(n, config); else p->nodeu.hc2hc.tw = 0; return p; } fftw_plan_node *fftw_make_node_generic(int n, int size, fftw_generic_codelet *codelet, fftw_plan_node *recurse, int flags) { fftw_plan_node *p = fftw_make_node(); p->type = FFTW_GENERIC; p->nodeu.generic.size = size; p->nodeu.generic.codelet = codelet; p->nodeu.generic.recurse = recurse; fftw_use_node(recurse); if (flags & FFTW_MEASURE) p->nodeu.generic.tw = fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); else p->nodeu.generic.tw = 0; return p; } fftw_plan_node *fftw_make_node_rgeneric(int n, int size, fftw_direction dir, fftw_rgeneric_codelet *codelet, fftw_plan_node *recurse, int flags) { fftw_plan_node *p = fftw_make_node(); if (size % 2 == 0 || (n / size) % 2 == 0) fftw_die("invalid size for rgeneric codelet\n"); p->type = FFTW_RGENERIC; p->nodeu.rgeneric.size = size; p->nodeu.rgeneric.dir = dir; p->nodeu.rgeneric.codelet = codelet; p->nodeu.rgeneric.recurse = recurse; fftw_use_node(recurse); if (flags & FFTW_MEASURE) p->nodeu.rgeneric.tw = fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); else p->nodeu.rgeneric.tw = 0; return p; } /* * Note that these two Rader-related things must go here, rather than * in rader.c, in order that putils.c (and rplanner.c) won't depend * upon rader.c. */ fftw_rader_data *fftw_rader_top = NULL; static void fftw_destroy_rader(fftw_rader_data * d) { if (d) { d->refcount--; if (d->refcount <= 0) { fftw_rader_data *cur = fftw_rader_top, *prev = NULL; while (cur && cur != d) { prev = cur; cur = cur->next; } if (!cur) fftw_die("invalid Rader data pointer\n"); if (prev) prev->next = d->next; else fftw_rader_top = d->next; fftw_destroy_plan_internal(d->plan); fftw_free(d->omega); fftw_free(d->cdesc); fftw_free(d); } } } static void destroy_tree(fftw_plan_node *p) { if (p) { --p->refcnt; if (p->refcnt == 0) { switch (p->type) { case FFTW_NOTW: case FFTW_REAL2HC: case FFTW_HC2REAL: break; case FFTW_TWIDDLE: if (p->nodeu.twiddle.tw) fftw_destroy_twiddle(p->nodeu.twiddle.tw); destroy_tree(p->nodeu.twiddle.recurse); break; case FFTW_HC2HC: if (p->nodeu.hc2hc.tw) fftw_destroy_twiddle(p->nodeu.hc2hc.tw); destroy_tree(p->nodeu.hc2hc.recurse); break; case FFTW_GENERIC: if (p->nodeu.generic.tw) fftw_destroy_twiddle(p->nodeu.generic.tw); destroy_tree(p->nodeu.generic.recurse); break; case FFTW_RADER: if (p->nodeu.rader.tw) fftw_destroy_twiddle(p->nodeu.rader.tw); if (p->nodeu.rader.rader_data) fftw_destroy_rader(p->nodeu.rader.rader_data); destroy_tree(p->nodeu.rader.recurse); break; case FFTW_RGENERIC: if (p->nodeu.rgeneric.tw) fftw_destroy_twiddle(p->nodeu.rgeneric.tw); destroy_tree(p->nodeu.rgeneric.recurse); break; } fftw_free(p); fftw_node_cnt--; } } } /* create a plan with twiddle factors, and other bells and whistles */ fftw_plan fftw_make_plan(int n, fftw_direction dir, fftw_plan_node *root, int flags, enum fftw_node_type wisdom_type, int wisdom_signature, fftw_recurse_kind recurse_kind, int vector_size) { fftw_plan p = (fftw_plan) fftw_malloc(sizeof(struct fftw_plan_struct)); p->n = n; p->dir = dir; p->flags = flags; fftw_use_node(root); p->root = root; p->cost = 0.0; p->wisdom_type = wisdom_type; p->wisdom_signature = wisdom_signature; p->recurse_kind = recurse_kind; p->vector_size = vector_size; if (recurse_kind == FFTW_VECTOR_RECURSE && vector_size > 1) fftw_die("invalid vector-recurse plan attempted\n"); p->next = (fftw_plan) 0; p->refcnt = 0; fftw_plan_cnt++; return p; } /* * complete with twiddle factors (because nodes don't have * them when FFTW_ESTIMATE is set) */ void fftw_complete_twiddle(fftw_plan_node *p, int n) { int r; switch (p->type) { case FFTW_NOTW: case FFTW_REAL2HC: case FFTW_HC2REAL: break; case FFTW_TWIDDLE: r = p->nodeu.twiddle.size; if (!p->nodeu.twiddle.tw) p->nodeu.twiddle.tw = fftw_create_twiddle(n, p->nodeu.twiddle.codelet_desc); fftw_complete_twiddle(p->nodeu.twiddle.recurse, n / r); break; case FFTW_HC2HC: r = p->nodeu.hc2hc.size; if (!p->nodeu.hc2hc.tw) p->nodeu.hc2hc.tw = fftw_create_twiddle(n, p->nodeu.hc2hc.codelet_desc); fftw_complete_twiddle(p->nodeu.hc2hc.recurse, n / r); break; case FFTW_GENERIC: r = p->nodeu.generic.size; if (!p->nodeu.generic.tw) p->nodeu.generic.tw = fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); fftw_complete_twiddle(p->nodeu.generic.recurse, n / r); break; case FFTW_RADER: r = p->nodeu.rader.size; if (!p->nodeu.rader.tw) p->nodeu.rader.tw = fftw_create_twiddle(n, p->nodeu.rader.rader_data->cdesc); fftw_complete_twiddle(p->nodeu.rader.recurse, n / r); break; case FFTW_RGENERIC: r = p->nodeu.rgeneric.size; if (!p->nodeu.rgeneric.tw) p->nodeu.rgeneric.tw = fftw_create_twiddle(n, (const fftw_codelet_desc *) 0); fftw_complete_twiddle(p->nodeu.rgeneric.recurse, n / r); break; } } void fftw_use_plan(fftw_plan p) { ++p->refcnt; } void fftw_destroy_plan_internal(fftw_plan p) { --p->refcnt; if (p->refcnt == 0) { destroy_tree(p->root); fftw_plan_cnt--; fftw_free(p); } } /* end of constructors */ /* management of plan tables */ void fftw_make_empty_table(fftw_plan *table) { *table = (fftw_plan) 0; } void fftw_insert(fftw_plan *table, fftw_plan this_plan) { fftw_use_plan(this_plan); this_plan->next = *table; *table = this_plan; } fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size) { fftw_plan p; for (p = *table; p && (p->n != n || p->flags != flags || p->vector_size != vector_size); p = p->next); return p; } void fftw_destroy_table(fftw_plan *table) { fftw_plan p, q; for (p = *table; p; p = q) { q = p->next; fftw_destroy_plan_internal(p); } } double fftw_estimate_node(fftw_plan_node *p) { int k; switch (p->type) { case FFTW_NOTW: k = p->nodeu.notw.size; goto common1; case FFTW_REAL2HC: k = p->nodeu.real2hc.size; goto common1; case FFTW_HC2REAL: k = p->nodeu.hc2real.size; common1: return 1.0 + 0.1 * (k - NOTW_OPTIMAL_SIZE) * (k - NOTW_OPTIMAL_SIZE); case FFTW_TWIDDLE: k = p->nodeu.twiddle.size; return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) * (k - TWIDDLE_OPTIMAL_SIZE) + fftw_estimate_node(p->nodeu.twiddle.recurse); case FFTW_HC2HC: k = p->nodeu.hc2hc.size; return 1.0 + 0.1 * (k - TWIDDLE_OPTIMAL_SIZE) * (k - TWIDDLE_OPTIMAL_SIZE) + fftw_estimate_node(p->nodeu.hc2hc.recurse); case FFTW_GENERIC: k = p->nodeu.generic.size; return 10.0 + k * k + fftw_estimate_node(p->nodeu.generic.recurse); case FFTW_RADER: k = p->nodeu.rader.size; return 10.0 + 10 * k + fftw_estimate_node(p->nodeu.rader.recurse); case FFTW_RGENERIC: k = p->nodeu.rgeneric.size; return 10.0 + k * k + fftw_estimate_node(p->nodeu.rgeneric.recurse); } return 1.0E20; } /* pick the better of two plans and destroy the other one. */ fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2) { if (!p1) return p2; if (!p2) return p1; if (p1->cost > p2->cost) { fftw_destroy_plan_internal(p1); return p2; } else { fftw_destroy_plan_internal(p2); return p1; } } /* find the smallest prime factor of n */ int fftw_factor(int n) { int r; /* try 2 */ if ((n & 1) == 0) return 2; /* try odd numbers up to sqrt(n) */ for (r = 3; r * r <= n; r += 2) if (n % r == 0) return r; /* n is prime */ return n; } static void print_node(FILE *f, fftw_plan_node *p, int indent) { if (p) { switch (p->type) { case FFTW_NOTW: fprintf(f, "%*sFFTW_NOTW %d\n", indent, "", p->nodeu.notw.size); break; case FFTW_REAL2HC: fprintf(f, "%*sFFTW_REAL2HC %d\n", indent, "", p->nodeu.real2hc.size); break; case FFTW_HC2REAL: fprintf(f, "%*sFFTW_HC2REAL %d\n", indent, "", p->nodeu.hc2real.size); break; case FFTW_TWIDDLE: fprintf(f, "%*sFFTW_TWIDDLE %d\n", indent, "", p->nodeu.twiddle.size); print_node(f, p->nodeu.twiddle.recurse, indent); break; case FFTW_HC2HC: fprintf(f, "%*sFFTW_HC2HC %d\n", indent, "", p->nodeu.hc2hc.size); print_node(f, p->nodeu.hc2hc.recurse, indent); break; case FFTW_GENERIC: fprintf(f, "%*sFFTW_GENERIC %d\n", indent, "", p->nodeu.generic.size); print_node(f, p->nodeu.generic.recurse, indent); break; case FFTW_RADER: fprintf(f, "%*sFFTW_RADER %d\n", indent, "", p->nodeu.rader.size); fprintf(f, "%*splan for size %d convolution:\n", indent + 4, "", p->nodeu.rader.size - 1); print_node(f, p->nodeu.rader.rader_data->plan->root, indent + 6); print_node(f, p->nodeu.rader.recurse, indent); break; case FFTW_RGENERIC: fprintf(f, "%*sFFTW_RGENERIC %d\n", indent, "", p->nodeu.rgeneric.size); print_node(f, p->nodeu.rgeneric.recurse, indent); break; } } } void fftw_fprint_plan(FILE *f, fftw_plan p) { fprintf(f, "plan: (cost = %e)\n", p->cost); if (p->recurse_kind == FFTW_VECTOR_RECURSE) fprintf(f, "(vector recursion)\n"); else if (p->vector_size > 1) fprintf(f, "(vector-size %d)\n", p->vector_size); print_node(f, p->root, 0); } void fftw_print_plan(fftw_plan p) { fftw_fprint_plan(stdout, p); } size_t fftw_sizeof_fftw_real(void) { return(sizeof(fftw_real)); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/rader.c�����������������������������������������������������������������������������0000644�0001754�0000144�00000024564�07635206026�010376� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * Compute transforms of prime sizes using Rader's trick: turn them * into convolutions of size n - 1, which you then perform via a pair * of FFTs. */ #include #include #include "fftw-int.h" #ifdef FFTW_DEBUG #define WHEN_DEBUG(a) a #else #define WHEN_DEBUG(a) #endif /* compute n^m mod p, where m >= 0 and p > 0. */ static int power_mod(int n, int m, int p) { if (m == 0) return 1; else if (m % 2 == 0) { int x = power_mod(n, m / 2, p); return MULMOD(x, x, p); } else return MULMOD(n, power_mod(n, m - 1, p), p); } /* * Find the period of n in the multiplicative group mod p (p prime). * That is, return the smallest m such that n^m == 1 mod p. */ static int period(int n, int p) { int prod = n, period = 1; while (prod != 1) { prod = MULMOD(prod, n, p); ++period; if (prod == 0) fftw_die("non-prime order in Rader\n"); } return period; } /* find a generator for the multiplicative group mod p, where p is prime */ static int find_generator(int p) { int g; for (g = 1; g < p; ++g) if (period(g, p) == p - 1) break; if (g == p) fftw_die("couldn't find generator for Rader\n"); return g; } /***************************************************************************/ static fftw_rader_data *create_rader_aux(int p, int flags) { fftw_complex *omega, *work; int g, ginv, gpower; int i; FFTW_TRIG_REAL twoPiOverN; fftw_real scale = 1.0 / (p - 1); /* for convolution */ fftw_plan plan; fftw_rader_data *d; if (p < 2) fftw_die("non-prime order in Rader\n"); flags &= ~FFTW_IN_PLACE; d = (fftw_rader_data *) fftw_malloc(sizeof(fftw_rader_data)); g = find_generator(p); ginv = power_mod(g, p - 2, p); omega = (fftw_complex *) fftw_malloc((p - 1) * sizeof(fftw_complex)); plan = fftw_create_plan(p - 1, FFTW_FORWARD, flags & ~FFTW_NO_VECTOR_RECURSE); work = (fftw_complex *) fftw_malloc((p - 1) * sizeof(fftw_complex)); twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) p; gpower = 1; for (i = 0; i < p - 1; ++i) { c_re(work[i]) = scale * FFTW_TRIG_COS(twoPiOverN * gpower); c_im(work[i]) = FFTW_FORWARD * scale * FFTW_TRIG_SIN(twoPiOverN * gpower); gpower = MULMOD(gpower, ginv, p); } /* fft permuted roots of unity */ fftw_executor_simple(p - 1, work, omega, plan->root, 1, 1, plan->recurse_kind); fftw_free(work); d->plan = plan; d->omega = omega; d->g = g; d->ginv = ginv; d->p = p; d->flags = flags; d->refcount = 1; d->next = NULL; d->cdesc = (fftw_codelet_desc *) fftw_malloc(sizeof(fftw_codelet_desc)); d->cdesc->name = NULL; d->cdesc->codelet = NULL; d->cdesc->size = p; d->cdesc->dir = FFTW_FORWARD; d->cdesc->type = FFTW_RADER; d->cdesc->signature = g; d->cdesc->ntwiddle = 0; d->cdesc->twiddle_order = NULL; return d; } /***************************************************************************/ static fftw_rader_data *fftw_create_rader(int p, int flags) { fftw_rader_data *d = fftw_rader_top; flags &= ~FFTW_IN_PLACE; while (d && (d->p != p || d->flags != flags)) d = d->next; if (d) { d->refcount++; return d; } d = create_rader_aux(p, flags); d->next = fftw_rader_top; fftw_rader_top = d; return d; } /***************************************************************************/ /* Compute the prime FFTs, premultiplied by twiddle factors. Below, we * extensively use the identity that fft(x*)* = ifft(x) in order to * share data between forward and backward transforms and to obviate * the necessity of having separate forward and backward plans. */ void fftw_twiddle_rader(fftw_complex *A, const fftw_complex *W, int m, int r, int stride, fftw_rader_data * d) { fftw_complex *tmp = (fftw_complex *) fftw_malloc((r - 1) * sizeof(fftw_complex)); int i, k, gpower = 1, g = d->g, ginv = d->ginv; fftw_real a0r, a0i; fftw_complex *omega = d->omega; for (i = 0; i < m; ++i, A += stride, W += r - 1) { /* * Here, we fft W[k-1] * A[k*(m*stride)], using Rader. * (Actually, W is pre-permuted to match the permutation that we * will do on A.) */ /* First, permute the input and multiply by W, storing in tmp: */ /* gpower == g^k mod r in the following loop */ for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, g, r)) { fftw_real rA, iA, rW, iW; rW = c_re(W[k]); iW = c_im(W[k]); rA = c_re(A[gpower * (m * stride)]); iA = c_im(A[gpower * (m * stride)]); c_re(tmp[k]) = rW * rA - iW * iA; c_im(tmp[k]) = rW * iA + iW * rA; } WHEN_DEBUG( { if (gpower != 1) fftw_die("incorrect generator in Rader\n"); } ); /* FFT tmp to A: */ fftw_executor_simple(r - 1, tmp, A + (m * stride), d->plan->root, 1, m * stride, d->plan->recurse_kind); /* set output DC component: */ a0r = c_re(A[0]); a0i = c_im(A[0]); c_re(A[0]) += c_re(A[(m * stride)]); c_im(A[0]) += c_im(A[(m * stride)]); /* now, multiply by omega: */ for (k = 0; k < r - 1; ++k) { fftw_real rA, iA, rW, iW; rW = c_re(omega[k]); iW = c_im(omega[k]); rA = c_re(A[(k + 1) * (m * stride)]); iA = c_im(A[(k + 1) * (m * stride)]); c_re(A[(k + 1) * (m * stride)]) = rW * rA - iW * iA; c_im(A[(k + 1) * (m * stride)]) = -(rW * iA + iW * rA); } /* this will add A[0] to all of the outputs after the ifft */ c_re(A[(m * stride)]) += a0r; c_im(A[(m * stride)]) -= a0i; /* inverse FFT: */ fftw_executor_simple(r - 1, A + (m * stride), tmp, d->plan->root, m * stride, 1, d->plan->recurse_kind); /* finally, do inverse permutation to unshuffle the output: */ for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, ginv, r)) { c_re(A[gpower * (m * stride)]) = c_re(tmp[k]); c_im(A[gpower * (m * stride)]) = -c_im(tmp[k]); } WHEN_DEBUG( { if (gpower != 1) fftw_die("incorrect generator in Rader\n"); } ); } fftw_free(tmp); } void fftwi_twiddle_rader(fftw_complex *A, const fftw_complex *W, int m, int r, int stride, fftw_rader_data * d) { fftw_complex *tmp = (fftw_complex *) fftw_malloc((r - 1) * sizeof(fftw_complex)); int i, k, gpower = 1, g = d->g, ginv = d->ginv; fftw_real a0r, a0i; fftw_complex *omega = d->omega; for (i = 0; i < m; ++i, A += stride, W += r - 1) { /* * Here, we fft W[k-1]* * A[k*(m*stride)], using Rader. * (Actually, W is pre-permuted to match the permutation that * we will do on A.) */ /* First, permute the input and multiply by W*, storing in tmp: */ /* gpower == g^k mod r in the following loop */ for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, g, r)) { fftw_real rA, iA, rW, iW; rW = c_re(W[k]); iW = c_im(W[k]); rA = c_re(A[gpower * (m * stride)]); iA = c_im(A[gpower * (m * stride)]); c_re(tmp[k]) = rW * rA + iW * iA; c_im(tmp[k]) = iW * rA - rW * iA; } WHEN_DEBUG( { if (gpower != 1) fftw_die("incorrect generator in Rader\n"); } ); /* FFT tmp to A: */ fftw_executor_simple(r - 1, tmp, A + (m * stride), d->plan->root, 1, m * stride, d->plan->recurse_kind); /* set output DC component: */ a0r = c_re(A[0]); a0i = c_im(A[0]); c_re(A[0]) += c_re(A[(m * stride)]); c_im(A[0]) -= c_im(A[(m * stride)]); /* now, multiply by omega: */ for (k = 0; k < r - 1; ++k) { fftw_real rA, iA, rW, iW; rW = c_re(omega[k]); iW = c_im(omega[k]); rA = c_re(A[(k + 1) * (m * stride)]); iA = c_im(A[(k + 1) * (m * stride)]); c_re(A[(k + 1) * (m * stride)]) = rW * rA - iW * iA; c_im(A[(k + 1) * (m * stride)]) = -(rW * iA + iW * rA); } /* this will add A[0] to all of the outputs after the ifft */ c_re(A[(m * stride)]) += a0r; c_im(A[(m * stride)]) += a0i; /* inverse FFT: */ fftw_executor_simple(r - 1, A + (m * stride), tmp, d->plan->root, m * stride, 1, d->plan->recurse_kind); /* finally, do inverse permutation to unshuffle the output: */ for (k = 0; k < r - 1; ++k, gpower = MULMOD(gpower, ginv, r)) { A[gpower * (m * stride)] = tmp[k]; } WHEN_DEBUG( { if (gpower != 1) fftw_die("incorrect generator in Rader\n"); } ); } fftw_free(tmp); } /***************************************************************************/ /* * Make an FFTW_RADER plan node. Note that this function must go * here, rather than in putils.c, because it indirectly calls the * fftw_planner. If we included it in putils.c, which is also used * by rfftw, then any program using rfftw would be linked with all * of the FFTW codelets, even if they were not needed. I wish that the * darn linkers operated on a function rather than a file granularity. */ fftw_plan_node *fftw_make_node_rader(int n, int size, fftw_direction dir, fftw_plan_node *recurse, int flags) { fftw_plan_node *p = fftw_make_node(); p->type = FFTW_RADER; p->nodeu.rader.size = size; p->nodeu.rader.codelet = dir == FFTW_FORWARD ? fftw_twiddle_rader : fftwi_twiddle_rader; p->nodeu.rader.rader_data = fftw_create_rader(size, flags); p->nodeu.rader.recurse = recurse; fftw_use_node(recurse); if (flags & FFTW_MEASURE) p->nodeu.rader.tw = fftw_create_twiddle(n, p->nodeu.rader.rader_data->cdesc); else p->nodeu.rader.tw = 0; return p; } ��������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fftwf77.c���������������������������������������������������������������������������0000644�0001754�0000144�00000010440�07635543316�010565� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw.h" #include "config.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ /* fftwf77.c: FORTRAN-callable "wrappers" for some of the FFTW routines. To make these routines callable from FORTRAN, three things had to be done: * The routine names have to be in the style that is expected by the FORTRAN linker. This is accomplished with the F77_FUNC_ macro. (See AC_F77_WRAPPERS in the autoconf manual.) * All parameters must be passed by reference. * Return values had to be converted into parameters (some Fortran implementations seem to have trouble calling C functions that return a value). Note that the "fftw_plan" and "fftwnd_plan" types are pointers. The calling FORTRAN code should use a type of the same size (probably "integer"). The wrapper routines have the same name as the wrapped routine, except that "fftw" and "fftwnd" are replaced by "fftw_f77" and "fftwnd_f77". */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ void F77_FUNC_(fftw_f77_create_plan,FFTW_F77_CREATE_PLAN) (fftw_plan *p, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw_create_plan(*n,dir,*flags); } void F77_FUNC_(fftw_f77_destroy_plan,FFTW_F77_DESTROY_PLAN) (fftw_plan *p) { fftw_destroy_plan(*p); } void F77_FUNC_(fftw_f77,FFTW_F77) (fftw_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { fftw(*p,*howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(fftw_f77_one,FFTW_F77_ONE) (fftw_plan *p, fftw_complex *in, fftw_complex *out) { fftw_one(*p,in,out); } void fftw_reverse_int_array(int *a, int n) { int i; for (i = 0; i < n/2; ++i) { int swap_dummy = a[i]; a[i] = a[n - 1 - i]; a[n - 1 - i] = swap_dummy; } } void F77_FUNC_(fftwnd_f77_create_plan,FFTWND_F77_CREATE_PLAN) (fftwnd_plan *p, int *rank, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; fftw_reverse_int_array(n,*rank); /* column-major -> row-major */ *p = fftwnd_create_plan(*rank,n,dir,*flags); fftw_reverse_int_array(n,*rank); /* reverse back */ } void F77_FUNC_(fftw2d_f77_create_plan,FFTW2D_F77_CREATE_PLAN) (fftwnd_plan *p, int *nx, int *ny, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw2d_create_plan(*ny,*nx,dir,*flags); } void F77_FUNC_(fftw3d_f77_create_plan,FFTW3D_F77_CREATE_PLAN) (fftwnd_plan *p, int *nx, int *ny, int *nz, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw3d_create_plan(*nz,*ny,*nx,dir,*flags); } void F77_FUNC_(fftwnd_f77_destroy_plan,FFTWND_F77_DESTROY_PLAN) (fftwnd_plan *p) { fftwnd_destroy_plan(*p); } void F77_FUNC_(fftwnd_f77,FFTWND_F77) (fftwnd_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { fftwnd(*p,*howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(fftwnd_f77_one,FFTWND_F77_ONE) (fftwnd_plan *p, fftw_complex *in, fftw_complex *out) { fftwnd_one(*p,in,out); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/fftw-int.h��������������������������������������������������������������������������0000644�0001754�0000144�00000041321�07635206062�011032� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftw.h -- system-wide definitions */ /* $Id: fftw-int.h,v 1.54 2003/03/16 23:43:46 stevenj Exp $ */ #ifndef FFTW_INT_H #define FFTW_INT_H #include "config.h" #include "fftw.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /****************************************************************************/ /* Private Functions */ /****************************************************************************/ extern fftw_twiddle *fftw_create_twiddle(int n, const fftw_codelet_desc *d); extern void fftw_destroy_twiddle(fftw_twiddle *tw); extern void fftw_strided_copy(int, fftw_complex *, int, fftw_complex *); extern void fftw_executor_simple(int, const fftw_complex *, fftw_complex *, fftw_plan_node *, int, int, fftw_recurse_kind recurse_kind); extern fftwnd_plan fftwnd_create_plan_aux(int rank, const int *n, fftw_direction dir, int flags); extern fftw_plan *fftwnd_new_plan_array(int rank); extern fftw_plan *fftwnd_create_plans_generic(fftw_plan *plans, int rank, const int *n, fftw_direction dir, int flags); extern fftw_plan *fftwnd_create_plans_specific(fftw_plan *plans, int rank, const int *n, const int *n_after, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); extern int fftwnd_work_size(int rank, const int *n, int flags, int ncopies); extern void fftwnd_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_complex *out, int ostride, fftw_complex *work); extern void fftwnd_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work); /* wisdom prototypes */ enum fftw_wisdom_category { FFTW_WISDOM, RFFTW_WISDOM }; extern int fftw_wisdom_lookup(int n, int flags, fftw_direction dir, enum fftw_wisdom_category category, int istride, int ostride, enum fftw_node_type *type, int *signature, fftw_recurse_kind *recurse_kind, int replace_p); extern void fftw_wisdom_add(int n, int flags, fftw_direction dir, enum fftw_wisdom_category cat, int istride, int ostride, enum fftw_node_type type, int signature, fftw_recurse_kind recurse_kind); /* Private planner functions: */ extern double fftw_estimate_node(fftw_plan_node *p); extern fftw_plan_node *fftw_make_node_notw(int size, const fftw_codelet_desc *config); extern fftw_plan_node *fftw_make_node_real2hc(int size, const fftw_codelet_desc *config); extern fftw_plan_node *fftw_make_node_hc2real(int size, const fftw_codelet_desc *config); extern fftw_plan_node *fftw_make_node_twiddle(int n, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags); extern fftw_plan_node *fftw_make_node_hc2hc(int n, fftw_direction dir, const fftw_codelet_desc *config, fftw_plan_node *recurse, int flags); extern fftw_plan_node *fftw_make_node_generic(int n, int size, fftw_generic_codelet *codelet, fftw_plan_node *recurse, int flags); extern fftw_plan_node *fftw_make_node_rgeneric(int n, int size, fftw_direction dir, fftw_rgeneric_codelet * codelet, fftw_plan_node *recurse, int flags); extern int fftw_factor(int n); extern fftw_plan_node *fftw_make_node(void); extern fftw_plan fftw_make_plan(int n, fftw_direction dir, fftw_plan_node *root, int flags, enum fftw_node_type wisdom_type, int wisdom_signature, fftw_recurse_kind recurse_kind, int vector_size); extern void fftw_use_plan(fftw_plan p); extern void fftw_use_node(fftw_plan_node *p); extern void fftw_destroy_plan_internal(fftw_plan p); extern fftw_plan fftw_pick_better(fftw_plan p1, fftw_plan p2); extern fftw_plan fftw_lookup(fftw_plan *table, int n, int flags, int vector_size); extern void fftw_insert(fftw_plan *table, fftw_plan this_plan); extern void fftw_make_empty_table(fftw_plan *table); extern void fftw_destroy_table(fftw_plan *table); extern void fftw_complete_twiddle(fftw_plan_node *p, int n); extern fftw_plan_node *fftw_make_node_rader(int n, int size, fftw_direction dir, fftw_plan_node *recurse, int flags); extern fftw_rader_data *fftw_rader_top; /* undocumented debugging hook */ typedef void (*fftw_plan_hook_ptr) (fftw_plan plan); extern DL_IMPORT(fftw_plan_hook_ptr) fftw_plan_hook; extern DL_IMPORT(fftw_plan_hook_ptr) rfftw_plan_hook; /****************************************************************************/ /* Overflow-safe multiply */ /****************************************************************************/ /* The Rader routines do a lot of operations of the form (x * y) % p, which are vulnerable to overflow problems for large p. To get around this, we either use "long long" arithmetic (if it is available and double the size of int), or default to a subroutine defined in twiddle.c. */ #if defined(FFTW_ENABLE_UNSAFE_MULMOD) # define MULMOD(x,y,p) (((x) * (y)) % (p)) #elif defined(LONGLONG_IS_TWOINTS) # define MULMOD(x,y,p) ((int) ((((long long) (x)) * ((long long) (y))) \ % ((long long) (p)))) #else # define USE_FFTW_SAFE_MULMOD # define MULMOD(x,y,p) fftw_safe_mulmod(x,y,p) extern int fftw_safe_mulmod(int x, int y, int p); #endif /****************************************************************************/ /* Floating Point Types */ /****************************************************************************/ /* * We use these definitions to make it easier for people to change * FFTW to use long double and similar types. You shouldn't have to * change this just to use float or double. */ /* * Change this if your floating-point constants need to be expressed * in a special way. For example, if fftw_real is long double, you * will need to append L to your fp constants to make them of the * same precision. Do this by changing "x" below to "x##L". */ #define FFTW_KONST(x) ((fftw_real) x) /* * Ordinarily, we use the standard sin/cos functions to compute trig. * constants. You'll need to change these if fftw_real has more * than double precision. */ #define FFTW_TRIG_SIN sin #define FFTW_TRIG_COS cos typedef double FFTW_TRIG_REAL; /* the argument type for sin and cos */ #define FFTW_K2PI FFTW_KONST(6.2831853071795864769252867665590057683943388) /****************************************************************************/ /* gcc/x86 hacks */ /****************************************************************************/ /* * gcc 2.[78].x and x86 specific hacks. These macros align the stack * pointer so that the double precision temporary variables in the * codelets will be aligned to a multiple of 8 bytes (*way* faster on * pentium and pentiumpro) */ #ifdef __GNUC__ # ifdef __i386__ # ifdef FFTW_ENABLE_I386_HACKS # ifndef FFTW_GCC_ALIGNS_STACK # ifndef FFTW_ENABLE_FLOAT # define FFTW_USING_I386_HACKS # define HACK_ALIGN_STACK_EVEN { \ if ((((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ } # define HACK_ALIGN_STACK_ODD { \ if (!(((long) (__builtin_alloca(0))) & 0x7)) __builtin_alloca(4); \ } # endif /* ! FFTW_ENABLE_FLOAT */ # endif /* ! FFTW_GCC_ALIGNS_STACK */ # endif /* FFTW_ENABLE_I386_HACKS */ # ifdef FFTW_DEBUG_ALIGNMENT # define ASSERT_ALIGNED_DOUBLE { \ double __foo; \ if ((((long) &__foo) & 0x7)) abort(); \ } # endif /* FFTW_DEBUG_ALIGNMENT */ # endif /* __i386__ */ #endif /* __GNUC__ */ #ifndef HACK_ALIGN_STACK_EVEN # define HACK_ALIGN_STACK_EVEN {} #endif #ifndef HACK_ALIGN_STACK_ODD # define HACK_ALIGN_STACK_ODD {} #endif #ifndef ASSERT_ALIGNED_DOUBLE # define ASSERT_ALIGNED_DOUBLE {} #endif /****************************************************************************/ /* Timers */ /****************************************************************************/ /* * Here, you can use all the nice timers available in your machine. */ /* * Things you should define to include your own clock: fftw_time -- the data type used to store a time extern fftw_time fftw_get_time(void); -- a function returning the current time. (We have implemented this as a macro in most cases.) extern fftw_time fftw_time_diff(fftw_time t1, fftw_time t2); -- returns the time difference (t1 - t2). If t1 < t2, it may simply return zero (although this is not required). (We have implemented this as a macro in most cases.) extern double fftw_time_to_sec(fftw_time t); -- returns the time t expressed in seconds, as a double. (Implemented as a macro in most cases.) FFTW_TIME_MIN -- a double-precision macro holding the minimum time interval (in seconds) for accurate time measurements. This should probably be at least 100 times the precision of your clock (we use even longer intervals, to be conservative). This will determine how long the planner takes to measure the speeds of different possible plans. Bracket all of your definitions with an appropriate #ifdef so that they will be enabled on your machine. If you do add your own high-precision timer code, let us know (at fftw@fftw.org). Only declarations should go in this file. Any function definitions that you need should go into timer.c. */ /* * define a symbol so that we know that we have the fftw_time_diff * function/macro (it did not exist prior to FFTW 1.2) */ #define FFTW_HAS_TIME_DIFF /********************************************** * SOLARIS **********************************************/ #if defined(HAVE_GETHRTIME) && defined(HAVE_HRTIME_T) /* we use the nanosecond virtual timer */ #ifdef HAVE_SYS_TIME_H #include #endif typedef hrtime_t fftw_time; #define fftw_get_time() gethrtime() #define fftw_time_diff(t1,t2) ((t1) - (t2)) #define fftw_time_to_sec(t) ((double) t / 1.0e9) /* * a measurement is valid if it runs for at least * FFTW_TIME_MIN seconds. */ #define FFTW_TIME_MIN (1.0e-4) /* for Solaris nanosecond timer */ #define FFTW_TIME_REPEAT 8 /********************************************** * Pentium time stamp counter **********************************************/ #elif defined(__GNUC__) && defined(__i386__) && defined(FFTW_ENABLE_PENTIUM_TIMER) /* * Use internal Pentium register (time stamp counter). Resolution * is 1/FFTW_CYCLES_PER_SEC seconds (e.g. 5 ns for Pentium 200 MHz). * (This code was contributed by Wolfgang Reimer) */ #ifndef FFTW_CYCLES_PER_SEC #error "Must define FFTW_CYCLES_PER_SEC in fftw/config.h to use the Pentium cycle counter" #endif typedef unsigned long long fftw_time; static __inline__ fftw_time read_tsc() { fftw_time ret; __asm__ __volatile__("rdtsc": "=A" (ret)); /* no input, nothing else clobbered */ return ret; } #define fftw_get_time() read_tsc() #define fftw_time_diff(t1,t2) ((t1) - (t2)) #define fftw_time_to_sec(t) (((double) (t)) / FFTW_CYCLES_PER_SEC) #define FFTW_TIME_MIN (1.0e-4) /* for Pentium TSC register */ /************* generic systems having gettimeofday ************/ #elif defined(HAVE_GETTIMEOFDAY) || defined(HAVE_BSDGETTIMEOFDAY) #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #define FFTW_USE_GETTIMEOFDAY typedef struct timeval fftw_time; extern fftw_time fftw_gettimeofday_get_time(void); extern fftw_time fftw_gettimeofday_time_diff(fftw_time t1, fftw_time t2); #define fftw_get_time() fftw_gettimeofday_get_time() #define fftw_time_diff(t1, t2) fftw_gettimeofday_time_diff(t1, t2) #define fftw_time_to_sec(t) ((double)(t).tv_sec + (double)(t).tv_usec * 1.0E-6) #ifndef FFTW_TIME_MIN /* this should be fine on any system claiming a microsecond timer */ #define FFTW_TIME_MIN (1.0e-2) #endif /********************************************** * MACINTOSH **********************************************/ #elif defined(HAVE_MAC_TIMER) /* * By default, use the microsecond-timer in the Mac Time Manager. * Alternatively, by changing the following #if 1 to #if 0, you * can use the nanosecond timer available *only* on PCI PowerMacs. * WARNING: the nanosecond timer was just a little experiment; * I haven't gotten it to work reliably. Tips/patches are welcome. */ #ifndef HAVE_MAC_PCI_TIMER /* use time manager */ /* * Use Macintosh Time Manager routines (maximum resolution is about 20 * microseconds). */ typedef struct fftw_time_struct { unsigned long hi, lo; } fftw_time; extern fftw_time get_Mac_microseconds(void); #define fftw_get_time() get_Mac_microseconds() /* define as a function instead of a macro: */ extern fftw_time fftw_time_diff(fftw_time t1, fftw_time t2); #define fftw_time_to_sec(t) ((t).lo * 1.0e-6 + 4294967295.0e-6 * (t).hi) /* very conservative, since timer should be accurate to 20e-6: */ /* (although this seems not to be the case in practice) */ #define FFTW_TIME_MIN (5.0e-2) /* for MacOS Time Manager timer */ #else /* use nanosecond timer */ /* Use the nanosecond timer available on PCI PowerMacs. */ #include typedef AbsoluteTime fftw_time; #define fftw_get_time() UpTime() #define fftw_time_diff(t1,t2) SubAbsoluteFromAbsolute(t1,t2) #define fftw_time_to_sec(t) (AbsoluteToNanoseconds(t).lo * 1.0e-9) /* Extremely conservative minimum time: */ /* for MacOS PCI PowerMac nanosecond timer */ #define FFTW_TIME_MIN (5.0e-3) #endif /* use nanosecond timer */ /********************************************** * WINDOWS **********************************************/ #elif defined(HAVE_WIN32_TIMER) #include typedef unsigned long fftw_time; extern unsigned long GetPerfTime(void); extern double GetPerfSec(double ticks); #define fftw_get_time() GetPerfTime() #define fftw_time_diff(t1,t2) ((t1) - (t2)) #define fftw_time_to_sec(t) GetPerfSec(t) #define FFTW_TIME_MIN (5.0e-2) /* for Win32 timer */ /********************************************** * CRAY **********************************************/ #elif defined(_CRAYMPP) /* Cray MPP system */ double SECONDR(void); /* * I think you have to link with -lsci to * get this */ typedef double fftw_time; #define fftw_get_time() SECONDR() #define fftw_time_diff(t1,t2) ((t1) - (t2)) #define fftw_time_to_sec(t) (t) #define FFTW_TIME_MIN (1.0e-1) /* for Cray MPP SECONDR timer */ /********************************************** * VANILLA UNIX/ISO C SYSTEMS **********************************************/ /* last resort: use good old Unix clock() */ #else #include typedef clock_t fftw_time; #ifndef CLOCKS_PER_SEC #ifdef sun /* stupid sunos4 prototypes */ #define CLOCKS_PER_SEC 1000000 extern long clock(void); #else /* not sun, we don't know CLOCKS_PER_SEC */ #error Please define CLOCKS_PER_SEC #endif #endif #define fftw_get_time() clock() #define fftw_time_diff(t1,t2) ((t1) - (t2)) #define fftw_time_to_sec(t) (((double) (t)) / CLOCKS_PER_SEC) /* * ***VERY*** conservative constant: this says that a * measurement must run for 200ms in order to be valid. * You had better check the manual of your machine * to discover if it can do better than this */ #define FFTW_TIME_MIN (2.0e-1) /* for default clock() timer */ #endif /* UNIX clock() */ /* take FFTW_TIME_REPEAT measurements... */ #ifndef FFTW_TIME_REPEAT #define FFTW_TIME_REPEAT 4 #endif /* but do not run for more than TIME_LIMIT seconds while measuring one FFT */ #ifndef FFTW_TIME_LIMIT #define FFTW_TIME_LIMIT 2.0 #endif #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_INT_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/fftw/config.h����������������������������������������������������������������������������0000644�0001754�0000144�00000012337�07637531662�010557� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- C -*- */ /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftw.h -- system-wide definitions */ /* $Id: config.h.in,v 1.30 2003/03/16 23:43:46 stevenj Exp $ */ /* configuration options (guessed by configure) */ /* Define to empty if the keyword does not work. */ /* #undef const */ /* Define if you have the gettimeofday function. */ /* #undef HAVE_GETTIMEOFDAY */ /* Define if you have the BSDgettimeofday function. */ /* #undef HAVE_BSDGETTIMEOFDAY */ /* Define if you have the header file. */ /* #undef HAVE_SYS_TIME_H */ /* Define if you have the header file. */ /* #undef HAVE_UNISTD_H */ /* Define if you have the header file. */ /* #undef HAVE_GETOPT_H */ /* Define if you have the header file */ /* #undef HAVE_MALLOC_H */ /* Define if you have gethrtime() a la Solaris 2 */ /* #undef HAVE_GETHRTIME */ /* #undef HAVE_HRTIME_T */ /* Define to sizeof int and long long, if available: */ #define SIZEOF_INT 0 #define SIZEOF_LONG_LONG 0 #if (SIZEOF_INT != 0) && (SIZEOF_LONG_LONG >= 2 * SIZEOF_INT) # define LONGLONG_IS_TWOINTS #endif /* Define to use "unsafe" modular multiply (can cause integer overflow and errors for transforms of large prime sizes using Rader). */ /* #undef FFTW_ENABLE_UNSAFE_MULMOD */ /* Define if you have getopt() */ /* #undef HAVE_GETOPT */ /* Define if you have getopt_long() */ /* #undef HAVE_GETOPT_LONG */ /* Define if you have isnan() */ /* #undef HAVE_ISNAN */ /* Define for enabling the high resolution Pentium timer */ /* #undef FFTW_ENABLE_PENTIUM_TIMER */ /* * When using FFTW_ENABLE_PENTIUM_TIMER, set FFTW_CYCLES_PER_SEC * to your real CPU clock speed! */ /* This is for 200 MHz */ /* #define FFTW_CYCLES_PER_SEC 200000000L */ /* * Define to enable a gcc/x86 specific hack that aligns * the stack to an 8-byte boundary */ /* #undef FFTW_ENABLE_I386_HACKS */ /* Define when using a version of gcc that aligns the stack properly */ /* #undef FFTW_GCC_ALIGNS_STACK */ /* Define to enable extra runtime checks for debugging. */ /* #undef FFTW_DEBUG */ /* Define to enable vector-recurse feature. */ /* #undef FFTW_ENABLE_VECTOR_RECURSE */ /* * Define to enable extra runtime checks for the alignment of variables * in the codelets (causes coredump for misaligned double on x86). */ /* #undef FFTW_DEBUG_ALIGNMENT */ #define FFTW_VERSION "2.1.5" /* Use Win32 high-resolution timer */ #if defined(__WIN32__) || defined(WIN32) || defined(_WINDOWS) # define HAVE_WIN32_TIMER # define HAVE_WIN32 #endif /* Use MacOS Time Manager timer */ #if defined(MAC) || defined(macintosh) # define HAVE_MAC_TIMER # define HAVE_MACOS /* Define to use nanosecond timer on PCI PowerMacs: */ /* (WARNING: experimental, use at your own risk.) */ /* #undef HAVE_MAC_PCI_TIMER */ #endif /* define if you have alloca.h: */ /* #undef HAVE_ALLOCA_H */ /* define if you have the alloca function: */ /* #undef HAVE_ALLOCA */ /************************** threads configuration ************************/ /* The following preprocessor symbols select which threads library to use when compiling the FFTW threads parallel libraries: */ /* #undef FFTW_USING_SOLARIS_THREADS */ /* #undef FFTW_USING_POSIX_THREADS */ /* #undef FFTW_USING_BEOS_THREADS */ /* #undef FFTW_USING_MACH_THREADS */ /* #undef FFTW_USING_OPENMP_THREADS */ /* #undef FFTW_USING_SGIMP_THREADS */ /* on AIX, this gets defined to PTHREAD_CREATE_UNDETACHED, as that system uses a non-standard name for this attribute (sigh). */ /* #undef PTHREAD_CREATE_JOINABLE */ /* #undef HAVE_MACH_CTHREADS_H */ /* #undef HAVE_CTHREADS_H */ /* #undef HAVE_CTHREAD_H */ #ifdef HAVE_WIN32 #define FFTW_USING_WIN32_THREADS #endif #ifdef HAVE_MACOS #define FFTW_USING_MACOS_THREADS #endif /*********************** fortran wrapper configuration *********************/ /* F77_FUNC_ is defined to a macro F77_FUNC_(name,NAME) by autoconf, that takes an identifier name (lower case) and NAME (upper case) and returns the appropriately mangled identifier for the Fortran linker. On non-Unix systems you will have to define this manually. For example, if your linker converts identifiers to lower-case followed by an underscore, you would do: #define F77_FUNC_(name,NAME) name ## _ */ /* #undef F77_FUNC_ */ /* The following symbols control how MPI_Comm data structures are translated between Fortran and C for the fftw_mpi wrappers. See the file mpi/fftw_f77_mpi.h for more information. */ /* #undef HAVE_MPI_COMM_F2C */ /* #undef FFTW_USE_F77_MPI_COMM */ /* #undef FFTW_USE_F77_MPI_COMM_P */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/�����������������������������������������������������������������������������������0002777�0001754�0000144�00000000000�07637531660�007401� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rfftw.h����������������������������������������������������������������������������0000644�0001754�0000144�00000007272�07635206027�010616� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* rfftw.h -- system-wide definitions for rfftw */ #ifndef RFFTW_H #define RFFTW_H #include "fftw.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /****************************************************************************/ #define RFFTW_V2 typedef fftw_plan rfftw_plan; typedef fftwnd_plan rfftwnd_plan; #define FFTW_REAL_TO_COMPLEX FFTW_FORWARD #define FFTW_COMPLEX_TO_REAL FFTW_BACKWARD extern void rfftw(rfftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist); extern void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); extern rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); extern rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); extern void rfftw_destroy_plan(rfftw_plan plan); extern void rfftw_fprint_plan(FILE *f, rfftw_plan p); extern void rfftw_print_plan(rfftw_plan p); extern void rfftw_executor_simple(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, fftw_recurse_kind recurse_kind); extern rfftwnd_plan rfftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); extern rfftwnd_plan rfftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); extern rfftwnd_plan rfftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); extern rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); extern rfftwnd_plan rfftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); extern rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); extern void rfftwnd_destroy_plan(rfftwnd_plan plan); extern void rfftwnd_fprint_plan(FILE *f, rfftwnd_plan plan); extern void rfftwnd_print_plan(rfftwnd_plan plan); extern void rfftwnd_real_to_complex(rfftwnd_plan p, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void rfftwnd_complex_to_real(rfftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist); extern void rfftwnd_one_real_to_complex(rfftwnd_plan p, fftw_real *in, fftw_complex *out); extern void rfftwnd_one_complex_to_real(rfftwnd_plan p, fftw_complex *in, fftw_real *out); /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* RFFTW_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/Makefile.am������������������������������������������������������������������������0000644�0001754�0000144�00000002776�07637527074�011367� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@rfftw.la include_HEADERS = @FFTW_PREFIX@rfftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS= frc_1.c frc_2.c frc_3.c frc_4.c frc_5.c frc_6.c frc_7.c frc_8.c frc_9.c frc_10.c frc_11.c frc_12.c frc_13.c frc_14.c frc_15.c frc_16.c frc_32.c frc_64.c frc_128.c TWID_CODELETS= fhf_2.c fhf_3.c fhf_4.c fhf_5.c fhf_6.c fhf_7.c fhf_8.c fhf_9.c fhf_10.c fhf_16.c fhf_32.c NOTWI_CODELETS= fcr_1.c fcr_2.c fcr_3.c fcr_4.c fcr_5.c fcr_6.c fcr_7.c fcr_8.c fcr_9.c fcr_10.c fcr_11.c fcr_12.c fcr_13.c fcr_14.c fcr_15.c fcr_16.c fcr_32.c fcr_64.c fcr_128.c TWIDI_CODELETS= fhb_2.c fhb_3.c fhb_4.c fhb_5.c fhb_6.c fhb_7.c fhb_8.c fhb_9.c fhb_10.c fhb_16.c fhb_32.c CODELETS=$(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = rconfig.c rplanner.c rexec.c rexec2.c rfftwnd.c rgeneric.c \ rfftwf77.c lib@FFTW_PREFIX@rfftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ rfftw.h lib@FFTW_PREFIX@rfftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) rconfig.c DISTCLEANFILES = srfftw.h drfftw.h @FFTW_PREFIX1@rfftw.h: rfftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw.h > $@ CLEANFILES = @FFTW_PREFIX1@rfftw.h # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo ��fftw-2.1.5/rfftw/Makefile.in������������������������������������������������������������������������0000644�0001754�0000144�00000056661�07637527505�011401� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER = echo AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@rfftw.la include_HEADERS = @FFTW_PREFIX@rfftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS = frc_1.c frc_2.c frc_3.c frc_4.c frc_5.c frc_6.c frc_7.c frc_8.c frc_9.c frc_10.c frc_11.c frc_12.c frc_13.c frc_14.c frc_15.c frc_16.c frc_32.c frc_64.c frc_128.c TWID_CODELETS = fhf_2.c fhf_3.c fhf_4.c fhf_5.c fhf_6.c fhf_7.c fhf_8.c fhf_9.c fhf_10.c fhf_16.c fhf_32.c NOTWI_CODELETS = fcr_1.c fcr_2.c fcr_3.c fcr_4.c fcr_5.c fcr_6.c fcr_7.c fcr_8.c fcr_9.c fcr_10.c fcr_11.c fcr_12.c fcr_13.c fcr_14.c fcr_15.c fcr_16.c fcr_32.c fcr_64.c fcr_128.c TWIDI_CODELETS = fhb_2.c fhb_3.c fhb_4.c fhb_5.c fhb_6.c fhb_7.c fhb_8.c fhb_9.c fhb_10.c fhb_16.c fhb_32.c CODELETS = $(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = rconfig.c rplanner.c rexec.c rexec2.c rfftwnd.c rgeneric.c \ rfftwf77.c lib@FFTW_PREFIX@rfftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ rfftw.h lib@FFTW_PREFIX@rfftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) rconfig.c DISTCLEANFILES = srfftw.h drfftw.h CLEANFILES = @FFTW_PREFIX1@rfftw.h subdir = rfftw mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) lib@FFTW_PREFIX@rfftw_la_LIBADD = am__objects_1 = frc_1.lo frc_2.lo frc_3.lo frc_4.lo frc_5.lo frc_6.lo \ frc_7.lo frc_8.lo frc_9.lo frc_10.lo frc_11.lo frc_12.lo \ frc_13.lo frc_14.lo frc_15.lo frc_16.lo frc_32.lo frc_64.lo \ frc_128.lo am__objects_2 = fhf_2.lo fhf_3.lo fhf_4.lo fhf_5.lo fhf_6.lo fhf_7.lo \ fhf_8.lo fhf_9.lo fhf_10.lo fhf_16.lo fhf_32.lo am__objects_3 = fcr_1.lo fcr_2.lo fcr_3.lo fcr_4.lo fcr_5.lo fcr_6.lo \ fcr_7.lo fcr_8.lo fcr_9.lo fcr_10.lo fcr_11.lo fcr_12.lo \ fcr_13.lo fcr_14.lo fcr_15.lo fcr_16.lo fcr_32.lo fcr_64.lo \ fcr_128.lo am__objects_4 = fhb_2.lo fhb_3.lo fhb_4.lo fhb_5.lo fhb_6.lo fhb_7.lo \ fhb_8.lo fhb_9.lo fhb_10.lo fhb_16.lo fhb_32.lo am__objects_5 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) am__objects_6 = rconfig.lo rplanner.lo rexec.lo rexec2.lo rfftwnd.lo \ rgeneric.lo rfftwf77.lo am_lib@FFTW_PREFIX@rfftw_la_OBJECTS = $(am__objects_5) $(am__objects_6) lib@FFTW_PREFIX@rfftw_la_OBJECTS = \ $(am_lib@FFTW_PREFIX@rfftw_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/fftw -I$(top_builddir)/fftw depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/fcr_1.Plo ./$(DEPDIR)/fcr_10.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_11.Plo ./$(DEPDIR)/fcr_12.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_128.Plo ./$(DEPDIR)/fcr_13.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_14.Plo ./$(DEPDIR)/fcr_15.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_16.Plo ./$(DEPDIR)/fcr_2.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_3.Plo ./$(DEPDIR)/fcr_32.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_4.Plo ./$(DEPDIR)/fcr_5.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_6.Plo ./$(DEPDIR)/fcr_64.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_7.Plo ./$(DEPDIR)/fcr_8.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fcr_9.Plo ./$(DEPDIR)/fhb_10.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhb_16.Plo ./$(DEPDIR)/fhb_2.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhb_3.Plo ./$(DEPDIR)/fhb_32.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhb_4.Plo ./$(DEPDIR)/fhb_5.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhb_6.Plo ./$(DEPDIR)/fhb_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhb_8.Plo ./$(DEPDIR)/fhb_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_10.Plo ./$(DEPDIR)/fhf_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_2.Plo ./$(DEPDIR)/fhf_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_32.Plo ./$(DEPDIR)/fhf_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_5.Plo ./$(DEPDIR)/fhf_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_7.Plo ./$(DEPDIR)/fhf_8.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fhf_9.Plo ./$(DEPDIR)/frc_1.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_10.Plo ./$(DEPDIR)/frc_11.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_12.Plo ./$(DEPDIR)/frc_128.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_13.Plo ./$(DEPDIR)/frc_14.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_15.Plo ./$(DEPDIR)/frc_16.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_2.Plo ./$(DEPDIR)/frc_3.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_32.Plo ./$(DEPDIR)/frc_4.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_5.Plo ./$(DEPDIR)/frc_6.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_64.Plo ./$(DEPDIR)/frc_7.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/frc_8.Plo ./$(DEPDIR)/frc_9.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rconfig.Plo ./$(DEPDIR)/rexec.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rexec2.Plo ./$(DEPDIR)/rfftwf77.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftwnd.Plo ./$(DEPDIR)/rgeneric.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rplanner.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(lib@FFTW_PREFIX@rfftw_la_SOURCES) HEADERS = $(include_HEADERS) DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in SOURCES = $(lib@FFTW_PREFIX@rfftw_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu rfftw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" = "$$p" && dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lib@FFTW_PREFIX@rfftw.la: $(lib@FFTW_PREFIX@rfftw_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(lib@FFTW_PREFIX@rfftw_la_LDFLAGS) $(lib@FFTW_PREFIX@rfftw_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_128.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcr_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhb_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fhf_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_128.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frc_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rconfig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rexec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rexec2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftwf77.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftwnd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgeneric.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rplanner.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: includeHEADERS_INSTALL = $(INSTALL_HEADER) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ rm -f $(DESTDIR)$(includedir)/$$f; \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-includeHEADERS \ install-info install-info-am install-libLTLIBRARIES install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES @FFTW_PREFIX1@rfftw.h: rfftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw.h > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_1.c����������������������������������������������������������������������������0000644�0001754�0000144�00000003602�07637527117�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 1 */ /* * This function contains 0 FP additions, 0 FP multiplications, * (or, 0 additions, 0 multiplications, 0 fused multiply/add), * 1 stack variables, and 2 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_1(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; real_output[0] = tmp1; } fftw_codelet_desc fftw_real2hc_1_desc = { "fftw_real2hc_1", (void (*)()) fftw_real2hc_1, 1, FFTW_FORWARD, FFTW_REAL2HC, 24, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_2.c����������������������������������������������������������������������������0000644�0001754�0000144�00000003750�07637527117�010461� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 2 */ /* * This function contains 2 FP additions, 0 FP multiplications, * (or, 2 additions, 0 multiplications, 0 fused multiply/add), * 2 stack variables, and 4 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_2(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[istride]; real_output[real_ostride] = tmp1 - tmp2; real_output[0] = tmp1 + tmp2; } fftw_codelet_desc fftw_real2hc_2_desc = { "fftw_real2hc_2", (void (*)()) fftw_real2hc_2, 2, FFTW_FORWARD, FFTW_REAL2HC, 46, 0, (const int *) 0, }; ������������������������fftw-2.1.5/rfftw/frc_3.c����������������������������������������������������������������������������0000644�0001754�0000144�00000004533�07637527120�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 3 */ /* * This function contains 4 FP additions, 2 FP multiplications, * (or, 3 additions, 1 multiplications, 1 fused multiply/add), * 4 stack variables, and 6 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_3(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[istride]; tmp3 = input[2 * istride]; tmp4 = tmp2 + tmp3; real_output[real_ostride] = tmp1 - (K500000000 * tmp4); real_output[0] = tmp1 + tmp4; imag_output[imag_ostride] = K866025403 * (tmp3 - tmp2); } fftw_codelet_desc fftw_real2hc_3_desc = { "fftw_real2hc_3", (void (*)()) fftw_real2hc_3, 3, FFTW_FORWARD, FFTW_REAL2HC, 68, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_4.c����������������������������������������������������������������������������0000644�0001754�0000144�00000004421�07637527120�010451� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:52 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 4 */ /* * This function contains 6 FP additions, 0 FP multiplications, * (or, 6 additions, 0 multiplications, 0 fused multiply/add), * 6 stack variables, and 8 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_4(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[2 * istride]; tmp3 = tmp1 + tmp2; tmp4 = input[istride]; tmp5 = input[3 * istride]; tmp6 = tmp4 + tmp5; real_output[real_ostride] = tmp1 - tmp2; imag_output[imag_ostride] = -(tmp4 - tmp5); real_output[2 * real_ostride] = tmp3 - tmp6; real_output[0] = tmp3 + tmp6; } fftw_codelet_desc fftw_real2hc_4_desc = { "fftw_real2hc_4", (void (*)()) fftw_real2hc_4, 4, FFTW_FORWARD, FFTW_REAL2HC, 90, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_5.c����������������������������������������������������������������������������0000644�0001754�0000144�00000006142�07637527120�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:52 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 5 */ /* * This function contains 12 FP additions, 6 FP multiplications, * (or, 9 additions, 3 multiplications, 3 fused multiply/add), * 12 stack variables, and 10 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_5(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp10; fftw_real tmp7; fftw_real tmp8; fftw_real tmp3; fftw_real tmp11; fftw_real tmp6; fftw_real tmp9; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp10 = input[0]; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp1 = input[istride]; tmp2 = input[4 * istride]; tmp7 = tmp1 + tmp2; tmp4 = input[2 * istride]; tmp5 = input[3 * istride]; tmp8 = tmp4 + tmp5; tmp3 = tmp1 - tmp2; tmp11 = tmp7 + tmp8; tmp6 = tmp4 - tmp5; } imag_output[imag_ostride] = -((K951056516 * tmp3) + (K587785252 * tmp6)); imag_output[2 * imag_ostride] = (K951056516 * tmp6) - (K587785252 * tmp3); real_output[0] = tmp11 + tmp10; tmp9 = K559016994 * (tmp7 - tmp8); tmp12 = tmp10 - (K250000000 * tmp11); real_output[real_ostride] = tmp9 + tmp12; real_output[2 * real_ostride] = tmp12 - tmp9; } fftw_codelet_desc fftw_real2hc_5_desc = { "fftw_real2hc_5", (void (*)()) fftw_real2hc_5, 5, FFTW_FORWARD, FFTW_REAL2HC, 112, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_6.c����������������������������������������������������������������������������0000644�0001754�0000144�00000006034�07637527121�010456� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:52 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 6 */ /* * This function contains 14 FP additions, 4 FP multiplications, * (or, 12 additions, 2 multiplications, 2 fused multiply/add), * 14 stack variables, and 12 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_6(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp3; fftw_real tmp13; fftw_real tmp9; fftw_real tmp11; fftw_real tmp6; fftw_real tmp12; fftw_real tmp1; fftw_real tmp2; fftw_real tmp10; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[3 * istride]; tmp3 = tmp1 - tmp2; tmp13 = tmp1 + tmp2; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp7 = input[4 * istride]; tmp8 = input[istride]; tmp9 = tmp7 - tmp8; tmp11 = tmp7 + tmp8; tmp4 = input[2 * istride]; tmp5 = input[5 * istride]; tmp6 = tmp4 - tmp5; tmp12 = tmp4 + tmp5; } imag_output[imag_ostride] = K866025403 * (tmp9 - tmp6); tmp10 = tmp6 + tmp9; real_output[real_ostride] = tmp3 - (K500000000 * tmp10); real_output[3 * real_ostride] = tmp3 + tmp10; imag_output[2 * imag_ostride] = -(K866025403 * (tmp11 - tmp12)); tmp14 = tmp12 + tmp11; real_output[2 * real_ostride] = tmp13 - (K500000000 * tmp14); real_output[0] = tmp13 + tmp14; } fftw_codelet_desc fftw_real2hc_6_desc = { "fftw_real2hc_6", (void (*)()) fftw_real2hc_6, 6, FFTW_FORWARD, FFTW_REAL2HC, 134, 0, (const int *) 0, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_7.c����������������������������������������������������������������������������0000644�0001754�0000144�00000007346�07637527125�010472� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:53 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 7 */ /* * This function contains 24 FP additions, 18 FP multiplications, * (or, 24 additions, 18 multiplications, 0 fused multiply/add), * 13 stack variables, and 14 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_7(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp10; fftw_real tmp13; fftw_real tmp4; fftw_real tmp12; fftw_real tmp7; fftw_real tmp11; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp8 = input[2 * istride]; tmp9 = input[5 * istride]; tmp10 = tmp8 + tmp9; tmp13 = tmp9 - tmp8; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp2 = input[3 * istride]; tmp3 = input[4 * istride]; tmp4 = tmp2 + tmp3; tmp12 = tmp3 - tmp2; tmp5 = input[istride]; tmp6 = input[6 * istride]; tmp7 = tmp5 + tmp6; tmp11 = tmp6 - tmp5; } imag_output[2 * imag_ostride] = (K974927912 * tmp11) - (K781831482 * tmp12) - (K433883739 * tmp13); imag_output[imag_ostride] = (K974927912 * tmp13) + (K433883739 * tmp12) + (K781831482 * tmp11); imag_output[3 * imag_ostride] = (K974927912 * tmp12) + (K433883739 * tmp11) - (K781831482 * tmp13); real_output[0] = tmp1 + tmp10 + tmp4 + tmp7; real_output[3 * real_ostride] = tmp1 + (K623489801 * tmp10) - (K900968867 * tmp7) - (K222520933 * tmp4); real_output[2 * real_ostride] = tmp1 + (K623489801 * tmp4) - (K222520933 * tmp7) - (K900968867 * tmp10); real_output[real_ostride] = tmp1 + (K623489801 * tmp7) - (K900968867 * tmp4) - (K222520933 * tmp10); } fftw_codelet_desc fftw_real2hc_7_desc = { "fftw_real2hc_7", (void (*)()) fftw_real2hc_7, 7, FFTW_FORWARD, FFTW_REAL2HC, 156, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_8.c����������������������������������������������������������������������������0000644�0001754�0000144�00000006517�07637527123�010470� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:54 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 8 */ /* * This function contains 20 FP additions, 2 FP multiplications, * (or, 20 additions, 2 multiplications, 0 fused multiply/add), * 12 stack variables, and 16 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_8(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp3; fftw_real tmp7; fftw_real tmp13; fftw_real tmp19; fftw_real tmp6; fftw_real tmp16; fftw_real tmp10; fftw_real tmp18; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[4 * istride]; tmp3 = tmp1 + tmp2; tmp7 = tmp1 - tmp2; tmp11 = input[7 * istride]; tmp12 = input[3 * istride]; tmp13 = tmp11 - tmp12; tmp19 = tmp11 + tmp12; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp4 = input[2 * istride]; tmp5 = input[6 * istride]; tmp6 = tmp4 + tmp5; tmp16 = tmp4 - tmp5; tmp8 = input[istride]; tmp9 = input[5 * istride]; tmp10 = tmp8 - tmp9; tmp18 = tmp8 + tmp9; } { fftw_real tmp17; fftw_real tmp20; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; real_output[2 * real_ostride] = tmp3 - tmp6; tmp17 = tmp3 + tmp6; tmp20 = tmp18 + tmp19; real_output[4 * real_ostride] = tmp17 - tmp20; real_output[0] = tmp17 + tmp20; imag_output[2 * imag_ostride] = tmp19 - tmp18; tmp14 = K707106781 * (tmp10 + tmp13); real_output[3 * real_ostride] = tmp7 - tmp14; real_output[real_ostride] = tmp7 + tmp14; tmp15 = K707106781 * (tmp13 - tmp10); imag_output[imag_ostride] = tmp15 - tmp16; imag_output[3 * imag_ostride] = tmp16 + tmp15; } } fftw_codelet_desc fftw_real2hc_8_desc = { "fftw_real2hc_8", (void (*)()) fftw_real2hc_8, 8, FFTW_FORWARD, FFTW_REAL2HC, 178, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_9.c����������������������������������������������������������������������������0000644�0001754�0000144�00000013052�07637527125�010463� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:55 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 9 */ /* * This function contains 38 FP additions, 26 FP multiplications, * (or, 29 additions, 17 multiplications, 9 fused multiply/add), * 21 stack variables, and 18 memory accesses */ static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_9(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp15; fftw_real tmp20; fftw_real tmp19; fftw_real tmp4; fftw_real tmp27; fftw_real tmp10; fftw_real tmp18; fftw_real tmp21; fftw_real tmp2; fftw_real tmp3; fftw_real tmp5; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp13; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; tmp11 = input[2 * istride]; tmp12 = input[5 * istride]; tmp13 = input[8 * istride]; tmp14 = tmp12 + tmp13; tmp15 = tmp11 + tmp14; tmp20 = tmp11 - (K500000000 * tmp14); tmp19 = tmp13 - tmp12; } tmp2 = input[3 * istride]; tmp3 = input[6 * istride]; tmp4 = tmp2 + tmp3; tmp27 = tmp3 - tmp2; { fftw_real tmp6; fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp6 = input[istride]; tmp7 = input[4 * istride]; tmp8 = input[7 * istride]; tmp9 = tmp7 + tmp8; tmp10 = tmp6 + tmp9; tmp18 = tmp6 - (K500000000 * tmp9); tmp21 = tmp8 - tmp7; } imag_output[3 * imag_ostride] = K866025403 * (tmp15 - tmp10); tmp5 = tmp1 + tmp4; tmp16 = tmp10 + tmp15; real_output[3 * real_ostride] = tmp5 - (K500000000 * tmp16); real_output[0] = tmp5 + tmp16; { fftw_real tmp29; fftw_real tmp25; fftw_real tmp26; fftw_real tmp28; fftw_real tmp17; fftw_real tmp22; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp29 = K866025403 * tmp27; tmp25 = (K663413948 * tmp21) - (K642787609 * tmp18); tmp26 = (K150383733 * tmp19) - (K984807753 * tmp20); tmp28 = tmp25 + tmp26; tmp17 = tmp1 - (K500000000 * tmp4); tmp22 = (K766044443 * tmp18) + (K556670399 * tmp21); tmp23 = (K173648177 * tmp20) + (K852868531 * tmp19); tmp24 = tmp22 + tmp23; real_output[real_ostride] = tmp17 + tmp24; real_output[4 * real_ostride] = tmp17 + (K866025403 * (tmp25 - tmp26)) - (K500000000 * tmp24); real_output[2 * real_ostride] = tmp17 + (K173648177 * tmp18) - (K296198132 * tmp19) - (K939692620 * tmp20) - (K852868531 * tmp21); imag_output[imag_ostride] = tmp29 + tmp28; imag_output[4 * imag_ostride] = (K866025403 * (tmp27 + (tmp23 - tmp22))) - (K500000000 * tmp28); imag_output[2 * imag_ostride] = (K813797681 * tmp19) - (K342020143 * tmp20) - (K150383733 * tmp21) - (K984807753 * tmp18) - tmp29; } } fftw_codelet_desc fftw_real2hc_9_desc = { "fftw_real2hc_9", (void (*)()) fftw_real2hc_9, 9, FFTW_FORWARD, FFTW_REAL2HC, 200, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_10.c���������������������������������������������������������������������������0000644�0001754�0000144�00000011155�07637527126�010536� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:57 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 10 */ /* * This function contains 34 FP additions, 12 FP multiplications, * (or, 28 additions, 6 multiplications, 6 fused multiply/add), * 21 stack variables, and 20 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_10(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp26; fftw_real tmp29; fftw_real tmp10; fftw_real tmp15; fftw_real tmp13; fftw_real tmp16; fftw_real tmp22; fftw_real tmp31; fftw_real tmp3; fftw_real tmp18; fftw_real tmp6; fftw_real tmp19; fftw_real tmp21; fftw_real tmp30; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp24 = input[0]; tmp25 = input[5 * istride]; tmp26 = tmp24 - tmp25; tmp29 = tmp24 + tmp25; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp8 = input[4 * istride]; tmp9 = input[9 * istride]; tmp10 = tmp8 - tmp9; tmp15 = tmp8 + tmp9; tmp11 = input[6 * istride]; tmp12 = input[istride]; tmp13 = tmp11 - tmp12; tmp16 = tmp11 + tmp12; } tmp22 = tmp10 + tmp13; tmp31 = tmp15 + tmp16; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp1 = input[2 * istride]; tmp2 = input[7 * istride]; tmp3 = tmp1 - tmp2; tmp18 = tmp1 + tmp2; tmp4 = input[8 * istride]; tmp5 = input[3 * istride]; tmp6 = tmp4 - tmp5; tmp19 = tmp4 + tmp5; } tmp21 = tmp3 + tmp6; tmp30 = tmp18 + tmp19; { fftw_real tmp7; fftw_real tmp14; fftw_real tmp34; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp3 - tmp6; tmp14 = tmp10 - tmp13; imag_output[imag_ostride] = -((K951056516 * tmp7) + (K587785252 * tmp14)); imag_output[3 * imag_ostride] = (K587785252 * tmp7) - (K951056516 * tmp14); tmp34 = K559016994 * (tmp30 - tmp31); tmp32 = tmp30 + tmp31; tmp33 = tmp29 - (K250000000 * tmp32); real_output[2 * real_ostride] = tmp33 - tmp34; real_output[4 * real_ostride] = tmp34 + tmp33; real_output[0] = tmp32 + tmp29; } { fftw_real tmp17; fftw_real tmp20; fftw_real tmp23; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp17 = tmp15 - tmp16; tmp20 = tmp18 - tmp19; imag_output[2 * imag_ostride] = (K951056516 * tmp17) - (K587785252 * tmp20); imag_output[4 * imag_ostride] = (K951056516 * tmp20) + (K587785252 * tmp17); tmp23 = K559016994 * (tmp21 - tmp22); tmp27 = tmp21 + tmp22; tmp28 = tmp26 - (K250000000 * tmp27); real_output[real_ostride] = tmp23 + tmp28; real_output[3 * real_ostride] = tmp28 - tmp23; real_output[5 * real_ostride] = tmp27 + tmp26; } } fftw_codelet_desc fftw_real2hc_10_desc = { "fftw_real2hc_10", (void (*)()) fftw_real2hc_10, 10, FFTW_FORWARD, FFTW_REAL2HC, 222, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_11.c���������������������������������������������������������������������������0000644�0001754�0000144�00000012721�07637527142�010535� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:57 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 11 */ /* * This function contains 60 FP additions, 50 FP multiplications, * (or, 60 additions, 50 multiplications, 0 fused multiply/add), * 17 stack variables, and 22 memory accesses */ static const fftw_real K654860733 = FFTW_KONST(+0.654860733945285064056925072466293553183791199); static const fftw_real K142314838 = FFTW_KONST(+0.142314838273285140443792668616369668791051361); static const fftw_real K959492973 = FFTW_KONST(+0.959492973614497389890368057066327699062454848); static const fftw_real K415415013 = FFTW_KONST(+0.415415013001886425529274149229623203524004910); static const fftw_real K841253532 = FFTW_KONST(+0.841253532831181168861811648919367717513292498); static const fftw_real K989821441 = FFTW_KONST(+0.989821441880932732376092037776718787376519372); static const fftw_real K909631995 = FFTW_KONST(+0.909631995354518371411715383079028460060241051); static const fftw_real K755749574 = FFTW_KONST(+0.755749574354258283774035843972344420179717445); static const fftw_real K540640817 = FFTW_KONST(+0.540640817455597582107635954318691695431770608); static const fftw_real K281732556 = FFTW_KONST(+0.281732556841429697711417915346616899035777899); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_11(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp1; fftw_real tmp4; fftw_real tmp20; fftw_real tmp16; fftw_real tmp21; fftw_real tmp13; fftw_real tmp17; fftw_real tmp10; fftw_real tmp19; fftw_real tmp7; fftw_real tmp18; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp2 = input[5 * istride]; tmp3 = input[6 * istride]; tmp4 = tmp2 + tmp3; tmp20 = tmp3 - tmp2; tmp14 = input[2 * istride]; tmp15 = input[9 * istride]; tmp16 = tmp14 + tmp15; tmp21 = tmp15 - tmp14; } tmp11 = input[4 * istride]; tmp12 = input[7 * istride]; tmp13 = tmp11 + tmp12; tmp17 = tmp12 - tmp11; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp8 = input[istride]; tmp9 = input[10 * istride]; tmp10 = tmp8 + tmp9; tmp19 = tmp9 - tmp8; tmp5 = input[3 * istride]; tmp6 = input[8 * istride]; tmp7 = tmp5 + tmp6; tmp18 = tmp6 - tmp5; } imag_output[4 * imag_ostride] = (K281732556 * tmp17) + (K540640817 * tmp18) + (K755749574 * tmp19) - (K909631995 * tmp20) - (K989821441 * tmp21); imag_output[imag_ostride] = (K909631995 * tmp21) + (K755749574 * tmp17) + (K281732556 * tmp20) + (K989821441 * tmp18) + (K540640817 * tmp19); imag_output[5 * imag_ostride] = (K989821441 * tmp20) + (K755749574 * tmp18) + (K281732556 * tmp19) - (K909631995 * tmp17) - (K540640817 * tmp21); imag_output[2 * imag_ostride] = (K755749574 * tmp21) + (K909631995 * tmp19) - (K281732556 * tmp18) - (K540640817 * tmp20) - (K989821441 * tmp17); imag_output[3 * imag_ostride] = (K540640817 * tmp17) + (K755749574 * tmp20) + (K989821441 * tmp19) - (K909631995 * tmp18) - (K281732556 * tmp21); real_output[2 * real_ostride] = tmp1 + (K841253532 * tmp4) + (K415415013 * tmp10) - (K959492973 * tmp7) - (K142314838 * tmp13) - (K654860733 * tmp16); real_output[4 * real_ostride] = tmp1 + (K415415013 * tmp4) + (K841253532 * tmp7) - (K654860733 * tmp10) - (K959492973 * tmp13) - (K142314838 * tmp16); real_output[5 * real_ostride] = tmp1 + (K841253532 * tmp16) + (K415415013 * tmp13) - (K959492973 * tmp10) - (K654860733 * tmp7) - (K142314838 * tmp4); real_output[real_ostride] = tmp1 + (K415415013 * tmp16) + (K841253532 * tmp10) - (K142314838 * tmp7) - (K959492973 * tmp4) - (K654860733 * tmp13); real_output[3 * real_ostride] = tmp1 + (K841253532 * tmp13) + (K415415013 * tmp7) - (K142314838 * tmp10) - (K654860733 * tmp4) - (K959492973 * tmp16); real_output[0] = tmp1 + tmp16 + tmp13 + tmp4 + tmp7 + tmp10; } fftw_codelet_desc fftw_real2hc_11_desc = { "fftw_real2hc_11", (void (*)()) fftw_real2hc_11, 11, FFTW_FORWARD, FFTW_REAL2HC, 244, 0, (const int *) 0, }; �����������������������������������������������fftw-2.1.5/rfftw/frc_12.c���������������������������������������������������������������������������0000644�0001754�0000144�00000011300�07637527127�010531� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:58 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 12 */ /* * This function contains 38 FP additions, 8 FP multiplications, * (or, 34 additions, 4 multiplications, 4 fused multiply/add), * 18 stack variables, and 24 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_12(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp5; fftw_real tmp25; fftw_real tmp11; fftw_real tmp23; fftw_real tmp30; fftw_real tmp35; fftw_real tmp10; fftw_real tmp26; fftw_real tmp12; fftw_real tmp18; fftw_real tmp29; fftw_real tmp34; fftw_real tmp31; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[4 * istride]; tmp3 = input[8 * istride]; tmp4 = tmp2 + tmp3; tmp5 = tmp1 + tmp4; tmp25 = tmp1 - (K500000000 * tmp4); tmp11 = tmp3 - tmp2; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp19 = input[9 * istride]; tmp20 = input[istride]; tmp21 = input[5 * istride]; tmp22 = tmp20 + tmp21; tmp23 = tmp19 - (K500000000 * tmp22); tmp30 = tmp19 + tmp22; tmp35 = tmp21 - tmp20; } { fftw_real tmp6; fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp6 = input[6 * istride]; tmp7 = input[10 * istride]; tmp8 = input[2 * istride]; tmp9 = tmp7 + tmp8; tmp10 = tmp6 + tmp9; tmp26 = tmp6 - (K500000000 * tmp9); tmp12 = tmp8 - tmp7; } { fftw_real tmp14; fftw_real tmp15; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp14 = input[3 * istride]; tmp15 = input[7 * istride]; tmp16 = input[11 * istride]; tmp17 = tmp15 + tmp16; tmp18 = tmp14 - (K500000000 * tmp17); tmp29 = tmp14 + tmp17; tmp34 = tmp16 - tmp15; } real_output[3 * real_ostride] = tmp5 - tmp10; imag_output[3 * imag_ostride] = tmp29 - tmp30; tmp31 = tmp5 + tmp10; tmp32 = tmp29 + tmp30; real_output[6 * real_ostride] = tmp31 - tmp32; real_output[0] = tmp31 + tmp32; { fftw_real tmp37; fftw_real tmp38; fftw_real tmp33; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp37 = tmp34 + tmp35; tmp38 = tmp11 + tmp12; imag_output[2 * imag_ostride] = K866025403 * (tmp37 - tmp38); imag_output[4 * imag_ostride] = K866025403 * (tmp38 + tmp37); tmp33 = tmp25 - tmp26; tmp36 = K866025403 * (tmp34 - tmp35); real_output[5 * real_ostride] = tmp33 - tmp36; real_output[real_ostride] = tmp33 + tmp36; } { fftw_real tmp27; fftw_real tmp28; fftw_real tmp13; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp27 = tmp25 + tmp26; tmp28 = tmp18 + tmp23; real_output[2 * real_ostride] = tmp27 - tmp28; real_output[4 * real_ostride] = tmp27 + tmp28; tmp13 = K866025403 * (tmp11 - tmp12); tmp24 = tmp18 - tmp23; imag_output[imag_ostride] = tmp13 - tmp24; imag_output[5 * imag_ostride] = -(tmp13 + tmp24); } } fftw_codelet_desc fftw_real2hc_12_desc = { "fftw_real2hc_12", (void (*)()) fftw_real2hc_12, 12, FFTW_FORWARD, FFTW_REAL2HC, 266, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_13.c���������������������������������������������������������������������������0000644�0001754�0000144�00000022214�07637527136�010540� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:05:59 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 13 */ /* * This function contains 76 FP additions, 34 FP multiplications, * (or, 57 additions, 15 multiplications, 19 fused multiply/add), * 34 stack variables, and 26 memory accesses */ static const fftw_real K083333333 = FFTW_KONST(+0.083333333333333333333333333333333333333333333); static const fftw_real K075902986 = FFTW_KONST(+0.075902986037193865983102897245103540356428373); static const fftw_real K251768516 = FFTW_KONST(+0.251768516431883313623436926934233488546674281); static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); static const fftw_real K113854479 = FFTW_KONST(+0.113854479055790798974654345867655310534642560); static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); static const fftw_real K387390585 = FFTW_KONST(+0.387390585467617292130675966426762851778775217); static const fftw_real K300462606 = FFTW_KONST(+0.300462606288665774426601772289207995520941381); static const fftw_real K258260390 = FFTW_KONST(+0.258260390311744861420450644284508567852516811); static const fftw_real K132983124 = FFTW_KONST(+0.132983124607418643793760531921092974399165133); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); static const fftw_real K174138601 = FFTW_KONST(+0.174138601152135905005660794929264742616964676); static const fftw_real K575140729 = FFTW_KONST(+0.575140729474003121368385547455453388461001608); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_13(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp65; fftw_real tmp36; fftw_real tmp19; fftw_real tmp32; fftw_real tmp51; fftw_real tmp62; fftw_real tmp39; fftw_real tmp58; fftw_real tmp59; fftw_real tmp66; fftw_real tmp56; fftw_real tmp63; fftw_real tmp30; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp65 = input[0]; { fftw_real tmp3; fftw_real tmp53; fftw_real tmp17; fftw_real tmp38; fftw_real tmp28; fftw_real tmp14; fftw_real tmp37; fftw_real tmp25; fftw_real tmp6; fftw_real tmp20; fftw_real tmp9; fftw_real tmp21; fftw_real tmp10; fftw_real tmp54; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = input[8 * istride]; tmp2 = input[5 * istride]; tmp3 = tmp1 - tmp2; tmp53 = tmp1 + tmp2; { fftw_real tmp26; fftw_real tmp15; fftw_real tmp16; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = input[12 * istride]; tmp15 = input[4 * istride]; tmp16 = input[10 * istride]; tmp27 = tmp15 + tmp16; tmp17 = tmp15 - tmp16; tmp38 = tmp26 + tmp27; tmp28 = tmp26 - (K500000000 * tmp27); } { fftw_real tmp23; fftw_real tmp12; fftw_real tmp13; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp23 = input[istride]; tmp12 = input[3 * istride]; tmp13 = input[9 * istride]; tmp24 = tmp12 + tmp13; tmp14 = tmp12 - tmp13; tmp37 = tmp23 + tmp24; tmp25 = tmp23 - (K500000000 * tmp24); } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = input[6 * istride]; tmp5 = input[11 * istride]; tmp6 = tmp4 - tmp5; tmp20 = tmp4 + tmp5; tmp7 = input[2 * istride]; tmp8 = input[7 * istride]; tmp9 = tmp7 - tmp8; tmp21 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp54 = tmp20 + tmp21; tmp36 = tmp3 - tmp10; { fftw_real tmp11; fftw_real tmp18; fftw_real tmp49; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; tmp11 = tmp3 + (K500000000 * tmp10); tmp18 = K866025403 * (tmp14 + tmp17); tmp19 = tmp11 - tmp18; tmp32 = tmp11 + tmp18; tmp49 = tmp9 - tmp6; tmp50 = tmp14 - tmp17; tmp51 = tmp49 - tmp50; tmp62 = tmp49 + tmp50; } tmp39 = tmp37 - tmp38; tmp58 = tmp37 + tmp38; tmp59 = tmp53 + tmp54; tmp66 = tmp59 + tmp58; { fftw_real tmp52; fftw_real tmp55; fftw_real tmp22; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp52 = tmp25 + tmp28; tmp55 = tmp53 - (K500000000 * tmp54); tmp56 = tmp52 - tmp55; tmp63 = tmp55 + tmp52; tmp22 = K866025403 * (tmp20 - tmp21); tmp29 = tmp25 - tmp28; tmp30 = tmp22 + tmp29; tmp33 = tmp29 - tmp22; } } real_output[0] = tmp66 + tmp65; { fftw_real tmp40; fftw_real tmp46; fftw_real tmp35; fftw_real tmp48; fftw_real tmp43; fftw_real tmp45; fftw_real tmp44; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp40 = (K575140729 * tmp36) - (K174138601 * tmp39); tmp46 = (K174138601 * tmp36) + (K575140729 * tmp39); { fftw_real tmp31; fftw_real tmp34; fftw_real tmp41; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; tmp31 = (K300238635 * tmp19) + (K011599105 * tmp30); tmp34 = (K256247671 * tmp32) + (K156891391 * tmp33); tmp35 = tmp31 - tmp34; tmp48 = K1_732050807 * (tmp31 + tmp34); tmp41 = (K300238635 * tmp30) - (K011599105 * tmp19); tmp42 = (K156891391 * tmp32) - (K256247671 * tmp33); tmp43 = K1_732050807 * (tmp41 - tmp42); tmp45 = tmp41 + tmp42; } imag_output[imag_ostride] = (K2_000000000 * tmp35) + tmp40; tmp44 = tmp40 - tmp35; imag_output[4 * imag_ostride] = -(tmp43 + tmp44); imag_output[3 * imag_ostride] = tmp44 - tmp43; imag_output[5 * imag_ostride] = -((K2_000000000 * tmp45) + tmp46); tmp47 = tmp45 - tmp46; imag_output[2 * imag_ostride] = tmp47 - tmp48; imag_output[6 * imag_ostride] = tmp48 + tmp47; } { fftw_real tmp61; fftw_real tmp70; fftw_real tmp74; fftw_real tmp76; fftw_real tmp68; fftw_real tmp69; fftw_real tmp57; fftw_real tmp60; fftw_real tmp71; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; tmp57 = (K132983124 * tmp51) + (K258260390 * tmp56); tmp60 = K300462606 * (tmp58 - tmp59); tmp61 = (K2_000000000 * tmp57) + tmp60; tmp70 = tmp60 - tmp57; { fftw_real tmp72; fftw_real tmp73; fftw_real tmp64; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; tmp72 = (K387390585 * tmp51) - (K265966249 * tmp56); tmp73 = (K113854479 * tmp62) - (K503537032 * tmp63); tmp74 = tmp72 + tmp73; tmp76 = tmp73 - tmp72; tmp64 = (K251768516 * tmp62) + (K075902986 * tmp63); tmp67 = tmp65 - (K083333333 * tmp66); tmp68 = (K2_000000000 * tmp64) + tmp67; tmp69 = tmp67 - tmp64; } real_output[real_ostride] = tmp61 + tmp68; real_output[5 * real_ostride] = tmp68 - tmp61; tmp71 = tmp69 - tmp70; real_output[2 * real_ostride] = tmp71 - tmp74; real_output[6 * real_ostride] = tmp74 + tmp71; tmp75 = tmp70 + tmp69; real_output[3 * real_ostride] = tmp75 - tmp76; real_output[4 * real_ostride] = tmp76 + tmp75; } } fftw_codelet_desc fftw_real2hc_13_desc = { "fftw_real2hc_13", (void (*)()) fftw_real2hc_13, 13, FFTW_FORWARD, FFTW_REAL2HC, 288, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_14.c���������������������������������������������������������������������������0000644�0001754�0000144�00000013737�07637527146�010554� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:06 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 14 */ /* * This function contains 62 FP additions, 36 FP multiplications, * (or, 62 additions, 36 multiplications, 0 fused multiply/add), * 22 stack variables, and 28 memory accesses */ static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_14(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp3; fftw_real tmp37; fftw_real tmp6; fftw_real tmp31; fftw_real tmp23; fftw_real tmp35; fftw_real tmp20; fftw_real tmp34; fftw_real tmp13; fftw_real tmp29; fftw_real tmp9; fftw_real tmp32; fftw_real tmp16; fftw_real tmp28; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[7 * istride]; tmp3 = tmp1 - tmp2; tmp37 = tmp1 + tmp2; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp4 = input[6 * istride]; tmp5 = input[13 * istride]; tmp6 = tmp4 - tmp5; tmp31 = tmp4 + tmp5; tmp21 = input[10 * istride]; tmp22 = input[3 * istride]; tmp23 = tmp21 - tmp22; tmp35 = tmp21 + tmp22; } { fftw_real tmp18; fftw_real tmp19; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp18 = input[4 * istride]; tmp19 = input[11 * istride]; tmp20 = tmp18 - tmp19; tmp34 = tmp18 + tmp19; tmp11 = input[2 * istride]; tmp12 = input[9 * istride]; tmp13 = tmp11 - tmp12; tmp29 = tmp11 + tmp12; } { fftw_real tmp7; fftw_real tmp8; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp7 = input[8 * istride]; tmp8 = input[istride]; tmp9 = tmp7 - tmp8; tmp32 = tmp7 + tmp8; tmp14 = input[12 * istride]; tmp15 = input[5 * istride]; tmp16 = tmp14 - tmp15; tmp28 = tmp14 + tmp15; } { fftw_real tmp25; fftw_real tmp27; fftw_real tmp26; fftw_real tmp10; fftw_real tmp24; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp25 = tmp16 - tmp13; tmp27 = tmp23 - tmp20; tmp26 = tmp9 - tmp6; imag_output[5 * imag_ostride] = -((K974927912 * tmp25) - (K781831482 * tmp26) - (K433883739 * tmp27)); imag_output[3 * imag_ostride] = (K974927912 * tmp26) + (K433883739 * tmp25) - (K781831482 * tmp27); imag_output[imag_ostride] = (K974927912 * tmp27) + (K433883739 * tmp26) + (K781831482 * tmp25); tmp10 = tmp6 + tmp9; tmp24 = tmp20 + tmp23; tmp17 = tmp13 + tmp16; real_output[5 * real_ostride] = tmp3 + (K623489801 * tmp10) - (K222520933 * tmp17) - (K900968867 * tmp24); real_output[7 * real_ostride] = tmp3 + tmp24 + tmp10 + tmp17; real_output[3 * real_ostride] = tmp3 + (K623489801 * tmp24) - (K900968867 * tmp17) - (K222520933 * tmp10); real_output[real_ostride] = tmp3 + (K623489801 * tmp17) - (K900968867 * tmp10) - (K222520933 * tmp24); } { fftw_real tmp30; fftw_real tmp36; fftw_real tmp33; fftw_real tmp38; fftw_real tmp40; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp28 - tmp29; tmp36 = tmp34 - tmp35; tmp33 = tmp31 - tmp32; imag_output[6 * imag_ostride] = -((K781831482 * tmp30) - (K433883739 * tmp33) - (K974927912 * tmp36)); imag_output[2 * imag_ostride] = (K433883739 * tmp36) + (K781831482 * tmp33) + (K974927912 * tmp30); imag_output[4 * imag_ostride] = -((K781831482 * tmp36) + (K433883739 * tmp30) - (K974927912 * tmp33)); tmp38 = tmp31 + tmp32; tmp40 = tmp34 + tmp35; tmp39 = tmp29 + tmp28; real_output[2 * real_ostride] = tmp37 + (K623489801 * tmp38) - (K222520933 * tmp39) - (K900968867 * tmp40); real_output[0] = tmp37 + tmp40 + tmp38 + tmp39; real_output[4 * real_ostride] = tmp37 + (K623489801 * tmp40) - (K900968867 * tmp39) - (K222520933 * tmp38); real_output[6 * real_ostride] = tmp37 + (K623489801 * tmp39) - (K900968867 * tmp38) - (K222520933 * tmp40); } } fftw_codelet_desc fftw_real2hc_14_desc = { "fftw_real2hc_14", (void (*)()) fftw_real2hc_14, 14, FFTW_FORWARD, FFTW_REAL2HC, 310, 0, (const int *) 0, }; ���������������������������������fftw-2.1.5/rfftw/frc_15.c���������������������������������������������������������������������������0000644�0001754�0000144�00000016644�07637527141�010550� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:06 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 15 */ /* * This function contains 64 FP additions, 25 FP multiplications, * (or, 50 additions, 11 multiplications, 14 fused multiply/add), * 40 stack variables, and 30 memory accesses */ static const fftw_real K509036960 = FFTW_KONST(+0.509036960455127183450980863393907648510733164); static const fftw_real K823639103 = FFTW_KONST(+0.823639103546331925877420039278190003029660514); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K484122918 = FFTW_KONST(+0.484122918275927110647408174972799951354115213); static const fftw_real K216506350 = FFTW_KONST(+0.216506350946109661690930792688234045867850657); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_15(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp3; fftw_real tmp59; fftw_real tmp53; fftw_real tmp45; fftw_real tmp46; fftw_real tmp10; fftw_real tmp17; fftw_real tmp18; fftw_real tmp42; fftw_real tmp43; fftw_real tmp61; fftw_real tmp31; fftw_real tmp34; fftw_real tmp49; fftw_real tmp39; fftw_real tmp40; fftw_real tmp60; fftw_real tmp24; fftw_real tmp27; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp51; fftw_real tmp1; fftw_real tmp2; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp51 = input[0]; tmp1 = input[10 * istride]; tmp2 = input[5 * istride]; tmp52 = tmp1 + tmp2; tmp3 = tmp1 - tmp2; tmp59 = tmp52 + tmp51; tmp53 = tmp51 - (K500000000 * tmp52); } { fftw_real tmp22; fftw_real tmp29; fftw_real tmp32; fftw_real tmp6; fftw_real tmp23; fftw_real tmp25; fftw_real tmp16; fftw_real tmp33; fftw_real tmp9; fftw_real tmp26; fftw_real tmp13; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp22 = input[3 * istride]; tmp29 = input[6 * istride]; tmp32 = input[9 * istride]; tmp4 = input[13 * istride]; tmp5 = input[8 * istride]; tmp6 = tmp4 - tmp5; tmp23 = tmp4 + tmp5; tmp25 = input[12 * istride]; tmp14 = input[4 * istride]; tmp15 = input[14 * istride]; tmp16 = tmp14 - tmp15; tmp33 = tmp14 + tmp15; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp7 = input[7 * istride]; tmp8 = input[2 * istride]; tmp9 = tmp7 - tmp8; tmp26 = tmp7 + tmp8; tmp11 = input[istride]; tmp12 = input[11 * istride]; tmp13 = tmp11 - tmp12; tmp30 = tmp11 + tmp12; } } tmp45 = tmp6 - tmp9; tmp46 = tmp13 - tmp16; tmp10 = tmp6 + tmp9; tmp17 = tmp13 + tmp16; tmp18 = tmp10 + tmp17; tmp42 = tmp30 + tmp29; tmp43 = tmp33 + tmp32; tmp61 = tmp42 + tmp43; tmp31 = tmp29 - (K500000000 * tmp30); tmp34 = tmp32 - (K500000000 * tmp33); tmp49 = tmp31 + tmp34; tmp39 = tmp23 + tmp22; tmp40 = tmp26 + tmp25; tmp60 = tmp39 + tmp40; tmp24 = tmp22 - (K500000000 * tmp23); tmp27 = tmp25 - (K500000000 * tmp26); tmp48 = tmp24 + tmp27; } imag_output[5 * imag_ostride] = -(K866025403 * (tmp3 + tmp18)); { fftw_real tmp21; fftw_real tmp37; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp20; fftw_real tmp28; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp19 = (K866025403 * tmp3) - (K216506350 * tmp18); tmp20 = K484122918 * (tmp10 - tmp17); tmp21 = tmp19 + tmp20; tmp37 = tmp20 - tmp19; tmp28 = tmp24 - tmp27; tmp35 = tmp31 - tmp34; tmp36 = (K951056516 * tmp28) + (K587785252 * tmp35); tmp38 = (K951056516 * tmp35) - (K587785252 * tmp28); } imag_output[imag_ostride] = tmp21 - tmp36; imag_output[4 * imag_ostride] = tmp21 + tmp36; imag_output[2 * imag_ostride] = tmp37 + tmp38; imag_output[7 * imag_ostride] = tmp38 - tmp37; } { fftw_real tmp41; fftw_real tmp44; fftw_real tmp64; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp41 = tmp39 - tmp40; tmp44 = tmp42 - tmp43; imag_output[3 * imag_ostride] = (K587785252 * tmp41) - (K951056516 * tmp44); imag_output[6 * imag_ostride] = -((K951056516 * tmp41) + (K587785252 * tmp44)); tmp64 = K559016994 * (tmp60 - tmp61); tmp62 = tmp60 + tmp61; tmp63 = tmp59 - (K250000000 * tmp62); real_output[3 * real_ostride] = tmp63 - tmp64; real_output[6 * real_ostride] = tmp64 + tmp63; real_output[0] = tmp62 + tmp59; { fftw_real tmp47; fftw_real tmp58; fftw_real tmp50; fftw_real tmp54; fftw_real tmp55; fftw_real tmp57; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp47 = (K823639103 * tmp45) + (K509036960 * tmp46); tmp58 = (K509036960 * tmp45) - (K823639103 * tmp46); tmp50 = K559016994 * (tmp48 - tmp49); tmp54 = tmp48 + tmp49; tmp55 = tmp53 - (K250000000 * tmp54); real_output[5 * real_ostride] = tmp54 + tmp53; tmp57 = tmp55 - tmp50; real_output[2 * real_ostride] = tmp57 - tmp58; real_output[7 * real_ostride] = tmp58 + tmp57; tmp56 = tmp50 + tmp55; real_output[real_ostride] = tmp47 + tmp56; real_output[4 * real_ostride] = tmp56 - tmp47; } } } fftw_codelet_desc fftw_real2hc_15_desc = { "fftw_real2hc_15", (void (*)()) fftw_real2hc_15, 15, FFTW_FORWARD, FFTW_REAL2HC, 332, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_16.c���������������������������������������������������������������������������0000644�0001754�0000144�00000014330�07637527143�010541� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:09 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 16 */ /* * This function contains 58 FP additions, 12 FP multiplications, * (or, 54 additions, 8 multiplications, 4 fused multiply/add), * 30 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_16(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp3; fftw_real tmp6; fftw_real tmp7; fftw_real tmp35; fftw_real tmp18; fftw_real tmp33; fftw_real tmp40; fftw_real tmp48; fftw_real tmp56; fftw_real tmp10; fftw_real tmp13; fftw_real tmp14; fftw_real tmp36; fftw_real tmp17; fftw_real tmp26; fftw_real tmp41; fftw_real tmp51; fftw_real tmp57; fftw_real tmp16; fftw_real tmp15; fftw_real tmp43; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[8 * istride]; tmp3 = tmp1 + tmp2; tmp4 = input[4 * istride]; tmp5 = input[12 * istride]; tmp6 = tmp4 + tmp5; tmp7 = tmp3 + tmp6; tmp35 = tmp1 - tmp2; tmp18 = tmp4 - tmp5; } { fftw_real tmp29; fftw_real tmp46; fftw_real tmp32; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp27; fftw_real tmp28; fftw_real tmp30; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; tmp27 = input[istride]; tmp28 = input[9 * istride]; tmp29 = tmp27 - tmp28; tmp46 = tmp27 + tmp28; tmp30 = input[5 * istride]; tmp31 = input[13 * istride]; tmp32 = tmp30 - tmp31; tmp47 = tmp30 + tmp31; } tmp33 = (K382683432 * tmp29) + (K923879532 * tmp32); tmp40 = (K923879532 * tmp29) - (K382683432 * tmp32); tmp48 = tmp46 - tmp47; tmp56 = tmp46 + tmp47; } { fftw_real tmp8; fftw_real tmp9; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp8 = input[2 * istride]; tmp9 = input[10 * istride]; tmp10 = tmp8 + tmp9; tmp16 = tmp8 - tmp9; tmp11 = input[14 * istride]; tmp12 = input[6 * istride]; tmp13 = tmp11 + tmp12; tmp15 = tmp11 - tmp12; } tmp14 = tmp10 + tmp13; tmp36 = K707106781 * (tmp16 + tmp15); tmp17 = K707106781 * (tmp15 - tmp16); { fftw_real tmp22; fftw_real tmp49; fftw_real tmp25; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp20; fftw_real tmp21; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp20 = input[15 * istride]; tmp21 = input[7 * istride]; tmp22 = tmp20 - tmp21; tmp49 = tmp20 + tmp21; tmp23 = input[3 * istride]; tmp24 = input[11 * istride]; tmp25 = tmp23 - tmp24; tmp50 = tmp23 + tmp24; } tmp26 = (K382683432 * tmp22) - (K923879532 * tmp25); tmp41 = (K923879532 * tmp22) + (K382683432 * tmp25); tmp51 = tmp49 - tmp50; tmp57 = tmp49 + tmp50; } { fftw_real tmp55; fftw_real tmp58; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; real_output[4 * real_ostride] = tmp7 - tmp14; tmp55 = tmp7 + tmp14; tmp58 = tmp56 + tmp57; real_output[8 * real_ostride] = tmp55 - tmp58; real_output[0] = tmp55 + tmp58; imag_output[4 * imag_ostride] = tmp57 - tmp56; tmp53 = tmp13 - tmp10; tmp54 = K707106781 * (tmp51 - tmp48); imag_output[2 * imag_ostride] = tmp53 + tmp54; imag_output[6 * imag_ostride] = tmp54 - tmp53; } { fftw_real tmp45; fftw_real tmp52; fftw_real tmp39; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp3 - tmp6; tmp52 = K707106781 * (tmp48 + tmp51); real_output[6 * real_ostride] = tmp45 - tmp52; real_output[2 * real_ostride] = tmp45 + tmp52; tmp39 = tmp35 + tmp36; tmp42 = tmp40 + tmp41; real_output[7 * real_ostride] = tmp39 - tmp42; real_output[real_ostride] = tmp39 + tmp42; } tmp43 = tmp18 + tmp17; tmp44 = tmp41 - tmp40; imag_output[3 * imag_ostride] = tmp43 + tmp44; imag_output[5 * imag_ostride] = tmp44 - tmp43; { fftw_real tmp19; fftw_real tmp34; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp17 - tmp18; tmp34 = tmp26 - tmp33; imag_output[imag_ostride] = tmp19 + tmp34; imag_output[7 * imag_ostride] = tmp34 - tmp19; tmp37 = tmp35 - tmp36; tmp38 = tmp33 + tmp26; real_output[5 * real_ostride] = tmp37 - tmp38; real_output[3 * real_ostride] = tmp37 + tmp38; } } fftw_codelet_desc fftw_real2hc_16_desc = { "fftw_real2hc_16", (void (*)()) fftw_real2hc_16, 16, FFTW_FORWARD, FFTW_REAL2HC, 354, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_32.c���������������������������������������������������������������������������0000644�0001754�0000144�00000033313�07637527152�010541� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:10 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 32 */ /* * This function contains 156 FP additions, 42 FP multiplications, * (or, 140 additions, 26 multiplications, 16 fused multiply/add), * 46 stack variables, and 64 memory accesses */ static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_32(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp7; fftw_real tmp135; fftw_real tmp31; fftw_real tmp83; fftw_real tmp14; fftw_real tmp148; fftw_real tmp34; fftw_real tmp82; fftw_real tmp123; fftw_real tmp143; fftw_real tmp71; fftw_real tmp99; fftw_real tmp126; fftw_real tmp144; fftw_real tmp76; fftw_real tmp100; fftw_real tmp22; fftw_real tmp136; fftw_real tmp38; fftw_real tmp80; fftw_real tmp29; fftw_real tmp137; fftw_real tmp41; fftw_real tmp79; fftw_real tmp116; fftw_real tmp140; fftw_real tmp54; fftw_real tmp96; fftw_real tmp119; fftw_real tmp141; fftw_real tmp59; fftw_real tmp97; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[16 * istride]; tmp3 = tmp1 + tmp2; tmp4 = input[8 * istride]; tmp5 = input[24 * istride]; tmp6 = tmp4 + tmp5; tmp7 = tmp3 + tmp6; tmp135 = tmp3 - tmp6; tmp31 = tmp1 - tmp2; tmp83 = tmp4 - tmp5; } { fftw_real tmp10; fftw_real tmp32; fftw_real tmp13; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp8 = input[4 * istride]; tmp9 = input[20 * istride]; tmp10 = tmp8 + tmp9; tmp32 = tmp8 - tmp9; tmp11 = input[28 * istride]; tmp12 = input[12 * istride]; tmp13 = tmp11 + tmp12; tmp33 = tmp11 - tmp12; } tmp14 = tmp10 + tmp13; tmp148 = tmp13 - tmp10; tmp34 = K707106781 * (tmp32 + tmp33); tmp82 = K707106781 * (tmp33 - tmp32); } { fftw_real tmp63; fftw_real tmp121; fftw_real tmp75; fftw_real tmp122; fftw_real tmp66; fftw_real tmp124; fftw_real tmp69; fftw_real tmp125; fftw_real tmp70; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp61; fftw_real tmp62; fftw_real tmp73; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp61 = input[31 * istride]; tmp62 = input[15 * istride]; tmp63 = tmp61 - tmp62; tmp121 = tmp61 + tmp62; tmp73 = input[7 * istride]; tmp74 = input[23 * istride]; tmp75 = tmp73 - tmp74; tmp122 = tmp73 + tmp74; } { fftw_real tmp64; fftw_real tmp65; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp64 = input[3 * istride]; tmp65 = input[19 * istride]; tmp66 = tmp64 - tmp65; tmp124 = tmp64 + tmp65; tmp67 = input[27 * istride]; tmp68 = input[11 * istride]; tmp69 = tmp67 - tmp68; tmp125 = tmp67 + tmp68; } tmp123 = tmp121 + tmp122; tmp143 = tmp121 - tmp122; tmp70 = K707106781 * (tmp66 + tmp69); tmp71 = tmp63 + tmp70; tmp99 = tmp63 - tmp70; tmp126 = tmp124 + tmp125; tmp144 = tmp125 - tmp124; tmp72 = K707106781 * (tmp69 - tmp66); tmp76 = tmp72 - tmp75; tmp100 = tmp75 + tmp72; } { fftw_real tmp18; fftw_real tmp36; fftw_real tmp21; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = input[2 * istride]; tmp17 = input[18 * istride]; tmp18 = tmp16 + tmp17; tmp36 = tmp16 - tmp17; tmp19 = input[10 * istride]; tmp20 = input[26 * istride]; tmp21 = tmp19 + tmp20; tmp37 = tmp19 - tmp20; } tmp22 = tmp18 + tmp21; tmp136 = tmp18 - tmp21; tmp38 = (K923879532 * tmp36) - (K382683432 * tmp37); tmp80 = (K382683432 * tmp36) + (K923879532 * tmp37); } { fftw_real tmp25; fftw_real tmp39; fftw_real tmp28; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp23 = input[30 * istride]; tmp24 = input[14 * istride]; tmp25 = tmp23 + tmp24; tmp39 = tmp23 - tmp24; tmp26 = input[6 * istride]; tmp27 = input[22 * istride]; tmp28 = tmp26 + tmp27; tmp40 = tmp26 - tmp27; } tmp29 = tmp25 + tmp28; tmp137 = tmp25 - tmp28; tmp41 = (K923879532 * tmp39) + (K382683432 * tmp40); tmp79 = (K382683432 * tmp39) - (K923879532 * tmp40); } { fftw_real tmp46; fftw_real tmp114; fftw_real tmp58; fftw_real tmp115; fftw_real tmp49; fftw_real tmp117; fftw_real tmp52; fftw_real tmp118; fftw_real tmp53; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp44; fftw_real tmp45; fftw_real tmp56; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp44 = input[istride]; tmp45 = input[17 * istride]; tmp46 = tmp44 - tmp45; tmp114 = tmp44 + tmp45; tmp56 = input[9 * istride]; tmp57 = input[25 * istride]; tmp58 = tmp56 - tmp57; tmp115 = tmp56 + tmp57; } { fftw_real tmp47; fftw_real tmp48; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp47 = input[5 * istride]; tmp48 = input[21 * istride]; tmp49 = tmp47 - tmp48; tmp117 = tmp47 + tmp48; tmp50 = input[29 * istride]; tmp51 = input[13 * istride]; tmp52 = tmp50 - tmp51; tmp118 = tmp50 + tmp51; } tmp116 = tmp114 + tmp115; tmp140 = tmp114 - tmp115; tmp53 = K707106781 * (tmp49 + tmp52); tmp54 = tmp46 + tmp53; tmp96 = tmp46 - tmp53; tmp119 = tmp117 + tmp118; tmp141 = tmp118 - tmp117; tmp55 = K707106781 * (tmp52 - tmp49); tmp59 = tmp55 - tmp58; tmp97 = tmp58 + tmp55; } { fftw_real tmp15; fftw_real tmp30; fftw_real tmp131; fftw_real tmp132; fftw_real tmp133; fftw_real tmp134; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; tmp131 = tmp15 + tmp30; tmp132 = tmp116 + tmp119; tmp133 = tmp123 + tmp126; tmp134 = tmp132 + tmp133; real_output[8 * real_ostride] = tmp15 - tmp30; imag_output[8 * imag_ostride] = tmp133 - tmp132; real_output[16 * real_ostride] = tmp131 - tmp134; real_output[0] = tmp131 + tmp134; } { fftw_real tmp113; fftw_real tmp129; fftw_real tmp128; fftw_real tmp130; fftw_real tmp120; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp113 = tmp7 - tmp14; tmp129 = tmp29 - tmp22; tmp120 = tmp116 - tmp119; tmp127 = tmp123 - tmp126; tmp128 = K707106781 * (tmp120 + tmp127); tmp130 = K707106781 * (tmp127 - tmp120); real_output[12 * real_ostride] = tmp113 - tmp128; real_output[4 * real_ostride] = tmp113 + tmp128; imag_output[4 * imag_ostride] = tmp129 + tmp130; imag_output[12 * imag_ostride] = tmp130 - tmp129; } { fftw_real tmp139; fftw_real tmp155; fftw_real tmp149; fftw_real tmp151; fftw_real tmp146; fftw_real tmp150; fftw_real tmp154; fftw_real tmp156; fftw_real tmp138; fftw_real tmp147; ASSERT_ALIGNED_DOUBLE; tmp138 = K707106781 * (tmp136 + tmp137); tmp139 = tmp135 + tmp138; tmp155 = tmp135 - tmp138; tmp147 = K707106781 * (tmp137 - tmp136); tmp149 = tmp147 - tmp148; tmp151 = tmp148 + tmp147; { fftw_real tmp142; fftw_real tmp145; fftw_real tmp152; fftw_real tmp153; ASSERT_ALIGNED_DOUBLE; tmp142 = (K923879532 * tmp140) + (K382683432 * tmp141); tmp145 = (K923879532 * tmp143) - (K382683432 * tmp144); tmp146 = tmp142 + tmp145; tmp150 = tmp145 - tmp142; tmp152 = (K923879532 * tmp141) - (K382683432 * tmp140); tmp153 = (K382683432 * tmp143) + (K923879532 * tmp144); tmp154 = tmp152 + tmp153; tmp156 = tmp153 - tmp152; } real_output[14 * real_ostride] = tmp139 - tmp146; real_output[2 * real_ostride] = tmp139 + tmp146; imag_output[6 * imag_ostride] = tmp149 + tmp150; imag_output[10 * imag_ostride] = tmp150 - tmp149; imag_output[2 * imag_ostride] = tmp151 + tmp154; imag_output[14 * imag_ostride] = tmp154 - tmp151; real_output[10 * real_ostride] = tmp155 - tmp156; real_output[6 * real_ostride] = tmp155 + tmp156; } { fftw_real tmp95; fftw_real tmp111; fftw_real tmp110; fftw_real tmp112; fftw_real tmp102; fftw_real tmp106; fftw_real tmp105; fftw_real tmp107; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp93; fftw_real tmp94; fftw_real tmp108; fftw_real tmp109; ASSERT_ALIGNED_DOUBLE; tmp93 = tmp31 - tmp34; tmp94 = tmp80 + tmp79; tmp95 = tmp93 + tmp94; tmp111 = tmp93 - tmp94; tmp108 = (K831469612 * tmp97) - (K555570233 * tmp96); tmp109 = (K555570233 * tmp99) + (K831469612 * tmp100); tmp110 = tmp108 + tmp109; tmp112 = tmp109 - tmp108; } { fftw_real tmp98; fftw_real tmp101; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp98 = (K831469612 * tmp96) + (K555570233 * tmp97); tmp101 = (K831469612 * tmp99) - (K555570233 * tmp100); tmp102 = tmp98 + tmp101; tmp106 = tmp101 - tmp98; tmp103 = tmp41 - tmp38; tmp104 = tmp83 + tmp82; tmp105 = tmp103 - tmp104; tmp107 = tmp104 + tmp103; } real_output[13 * real_ostride] = tmp95 - tmp102; real_output[3 * real_ostride] = tmp95 + tmp102; imag_output[5 * imag_ostride] = tmp105 + tmp106; imag_output[11 * imag_ostride] = tmp106 - tmp105; imag_output[3 * imag_ostride] = tmp107 + tmp110; imag_output[13 * imag_ostride] = tmp110 - tmp107; real_output[11 * real_ostride] = tmp111 - tmp112; real_output[5 * real_ostride] = tmp111 + tmp112; } { fftw_real tmp43; fftw_real tmp91; fftw_real tmp90; fftw_real tmp92; fftw_real tmp78; fftw_real tmp86; fftw_real tmp85; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp35; fftw_real tmp42; fftw_real tmp88; fftw_real tmp89; ASSERT_ALIGNED_DOUBLE; tmp35 = tmp31 + tmp34; tmp42 = tmp38 + tmp41; tmp43 = tmp35 + tmp42; tmp91 = tmp35 - tmp42; tmp88 = (K980785280 * tmp59) - (K195090322 * tmp54); tmp89 = (K195090322 * tmp71) + (K980785280 * tmp76); tmp90 = tmp88 + tmp89; tmp92 = tmp89 - tmp88; } { fftw_real tmp60; fftw_real tmp77; fftw_real tmp81; fftw_real tmp84; ASSERT_ALIGNED_DOUBLE; tmp60 = (K980785280 * tmp54) + (K195090322 * tmp59); tmp77 = (K980785280 * tmp71) - (K195090322 * tmp76); tmp78 = tmp60 + tmp77; tmp86 = tmp77 - tmp60; tmp81 = tmp79 - tmp80; tmp84 = tmp82 - tmp83; tmp85 = tmp81 - tmp84; tmp87 = tmp84 + tmp81; } real_output[15 * real_ostride] = tmp43 - tmp78; real_output[real_ostride] = tmp43 + tmp78; imag_output[7 * imag_ostride] = tmp85 + tmp86; imag_output[9 * imag_ostride] = tmp86 - tmp85; imag_output[imag_ostride] = tmp87 + tmp90; imag_output[15 * imag_ostride] = tmp90 - tmp87; real_output[9 * real_ostride] = tmp91 - tmp92; real_output[7 * real_ostride] = tmp91 + tmp92; } } fftw_codelet_desc fftw_real2hc_32_desc = { "fftw_real2hc_32", (void (*)()) fftw_real2hc_32, 32, FFTW_FORWARD, FFTW_REAL2HC, 706, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_64.c���������������������������������������������������������������������������0000644�0001754�0000144�00000101463�07637527174�010554� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:11 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 64 */ /* * This function contains 394 FP additions, 124 FP multiplications, * (or, 342 additions, 72 multiplications, 52 fused multiply/add), * 90 stack variables, and 128 memory accesses */ static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_64(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp269; fftw_real tmp7; fftw_real tmp14; fftw_real tmp15; fftw_real tmp320; fftw_real tmp67; fftw_real tmp209; fftw_real tmp179; fftw_real tmp238; fftw_real tmp301; fftw_real tmp361; fftw_real tmp381; fftw_real tmp312; fftw_real tmp143; fftw_real tmp227; fftw_real tmp167; fftw_real tmp230; fftw_real tmp158; fftw_real tmp231; fftw_real tmp162; fftw_real tmp228; fftw_real tmp308; fftw_real tmp313; fftw_real tmp364; fftw_real tmp382; fftw_real tmp22; fftw_real tmp29; fftw_real tmp30; fftw_real tmp272; fftw_real tmp321; fftw_real tmp74; fftw_real tmp239; fftw_real tmp176; fftw_real tmp210; fftw_real tmp284; fftw_real tmp354; fftw_real tmp378; fftw_real tmp295; fftw_real tmp121; fftw_real tmp223; fftw_real tmp127; fftw_real tmp220; fftw_real tmp110; fftw_real tmp221; fftw_real tmp130; fftw_real tmp224; fftw_real tmp291; fftw_real tmp296; fftw_real tmp357; fftw_real tmp379; fftw_real tmp89; fftw_real tmp213; fftw_real tmp92; fftw_real tmp212; fftw_real tmp46; fftw_real tmp374; fftw_real tmp276; fftw_real tmp317; fftw_real tmp80; fftw_real tmp215; fftw_real tmp83; fftw_real tmp216; fftw_real tmp61; fftw_real tmp375; fftw_real tmp279; fftw_real tmp318; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp63; fftw_real tmp13; fftw_real tmp65; fftw_real tmp6; fftw_real tmp178; fftw_real tmp10; fftw_real tmp64; fftw_real tmp66; fftw_real tmp177; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[32 * istride]; tmp3 = tmp1 + tmp2; tmp63 = tmp1 - tmp2; tmp11 = input[56 * istride]; tmp12 = input[24 * istride]; tmp13 = tmp11 + tmp12; tmp65 = tmp11 - tmp12; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp4 = input[16 * istride]; tmp5 = input[48 * istride]; tmp6 = tmp4 + tmp5; tmp178 = tmp4 - tmp5; tmp8 = input[8 * istride]; tmp9 = input[40 * istride]; tmp10 = tmp8 + tmp9; tmp64 = tmp8 - tmp9; } tmp269 = tmp3 - tmp6; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; tmp15 = tmp7 + tmp14; tmp320 = tmp13 - tmp10; tmp66 = K707106781 * (tmp64 + tmp65); tmp67 = tmp63 + tmp66; tmp209 = tmp63 - tmp66; tmp177 = K707106781 * (tmp65 - tmp64); tmp179 = tmp177 - tmp178; tmp238 = tmp178 + tmp177; } { fftw_real tmp135; fftw_real tmp299; fftw_real tmp166; fftw_real tmp300; fftw_real tmp138; fftw_real tmp311; fftw_real tmp141; fftw_real tmp310; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp133; fftw_real tmp134; fftw_real tmp164; fftw_real tmp165; ASSERT_ALIGNED_DOUBLE; tmp133 = input[63 * istride]; tmp134 = input[31 * istride]; tmp135 = tmp133 - tmp134; tmp299 = tmp133 + tmp134; tmp164 = input[15 * istride]; tmp165 = input[47 * istride]; tmp166 = tmp164 - tmp165; tmp300 = tmp164 + tmp165; } { fftw_real tmp136; fftw_real tmp137; fftw_real tmp139; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; tmp136 = input[7 * istride]; tmp137 = input[39 * istride]; tmp138 = tmp136 - tmp137; tmp311 = tmp136 + tmp137; tmp139 = input[55 * istride]; tmp140 = input[23 * istride]; tmp141 = tmp139 - tmp140; tmp310 = tmp139 + tmp140; } { fftw_real tmp359; fftw_real tmp360; fftw_real tmp142; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; tmp301 = tmp299 - tmp300; tmp359 = tmp299 + tmp300; tmp360 = tmp311 + tmp310; tmp361 = tmp359 + tmp360; tmp381 = tmp359 - tmp360; tmp312 = tmp310 - tmp311; tmp142 = K707106781 * (tmp138 + tmp141); tmp143 = tmp135 + tmp142; tmp227 = tmp135 - tmp142; tmp163 = K707106781 * (tmp141 - tmp138); tmp167 = tmp163 - tmp166; tmp230 = tmp166 + tmp163; } } { fftw_real tmp146; fftw_real tmp302; fftw_real tmp156; fftw_real tmp306; fftw_real tmp149; fftw_real tmp303; fftw_real tmp153; fftw_real tmp305; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp144; fftw_real tmp145; fftw_real tmp154; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp144 = input[3 * istride]; tmp145 = input[35 * istride]; tmp146 = tmp144 - tmp145; tmp302 = tmp144 + tmp145; tmp154 = input[11 * istride]; tmp155 = input[43 * istride]; tmp156 = tmp154 - tmp155; tmp306 = tmp154 + tmp155; } { fftw_real tmp147; fftw_real tmp148; fftw_real tmp151; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp147 = input[19 * istride]; tmp148 = input[51 * istride]; tmp149 = tmp147 - tmp148; tmp303 = tmp147 + tmp148; tmp151 = input[59 * istride]; tmp152 = input[27 * istride]; tmp153 = tmp151 - tmp152; tmp305 = tmp151 + tmp152; } { fftw_real tmp150; fftw_real tmp157; fftw_real tmp160; fftw_real tmp161; ASSERT_ALIGNED_DOUBLE; tmp150 = (K923879532 * tmp146) - (K382683432 * tmp149); tmp157 = (K923879532 * tmp153) + (K382683432 * tmp156); tmp158 = tmp150 + tmp157; tmp231 = tmp157 - tmp150; tmp160 = (K382683432 * tmp153) - (K923879532 * tmp156); tmp161 = (K382683432 * tmp146) + (K923879532 * tmp149); tmp162 = tmp160 - tmp161; tmp228 = tmp161 + tmp160; } { fftw_real tmp304; fftw_real tmp307; fftw_real tmp362; fftw_real tmp363; ASSERT_ALIGNED_DOUBLE; tmp304 = tmp302 - tmp303; tmp307 = tmp305 - tmp306; tmp308 = K707106781 * (tmp304 + tmp307); tmp313 = K707106781 * (tmp307 - tmp304); tmp362 = tmp302 + tmp303; tmp363 = tmp305 + tmp306; tmp364 = tmp362 + tmp363; tmp382 = tmp363 - tmp362; } } { fftw_real tmp18; fftw_real tmp68; fftw_real tmp28; fftw_real tmp72; fftw_real tmp21; fftw_real tmp69; fftw_real tmp25; fftw_real tmp71; fftw_real tmp270; fftw_real tmp271; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp16 = input[4 * istride]; tmp17 = input[36 * istride]; tmp18 = tmp16 + tmp17; tmp68 = tmp16 - tmp17; tmp26 = input[12 * istride]; tmp27 = input[44 * istride]; tmp28 = tmp26 + tmp27; tmp72 = tmp26 - tmp27; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp19 = input[20 * istride]; tmp20 = input[52 * istride]; tmp21 = tmp19 + tmp20; tmp69 = tmp19 - tmp20; tmp23 = input[60 * istride]; tmp24 = input[28 * istride]; tmp25 = tmp23 + tmp24; tmp71 = tmp23 - tmp24; } tmp22 = tmp18 + tmp21; tmp29 = tmp25 + tmp28; tmp30 = tmp22 + tmp29; tmp270 = tmp18 - tmp21; tmp271 = tmp25 - tmp28; tmp272 = K707106781 * (tmp270 + tmp271); tmp321 = K707106781 * (tmp271 - tmp270); { fftw_real tmp70; fftw_real tmp73; fftw_real tmp174; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; tmp70 = (K923879532 * tmp68) - (K382683432 * tmp69); tmp73 = (K923879532 * tmp71) + (K382683432 * tmp72); tmp74 = tmp70 + tmp73; tmp239 = tmp73 - tmp70; tmp174 = (K382683432 * tmp71) - (K923879532 * tmp72); tmp175 = (K382683432 * tmp68) + (K923879532 * tmp69); tmp176 = tmp174 - tmp175; tmp210 = tmp175 + tmp174; } } { fftw_real tmp113; fftw_real tmp293; fftw_real tmp125; fftw_real tmp282; fftw_real tmp116; fftw_real tmp294; fftw_real tmp120; fftw_real tmp283; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp111; fftw_real tmp112; fftw_real tmp123; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; tmp111 = input[57 * istride]; tmp112 = input[25 * istride]; tmp113 = tmp111 - tmp112; tmp293 = tmp111 + tmp112; tmp123 = input[istride]; tmp124 = input[33 * istride]; tmp125 = tmp123 - tmp124; tmp282 = tmp123 + tmp124; } { fftw_real tmp114; fftw_real tmp115; fftw_real tmp118; fftw_real tmp119; ASSERT_ALIGNED_DOUBLE; tmp114 = input[9 * istride]; tmp115 = input[41 * istride]; tmp116 = tmp114 - tmp115; tmp294 = tmp114 + tmp115; tmp118 = input[17 * istride]; tmp119 = input[49 * istride]; tmp120 = tmp118 - tmp119; tmp283 = tmp118 + tmp119; } { fftw_real tmp352; fftw_real tmp353; fftw_real tmp117; fftw_real tmp126; ASSERT_ALIGNED_DOUBLE; tmp284 = tmp282 - tmp283; tmp352 = tmp282 + tmp283; tmp353 = tmp294 + tmp293; tmp354 = tmp352 + tmp353; tmp378 = tmp352 - tmp353; tmp295 = tmp293 - tmp294; tmp117 = K707106781 * (tmp113 - tmp116); tmp121 = tmp117 - tmp120; tmp223 = tmp120 + tmp117; tmp126 = K707106781 * (tmp116 + tmp113); tmp127 = tmp125 + tmp126; tmp220 = tmp125 - tmp126; } } { fftw_real tmp98; fftw_real tmp288; fftw_real tmp108; fftw_real tmp286; fftw_real tmp101; fftw_real tmp289; fftw_real tmp105; fftw_real tmp285; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp96; fftw_real tmp97; fftw_real tmp106; fftw_real tmp107; ASSERT_ALIGNED_DOUBLE; tmp96 = input[61 * istride]; tmp97 = input[29 * istride]; tmp98 = tmp96 - tmp97; tmp288 = tmp96 + tmp97; tmp106 = input[21 * istride]; tmp107 = input[53 * istride]; tmp108 = tmp106 - tmp107; tmp286 = tmp106 + tmp107; } { fftw_real tmp99; fftw_real tmp100; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp99 = input[13 * istride]; tmp100 = input[45 * istride]; tmp101 = tmp99 - tmp100; tmp289 = tmp99 + tmp100; tmp103 = input[5 * istride]; tmp104 = input[37 * istride]; tmp105 = tmp103 - tmp104; tmp285 = tmp103 + tmp104; } { fftw_real tmp102; fftw_real tmp109; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp102 = (K382683432 * tmp98) - (K923879532 * tmp101); tmp109 = (K382683432 * tmp105) + (K923879532 * tmp108); tmp110 = tmp102 - tmp109; tmp221 = tmp109 + tmp102; tmp128 = (K923879532 * tmp105) - (K382683432 * tmp108); tmp129 = (K923879532 * tmp98) + (K382683432 * tmp101); tmp130 = tmp128 + tmp129; tmp224 = tmp129 - tmp128; } { fftw_real tmp287; fftw_real tmp290; fftw_real tmp355; fftw_real tmp356; ASSERT_ALIGNED_DOUBLE; tmp287 = tmp285 - tmp286; tmp290 = tmp288 - tmp289; tmp291 = K707106781 * (tmp287 + tmp290); tmp296 = K707106781 * (tmp290 - tmp287); tmp355 = tmp285 + tmp286; tmp356 = tmp288 + tmp289; tmp357 = tmp355 + tmp356; tmp379 = tmp356 - tmp355; } } { fftw_real tmp34; fftw_real tmp90; fftw_real tmp44; fftw_real tmp85; fftw_real tmp37; fftw_real tmp88; fftw_real tmp41; fftw_real tmp86; fftw_real tmp87; fftw_real tmp91; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp42; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp32 = input[2 * istride]; tmp33 = input[34 * istride]; tmp34 = tmp32 + tmp33; tmp90 = tmp32 - tmp33; tmp42 = input[58 * istride]; tmp43 = input[26 * istride]; tmp44 = tmp42 + tmp43; tmp85 = tmp42 - tmp43; } { fftw_real tmp35; fftw_real tmp36; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp35 = input[18 * istride]; tmp36 = input[50 * istride]; tmp37 = tmp35 + tmp36; tmp88 = tmp35 - tmp36; tmp39 = input[10 * istride]; tmp40 = input[42 * istride]; tmp41 = tmp39 + tmp40; tmp86 = tmp39 - tmp40; } tmp87 = K707106781 * (tmp85 - tmp86); tmp89 = tmp87 - tmp88; tmp213 = tmp88 + tmp87; tmp91 = K707106781 * (tmp86 + tmp85); tmp92 = tmp90 + tmp91; tmp212 = tmp90 - tmp91; { fftw_real tmp38; fftw_real tmp45; fftw_real tmp274; fftw_real tmp275; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp46 = tmp38 + tmp45; tmp374 = tmp38 - tmp45; tmp274 = tmp34 - tmp37; tmp275 = tmp44 - tmp41; tmp276 = (K923879532 * tmp274) + (K382683432 * tmp275); tmp317 = (K923879532 * tmp275) - (K382683432 * tmp274); } } { fftw_real tmp49; fftw_real tmp76; fftw_real tmp59; fftw_real tmp78; fftw_real tmp52; fftw_real tmp82; fftw_real tmp56; fftw_real tmp77; fftw_real tmp79; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp57; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp47 = input[62 * istride]; tmp48 = input[30 * istride]; tmp49 = tmp47 + tmp48; tmp76 = tmp47 - tmp48; tmp57 = input[54 * istride]; tmp58 = input[22 * istride]; tmp59 = tmp57 + tmp58; tmp78 = tmp57 - tmp58; } { fftw_real tmp50; fftw_real tmp51; fftw_real tmp54; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; tmp50 = input[14 * istride]; tmp51 = input[46 * istride]; tmp52 = tmp50 + tmp51; tmp82 = tmp50 - tmp51; tmp54 = input[6 * istride]; tmp55 = input[38 * istride]; tmp56 = tmp54 + tmp55; tmp77 = tmp54 - tmp55; } tmp79 = K707106781 * (tmp77 + tmp78); tmp80 = tmp76 + tmp79; tmp215 = tmp76 - tmp79; tmp81 = K707106781 * (tmp78 - tmp77); tmp83 = tmp81 - tmp82; tmp216 = tmp82 + tmp81; { fftw_real tmp53; fftw_real tmp60; fftw_real tmp277; fftw_real tmp278; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp61 = tmp53 + tmp60; tmp375 = tmp53 - tmp60; tmp277 = tmp49 - tmp52; tmp278 = tmp59 - tmp56; tmp279 = (K923879532 * tmp277) - (K382683432 * tmp278); tmp318 = (K382683432 * tmp277) + (K923879532 * tmp278); } } { fftw_real tmp31; fftw_real tmp62; fftw_real tmp369; fftw_real tmp370; fftw_real tmp371; fftw_real tmp372; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp15 + tmp30; tmp62 = tmp46 + tmp61; tmp369 = tmp31 + tmp62; tmp370 = tmp354 + tmp357; tmp371 = tmp361 + tmp364; tmp372 = tmp370 + tmp371; real_output[16 * real_ostride] = tmp31 - tmp62; imag_output[16 * imag_ostride] = tmp371 - tmp370; real_output[32 * real_ostride] = tmp369 - tmp372; real_output[0] = tmp369 + tmp372; } { fftw_real tmp351; fftw_real tmp367; fftw_real tmp366; fftw_real tmp368; fftw_real tmp358; fftw_real tmp365; ASSERT_ALIGNED_DOUBLE; tmp351 = tmp15 - tmp30; tmp367 = tmp61 - tmp46; tmp358 = tmp354 - tmp357; tmp365 = tmp361 - tmp364; tmp366 = K707106781 * (tmp358 + tmp365); tmp368 = K707106781 * (tmp365 - tmp358); real_output[24 * real_ostride] = tmp351 - tmp366; real_output[8 * real_ostride] = tmp351 + tmp366; imag_output[8 * imag_ostride] = tmp367 + tmp368; imag_output[24 * imag_ostride] = tmp368 - tmp367; } { fftw_real tmp75; fftw_real tmp189; fftw_real tmp94; fftw_real tmp199; fftw_real tmp173; fftw_real tmp190; fftw_real tmp132; fftw_real tmp184; fftw_real tmp180; fftw_real tmp200; fftw_real tmp194; fftw_real tmp204; fftw_real tmp169; fftw_real tmp185; fftw_real tmp197; fftw_real tmp205; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp84; fftw_real tmp93; fftw_real tmp192; fftw_real tmp193; ASSERT_ALIGNED_DOUBLE; tmp75 = tmp67 - tmp74; tmp189 = tmp67 + tmp74; tmp84 = (K195090322 * tmp80) + (K980785280 * tmp83); tmp93 = (K980785280 * tmp89) - (K195090322 * tmp92); tmp94 = tmp84 - tmp93; tmp199 = tmp93 + tmp84; { fftw_real tmp171; fftw_real tmp172; fftw_real tmp122; fftw_real tmp131; ASSERT_ALIGNED_DOUBLE; tmp171 = (K980785280 * tmp80) - (K195090322 * tmp83); tmp172 = (K980785280 * tmp92) + (K195090322 * tmp89); tmp173 = tmp171 - tmp172; tmp190 = tmp172 + tmp171; tmp122 = tmp110 - tmp121; tmp131 = tmp127 - tmp130; tmp132 = (K634393284 * tmp122) + (K773010453 * tmp131); tmp184 = (K773010453 * tmp122) - (K634393284 * tmp131); } tmp180 = tmp176 - tmp179; tmp200 = tmp179 + tmp176; tmp192 = tmp121 + tmp110; tmp193 = tmp127 + tmp130; tmp194 = (K098017140 * tmp192) + (K995184726 * tmp193); tmp204 = (K995184726 * tmp192) - (K098017140 * tmp193); { fftw_real tmp159; fftw_real tmp168; fftw_real tmp195; fftw_real tmp196; ASSERT_ALIGNED_DOUBLE; tmp159 = tmp143 - tmp158; tmp168 = tmp162 - tmp167; tmp169 = (K773010453 * tmp159) - (K634393284 * tmp168); tmp185 = (K773010453 * tmp168) + (K634393284 * tmp159); tmp195 = tmp143 + tmp158; tmp196 = tmp167 + tmp162; tmp197 = (K995184726 * tmp195) - (K098017140 * tmp196); tmp205 = (K995184726 * tmp196) + (K098017140 * tmp195); } } { fftw_real tmp95; fftw_real tmp170; fftw_real tmp181; fftw_real tmp182; ASSERT_ALIGNED_DOUBLE; tmp95 = tmp75 + tmp94; tmp170 = tmp132 + tmp169; real_output[25 * real_ostride] = tmp95 - tmp170; real_output[7 * real_ostride] = tmp95 + tmp170; tmp181 = tmp173 - tmp180; tmp182 = tmp169 - tmp132; imag_output[9 * imag_ostride] = tmp181 + tmp182; imag_output[23 * imag_ostride] = tmp182 - tmp181; } { fftw_real tmp183; fftw_real tmp186; fftw_real tmp187; fftw_real tmp188; ASSERT_ALIGNED_DOUBLE; tmp183 = tmp180 + tmp173; tmp186 = tmp184 + tmp185; imag_output[7 * imag_ostride] = tmp183 + tmp186; imag_output[25 * imag_ostride] = tmp186 - tmp183; tmp187 = tmp75 - tmp94; tmp188 = tmp185 - tmp184; real_output[23 * real_ostride] = tmp187 - tmp188; real_output[9 * real_ostride] = tmp187 + tmp188; } { fftw_real tmp191; fftw_real tmp198; fftw_real tmp201; fftw_real tmp202; ASSERT_ALIGNED_DOUBLE; tmp191 = tmp189 + tmp190; tmp198 = tmp194 + tmp197; real_output[31 * real_ostride] = tmp191 - tmp198; real_output[real_ostride] = tmp191 + tmp198; tmp201 = tmp199 - tmp200; tmp202 = tmp197 - tmp194; imag_output[15 * imag_ostride] = tmp201 + tmp202; imag_output[17 * imag_ostride] = tmp202 - tmp201; } { fftw_real tmp203; fftw_real tmp206; fftw_real tmp207; fftw_real tmp208; ASSERT_ALIGNED_DOUBLE; tmp203 = tmp200 + tmp199; tmp206 = tmp204 + tmp205; imag_output[imag_ostride] = tmp203 + tmp206; imag_output[31 * imag_ostride] = tmp206 - tmp203; tmp207 = tmp189 - tmp190; tmp208 = tmp205 - tmp204; real_output[17 * real_ostride] = tmp207 - tmp208; real_output[15 * real_ostride] = tmp207 + tmp208; } } { fftw_real tmp377; fftw_real tmp393; fftw_real tmp387; fftw_real tmp389; fftw_real tmp384; fftw_real tmp388; fftw_real tmp392; fftw_real tmp394; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp373; fftw_real tmp376; fftw_real tmp385; fftw_real tmp386; ASSERT_ALIGNED_DOUBLE; tmp373 = tmp7 - tmp14; tmp376 = K707106781 * (tmp374 + tmp375); tmp377 = tmp373 + tmp376; tmp393 = tmp373 - tmp376; tmp385 = K707106781 * (tmp375 - tmp374); tmp386 = tmp29 - tmp22; tmp387 = tmp385 - tmp386; tmp389 = tmp386 + tmp385; } { fftw_real tmp380; fftw_real tmp383; fftw_real tmp390; fftw_real tmp391; ASSERT_ALIGNED_DOUBLE; tmp380 = (K923879532 * tmp378) + (K382683432 * tmp379); tmp383 = (K923879532 * tmp381) - (K382683432 * tmp382); tmp384 = tmp380 + tmp383; tmp388 = tmp383 - tmp380; tmp390 = (K923879532 * tmp379) - (K382683432 * tmp378); tmp391 = (K382683432 * tmp381) + (K923879532 * tmp382); tmp392 = tmp390 + tmp391; tmp394 = tmp391 - tmp390; } real_output[28 * real_ostride] = tmp377 - tmp384; real_output[4 * real_ostride] = tmp377 + tmp384; imag_output[12 * imag_ostride] = tmp387 + tmp388; imag_output[20 * imag_ostride] = tmp388 - tmp387; imag_output[4 * imag_ostride] = tmp389 + tmp392; imag_output[28 * imag_ostride] = tmp392 - tmp389; real_output[20 * real_ostride] = tmp393 - tmp394; real_output[12 * real_ostride] = tmp393 + tmp394; } { fftw_real tmp281; fftw_real tmp329; fftw_real tmp323; fftw_real tmp325; fftw_real tmp298; fftw_real tmp326; fftw_real tmp315; fftw_real tmp327; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp273; fftw_real tmp280; fftw_real tmp319; fftw_real tmp322; ASSERT_ALIGNED_DOUBLE; tmp273 = tmp269 + tmp272; tmp280 = tmp276 + tmp279; tmp281 = tmp273 + tmp280; tmp329 = tmp273 - tmp280; tmp319 = tmp317 + tmp318; tmp322 = tmp320 + tmp321; tmp323 = tmp319 - tmp322; tmp325 = tmp322 + tmp319; } { fftw_real tmp292; fftw_real tmp297; fftw_real tmp309; fftw_real tmp314; ASSERT_ALIGNED_DOUBLE; tmp292 = tmp284 + tmp291; tmp297 = tmp295 + tmp296; tmp298 = (K980785280 * tmp292) + (K195090322 * tmp297); tmp326 = (K980785280 * tmp297) - (K195090322 * tmp292); tmp309 = tmp301 + tmp308; tmp314 = tmp312 + tmp313; tmp315 = (K980785280 * tmp309) - (K195090322 * tmp314); tmp327 = (K195090322 * tmp309) + (K980785280 * tmp314); } { fftw_real tmp316; fftw_real tmp324; fftw_real tmp328; fftw_real tmp330; ASSERT_ALIGNED_DOUBLE; tmp316 = tmp298 + tmp315; real_output[30 * real_ostride] = tmp281 - tmp316; real_output[2 * real_ostride] = tmp281 + tmp316; tmp324 = tmp315 - tmp298; imag_output[14 * imag_ostride] = tmp323 + tmp324; imag_output[18 * imag_ostride] = tmp324 - tmp323; tmp328 = tmp326 + tmp327; imag_output[2 * imag_ostride] = tmp325 + tmp328; imag_output[30 * imag_ostride] = tmp328 - tmp325; tmp330 = tmp327 - tmp326; real_output[18 * real_ostride] = tmp329 - tmp330; real_output[14 * real_ostride] = tmp329 + tmp330; } } { fftw_real tmp333; fftw_real tmp349; fftw_real tmp343; fftw_real tmp345; fftw_real tmp336; fftw_real tmp346; fftw_real tmp339; fftw_real tmp347; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp331; fftw_real tmp332; fftw_real tmp341; fftw_real tmp342; ASSERT_ALIGNED_DOUBLE; tmp331 = tmp269 - tmp272; tmp332 = tmp318 - tmp317; tmp333 = tmp331 + tmp332; tmp349 = tmp331 - tmp332; tmp341 = tmp279 - tmp276; tmp342 = tmp321 - tmp320; tmp343 = tmp341 - tmp342; tmp345 = tmp342 + tmp341; } { fftw_real tmp334; fftw_real tmp335; fftw_real tmp337; fftw_real tmp338; ASSERT_ALIGNED_DOUBLE; tmp334 = tmp284 - tmp291; tmp335 = tmp296 - tmp295; tmp336 = (K831469612 * tmp334) + (K555570233 * tmp335); tmp346 = (K831469612 * tmp335) - (K555570233 * tmp334); tmp337 = tmp301 - tmp308; tmp338 = tmp313 - tmp312; tmp339 = (K831469612 * tmp337) - (K555570233 * tmp338); tmp347 = (K555570233 * tmp337) + (K831469612 * tmp338); } { fftw_real tmp340; fftw_real tmp344; fftw_real tmp348; fftw_real tmp350; ASSERT_ALIGNED_DOUBLE; tmp340 = tmp336 + tmp339; real_output[26 * real_ostride] = tmp333 - tmp340; real_output[6 * real_ostride] = tmp333 + tmp340; tmp344 = tmp339 - tmp336; imag_output[10 * imag_ostride] = tmp343 + tmp344; imag_output[22 * imag_ostride] = tmp344 - tmp343; tmp348 = tmp346 + tmp347; imag_output[6 * imag_ostride] = tmp345 + tmp348; imag_output[26 * imag_ostride] = tmp348 - tmp345; tmp350 = tmp347 - tmp346; real_output[22 * real_ostride] = tmp349 - tmp350; real_output[10 * real_ostride] = tmp349 + tmp350; } } { fftw_real tmp211; fftw_real tmp249; fftw_real tmp218; fftw_real tmp259; fftw_real tmp237; fftw_real tmp250; fftw_real tmp226; fftw_real tmp244; fftw_real tmp240; fftw_real tmp260; fftw_real tmp254; fftw_real tmp264; fftw_real tmp233; fftw_real tmp245; fftw_real tmp257; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp214; fftw_real tmp217; fftw_real tmp252; fftw_real tmp253; ASSERT_ALIGNED_DOUBLE; tmp211 = tmp209 + tmp210; tmp249 = tmp209 - tmp210; tmp214 = (K831469612 * tmp212) + (K555570233 * tmp213); tmp217 = (K831469612 * tmp215) - (K555570233 * tmp216); tmp218 = tmp214 + tmp217; tmp259 = tmp217 - tmp214; { fftw_real tmp235; fftw_real tmp236; fftw_real tmp222; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp235 = (K831469612 * tmp213) - (K555570233 * tmp212); tmp236 = (K555570233 * tmp215) + (K831469612 * tmp216); tmp237 = tmp235 + tmp236; tmp250 = tmp236 - tmp235; tmp222 = tmp220 + tmp221; tmp225 = tmp223 + tmp224; tmp226 = (K956940335 * tmp222) + (K290284677 * tmp225); tmp244 = (K956940335 * tmp225) - (K290284677 * tmp222); } tmp240 = tmp238 + tmp239; tmp260 = tmp239 - tmp238; tmp252 = tmp220 - tmp221; tmp253 = tmp224 - tmp223; tmp254 = (K881921264 * tmp252) + (K471396736 * tmp253); tmp264 = (K881921264 * tmp253) - (K471396736 * tmp252); { fftw_real tmp229; fftw_real tmp232; fftw_real tmp255; fftw_real tmp256; ASSERT_ALIGNED_DOUBLE; tmp229 = tmp227 + tmp228; tmp232 = tmp230 + tmp231; tmp233 = (K956940335 * tmp229) - (K290284677 * tmp232); tmp245 = (K290284677 * tmp229) + (K956940335 * tmp232); tmp255 = tmp227 - tmp228; tmp256 = tmp231 - tmp230; tmp257 = (K881921264 * tmp255) - (K471396736 * tmp256); tmp265 = (K471396736 * tmp255) + (K881921264 * tmp256); } } { fftw_real tmp219; fftw_real tmp234; fftw_real tmp241; fftw_real tmp242; ASSERT_ALIGNED_DOUBLE; tmp219 = tmp211 + tmp218; tmp234 = tmp226 + tmp233; real_output[29 * real_ostride] = tmp219 - tmp234; real_output[3 * real_ostride] = tmp219 + tmp234; tmp241 = tmp237 - tmp240; tmp242 = tmp233 - tmp226; imag_output[13 * imag_ostride] = tmp241 + tmp242; imag_output[19 * imag_ostride] = tmp242 - tmp241; } { fftw_real tmp243; fftw_real tmp246; fftw_real tmp247; fftw_real tmp248; ASSERT_ALIGNED_DOUBLE; tmp243 = tmp240 + tmp237; tmp246 = tmp244 + tmp245; imag_output[3 * imag_ostride] = tmp243 + tmp246; imag_output[29 * imag_ostride] = tmp246 - tmp243; tmp247 = tmp211 - tmp218; tmp248 = tmp245 - tmp244; real_output[19 * real_ostride] = tmp247 - tmp248; real_output[13 * real_ostride] = tmp247 + tmp248; } { fftw_real tmp251; fftw_real tmp258; fftw_real tmp261; fftw_real tmp262; ASSERT_ALIGNED_DOUBLE; tmp251 = tmp249 + tmp250; tmp258 = tmp254 + tmp257; real_output[27 * real_ostride] = tmp251 - tmp258; real_output[5 * real_ostride] = tmp251 + tmp258; tmp261 = tmp259 - tmp260; tmp262 = tmp257 - tmp254; imag_output[11 * imag_ostride] = tmp261 + tmp262; imag_output[21 * imag_ostride] = tmp262 - tmp261; } { fftw_real tmp263; fftw_real tmp266; fftw_real tmp267; fftw_real tmp268; ASSERT_ALIGNED_DOUBLE; tmp263 = tmp260 + tmp259; tmp266 = tmp264 + tmp265; imag_output[5 * imag_ostride] = tmp263 + tmp266; imag_output[27 * imag_ostride] = tmp266 - tmp263; tmp267 = tmp249 - tmp250; tmp268 = tmp265 - tmp264; real_output[21 * real_ostride] = tmp267 - tmp268; real_output[11 * real_ostride] = tmp267 + tmp268; } } } fftw_codelet_desc fftw_real2hc_64_desc = { "fftw_real2hc_64", (void (*)()) fftw_real2hc_64, 64, FFTW_FORWARD, FFTW_REAL2HC, 1410, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/frc_128.c��������������������������������������������������������������������������0000644�0001754�0000144�00000231077�07637527263�010641� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:14 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -real2hc 128 */ /* * This function contains 956 FP additions, 330 FP multiplications, * (or, 812 additions, 186 multiplications, 144 fused multiply/add), * 156 stack variables, and 256 memory accesses */ static const fftw_real K242980179 = FFTW_KONST(+0.242980179903263889948274162077471118320990783); static const fftw_real K970031253 = FFTW_KONST(+0.970031253194543992603984207286100251456865962); static const fftw_real K514102744 = FFTW_KONST(+0.514102744193221726593693838968815772608049120); static const fftw_real K857728610 = FFTW_KONST(+0.857728610000272069902269984284770137042490799); static const fftw_real K595699304 = FFTW_KONST(+0.595699304492433343467036528829969889511926338); static const fftw_real K803207531 = FFTW_KONST(+0.803207531480644909806676512963141923879569427); static const fftw_real K146730474 = FFTW_KONST(+0.146730474455361751658850129646717819706215317); static const fftw_real K989176509 = FFTW_KONST(+0.989176509964780973451673738016243063983689533); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K336889853 = FFTW_KONST(+0.336889853392220050689253212619147570477766780); static const fftw_real K941544065 = FFTW_KONST(+0.941544065183020778412509402599502357185589796); static const fftw_real K427555093 = FFTW_KONST(+0.427555093430282094320966856888798534304578629); static const fftw_real K903989293 = FFTW_KONST(+0.903989293123443331586200297230537048710132025); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K671558954 = FFTW_KONST(+0.671558954847018400625376850427421803228750632); static const fftw_real K740951125 = FFTW_KONST(+0.740951125354959091175616897495162729728955309); static const fftw_real K049067674 = FFTW_KONST(+0.049067674327418014254954976942682658314745363); static const fftw_real K998795456 = FFTW_KONST(+0.998795456205172392714771604759100694443203615); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_real2hc_128(const fftw_real *input, fftw_real *real_output, fftw_real *imag_output, int istride, int real_ostride, int imag_ostride) { fftw_real tmp783; fftw_real tmp15; fftw_real tmp625; fftw_real tmp862; fftw_real tmp131; fftw_real tmp461; fftw_real tmp364; fftw_real tmp530; fftw_real tmp46; fftw_real tmp626; fftw_real tmp790; fftw_real tmp865; fftw_real tmp148; fftw_real tmp369; fftw_real tmp466; fftw_real tmp533; fftw_real tmp30; fftw_real tmp708; fftw_real tmp786; fftw_real tmp863; fftw_real tmp138; fftw_real tmp531; fftw_real tmp367; fftw_real tmp462; fftw_real tmp307; fftw_real tmp419; fftw_real tmp509; fftw_real tmp583; fftw_real tmp352; fftw_real tmp423; fftw_real tmp520; fftw_real tmp587; fftw_real tmp677; fftw_real tmp747; fftw_real tmp841; fftw_real tmp915; fftw_real tmp852; fftw_real tmp919; fftw_real tmp700; fftw_real tmp748; fftw_real tmp750; fftw_real tmp692; fftw_real tmp701; fftw_real tmp751; fftw_real tmp855; fftw_real tmp916; fftw_real tmp848; fftw_real tmp918; fftw_real tmp324; fftw_real tmp353; fftw_real tmp512; fftw_real tmp521; fftw_real tmp515; fftw_real tmp522; fftw_real tmp341; fftw_real tmp354; fftw_real tmp61; fftw_real tmp627; fftw_real tmp793; fftw_real tmp866; fftw_real tmp157; fftw_real tmp370; fftw_real tmp469; fftw_real tmp534; fftw_real tmp109; fftw_real tmp633; fftw_real tmp809; fftw_real tmp900; fftw_real tmp812; fftw_real tmp901; fftw_real tmp484; fftw_real tmp569; fftw_real tmp193; fftw_real tmp405; fftw_real tmp481; fftw_real tmp568; fftw_real tmp200; fftw_real tmp404; fftw_real tmp124; fftw_real tmp634; fftw_real tmp78; fftw_real tmp630; fftw_real tmp800; fftw_real tmp904; fftw_real tmp803; fftw_real tmp903; fftw_real tmp477; fftw_real tmp571; fftw_real tmp172; fftw_real tmp407; fftw_real tmp474; fftw_real tmp572; fftw_real tmp179; fftw_real tmp408; fftw_real tmp93; fftw_real tmp631; fftw_real tmp230; fftw_real tmp415; fftw_real tmp490; fftw_real tmp579; fftw_real tmp275; fftw_real tmp413; fftw_real tmp501; fftw_real tmp577; fftw_real tmp644; fftw_real tmp740; fftw_real tmp820; fftw_real tmp911; fftw_real tmp831; fftw_real tmp909; fftw_real tmp667; fftw_real tmp741; fftw_real tmp743; fftw_real tmp659; fftw_real tmp668; fftw_real tmp744; fftw_real tmp834; fftw_real tmp912; fftw_real tmp827; fftw_real tmp908; fftw_real tmp247; fftw_real tmp276; fftw_real tmp493; fftw_real tmp502; fftw_real tmp496; fftw_real tmp503; fftw_real tmp264; fftw_real tmp277; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp127; fftw_real tmp13; fftw_real tmp129; fftw_real tmp6; fftw_real tmp363; fftw_real tmp10; fftw_real tmp128; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = input[0]; tmp2 = input[64 * istride]; tmp3 = tmp1 + tmp2; tmp127 = tmp1 - tmp2; tmp11 = input[112 * istride]; tmp12 = input[48 * istride]; tmp13 = tmp11 + tmp12; tmp129 = tmp11 - tmp12; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp4 = input[32 * istride]; tmp5 = input[96 * istride]; tmp6 = tmp4 + tmp5; tmp363 = tmp4 - tmp5; tmp8 = input[16 * istride]; tmp9 = input[80 * istride]; tmp10 = tmp8 + tmp9; tmp128 = tmp8 - tmp9; } { fftw_real tmp7; fftw_real tmp14; fftw_real tmp130; fftw_real tmp362; ASSERT_ALIGNED_DOUBLE; tmp783 = tmp3 - tmp6; tmp7 = tmp3 + tmp6; tmp14 = tmp10 + tmp13; tmp15 = tmp7 + tmp14; tmp625 = tmp7 - tmp14; tmp862 = tmp13 - tmp10; tmp130 = K707106781 * (tmp128 + tmp129); tmp131 = tmp127 + tmp130; tmp461 = tmp127 - tmp130; tmp362 = K707106781 * (tmp129 - tmp128); tmp364 = tmp362 - tmp363; tmp530 = tmp363 + tmp362; } } { fftw_real tmp34; fftw_real tmp140; fftw_real tmp37; fftw_real tmp146; fftw_real tmp41; fftw_real tmp145; fftw_real tmp143; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp33; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp32 = input[4 * istride]; tmp33 = input[68 * istride]; tmp34 = tmp32 + tmp33; tmp140 = tmp32 - tmp33; tmp35 = input[36 * istride]; tmp36 = input[100 * istride]; tmp37 = tmp35 + tmp36; tmp146 = tmp35 - tmp36; { fftw_real tmp39; fftw_real tmp40; fftw_real tmp141; fftw_real tmp42; fftw_real tmp43; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; tmp39 = input[20 * istride]; tmp40 = input[84 * istride]; tmp141 = tmp39 - tmp40; tmp42 = input[116 * istride]; tmp43 = input[52 * istride]; tmp142 = tmp42 - tmp43; tmp41 = tmp39 + tmp40; tmp145 = K707106781 * (tmp142 - tmp141); tmp143 = K707106781 * (tmp141 + tmp142); tmp44 = tmp42 + tmp43; } } { fftw_real tmp38; fftw_real tmp45; fftw_real tmp788; fftw_real tmp789; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp34 + tmp37; tmp45 = tmp41 + tmp44; tmp46 = tmp38 + tmp45; tmp626 = tmp38 - tmp45; tmp788 = tmp34 - tmp37; tmp789 = tmp44 - tmp41; tmp790 = (K923879532 * tmp788) + (K382683432 * tmp789); tmp865 = (K923879532 * tmp789) - (K382683432 * tmp788); } { fftw_real tmp144; fftw_real tmp147; fftw_real tmp464; fftw_real tmp465; ASSERT_ALIGNED_DOUBLE; tmp144 = tmp140 + tmp143; tmp147 = tmp145 - tmp146; tmp148 = (K980785280 * tmp144) + (K195090322 * tmp147); tmp369 = (K980785280 * tmp147) - (K195090322 * tmp144); tmp464 = tmp140 - tmp143; tmp465 = tmp146 + tmp145; tmp466 = (K831469612 * tmp464) + (K555570233 * tmp465); tmp533 = (K831469612 * tmp465) - (K555570233 * tmp464); } } { fftw_real tmp18; fftw_real tmp132; fftw_real tmp28; fftw_real tmp136; fftw_real tmp21; fftw_real tmp133; fftw_real tmp25; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp16 = input[8 * istride]; tmp17 = input[72 * istride]; tmp18 = tmp16 + tmp17; tmp132 = tmp16 - tmp17; tmp26 = input[24 * istride]; tmp27 = input[88 * istride]; tmp28 = tmp26 + tmp27; tmp136 = tmp26 - tmp27; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp19 = input[40 * istride]; tmp20 = input[104 * istride]; tmp21 = tmp19 + tmp20; tmp133 = tmp19 - tmp20; tmp23 = input[120 * istride]; tmp24 = input[56 * istride]; tmp25 = tmp23 + tmp24; tmp135 = tmp23 - tmp24; } { fftw_real tmp22; fftw_real tmp29; fftw_real tmp784; fftw_real tmp785; ASSERT_ALIGNED_DOUBLE; tmp22 = tmp18 + tmp21; tmp29 = tmp25 + tmp28; tmp30 = tmp22 + tmp29; tmp708 = tmp29 - tmp22; tmp784 = tmp18 - tmp21; tmp785 = tmp25 - tmp28; tmp786 = K707106781 * (tmp784 + tmp785); tmp863 = K707106781 * (tmp785 - tmp784); } { fftw_real tmp134; fftw_real tmp137; fftw_real tmp365; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp134 = (K923879532 * tmp132) - (K382683432 * tmp133); tmp137 = (K923879532 * tmp135) + (K382683432 * tmp136); tmp138 = tmp134 + tmp137; tmp531 = tmp137 - tmp134; tmp365 = (K382683432 * tmp135) - (K923879532 * tmp136); tmp366 = (K382683432 * tmp132) + (K923879532 * tmp133); tmp367 = tmp365 - tmp366; tmp462 = tmp366 + tmp365; } } { fftw_real tmp283; fftw_real tmp671; fftw_real tmp347; fftw_real tmp672; fftw_real tmp290; fftw_real tmp344; fftw_real tmp674; fftw_real tmp675; fftw_real tmp697; fftw_real tmp698; fftw_real tmp298; fftw_real tmp350; fftw_real tmp838; fftw_real tmp694; fftw_real tmp695; fftw_real tmp305; fftw_real tmp349; fftw_real tmp839; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp281; fftw_real tmp282; fftw_real tmp345; fftw_real tmp346; ASSERT_ALIGNED_DOUBLE; tmp281 = input[127 * istride]; tmp282 = input[63 * istride]; tmp283 = tmp281 - tmp282; tmp671 = tmp281 + tmp282; tmp345 = input[31 * istride]; tmp346 = input[95 * istride]; tmp347 = tmp345 - tmp346; tmp672 = tmp345 + tmp346; } { fftw_real tmp284; fftw_real tmp285; fftw_real tmp286; fftw_real tmp287; fftw_real tmp288; fftw_real tmp289; ASSERT_ALIGNED_DOUBLE; tmp284 = input[15 * istride]; tmp285 = input[79 * istride]; tmp286 = tmp284 - tmp285; tmp287 = input[111 * istride]; tmp288 = input[47 * istride]; tmp289 = tmp287 - tmp288; tmp290 = K707106781 * (tmp286 + tmp289); tmp344 = K707106781 * (tmp289 - tmp286); tmp674 = tmp284 + tmp285; tmp675 = tmp287 + tmp288; } { fftw_real tmp294; fftw_real tmp297; fftw_real tmp301; fftw_real tmp304; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp292; fftw_real tmp293; fftw_real tmp295; fftw_real tmp296; ASSERT_ALIGNED_DOUBLE; tmp292 = input[7 * istride]; tmp293 = input[71 * istride]; tmp294 = tmp292 - tmp293; tmp697 = tmp292 + tmp293; tmp295 = input[39 * istride]; tmp296 = input[103 * istride]; tmp297 = tmp295 - tmp296; tmp698 = tmp295 + tmp296; } tmp298 = (K923879532 * tmp294) - (K382683432 * tmp297); tmp350 = (K382683432 * tmp294) + (K923879532 * tmp297); tmp838 = tmp697 - tmp698; { fftw_real tmp299; fftw_real tmp300; fftw_real tmp302; fftw_real tmp303; ASSERT_ALIGNED_DOUBLE; tmp299 = input[119 * istride]; tmp300 = input[55 * istride]; tmp301 = tmp299 - tmp300; tmp694 = tmp299 + tmp300; tmp302 = input[23 * istride]; tmp303 = input[87 * istride]; tmp304 = tmp302 - tmp303; tmp695 = tmp302 + tmp303; } tmp305 = (K923879532 * tmp301) + (K382683432 * tmp304); tmp349 = (K382683432 * tmp301) - (K923879532 * tmp304); tmp839 = tmp694 - tmp695; } { fftw_real tmp291; fftw_real tmp306; fftw_real tmp507; fftw_real tmp508; ASSERT_ALIGNED_DOUBLE; tmp291 = tmp283 + tmp290; tmp306 = tmp298 + tmp305; tmp307 = tmp291 + tmp306; tmp419 = tmp291 - tmp306; tmp507 = tmp283 - tmp290; tmp508 = tmp350 + tmp349; tmp509 = tmp507 + tmp508; tmp583 = tmp507 - tmp508; } { fftw_real tmp348; fftw_real tmp351; fftw_real tmp518; fftw_real tmp519; ASSERT_ALIGNED_DOUBLE; tmp348 = tmp344 - tmp347; tmp351 = tmp349 - tmp350; tmp352 = tmp348 + tmp351; tmp423 = tmp351 - tmp348; tmp518 = tmp347 + tmp344; tmp519 = tmp305 - tmp298; tmp520 = tmp518 + tmp519; tmp587 = tmp519 - tmp518; } { fftw_real tmp673; fftw_real tmp676; fftw_real tmp837; fftw_real tmp840; ASSERT_ALIGNED_DOUBLE; tmp673 = tmp671 + tmp672; tmp676 = tmp674 + tmp675; tmp677 = tmp673 - tmp676; tmp747 = tmp673 + tmp676; tmp837 = tmp671 - tmp672; tmp840 = K707106781 * (tmp838 + tmp839); tmp841 = tmp837 + tmp840; tmp915 = tmp837 - tmp840; } { fftw_real tmp850; fftw_real tmp851; fftw_real tmp696; fftw_real tmp699; ASSERT_ALIGNED_DOUBLE; tmp850 = tmp675 - tmp674; tmp851 = K707106781 * (tmp839 - tmp838); tmp852 = tmp850 + tmp851; tmp919 = tmp851 - tmp850; tmp696 = tmp694 + tmp695; tmp699 = tmp697 + tmp698; tmp700 = tmp696 - tmp699; tmp748 = tmp699 + tmp696; } } { fftw_real tmp310; fftw_real tmp842; fftw_real tmp680; fftw_real tmp322; fftw_real tmp334; fftw_real tmp336; fftw_real tmp690; fftw_real tmp846; fftw_real tmp327; fftw_real tmp845; fftw_real tmp687; fftw_real tmp339; fftw_real tmp317; fftw_real tmp319; fftw_real tmp683; fftw_real tmp843; fftw_real tmp510; fftw_real tmp511; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp308; fftw_real tmp309; fftw_real tmp678; fftw_real tmp320; fftw_real tmp321; fftw_real tmp679; ASSERT_ALIGNED_DOUBLE; tmp308 = input[3 * istride]; tmp309 = input[67 * istride]; tmp678 = tmp308 + tmp309; tmp320 = input[35 * istride]; tmp321 = input[99 * istride]; tmp679 = tmp320 + tmp321; tmp310 = tmp308 - tmp309; tmp842 = tmp678 - tmp679; tmp680 = tmp678 + tmp679; tmp322 = tmp320 - tmp321; } { fftw_real tmp330; fftw_real tmp688; fftw_real tmp333; fftw_real tmp689; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp328; fftw_real tmp329; fftw_real tmp331; fftw_real tmp332; ASSERT_ALIGNED_DOUBLE; tmp328 = input[11 * istride]; tmp329 = input[75 * istride]; tmp330 = tmp328 - tmp329; tmp688 = tmp328 + tmp329; tmp331 = input[107 * istride]; tmp332 = input[43 * istride]; tmp333 = tmp331 - tmp332; tmp689 = tmp331 + tmp332; } tmp334 = K707106781 * (tmp330 + tmp333); tmp336 = K707106781 * (tmp333 - tmp330); tmp690 = tmp688 + tmp689; tmp846 = tmp689 - tmp688; } { fftw_real tmp325; fftw_real tmp326; fftw_real tmp685; fftw_real tmp337; fftw_real tmp338; fftw_real tmp686; ASSERT_ALIGNED_DOUBLE; tmp325 = input[123 * istride]; tmp326 = input[59 * istride]; tmp685 = tmp325 + tmp326; tmp337 = input[27 * istride]; tmp338 = input[91 * istride]; tmp686 = tmp337 + tmp338; tmp327 = tmp325 - tmp326; tmp845 = tmp685 - tmp686; tmp687 = tmp685 + tmp686; tmp339 = tmp337 - tmp338; } { fftw_real tmp313; fftw_real tmp681; fftw_real tmp316; fftw_real tmp682; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp311; fftw_real tmp312; fftw_real tmp314; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; tmp311 = input[19 * istride]; tmp312 = input[83 * istride]; tmp313 = tmp311 - tmp312; tmp681 = tmp311 + tmp312; tmp314 = input[115 * istride]; tmp315 = input[51 * istride]; tmp316 = tmp314 - tmp315; tmp682 = tmp314 + tmp315; } tmp317 = K707106781 * (tmp313 + tmp316); tmp319 = K707106781 * (tmp316 - tmp313); tmp683 = tmp681 + tmp682; tmp843 = tmp682 - tmp681; } { fftw_real tmp684; fftw_real tmp691; fftw_real tmp853; fftw_real tmp854; ASSERT_ALIGNED_DOUBLE; tmp750 = tmp680 + tmp683; tmp684 = tmp680 - tmp683; tmp691 = tmp687 - tmp690; tmp692 = K707106781 * (tmp684 + tmp691); tmp701 = K707106781 * (tmp691 - tmp684); tmp751 = tmp687 + tmp690; tmp853 = (K923879532 * tmp843) - (K382683432 * tmp842); tmp854 = (K382683432 * tmp845) + (K923879532 * tmp846); tmp855 = tmp853 + tmp854; tmp916 = tmp854 - tmp853; } { fftw_real tmp844; fftw_real tmp847; fftw_real tmp318; fftw_real tmp323; ASSERT_ALIGNED_DOUBLE; tmp844 = (K923879532 * tmp842) + (K382683432 * tmp843); tmp847 = (K923879532 * tmp845) - (K382683432 * tmp846); tmp848 = tmp844 + tmp847; tmp918 = tmp847 - tmp844; tmp318 = tmp310 + tmp317; tmp323 = tmp319 - tmp322; tmp324 = (K980785280 * tmp318) + (K195090322 * tmp323); tmp353 = (K980785280 * tmp323) - (K195090322 * tmp318); } tmp510 = tmp310 - tmp317; tmp511 = tmp322 + tmp319; tmp512 = (K831469612 * tmp510) + (K555570233 * tmp511); tmp521 = (K831469612 * tmp511) - (K555570233 * tmp510); { fftw_real tmp513; fftw_real tmp514; fftw_real tmp335; fftw_real tmp340; ASSERT_ALIGNED_DOUBLE; tmp513 = tmp327 - tmp334; tmp514 = tmp339 + tmp336; tmp515 = (K831469612 * tmp513) - (K555570233 * tmp514); tmp522 = (K555570233 * tmp513) + (K831469612 * tmp514); tmp335 = tmp327 + tmp334; tmp340 = tmp336 - tmp339; tmp341 = (K980785280 * tmp335) - (K195090322 * tmp340); tmp354 = (K195090322 * tmp335) + (K980785280 * tmp340); } } { fftw_real tmp49; fftw_real tmp149; fftw_real tmp52; fftw_real tmp155; fftw_real tmp56; fftw_real tmp154; fftw_real tmp152; fftw_real tmp59; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp48; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp47 = input[124 * istride]; tmp48 = input[60 * istride]; tmp49 = tmp47 + tmp48; tmp149 = tmp47 - tmp48; tmp50 = input[28 * istride]; tmp51 = input[92 * istride]; tmp52 = tmp50 + tmp51; tmp155 = tmp50 - tmp51; { fftw_real tmp54; fftw_real tmp55; fftw_real tmp150; fftw_real tmp57; fftw_real tmp58; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp54 = input[12 * istride]; tmp55 = input[76 * istride]; tmp150 = tmp54 - tmp55; tmp57 = input[108 * istride]; tmp58 = input[44 * istride]; tmp151 = tmp57 - tmp58; tmp56 = tmp54 + tmp55; tmp154 = K707106781 * (tmp151 - tmp150); tmp152 = K707106781 * (tmp150 + tmp151); tmp59 = tmp57 + tmp58; } } { fftw_real tmp53; fftw_real tmp60; fftw_real tmp791; fftw_real tmp792; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp49 + tmp52; tmp60 = tmp56 + tmp59; tmp61 = tmp53 + tmp60; tmp627 = tmp53 - tmp60; tmp791 = tmp49 - tmp52; tmp792 = tmp59 - tmp56; tmp793 = (K923879532 * tmp791) - (K382683432 * tmp792); tmp866 = (K382683432 * tmp791) + (K923879532 * tmp792); } { fftw_real tmp153; fftw_real tmp156; fftw_real tmp467; fftw_real tmp468; ASSERT_ALIGNED_DOUBLE; tmp153 = tmp149 + tmp152; tmp156 = tmp154 - tmp155; tmp157 = (K980785280 * tmp153) - (K195090322 * tmp156); tmp370 = (K195090322 * tmp153) + (K980785280 * tmp156); tmp467 = tmp149 - tmp152; tmp468 = tmp155 + tmp154; tmp469 = (K831469612 * tmp467) - (K555570233 * tmp468); tmp534 = (K555570233 * tmp467) + (K831469612 * tmp468); } } { fftw_real tmp97; fftw_real tmp181; fftw_real tmp119; fftw_real tmp122; fftw_real tmp191; fftw_real tmp197; fftw_real tmp807; fftw_real tmp100; fftw_real tmp195; fftw_real tmp104; fftw_real tmp194; fftw_real tmp184; fftw_real tmp107; fftw_real tmp112; fftw_real tmp115; fftw_real tmp188; fftw_real tmp198; fftw_real tmp806; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp95; fftw_real tmp96; fftw_real tmp189; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; tmp95 = input[126 * istride]; tmp96 = input[62 * istride]; tmp97 = tmp95 + tmp96; tmp181 = tmp95 - tmp96; { fftw_real tmp117; fftw_real tmp118; fftw_real tmp120; fftw_real tmp121; ASSERT_ALIGNED_DOUBLE; tmp117 = input[118 * istride]; tmp118 = input[54 * istride]; tmp119 = tmp117 + tmp118; tmp189 = tmp117 - tmp118; tmp120 = input[22 * istride]; tmp121 = input[86 * istride]; tmp122 = tmp120 + tmp121; tmp190 = tmp120 - tmp121; } tmp191 = (K923879532 * tmp189) + (K382683432 * tmp190); tmp197 = (K382683432 * tmp189) - (K923879532 * tmp190); tmp807 = tmp119 - tmp122; } { fftw_real tmp98; fftw_real tmp99; fftw_real tmp186; fftw_real tmp187; ASSERT_ALIGNED_DOUBLE; tmp98 = input[30 * istride]; tmp99 = input[94 * istride]; tmp100 = tmp98 + tmp99; tmp195 = tmp98 - tmp99; { fftw_real tmp102; fftw_real tmp103; fftw_real tmp182; fftw_real tmp105; fftw_real tmp106; fftw_real tmp183; ASSERT_ALIGNED_DOUBLE; tmp102 = input[14 * istride]; tmp103 = input[78 * istride]; tmp182 = tmp102 - tmp103; tmp105 = input[110 * istride]; tmp106 = input[46 * istride]; tmp183 = tmp105 - tmp106; tmp104 = tmp102 + tmp103; tmp194 = K707106781 * (tmp183 - tmp182); tmp184 = K707106781 * (tmp182 + tmp183); tmp107 = tmp105 + tmp106; } { fftw_real tmp110; fftw_real tmp111; fftw_real tmp113; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; tmp110 = input[6 * istride]; tmp111 = input[70 * istride]; tmp112 = tmp110 + tmp111; tmp186 = tmp110 - tmp111; tmp113 = input[38 * istride]; tmp114 = input[102 * istride]; tmp115 = tmp113 + tmp114; tmp187 = tmp113 - tmp114; } tmp188 = (K923879532 * tmp186) - (K382683432 * tmp187); tmp198 = (K382683432 * tmp186) + (K923879532 * tmp187); tmp806 = tmp112 - tmp115; } { fftw_real tmp101; fftw_real tmp108; fftw_real tmp805; fftw_real tmp808; ASSERT_ALIGNED_DOUBLE; tmp101 = tmp97 + tmp100; tmp108 = tmp104 + tmp107; tmp109 = tmp101 + tmp108; tmp633 = tmp101 - tmp108; tmp805 = tmp97 - tmp100; tmp808 = K707106781 * (tmp806 + tmp807); tmp809 = tmp805 + tmp808; tmp900 = tmp805 - tmp808; } { fftw_real tmp810; fftw_real tmp811; fftw_real tmp482; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; tmp810 = tmp107 - tmp104; tmp811 = K707106781 * (tmp807 - tmp806); tmp812 = tmp810 + tmp811; tmp901 = tmp811 - tmp810; tmp482 = tmp195 + tmp194; tmp483 = tmp191 - tmp188; tmp484 = tmp482 + tmp483; tmp569 = tmp483 - tmp482; } { fftw_real tmp185; fftw_real tmp192; fftw_real tmp479; fftw_real tmp480; ASSERT_ALIGNED_DOUBLE; tmp185 = tmp181 + tmp184; tmp192 = tmp188 + tmp191; tmp193 = tmp185 + tmp192; tmp405 = tmp185 - tmp192; tmp479 = tmp181 - tmp184; tmp480 = tmp198 + tmp197; tmp481 = tmp479 + tmp480; tmp568 = tmp479 - tmp480; } { fftw_real tmp196; fftw_real tmp199; fftw_real tmp116; fftw_real tmp123; ASSERT_ALIGNED_DOUBLE; tmp196 = tmp194 - tmp195; tmp199 = tmp197 - tmp198; tmp200 = tmp196 + tmp199; tmp404 = tmp199 - tmp196; tmp116 = tmp112 + tmp115; tmp123 = tmp119 + tmp122; tmp124 = tmp116 + tmp123; tmp634 = tmp123 - tmp116; } } { fftw_real tmp66; fftw_real tmp173; fftw_real tmp88; fftw_real tmp91; fftw_real tmp167; fftw_real tmp177; fftw_real tmp798; fftw_real tmp69; fftw_real tmp163; fftw_real tmp73; fftw_real tmp174; fftw_real tmp162; fftw_real tmp76; fftw_real tmp81; fftw_real tmp84; fftw_real tmp170; fftw_real tmp176; fftw_real tmp797; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp64; fftw_real tmp65; fftw_real tmp165; fftw_real tmp166; ASSERT_ALIGNED_DOUBLE; tmp64 = input[2 * istride]; tmp65 = input[66 * istride]; tmp66 = tmp64 + tmp65; tmp173 = tmp64 - tmp65; { fftw_real tmp86; fftw_real tmp87; fftw_real tmp89; fftw_real tmp90; ASSERT_ALIGNED_DOUBLE; tmp86 = input[122 * istride]; tmp87 = input[58 * istride]; tmp88 = tmp86 + tmp87; tmp165 = tmp86 - tmp87; tmp89 = input[26 * istride]; tmp90 = input[90 * istride]; tmp91 = tmp89 + tmp90; tmp166 = tmp89 - tmp90; } tmp167 = (K382683432 * tmp165) - (K923879532 * tmp166); tmp177 = (K923879532 * tmp165) + (K382683432 * tmp166); tmp798 = tmp88 - tmp91; } { fftw_real tmp67; fftw_real tmp68; fftw_real tmp168; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; tmp67 = input[34 * istride]; tmp68 = input[98 * istride]; tmp69 = tmp67 + tmp68; tmp163 = tmp67 - tmp68; { fftw_real tmp71; fftw_real tmp72; fftw_real tmp161; fftw_real tmp74; fftw_real tmp75; fftw_real tmp160; ASSERT_ALIGNED_DOUBLE; tmp71 = input[18 * istride]; tmp72 = input[82 * istride]; tmp161 = tmp71 - tmp72; tmp74 = input[114 * istride]; tmp75 = input[50 * istride]; tmp160 = tmp74 - tmp75; tmp73 = tmp71 + tmp72; tmp174 = K707106781 * (tmp161 + tmp160); tmp162 = K707106781 * (tmp160 - tmp161); tmp76 = tmp74 + tmp75; } { fftw_real tmp79; fftw_real tmp80; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp79 = input[10 * istride]; tmp80 = input[74 * istride]; tmp81 = tmp79 + tmp80; tmp168 = tmp79 - tmp80; tmp82 = input[42 * istride]; tmp83 = input[106 * istride]; tmp84 = tmp82 + tmp83; tmp169 = tmp82 - tmp83; } tmp170 = (K382683432 * tmp168) + (K923879532 * tmp169); tmp176 = (K923879532 * tmp168) - (K382683432 * tmp169); tmp797 = tmp81 - tmp84; } { fftw_real tmp70; fftw_real tmp77; fftw_real tmp796; fftw_real tmp799; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp66 + tmp69; tmp77 = tmp73 + tmp76; tmp78 = tmp70 + tmp77; tmp630 = tmp70 - tmp77; tmp796 = tmp66 - tmp69; tmp799 = K707106781 * (tmp797 + tmp798); tmp800 = tmp796 + tmp799; tmp904 = tmp796 - tmp799; } { fftw_real tmp801; fftw_real tmp802; fftw_real tmp475; fftw_real tmp476; ASSERT_ALIGNED_DOUBLE; tmp801 = tmp76 - tmp73; tmp802 = K707106781 * (tmp798 - tmp797); tmp803 = tmp801 + tmp802; tmp903 = tmp802 - tmp801; tmp475 = tmp163 + tmp162; tmp476 = tmp177 - tmp176; tmp477 = tmp475 + tmp476; tmp571 = tmp476 - tmp475; } { fftw_real tmp164; fftw_real tmp171; fftw_real tmp472; fftw_real tmp473; ASSERT_ALIGNED_DOUBLE; tmp164 = tmp162 - tmp163; tmp171 = tmp167 - tmp170; tmp172 = tmp164 + tmp171; tmp407 = tmp171 - tmp164; tmp472 = tmp173 - tmp174; tmp473 = tmp170 + tmp167; tmp474 = tmp472 + tmp473; tmp572 = tmp472 - tmp473; } { fftw_real tmp175; fftw_real tmp178; fftw_real tmp85; fftw_real tmp92; ASSERT_ALIGNED_DOUBLE; tmp175 = tmp173 + tmp174; tmp178 = tmp176 + tmp177; tmp179 = tmp175 + tmp178; tmp408 = tmp175 - tmp178; tmp85 = tmp81 + tmp84; tmp92 = tmp88 + tmp91; tmp93 = tmp85 + tmp92; tmp631 = tmp92 - tmp85; } } { fftw_real tmp206; fftw_real tmp638; fftw_real tmp270; fftw_real tmp639; fftw_real tmp213; fftw_real tmp267; fftw_real tmp641; fftw_real tmp642; fftw_real tmp664; fftw_real tmp665; fftw_real tmp221; fftw_real tmp273; fftw_real tmp817; fftw_real tmp661; fftw_real tmp662; fftw_real tmp228; fftw_real tmp272; fftw_real tmp818; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp204; fftw_real tmp205; fftw_real tmp268; fftw_real tmp269; ASSERT_ALIGNED_DOUBLE; tmp204 = input[istride]; tmp205 = input[65 * istride]; tmp206 = tmp204 - tmp205; tmp638 = tmp204 + tmp205; tmp268 = input[33 * istride]; tmp269 = input[97 * istride]; tmp270 = tmp268 - tmp269; tmp639 = tmp268 + tmp269; } { fftw_real tmp207; fftw_real tmp208; fftw_real tmp209; fftw_real tmp210; fftw_real tmp211; fftw_real tmp212; ASSERT_ALIGNED_DOUBLE; tmp207 = input[17 * istride]; tmp208 = input[81 * istride]; tmp209 = tmp207 - tmp208; tmp210 = input[113 * istride]; tmp211 = input[49 * istride]; tmp212 = tmp210 - tmp211; tmp213 = K707106781 * (tmp209 + tmp212); tmp267 = K707106781 * (tmp212 - tmp209); tmp641 = tmp207 + tmp208; tmp642 = tmp210 + tmp211; } { fftw_real tmp217; fftw_real tmp220; fftw_real tmp224; fftw_real tmp227; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp215; fftw_real tmp216; fftw_real tmp218; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; tmp215 = input[9 * istride]; tmp216 = input[73 * istride]; tmp217 = tmp215 - tmp216; tmp664 = tmp215 + tmp216; tmp218 = input[41 * istride]; tmp219 = input[105 * istride]; tmp220 = tmp218 - tmp219; tmp665 = tmp218 + tmp219; } tmp221 = (K923879532 * tmp217) - (K382683432 * tmp220); tmp273 = (K382683432 * tmp217) + (K923879532 * tmp220); tmp817 = tmp664 - tmp665; { fftw_real tmp222; fftw_real tmp223; fftw_real tmp225; fftw_real tmp226; ASSERT_ALIGNED_DOUBLE; tmp222 = input[121 * istride]; tmp223 = input[57 * istride]; tmp224 = tmp222 - tmp223; tmp661 = tmp222 + tmp223; tmp225 = input[25 * istride]; tmp226 = input[89 * istride]; tmp227 = tmp225 - tmp226; tmp662 = tmp225 + tmp226; } tmp228 = (K923879532 * tmp224) + (K382683432 * tmp227); tmp272 = (K382683432 * tmp224) - (K923879532 * tmp227); tmp818 = tmp661 - tmp662; } { fftw_real tmp214; fftw_real tmp229; fftw_real tmp488; fftw_real tmp489; ASSERT_ALIGNED_DOUBLE; tmp214 = tmp206 + tmp213; tmp229 = tmp221 + tmp228; tmp230 = tmp214 + tmp229; tmp415 = tmp214 - tmp229; tmp488 = tmp206 - tmp213; tmp489 = tmp273 + tmp272; tmp490 = tmp488 + tmp489; tmp579 = tmp488 - tmp489; } { fftw_real tmp271; fftw_real tmp274; fftw_real tmp499; fftw_real tmp500; ASSERT_ALIGNED_DOUBLE; tmp271 = tmp267 - tmp270; tmp274 = tmp272 - tmp273; tmp275 = tmp271 + tmp274; tmp413 = tmp274 - tmp271; tmp499 = tmp270 + tmp267; tmp500 = tmp228 - tmp221; tmp501 = tmp499 + tmp500; tmp577 = tmp500 - tmp499; } { fftw_real tmp640; fftw_real tmp643; fftw_real tmp816; fftw_real tmp819; ASSERT_ALIGNED_DOUBLE; tmp640 = tmp638 + tmp639; tmp643 = tmp641 + tmp642; tmp644 = tmp640 - tmp643; tmp740 = tmp640 + tmp643; tmp816 = tmp638 - tmp639; tmp819 = K707106781 * (tmp817 + tmp818); tmp820 = tmp816 + tmp819; tmp911 = tmp816 - tmp819; } { fftw_real tmp829; fftw_real tmp830; fftw_real tmp663; fftw_real tmp666; ASSERT_ALIGNED_DOUBLE; tmp829 = tmp642 - tmp641; tmp830 = K707106781 * (tmp818 - tmp817); tmp831 = tmp829 + tmp830; tmp909 = tmp830 - tmp829; tmp663 = tmp661 + tmp662; tmp666 = tmp664 + tmp665; tmp667 = tmp663 - tmp666; tmp741 = tmp666 + tmp663; } } { fftw_real tmp233; fftw_real tmp821; fftw_real tmp647; fftw_real tmp245; fftw_real tmp257; fftw_real tmp259; fftw_real tmp657; fftw_real tmp825; fftw_real tmp250; fftw_real tmp824; fftw_real tmp654; fftw_real tmp262; fftw_real tmp240; fftw_real tmp242; fftw_real tmp650; fftw_real tmp822; fftw_real tmp491; fftw_real tmp492; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp231; fftw_real tmp232; fftw_real tmp645; fftw_real tmp243; fftw_real tmp244; fftw_real tmp646; ASSERT_ALIGNED_DOUBLE; tmp231 = input[5 * istride]; tmp232 = input[69 * istride]; tmp645 = tmp231 + tmp232; tmp243 = input[37 * istride]; tmp244 = input[101 * istride]; tmp646 = tmp243 + tmp244; tmp233 = tmp231 - tmp232; tmp821 = tmp645 - tmp646; tmp647 = tmp645 + tmp646; tmp245 = tmp243 - tmp244; } { fftw_real tmp253; fftw_real tmp655; fftw_real tmp256; fftw_real tmp656; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp251; fftw_real tmp252; fftw_real tmp254; fftw_real tmp255; ASSERT_ALIGNED_DOUBLE; tmp251 = input[13 * istride]; tmp252 = input[77 * istride]; tmp253 = tmp251 - tmp252; tmp655 = tmp251 + tmp252; tmp254 = input[109 * istride]; tmp255 = input[45 * istride]; tmp256 = tmp254 - tmp255; tmp656 = tmp254 + tmp255; } tmp257 = K707106781 * (tmp253 + tmp256); tmp259 = K707106781 * (tmp256 - tmp253); tmp657 = tmp655 + tmp656; tmp825 = tmp656 - tmp655; } { fftw_real tmp248; fftw_real tmp249; fftw_real tmp652; fftw_real tmp260; fftw_real tmp261; fftw_real tmp653; ASSERT_ALIGNED_DOUBLE; tmp248 = input[125 * istride]; tmp249 = input[61 * istride]; tmp652 = tmp248 + tmp249; tmp260 = input[29 * istride]; tmp261 = input[93 * istride]; tmp653 = tmp260 + tmp261; tmp250 = tmp248 - tmp249; tmp824 = tmp652 - tmp653; tmp654 = tmp652 + tmp653; tmp262 = tmp260 - tmp261; } { fftw_real tmp236; fftw_real tmp648; fftw_real tmp239; fftw_real tmp649; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp234; fftw_real tmp235; fftw_real tmp237; fftw_real tmp238; ASSERT_ALIGNED_DOUBLE; tmp234 = input[21 * istride]; tmp235 = input[85 * istride]; tmp236 = tmp234 - tmp235; tmp648 = tmp234 + tmp235; tmp237 = input[117 * istride]; tmp238 = input[53 * istride]; tmp239 = tmp237 - tmp238; tmp649 = tmp237 + tmp238; } tmp240 = K707106781 * (tmp236 + tmp239); tmp242 = K707106781 * (tmp239 - tmp236); tmp650 = tmp648 + tmp649; tmp822 = tmp649 - tmp648; } { fftw_real tmp651; fftw_real tmp658; fftw_real tmp832; fftw_real tmp833; ASSERT_ALIGNED_DOUBLE; tmp743 = tmp647 + tmp650; tmp651 = tmp647 - tmp650; tmp658 = tmp654 - tmp657; tmp659 = K707106781 * (tmp651 + tmp658); tmp668 = K707106781 * (tmp658 - tmp651); tmp744 = tmp654 + tmp657; tmp832 = (K923879532 * tmp822) - (K382683432 * tmp821); tmp833 = (K382683432 * tmp824) + (K923879532 * tmp825); tmp834 = tmp832 + tmp833; tmp912 = tmp833 - tmp832; } { fftw_real tmp823; fftw_real tmp826; fftw_real tmp241; fftw_real tmp246; ASSERT_ALIGNED_DOUBLE; tmp823 = (K923879532 * tmp821) + (K382683432 * tmp822); tmp826 = (K923879532 * tmp824) - (K382683432 * tmp825); tmp827 = tmp823 + tmp826; tmp908 = tmp826 - tmp823; tmp241 = tmp233 + tmp240; tmp246 = tmp242 - tmp245; tmp247 = (K980785280 * tmp241) + (K195090322 * tmp246); tmp276 = (K980785280 * tmp246) - (K195090322 * tmp241); } tmp491 = tmp233 - tmp240; tmp492 = tmp245 + tmp242; tmp493 = (K831469612 * tmp491) + (K555570233 * tmp492); tmp502 = (K831469612 * tmp492) - (K555570233 * tmp491); { fftw_real tmp494; fftw_real tmp495; fftw_real tmp258; fftw_real tmp263; ASSERT_ALIGNED_DOUBLE; tmp494 = tmp250 - tmp257; tmp495 = tmp262 + tmp259; tmp496 = (K831469612 * tmp494) - (K555570233 * tmp495); tmp503 = (K555570233 * tmp494) + (K831469612 * tmp495); tmp258 = tmp250 + tmp257; tmp263 = tmp259 - tmp262; tmp264 = (K980785280 * tmp258) - (K195090322 * tmp263); tmp277 = (K195090322 * tmp258) + (K980785280 * tmp263); } } { fftw_real tmp63; fftw_real tmp739; fftw_real tmp753; fftw_real tmp759; fftw_real tmp126; fftw_real tmp755; fftw_real tmp746; fftw_real tmp758; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp31; fftw_real tmp62; fftw_real tmp749; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp15 + tmp30; tmp62 = tmp46 + tmp61; tmp63 = tmp31 + tmp62; tmp739 = tmp31 - tmp62; tmp749 = tmp747 + tmp748; tmp752 = tmp750 + tmp751; tmp753 = tmp749 - tmp752; tmp759 = tmp749 + tmp752; } { fftw_real tmp94; fftw_real tmp125; fftw_real tmp742; fftw_real tmp745; ASSERT_ALIGNED_DOUBLE; tmp94 = tmp78 + tmp93; tmp125 = tmp109 + tmp124; tmp126 = tmp94 + tmp125; tmp755 = tmp125 - tmp94; tmp742 = tmp740 + tmp741; tmp745 = tmp743 + tmp744; tmp746 = tmp742 - tmp745; tmp758 = tmp742 + tmp745; } { fftw_real tmp757; fftw_real tmp760; fftw_real tmp754; fftw_real tmp756; ASSERT_ALIGNED_DOUBLE; real_output[32 * real_ostride] = tmp63 - tmp126; tmp757 = tmp63 + tmp126; tmp760 = tmp758 + tmp759; real_output[64 * real_ostride] = tmp757 - tmp760; real_output[0] = tmp757 + tmp760; imag_output[32 * imag_ostride] = tmp759 - tmp758; tmp754 = K707106781 * (tmp746 + tmp753); real_output[48 * real_ostride] = tmp739 - tmp754; real_output[16 * real_ostride] = tmp739 + tmp754; tmp756 = K707106781 * (tmp753 - tmp746); imag_output[16 * imag_ostride] = tmp755 + tmp756; imag_output[48 * imag_ostride] = tmp756 - tmp755; } } { fftw_real tmp761; fftw_real tmp774; fftw_real tmp764; fftw_real tmp773; fftw_real tmp768; fftw_real tmp778; fftw_real tmp771; fftw_real tmp779; fftw_real tmp762; fftw_real tmp763; ASSERT_ALIGNED_DOUBLE; tmp761 = tmp15 - tmp30; tmp774 = tmp61 - tmp46; tmp762 = tmp78 - tmp93; tmp763 = tmp109 - tmp124; tmp764 = K707106781 * (tmp762 + tmp763); tmp773 = K707106781 * (tmp763 - tmp762); { fftw_real tmp766; fftw_real tmp767; fftw_real tmp769; fftw_real tmp770; ASSERT_ALIGNED_DOUBLE; tmp766 = tmp740 - tmp741; tmp767 = tmp744 - tmp743; tmp768 = (K923879532 * tmp766) + (K382683432 * tmp767); tmp778 = (K923879532 * tmp767) - (K382683432 * tmp766); tmp769 = tmp747 - tmp748; tmp770 = tmp751 - tmp750; tmp771 = (K923879532 * tmp769) - (K382683432 * tmp770); tmp779 = (K382683432 * tmp769) + (K923879532 * tmp770); } { fftw_real tmp765; fftw_real tmp772; fftw_real tmp781; fftw_real tmp782; ASSERT_ALIGNED_DOUBLE; tmp765 = tmp761 + tmp764; tmp772 = tmp768 + tmp771; real_output[56 * real_ostride] = tmp765 - tmp772; real_output[8 * real_ostride] = tmp765 + tmp772; tmp781 = tmp761 - tmp764; tmp782 = tmp779 - tmp778; real_output[40 * real_ostride] = tmp781 - tmp782; real_output[24 * real_ostride] = tmp781 + tmp782; } { fftw_real tmp777; fftw_real tmp780; fftw_real tmp775; fftw_real tmp776; ASSERT_ALIGNED_DOUBLE; tmp777 = tmp774 + tmp773; tmp780 = tmp778 + tmp779; imag_output[8 * imag_ostride] = tmp777 + tmp780; imag_output[56 * imag_ostride] = tmp780 - tmp777; tmp775 = tmp773 - tmp774; tmp776 = tmp771 - tmp768; imag_output[24 * imag_ostride] = tmp775 + tmp776; imag_output[40 * imag_ostride] = tmp776 - tmp775; } } { fftw_real tmp159; fftw_real tmp381; fftw_real tmp202; fftw_real tmp391; fftw_real tmp372; fftw_real tmp392; fftw_real tmp361; fftw_real tmp382; fftw_real tmp357; fftw_real tmp377; fftw_real tmp389; fftw_real tmp397; fftw_real tmp280; fftw_real tmp376; fftw_real tmp386; fftw_real tmp396; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp139; fftw_real tmp158; fftw_real tmp359; fftw_real tmp360; ASSERT_ALIGNED_DOUBLE; tmp139 = tmp131 + tmp138; tmp158 = tmp148 + tmp157; tmp159 = tmp139 + tmp158; tmp381 = tmp139 - tmp158; { fftw_real tmp180; fftw_real tmp201; fftw_real tmp368; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; tmp180 = (K098017140 * tmp172) + (K995184726 * tmp179); tmp201 = (K995184726 * tmp193) - (K098017140 * tmp200); tmp202 = tmp180 + tmp201; tmp391 = tmp201 - tmp180; tmp368 = tmp364 + tmp367; tmp371 = tmp369 + tmp370; tmp372 = tmp368 + tmp371; tmp392 = tmp371 - tmp368; } tmp359 = (K995184726 * tmp172) - (K098017140 * tmp179); tmp360 = (K995184726 * tmp200) + (K098017140 * tmp193); tmp361 = tmp359 + tmp360; tmp382 = tmp360 - tmp359; { fftw_real tmp343; fftw_real tmp387; fftw_real tmp356; fftw_real tmp388; fftw_real tmp342; fftw_real tmp355; ASSERT_ALIGNED_DOUBLE; tmp342 = tmp324 + tmp341; tmp343 = tmp307 + tmp342; tmp387 = tmp307 - tmp342; tmp355 = tmp353 + tmp354; tmp356 = tmp352 + tmp355; tmp388 = tmp355 - tmp352; tmp357 = (K998795456 * tmp343) - (K049067674 * tmp356); tmp377 = (K049067674 * tmp343) + (K998795456 * tmp356); tmp389 = (K740951125 * tmp387) - (K671558954 * tmp388); tmp397 = (K671558954 * tmp387) + (K740951125 * tmp388); } { fftw_real tmp266; fftw_real tmp384; fftw_real tmp279; fftw_real tmp385; fftw_real tmp265; fftw_real tmp278; ASSERT_ALIGNED_DOUBLE; tmp265 = tmp247 + tmp264; tmp266 = tmp230 + tmp265; tmp384 = tmp230 - tmp265; tmp278 = tmp276 + tmp277; tmp279 = tmp275 + tmp278; tmp385 = tmp278 - tmp275; tmp280 = (K998795456 * tmp266) + (K049067674 * tmp279); tmp376 = (K998795456 * tmp279) - (K049067674 * tmp266); tmp386 = (K740951125 * tmp384) + (K671558954 * tmp385); tmp396 = (K740951125 * tmp385) - (K671558954 * tmp384); } } { fftw_real tmp203; fftw_real tmp358; fftw_real tmp373; fftw_real tmp374; ASSERT_ALIGNED_DOUBLE; tmp203 = tmp159 + tmp202; tmp358 = tmp280 + tmp357; real_output[63 * real_ostride] = tmp203 - tmp358; real_output[real_ostride] = tmp203 + tmp358; tmp373 = tmp361 - tmp372; tmp374 = tmp357 - tmp280; imag_output[31 * imag_ostride] = tmp373 + tmp374; imag_output[33 * imag_ostride] = tmp374 - tmp373; } { fftw_real tmp375; fftw_real tmp378; fftw_real tmp379; fftw_real tmp380; ASSERT_ALIGNED_DOUBLE; tmp375 = tmp372 + tmp361; tmp378 = tmp376 + tmp377; imag_output[imag_ostride] = tmp375 + tmp378; imag_output[63 * imag_ostride] = tmp378 - tmp375; tmp379 = tmp159 - tmp202; tmp380 = tmp377 - tmp376; real_output[33 * real_ostride] = tmp379 - tmp380; real_output[31 * real_ostride] = tmp379 + tmp380; } { fftw_real tmp383; fftw_real tmp390; fftw_real tmp393; fftw_real tmp394; ASSERT_ALIGNED_DOUBLE; tmp383 = tmp381 + tmp382; tmp390 = tmp386 + tmp389; real_output[49 * real_ostride] = tmp383 - tmp390; real_output[15 * real_ostride] = tmp383 + tmp390; tmp393 = tmp391 - tmp392; tmp394 = tmp389 - tmp386; imag_output[17 * imag_ostride] = tmp393 + tmp394; imag_output[47 * imag_ostride] = tmp394 - tmp393; } { fftw_real tmp395; fftw_real tmp398; fftw_real tmp399; fftw_real tmp400; ASSERT_ALIGNED_DOUBLE; tmp395 = tmp392 + tmp391; tmp398 = tmp396 + tmp397; imag_output[15 * imag_ostride] = tmp395 + tmp398; imag_output[49 * imag_ostride] = tmp398 - tmp395; tmp399 = tmp381 - tmp382; tmp400 = tmp397 - tmp396; real_output[47 * real_ostride] = tmp399 - tmp400; real_output[17 * real_ostride] = tmp399 + tmp400; } } { fftw_real tmp403; fftw_real tmp441; fftw_real tmp410; fftw_real tmp451; fftw_real tmp432; fftw_real tmp452; fftw_real tmp429; fftw_real tmp442; fftw_real tmp425; fftw_real tmp437; fftw_real tmp449; fftw_real tmp457; fftw_real tmp418; fftw_real tmp436; fftw_real tmp446; fftw_real tmp456; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp401; fftw_real tmp402; fftw_real tmp427; fftw_real tmp428; ASSERT_ALIGNED_DOUBLE; tmp401 = tmp131 - tmp138; tmp402 = tmp370 - tmp369; tmp403 = tmp401 - tmp402; tmp441 = tmp401 + tmp402; { fftw_real tmp406; fftw_real tmp409; fftw_real tmp430; fftw_real tmp431; ASSERT_ALIGNED_DOUBLE; tmp406 = (K773010453 * tmp404) + (K634393284 * tmp405); tmp409 = (K773010453 * tmp407) - (K634393284 * tmp408); tmp410 = tmp406 - tmp409; tmp451 = tmp409 + tmp406; tmp430 = tmp157 - tmp148; tmp431 = tmp367 - tmp364; tmp432 = tmp430 - tmp431; tmp452 = tmp431 + tmp430; } tmp427 = (K773010453 * tmp405) - (K634393284 * tmp404); tmp428 = (K634393284 * tmp407) + (K773010453 * tmp408); tmp429 = tmp427 - tmp428; tmp442 = tmp428 + tmp427; { fftw_real tmp421; fftw_real tmp447; fftw_real tmp424; fftw_real tmp448; fftw_real tmp420; fftw_real tmp422; ASSERT_ALIGNED_DOUBLE; tmp420 = tmp354 - tmp353; tmp421 = tmp419 - tmp420; tmp447 = tmp419 + tmp420; tmp422 = tmp341 - tmp324; tmp424 = tmp422 - tmp423; tmp448 = tmp423 + tmp422; tmp425 = (K903989293 * tmp421) - (K427555093 * tmp424); tmp437 = (K903989293 * tmp424) + (K427555093 * tmp421); tmp449 = (K941544065 * tmp447) - (K336889853 * tmp448); tmp457 = (K941544065 * tmp448) + (K336889853 * tmp447); } { fftw_real tmp414; fftw_real tmp444; fftw_real tmp417; fftw_real tmp445; fftw_real tmp412; fftw_real tmp416; ASSERT_ALIGNED_DOUBLE; tmp412 = tmp264 - tmp247; tmp414 = tmp412 - tmp413; tmp444 = tmp413 + tmp412; tmp416 = tmp277 - tmp276; tmp417 = tmp415 - tmp416; tmp445 = tmp415 + tmp416; tmp418 = (K427555093 * tmp414) + (K903989293 * tmp417); tmp436 = (K903989293 * tmp414) - (K427555093 * tmp417); tmp446 = (K336889853 * tmp444) + (K941544065 * tmp445); tmp456 = (K941544065 * tmp444) - (K336889853 * tmp445); } } { fftw_real tmp411; fftw_real tmp426; fftw_real tmp433; fftw_real tmp434; ASSERT_ALIGNED_DOUBLE; tmp411 = tmp403 + tmp410; tmp426 = tmp418 + tmp425; real_output[55 * real_ostride] = tmp411 - tmp426; real_output[9 * real_ostride] = tmp411 + tmp426; tmp433 = tmp429 - tmp432; tmp434 = tmp425 - tmp418; imag_output[23 * imag_ostride] = tmp433 + tmp434; imag_output[41 * imag_ostride] = tmp434 - tmp433; } { fftw_real tmp435; fftw_real tmp438; fftw_real tmp439; fftw_real tmp440; ASSERT_ALIGNED_DOUBLE; tmp435 = tmp432 + tmp429; tmp438 = tmp436 + tmp437; imag_output[9 * imag_ostride] = tmp435 + tmp438; imag_output[55 * imag_ostride] = tmp438 - tmp435; tmp439 = tmp403 - tmp410; tmp440 = tmp437 - tmp436; real_output[41 * real_ostride] = tmp439 - tmp440; real_output[23 * real_ostride] = tmp439 + tmp440; } { fftw_real tmp443; fftw_real tmp450; fftw_real tmp453; fftw_real tmp454; ASSERT_ALIGNED_DOUBLE; tmp443 = tmp441 + tmp442; tmp450 = tmp446 + tmp449; real_output[57 * real_ostride] = tmp443 - tmp450; real_output[7 * real_ostride] = tmp443 + tmp450; tmp453 = tmp451 - tmp452; tmp454 = tmp449 - tmp446; imag_output[25 * imag_ostride] = tmp453 + tmp454; imag_output[39 * imag_ostride] = tmp454 - tmp453; } { fftw_real tmp455; fftw_real tmp458; fftw_real tmp459; fftw_real tmp460; ASSERT_ALIGNED_DOUBLE; tmp455 = tmp452 + tmp451; tmp458 = tmp456 + tmp457; imag_output[7 * imag_ostride] = tmp455 + tmp458; imag_output[57 * imag_ostride] = tmp458 - tmp455; tmp459 = tmp441 - tmp442; tmp460 = tmp457 - tmp456; real_output[39 * real_ostride] = tmp459 - tmp460; real_output[25 * real_ostride] = tmp459 + tmp460; } } { fftw_real tmp629; fftw_real tmp719; fftw_real tmp710; fftw_real tmp730; fftw_real tmp636; fftw_real tmp729; fftw_real tmp707; fftw_real tmp720; fftw_real tmp670; fftw_real tmp714; fftw_real tmp724; fftw_real tmp734; fftw_real tmp703; fftw_real tmp715; fftw_real tmp727; fftw_real tmp735; fftw_real tmp628; fftw_real tmp709; ASSERT_ALIGNED_DOUBLE; tmp628 = K707106781 * (tmp626 + tmp627); tmp629 = tmp625 + tmp628; tmp719 = tmp625 - tmp628; tmp709 = K707106781 * (tmp627 - tmp626); tmp710 = tmp708 + tmp709; tmp730 = tmp709 - tmp708; { fftw_real tmp632; fftw_real tmp635; fftw_real tmp705; fftw_real tmp706; ASSERT_ALIGNED_DOUBLE; tmp632 = (K923879532 * tmp630) + (K382683432 * tmp631); tmp635 = (K923879532 * tmp633) - (K382683432 * tmp634); tmp636 = tmp632 + tmp635; tmp729 = tmp635 - tmp632; tmp705 = (K923879532 * tmp631) - (K382683432 * tmp630); tmp706 = (K382683432 * tmp633) + (K923879532 * tmp634); tmp707 = tmp705 + tmp706; tmp720 = tmp706 - tmp705; } { fftw_real tmp660; fftw_real tmp669; fftw_real tmp722; fftw_real tmp723; ASSERT_ALIGNED_DOUBLE; tmp660 = tmp644 + tmp659; tmp669 = tmp667 + tmp668; tmp670 = (K980785280 * tmp660) + (K195090322 * tmp669); tmp714 = (K980785280 * tmp669) - (K195090322 * tmp660); tmp722 = tmp644 - tmp659; tmp723 = tmp668 - tmp667; tmp724 = (K831469612 * tmp722) + (K555570233 * tmp723); tmp734 = (K831469612 * tmp723) - (K555570233 * tmp722); } { fftw_real tmp693; fftw_real tmp702; fftw_real tmp725; fftw_real tmp726; ASSERT_ALIGNED_DOUBLE; tmp693 = tmp677 + tmp692; tmp702 = tmp700 + tmp701; tmp703 = (K980785280 * tmp693) - (K195090322 * tmp702); tmp715 = (K195090322 * tmp693) + (K980785280 * tmp702); tmp725 = tmp677 - tmp692; tmp726 = tmp701 - tmp700; tmp727 = (K831469612 * tmp725) - (K555570233 * tmp726); tmp735 = (K555570233 * tmp725) + (K831469612 * tmp726); } { fftw_real tmp637; fftw_real tmp704; fftw_real tmp711; fftw_real tmp712; ASSERT_ALIGNED_DOUBLE; tmp637 = tmp629 + tmp636; tmp704 = tmp670 + tmp703; real_output[60 * real_ostride] = tmp637 - tmp704; real_output[4 * real_ostride] = tmp637 + tmp704; tmp711 = tmp707 - tmp710; tmp712 = tmp703 - tmp670; imag_output[28 * imag_ostride] = tmp711 + tmp712; imag_output[36 * imag_ostride] = tmp712 - tmp711; } { fftw_real tmp713; fftw_real tmp716; fftw_real tmp717; fftw_real tmp718; ASSERT_ALIGNED_DOUBLE; tmp713 = tmp710 + tmp707; tmp716 = tmp714 + tmp715; imag_output[4 * imag_ostride] = tmp713 + tmp716; imag_output[60 * imag_ostride] = tmp716 - tmp713; tmp717 = tmp629 - tmp636; tmp718 = tmp715 - tmp714; real_output[36 * real_ostride] = tmp717 - tmp718; real_output[28 * real_ostride] = tmp717 + tmp718; } { fftw_real tmp721; fftw_real tmp728; fftw_real tmp731; fftw_real tmp732; ASSERT_ALIGNED_DOUBLE; tmp721 = tmp719 + tmp720; tmp728 = tmp724 + tmp727; real_output[52 * real_ostride] = tmp721 - tmp728; real_output[12 * real_ostride] = tmp721 + tmp728; tmp731 = tmp729 - tmp730; tmp732 = tmp727 - tmp724; imag_output[20 * imag_ostride] = tmp731 + tmp732; imag_output[44 * imag_ostride] = tmp732 - tmp731; } { fftw_real tmp733; fftw_real tmp736; fftw_real tmp737; fftw_real tmp738; ASSERT_ALIGNED_DOUBLE; tmp733 = tmp730 + tmp729; tmp736 = tmp734 + tmp735; imag_output[12 * imag_ostride] = tmp733 + tmp736; imag_output[52 * imag_ostride] = tmp736 - tmp733; tmp737 = tmp719 - tmp720; tmp738 = tmp735 - tmp734; real_output[44 * real_ostride] = tmp737 - tmp738; real_output[20 * real_ostride] = tmp737 + tmp738; } } { fftw_real tmp795; fftw_real tmp877; fftw_real tmp882; fftw_real tmp892; fftw_real tmp885; fftw_real tmp893; fftw_real tmp857; fftw_real tmp873; fftw_real tmp836; fftw_real tmp872; fftw_real tmp861; fftw_real tmp878; fftw_real tmp814; fftw_real tmp887; fftw_real tmp868; fftw_real tmp888; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp787; fftw_real tmp794; fftw_real tmp880; fftw_real tmp881; ASSERT_ALIGNED_DOUBLE; tmp787 = tmp783 + tmp786; tmp794 = tmp790 + tmp793; tmp795 = tmp787 + tmp794; tmp877 = tmp787 - tmp794; tmp880 = tmp820 - tmp827; tmp881 = tmp834 - tmp831; tmp882 = (K773010453 * tmp880) + (K634393284 * tmp881); tmp892 = (K773010453 * tmp881) - (K634393284 * tmp880); } { fftw_real tmp883; fftw_real tmp884; fftw_real tmp849; fftw_real tmp856; ASSERT_ALIGNED_DOUBLE; tmp883 = tmp841 - tmp848; tmp884 = tmp855 - tmp852; tmp885 = (K773010453 * tmp883) - (K634393284 * tmp884); tmp893 = (K634393284 * tmp883) + (K773010453 * tmp884); tmp849 = tmp841 + tmp848; tmp856 = tmp852 + tmp855; tmp857 = (K995184726 * tmp849) - (K098017140 * tmp856); tmp873 = (K098017140 * tmp849) + (K995184726 * tmp856); } { fftw_real tmp828; fftw_real tmp835; fftw_real tmp859; fftw_real tmp860; ASSERT_ALIGNED_DOUBLE; tmp828 = tmp820 + tmp827; tmp835 = tmp831 + tmp834; tmp836 = (K995184726 * tmp828) + (K098017140 * tmp835); tmp872 = (K995184726 * tmp835) - (K098017140 * tmp828); tmp859 = (K980785280 * tmp803) - (K195090322 * tmp800); tmp860 = (K195090322 * tmp809) + (K980785280 * tmp812); tmp861 = tmp859 + tmp860; tmp878 = tmp860 - tmp859; } { fftw_real tmp804; fftw_real tmp813; fftw_real tmp864; fftw_real tmp867; ASSERT_ALIGNED_DOUBLE; tmp804 = (K980785280 * tmp800) + (K195090322 * tmp803); tmp813 = (K980785280 * tmp809) - (K195090322 * tmp812); tmp814 = tmp804 + tmp813; tmp887 = tmp813 - tmp804; tmp864 = tmp862 + tmp863; tmp867 = tmp865 + tmp866; tmp868 = tmp864 + tmp867; tmp888 = tmp867 - tmp864; } { fftw_real tmp815; fftw_real tmp858; fftw_real tmp869; fftw_real tmp870; ASSERT_ALIGNED_DOUBLE; tmp815 = tmp795 + tmp814; tmp858 = tmp836 + tmp857; real_output[62 * real_ostride] = tmp815 - tmp858; real_output[2 * real_ostride] = tmp815 + tmp858; tmp869 = tmp861 - tmp868; tmp870 = tmp857 - tmp836; imag_output[30 * imag_ostride] = tmp869 + tmp870; imag_output[34 * imag_ostride] = tmp870 - tmp869; } { fftw_real tmp871; fftw_real tmp874; fftw_real tmp875; fftw_real tmp876; ASSERT_ALIGNED_DOUBLE; tmp871 = tmp868 + tmp861; tmp874 = tmp872 + tmp873; imag_output[2 * imag_ostride] = tmp871 + tmp874; imag_output[62 * imag_ostride] = tmp874 - tmp871; tmp875 = tmp795 - tmp814; tmp876 = tmp873 - tmp872; real_output[34 * real_ostride] = tmp875 - tmp876; real_output[30 * real_ostride] = tmp875 + tmp876; } { fftw_real tmp879; fftw_real tmp886; fftw_real tmp889; fftw_real tmp890; ASSERT_ALIGNED_DOUBLE; tmp879 = tmp877 + tmp878; tmp886 = tmp882 + tmp885; real_output[50 * real_ostride] = tmp879 - tmp886; real_output[14 * real_ostride] = tmp879 + tmp886; tmp889 = tmp887 - tmp888; tmp890 = tmp885 - tmp882; imag_output[18 * imag_ostride] = tmp889 + tmp890; imag_output[46 * imag_ostride] = tmp890 - tmp889; } { fftw_real tmp891; fftw_real tmp894; fftw_real tmp895; fftw_real tmp896; ASSERT_ALIGNED_DOUBLE; tmp891 = tmp888 + tmp887; tmp894 = tmp892 + tmp893; imag_output[14 * imag_ostride] = tmp891 + tmp894; imag_output[50 * imag_ostride] = tmp894 - tmp891; tmp895 = tmp877 - tmp878; tmp896 = tmp893 - tmp892; real_output[46 * real_ostride] = tmp895 - tmp896; real_output[18 * real_ostride] = tmp895 + tmp896; } } { fftw_real tmp899; fftw_real tmp937; fftw_real tmp942; fftw_real tmp952; fftw_real tmp945; fftw_real tmp953; fftw_real tmp921; fftw_real tmp933; fftw_real tmp914; fftw_real tmp932; fftw_real tmp925; fftw_real tmp938; fftw_real tmp906; fftw_real tmp947; fftw_real tmp928; fftw_real tmp948; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp897; fftw_real tmp898; fftw_real tmp940; fftw_real tmp941; ASSERT_ALIGNED_DOUBLE; tmp897 = tmp783 - tmp786; tmp898 = tmp866 - tmp865; tmp899 = tmp897 - tmp898; tmp937 = tmp897 + tmp898; tmp940 = tmp909 + tmp908; tmp941 = tmp911 + tmp912; tmp942 = (K290284677 * tmp940) + (K956940335 * tmp941); tmp952 = (K956940335 * tmp940) - (K290284677 * tmp941); } { fftw_real tmp943; fftw_real tmp944; fftw_real tmp917; fftw_real tmp920; ASSERT_ALIGNED_DOUBLE; tmp943 = tmp915 + tmp916; tmp944 = tmp919 + tmp918; tmp945 = (K956940335 * tmp943) - (K290284677 * tmp944); tmp953 = (K956940335 * tmp944) + (K290284677 * tmp943); tmp917 = tmp915 - tmp916; tmp920 = tmp918 - tmp919; tmp921 = (K881921264 * tmp917) - (K471396736 * tmp920); tmp933 = (K881921264 * tmp920) + (K471396736 * tmp917); } { fftw_real tmp910; fftw_real tmp913; fftw_real tmp923; fftw_real tmp924; ASSERT_ALIGNED_DOUBLE; tmp910 = tmp908 - tmp909; tmp913 = tmp911 - tmp912; tmp914 = (K471396736 * tmp910) + (K881921264 * tmp913); tmp932 = (K881921264 * tmp910) - (K471396736 * tmp913); tmp923 = (K831469612 * tmp900) - (K555570233 * tmp901); tmp924 = (K831469612 * tmp904) + (K555570233 * tmp903); tmp925 = tmp923 - tmp924; tmp938 = tmp924 + tmp923; } { fftw_real tmp902; fftw_real tmp905; fftw_real tmp926; fftw_real tmp927; ASSERT_ALIGNED_DOUBLE; tmp902 = (K555570233 * tmp900) + (K831469612 * tmp901); tmp905 = (K831469612 * tmp903) - (K555570233 * tmp904); tmp906 = tmp902 - tmp905; tmp947 = tmp905 + tmp902; tmp926 = tmp793 - tmp790; tmp927 = tmp863 - tmp862; tmp928 = tmp926 - tmp927; tmp948 = tmp927 + tmp926; } { fftw_real tmp907; fftw_real tmp922; fftw_real tmp929; fftw_real tmp930; ASSERT_ALIGNED_DOUBLE; tmp907 = tmp899 + tmp906; tmp922 = tmp914 + tmp921; real_output[54 * real_ostride] = tmp907 - tmp922; real_output[10 * real_ostride] = tmp907 + tmp922; tmp929 = tmp925 - tmp928; tmp930 = tmp921 - tmp914; imag_output[22 * imag_ostride] = tmp929 + tmp930; imag_output[42 * imag_ostride] = tmp930 - tmp929; } { fftw_real tmp931; fftw_real tmp934; fftw_real tmp935; fftw_real tmp936; ASSERT_ALIGNED_DOUBLE; tmp931 = tmp928 + tmp925; tmp934 = tmp932 + tmp933; imag_output[10 * imag_ostride] = tmp931 + tmp934; imag_output[54 * imag_ostride] = tmp934 - tmp931; tmp935 = tmp899 - tmp906; tmp936 = tmp933 - tmp932; real_output[42 * real_ostride] = tmp935 - tmp936; real_output[22 * real_ostride] = tmp935 + tmp936; } { fftw_real tmp939; fftw_real tmp946; fftw_real tmp949; fftw_real tmp950; ASSERT_ALIGNED_DOUBLE; tmp939 = tmp937 + tmp938; tmp946 = tmp942 + tmp945; real_output[58 * real_ostride] = tmp939 - tmp946; real_output[6 * real_ostride] = tmp939 + tmp946; tmp949 = tmp947 - tmp948; tmp950 = tmp945 - tmp942; imag_output[26 * imag_ostride] = tmp949 + tmp950; imag_output[38 * imag_ostride] = tmp950 - tmp949; } { fftw_real tmp951; fftw_real tmp954; fftw_real tmp955; fftw_real tmp956; ASSERT_ALIGNED_DOUBLE; tmp951 = tmp948 + tmp947; tmp954 = tmp952 + tmp953; imag_output[6 * imag_ostride] = tmp951 + tmp954; imag_output[58 * imag_ostride] = tmp954 - tmp951; tmp955 = tmp937 - tmp938; tmp956 = tmp953 - tmp952; real_output[38 * real_ostride] = tmp955 - tmp956; real_output[26 * real_ostride] = tmp955 + tmp956; } } { fftw_real tmp471; fftw_real tmp545; fftw_real tmp486; fftw_real tmp555; fftw_real tmp536; fftw_real tmp556; fftw_real tmp529; fftw_real tmp546; fftw_real tmp525; fftw_real tmp541; fftw_real tmp553; fftw_real tmp561; fftw_real tmp506; fftw_real tmp540; fftw_real tmp550; fftw_real tmp560; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp463; fftw_real tmp470; fftw_real tmp527; fftw_real tmp528; ASSERT_ALIGNED_DOUBLE; tmp463 = tmp461 + tmp462; tmp470 = tmp466 + tmp469; tmp471 = tmp463 + tmp470; tmp545 = tmp463 - tmp470; { fftw_real tmp478; fftw_real tmp485; fftw_real tmp532; fftw_real tmp535; ASSERT_ALIGNED_DOUBLE; tmp478 = (K956940335 * tmp474) + (K290284677 * tmp477); tmp485 = (K956940335 * tmp481) - (K290284677 * tmp484); tmp486 = tmp478 + tmp485; tmp555 = tmp485 - tmp478; tmp532 = tmp530 + tmp531; tmp535 = tmp533 + tmp534; tmp536 = tmp532 + tmp535; tmp556 = tmp535 - tmp532; } tmp527 = (K956940335 * tmp477) - (K290284677 * tmp474); tmp528 = (K290284677 * tmp481) + (K956940335 * tmp484); tmp529 = tmp527 + tmp528; tmp546 = tmp528 - tmp527; { fftw_real tmp517; fftw_real tmp551; fftw_real tmp524; fftw_real tmp552; fftw_real tmp516; fftw_real tmp523; ASSERT_ALIGNED_DOUBLE; tmp516 = tmp512 + tmp515; tmp517 = tmp509 + tmp516; tmp551 = tmp509 - tmp516; tmp523 = tmp521 + tmp522; tmp524 = tmp520 + tmp523; tmp552 = tmp523 - tmp520; tmp525 = (K989176509 * tmp517) - (K146730474 * tmp524); tmp541 = (K146730474 * tmp517) + (K989176509 * tmp524); tmp553 = (K803207531 * tmp551) - (K595699304 * tmp552); tmp561 = (K595699304 * tmp551) + (K803207531 * tmp552); } { fftw_real tmp498; fftw_real tmp548; fftw_real tmp505; fftw_real tmp549; fftw_real tmp497; fftw_real tmp504; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp493 + tmp496; tmp498 = tmp490 + tmp497; tmp548 = tmp490 - tmp497; tmp504 = tmp502 + tmp503; tmp505 = tmp501 + tmp504; tmp549 = tmp504 - tmp501; tmp506 = (K989176509 * tmp498) + (K146730474 * tmp505); tmp540 = (K989176509 * tmp505) - (K146730474 * tmp498); tmp550 = (K803207531 * tmp548) + (K595699304 * tmp549); tmp560 = (K803207531 * tmp549) - (K595699304 * tmp548); } } { fftw_real tmp487; fftw_real tmp526; fftw_real tmp537; fftw_real tmp538; ASSERT_ALIGNED_DOUBLE; tmp487 = tmp471 + tmp486; tmp526 = tmp506 + tmp525; real_output[61 * real_ostride] = tmp487 - tmp526; real_output[3 * real_ostride] = tmp487 + tmp526; tmp537 = tmp529 - tmp536; tmp538 = tmp525 - tmp506; imag_output[29 * imag_ostride] = tmp537 + tmp538; imag_output[35 * imag_ostride] = tmp538 - tmp537; } { fftw_real tmp539; fftw_real tmp542; fftw_real tmp543; fftw_real tmp544; ASSERT_ALIGNED_DOUBLE; tmp539 = tmp536 + tmp529; tmp542 = tmp540 + tmp541; imag_output[3 * imag_ostride] = tmp539 + tmp542; imag_output[61 * imag_ostride] = tmp542 - tmp539; tmp543 = tmp471 - tmp486; tmp544 = tmp541 - tmp540; real_output[35 * real_ostride] = tmp543 - tmp544; real_output[29 * real_ostride] = tmp543 + tmp544; } { fftw_real tmp547; fftw_real tmp554; fftw_real tmp557; fftw_real tmp558; ASSERT_ALIGNED_DOUBLE; tmp547 = tmp545 + tmp546; tmp554 = tmp550 + tmp553; real_output[51 * real_ostride] = tmp547 - tmp554; real_output[13 * real_ostride] = tmp547 + tmp554; tmp557 = tmp555 - tmp556; tmp558 = tmp553 - tmp550; imag_output[19 * imag_ostride] = tmp557 + tmp558; imag_output[45 * imag_ostride] = tmp558 - tmp557; } { fftw_real tmp559; fftw_real tmp562; fftw_real tmp563; fftw_real tmp564; ASSERT_ALIGNED_DOUBLE; tmp559 = tmp556 + tmp555; tmp562 = tmp560 + tmp561; imag_output[13 * imag_ostride] = tmp559 + tmp562; imag_output[51 * imag_ostride] = tmp562 - tmp559; tmp563 = tmp545 - tmp546; tmp564 = tmp561 - tmp560; real_output[45 * real_ostride] = tmp563 - tmp564; real_output[19 * real_ostride] = tmp563 + tmp564; } } { fftw_real tmp567; fftw_real tmp605; fftw_real tmp574; fftw_real tmp615; fftw_real tmp596; fftw_real tmp616; fftw_real tmp593; fftw_real tmp606; fftw_real tmp589; fftw_real tmp601; fftw_real tmp613; fftw_real tmp621; fftw_real tmp582; fftw_real tmp600; fftw_real tmp610; fftw_real tmp620; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp565; fftw_real tmp566; fftw_real tmp591; fftw_real tmp592; ASSERT_ALIGNED_DOUBLE; tmp565 = tmp461 - tmp462; tmp566 = tmp534 - tmp533; tmp567 = tmp565 - tmp566; tmp605 = tmp565 + tmp566; { fftw_real tmp570; fftw_real tmp573; fftw_real tmp594; fftw_real tmp595; ASSERT_ALIGNED_DOUBLE; tmp570 = (K471396736 * tmp568) + (K881921264 * tmp569); tmp573 = (K881921264 * tmp571) - (K471396736 * tmp572); tmp574 = tmp570 - tmp573; tmp615 = tmp573 + tmp570; tmp594 = tmp469 - tmp466; tmp595 = tmp531 - tmp530; tmp596 = tmp594 - tmp595; tmp616 = tmp595 + tmp594; } tmp591 = (K881921264 * tmp568) - (K471396736 * tmp569); tmp592 = (K881921264 * tmp572) + (K471396736 * tmp571); tmp593 = tmp591 - tmp592; tmp606 = tmp592 + tmp591; { fftw_real tmp585; fftw_real tmp611; fftw_real tmp588; fftw_real tmp612; fftw_real tmp584; fftw_real tmp586; ASSERT_ALIGNED_DOUBLE; tmp584 = tmp522 - tmp521; tmp585 = tmp583 - tmp584; tmp611 = tmp583 + tmp584; tmp586 = tmp515 - tmp512; tmp588 = tmp586 - tmp587; tmp612 = tmp587 + tmp586; tmp589 = (K857728610 * tmp585) - (K514102744 * tmp588); tmp601 = (K857728610 * tmp588) + (K514102744 * tmp585); tmp613 = (K970031253 * tmp611) - (K242980179 * tmp612); tmp621 = (K970031253 * tmp612) + (K242980179 * tmp611); } { fftw_real tmp578; fftw_real tmp608; fftw_real tmp581; fftw_real tmp609; fftw_real tmp576; fftw_real tmp580; ASSERT_ALIGNED_DOUBLE; tmp576 = tmp496 - tmp493; tmp578 = tmp576 - tmp577; tmp608 = tmp577 + tmp576; tmp580 = tmp503 - tmp502; tmp581 = tmp579 - tmp580; tmp609 = tmp579 + tmp580; tmp582 = (K514102744 * tmp578) + (K857728610 * tmp581); tmp600 = (K857728610 * tmp578) - (K514102744 * tmp581); tmp610 = (K242980179 * tmp608) + (K970031253 * tmp609); tmp620 = (K970031253 * tmp608) - (K242980179 * tmp609); } } { fftw_real tmp575; fftw_real tmp590; fftw_real tmp597; fftw_real tmp598; ASSERT_ALIGNED_DOUBLE; tmp575 = tmp567 + tmp574; tmp590 = tmp582 + tmp589; real_output[53 * real_ostride] = tmp575 - tmp590; real_output[11 * real_ostride] = tmp575 + tmp590; tmp597 = tmp593 - tmp596; tmp598 = tmp589 - tmp582; imag_output[21 * imag_ostride] = tmp597 + tmp598; imag_output[43 * imag_ostride] = tmp598 - tmp597; } { fftw_real tmp599; fftw_real tmp602; fftw_real tmp603; fftw_real tmp604; ASSERT_ALIGNED_DOUBLE; tmp599 = tmp596 + tmp593; tmp602 = tmp600 + tmp601; imag_output[11 * imag_ostride] = tmp599 + tmp602; imag_output[53 * imag_ostride] = tmp602 - tmp599; tmp603 = tmp567 - tmp574; tmp604 = tmp601 - tmp600; real_output[43 * real_ostride] = tmp603 - tmp604; real_output[21 * real_ostride] = tmp603 + tmp604; } { fftw_real tmp607; fftw_real tmp614; fftw_real tmp617; fftw_real tmp618; ASSERT_ALIGNED_DOUBLE; tmp607 = tmp605 + tmp606; tmp614 = tmp610 + tmp613; real_output[59 * real_ostride] = tmp607 - tmp614; real_output[5 * real_ostride] = tmp607 + tmp614; tmp617 = tmp615 - tmp616; tmp618 = tmp613 - tmp610; imag_output[27 * imag_ostride] = tmp617 + tmp618; imag_output[37 * imag_ostride] = tmp618 - tmp617; } { fftw_real tmp619; fftw_real tmp622; fftw_real tmp623; fftw_real tmp624; ASSERT_ALIGNED_DOUBLE; tmp619 = tmp616 + tmp615; tmp622 = tmp620 + tmp621; imag_output[5 * imag_ostride] = tmp619 + tmp622; imag_output[59 * imag_ostride] = tmp622 - tmp619; tmp623 = tmp605 - tmp606; tmp624 = tmp621 - tmp620; real_output[37 * real_ostride] = tmp623 - tmp624; real_output[27 * real_ostride] = tmp623 + tmp624; } } } fftw_codelet_desc fftw_real2hc_128_desc = { "fftw_real2hc_128", (void (*)()) fftw_real2hc_128, 128, FFTW_FORWARD, FFTW_REAL2HC, 2818, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_2.c����������������������������������������������������������������������������0000644�0001754�0000144�00000005635�07637527304�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:48 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 2 */ /* * This function contains 8 FP additions, 4 FP multiplications, * (or, 6 additions, 2 multiplications, 2 fused multiply/add), * 11 stack variables, and 16 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (2 * iostride); { fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp11 = X[0]; tmp12 = X[iostride]; X[iostride] = tmp11 - tmp12; X[0] = tmp11 + tmp12; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 1) { fftw_real tmp3; fftw_real tmp9; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp3 = X[0]; tmp9 = Y[-iostride]; { fftw_real tmp5; fftw_real tmp7; fftw_real tmp4; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp5 = X[iostride]; tmp7 = Y[0]; tmp4 = c_re(W[0]); tmp6 = c_im(W[0]); tmp8 = (tmp4 * tmp5) - (tmp6 * tmp7); tmp10 = (tmp6 * tmp5) + (tmp4 * tmp7); } Y[-iostride] = tmp3 - tmp8; X[0] = tmp3 + tmp8; X[iostride] = -(tmp9 - tmp10); Y[0] = tmp10 + tmp9; } if (i == m) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; X[0] = tmp1; tmp2 = X[iostride]; Y[0] = -tmp2; } } static const int twiddle_order[] = { 1 }; fftw_codelet_desc fftw_hc2hc_forward_2_desc = { "fftw_hc2hc_forward_2", (void (*)()) fftw_hc2hc_forward_2, 2, FFTW_FORWARD, FFTW_HC2HC, 47, 1, twiddle_order, }; ���������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_3.c����������������������������������������������������������������������������0000644�0001754�0000144�00000010460�07637527305�010446� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:48 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 3 */ /* * This function contains 25 FP additions, 16 FP multiplications, * (or, 17 additions, 8 multiplications, 8 fused multiply/add), * 15 stack variables, and 24 memory accesses */ static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_3(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (3 * iostride); { fftw_real tmp24; fftw_real tmp25; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp24 = X[0]; tmp25 = X[iostride]; tmp26 = X[2 * iostride]; tmp27 = tmp25 + tmp26; X[iostride] = tmp24 - (K500000000 * tmp27); X[0] = tmp24 + tmp27; Y[-iostride] = K866025403 * (tmp26 - tmp25); } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 2) { fftw_real tmp4; fftw_real tmp21; fftw_real tmp9; fftw_real tmp17; fftw_real tmp14; fftw_real tmp18; fftw_real tmp15; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp4 = X[0]; tmp21 = Y[-2 * iostride]; { fftw_real tmp6; fftw_real tmp8; fftw_real tmp5; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp6 = X[iostride]; tmp8 = Y[-iostride]; tmp5 = c_re(W[0]); tmp7 = c_im(W[0]); tmp9 = (tmp5 * tmp6) - (tmp7 * tmp8); tmp17 = (tmp7 * tmp6) + (tmp5 * tmp8); } { fftw_real tmp11; fftw_real tmp13; fftw_real tmp10; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp11 = X[2 * iostride]; tmp13 = Y[0]; tmp10 = c_re(W[1]); tmp12 = c_im(W[1]); tmp14 = (tmp10 * tmp11) - (tmp12 * tmp13); tmp18 = (tmp12 * tmp11) + (tmp10 * tmp13); } tmp15 = tmp9 + tmp14; tmp20 = tmp17 + tmp18; { fftw_real tmp16; fftw_real tmp19; fftw_real tmp22; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; X[0] = tmp4 + tmp15; tmp16 = tmp4 - (K500000000 * tmp15); tmp19 = K866025403 * (tmp17 - tmp18); Y[-2 * iostride] = tmp16 - tmp19; X[iostride] = tmp16 + tmp19; Y[0] = tmp20 + tmp21; tmp22 = tmp21 - (K500000000 * tmp20); tmp23 = K866025403 * (tmp14 - tmp9); X[2 * iostride] = -(tmp22 - tmp23); Y[-iostride] = tmp23 + tmp22; } } if (i == m) { fftw_real tmp1; fftw_real tmp3; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = X[iostride]; tmp3 = X[0]; tmp2 = X[2 * iostride]; Y[0] = -(K866025403 * (tmp1 + tmp2)); X[iostride] = tmp2 + tmp3 - tmp1; X[0] = tmp3 - (K500000000 * (tmp2 - tmp1)); } } static const int twiddle_order[] = { 1, 2 }; fftw_codelet_desc fftw_hc2hc_forward_3_desc = { "fftw_hc2hc_forward_3", (void (*)()) fftw_hc2hc_forward_3, 3, FFTW_FORWARD, FFTW_HC2HC, 69, 2, twiddle_order, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_4.c����������������������������������������������������������������������������0000644�0001754�0000144�00000012062�07637527305�010447� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:49 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 4 */ /* * This function contains 34 FP additions, 14 FP multiplications, * (or, 28 additions, 8 multiplications, 6 fused multiply/add), * 15 stack variables, and 32 memory accesses */ static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_4(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (4 * iostride); { fftw_real tmp35; fftw_real tmp36; fftw_real tmp37; fftw_real tmp38; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp35 = X[0]; tmp36 = X[2 * iostride]; tmp37 = tmp35 + tmp36; tmp38 = X[iostride]; tmp39 = X[3 * iostride]; tmp40 = tmp38 + tmp39; X[iostride] = tmp35 - tmp36; Y[-iostride] = -(tmp38 - tmp39); X[2 * iostride] = tmp37 - tmp40; X[0] = tmp37 + tmp40; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) { fftw_real tmp7; fftw_real tmp30; fftw_real tmp12; fftw_real tmp29; fftw_real tmp18; fftw_real tmp26; fftw_real tmp23; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp7 = X[0]; tmp30 = Y[-3 * iostride]; { fftw_real tmp9; fftw_real tmp11; fftw_real tmp8; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp9 = X[2 * iostride]; tmp11 = Y[-iostride]; tmp8 = c_re(W[1]); tmp10 = c_im(W[1]); tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); tmp29 = (tmp10 * tmp9) + (tmp8 * tmp11); } { fftw_real tmp15; fftw_real tmp17; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp15 = X[iostride]; tmp17 = Y[-2 * iostride]; tmp14 = c_re(W[0]); tmp16 = c_im(W[0]); tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); tmp26 = (tmp16 * tmp15) + (tmp14 * tmp17); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = X[3 * iostride]; tmp22 = Y[0]; tmp19 = c_re(W[2]); tmp21 = c_im(W[2]); tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); tmp27 = (tmp21 * tmp20) + (tmp19 * tmp22); } { fftw_real tmp13; fftw_real tmp24; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp13 = tmp7 + tmp12; tmp24 = tmp18 + tmp23; Y[-2 * iostride] = tmp13 - tmp24; X[0] = tmp13 + tmp24; tmp33 = tmp18 - tmp23; tmp34 = tmp30 - tmp29; X[3 * iostride] = -(tmp33 + tmp34); Y[-iostride] = tmp34 - tmp33; } { fftw_real tmp31; fftw_real tmp32; fftw_real tmp25; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp29 + tmp30; tmp32 = tmp26 + tmp27; X[2 * iostride] = -(tmp31 - tmp32); Y[0] = tmp32 + tmp31; tmp25 = tmp7 - tmp12; tmp28 = tmp26 - tmp27; Y[-3 * iostride] = tmp25 - tmp28; X[iostride] = tmp25 + tmp28; } } if (i == m) { fftw_real tmp1; fftw_real tmp6; fftw_real tmp4; fftw_real tmp5; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp6 = X[2 * iostride]; tmp2 = X[iostride]; tmp3 = X[3 * iostride]; tmp4 = K707106781 * (tmp2 - tmp3); tmp5 = K707106781 * (tmp2 + tmp3); X[iostride] = tmp1 - tmp4; X[0] = tmp1 + tmp4; Y[0] = -(tmp5 + tmp6); Y[-iostride] = tmp6 - tmp5; } } static const int twiddle_order[] = { 1, 2, 3 }; fftw_codelet_desc fftw_hc2hc_forward_4_desc = { "fftw_hc2hc_forward_4", (void (*)()) fftw_hc2hc_forward_4, 4, FFTW_FORWARD, FFTW_HC2HC, 91, 3, twiddle_order, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_5.c����������������������������������������������������������������������������0000644�0001754�0000144�00000017317�07637527307�010462� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:49 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 5 */ /* * This function contains 64 FP additions, 40 FP multiplications, * (or, 44 additions, 20 multiplications, 20 fused multiply/add), * 27 stack variables, and 40 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_5(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (5 * iostride); { fftw_real tmp70; fftw_real tmp67; fftw_real tmp68; fftw_real tmp63; fftw_real tmp71; fftw_real tmp66; fftw_real tmp69; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; tmp70 = X[0]; { fftw_real tmp61; fftw_real tmp62; fftw_real tmp64; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp61 = X[4 * iostride]; tmp62 = X[iostride]; tmp67 = tmp61 + tmp62; tmp64 = X[2 * iostride]; tmp65 = X[3 * iostride]; tmp68 = tmp64 + tmp65; tmp63 = tmp61 - tmp62; tmp71 = tmp67 + tmp68; tmp66 = tmp64 - tmp65; } Y[-iostride] = (K951056516 * tmp63) - (K587785252 * tmp66); Y[-2 * iostride] = (K587785252 * tmp63) + (K951056516 * tmp66); X[0] = tmp71 + tmp70; tmp69 = K559016994 * (tmp67 - tmp68); tmp72 = tmp70 - (K250000000 * tmp71); X[iostride] = tmp69 + tmp72; X[2 * iostride] = tmp72 - tmp69; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 4) { fftw_real tmp13; fftw_real tmp52; fftw_real tmp42; fftw_real tmp45; fftw_real tmp49; fftw_real tmp50; fftw_real tmp51; fftw_real tmp54; fftw_real tmp53; fftw_real tmp24; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp13 = X[0]; tmp52 = Y[-4 * iostride]; { fftw_real tmp18; fftw_real tmp40; fftw_real tmp34; fftw_real tmp44; fftw_real tmp23; fftw_real tmp41; fftw_real tmp29; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp15; fftw_real tmp17; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp15 = X[iostride]; tmp17 = Y[-3 * iostride]; tmp14 = c_re(W[0]); tmp16 = c_im(W[0]); tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); tmp40 = (tmp16 * tmp15) + (tmp14 * tmp17); } { fftw_real tmp31; fftw_real tmp33; fftw_real tmp30; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp31 = X[3 * iostride]; tmp33 = Y[-iostride]; tmp30 = c_re(W[2]); tmp32 = c_im(W[2]); tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); tmp44 = (tmp32 * tmp31) + (tmp30 * tmp33); } { fftw_real tmp20; fftw_real tmp22; fftw_real tmp19; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp20 = X[4 * iostride]; tmp22 = Y[0]; tmp19 = c_re(W[3]); tmp21 = c_im(W[3]); tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); tmp41 = (tmp21 * tmp20) + (tmp19 * tmp22); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = X[2 * iostride]; tmp28 = Y[-2 * iostride]; tmp25 = c_re(W[1]); tmp27 = c_im(W[1]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp43 = (tmp27 * tmp26) + (tmp25 * tmp28); } tmp42 = tmp40 - tmp41; tmp45 = tmp43 - tmp44; tmp49 = tmp40 + tmp41; tmp50 = tmp43 + tmp44; tmp51 = tmp49 + tmp50; tmp54 = tmp29 - tmp34; tmp53 = tmp18 - tmp23; tmp24 = tmp18 + tmp23; tmp35 = tmp29 + tmp34; tmp36 = tmp24 + tmp35; } X[0] = tmp13 + tmp36; { fftw_real tmp46; fftw_real tmp48; fftw_real tmp39; fftw_real tmp47; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp46 = (K951056516 * tmp42) + (K587785252 * tmp45); tmp48 = (K951056516 * tmp45) - (K587785252 * tmp42); tmp37 = K559016994 * (tmp24 - tmp35); tmp38 = tmp13 - (K250000000 * tmp36); tmp39 = tmp37 + tmp38; tmp47 = tmp38 - tmp37; Y[-4 * iostride] = tmp39 - tmp46; X[iostride] = tmp39 + tmp46; X[2 * iostride] = tmp47 - tmp48; Y[-3 * iostride] = tmp47 + tmp48; } Y[0] = tmp51 + tmp52; { fftw_real tmp55; fftw_real tmp60; fftw_real tmp58; fftw_real tmp59; fftw_real tmp56; fftw_real tmp57; ASSERT_ALIGNED_DOUBLE; tmp55 = (K951056516 * tmp53) + (K587785252 * tmp54); tmp60 = (K951056516 * tmp54) - (K587785252 * tmp53); tmp56 = K559016994 * (tmp49 - tmp50); tmp57 = tmp52 - (K250000000 * tmp51); tmp58 = tmp56 + tmp57; tmp59 = tmp57 - tmp56; X[4 * iostride] = -(tmp55 + tmp58); Y[-iostride] = tmp58 - tmp55; X[3 * iostride] = -(tmp59 - tmp60); Y[-2 * iostride] = tmp60 + tmp59; } } if (i == m) { fftw_real tmp10; fftw_real tmp7; fftw_real tmp8; fftw_real tmp3; fftw_real tmp11; fftw_real tmp6; fftw_real tmp9; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp10 = X[0]; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp1 = X[2 * iostride]; tmp2 = X[3 * iostride]; tmp7 = tmp1 - tmp2; tmp4 = X[4 * iostride]; tmp5 = X[iostride]; tmp8 = tmp4 - tmp5; tmp3 = tmp1 + tmp2; tmp11 = tmp7 + tmp8; tmp6 = tmp4 + tmp5; } Y[0] = -((K951056516 * tmp3) + (K587785252 * tmp6)); Y[-iostride] = -((K951056516 * tmp6) - (K587785252 * tmp3)); X[2 * iostride] = tmp11 + tmp10; tmp9 = K559016994 * (tmp7 - tmp8); tmp12 = tmp10 - (K250000000 * tmp11); X[0] = tmp9 + tmp12; X[iostride] = tmp12 - tmp9; } } static const int twiddle_order[] = { 1, 2, 3, 4 }; fftw_codelet_desc fftw_hc2hc_forward_5_desc = { "fftw_hc2hc_forward_5", (void (*)()) fftw_hc2hc_forward_5, 5, FFTW_FORWARD, FFTW_HC2HC, 113, 4, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_6.c����������������������������������������������������������������������������0000644�0001754�0000144�00000020365�07637527311�010453� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 6 */ /* * This function contains 72 FP additions, 36 FP multiplications, * (or, 54 additions, 18 multiplications, 18 fused multiply/add), * 23 stack variables, and 48 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_6(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (6 * iostride); { fftw_real tmp71; fftw_real tmp81; fftw_real tmp77; fftw_real tmp79; fftw_real tmp74; fftw_real tmp80; fftw_real tmp69; fftw_real tmp70; fftw_real tmp78; fftw_real tmp82; ASSERT_ALIGNED_DOUBLE; tmp69 = X[0]; tmp70 = X[3 * iostride]; tmp71 = tmp69 - tmp70; tmp81 = tmp69 + tmp70; { fftw_real tmp75; fftw_real tmp76; fftw_real tmp72; fftw_real tmp73; ASSERT_ALIGNED_DOUBLE; tmp75 = X[4 * iostride]; tmp76 = X[iostride]; tmp77 = tmp75 - tmp76; tmp79 = tmp75 + tmp76; tmp72 = X[2 * iostride]; tmp73 = X[5 * iostride]; tmp74 = tmp72 - tmp73; tmp80 = tmp72 + tmp73; } Y[-iostride] = K866025403 * (tmp77 - tmp74); tmp78 = tmp74 + tmp77; X[iostride] = tmp71 - (K500000000 * tmp78); X[3 * iostride] = tmp71 + tmp78; Y[-2 * iostride] = -(K866025403 * (tmp79 - tmp80)); tmp82 = tmp80 + tmp79; X[2 * iostride] = tmp81 - (K500000000 * tmp82); X[0] = tmp81 + tmp82; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 5) { fftw_real tmp19; fftw_real tmp43; fftw_real tmp62; fftw_real tmp66; fftw_real tmp41; fftw_real tmp45; fftw_real tmp53; fftw_real tmp57; fftw_real tmp30; fftw_real tmp44; fftw_real tmp50; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp13; fftw_real tmp61; fftw_real tmp18; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp13 = X[0]; tmp61 = Y[-5 * iostride]; { fftw_real tmp15; fftw_real tmp17; fftw_real tmp14; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp15 = X[3 * iostride]; tmp17 = Y[-2 * iostride]; tmp14 = c_re(W[2]); tmp16 = c_im(W[2]); tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); tmp60 = (tmp16 * tmp15) + (tmp14 * tmp17); } tmp19 = tmp13 - tmp18; tmp43 = tmp13 + tmp18; tmp62 = tmp60 + tmp61; tmp66 = tmp61 - tmp60; } { fftw_real tmp35; fftw_real tmp51; fftw_real tmp40; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = X[4 * iostride]; tmp34 = Y[-iostride]; tmp31 = c_re(W[3]); tmp33 = c_im(W[3]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp51 = (tmp33 * tmp32) + (tmp31 * tmp34); } { fftw_real tmp37; fftw_real tmp39; fftw_real tmp36; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp37 = X[iostride]; tmp39 = Y[-4 * iostride]; tmp36 = c_re(W[0]); tmp38 = c_im(W[0]); tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39); tmp52 = (tmp38 * tmp37) + (tmp36 * tmp39); } tmp41 = tmp35 - tmp40; tmp45 = tmp35 + tmp40; tmp53 = tmp51 + tmp52; tmp57 = tmp51 - tmp52; } { fftw_real tmp24; fftw_real tmp48; fftw_real tmp29; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = X[2 * iostride]; tmp23 = Y[-3 * iostride]; tmp20 = c_re(W[1]); tmp22 = c_im(W[1]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp48 = (tmp22 * tmp21) + (tmp20 * tmp23); } { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = X[5 * iostride]; tmp28 = Y[0]; tmp25 = c_re(W[4]); tmp27 = c_im(W[4]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp49 = (tmp27 * tmp26) + (tmp25 * tmp28); } tmp30 = tmp24 - tmp29; tmp44 = tmp24 + tmp29; tmp50 = tmp48 + tmp49; tmp56 = tmp48 - tmp49; } { fftw_real tmp58; fftw_real tmp42; fftw_real tmp55; fftw_real tmp68; fftw_real tmp65; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; tmp58 = K866025403 * (tmp56 - tmp57); tmp42 = tmp30 + tmp41; tmp55 = tmp19 - (K500000000 * tmp42); Y[-3 * iostride] = tmp19 + tmp42; X[iostride] = tmp55 + tmp58; Y[-5 * iostride] = tmp55 - tmp58; tmp68 = K866025403 * (tmp41 - tmp30); tmp65 = tmp56 + tmp57; tmp67 = tmp66 - (K500000000 * tmp65); X[3 * iostride] = -(tmp65 + tmp66); Y[-iostride] = tmp68 + tmp67; X[5 * iostride] = -(tmp67 - tmp68); } { fftw_real tmp54; fftw_real tmp46; fftw_real tmp47; fftw_real tmp63; fftw_real tmp59; fftw_real tmp64; ASSERT_ALIGNED_DOUBLE; tmp54 = K866025403 * (tmp50 - tmp53); tmp46 = tmp44 + tmp45; tmp47 = tmp43 - (K500000000 * tmp46); X[0] = tmp43 + tmp46; Y[-4 * iostride] = tmp47 + tmp54; X[2 * iostride] = tmp47 - tmp54; tmp63 = K866025403 * (tmp45 - tmp44); tmp59 = tmp50 + tmp53; tmp64 = tmp62 - (K500000000 * tmp59); Y[0] = tmp59 + tmp62; Y[-2 * iostride] = tmp64 - tmp63; X[4 * iostride] = -(tmp63 + tmp64); } } if (i == m) { fftw_real tmp1; fftw_real tmp11; fftw_real tmp4; fftw_real tmp9; fftw_real tmp8; fftw_real tmp10; fftw_real tmp5; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp11 = X[3 * iostride]; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = X[2 * iostride]; tmp3 = X[4 * iostride]; tmp4 = tmp2 - tmp3; tmp9 = K866025403 * (tmp2 + tmp3); tmp6 = X[iostride]; tmp7 = X[5 * iostride]; tmp8 = K866025403 * (tmp6 - tmp7); tmp10 = tmp6 + tmp7; } X[iostride] = tmp1 - tmp4; tmp5 = tmp1 + (K500000000 * tmp4); X[2 * iostride] = tmp5 - tmp8; X[0] = tmp5 + tmp8; Y[-iostride] = tmp11 - tmp10; tmp12 = (K500000000 * tmp10) + tmp11; Y[0] = -(tmp9 + tmp12); Y[-2 * iostride] = tmp9 - tmp12; } } static const int twiddle_order[] = { 1, 2, 3, 4, 5 }; fftw_codelet_desc fftw_hc2hc_forward_6_desc = { "fftw_hc2hc_forward_6", (void (*)()) fftw_hc2hc_forward_6, 6, FFTW_FORWARD, FFTW_HC2HC, 135, 5, twiddle_order, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_7.c����������������������������������������������������������������������������0000644�0001754�0000144�00000025105�07637527327�010460� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:53 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 7 */ /* * This function contains 120 FP additions, 96 FP multiplications, * (or, 108 additions, 84 multiplications, 12 fused multiply/add), * 25 stack variables, and 56 memory accesses */ static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_7(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (7 * iostride); { fftw_real tmp86; fftw_real tmp84; fftw_real tmp88; fftw_real tmp78; fftw_real tmp85; fftw_real tmp81; fftw_real tmp87; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp86 = X[0]; tmp82 = X[3 * iostride]; tmp83 = X[4 * iostride]; tmp84 = tmp82 - tmp83; tmp88 = tmp82 + tmp83; { fftw_real tmp76; fftw_real tmp77; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp76 = X[2 * iostride]; tmp77 = X[5 * iostride]; tmp78 = tmp76 - tmp77; tmp85 = tmp76 + tmp77; tmp79 = X[iostride]; tmp80 = X[6 * iostride]; tmp81 = tmp79 - tmp80; tmp87 = tmp79 + tmp80; } Y[-3 * iostride] = (K781831482 * tmp78) - (K433883739 * tmp81) - (K974927912 * tmp84); Y[-iostride] = -((K974927912 * tmp78) + (K433883739 * tmp84) + (K781831482 * tmp81)); Y[-2 * iostride] = (K433883739 * tmp78) + (K781831482 * tmp84) - (K974927912 * tmp81); X[2 * iostride] = (K623489801 * tmp88) + tmp86 - (K222520933 * tmp87) - (K900968867 * tmp85); X[iostride] = (K623489801 * tmp87) + tmp86 - (K900968867 * tmp88) - (K222520933 * tmp85); X[3 * iostride] = (K623489801 * tmp85) + tmp86 - (K900968867 * tmp87) - (K222520933 * tmp88); X[0] = tmp85 + tmp88 + tmp87 + tmp86; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 6) { fftw_real tmp14; fftw_real tmp66; fftw_real tmp25; fftw_real tmp68; fftw_real tmp51; fftw_real tmp63; fftw_real tmp36; fftw_real tmp69; fftw_real tmp57; fftw_real tmp64; fftw_real tmp47; fftw_real tmp70; fftw_real tmp54; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp14 = X[0]; tmp66 = Y[-6 * iostride]; { fftw_real tmp19; fftw_real tmp49; fftw_real tmp24; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp18; fftw_real tmp15; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp16 = X[iostride]; tmp18 = Y[-5 * iostride]; tmp15 = c_re(W[0]); tmp17 = c_im(W[0]); tmp19 = (tmp15 * tmp16) - (tmp17 * tmp18); tmp49 = (tmp17 * tmp16) + (tmp15 * tmp18); } { fftw_real tmp21; fftw_real tmp23; fftw_real tmp20; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp21 = X[6 * iostride]; tmp23 = Y[0]; tmp20 = c_re(W[5]); tmp22 = c_im(W[5]); tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23); tmp50 = (tmp22 * tmp21) + (tmp20 * tmp23); } tmp25 = tmp19 + tmp24; tmp68 = tmp24 - tmp19; tmp51 = tmp49 - tmp50; tmp63 = tmp49 + tmp50; } { fftw_real tmp30; fftw_real tmp55; fftw_real tmp35; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp27; fftw_real tmp29; fftw_real tmp26; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp27 = X[2 * iostride]; tmp29 = Y[-4 * iostride]; tmp26 = c_re(W[1]); tmp28 = c_im(W[1]); tmp30 = (tmp26 * tmp27) - (tmp28 * tmp29); tmp55 = (tmp28 * tmp27) + (tmp26 * tmp29); } { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = X[5 * iostride]; tmp34 = Y[-iostride]; tmp31 = c_re(W[4]); tmp33 = c_im(W[4]); tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34); tmp56 = (tmp33 * tmp32) + (tmp31 * tmp34); } tmp36 = tmp30 + tmp35; tmp69 = tmp35 - tmp30; tmp57 = tmp55 - tmp56; tmp64 = tmp55 + tmp56; } { fftw_real tmp41; fftw_real tmp52; fftw_real tmp46; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp38; fftw_real tmp40; fftw_real tmp37; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp38 = X[3 * iostride]; tmp40 = Y[-3 * iostride]; tmp37 = c_re(W[2]); tmp39 = c_im(W[2]); tmp41 = (tmp37 * tmp38) - (tmp39 * tmp40); tmp52 = (tmp39 * tmp38) + (tmp37 * tmp40); } { fftw_real tmp43; fftw_real tmp45; fftw_real tmp42; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp43 = X[4 * iostride]; tmp45 = Y[-2 * iostride]; tmp42 = c_re(W[3]); tmp44 = c_im(W[3]); tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); tmp53 = (tmp44 * tmp43) + (tmp42 * tmp45); } tmp47 = tmp41 + tmp46; tmp70 = tmp46 - tmp41; tmp54 = tmp52 - tmp53; tmp65 = tmp52 + tmp53; } { fftw_real tmp60; fftw_real tmp59; fftw_real tmp73; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; X[0] = tmp14 + tmp25 + tmp36 + tmp47; tmp60 = (K781831482 * tmp51) + (K974927912 * tmp57) + (K433883739 * tmp54); tmp59 = tmp14 + (K623489801 * tmp25) - (K900968867 * tmp47) - (K222520933 * tmp36); Y[-6 * iostride] = tmp59 - tmp60; X[iostride] = tmp59 + tmp60; { fftw_real tmp62; fftw_real tmp61; fftw_real tmp58; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp62 = (K433883739 * tmp51) + (K974927912 * tmp54) - (K781831482 * tmp57); tmp61 = tmp14 + (K623489801 * tmp36) - (K222520933 * tmp47) - (K900968867 * tmp25); Y[-4 * iostride] = tmp61 - tmp62; X[3 * iostride] = tmp61 + tmp62; tmp58 = (K974927912 * tmp51) - (K781831482 * tmp54) - (K433883739 * tmp57); tmp48 = tmp14 + (K623489801 * tmp47) - (K900968867 * tmp36) - (K222520933 * tmp25); Y[-5 * iostride] = tmp48 - tmp58; X[2 * iostride] = tmp48 + tmp58; } Y[0] = tmp63 + tmp64 + tmp65 + tmp66; tmp73 = (K974927912 * tmp68) - (K781831482 * tmp70) - (K433883739 * tmp69); tmp72 = (K623489801 * tmp65) + tmp66 - (K900968867 * tmp64) - (K222520933 * tmp63); X[5 * iostride] = -(tmp72 - tmp73); Y[-2 * iostride] = tmp73 + tmp72; { fftw_real tmp75; fftw_real tmp74; fftw_real tmp71; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; tmp75 = (K433883739 * tmp68) + (K974927912 * tmp70) - (K781831482 * tmp69); tmp74 = (K623489801 * tmp64) + tmp66 - (K222520933 * tmp65) - (K900968867 * tmp63); X[4 * iostride] = -(tmp74 - tmp75); Y[-3 * iostride] = tmp75 + tmp74; tmp71 = (K781831482 * tmp68) + (K974927912 * tmp69) + (K433883739 * tmp70); tmp67 = (K623489801 * tmp63) + tmp66 - (K900968867 * tmp65) - (K222520933 * tmp64); X[6 * iostride] = -(tmp67 - tmp71); Y[-iostride] = tmp71 + tmp67; } } } if (i == m) { fftw_real tmp1; fftw_real tmp10; fftw_real tmp11; fftw_real tmp4; fftw_real tmp12; fftw_real tmp7; fftw_real tmp13; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp8 = X[2 * iostride]; tmp9 = X[5 * iostride]; tmp10 = tmp8 - tmp9; tmp11 = tmp8 + tmp9; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp2 = X[3 * iostride]; tmp3 = X[4 * iostride]; tmp4 = tmp2 - tmp3; tmp12 = tmp2 + tmp3; tmp5 = X[iostride]; tmp6 = X[6 * iostride]; tmp7 = tmp5 - tmp6; tmp13 = tmp5 + tmp6; } Y[0] = -((K781831482 * tmp11) + (K974927912 * tmp12) + (K433883739 * tmp13)); Y[-iostride] = (K781831482 * tmp12) - (K974927912 * tmp13) - (K433883739 * tmp11); Y[-2 * iostride] = (K974927912 * tmp11) - (K781831482 * tmp13) - (K433883739 * tmp12); X[iostride] = tmp1 + (K222520933 * tmp7) - (K623489801 * tmp4) - (K900968867 * tmp10); X[3 * iostride] = tmp1 + tmp10 - (tmp4 + tmp7); X[2 * iostride] = tmp1 + (K900968867 * tmp4) - (K623489801 * tmp7) - (K222520933 * tmp10); X[0] = tmp1 + (K623489801 * tmp10) + (K222520933 * tmp4) + (K900968867 * tmp7); } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6 }; fftw_codelet_desc fftw_hc2hc_forward_7_desc = { "fftw_hc2hc_forward_7", (void (*)()) fftw_hc2hc_forward_7, 7, FFTW_FORWARD, FFTW_HC2HC, 157, 6, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_8.c����������������������������������������������������������������������������0000644�0001754�0000144�00000026561�07637527325�010466� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:02 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 8 */ /* * This function contains 108 FP additions, 44 FP multiplications, * (or, 90 additions, 26 multiplications, 18 fused multiply/add), * 29 stack variables, and 64 memory accesses */ static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_8(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (8 * iostride); { fftw_real tmp105; fftw_real tmp109; fftw_real tmp115; fftw_real tmp121; fftw_real tmp108; fftw_real tmp118; fftw_real tmp112; fftw_real tmp120; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp103; fftw_real tmp104; fftw_real tmp113; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; tmp103 = X[0]; tmp104 = X[4 * iostride]; tmp105 = tmp103 + tmp104; tmp109 = tmp103 - tmp104; tmp113 = X[7 * iostride]; tmp114 = X[3 * iostride]; tmp115 = tmp113 - tmp114; tmp121 = tmp113 + tmp114; } { fftw_real tmp106; fftw_real tmp107; fftw_real tmp110; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp106 = X[2 * iostride]; tmp107 = X[6 * iostride]; tmp108 = tmp106 + tmp107; tmp118 = tmp106 - tmp107; tmp110 = X[iostride]; tmp111 = X[5 * iostride]; tmp112 = tmp110 - tmp111; tmp120 = tmp110 + tmp111; } { fftw_real tmp119; fftw_real tmp122; fftw_real tmp116; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; X[2 * iostride] = tmp105 - tmp108; tmp119 = tmp105 + tmp108; tmp122 = tmp120 + tmp121; X[4 * iostride] = tmp119 - tmp122; X[0] = tmp119 + tmp122; Y[-2 * iostride] = tmp121 - tmp120; tmp116 = K707106781 * (tmp112 + tmp115); X[3 * iostride] = tmp109 - tmp116; X[iostride] = tmp109 + tmp116; tmp117 = K707106781 * (tmp115 - tmp112); Y[-iostride] = tmp117 - tmp118; Y[-3 * iostride] = tmp118 + tmp117; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 7) { fftw_real tmp29; fftw_real tmp65; fftw_real tmp92; fftw_real tmp97; fftw_real tmp63; fftw_real tmp75; fftw_real tmp78; fftw_real tmp87; fftw_real tmp40; fftw_real tmp98; fftw_real tmp68; fftw_real tmp89; fftw_real tmp52; fftw_real tmp70; fftw_real tmp73; fftw_real tmp86; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp91; fftw_real tmp28; fftw_real tmp90; ASSERT_ALIGNED_DOUBLE; tmp23 = X[0]; tmp91 = Y[-7 * iostride]; { fftw_real tmp25; fftw_real tmp27; fftw_real tmp24; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp25 = X[4 * iostride]; tmp27 = Y[-3 * iostride]; tmp24 = c_re(W[3]); tmp26 = c_im(W[3]); tmp28 = (tmp24 * tmp25) - (tmp26 * tmp27); tmp90 = (tmp26 * tmp25) + (tmp24 * tmp27); } tmp29 = tmp23 + tmp28; tmp65 = tmp23 - tmp28; tmp92 = tmp90 + tmp91; tmp97 = tmp91 - tmp90; } { fftw_real tmp57; fftw_real tmp76; fftw_real tmp62; fftw_real tmp77; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp54; fftw_real tmp56; fftw_real tmp53; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; tmp54 = X[7 * iostride]; tmp56 = Y[0]; tmp53 = c_re(W[6]); tmp55 = c_im(W[6]); tmp57 = (tmp53 * tmp54) - (tmp55 * tmp56); tmp76 = (tmp55 * tmp54) + (tmp53 * tmp56); } { fftw_real tmp59; fftw_real tmp61; fftw_real tmp58; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp59 = X[3 * iostride]; tmp61 = Y[-4 * iostride]; tmp58 = c_re(W[2]); tmp60 = c_im(W[2]); tmp62 = (tmp58 * tmp59) - (tmp60 * tmp61); tmp77 = (tmp60 * tmp59) + (tmp58 * tmp61); } tmp63 = tmp57 + tmp62; tmp75 = tmp57 - tmp62; tmp78 = tmp76 - tmp77; tmp87 = tmp76 + tmp77; } { fftw_real tmp34; fftw_real tmp66; fftw_real tmp39; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp31; fftw_real tmp33; fftw_real tmp30; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp31 = X[2 * iostride]; tmp33 = Y[-5 * iostride]; tmp30 = c_re(W[1]); tmp32 = c_im(W[1]); tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); tmp66 = (tmp32 * tmp31) + (tmp30 * tmp33); } { fftw_real tmp36; fftw_real tmp38; fftw_real tmp35; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; tmp36 = X[6 * iostride]; tmp38 = Y[-iostride]; tmp35 = c_re(W[5]); tmp37 = c_im(W[5]); tmp39 = (tmp35 * tmp36) - (tmp37 * tmp38); tmp67 = (tmp37 * tmp36) + (tmp35 * tmp38); } tmp40 = tmp34 + tmp39; tmp98 = tmp34 - tmp39; tmp68 = tmp66 - tmp67; tmp89 = tmp66 + tmp67; } { fftw_real tmp46; fftw_real tmp71; fftw_real tmp51; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp43; fftw_real tmp45; fftw_real tmp42; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp43 = X[iostride]; tmp45 = Y[-6 * iostride]; tmp42 = c_re(W[0]); tmp44 = c_im(W[0]); tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); tmp71 = (tmp44 * tmp43) + (tmp42 * tmp45); } { fftw_real tmp48; fftw_real tmp50; fftw_real tmp47; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp48 = X[5 * iostride]; tmp50 = Y[-2 * iostride]; tmp47 = c_re(W[4]); tmp49 = c_im(W[4]); tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); tmp72 = (tmp49 * tmp48) + (tmp47 * tmp50); } tmp52 = tmp46 + tmp51; tmp70 = tmp46 - tmp51; tmp73 = tmp71 - tmp72; tmp86 = tmp71 + tmp72; } { fftw_real tmp41; fftw_real tmp64; fftw_real tmp85; fftw_real tmp88; ASSERT_ALIGNED_DOUBLE; tmp41 = tmp29 + tmp40; tmp64 = tmp52 + tmp63; Y[-4 * iostride] = tmp41 - tmp64; X[0] = tmp41 + tmp64; { fftw_real tmp95; fftw_real tmp96; fftw_real tmp93; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; tmp95 = tmp92 - tmp89; tmp96 = tmp63 - tmp52; X[6 * iostride] = -(tmp95 - tmp96); Y[-2 * iostride] = tmp96 + tmp95; tmp93 = tmp89 + tmp92; tmp94 = tmp86 + tmp87; X[4 * iostride] = -(tmp93 - tmp94); Y[0] = tmp94 + tmp93; } tmp85 = tmp29 - tmp40; tmp88 = tmp86 - tmp87; Y[-6 * iostride] = tmp85 - tmp88; X[2 * iostride] = tmp85 + tmp88; { fftw_real tmp81; fftw_real tmp99; fftw_real tmp84; fftw_real tmp100; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp81 = tmp65 - tmp68; tmp99 = tmp97 - tmp98; tmp82 = tmp73 - tmp70; tmp83 = tmp75 + tmp78; tmp84 = K707106781 * (tmp82 - tmp83); tmp100 = K707106781 * (tmp82 + tmp83); Y[-7 * iostride] = tmp81 - tmp84; X[3 * iostride] = tmp81 + tmp84; X[5 * iostride] = -(tmp99 - tmp100); Y[-iostride] = tmp100 + tmp99; } { fftw_real tmp69; fftw_real tmp101; fftw_real tmp80; fftw_real tmp102; fftw_real tmp74; fftw_real tmp79; ASSERT_ALIGNED_DOUBLE; tmp69 = tmp65 + tmp68; tmp101 = tmp98 + tmp97; tmp74 = tmp70 + tmp73; tmp79 = tmp75 - tmp78; tmp80 = K707106781 * (tmp74 + tmp79); tmp102 = K707106781 * (tmp79 - tmp74); Y[-5 * iostride] = tmp69 - tmp80; X[iostride] = tmp69 + tmp80; X[7 * iostride] = -(tmp101 - tmp102); Y[-3 * iostride] = tmp102 + tmp101; } } } if (i == m) { fftw_real tmp1; fftw_real tmp19; fftw_real tmp4; fftw_real tmp18; fftw_real tmp8; fftw_real tmp14; fftw_real tmp11; fftw_real tmp15; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp19 = X[4 * iostride]; tmp2 = X[2 * iostride]; tmp3 = X[6 * iostride]; tmp4 = K707106781 * (tmp2 - tmp3); tmp18 = K707106781 * (tmp2 + tmp3); { fftw_real tmp6; fftw_real tmp7; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp6 = X[iostride]; tmp7 = X[5 * iostride]; tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); tmp14 = (K382683432 * tmp6) + (K923879532 * tmp7); tmp9 = X[3 * iostride]; tmp10 = X[7 * iostride]; tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); tmp15 = (K923879532 * tmp9) + (K382683432 * tmp10); } { fftw_real tmp5; fftw_real tmp12; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp5 = tmp1 + tmp4; tmp12 = tmp8 + tmp11; X[3 * iostride] = tmp5 - tmp12; X[0] = tmp5 + tmp12; tmp21 = tmp11 - tmp8; tmp22 = tmp19 - tmp18; Y[-2 * iostride] = tmp21 - tmp22; Y[-iostride] = tmp21 + tmp22; } { fftw_real tmp17; fftw_real tmp20; fftw_real tmp13; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp17 = tmp14 + tmp15; tmp20 = tmp18 + tmp19; Y[0] = -(tmp17 + tmp20); Y[-3 * iostride] = tmp20 - tmp17; tmp13 = tmp1 - tmp4; tmp16 = tmp14 - tmp15; X[2 * iostride] = tmp13 - tmp16; X[iostride] = tmp13 + tmp16; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7 }; fftw_codelet_desc fftw_hc2hc_forward_8_desc = { "fftw_hc2hc_forward_8", (void (*)()) fftw_hc2hc_forward_8, 8, FFTW_FORWARD, FFTW_HC2HC, 179, 7, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_9.c����������������������������������������������������������������������������0000644�0001754�0000144�00000042707�07637527335�010470� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:05 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 9 */ /* * This function contains 188 FP additions, 136 FP multiplications, * (or, 139 additions, 87 multiplications, 49 fused multiply/add), * 35 stack variables, and 72 memory accesses */ static const fftw_real K433012701 = FFTW_KONST(+0.433012701892219323381861585376468091735701313); static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K1_285575219 = FFTW_KONST(+1.285575219373078652645286819814526865815119768); static const fftw_real K684040286 = FFTW_KONST(+0.684040286651337466088199229364519161526166735); static const fftw_real K1_969615506 = FFTW_KONST(+1.969615506024416118733486049179046027341286503); static const fftw_real K1_532088886 = FFTW_KONST(+1.532088886237956070404785301110833347871664914); static const fftw_real K1_879385241 = FFTW_KONST(+1.879385241571816768108218554649462939872416269); static const fftw_real K347296355 = FFTW_KONST(+0.347296355333860697703433253538629592000751354); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_9(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (9 * iostride); { fftw_real tmp136; fftw_real tmp150; fftw_real tmp155; fftw_real tmp154; fftw_real tmp139; fftw_real tmp162; fftw_real tmp145; fftw_real tmp153; fftw_real tmp156; fftw_real tmp137; fftw_real tmp138; fftw_real tmp140; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp136 = X[0]; { fftw_real tmp146; fftw_real tmp147; fftw_real tmp148; fftw_real tmp149; ASSERT_ALIGNED_DOUBLE; tmp146 = X[2 * iostride]; tmp147 = X[5 * iostride]; tmp148 = X[8 * iostride]; tmp149 = tmp147 + tmp148; tmp150 = tmp146 + tmp149; tmp155 = tmp146 - (K500000000 * tmp149); tmp154 = tmp148 - tmp147; } tmp137 = X[3 * iostride]; tmp138 = X[6 * iostride]; tmp139 = tmp137 + tmp138; tmp162 = tmp138 - tmp137; { fftw_real tmp141; fftw_real tmp142; fftw_real tmp143; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp141 = X[iostride]; tmp142 = X[4 * iostride]; tmp143 = X[7 * iostride]; tmp144 = tmp142 + tmp143; tmp145 = tmp141 + tmp144; tmp153 = tmp141 - (K500000000 * tmp144); tmp156 = tmp143 - tmp142; } Y[-3 * iostride] = K866025403 * (tmp150 - tmp145); tmp140 = tmp136 + tmp139; tmp151 = tmp145 + tmp150; X[3 * iostride] = tmp140 - (K500000000 * tmp151); X[0] = tmp140 + tmp151; { fftw_real tmp164; fftw_real tmp160; fftw_real tmp161; fftw_real tmp163; fftw_real tmp152; fftw_real tmp157; fftw_real tmp158; fftw_real tmp159; ASSERT_ALIGNED_DOUBLE; tmp164 = K866025403 * tmp162; tmp160 = (K663413948 * tmp156) - (K642787609 * tmp153); tmp161 = (K150383733 * tmp154) - (K984807753 * tmp155); tmp163 = tmp160 + tmp161; tmp152 = tmp136 - (K500000000 * tmp139); tmp157 = (K766044443 * tmp153) + (K556670399 * tmp156); tmp158 = (K173648177 * tmp155) + (K852868531 * tmp154); tmp159 = tmp157 + tmp158; X[iostride] = tmp152 + tmp159; X[4 * iostride] = tmp152 + (K866025403 * (tmp160 - tmp161)) - (K500000000 * tmp159); X[2 * iostride] = tmp152 + (K173648177 * tmp153) - (K296198132 * tmp154) - (K939692620 * tmp155) - (K852868531 * tmp156); Y[-iostride] = tmp164 + tmp163; Y[-4 * iostride] = (K866025403 * (tmp162 + (tmp158 - tmp157))) - (K500000000 * tmp163); Y[-2 * iostride] = (K813797681 * tmp154) - (K342020143 * tmp155) - (K150383733 * tmp156) - (K984807753 * tmp153) - tmp164; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 8) { fftw_real tmp24; fftw_real tmp122; fftw_real tmp75; fftw_real tmp121; fftw_real tmp128; fftw_real tmp127; fftw_real tmp35; fftw_real tmp72; fftw_real tmp70; fftw_real tmp92; fftw_real tmp109; fftw_real tmp118; fftw_real tmp97; fftw_real tmp108; fftw_real tmp53; fftw_real tmp81; fftw_real tmp105; fftw_real tmp117; fftw_real tmp86; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp29; fftw_real tmp73; fftw_real tmp34; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp24 = X[0]; tmp122 = Y[-8 * iostride]; { fftw_real tmp26; fftw_real tmp28; fftw_real tmp25; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = X[3 * iostride]; tmp28 = Y[-5 * iostride]; tmp25 = c_re(W[2]); tmp27 = c_im(W[2]); tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28); tmp73 = (tmp27 * tmp26) + (tmp25 * tmp28); } { fftw_real tmp31; fftw_real tmp33; fftw_real tmp30; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp31 = X[6 * iostride]; tmp33 = Y[-2 * iostride]; tmp30 = c_re(W[5]); tmp32 = c_im(W[5]); tmp34 = (tmp30 * tmp31) - (tmp32 * tmp33); tmp74 = (tmp32 * tmp31) + (tmp30 * tmp33); } tmp75 = K866025403 * (tmp73 - tmp74); tmp121 = tmp73 + tmp74; tmp128 = tmp122 - (K500000000 * tmp121); tmp127 = K866025403 * (tmp34 - tmp29); tmp35 = tmp29 + tmp34; tmp72 = tmp24 - (K500000000 * tmp35); } { fftw_real tmp58; fftw_real tmp94; fftw_real tmp63; fftw_real tmp89; fftw_real tmp68; fftw_real tmp90; fftw_real tmp69; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp55; fftw_real tmp57; fftw_real tmp54; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp55 = X[2 * iostride]; tmp57 = Y[-6 * iostride]; tmp54 = c_re(W[1]); tmp56 = c_im(W[1]); tmp58 = (tmp54 * tmp55) - (tmp56 * tmp57); tmp94 = (tmp56 * tmp55) + (tmp54 * tmp57); } { fftw_real tmp60; fftw_real tmp62; fftw_real tmp59; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; tmp60 = X[5 * iostride]; tmp62 = Y[-3 * iostride]; tmp59 = c_re(W[4]); tmp61 = c_im(W[4]); tmp63 = (tmp59 * tmp60) - (tmp61 * tmp62); tmp89 = (tmp61 * tmp60) + (tmp59 * tmp62); } { fftw_real tmp65; fftw_real tmp67; fftw_real tmp64; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp65 = X[8 * iostride]; tmp67 = Y[0]; tmp64 = c_re(W[7]); tmp66 = c_im(W[7]); tmp68 = (tmp64 * tmp65) - (tmp66 * tmp67); tmp90 = (tmp66 * tmp65) + (tmp64 * tmp67); } tmp69 = tmp63 + tmp68; tmp95 = tmp89 + tmp90; { fftw_real tmp88; fftw_real tmp91; fftw_real tmp93; fftw_real tmp96; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp58 + tmp69; tmp88 = tmp58 - (K500000000 * tmp69); tmp91 = K866025403 * (tmp89 - tmp90); tmp92 = tmp88 + tmp91; tmp109 = tmp88 - tmp91; tmp118 = tmp94 + tmp95; tmp93 = K866025403 * (tmp68 - tmp63); tmp96 = tmp94 - (K500000000 * tmp95); tmp97 = tmp93 + tmp96; tmp108 = tmp96 - tmp93; } } { fftw_real tmp41; fftw_real tmp83; fftw_real tmp46; fftw_real tmp78; fftw_real tmp51; fftw_real tmp79; fftw_real tmp52; fftw_real tmp84; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp38; fftw_real tmp40; fftw_real tmp37; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp38 = X[iostride]; tmp40 = Y[-7 * iostride]; tmp37 = c_re(W[0]); tmp39 = c_im(W[0]); tmp41 = (tmp37 * tmp38) - (tmp39 * tmp40); tmp83 = (tmp39 * tmp38) + (tmp37 * tmp40); } { fftw_real tmp43; fftw_real tmp45; fftw_real tmp42; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp43 = X[4 * iostride]; tmp45 = Y[-4 * iostride]; tmp42 = c_re(W[3]); tmp44 = c_im(W[3]); tmp46 = (tmp42 * tmp43) - (tmp44 * tmp45); tmp78 = (tmp44 * tmp43) + (tmp42 * tmp45); } { fftw_real tmp48; fftw_real tmp50; fftw_real tmp47; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp48 = X[7 * iostride]; tmp50 = Y[-iostride]; tmp47 = c_re(W[6]); tmp49 = c_im(W[6]); tmp51 = (tmp47 * tmp48) - (tmp49 * tmp50); tmp79 = (tmp49 * tmp48) + (tmp47 * tmp50); } tmp52 = tmp46 + tmp51; tmp84 = tmp78 + tmp79; { fftw_real tmp77; fftw_real tmp80; fftw_real tmp82; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp41 + tmp52; tmp77 = tmp41 - (K500000000 * tmp52); tmp80 = K866025403 * (tmp78 - tmp79); tmp81 = tmp77 + tmp80; tmp105 = tmp77 - tmp80; tmp117 = tmp83 + tmp84; tmp82 = K866025403 * (tmp51 - tmp46); tmp85 = tmp83 - (K500000000 * tmp84); tmp86 = tmp82 + tmp85; tmp106 = tmp85 - tmp82; } } { fftw_real tmp119; fftw_real tmp36; fftw_real tmp71; fftw_real tmp116; ASSERT_ALIGNED_DOUBLE; tmp119 = K866025403 * (tmp117 - tmp118); tmp36 = tmp24 + tmp35; tmp71 = tmp53 + tmp70; tmp116 = tmp36 - (K500000000 * tmp71); X[0] = tmp36 + tmp71; X[3 * iostride] = tmp116 + tmp119; Y[-6 * iostride] = tmp116 - tmp119; } { fftw_real tmp125; fftw_real tmp120; fftw_real tmp123; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; tmp125 = K866025403 * (tmp70 - tmp53); tmp120 = tmp117 + tmp118; tmp123 = tmp121 + tmp122; tmp124 = tmp123 - (K500000000 * tmp120); Y[0] = tmp120 + tmp123; Y[-3 * iostride] = tmp125 + tmp124; X[6 * iostride] = -(tmp124 - tmp125); } { fftw_real tmp76; fftw_real tmp129; fftw_real tmp99; fftw_real tmp131; fftw_real tmp103; fftw_real tmp126; fftw_real tmp100; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; tmp76 = tmp72 + tmp75; tmp129 = tmp127 + tmp128; { fftw_real tmp87; fftw_real tmp98; fftw_real tmp101; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp87 = (K766044443 * tmp81) + (K642787609 * tmp86); tmp98 = (K173648177 * tmp92) + (K984807753 * tmp97); tmp99 = tmp87 + tmp98; tmp131 = K866025403 * (tmp98 - tmp87); tmp101 = (K766044443 * tmp86) - (K642787609 * tmp81); tmp102 = (K173648177 * tmp97) - (K984807753 * tmp92); tmp103 = K866025403 * (tmp101 - tmp102); tmp126 = tmp101 + tmp102; } X[iostride] = tmp76 + tmp99; tmp100 = tmp76 - (K500000000 * tmp99); Y[-7 * iostride] = tmp100 - tmp103; X[4 * iostride] = tmp100 + tmp103; Y[-iostride] = tmp126 + tmp129; tmp130 = tmp129 - (K500000000 * tmp126); X[7 * iostride] = -(tmp130 - tmp131); Y[-4 * iostride] = tmp131 + tmp130; } { fftw_real tmp104; fftw_real tmp133; fftw_real tmp111; fftw_real tmp132; fftw_real tmp115; fftw_real tmp134; fftw_real tmp112; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp104 = tmp72 - tmp75; tmp133 = tmp128 - tmp127; { fftw_real tmp107; fftw_real tmp110; fftw_real tmp113; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; tmp107 = (K173648177 * tmp105) + (K984807753 * tmp106); tmp110 = (K342020143 * tmp108) - (K939692620 * tmp109); tmp111 = tmp107 + tmp110; tmp132 = K866025403 * (tmp110 - tmp107); tmp113 = (K173648177 * tmp106) - (K984807753 * tmp105); tmp114 = (K342020143 * tmp109) + (K939692620 * tmp108); tmp115 = K866025403 * (tmp113 + tmp114); tmp134 = tmp113 - tmp114; } X[2 * iostride] = tmp104 + tmp111; tmp112 = tmp104 - (K500000000 * tmp111); Y[-8 * iostride] = tmp112 - tmp115; Y[-5 * iostride] = tmp112 + tmp115; Y[-2 * iostride] = tmp134 + tmp133; tmp135 = tmp133 - (K500000000 * tmp134); X[5 * iostride] = -(tmp132 + tmp135); X[8 * iostride] = -(tmp135 - tmp132); } } if (i == m) { fftw_real tmp17; fftw_real tmp19; fftw_real tmp4; fftw_real tmp9; fftw_real tmp11; fftw_real tmp10; fftw_real tmp12; fftw_real tmp23; fftw_real tmp15; fftw_real tmp21; fftw_real tmp5; fftw_real tmp7; fftw_real tmp6; fftw_real tmp8; fftw_real tmp22; fftw_real tmp14; fftw_real tmp18; fftw_real tmp20; fftw_real tmp1; fftw_real tmp3; fftw_real tmp2; fftw_real tmp16; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp3 = X[3 * iostride]; tmp2 = X[6 * iostride]; tmp17 = K866025403 * (tmp2 + tmp3); tmp19 = tmp1 + tmp2 - tmp3; tmp4 = tmp1 - (K500000000 * (tmp2 - tmp3)); tmp9 = X[4 * iostride]; tmp11 = X[7 * iostride]; tmp10 = X[iostride]; tmp12 = (K347296355 * tmp9) + (K1_879385241 * tmp10) - (K1_532088886 * tmp11); tmp23 = (K1_879385241 * tmp9) + (K1_532088886 * tmp10) + (K347296355 * tmp11); tmp15 = (K1_969615506 * tmp9) + (K684040286 * tmp10) + (K1_285575219 * tmp11); tmp21 = (K1_285575219 * tmp10) - (K1_969615506 * tmp11) - (K684040286 * tmp9); tmp5 = X[2 * iostride]; tmp7 = X[8 * iostride]; tmp6 = X[5 * iostride]; tmp8 = (K1_532088886 * tmp5) - (K347296355 * tmp6) - (K1_879385241 * tmp7); tmp22 = (K347296355 * tmp5) + (K1_532088886 * tmp7) + (K1_879385241 * tmp6); tmp14 = (K1_285575219 * tmp5) + (K684040286 * tmp7) + (K1_969615506 * tmp6); tmp18 = tmp6 - (tmp5 + tmp7); tmp20 = (K1_285575219 * tmp7) - (K684040286 * tmp6) - (K1_969615506 * tmp5); Y[-iostride] = K866025403 * (tmp9 + tmp18 - (tmp10 + tmp11)); X[iostride] = tmp19 + (K500000000 * (tmp18 + tmp10 + tmp11 - tmp9)); X[4 * iostride] = tmp19 + tmp5 + tmp7 + tmp9 - (tmp6 + tmp10 + tmp11); X[2 * iostride] = tmp4 + (K250000000 * (tmp23 - tmp22)) + (K433012701 * (tmp20 - tmp21)); Y[-2 * iostride] = tmp17 - (K250000000 * (tmp20 + tmp21)) - (K433012701 * (tmp22 + tmp23)); tmp16 = tmp14 + tmp15; Y[0] = -(tmp17 + (K500000000 * tmp16)); Y[-3 * iostride] = (K250000000 * tmp16) - (K433012701 * (tmp12 - tmp8)) - tmp17; tmp13 = tmp8 + tmp12; X[0] = tmp4 + (K500000000 * tmp13); X[3 * iostride] = tmp4 + (K433012701 * (tmp14 - tmp15)) - (K250000000 * tmp13); } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; fftw_codelet_desc fftw_hc2hc_forward_9_desc = { "fftw_hc2hc_forward_9", (void (*)()) fftw_hc2hc_forward_9, 9, FFTW_FORWARD, FFTW_HC2HC, 201, 8, twiddle_order, }; ���������������������������������������������������������fftw-2.1.5/rfftw/fhf_10.c���������������������������������������������������������������������������0000644�0001754�0000144�00000040234�07637527333�010527� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:07 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 10 */ /* * This function contains 168 FP additions, 84 FP multiplications, * (or, 126 additions, 42 multiplications, 42 fused multiply/add), * 43 stack variables, and 80 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_10(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (10 * iostride); { fftw_real tmp178; fftw_real tmp181; fftw_real tmp162; fftw_real tmp167; fftw_real tmp165; fftw_real tmp168; fftw_real tmp174; fftw_real tmp183; fftw_real tmp155; fftw_real tmp170; fftw_real tmp158; fftw_real tmp171; fftw_real tmp173; fftw_real tmp182; fftw_real tmp176; fftw_real tmp177; ASSERT_ALIGNED_DOUBLE; tmp176 = X[0]; tmp177 = X[5 * iostride]; tmp178 = tmp176 - tmp177; tmp181 = tmp176 + tmp177; { fftw_real tmp160; fftw_real tmp161; fftw_real tmp163; fftw_real tmp164; ASSERT_ALIGNED_DOUBLE; tmp160 = X[4 * iostride]; tmp161 = X[9 * iostride]; tmp162 = tmp160 - tmp161; tmp167 = tmp160 + tmp161; tmp163 = X[6 * iostride]; tmp164 = X[iostride]; tmp165 = tmp163 - tmp164; tmp168 = tmp163 + tmp164; } tmp174 = tmp162 + tmp165; tmp183 = tmp167 + tmp168; { fftw_real tmp153; fftw_real tmp154; fftw_real tmp156; fftw_real tmp157; ASSERT_ALIGNED_DOUBLE; tmp153 = X[2 * iostride]; tmp154 = X[7 * iostride]; tmp155 = tmp153 - tmp154; tmp170 = tmp153 + tmp154; tmp156 = X[8 * iostride]; tmp157 = X[3 * iostride]; tmp158 = tmp156 - tmp157; tmp171 = tmp156 + tmp157; } tmp173 = tmp155 + tmp158; tmp182 = tmp170 + tmp171; { fftw_real tmp159; fftw_real tmp166; fftw_real tmp186; fftw_real tmp184; fftw_real tmp185; ASSERT_ALIGNED_DOUBLE; tmp159 = tmp155 - tmp158; tmp166 = tmp162 - tmp165; Y[-iostride] = -((K951056516 * tmp159) + (K587785252 * tmp166)); Y[-3 * iostride] = (K587785252 * tmp159) - (K951056516 * tmp166); tmp186 = K559016994 * (tmp182 - tmp183); tmp184 = tmp182 + tmp183; tmp185 = tmp181 - (K250000000 * tmp184); X[2 * iostride] = tmp185 - tmp186; X[4 * iostride] = tmp186 + tmp185; X[0] = tmp184 + tmp181; } { fftw_real tmp169; fftw_real tmp172; fftw_real tmp175; fftw_real tmp179; fftw_real tmp180; ASSERT_ALIGNED_DOUBLE; tmp169 = tmp167 - tmp168; tmp172 = tmp170 - tmp171; Y[-2 * iostride] = (K951056516 * tmp169) - (K587785252 * tmp172); Y[-4 * iostride] = (K951056516 * tmp172) + (K587785252 * tmp169); tmp175 = K559016994 * (tmp173 - tmp174); tmp179 = tmp173 + tmp174; tmp180 = tmp178 - (K250000000 * tmp179); X[iostride] = tmp175 + tmp180; X[3 * iostride] = tmp180 - tmp175; X[5 * iostride] = tmp179 + tmp178; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 9) { fftw_real tmp39; fftw_real tmp87; fftw_real tmp132; fftw_real tmp144; fftw_real tmp73; fftw_real tmp84; fftw_real tmp85; fftw_real tmp91; fftw_real tmp92; fftw_real tmp93; fftw_real tmp100; fftw_real tmp103; fftw_real tmp128; fftw_real tmp121; fftw_real tmp122; fftw_real tmp142; fftw_real tmp50; fftw_real tmp61; fftw_real tmp62; fftw_real tmp88; fftw_real tmp89; fftw_real tmp90; fftw_real tmp107; fftw_real tmp110; fftw_real tmp127; fftw_real tmp118; fftw_real tmp119; fftw_real tmp141; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp33; fftw_real tmp131; fftw_real tmp38; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; tmp33 = X[0]; tmp131 = Y[-9 * iostride]; { fftw_real tmp35; fftw_real tmp37; fftw_real tmp34; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp35 = X[5 * iostride]; tmp37 = Y[-4 * iostride]; tmp34 = c_re(W[4]); tmp36 = c_im(W[4]); tmp38 = (tmp34 * tmp35) - (tmp36 * tmp37); tmp130 = (tmp36 * tmp35) + (tmp34 * tmp37); } tmp39 = tmp33 - tmp38; tmp87 = tmp33 + tmp38; tmp132 = tmp130 + tmp131; tmp144 = tmp131 - tmp130; } { fftw_real tmp67; fftw_real tmp98; fftw_real tmp83; fftw_real tmp102; fftw_real tmp72; fftw_real tmp99; fftw_real tmp78; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp64; fftw_real tmp66; fftw_real tmp63; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp64 = X[4 * iostride]; tmp66 = Y[-5 * iostride]; tmp63 = c_re(W[3]); tmp65 = c_im(W[3]); tmp67 = (tmp63 * tmp64) - (tmp65 * tmp66); tmp98 = (tmp65 * tmp64) + (tmp63 * tmp66); } { fftw_real tmp80; fftw_real tmp82; fftw_real tmp79; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp80 = X[iostride]; tmp82 = Y[-8 * iostride]; tmp79 = c_re(W[0]); tmp81 = c_im(W[0]); tmp83 = (tmp79 * tmp80) - (tmp81 * tmp82); tmp102 = (tmp81 * tmp80) + (tmp79 * tmp82); } { fftw_real tmp69; fftw_real tmp71; fftw_real tmp68; fftw_real tmp70; ASSERT_ALIGNED_DOUBLE; tmp69 = X[9 * iostride]; tmp71 = Y[0]; tmp68 = c_re(W[8]); tmp70 = c_im(W[8]); tmp72 = (tmp68 * tmp69) - (tmp70 * tmp71); tmp99 = (tmp70 * tmp69) + (tmp68 * tmp71); } { fftw_real tmp75; fftw_real tmp77; fftw_real tmp74; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp75 = X[6 * iostride]; tmp77 = Y[-3 * iostride]; tmp74 = c_re(W[5]); tmp76 = c_im(W[5]); tmp78 = (tmp74 * tmp75) - (tmp76 * tmp77); tmp101 = (tmp76 * tmp75) + (tmp74 * tmp77); } tmp73 = tmp67 - tmp72; tmp84 = tmp78 - tmp83; tmp85 = tmp73 + tmp84; tmp91 = tmp67 + tmp72; tmp92 = tmp78 + tmp83; tmp93 = tmp91 + tmp92; tmp100 = tmp98 + tmp99; tmp103 = tmp101 + tmp102; tmp128 = tmp100 + tmp103; tmp121 = tmp98 - tmp99; tmp122 = tmp101 - tmp102; tmp142 = tmp121 + tmp122; } { fftw_real tmp44; fftw_real tmp105; fftw_real tmp60; fftw_real tmp109; fftw_real tmp49; fftw_real tmp106; fftw_real tmp55; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp41; fftw_real tmp43; fftw_real tmp40; fftw_real tmp42; ASSERT_ALIGNED_DOUBLE; tmp41 = X[2 * iostride]; tmp43 = Y[-7 * iostride]; tmp40 = c_re(W[1]); tmp42 = c_im(W[1]); tmp44 = (tmp40 * tmp41) - (tmp42 * tmp43); tmp105 = (tmp42 * tmp41) + (tmp40 * tmp43); } { fftw_real tmp57; fftw_real tmp59; fftw_real tmp56; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp57 = X[3 * iostride]; tmp59 = Y[-6 * iostride]; tmp56 = c_re(W[2]); tmp58 = c_im(W[2]); tmp60 = (tmp56 * tmp57) - (tmp58 * tmp59); tmp109 = (tmp58 * tmp57) + (tmp56 * tmp59); } { fftw_real tmp46; fftw_real tmp48; fftw_real tmp45; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp46 = X[7 * iostride]; tmp48 = Y[-2 * iostride]; tmp45 = c_re(W[6]); tmp47 = c_im(W[6]); tmp49 = (tmp45 * tmp46) - (tmp47 * tmp48); tmp106 = (tmp47 * tmp46) + (tmp45 * tmp48); } { fftw_real tmp52; fftw_real tmp54; fftw_real tmp51; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; tmp52 = X[8 * iostride]; tmp54 = Y[-iostride]; tmp51 = c_re(W[7]); tmp53 = c_im(W[7]); tmp55 = (tmp51 * tmp52) - (tmp53 * tmp54); tmp108 = (tmp53 * tmp52) + (tmp51 * tmp54); } tmp50 = tmp44 - tmp49; tmp61 = tmp55 - tmp60; tmp62 = tmp50 + tmp61; tmp88 = tmp44 + tmp49; tmp89 = tmp55 + tmp60; tmp90 = tmp88 + tmp89; tmp107 = tmp105 + tmp106; tmp110 = tmp108 + tmp109; tmp127 = tmp107 + tmp110; tmp118 = tmp105 - tmp106; tmp119 = tmp108 - tmp109; tmp141 = tmp118 + tmp119; } { fftw_real tmp115; fftw_real tmp86; fftw_real tmp116; fftw_real tmp124; fftw_real tmp126; fftw_real tmp120; fftw_real tmp123; fftw_real tmp125; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp115 = K559016994 * (tmp62 - tmp85); tmp86 = tmp62 + tmp85; tmp116 = tmp39 - (K250000000 * tmp86); tmp120 = tmp118 - tmp119; tmp123 = tmp121 - tmp122; tmp124 = (K951056516 * tmp120) + (K587785252 * tmp123); tmp126 = (K951056516 * tmp123) - (K587785252 * tmp120); Y[-5 * iostride] = tmp39 + tmp86; tmp125 = tmp116 - tmp115; Y[-7 * iostride] = tmp125 - tmp126; X[3 * iostride] = tmp125 + tmp126; tmp117 = tmp115 + tmp116; Y[-9 * iostride] = tmp117 - tmp124; X[iostride] = tmp117 + tmp124; } { fftw_real tmp148; fftw_real tmp143; fftw_real tmp149; fftw_real tmp147; fftw_real tmp151; fftw_real tmp145; fftw_real tmp146; fftw_real tmp152; fftw_real tmp150; ASSERT_ALIGNED_DOUBLE; tmp148 = K559016994 * (tmp141 - tmp142); tmp143 = tmp141 + tmp142; tmp149 = tmp144 - (K250000000 * tmp143); tmp145 = tmp50 - tmp61; tmp146 = tmp73 - tmp84; tmp147 = (K951056516 * tmp145) + (K587785252 * tmp146); tmp151 = (K587785252 * tmp145) - (K951056516 * tmp146); X[5 * iostride] = -(tmp143 + tmp144); tmp152 = tmp149 - tmp148; X[7 * iostride] = tmp151 - tmp152; Y[-3 * iostride] = tmp151 + tmp152; tmp150 = tmp148 + tmp149; X[9 * iostride] = -(tmp147 + tmp150); Y[-iostride] = tmp150 - tmp147; } { fftw_real tmp96; fftw_real tmp94; fftw_real tmp95; fftw_real tmp112; fftw_real tmp114; fftw_real tmp104; fftw_real tmp111; fftw_real tmp113; fftw_real tmp97; ASSERT_ALIGNED_DOUBLE; tmp96 = K559016994 * (tmp90 - tmp93); tmp94 = tmp90 + tmp93; tmp95 = tmp87 - (K250000000 * tmp94); tmp104 = tmp100 - tmp103; tmp111 = tmp107 - tmp110; tmp112 = (K951056516 * tmp104) - (K587785252 * tmp111); tmp114 = (K951056516 * tmp111) + (K587785252 * tmp104); X[0] = tmp87 + tmp94; tmp113 = tmp96 + tmp95; X[4 * iostride] = tmp113 - tmp114; Y[-6 * iostride] = tmp113 + tmp114; tmp97 = tmp95 - tmp96; X[2 * iostride] = tmp97 - tmp112; Y[-8 * iostride] = tmp97 + tmp112; } { fftw_real tmp134; fftw_real tmp129; fftw_real tmp133; fftw_real tmp138; fftw_real tmp140; fftw_real tmp136; fftw_real tmp137; fftw_real tmp139; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp134 = K559016994 * (tmp127 - tmp128); tmp129 = tmp127 + tmp128; tmp133 = tmp132 - (K250000000 * tmp129); tmp136 = tmp91 - tmp92; tmp137 = tmp88 - tmp89; tmp138 = (K951056516 * tmp136) - (K587785252 * tmp137); tmp140 = (K951056516 * tmp137) + (K587785252 * tmp136); Y[0] = tmp129 + tmp132; tmp139 = tmp134 + tmp133; X[6 * iostride] = -(tmp139 - tmp140); Y[-4 * iostride] = tmp140 + tmp139; tmp135 = tmp133 - tmp134; X[8 * iostride] = -(tmp135 - tmp138); Y[-2 * iostride] = tmp138 + tmp135; } } if (i == m) { fftw_real tmp1; fftw_real tmp24; fftw_real tmp8; fftw_real tmp10; fftw_real tmp25; fftw_real tmp26; fftw_real tmp14; fftw_real tmp28; fftw_real tmp23; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp24 = X[5 * iostride]; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = X[4 * iostride]; tmp3 = X[6 * iostride]; tmp4 = tmp2 - tmp3; tmp5 = X[8 * iostride]; tmp6 = X[2 * iostride]; tmp7 = tmp5 - tmp6; tmp8 = tmp4 + tmp7; tmp10 = K559016994 * (tmp4 - tmp7); tmp25 = tmp2 + tmp3; tmp26 = tmp5 + tmp6; } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp22; fftw_real tmp15; fftw_real tmp16; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp12 = X[iostride]; tmp13 = X[9 * iostride]; tmp22 = tmp12 + tmp13; tmp15 = X[3 * iostride]; tmp16 = X[7 * iostride]; tmp21 = tmp15 + tmp16; tmp14 = tmp12 - tmp13; tmp28 = K559016994 * (tmp22 + tmp21); tmp23 = tmp21 - tmp22; tmp17 = tmp15 - tmp16; } X[2 * iostride] = tmp1 + tmp8; { fftw_real tmp18; fftw_real tmp20; fftw_real tmp11; fftw_real tmp19; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp18 = (K587785252 * tmp14) - (K951056516 * tmp17); tmp20 = (K951056516 * tmp14) + (K587785252 * tmp17); tmp9 = tmp1 - (K250000000 * tmp8); tmp11 = tmp9 - tmp10; tmp19 = tmp10 + tmp9; X[3 * iostride] = tmp11 - tmp18; X[iostride] = tmp11 + tmp18; X[4 * iostride] = tmp19 - tmp20; X[0] = tmp19 + tmp20; } Y[-2 * iostride] = tmp23 - tmp24; { fftw_real tmp27; fftw_real tmp32; fftw_real tmp30; fftw_real tmp31; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp27 = (K951056516 * tmp25) + (K587785252 * tmp26); tmp32 = (K951056516 * tmp26) - (K587785252 * tmp25); tmp29 = (K250000000 * tmp23) + tmp24; tmp30 = tmp28 + tmp29; tmp31 = tmp29 - tmp28; Y[0] = -(tmp27 + tmp30); Y[-4 * iostride] = tmp27 - tmp30; Y[-iostride] = tmp31 - tmp32; Y[-3 * iostride] = tmp32 + tmp31; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; fftw_codelet_desc fftw_hc2hc_forward_10_desc = { "fftw_hc2hc_forward_10", (void (*)()) fftw_hc2hc_forward_10, 10, FFTW_FORWARD, FFTW_HC2HC, 223, 9, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_16.c���������������������������������������������������������������������������0000644�0001754�0000144�00000067171�07637527350�010545� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:11 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 16 */ /* * This function contains 298 FP additions, 130 FP multiplications, * (or, 244 additions, 76 multiplications, 54 fused multiply/add), * 51 stack variables, and 128 memory accesses */ static const fftw_real K277785116 = FFTW_KONST(+0.277785116509801112371415406974266437187468595); static const fftw_real K415734806 = FFTW_KONST(+0.415734806151272618539394188808952878369280406); static const fftw_real K490392640 = FFTW_KONST(+0.490392640201615224563091118067119518486966865); static const fftw_real K097545161 = FFTW_KONST(+0.097545161008064133924142434238511120463845809); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_16(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (16 * iostride); { fftw_real tmp277; fftw_real tmp280; fftw_real tmp281; fftw_real tmp309; fftw_real tmp292; fftw_real tmp307; fftw_real tmp314; fftw_real tmp322; fftw_real tmp330; fftw_real tmp284; fftw_real tmp287; fftw_real tmp288; fftw_real tmp310; fftw_real tmp291; fftw_real tmp300; fftw_real tmp315; fftw_real tmp325; fftw_real tmp331; fftw_real tmp290; fftw_real tmp289; fftw_real tmp317; fftw_real tmp318; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp275; fftw_real tmp276; fftw_real tmp278; fftw_real tmp279; ASSERT_ALIGNED_DOUBLE; tmp275 = X[0]; tmp276 = X[8 * iostride]; tmp277 = tmp275 + tmp276; tmp278 = X[4 * iostride]; tmp279 = X[12 * iostride]; tmp280 = tmp278 + tmp279; tmp281 = tmp277 + tmp280; tmp309 = tmp275 - tmp276; tmp292 = tmp278 - tmp279; } { fftw_real tmp303; fftw_real tmp320; fftw_real tmp306; fftw_real tmp321; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp301; fftw_real tmp302; fftw_real tmp304; fftw_real tmp305; ASSERT_ALIGNED_DOUBLE; tmp301 = X[iostride]; tmp302 = X[9 * iostride]; tmp303 = tmp301 - tmp302; tmp320 = tmp301 + tmp302; tmp304 = X[5 * iostride]; tmp305 = X[13 * iostride]; tmp306 = tmp304 - tmp305; tmp321 = tmp304 + tmp305; } tmp307 = (K382683432 * tmp303) + (K923879532 * tmp306); tmp314 = (K923879532 * tmp303) - (K382683432 * tmp306); tmp322 = tmp320 - tmp321; tmp330 = tmp320 + tmp321; } { fftw_real tmp282; fftw_real tmp283; fftw_real tmp285; fftw_real tmp286; ASSERT_ALIGNED_DOUBLE; tmp282 = X[2 * iostride]; tmp283 = X[10 * iostride]; tmp284 = tmp282 + tmp283; tmp290 = tmp282 - tmp283; tmp285 = X[14 * iostride]; tmp286 = X[6 * iostride]; tmp287 = tmp285 + tmp286; tmp289 = tmp285 - tmp286; } tmp288 = tmp284 + tmp287; tmp310 = K707106781 * (tmp290 + tmp289); tmp291 = K707106781 * (tmp289 - tmp290); { fftw_real tmp296; fftw_real tmp323; fftw_real tmp299; fftw_real tmp324; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp294; fftw_real tmp295; fftw_real tmp297; fftw_real tmp298; ASSERT_ALIGNED_DOUBLE; tmp294 = X[15 * iostride]; tmp295 = X[7 * iostride]; tmp296 = tmp294 - tmp295; tmp323 = tmp294 + tmp295; tmp297 = X[3 * iostride]; tmp298 = X[11 * iostride]; tmp299 = tmp297 - tmp298; tmp324 = tmp297 + tmp298; } tmp300 = (K382683432 * tmp296) - (K923879532 * tmp299); tmp315 = (K923879532 * tmp296) + (K382683432 * tmp299); tmp325 = tmp323 - tmp324; tmp331 = tmp323 + tmp324; } { fftw_real tmp329; fftw_real tmp332; fftw_real tmp327; fftw_real tmp328; ASSERT_ALIGNED_DOUBLE; X[4 * iostride] = tmp281 - tmp288; tmp329 = tmp281 + tmp288; tmp332 = tmp330 + tmp331; X[8 * iostride] = tmp329 - tmp332; X[0] = tmp329 + tmp332; Y[-4 * iostride] = tmp331 - tmp330; tmp327 = tmp287 - tmp284; tmp328 = K707106781 * (tmp325 - tmp322); Y[-2 * iostride] = tmp327 + tmp328; Y[-6 * iostride] = tmp328 - tmp327; } { fftw_real tmp319; fftw_real tmp326; fftw_real tmp313; fftw_real tmp316; ASSERT_ALIGNED_DOUBLE; tmp319 = tmp277 - tmp280; tmp326 = K707106781 * (tmp322 + tmp325); X[6 * iostride] = tmp319 - tmp326; X[2 * iostride] = tmp319 + tmp326; tmp313 = tmp309 + tmp310; tmp316 = tmp314 + tmp315; X[7 * iostride] = tmp313 - tmp316; X[iostride] = tmp313 + tmp316; } tmp317 = tmp292 + tmp291; tmp318 = tmp315 - tmp314; Y[-3 * iostride] = tmp317 + tmp318; Y[-5 * iostride] = tmp318 - tmp317; { fftw_real tmp293; fftw_real tmp308; fftw_real tmp311; fftw_real tmp312; ASSERT_ALIGNED_DOUBLE; tmp293 = tmp291 - tmp292; tmp308 = tmp300 - tmp307; Y[-iostride] = tmp293 + tmp308; Y[-7 * iostride] = tmp308 - tmp293; tmp311 = tmp309 - tmp310; tmp312 = tmp307 + tmp300; X[5 * iostride] = tmp311 - tmp312; X[3 * iostride] = tmp311 + tmp312; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 15) { fftw_real tmp77; fftw_real tmp161; fftw_real tmp249; fftw_real tmp262; fftw_real tmp88; fftw_real tmp263; fftw_real tmp164; fftw_real tmp246; fftw_real tmp147; fftw_real tmp158; fftw_real tmp231; fftw_real tmp198; fftw_real tmp214; fftw_real tmp232; fftw_real tmp233; fftw_real tmp234; fftw_real tmp193; fftw_real tmp213; fftw_real tmp100; fftw_real tmp222; fftw_real tmp170; fftw_real tmp206; fftw_real tmp111; fftw_real tmp223; fftw_real tmp175; fftw_real tmp207; fftw_real tmp124; fftw_real tmp135; fftw_real tmp226; fftw_real tmp187; fftw_real tmp211; fftw_real tmp227; fftw_real tmp228; fftw_real tmp229; fftw_real tmp182; fftw_real tmp210; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp71; fftw_real tmp248; fftw_real tmp76; fftw_real tmp247; ASSERT_ALIGNED_DOUBLE; tmp71 = X[0]; tmp248 = Y[-15 * iostride]; { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = X[8 * iostride]; tmp75 = Y[-7 * iostride]; tmp72 = c_re(W[7]); tmp74 = c_im(W[7]); tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75); tmp247 = (tmp74 * tmp73) + (tmp72 * tmp75); } tmp77 = tmp71 + tmp76; tmp161 = tmp71 - tmp76; tmp249 = tmp247 + tmp248; tmp262 = tmp248 - tmp247; } { fftw_real tmp82; fftw_real tmp162; fftw_real tmp87; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp79; fftw_real tmp81; fftw_real tmp78; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp79 = X[4 * iostride]; tmp81 = Y[-11 * iostride]; tmp78 = c_re(W[3]); tmp80 = c_im(W[3]); tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81); tmp162 = (tmp80 * tmp79) + (tmp78 * tmp81); } { fftw_real tmp84; fftw_real tmp86; fftw_real tmp83; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp84 = X[12 * iostride]; tmp86 = Y[-3 * iostride]; tmp83 = c_re(W[11]); tmp85 = c_im(W[11]); tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86); tmp163 = (tmp85 * tmp84) + (tmp83 * tmp86); } tmp88 = tmp82 + tmp87; tmp263 = tmp82 - tmp87; tmp164 = tmp162 - tmp163; tmp246 = tmp162 + tmp163; } { fftw_real tmp141; fftw_real tmp194; fftw_real tmp157; fftw_real tmp191; fftw_real tmp146; fftw_real tmp195; fftw_real tmp152; fftw_real tmp190; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp138; fftw_real tmp140; fftw_real tmp137; fftw_real tmp139; ASSERT_ALIGNED_DOUBLE; tmp138 = X[15 * iostride]; tmp140 = Y[0]; tmp137 = c_re(W[14]); tmp139 = c_im(W[14]); tmp141 = (tmp137 * tmp138) - (tmp139 * tmp140); tmp194 = (tmp139 * tmp138) + (tmp137 * tmp140); } { fftw_real tmp154; fftw_real tmp156; fftw_real tmp153; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp154 = X[11 * iostride]; tmp156 = Y[-4 * iostride]; tmp153 = c_re(W[10]); tmp155 = c_im(W[10]); tmp157 = (tmp153 * tmp154) - (tmp155 * tmp156); tmp191 = (tmp155 * tmp154) + (tmp153 * tmp156); } { fftw_real tmp143; fftw_real tmp145; fftw_real tmp142; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp143 = X[7 * iostride]; tmp145 = Y[-8 * iostride]; tmp142 = c_re(W[6]); tmp144 = c_im(W[6]); tmp146 = (tmp142 * tmp143) - (tmp144 * tmp145); tmp195 = (tmp144 * tmp143) + (tmp142 * tmp145); } { fftw_real tmp149; fftw_real tmp151; fftw_real tmp148; fftw_real tmp150; ASSERT_ALIGNED_DOUBLE; tmp149 = X[3 * iostride]; tmp151 = Y[-12 * iostride]; tmp148 = c_re(W[2]); tmp150 = c_im(W[2]); tmp152 = (tmp148 * tmp149) - (tmp150 * tmp151); tmp190 = (tmp150 * tmp149) + (tmp148 * tmp151); } { fftw_real tmp196; fftw_real tmp197; fftw_real tmp189; fftw_real tmp192; ASSERT_ALIGNED_DOUBLE; tmp147 = tmp141 + tmp146; tmp158 = tmp152 + tmp157; tmp231 = tmp147 - tmp158; tmp196 = tmp194 - tmp195; tmp197 = tmp152 - tmp157; tmp198 = tmp196 + tmp197; tmp214 = tmp196 - tmp197; tmp232 = tmp194 + tmp195; tmp233 = tmp190 + tmp191; tmp234 = tmp232 - tmp233; tmp189 = tmp141 - tmp146; tmp192 = tmp190 - tmp191; tmp193 = tmp189 - tmp192; tmp213 = tmp189 + tmp192; } } { fftw_real tmp94; fftw_real tmp166; fftw_real tmp99; fftw_real tmp167; fftw_real tmp168; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp91; fftw_real tmp93; fftw_real tmp90; fftw_real tmp92; ASSERT_ALIGNED_DOUBLE; tmp91 = X[2 * iostride]; tmp93 = Y[-13 * iostride]; tmp90 = c_re(W[1]); tmp92 = c_im(W[1]); tmp94 = (tmp90 * tmp91) - (tmp92 * tmp93); tmp166 = (tmp92 * tmp91) + (tmp90 * tmp93); } { fftw_real tmp96; fftw_real tmp98; fftw_real tmp95; fftw_real tmp97; ASSERT_ALIGNED_DOUBLE; tmp96 = X[10 * iostride]; tmp98 = Y[-5 * iostride]; tmp95 = c_re(W[9]); tmp97 = c_im(W[9]); tmp99 = (tmp95 * tmp96) - (tmp97 * tmp98); tmp167 = (tmp97 * tmp96) + (tmp95 * tmp98); } tmp100 = tmp94 + tmp99; tmp222 = tmp166 + tmp167; tmp168 = tmp166 - tmp167; tmp169 = tmp94 - tmp99; tmp170 = tmp168 - tmp169; tmp206 = tmp169 + tmp168; } { fftw_real tmp105; fftw_real tmp172; fftw_real tmp110; fftw_real tmp173; fftw_real tmp171; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp102; fftw_real tmp104; fftw_real tmp101; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp102 = X[14 * iostride]; tmp104 = Y[-iostride]; tmp101 = c_re(W[13]); tmp103 = c_im(W[13]); tmp105 = (tmp101 * tmp102) - (tmp103 * tmp104); tmp172 = (tmp103 * tmp102) + (tmp101 * tmp104); } { fftw_real tmp107; fftw_real tmp109; fftw_real tmp106; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; tmp107 = X[6 * iostride]; tmp109 = Y[-9 * iostride]; tmp106 = c_re(W[5]); tmp108 = c_im(W[5]); tmp110 = (tmp106 * tmp107) - (tmp108 * tmp109); tmp173 = (tmp108 * tmp107) + (tmp106 * tmp109); } tmp111 = tmp105 + tmp110; tmp223 = tmp172 + tmp173; tmp171 = tmp105 - tmp110; tmp174 = tmp172 - tmp173; tmp175 = tmp171 + tmp174; tmp207 = tmp171 - tmp174; } { fftw_real tmp118; fftw_real tmp178; fftw_real tmp134; fftw_real tmp185; fftw_real tmp123; fftw_real tmp179; fftw_real tmp129; fftw_real tmp184; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp115; fftw_real tmp117; fftw_real tmp114; fftw_real tmp116; ASSERT_ALIGNED_DOUBLE; tmp115 = X[iostride]; tmp117 = Y[-14 * iostride]; tmp114 = c_re(W[0]); tmp116 = c_im(W[0]); tmp118 = (tmp114 * tmp115) - (tmp116 * tmp117); tmp178 = (tmp116 * tmp115) + (tmp114 * tmp117); } { fftw_real tmp131; fftw_real tmp133; fftw_real tmp130; fftw_real tmp132; ASSERT_ALIGNED_DOUBLE; tmp131 = X[13 * iostride]; tmp133 = Y[-2 * iostride]; tmp130 = c_re(W[12]); tmp132 = c_im(W[12]); tmp134 = (tmp130 * tmp131) - (tmp132 * tmp133); tmp185 = (tmp132 * tmp131) + (tmp130 * tmp133); } { fftw_real tmp120; fftw_real tmp122; fftw_real tmp119; fftw_real tmp121; ASSERT_ALIGNED_DOUBLE; tmp120 = X[9 * iostride]; tmp122 = Y[-6 * iostride]; tmp119 = c_re(W[8]); tmp121 = c_im(W[8]); tmp123 = (tmp119 * tmp120) - (tmp121 * tmp122); tmp179 = (tmp121 * tmp120) + (tmp119 * tmp122); } { fftw_real tmp126; fftw_real tmp128; fftw_real tmp125; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp126 = X[5 * iostride]; tmp128 = Y[-10 * iostride]; tmp125 = c_re(W[4]); tmp127 = c_im(W[4]); tmp129 = (tmp125 * tmp126) - (tmp127 * tmp128); tmp184 = (tmp127 * tmp126) + (tmp125 * tmp128); } { fftw_real tmp183; fftw_real tmp186; fftw_real tmp180; fftw_real tmp181; ASSERT_ALIGNED_DOUBLE; tmp124 = tmp118 + tmp123; tmp135 = tmp129 + tmp134; tmp226 = tmp124 - tmp135; tmp183 = tmp118 - tmp123; tmp186 = tmp184 - tmp185; tmp187 = tmp183 - tmp186; tmp211 = tmp183 + tmp186; tmp227 = tmp178 + tmp179; tmp228 = tmp184 + tmp185; tmp229 = tmp227 - tmp228; tmp180 = tmp178 - tmp179; tmp181 = tmp129 - tmp134; tmp182 = tmp180 + tmp181; tmp210 = tmp180 - tmp181; } } { fftw_real tmp177; fftw_real tmp201; fftw_real tmp271; fftw_real tmp273; fftw_real tmp200; fftw_real tmp274; fftw_real tmp204; fftw_real tmp272; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp165; fftw_real tmp176; fftw_real tmp269; fftw_real tmp270; ASSERT_ALIGNED_DOUBLE; tmp165 = tmp161 - tmp164; tmp176 = K707106781 * (tmp170 - tmp175); tmp177 = tmp165 + tmp176; tmp201 = tmp165 - tmp176; tmp269 = K707106781 * (tmp207 - tmp206); tmp270 = tmp263 + tmp262; tmp271 = tmp269 + tmp270; tmp273 = tmp270 - tmp269; } { fftw_real tmp188; fftw_real tmp199; fftw_real tmp202; fftw_real tmp203; ASSERT_ALIGNED_DOUBLE; tmp188 = (K923879532 * tmp182) + (K382683432 * tmp187); tmp199 = (K382683432 * tmp193) - (K923879532 * tmp198); tmp200 = tmp188 + tmp199; tmp274 = tmp199 - tmp188; tmp202 = (K382683432 * tmp182) - (K923879532 * tmp187); tmp203 = (K382683432 * tmp198) + (K923879532 * tmp193); tmp204 = tmp202 - tmp203; tmp272 = tmp202 + tmp203; } Y[-11 * iostride] = tmp177 - tmp200; X[3 * iostride] = tmp177 + tmp200; Y[-15 * iostride] = tmp201 - tmp204; X[7 * iostride] = tmp201 + tmp204; X[11 * iostride] = -(tmp271 - tmp272); Y[-3 * iostride] = tmp272 + tmp271; X[15 * iostride] = -(tmp273 - tmp274); Y[-7 * iostride] = tmp274 + tmp273; } { fftw_real tmp209; fftw_real tmp217; fftw_real tmp265; fftw_real tmp267; fftw_real tmp216; fftw_real tmp268; fftw_real tmp220; fftw_real tmp266; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp205; fftw_real tmp208; fftw_real tmp261; fftw_real tmp264; ASSERT_ALIGNED_DOUBLE; tmp205 = tmp161 + tmp164; tmp208 = K707106781 * (tmp206 + tmp207); tmp209 = tmp205 + tmp208; tmp217 = tmp205 - tmp208; tmp261 = K707106781 * (tmp170 + tmp175); tmp264 = tmp262 - tmp263; tmp265 = tmp261 + tmp264; tmp267 = tmp264 - tmp261; } { fftw_real tmp212; fftw_real tmp215; fftw_real tmp218; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; tmp212 = (K382683432 * tmp210) + (K923879532 * tmp211); tmp215 = (K923879532 * tmp213) - (K382683432 * tmp214); tmp216 = tmp212 + tmp215; tmp268 = tmp215 - tmp212; tmp218 = (K923879532 * tmp210) - (K382683432 * tmp211); tmp219 = (K923879532 * tmp214) + (K382683432 * tmp213); tmp220 = tmp218 - tmp219; tmp266 = tmp218 + tmp219; } Y[-9 * iostride] = tmp209 - tmp216; X[iostride] = tmp209 + tmp216; Y[-13 * iostride] = tmp217 - tmp220; X[5 * iostride] = tmp217 + tmp220; X[9 * iostride] = -(tmp265 - tmp266); Y[-iostride] = tmp266 + tmp265; X[13 * iostride] = -(tmp267 - tmp268); Y[-5 * iostride] = tmp268 + tmp267; } { fftw_real tmp225; fftw_real tmp237; fftw_real tmp257; fftw_real tmp259; fftw_real tmp236; fftw_real tmp260; fftw_real tmp240; fftw_real tmp258; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp221; fftw_real tmp224; fftw_real tmp255; fftw_real tmp256; ASSERT_ALIGNED_DOUBLE; tmp221 = tmp77 - tmp88; tmp224 = tmp222 - tmp223; tmp225 = tmp221 + tmp224; tmp237 = tmp221 - tmp224; tmp255 = tmp111 - tmp100; tmp256 = tmp249 - tmp246; tmp257 = tmp255 + tmp256; tmp259 = tmp256 - tmp255; } { fftw_real tmp230; fftw_real tmp235; fftw_real tmp238; fftw_real tmp239; ASSERT_ALIGNED_DOUBLE; tmp230 = tmp226 + tmp229; tmp235 = tmp231 - tmp234; tmp236 = K707106781 * (tmp230 + tmp235); tmp260 = K707106781 * (tmp235 - tmp230); tmp238 = tmp229 - tmp226; tmp239 = tmp231 + tmp234; tmp240 = K707106781 * (tmp238 - tmp239); tmp258 = K707106781 * (tmp238 + tmp239); } Y[-10 * iostride] = tmp225 - tmp236; X[2 * iostride] = tmp225 + tmp236; Y[-14 * iostride] = tmp237 - tmp240; X[6 * iostride] = tmp237 + tmp240; X[10 * iostride] = -(tmp257 - tmp258); Y[-2 * iostride] = tmp258 + tmp257; X[14 * iostride] = -(tmp259 - tmp260); Y[-6 * iostride] = tmp260 + tmp259; } { fftw_real tmp113; fftw_real tmp241; fftw_real tmp251; fftw_real tmp253; fftw_real tmp160; fftw_real tmp254; fftw_real tmp244; fftw_real tmp252; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp89; fftw_real tmp112; fftw_real tmp245; fftw_real tmp250; ASSERT_ALIGNED_DOUBLE; tmp89 = tmp77 + tmp88; tmp112 = tmp100 + tmp111; tmp113 = tmp89 + tmp112; tmp241 = tmp89 - tmp112; tmp245 = tmp222 + tmp223; tmp250 = tmp246 + tmp249; tmp251 = tmp245 + tmp250; tmp253 = tmp250 - tmp245; } { fftw_real tmp136; fftw_real tmp159; fftw_real tmp242; fftw_real tmp243; ASSERT_ALIGNED_DOUBLE; tmp136 = tmp124 + tmp135; tmp159 = tmp147 + tmp158; tmp160 = tmp136 + tmp159; tmp254 = tmp159 - tmp136; tmp242 = tmp227 + tmp228; tmp243 = tmp232 + tmp233; tmp244 = tmp242 - tmp243; tmp252 = tmp242 + tmp243; } Y[-8 * iostride] = tmp113 - tmp160; X[0] = tmp113 + tmp160; Y[-12 * iostride] = tmp241 - tmp244; X[4 * iostride] = tmp241 + tmp244; X[8 * iostride] = -(tmp251 - tmp252); Y[0] = tmp252 + tmp251; X[12 * iostride] = -(tmp253 - tmp254); Y[-4 * iostride] = tmp254 + tmp253; } } if (i == m) { fftw_real tmp5; fftw_real tmp41; fftw_real tmp61; fftw_real tmp67; fftw_real tmp30; fftw_real tmp49; fftw_real tmp34; fftw_real tmp50; fftw_real tmp12; fftw_real tmp66; fftw_real tmp44; fftw_real tmp58; fftw_real tmp19; fftw_real tmp46; fftw_real tmp23; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp60; fftw_real tmp4; fftw_real tmp59; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp60 = X[8 * iostride]; tmp2 = X[4 * iostride]; tmp3 = X[12 * iostride]; tmp4 = K707106781 * (tmp2 - tmp3); tmp59 = K707106781 * (tmp2 + tmp3); tmp5 = tmp1 + tmp4; tmp41 = tmp1 - tmp4; tmp61 = tmp59 + tmp60; tmp67 = tmp60 - tmp59; } { fftw_real tmp29; fftw_real tmp33; fftw_real tmp27; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp28; fftw_real tmp32; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp28 = X[15 * iostride]; tmp29 = K2_000000000 * tmp28; tmp32 = X[7 * iostride]; tmp33 = K2_000000000 * tmp32; tmp25 = X[3 * iostride]; tmp26 = X[11 * iostride]; tmp27 = K1_414213562 * (tmp25 - tmp26); tmp31 = K1_414213562 * (tmp25 + tmp26); } tmp30 = tmp27 - tmp29; tmp49 = tmp27 + tmp29; tmp34 = tmp31 + tmp33; tmp50 = tmp33 - tmp31; } { fftw_real tmp8; fftw_real tmp42; fftw_real tmp11; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp6; fftw_real tmp7; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp6 = X[2 * iostride]; tmp7 = X[10 * iostride]; tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); tmp42 = (K382683432 * tmp6) + (K923879532 * tmp7); tmp9 = X[6 * iostride]; tmp10 = X[14 * iostride]; tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); tmp43 = (K923879532 * tmp9) + (K382683432 * tmp10); } tmp12 = tmp8 + tmp11; tmp66 = tmp11 - tmp8; tmp44 = tmp42 - tmp43; tmp58 = tmp42 + tmp43; } { fftw_real tmp15; fftw_real tmp22; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp14; fftw_real tmp21; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp14 = X[iostride]; tmp15 = K2_000000000 * tmp14; tmp21 = X[9 * iostride]; tmp22 = K2_000000000 * tmp21; tmp16 = X[5 * iostride]; tmp17 = X[13 * iostride]; tmp18 = K1_414213562 * (tmp16 - tmp17); tmp20 = K1_414213562 * (tmp16 + tmp17); } tmp19 = tmp15 + tmp18; tmp46 = tmp15 - tmp18; tmp23 = tmp20 + tmp22; tmp47 = tmp22 - tmp20; } { fftw_real tmp13; fftw_real tmp62; fftw_real tmp36; fftw_real tmp57; fftw_real tmp24; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp13 = tmp5 - tmp12; tmp62 = tmp58 + tmp61; tmp24 = (K097545161 * tmp19) + (K490392640 * tmp23); tmp35 = (K097545161 * tmp30) - (K490392640 * tmp34); tmp36 = tmp24 + tmp35; tmp57 = tmp35 - tmp24; X[4 * iostride] = tmp13 - tmp36; X[3 * iostride] = tmp13 + tmp36; Y[0] = tmp57 - tmp62; Y[-7 * iostride] = tmp57 + tmp62; } { fftw_real tmp37; fftw_real tmp64; fftw_real tmp40; fftw_real tmp63; fftw_real tmp38; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp37 = tmp5 + tmp12; tmp64 = tmp61 - tmp58; tmp38 = (K490392640 * tmp19) - (K097545161 * tmp23); tmp39 = (K490392640 * tmp30) + (K097545161 * tmp34); tmp40 = tmp38 + tmp39; tmp63 = tmp39 - tmp38; X[7 * iostride] = tmp37 - tmp40; X[0] = tmp37 + tmp40; Y[-4 * iostride] = tmp63 - tmp64; Y[-3 * iostride] = tmp63 + tmp64; } { fftw_real tmp45; fftw_real tmp68; fftw_real tmp52; fftw_real tmp65; fftw_real tmp48; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp45 = tmp41 + tmp44; tmp68 = tmp66 - tmp67; tmp48 = (K415734806 * tmp46) + (K277785116 * tmp47); tmp51 = (K415734806 * tmp49) + (K277785116 * tmp50); tmp52 = tmp48 - tmp51; tmp65 = tmp48 + tmp51; X[6 * iostride] = tmp45 - tmp52; X[iostride] = tmp45 + tmp52; Y[-5 * iostride] = -(tmp65 + tmp68); Y[-2 * iostride] = tmp68 - tmp65; } { fftw_real tmp53; fftw_real tmp70; fftw_real tmp56; fftw_real tmp69; fftw_real tmp54; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; tmp53 = tmp41 - tmp44; tmp70 = tmp66 + tmp67; tmp54 = (K415734806 * tmp50) - (K277785116 * tmp49); tmp55 = (K415734806 * tmp47) - (K277785116 * tmp46); tmp56 = tmp54 - tmp55; tmp69 = tmp55 + tmp54; X[5 * iostride] = tmp53 - tmp56; X[2 * iostride] = tmp53 + tmp56; Y[-6 * iostride] = tmp69 - tmp70; Y[-iostride] = tmp69 + tmp70; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; fftw_codelet_desc fftw_hc2hc_forward_16_desc = { "fftw_hc2hc_forward_16", (void (*)()) fftw_hc2hc_forward_16, 16, FFTW_FORWARD, FFTW_HC2HC, 355, 15, twiddle_order, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhf_32.c���������������������������������������������������������������������������0000644�0001754�0000144�00000204032�07637527412�010527� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:13 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 32 */ /* * This function contains 764 FP additions, 340 FP multiplications, * (or, 618 additions, 194 multiplications, 146 fused multiply/add), * 91 stack variables, and 256 memory accesses */ static const fftw_real K145142338 = FFTW_KONST(+0.145142338627231183818096187908697637345738139); static const fftw_real K478470167 = FFTW_KONST(+0.478470167866104432467898943490134984741424603); static const fftw_real K235698368 = FFTW_KONST(+0.235698368412998824278193812952627188828730159); static const fftw_real K440960632 = FFTW_KONST(+0.440960632174177514856378431830194174754221310); static const fftw_real K317196642 = FFTW_KONST(+0.317196642081822749107585806612746685337843547); static const fftw_real K386505226 = FFTW_KONST(+0.386505226681368480405453304879234900485520646); static const fftw_real K497592363 = FFTW_KONST(+0.497592363336098443122418476554739960787737434); static const fftw_real K049008570 = FFTW_KONST(+0.049008570164780300997097781944320922930568337); static const fftw_real K277785116 = FFTW_KONST(+0.277785116509801112371415406974266437187468595); static const fftw_real K415734806 = FFTW_KONST(+0.415734806151272618539394188808952878369280406); static const fftw_real K097545161 = FFTW_KONST(+0.097545161008064133924142434238511120463845809); static const fftw_real K490392640 = FFTW_KONST(+0.490392640201615224563091118067119518486966865); static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_forward_32(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (32 * iostride); { fftw_real tmp685; fftw_real tmp813; fftw_real tmp709; fftw_real tmp761; fftw_real tmp692; fftw_real tmp826; fftw_real tmp712; fftw_real tmp760; fftw_real tmp801; fftw_real tmp821; fftw_real tmp749; fftw_real tmp777; fftw_real tmp804; fftw_real tmp822; fftw_real tmp754; fftw_real tmp778; fftw_real tmp700; fftw_real tmp814; fftw_real tmp716; fftw_real tmp758; fftw_real tmp707; fftw_real tmp815; fftw_real tmp719; fftw_real tmp757; fftw_real tmp794; fftw_real tmp818; fftw_real tmp732; fftw_real tmp774; fftw_real tmp797; fftw_real tmp819; fftw_real tmp737; fftw_real tmp775; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp679; fftw_real tmp680; fftw_real tmp681; fftw_real tmp682; fftw_real tmp683; fftw_real tmp684; ASSERT_ALIGNED_DOUBLE; tmp679 = X[0]; tmp680 = X[16 * iostride]; tmp681 = tmp679 + tmp680; tmp682 = X[8 * iostride]; tmp683 = X[24 * iostride]; tmp684 = tmp682 + tmp683; tmp685 = tmp681 + tmp684; tmp813 = tmp681 - tmp684; tmp709 = tmp679 - tmp680; tmp761 = tmp682 - tmp683; } { fftw_real tmp688; fftw_real tmp710; fftw_real tmp691; fftw_real tmp711; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp686; fftw_real tmp687; fftw_real tmp689; fftw_real tmp690; ASSERT_ALIGNED_DOUBLE; tmp686 = X[4 * iostride]; tmp687 = X[20 * iostride]; tmp688 = tmp686 + tmp687; tmp710 = tmp686 - tmp687; tmp689 = X[28 * iostride]; tmp690 = X[12 * iostride]; tmp691 = tmp689 + tmp690; tmp711 = tmp689 - tmp690; } tmp692 = tmp688 + tmp691; tmp826 = tmp691 - tmp688; tmp712 = K707106781 * (tmp710 + tmp711); tmp760 = K707106781 * (tmp711 - tmp710); } { fftw_real tmp741; fftw_real tmp799; fftw_real tmp753; fftw_real tmp800; fftw_real tmp744; fftw_real tmp802; fftw_real tmp747; fftw_real tmp803; fftw_real tmp748; fftw_real tmp750; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp739; fftw_real tmp740; fftw_real tmp751; fftw_real tmp752; ASSERT_ALIGNED_DOUBLE; tmp739 = X[31 * iostride]; tmp740 = X[15 * iostride]; tmp741 = tmp739 - tmp740; tmp799 = tmp739 + tmp740; tmp751 = X[7 * iostride]; tmp752 = X[23 * iostride]; tmp753 = tmp751 - tmp752; tmp800 = tmp751 + tmp752; } { fftw_real tmp742; fftw_real tmp743; fftw_real tmp745; fftw_real tmp746; ASSERT_ALIGNED_DOUBLE; tmp742 = X[3 * iostride]; tmp743 = X[19 * iostride]; tmp744 = tmp742 - tmp743; tmp802 = tmp742 + tmp743; tmp745 = X[27 * iostride]; tmp746 = X[11 * iostride]; tmp747 = tmp745 - tmp746; tmp803 = tmp745 + tmp746; } tmp801 = tmp799 + tmp800; tmp821 = tmp799 - tmp800; tmp748 = K707106781 * (tmp744 + tmp747); tmp749 = tmp741 + tmp748; tmp777 = tmp741 - tmp748; tmp804 = tmp802 + tmp803; tmp822 = tmp803 - tmp802; tmp750 = K707106781 * (tmp747 - tmp744); tmp754 = tmp750 - tmp753; tmp778 = tmp753 + tmp750; } { fftw_real tmp696; fftw_real tmp714; fftw_real tmp699; fftw_real tmp715; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp694; fftw_real tmp695; fftw_real tmp697; fftw_real tmp698; ASSERT_ALIGNED_DOUBLE; tmp694 = X[2 * iostride]; tmp695 = X[18 * iostride]; tmp696 = tmp694 + tmp695; tmp714 = tmp694 - tmp695; tmp697 = X[10 * iostride]; tmp698 = X[26 * iostride]; tmp699 = tmp697 + tmp698; tmp715 = tmp697 - tmp698; } tmp700 = tmp696 + tmp699; tmp814 = tmp696 - tmp699; tmp716 = (K923879532 * tmp714) - (K382683432 * tmp715); tmp758 = (K382683432 * tmp714) + (K923879532 * tmp715); } { fftw_real tmp703; fftw_real tmp717; fftw_real tmp706; fftw_real tmp718; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp701; fftw_real tmp702; fftw_real tmp704; fftw_real tmp705; ASSERT_ALIGNED_DOUBLE; tmp701 = X[30 * iostride]; tmp702 = X[14 * iostride]; tmp703 = tmp701 + tmp702; tmp717 = tmp701 - tmp702; tmp704 = X[6 * iostride]; tmp705 = X[22 * iostride]; tmp706 = tmp704 + tmp705; tmp718 = tmp704 - tmp705; } tmp707 = tmp703 + tmp706; tmp815 = tmp703 - tmp706; tmp719 = (K923879532 * tmp717) + (K382683432 * tmp718); tmp757 = (K382683432 * tmp717) - (K923879532 * tmp718); } { fftw_real tmp724; fftw_real tmp792; fftw_real tmp736; fftw_real tmp793; fftw_real tmp727; fftw_real tmp795; fftw_real tmp730; fftw_real tmp796; fftw_real tmp731; fftw_real tmp733; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp722; fftw_real tmp723; fftw_real tmp734; fftw_real tmp735; ASSERT_ALIGNED_DOUBLE; tmp722 = X[iostride]; tmp723 = X[17 * iostride]; tmp724 = tmp722 - tmp723; tmp792 = tmp722 + tmp723; tmp734 = X[9 * iostride]; tmp735 = X[25 * iostride]; tmp736 = tmp734 - tmp735; tmp793 = tmp734 + tmp735; } { fftw_real tmp725; fftw_real tmp726; fftw_real tmp728; fftw_real tmp729; ASSERT_ALIGNED_DOUBLE; tmp725 = X[5 * iostride]; tmp726 = X[21 * iostride]; tmp727 = tmp725 - tmp726; tmp795 = tmp725 + tmp726; tmp728 = X[29 * iostride]; tmp729 = X[13 * iostride]; tmp730 = tmp728 - tmp729; tmp796 = tmp728 + tmp729; } tmp794 = tmp792 + tmp793; tmp818 = tmp792 - tmp793; tmp731 = K707106781 * (tmp727 + tmp730); tmp732 = tmp724 + tmp731; tmp774 = tmp724 - tmp731; tmp797 = tmp795 + tmp796; tmp819 = tmp796 - tmp795; tmp733 = K707106781 * (tmp730 - tmp727); tmp737 = tmp733 - tmp736; tmp775 = tmp736 + tmp733; } { fftw_real tmp693; fftw_real tmp708; fftw_real tmp809; fftw_real tmp810; fftw_real tmp811; fftw_real tmp812; ASSERT_ALIGNED_DOUBLE; tmp693 = tmp685 + tmp692; tmp708 = tmp700 + tmp707; tmp809 = tmp693 + tmp708; tmp810 = tmp794 + tmp797; tmp811 = tmp801 + tmp804; tmp812 = tmp810 + tmp811; X[8 * iostride] = tmp693 - tmp708; Y[-8 * iostride] = tmp811 - tmp810; X[16 * iostride] = tmp809 - tmp812; X[0] = tmp809 + tmp812; } { fftw_real tmp791; fftw_real tmp807; fftw_real tmp806; fftw_real tmp808; fftw_real tmp798; fftw_real tmp805; ASSERT_ALIGNED_DOUBLE; tmp791 = tmp685 - tmp692; tmp807 = tmp707 - tmp700; tmp798 = tmp794 - tmp797; tmp805 = tmp801 - tmp804; tmp806 = K707106781 * (tmp798 + tmp805); tmp808 = K707106781 * (tmp805 - tmp798); X[12 * iostride] = tmp791 - tmp806; X[4 * iostride] = tmp791 + tmp806; Y[-4 * iostride] = tmp807 + tmp808; Y[-12 * iostride] = tmp808 - tmp807; } { fftw_real tmp817; fftw_real tmp833; fftw_real tmp827; fftw_real tmp829; fftw_real tmp824; fftw_real tmp828; fftw_real tmp832; fftw_real tmp834; fftw_real tmp816; fftw_real tmp825; ASSERT_ALIGNED_DOUBLE; tmp816 = K707106781 * (tmp814 + tmp815); tmp817 = tmp813 + tmp816; tmp833 = tmp813 - tmp816; tmp825 = K707106781 * (tmp815 - tmp814); tmp827 = tmp825 - tmp826; tmp829 = tmp826 + tmp825; { fftw_real tmp820; fftw_real tmp823; fftw_real tmp830; fftw_real tmp831; ASSERT_ALIGNED_DOUBLE; tmp820 = (K923879532 * tmp818) + (K382683432 * tmp819); tmp823 = (K923879532 * tmp821) - (K382683432 * tmp822); tmp824 = tmp820 + tmp823; tmp828 = tmp823 - tmp820; tmp830 = (K923879532 * tmp819) - (K382683432 * tmp818); tmp831 = (K382683432 * tmp821) + (K923879532 * tmp822); tmp832 = tmp830 + tmp831; tmp834 = tmp831 - tmp830; } X[14 * iostride] = tmp817 - tmp824; X[2 * iostride] = tmp817 + tmp824; Y[-6 * iostride] = tmp827 + tmp828; Y[-10 * iostride] = tmp828 - tmp827; Y[-2 * iostride] = tmp829 + tmp832; Y[-14 * iostride] = tmp832 - tmp829; X[10 * iostride] = tmp833 - tmp834; X[6 * iostride] = tmp833 + tmp834; } { fftw_real tmp773; fftw_real tmp789; fftw_real tmp788; fftw_real tmp790; fftw_real tmp780; fftw_real tmp784; fftw_real tmp783; fftw_real tmp785; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp771; fftw_real tmp772; fftw_real tmp786; fftw_real tmp787; ASSERT_ALIGNED_DOUBLE; tmp771 = tmp709 - tmp712; tmp772 = tmp758 + tmp757; tmp773 = tmp771 + tmp772; tmp789 = tmp771 - tmp772; tmp786 = (K831469612 * tmp775) - (K555570233 * tmp774); tmp787 = (K555570233 * tmp777) + (K831469612 * tmp778); tmp788 = tmp786 + tmp787; tmp790 = tmp787 - tmp786; } { fftw_real tmp776; fftw_real tmp779; fftw_real tmp781; fftw_real tmp782; ASSERT_ALIGNED_DOUBLE; tmp776 = (K831469612 * tmp774) + (K555570233 * tmp775); tmp779 = (K831469612 * tmp777) - (K555570233 * tmp778); tmp780 = tmp776 + tmp779; tmp784 = tmp779 - tmp776; tmp781 = tmp719 - tmp716; tmp782 = tmp761 + tmp760; tmp783 = tmp781 - tmp782; tmp785 = tmp782 + tmp781; } X[13 * iostride] = tmp773 - tmp780; X[3 * iostride] = tmp773 + tmp780; Y[-5 * iostride] = tmp783 + tmp784; Y[-11 * iostride] = tmp784 - tmp783; Y[-3 * iostride] = tmp785 + tmp788; Y[-13 * iostride] = tmp788 - tmp785; X[11 * iostride] = tmp789 - tmp790; X[5 * iostride] = tmp789 + tmp790; } { fftw_real tmp721; fftw_real tmp769; fftw_real tmp768; fftw_real tmp770; fftw_real tmp756; fftw_real tmp764; fftw_real tmp763; fftw_real tmp765; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp713; fftw_real tmp720; fftw_real tmp766; fftw_real tmp767; ASSERT_ALIGNED_DOUBLE; tmp713 = tmp709 + tmp712; tmp720 = tmp716 + tmp719; tmp721 = tmp713 + tmp720; tmp769 = tmp713 - tmp720; tmp766 = (K980785280 * tmp737) - (K195090322 * tmp732); tmp767 = (K195090322 * tmp749) + (K980785280 * tmp754); tmp768 = tmp766 + tmp767; tmp770 = tmp767 - tmp766; } { fftw_real tmp738; fftw_real tmp755; fftw_real tmp759; fftw_real tmp762; ASSERT_ALIGNED_DOUBLE; tmp738 = (K980785280 * tmp732) + (K195090322 * tmp737); tmp755 = (K980785280 * tmp749) - (K195090322 * tmp754); tmp756 = tmp738 + tmp755; tmp764 = tmp755 - tmp738; tmp759 = tmp757 - tmp758; tmp762 = tmp760 - tmp761; tmp763 = tmp759 - tmp762; tmp765 = tmp762 + tmp759; } X[15 * iostride] = tmp721 - tmp756; X[iostride] = tmp721 + tmp756; Y[-7 * iostride] = tmp763 + tmp764; Y[-9 * iostride] = tmp764 - tmp763; Y[-iostride] = tmp765 + tmp768; Y[-15 * iostride] = tmp768 - tmp765; X[9 * iostride] = tmp769 - tmp770; X[7 * iostride] = tmp769 + tmp770; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 31) { fftw_real tmp201; fftw_real tmp533; fftw_real tmp653; fftw_real tmp667; fftw_real tmp623; fftw_real tmp637; fftw_real tmp373; fftw_real tmp485; fftw_real tmp343; fftw_real tmp561; fftw_real tmp458; fftw_real tmp508; fftw_real tmp568; fftw_real tmp604; fftw_real tmp441; fftw_real tmp505; fftw_real tmp224; fftw_real tmp636; fftw_real tmp383; fftw_real tmp487; fftw_real tmp536; fftw_real tmp618; fftw_real tmp378; fftw_real tmp486; fftw_real tmp366; fftw_real tmp569; fftw_real tmp564; fftw_real tmp605; fftw_real tmp452; fftw_real tmp509; fftw_real tmp461; fftw_real tmp506; fftw_real tmp248; fftw_real tmp541; fftw_real tmp395; fftw_real tmp491; fftw_real tmp540; fftw_real tmp594; fftw_real tmp390; fftw_real tmp490; fftw_real tmp296; fftw_real tmp555; fftw_real tmp431; fftw_real tmp498; fftw_real tmp552; fftw_real tmp599; fftw_real tmp414; fftw_real tmp501; fftw_real tmp271; fftw_real tmp543; fftw_real tmp406; fftw_real tmp494; fftw_real tmp546; fftw_real tmp595; fftw_real tmp401; fftw_real tmp493; fftw_real tmp319; fftw_real tmp553; fftw_real tmp558; fftw_real tmp600; fftw_real tmp425; fftw_real tmp499; fftw_real tmp434; fftw_real tmp502; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp183; fftw_real tmp621; fftw_real tmp188; fftw_real tmp620; fftw_real tmp194; fftw_real tmp370; fftw_real tmp199; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; tmp183 = X[0]; tmp621 = Y[-31 * iostride]; { fftw_real tmp185; fftw_real tmp187; fftw_real tmp184; fftw_real tmp186; ASSERT_ALIGNED_DOUBLE; tmp185 = X[16 * iostride]; tmp187 = Y[-15 * iostride]; tmp184 = c_re(W[15]); tmp186 = c_im(W[15]); tmp188 = (tmp184 * tmp185) - (tmp186 * tmp187); tmp620 = (tmp186 * tmp185) + (tmp184 * tmp187); } { fftw_real tmp191; fftw_real tmp193; fftw_real tmp190; fftw_real tmp192; ASSERT_ALIGNED_DOUBLE; tmp191 = X[8 * iostride]; tmp193 = Y[-23 * iostride]; tmp190 = c_re(W[7]); tmp192 = c_im(W[7]); tmp194 = (tmp190 * tmp191) - (tmp192 * tmp193); tmp370 = (tmp192 * tmp191) + (tmp190 * tmp193); } { fftw_real tmp196; fftw_real tmp198; fftw_real tmp195; fftw_real tmp197; ASSERT_ALIGNED_DOUBLE; tmp196 = X[24 * iostride]; tmp198 = Y[-7 * iostride]; tmp195 = c_re(W[23]); tmp197 = c_im(W[23]); tmp199 = (tmp195 * tmp196) - (tmp197 * tmp198); tmp371 = (tmp197 * tmp196) + (tmp195 * tmp198); } { fftw_real tmp189; fftw_real tmp200; fftw_real tmp651; fftw_real tmp652; ASSERT_ALIGNED_DOUBLE; tmp189 = tmp183 + tmp188; tmp200 = tmp194 + tmp199; tmp201 = tmp189 + tmp200; tmp533 = tmp189 - tmp200; tmp651 = tmp621 - tmp620; tmp652 = tmp194 - tmp199; tmp653 = tmp651 - tmp652; tmp667 = tmp652 + tmp651; } { fftw_real tmp619; fftw_real tmp622; fftw_real tmp369; fftw_real tmp372; ASSERT_ALIGNED_DOUBLE; tmp619 = tmp370 + tmp371; tmp622 = tmp620 + tmp621; tmp623 = tmp619 + tmp622; tmp637 = tmp622 - tmp619; tmp369 = tmp183 - tmp188; tmp372 = tmp370 - tmp371; tmp373 = tmp369 - tmp372; tmp485 = tmp369 + tmp372; } } { fftw_real tmp325; fftw_real tmp454; fftw_real tmp341; fftw_real tmp439; fftw_real tmp330; fftw_real tmp455; fftw_real tmp336; fftw_real tmp438; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp322; fftw_real tmp324; fftw_real tmp321; fftw_real tmp323; ASSERT_ALIGNED_DOUBLE; tmp322 = X[31 * iostride]; tmp324 = Y[0]; tmp321 = c_re(W[30]); tmp323 = c_im(W[30]); tmp325 = (tmp321 * tmp322) - (tmp323 * tmp324); tmp454 = (tmp323 * tmp322) + (tmp321 * tmp324); } { fftw_real tmp338; fftw_real tmp340; fftw_real tmp337; fftw_real tmp339; ASSERT_ALIGNED_DOUBLE; tmp338 = X[23 * iostride]; tmp340 = Y[-8 * iostride]; tmp337 = c_re(W[22]); tmp339 = c_im(W[22]); tmp341 = (tmp337 * tmp338) - (tmp339 * tmp340); tmp439 = (tmp339 * tmp338) + (tmp337 * tmp340); } { fftw_real tmp327; fftw_real tmp329; fftw_real tmp326; fftw_real tmp328; ASSERT_ALIGNED_DOUBLE; tmp327 = X[15 * iostride]; tmp329 = Y[-16 * iostride]; tmp326 = c_re(W[14]); tmp328 = c_im(W[14]); tmp330 = (tmp326 * tmp327) - (tmp328 * tmp329); tmp455 = (tmp328 * tmp327) + (tmp326 * tmp329); } { fftw_real tmp333; fftw_real tmp335; fftw_real tmp332; fftw_real tmp334; ASSERT_ALIGNED_DOUBLE; tmp333 = X[7 * iostride]; tmp335 = Y[-24 * iostride]; tmp332 = c_re(W[6]); tmp334 = c_im(W[6]); tmp336 = (tmp332 * tmp333) - (tmp334 * tmp335); tmp438 = (tmp334 * tmp333) + (tmp332 * tmp335); } { fftw_real tmp331; fftw_real tmp342; fftw_real tmp456; fftw_real tmp457; ASSERT_ALIGNED_DOUBLE; tmp331 = tmp325 + tmp330; tmp342 = tmp336 + tmp341; tmp343 = tmp331 + tmp342; tmp561 = tmp331 - tmp342; tmp456 = tmp454 - tmp455; tmp457 = tmp336 - tmp341; tmp458 = tmp456 + tmp457; tmp508 = tmp456 - tmp457; } { fftw_real tmp566; fftw_real tmp567; fftw_real tmp437; fftw_real tmp440; ASSERT_ALIGNED_DOUBLE; tmp566 = tmp454 + tmp455; tmp567 = tmp438 + tmp439; tmp568 = tmp566 - tmp567; tmp604 = tmp566 + tmp567; tmp437 = tmp325 - tmp330; tmp440 = tmp438 - tmp439; tmp441 = tmp437 - tmp440; tmp505 = tmp437 + tmp440; } } { fftw_real tmp206; fftw_real tmp374; fftw_real tmp222; fftw_real tmp381; fftw_real tmp211; fftw_real tmp375; fftw_real tmp217; fftw_real tmp380; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp203; fftw_real tmp205; fftw_real tmp202; fftw_real tmp204; ASSERT_ALIGNED_DOUBLE; tmp203 = X[4 * iostride]; tmp205 = Y[-27 * iostride]; tmp202 = c_re(W[3]); tmp204 = c_im(W[3]); tmp206 = (tmp202 * tmp203) - (tmp204 * tmp205); tmp374 = (tmp204 * tmp203) + (tmp202 * tmp205); } { fftw_real tmp219; fftw_real tmp221; fftw_real tmp218; fftw_real tmp220; ASSERT_ALIGNED_DOUBLE; tmp219 = X[12 * iostride]; tmp221 = Y[-19 * iostride]; tmp218 = c_re(W[11]); tmp220 = c_im(W[11]); tmp222 = (tmp218 * tmp219) - (tmp220 * tmp221); tmp381 = (tmp220 * tmp219) + (tmp218 * tmp221); } { fftw_real tmp208; fftw_real tmp210; fftw_real tmp207; fftw_real tmp209; ASSERT_ALIGNED_DOUBLE; tmp208 = X[20 * iostride]; tmp210 = Y[-11 * iostride]; tmp207 = c_re(W[19]); tmp209 = c_im(W[19]); tmp211 = (tmp207 * tmp208) - (tmp209 * tmp210); tmp375 = (tmp209 * tmp208) + (tmp207 * tmp210); } { fftw_real tmp214; fftw_real tmp216; fftw_real tmp213; fftw_real tmp215; ASSERT_ALIGNED_DOUBLE; tmp214 = X[28 * iostride]; tmp216 = Y[-3 * iostride]; tmp213 = c_re(W[27]); tmp215 = c_im(W[27]); tmp217 = (tmp213 * tmp214) - (tmp215 * tmp216); tmp380 = (tmp215 * tmp214) + (tmp213 * tmp216); } { fftw_real tmp212; fftw_real tmp223; fftw_real tmp379; fftw_real tmp382; ASSERT_ALIGNED_DOUBLE; tmp212 = tmp206 + tmp211; tmp223 = tmp217 + tmp222; tmp224 = tmp212 + tmp223; tmp636 = tmp223 - tmp212; tmp379 = tmp217 - tmp222; tmp382 = tmp380 - tmp381; tmp383 = tmp379 + tmp382; tmp487 = tmp379 - tmp382; } { fftw_real tmp534; fftw_real tmp535; fftw_real tmp376; fftw_real tmp377; ASSERT_ALIGNED_DOUBLE; tmp534 = tmp374 + tmp375; tmp535 = tmp380 + tmp381; tmp536 = tmp534 - tmp535; tmp618 = tmp534 + tmp535; tmp376 = tmp374 - tmp375; tmp377 = tmp206 - tmp211; tmp378 = tmp376 - tmp377; tmp486 = tmp377 + tmp376; } } { fftw_real tmp348; fftw_real tmp442; fftw_real tmp353; fftw_real tmp443; fftw_real tmp444; fftw_real tmp445; fftw_real tmp359; fftw_real tmp448; fftw_real tmp364; fftw_real tmp449; fftw_real tmp447; fftw_real tmp450; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp345; fftw_real tmp347; fftw_real tmp344; fftw_real tmp346; ASSERT_ALIGNED_DOUBLE; tmp345 = X[3 * iostride]; tmp347 = Y[-28 * iostride]; tmp344 = c_re(W[2]); tmp346 = c_im(W[2]); tmp348 = (tmp344 * tmp345) - (tmp346 * tmp347); tmp442 = (tmp346 * tmp345) + (tmp344 * tmp347); } { fftw_real tmp350; fftw_real tmp352; fftw_real tmp349; fftw_real tmp351; ASSERT_ALIGNED_DOUBLE; tmp350 = X[19 * iostride]; tmp352 = Y[-12 * iostride]; tmp349 = c_re(W[18]); tmp351 = c_im(W[18]); tmp353 = (tmp349 * tmp350) - (tmp351 * tmp352); tmp443 = (tmp351 * tmp350) + (tmp349 * tmp352); } tmp444 = tmp442 - tmp443; tmp445 = tmp348 - tmp353; { fftw_real tmp356; fftw_real tmp358; fftw_real tmp355; fftw_real tmp357; ASSERT_ALIGNED_DOUBLE; tmp356 = X[27 * iostride]; tmp358 = Y[-4 * iostride]; tmp355 = c_re(W[26]); tmp357 = c_im(W[26]); tmp359 = (tmp355 * tmp356) - (tmp357 * tmp358); tmp448 = (tmp357 * tmp356) + (tmp355 * tmp358); } { fftw_real tmp361; fftw_real tmp363; fftw_real tmp360; fftw_real tmp362; ASSERT_ALIGNED_DOUBLE; tmp361 = X[11 * iostride]; tmp363 = Y[-20 * iostride]; tmp360 = c_re(W[10]); tmp362 = c_im(W[10]); tmp364 = (tmp360 * tmp361) - (tmp362 * tmp363); tmp449 = (tmp362 * tmp361) + (tmp360 * tmp363); } tmp447 = tmp359 - tmp364; tmp450 = tmp448 - tmp449; { fftw_real tmp354; fftw_real tmp365; fftw_real tmp562; fftw_real tmp563; ASSERT_ALIGNED_DOUBLE; tmp354 = tmp348 + tmp353; tmp365 = tmp359 + tmp364; tmp366 = tmp354 + tmp365; tmp569 = tmp365 - tmp354; tmp562 = tmp442 + tmp443; tmp563 = tmp448 + tmp449; tmp564 = tmp562 - tmp563; tmp605 = tmp562 + tmp563; } { fftw_real tmp446; fftw_real tmp451; fftw_real tmp459; fftw_real tmp460; ASSERT_ALIGNED_DOUBLE; tmp446 = tmp444 - tmp445; tmp451 = tmp447 + tmp450; tmp452 = K707106781 * (tmp446 - tmp451); tmp509 = K707106781 * (tmp446 + tmp451); tmp459 = tmp447 - tmp450; tmp460 = tmp445 + tmp444; tmp461 = K707106781 * (tmp459 - tmp460); tmp506 = K707106781 * (tmp460 + tmp459); } } { fftw_real tmp230; fftw_real tmp386; fftw_real tmp246; fftw_real tmp393; fftw_real tmp235; fftw_real tmp387; fftw_real tmp241; fftw_real tmp392; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp227; fftw_real tmp229; fftw_real tmp226; fftw_real tmp228; ASSERT_ALIGNED_DOUBLE; tmp227 = X[2 * iostride]; tmp229 = Y[-29 * iostride]; tmp226 = c_re(W[1]); tmp228 = c_im(W[1]); tmp230 = (tmp226 * tmp227) - (tmp228 * tmp229); tmp386 = (tmp228 * tmp227) + (tmp226 * tmp229); } { fftw_real tmp243; fftw_real tmp245; fftw_real tmp242; fftw_real tmp244; ASSERT_ALIGNED_DOUBLE; tmp243 = X[26 * iostride]; tmp245 = Y[-5 * iostride]; tmp242 = c_re(W[25]); tmp244 = c_im(W[25]); tmp246 = (tmp242 * tmp243) - (tmp244 * tmp245); tmp393 = (tmp244 * tmp243) + (tmp242 * tmp245); } { fftw_real tmp232; fftw_real tmp234; fftw_real tmp231; fftw_real tmp233; ASSERT_ALIGNED_DOUBLE; tmp232 = X[18 * iostride]; tmp234 = Y[-13 * iostride]; tmp231 = c_re(W[17]); tmp233 = c_im(W[17]); tmp235 = (tmp231 * tmp232) - (tmp233 * tmp234); tmp387 = (tmp233 * tmp232) + (tmp231 * tmp234); } { fftw_real tmp238; fftw_real tmp240; fftw_real tmp237; fftw_real tmp239; ASSERT_ALIGNED_DOUBLE; tmp238 = X[10 * iostride]; tmp240 = Y[-21 * iostride]; tmp237 = c_re(W[9]); tmp239 = c_im(W[9]); tmp241 = (tmp237 * tmp238) - (tmp239 * tmp240); tmp392 = (tmp239 * tmp238) + (tmp237 * tmp240); } { fftw_real tmp236; fftw_real tmp247; fftw_real tmp391; fftw_real tmp394; ASSERT_ALIGNED_DOUBLE; tmp236 = tmp230 + tmp235; tmp247 = tmp241 + tmp246; tmp248 = tmp236 + tmp247; tmp541 = tmp236 - tmp247; tmp391 = tmp230 - tmp235; tmp394 = tmp392 - tmp393; tmp395 = tmp391 - tmp394; tmp491 = tmp391 + tmp394; } { fftw_real tmp538; fftw_real tmp539; fftw_real tmp388; fftw_real tmp389; ASSERT_ALIGNED_DOUBLE; tmp538 = tmp386 + tmp387; tmp539 = tmp392 + tmp393; tmp540 = tmp538 - tmp539; tmp594 = tmp538 + tmp539; tmp388 = tmp386 - tmp387; tmp389 = tmp241 - tmp246; tmp390 = tmp388 + tmp389; tmp490 = tmp388 - tmp389; } } { fftw_real tmp278; fftw_real tmp410; fftw_real tmp294; fftw_real tmp429; fftw_real tmp283; fftw_real tmp411; fftw_real tmp289; fftw_real tmp428; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp275; fftw_real tmp277; fftw_real tmp274; fftw_real tmp276; ASSERT_ALIGNED_DOUBLE; tmp275 = X[iostride]; tmp277 = Y[-30 * iostride]; tmp274 = c_re(W[0]); tmp276 = c_im(W[0]); tmp278 = (tmp274 * tmp275) - (tmp276 * tmp277); tmp410 = (tmp276 * tmp275) + (tmp274 * tmp277); } { fftw_real tmp291; fftw_real tmp293; fftw_real tmp290; fftw_real tmp292; ASSERT_ALIGNED_DOUBLE; tmp291 = X[25 * iostride]; tmp293 = Y[-6 * iostride]; tmp290 = c_re(W[24]); tmp292 = c_im(W[24]); tmp294 = (tmp290 * tmp291) - (tmp292 * tmp293); tmp429 = (tmp292 * tmp291) + (tmp290 * tmp293); } { fftw_real tmp280; fftw_real tmp282; fftw_real tmp279; fftw_real tmp281; ASSERT_ALIGNED_DOUBLE; tmp280 = X[17 * iostride]; tmp282 = Y[-14 * iostride]; tmp279 = c_re(W[16]); tmp281 = c_im(W[16]); tmp283 = (tmp279 * tmp280) - (tmp281 * tmp282); tmp411 = (tmp281 * tmp280) + (tmp279 * tmp282); } { fftw_real tmp286; fftw_real tmp288; fftw_real tmp285; fftw_real tmp287; ASSERT_ALIGNED_DOUBLE; tmp286 = X[9 * iostride]; tmp288 = Y[-22 * iostride]; tmp285 = c_re(W[8]); tmp287 = c_im(W[8]); tmp289 = (tmp285 * tmp286) - (tmp287 * tmp288); tmp428 = (tmp287 * tmp286) + (tmp285 * tmp288); } { fftw_real tmp284; fftw_real tmp295; fftw_real tmp427; fftw_real tmp430; ASSERT_ALIGNED_DOUBLE; tmp284 = tmp278 + tmp283; tmp295 = tmp289 + tmp294; tmp296 = tmp284 + tmp295; tmp555 = tmp284 - tmp295; tmp427 = tmp278 - tmp283; tmp430 = tmp428 - tmp429; tmp431 = tmp427 - tmp430; tmp498 = tmp427 + tmp430; } { fftw_real tmp550; fftw_real tmp551; fftw_real tmp412; fftw_real tmp413; ASSERT_ALIGNED_DOUBLE; tmp550 = tmp410 + tmp411; tmp551 = tmp428 + tmp429; tmp552 = tmp550 - tmp551; tmp599 = tmp550 + tmp551; tmp412 = tmp410 - tmp411; tmp413 = tmp289 - tmp294; tmp414 = tmp412 + tmp413; tmp501 = tmp412 - tmp413; } } { fftw_real tmp253; fftw_real tmp397; fftw_real tmp269; fftw_real tmp404; fftw_real tmp258; fftw_real tmp398; fftw_real tmp264; fftw_real tmp403; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp250; fftw_real tmp252; fftw_real tmp249; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; tmp250 = X[30 * iostride]; tmp252 = Y[-iostride]; tmp249 = c_re(W[29]); tmp251 = c_im(W[29]); tmp253 = (tmp249 * tmp250) - (tmp251 * tmp252); tmp397 = (tmp251 * tmp250) + (tmp249 * tmp252); } { fftw_real tmp266; fftw_real tmp268; fftw_real tmp265; fftw_real tmp267; ASSERT_ALIGNED_DOUBLE; tmp266 = X[22 * iostride]; tmp268 = Y[-9 * iostride]; tmp265 = c_re(W[21]); tmp267 = c_im(W[21]); tmp269 = (tmp265 * tmp266) - (tmp267 * tmp268); tmp404 = (tmp267 * tmp266) + (tmp265 * tmp268); } { fftw_real tmp255; fftw_real tmp257; fftw_real tmp254; fftw_real tmp256; ASSERT_ALIGNED_DOUBLE; tmp255 = X[14 * iostride]; tmp257 = Y[-17 * iostride]; tmp254 = c_re(W[13]); tmp256 = c_im(W[13]); tmp258 = (tmp254 * tmp255) - (tmp256 * tmp257); tmp398 = (tmp256 * tmp255) + (tmp254 * tmp257); } { fftw_real tmp261; fftw_real tmp263; fftw_real tmp260; fftw_real tmp262; ASSERT_ALIGNED_DOUBLE; tmp261 = X[6 * iostride]; tmp263 = Y[-25 * iostride]; tmp260 = c_re(W[5]); tmp262 = c_im(W[5]); tmp264 = (tmp260 * tmp261) - (tmp262 * tmp263); tmp403 = (tmp262 * tmp261) + (tmp260 * tmp263); } { fftw_real tmp259; fftw_real tmp270; fftw_real tmp402; fftw_real tmp405; ASSERT_ALIGNED_DOUBLE; tmp259 = tmp253 + tmp258; tmp270 = tmp264 + tmp269; tmp271 = tmp259 + tmp270; tmp543 = tmp259 - tmp270; tmp402 = tmp253 - tmp258; tmp405 = tmp403 - tmp404; tmp406 = tmp402 - tmp405; tmp494 = tmp402 + tmp405; } { fftw_real tmp544; fftw_real tmp545; fftw_real tmp399; fftw_real tmp400; ASSERT_ALIGNED_DOUBLE; tmp544 = tmp397 + tmp398; tmp545 = tmp403 + tmp404; tmp546 = tmp544 - tmp545; tmp595 = tmp544 + tmp545; tmp399 = tmp397 - tmp398; tmp400 = tmp264 - tmp269; tmp401 = tmp399 + tmp400; tmp493 = tmp399 - tmp400; } } { fftw_real tmp301; fftw_real tmp421; fftw_real tmp306; fftw_real tmp422; fftw_real tmp420; fftw_real tmp423; fftw_real tmp312; fftw_real tmp416; fftw_real tmp317; fftw_real tmp417; fftw_real tmp415; fftw_real tmp418; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp298; fftw_real tmp300; fftw_real tmp297; fftw_real tmp299; ASSERT_ALIGNED_DOUBLE; tmp298 = X[5 * iostride]; tmp300 = Y[-26 * iostride]; tmp297 = c_re(W[4]); tmp299 = c_im(W[4]); tmp301 = (tmp297 * tmp298) - (tmp299 * tmp300); tmp421 = (tmp299 * tmp298) + (tmp297 * tmp300); } { fftw_real tmp303; fftw_real tmp305; fftw_real tmp302; fftw_real tmp304; ASSERT_ALIGNED_DOUBLE; tmp303 = X[21 * iostride]; tmp305 = Y[-10 * iostride]; tmp302 = c_re(W[20]); tmp304 = c_im(W[20]); tmp306 = (tmp302 * tmp303) - (tmp304 * tmp305); tmp422 = (tmp304 * tmp303) + (tmp302 * tmp305); } tmp420 = tmp301 - tmp306; tmp423 = tmp421 - tmp422; { fftw_real tmp309; fftw_real tmp311; fftw_real tmp308; fftw_real tmp310; ASSERT_ALIGNED_DOUBLE; tmp309 = X[29 * iostride]; tmp311 = Y[-2 * iostride]; tmp308 = c_re(W[28]); tmp310 = c_im(W[28]); tmp312 = (tmp308 * tmp309) - (tmp310 * tmp311); tmp416 = (tmp310 * tmp309) + (tmp308 * tmp311); } { fftw_real tmp314; fftw_real tmp316; fftw_real tmp313; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; tmp314 = X[13 * iostride]; tmp316 = Y[-18 * iostride]; tmp313 = c_re(W[12]); tmp315 = c_im(W[12]); tmp317 = (tmp313 * tmp314) - (tmp315 * tmp316); tmp417 = (tmp315 * tmp314) + (tmp313 * tmp316); } tmp415 = tmp312 - tmp317; tmp418 = tmp416 - tmp417; { fftw_real tmp307; fftw_real tmp318; fftw_real tmp556; fftw_real tmp557; ASSERT_ALIGNED_DOUBLE; tmp307 = tmp301 + tmp306; tmp318 = tmp312 + tmp317; tmp319 = tmp307 + tmp318; tmp553 = tmp318 - tmp307; tmp556 = tmp421 + tmp422; tmp557 = tmp416 + tmp417; tmp558 = tmp556 - tmp557; tmp600 = tmp556 + tmp557; } { fftw_real tmp419; fftw_real tmp424; fftw_real tmp432; fftw_real tmp433; ASSERT_ALIGNED_DOUBLE; tmp419 = tmp415 - tmp418; tmp424 = tmp420 + tmp423; tmp425 = K707106781 * (tmp419 - tmp424); tmp499 = K707106781 * (tmp424 + tmp419); tmp432 = tmp423 - tmp420; tmp433 = tmp415 + tmp418; tmp434 = K707106781 * (tmp432 - tmp433); tmp502 = K707106781 * (tmp432 + tmp433); } } { fftw_real tmp273; fftw_real tmp613; fftw_real tmp625; fftw_real tmp627; fftw_real tmp368; fftw_real tmp628; fftw_real tmp616; fftw_real tmp626; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp225; fftw_real tmp272; fftw_real tmp617; fftw_real tmp624; ASSERT_ALIGNED_DOUBLE; tmp225 = tmp201 + tmp224; tmp272 = tmp248 + tmp271; tmp273 = tmp225 + tmp272; tmp613 = tmp225 - tmp272; tmp617 = tmp594 + tmp595; tmp624 = tmp618 + tmp623; tmp625 = tmp617 + tmp624; tmp627 = tmp624 - tmp617; } { fftw_real tmp320; fftw_real tmp367; fftw_real tmp614; fftw_real tmp615; ASSERT_ALIGNED_DOUBLE; tmp320 = tmp296 + tmp319; tmp367 = tmp343 + tmp366; tmp368 = tmp320 + tmp367; tmp628 = tmp367 - tmp320; tmp614 = tmp599 + tmp600; tmp615 = tmp604 + tmp605; tmp616 = tmp614 - tmp615; tmp626 = tmp614 + tmp615; } Y[-16 * iostride] = tmp273 - tmp368; X[0] = tmp273 + tmp368; Y[-24 * iostride] = tmp613 - tmp616; X[8 * iostride] = tmp613 + tmp616; X[16 * iostride] = -(tmp625 - tmp626); Y[0] = tmp626 + tmp625; X[24 * iostride] = -(tmp627 - tmp628); Y[-8 * iostride] = tmp628 + tmp627; } { fftw_real tmp597; fftw_real tmp609; fftw_real tmp631; fftw_real tmp633; fftw_real tmp602; fftw_real tmp610; fftw_real tmp607; fftw_real tmp611; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp593; fftw_real tmp596; fftw_real tmp629; fftw_real tmp630; ASSERT_ALIGNED_DOUBLE; tmp593 = tmp201 - tmp224; tmp596 = tmp594 - tmp595; tmp597 = tmp593 + tmp596; tmp609 = tmp593 - tmp596; tmp629 = tmp271 - tmp248; tmp630 = tmp623 - tmp618; tmp631 = tmp629 + tmp630; tmp633 = tmp630 - tmp629; } { fftw_real tmp598; fftw_real tmp601; fftw_real tmp603; fftw_real tmp606; ASSERT_ALIGNED_DOUBLE; tmp598 = tmp296 - tmp319; tmp601 = tmp599 - tmp600; tmp602 = tmp598 + tmp601; tmp610 = tmp601 - tmp598; tmp603 = tmp343 - tmp366; tmp606 = tmp604 - tmp605; tmp607 = tmp603 - tmp606; tmp611 = tmp603 + tmp606; } { fftw_real tmp608; fftw_real tmp634; fftw_real tmp612; fftw_real tmp632; ASSERT_ALIGNED_DOUBLE; tmp608 = K707106781 * (tmp602 + tmp607); Y[-20 * iostride] = tmp597 - tmp608; X[4 * iostride] = tmp597 + tmp608; tmp634 = K707106781 * (tmp607 - tmp602); X[28 * iostride] = -(tmp633 - tmp634); Y[-12 * iostride] = tmp634 + tmp633; tmp612 = K707106781 * (tmp610 - tmp611); Y[-28 * iostride] = tmp609 - tmp612; X[12 * iostride] = tmp609 + tmp612; tmp632 = K707106781 * (tmp610 + tmp611); X[20 * iostride] = -(tmp631 - tmp632); Y[-4 * iostride] = tmp632 + tmp631; } } { fftw_real tmp537; fftw_real tmp577; fftw_real tmp548; fftw_real tmp635; fftw_real tmp580; fftw_real tmp643; fftw_real tmp560; fftw_real tmp574; fftw_real tmp638; fftw_real tmp644; fftw_real tmp584; fftw_real tmp590; fftw_real tmp571; fftw_real tmp575; fftw_real tmp587; fftw_real tmp591; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp542; fftw_real tmp547; fftw_real tmp582; fftw_real tmp583; ASSERT_ALIGNED_DOUBLE; tmp537 = tmp533 - tmp536; tmp577 = tmp533 + tmp536; tmp542 = tmp540 - tmp541; tmp547 = tmp543 + tmp546; tmp548 = K707106781 * (tmp542 - tmp547); tmp635 = K707106781 * (tmp542 + tmp547); { fftw_real tmp578; fftw_real tmp579; fftw_real tmp554; fftw_real tmp559; ASSERT_ALIGNED_DOUBLE; tmp578 = tmp541 + tmp540; tmp579 = tmp543 - tmp546; tmp580 = K707106781 * (tmp578 + tmp579); tmp643 = K707106781 * (tmp579 - tmp578); tmp554 = tmp552 - tmp553; tmp559 = tmp555 - tmp558; tmp560 = (K923879532 * tmp554) + (K382683432 * tmp559); tmp574 = (K382683432 * tmp554) - (K923879532 * tmp559); } tmp638 = tmp636 + tmp637; tmp644 = tmp637 - tmp636; tmp582 = tmp552 + tmp553; tmp583 = tmp555 + tmp558; tmp584 = (K382683432 * tmp582) + (K923879532 * tmp583); tmp590 = (K923879532 * tmp582) - (K382683432 * tmp583); { fftw_real tmp565; fftw_real tmp570; fftw_real tmp585; fftw_real tmp586; ASSERT_ALIGNED_DOUBLE; tmp565 = tmp561 - tmp564; tmp570 = tmp568 - tmp569; tmp571 = (K382683432 * tmp565) - (K923879532 * tmp570); tmp575 = (K382683432 * tmp570) + (K923879532 * tmp565); tmp585 = tmp561 + tmp564; tmp586 = tmp568 + tmp569; tmp587 = (K923879532 * tmp585) - (K382683432 * tmp586); tmp591 = (K923879532 * tmp586) + (K382683432 * tmp585); } } { fftw_real tmp549; fftw_real tmp572; fftw_real tmp573; fftw_real tmp576; ASSERT_ALIGNED_DOUBLE; tmp549 = tmp537 + tmp548; tmp572 = tmp560 + tmp571; Y[-22 * iostride] = tmp549 - tmp572; X[6 * iostride] = tmp549 + tmp572; tmp573 = tmp537 - tmp548; tmp576 = tmp574 - tmp575; Y[-30 * iostride] = tmp573 - tmp576; X[14 * iostride] = tmp573 + tmp576; } { fftw_real tmp645; fftw_real tmp646; fftw_real tmp647; fftw_real tmp648; ASSERT_ALIGNED_DOUBLE; tmp645 = tmp643 + tmp644; tmp646 = tmp574 + tmp575; X[22 * iostride] = -(tmp645 - tmp646); Y[-6 * iostride] = tmp646 + tmp645; tmp647 = tmp644 - tmp643; tmp648 = tmp571 - tmp560; X[30 * iostride] = -(tmp647 - tmp648); Y[-14 * iostride] = tmp648 + tmp647; } { fftw_real tmp581; fftw_real tmp588; fftw_real tmp589; fftw_real tmp592; ASSERT_ALIGNED_DOUBLE; tmp581 = tmp577 + tmp580; tmp588 = tmp584 + tmp587; Y[-18 * iostride] = tmp581 - tmp588; X[2 * iostride] = tmp581 + tmp588; tmp589 = tmp577 - tmp580; tmp592 = tmp590 - tmp591; Y[-26 * iostride] = tmp589 - tmp592; X[10 * iostride] = tmp589 + tmp592; } { fftw_real tmp639; fftw_real tmp640; fftw_real tmp641; fftw_real tmp642; ASSERT_ALIGNED_DOUBLE; tmp639 = tmp635 + tmp638; tmp640 = tmp590 + tmp591; X[18 * iostride] = -(tmp639 - tmp640); Y[-2 * iostride] = tmp640 + tmp639; tmp641 = tmp638 - tmp635; tmp642 = tmp587 - tmp584; X[26 * iostride] = -(tmp641 - tmp642); Y[-10 * iostride] = tmp642 + tmp641; } } { fftw_real tmp489; fftw_real tmp517; fftw_real tmp520; fftw_real tmp659; fftw_real tmp654; fftw_real tmp660; fftw_real tmp496; fftw_real tmp649; fftw_real tmp504; fftw_real tmp514; fftw_real tmp524; fftw_real tmp530; fftw_real tmp511; fftw_real tmp515; fftw_real tmp527; fftw_real tmp531; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp488; fftw_real tmp518; fftw_real tmp519; fftw_real tmp650; fftw_real tmp492; fftw_real tmp495; ASSERT_ALIGNED_DOUBLE; tmp488 = K707106781 * (tmp486 + tmp487); tmp489 = tmp485 - tmp488; tmp517 = tmp485 + tmp488; tmp518 = (K382683432 * tmp490) + (K923879532 * tmp491); tmp519 = (K923879532 * tmp494) - (K382683432 * tmp493); tmp520 = tmp518 + tmp519; tmp659 = tmp519 - tmp518; tmp650 = K707106781 * (tmp378 + tmp383); tmp654 = tmp650 + tmp653; tmp660 = tmp653 - tmp650; tmp492 = (K923879532 * tmp490) - (K382683432 * tmp491); tmp495 = (K923879532 * tmp493) + (K382683432 * tmp494); tmp496 = tmp492 - tmp495; tmp649 = tmp492 + tmp495; } { fftw_real tmp500; fftw_real tmp503; fftw_real tmp522; fftw_real tmp523; ASSERT_ALIGNED_DOUBLE; tmp500 = tmp498 - tmp499; tmp503 = tmp501 - tmp502; tmp504 = (K555570233 * tmp500) + (K831469612 * tmp503); tmp514 = (K555570233 * tmp503) - (K831469612 * tmp500); tmp522 = tmp498 + tmp499; tmp523 = tmp501 + tmp502; tmp524 = (K980785280 * tmp522) + (K195090322 * tmp523); tmp530 = (K980785280 * tmp523) - (K195090322 * tmp522); } { fftw_real tmp507; fftw_real tmp510; fftw_real tmp525; fftw_real tmp526; ASSERT_ALIGNED_DOUBLE; tmp507 = tmp505 - tmp506; tmp510 = tmp508 - tmp509; tmp511 = (K555570233 * tmp507) - (K831469612 * tmp510); tmp515 = (K831469612 * tmp507) + (K555570233 * tmp510); tmp525 = tmp505 + tmp506; tmp526 = tmp508 + tmp509; tmp527 = (K980785280 * tmp525) - (K195090322 * tmp526); tmp531 = (K195090322 * tmp525) + (K980785280 * tmp526); } { fftw_real tmp497; fftw_real tmp512; fftw_real tmp513; fftw_real tmp516; ASSERT_ALIGNED_DOUBLE; tmp497 = tmp489 + tmp496; tmp512 = tmp504 + tmp511; Y[-21 * iostride] = tmp497 - tmp512; X[5 * iostride] = tmp497 + tmp512; tmp513 = tmp489 - tmp496; tmp516 = tmp514 - tmp515; Y[-29 * iostride] = tmp513 - tmp516; X[13 * iostride] = tmp513 + tmp516; } { fftw_real tmp661; fftw_real tmp662; fftw_real tmp663; fftw_real tmp664; ASSERT_ALIGNED_DOUBLE; tmp661 = tmp659 + tmp660; tmp662 = tmp514 + tmp515; X[21 * iostride] = -(tmp661 - tmp662); Y[-5 * iostride] = tmp662 + tmp661; tmp663 = tmp660 - tmp659; tmp664 = tmp511 - tmp504; X[29 * iostride] = -(tmp663 - tmp664); Y[-13 * iostride] = tmp664 + tmp663; } { fftw_real tmp521; fftw_real tmp528; fftw_real tmp529; fftw_real tmp532; ASSERT_ALIGNED_DOUBLE; tmp521 = tmp517 + tmp520; tmp528 = tmp524 + tmp527; Y[-17 * iostride] = tmp521 - tmp528; X[iostride] = tmp521 + tmp528; tmp529 = tmp517 - tmp520; tmp532 = tmp530 - tmp531; Y[-25 * iostride] = tmp529 - tmp532; X[9 * iostride] = tmp529 + tmp532; } { fftw_real tmp655; fftw_real tmp656; fftw_real tmp657; fftw_real tmp658; ASSERT_ALIGNED_DOUBLE; tmp655 = tmp649 + tmp654; tmp656 = tmp530 + tmp531; X[17 * iostride] = -(tmp655 - tmp656); Y[-iostride] = tmp656 + tmp655; tmp657 = tmp654 - tmp649; tmp658 = tmp527 - tmp524; X[25 * iostride] = -(tmp657 - tmp658); Y[-9 * iostride] = tmp658 + tmp657; } } { fftw_real tmp385; fftw_real tmp469; fftw_real tmp472; fftw_real tmp673; fftw_real tmp668; fftw_real tmp674; fftw_real tmp408; fftw_real tmp665; fftw_real tmp436; fftw_real tmp466; fftw_real tmp476; fftw_real tmp482; fftw_real tmp463; fftw_real tmp467; fftw_real tmp479; fftw_real tmp483; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp384; fftw_real tmp470; fftw_real tmp471; fftw_real tmp666; fftw_real tmp396; fftw_real tmp407; ASSERT_ALIGNED_DOUBLE; tmp384 = K707106781 * (tmp378 - tmp383); tmp385 = tmp373 - tmp384; tmp469 = tmp373 + tmp384; tmp470 = (K923879532 * tmp390) + (K382683432 * tmp395); tmp471 = (K382683432 * tmp406) - (K923879532 * tmp401); tmp472 = tmp470 + tmp471; tmp673 = tmp471 - tmp470; tmp666 = K707106781 * (tmp487 - tmp486); tmp668 = tmp666 + tmp667; tmp674 = tmp667 - tmp666; tmp396 = (K382683432 * tmp390) - (K923879532 * tmp395); tmp407 = (K382683432 * tmp401) + (K923879532 * tmp406); tmp408 = tmp396 - tmp407; tmp665 = tmp396 + tmp407; } { fftw_real tmp426; fftw_real tmp435; fftw_real tmp474; fftw_real tmp475; ASSERT_ALIGNED_DOUBLE; tmp426 = tmp414 - tmp425; tmp435 = tmp431 - tmp434; tmp436 = (K980785280 * tmp426) + (K195090322 * tmp435); tmp466 = (K195090322 * tmp426) - (K980785280 * tmp435); tmp474 = tmp414 + tmp425; tmp475 = tmp431 + tmp434; tmp476 = (K555570233 * tmp474) + (K831469612 * tmp475); tmp482 = (K831469612 * tmp474) - (K555570233 * tmp475); } { fftw_real tmp453; fftw_real tmp462; fftw_real tmp477; fftw_real tmp478; ASSERT_ALIGNED_DOUBLE; tmp453 = tmp441 - tmp452; tmp462 = tmp458 - tmp461; tmp463 = (K195090322 * tmp453) - (K980785280 * tmp462); tmp467 = (K195090322 * tmp462) + (K980785280 * tmp453); tmp477 = tmp441 + tmp452; tmp478 = tmp458 + tmp461; tmp479 = (K831469612 * tmp477) - (K555570233 * tmp478); tmp483 = (K831469612 * tmp478) + (K555570233 * tmp477); } { fftw_real tmp409; fftw_real tmp464; fftw_real tmp465; fftw_real tmp468; ASSERT_ALIGNED_DOUBLE; tmp409 = tmp385 + tmp408; tmp464 = tmp436 + tmp463; Y[-23 * iostride] = tmp409 - tmp464; X[7 * iostride] = tmp409 + tmp464; tmp465 = tmp385 - tmp408; tmp468 = tmp466 - tmp467; Y[-31 * iostride] = tmp465 - tmp468; X[15 * iostride] = tmp465 + tmp468; } { fftw_real tmp675; fftw_real tmp676; fftw_real tmp677; fftw_real tmp678; ASSERT_ALIGNED_DOUBLE; tmp675 = tmp673 + tmp674; tmp676 = tmp466 + tmp467; X[23 * iostride] = -(tmp675 - tmp676); Y[-7 * iostride] = tmp676 + tmp675; tmp677 = tmp674 - tmp673; tmp678 = tmp463 - tmp436; X[31 * iostride] = -(tmp677 - tmp678); Y[-15 * iostride] = tmp678 + tmp677; } { fftw_real tmp473; fftw_real tmp480; fftw_real tmp481; fftw_real tmp484; ASSERT_ALIGNED_DOUBLE; tmp473 = tmp469 + tmp472; tmp480 = tmp476 + tmp479; Y[-19 * iostride] = tmp473 - tmp480; X[3 * iostride] = tmp473 + tmp480; tmp481 = tmp469 - tmp472; tmp484 = tmp482 - tmp483; Y[-27 * iostride] = tmp481 - tmp484; X[11 * iostride] = tmp481 + tmp484; } { fftw_real tmp669; fftw_real tmp670; fftw_real tmp671; fftw_real tmp672; ASSERT_ALIGNED_DOUBLE; tmp669 = tmp665 + tmp668; tmp670 = tmp482 + tmp483; X[19 * iostride] = -(tmp669 - tmp670); Y[-3 * iostride] = tmp670 + tmp669; tmp671 = tmp668 - tmp665; tmp672 = tmp479 - tmp476; X[27 * iostride] = -(tmp671 - tmp672); Y[-11 * iostride] = tmp672 + tmp671; } } } if (i == m) { fftw_real tmp5; fftw_real tmp105; fftw_real tmp158; fftw_real tmp171; fftw_real tmp12; fftw_real tmp170; fftw_real tmp108; fftw_real tmp155; fftw_real tmp74; fftw_real tmp97; fftw_real tmp130; fftw_real tmp146; fftw_real tmp82; fftw_real tmp98; fftw_real tmp127; fftw_real tmp145; fftw_real tmp24; fftw_real tmp90; fftw_real tmp115; fftw_real tmp138; fftw_real tmp35; fftw_real tmp91; fftw_real tmp112; fftw_real tmp139; fftw_real tmp51; fftw_real tmp94; fftw_real tmp123; fftw_real tmp143; fftw_real tmp59; fftw_real tmp95; fftw_real tmp120; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp157; fftw_real tmp4; fftw_real tmp156; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp157 = X[16 * iostride]; tmp2 = X[8 * iostride]; tmp3 = X[24 * iostride]; tmp4 = K707106781 * (tmp2 - tmp3); tmp156 = K707106781 * (tmp2 + tmp3); tmp5 = tmp1 + tmp4; tmp105 = tmp1 - tmp4; tmp158 = tmp156 + tmp157; tmp171 = tmp157 - tmp156; } { fftw_real tmp8; fftw_real tmp106; fftw_real tmp11; fftw_real tmp107; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp6; fftw_real tmp7; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp6 = X[4 * iostride]; tmp7 = X[20 * iostride]; tmp8 = (K923879532 * tmp6) - (K382683432 * tmp7); tmp106 = (K382683432 * tmp6) + (K923879532 * tmp7); tmp9 = X[12 * iostride]; tmp10 = X[28 * iostride]; tmp11 = (K382683432 * tmp9) - (K923879532 * tmp10); tmp107 = (K923879532 * tmp9) + (K382683432 * tmp10); } tmp12 = tmp8 + tmp11; tmp170 = tmp11 - tmp8; tmp108 = tmp106 - tmp107; tmp155 = tmp106 + tmp107; } { fftw_real tmp65; fftw_real tmp80; fftw_real tmp63; fftw_real tmp78; fftw_real tmp69; fftw_real tmp75; fftw_real tmp72; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp64; fftw_real tmp79; fftw_real tmp61; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp64 = X[31 * iostride]; tmp65 = K2_000000000 * tmp64; tmp79 = X[15 * iostride]; tmp80 = K2_000000000 * tmp79; tmp61 = X[7 * iostride]; tmp62 = X[23 * iostride]; tmp63 = K1_414213562 * (tmp61 - tmp62); tmp78 = K1_414213562 * (tmp61 + tmp62); { fftw_real tmp67; fftw_real tmp68; fftw_real tmp70; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; tmp67 = X[3 * iostride]; tmp68 = X[19 * iostride]; tmp69 = (K1_847759065 * tmp67) - (K765366864 * tmp68); tmp75 = (K765366864 * tmp67) + (K1_847759065 * tmp68); tmp70 = X[11 * iostride]; tmp71 = X[27 * iostride]; tmp72 = (K765366864 * tmp70) - (K1_847759065 * tmp71); tmp76 = (K1_847759065 * tmp70) + (K765366864 * tmp71); } } { fftw_real tmp66; fftw_real tmp73; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp66 = tmp63 - tmp65; tmp73 = tmp69 + tmp72; tmp74 = tmp66 + tmp73; tmp97 = tmp66 - tmp73; tmp128 = tmp72 - tmp69; tmp129 = tmp80 - tmp78; tmp130 = tmp128 - tmp129; tmp146 = tmp128 + tmp129; } { fftw_real tmp77; fftw_real tmp81; fftw_real tmp125; fftw_real tmp126; ASSERT_ALIGNED_DOUBLE; tmp77 = tmp75 + tmp76; tmp81 = tmp78 + tmp80; tmp82 = tmp77 + tmp81; tmp98 = tmp81 - tmp77; tmp125 = tmp63 + tmp65; tmp126 = tmp75 - tmp76; tmp127 = tmp125 + tmp126; tmp145 = tmp126 - tmp125; } } { fftw_real tmp15; fftw_real tmp22; fftw_real tmp18; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp14; fftw_real tmp21; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp14 = X[2 * iostride]; tmp15 = K2_000000000 * tmp14; tmp21 = X[18 * iostride]; tmp22 = K2_000000000 * tmp21; tmp16 = X[10 * iostride]; tmp17 = X[26 * iostride]; tmp18 = K1_414213562 * (tmp16 - tmp17); tmp20 = K1_414213562 * (tmp16 + tmp17); } { fftw_real tmp19; fftw_real tmp23; fftw_real tmp113; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; tmp19 = tmp15 + tmp18; tmp23 = tmp20 + tmp22; tmp24 = (K490392640 * tmp19) - (K097545161 * tmp23); tmp90 = (K097545161 * tmp19) + (K490392640 * tmp23); tmp113 = tmp22 - tmp20; tmp114 = tmp15 - tmp18; tmp115 = (K415734806 * tmp113) - (K277785116 * tmp114); tmp138 = (K415734806 * tmp114) + (K277785116 * tmp113); } } { fftw_real tmp29; fftw_real tmp33; fftw_real tmp27; fftw_real tmp31; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp28; fftw_real tmp32; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp28 = X[30 * iostride]; tmp29 = K2_000000000 * tmp28; tmp32 = X[14 * iostride]; tmp33 = K2_000000000 * tmp32; tmp25 = X[6 * iostride]; tmp26 = X[22 * iostride]; tmp27 = K1_414213562 * (tmp25 - tmp26); tmp31 = K1_414213562 * (tmp25 + tmp26); } { fftw_real tmp30; fftw_real tmp34; fftw_real tmp110; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp30 = tmp27 - tmp29; tmp34 = tmp31 + tmp33; tmp35 = (K490392640 * tmp30) + (K097545161 * tmp34); tmp91 = (K097545161 * tmp30) - (K490392640 * tmp34); tmp110 = tmp33 - tmp31; tmp111 = tmp27 + tmp29; tmp112 = (K415734806 * tmp110) - (K277785116 * tmp111); tmp139 = (K415734806 * tmp111) + (K277785116 * tmp110); } } { fftw_real tmp39; fftw_real tmp57; fftw_real tmp42; fftw_real tmp55; fftw_real tmp46; fftw_real tmp52; fftw_real tmp49; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp38; fftw_real tmp56; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp38 = X[iostride]; tmp39 = K2_000000000 * tmp38; tmp56 = X[17 * iostride]; tmp57 = K2_000000000 * tmp56; tmp40 = X[9 * iostride]; tmp41 = X[25 * iostride]; tmp42 = K1_414213562 * (tmp40 - tmp41); tmp55 = K1_414213562 * (tmp40 + tmp41); { fftw_real tmp44; fftw_real tmp45; fftw_real tmp47; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp44 = X[5 * iostride]; tmp45 = X[21 * iostride]; tmp46 = (K1_847759065 * tmp44) - (K765366864 * tmp45); tmp52 = (K765366864 * tmp44) + (K1_847759065 * tmp45); tmp47 = X[13 * iostride]; tmp48 = X[29 * iostride]; tmp49 = (K765366864 * tmp47) - (K1_847759065 * tmp48); tmp53 = (K1_847759065 * tmp47) + (K765366864 * tmp48); } } { fftw_real tmp43; fftw_real tmp50; fftw_real tmp121; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp39 + tmp42; tmp50 = tmp46 + tmp49; tmp51 = tmp43 + tmp50; tmp94 = tmp43 - tmp50; tmp121 = tmp49 - tmp46; tmp122 = tmp57 - tmp55; tmp123 = tmp121 - tmp122; tmp143 = tmp121 + tmp122; } { fftw_real tmp54; fftw_real tmp58; fftw_real tmp118; fftw_real tmp119; ASSERT_ALIGNED_DOUBLE; tmp54 = tmp52 + tmp53; tmp58 = tmp55 + tmp57; tmp59 = tmp54 + tmp58; tmp95 = tmp58 - tmp54; tmp118 = tmp39 - tmp42; tmp119 = tmp52 - tmp53; tmp120 = tmp118 - tmp119; tmp142 = tmp118 + tmp119; } } { fftw_real tmp37; fftw_real tmp85; fftw_real tmp160; fftw_real tmp162; fftw_real tmp84; fftw_real tmp153; fftw_real tmp88; fftw_real tmp161; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp13; fftw_real tmp36; fftw_real tmp154; fftw_real tmp159; ASSERT_ALIGNED_DOUBLE; tmp13 = tmp5 + tmp12; tmp36 = tmp24 + tmp35; tmp37 = tmp13 - tmp36; tmp85 = tmp13 + tmp36; tmp154 = tmp91 - tmp90; tmp159 = tmp155 + tmp158; tmp160 = tmp154 - tmp159; tmp162 = tmp154 + tmp159; } { fftw_real tmp60; fftw_real tmp83; fftw_real tmp86; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp60 = (K049008570 * tmp51) + (K497592363 * tmp59); tmp83 = (K049008570 * tmp74) - (K497592363 * tmp82); tmp84 = tmp60 + tmp83; tmp153 = tmp83 - tmp60; tmp86 = (K497592363 * tmp51) - (K049008570 * tmp59); tmp87 = (K497592363 * tmp74) + (K049008570 * tmp82); tmp88 = tmp86 + tmp87; tmp161 = tmp87 - tmp86; } X[8 * iostride] = tmp37 - tmp84; X[7 * iostride] = tmp37 + tmp84; X[15 * iostride] = tmp85 - tmp88; X[0] = tmp85 + tmp88; Y[-15 * iostride] = tmp153 - tmp160; Y[0] = tmp153 + tmp160; Y[-8 * iostride] = tmp161 - tmp162; Y[-7 * iostride] = tmp161 + tmp162; } { fftw_real tmp93; fftw_real tmp101; fftw_real tmp166; fftw_real tmp168; fftw_real tmp100; fftw_real tmp163; fftw_real tmp104; fftw_real tmp167; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp89; fftw_real tmp92; fftw_real tmp164; fftw_real tmp165; ASSERT_ALIGNED_DOUBLE; tmp89 = tmp5 - tmp12; tmp92 = tmp90 + tmp91; tmp93 = tmp89 + tmp92; tmp101 = tmp89 - tmp92; tmp164 = tmp35 - tmp24; tmp165 = tmp158 - tmp155; tmp166 = tmp164 - tmp165; tmp168 = tmp164 + tmp165; } { fftw_real tmp96; fftw_real tmp99; fftw_real tmp102; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp96 = (K386505226 * tmp94) + (K317196642 * tmp95); tmp99 = (K386505226 * tmp97) - (K317196642 * tmp98); tmp100 = tmp96 + tmp99; tmp163 = tmp99 - tmp96; tmp102 = (K317196642 * tmp97) + (K386505226 * tmp98); tmp103 = (K386505226 * tmp95) - (K317196642 * tmp94); tmp104 = tmp102 - tmp103; tmp167 = tmp103 + tmp102; } X[12 * iostride] = tmp93 - tmp100; X[3 * iostride] = tmp93 + tmp100; X[11 * iostride] = tmp101 - tmp104; X[4 * iostride] = tmp101 + tmp104; Y[-11 * iostride] = tmp163 - tmp166; Y[-4 * iostride] = tmp163 + tmp166; Y[-12 * iostride] = tmp167 - tmp168; Y[-3 * iostride] = tmp167 + tmp168; } { fftw_real tmp117; fftw_real tmp133; fftw_real tmp174; fftw_real tmp176; fftw_real tmp132; fftw_real tmp175; fftw_real tmp136; fftw_real tmp169; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp109; fftw_real tmp116; fftw_real tmp172; fftw_real tmp173; ASSERT_ALIGNED_DOUBLE; tmp109 = tmp105 - tmp108; tmp116 = tmp112 - tmp115; tmp117 = tmp109 + tmp116; tmp133 = tmp109 - tmp116; tmp172 = tmp170 - tmp171; tmp173 = tmp138 + tmp139; tmp174 = tmp172 - tmp173; tmp176 = tmp173 + tmp172; } { fftw_real tmp124; fftw_real tmp131; fftw_real tmp134; fftw_real tmp135; ASSERT_ALIGNED_DOUBLE; tmp124 = (K440960632 * tmp120) + (K235698368 * tmp123); tmp131 = (K440960632 * tmp127) + (K235698368 * tmp130); tmp132 = tmp124 - tmp131; tmp175 = tmp124 + tmp131; tmp134 = (K440960632 * tmp130) - (K235698368 * tmp127); tmp135 = (K440960632 * tmp123) - (K235698368 * tmp120); tmp136 = tmp134 - tmp135; tmp169 = tmp135 + tmp134; } X[13 * iostride] = tmp117 - tmp132; X[2 * iostride] = tmp117 + tmp132; X[10 * iostride] = tmp133 - tmp136; X[5 * iostride] = tmp133 + tmp136; Y[-13 * iostride] = tmp169 - tmp174; Y[-2 * iostride] = tmp169 + tmp174; Y[-5 * iostride] = -(tmp175 + tmp176); Y[-10 * iostride] = tmp176 - tmp175; } { fftw_real tmp141; fftw_real tmp149; fftw_real tmp180; fftw_real tmp182; fftw_real tmp148; fftw_real tmp177; fftw_real tmp152; fftw_real tmp181; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp137; fftw_real tmp140; fftw_real tmp178; fftw_real tmp179; ASSERT_ALIGNED_DOUBLE; tmp137 = tmp105 + tmp108; tmp140 = tmp138 - tmp139; tmp141 = tmp137 + tmp140; tmp149 = tmp137 - tmp140; tmp178 = tmp115 + tmp112; tmp179 = tmp170 + tmp171; tmp180 = tmp178 - tmp179; tmp182 = tmp178 + tmp179; } { fftw_real tmp144; fftw_real tmp147; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp144 = (K478470167 * tmp142) + (K145142338 * tmp143); tmp147 = (K478470167 * tmp145) - (K145142338 * tmp146); tmp148 = tmp144 + tmp147; tmp177 = tmp147 - tmp144; tmp150 = (K145142338 * tmp145) + (K478470167 * tmp146); tmp151 = (K478470167 * tmp143) - (K145142338 * tmp142); tmp152 = tmp150 - tmp151; tmp181 = tmp151 + tmp150; } X[14 * iostride] = tmp141 - tmp148; X[iostride] = tmp141 + tmp148; X[9 * iostride] = tmp149 - tmp152; X[6 * iostride] = tmp149 + tmp152; Y[-9 * iostride] = tmp177 - tmp180; Y[-6 * iostride] = tmp177 + tmp180; Y[-14 * iostride] = tmp181 - tmp182; Y[-iostride] = tmp181 + tmp182; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; fftw_codelet_desc fftw_hc2hc_forward_32_desc = { "fftw_hc2hc_forward_32", (void (*)()) fftw_hc2hc_forward_32, 32, FFTW_FORWARD, FFTW_HC2HC, 707, 31, twiddle_order, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_1.c����������������������������������������������������������������������������0000644�0001754�0000144�00000003610�07637527217�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:55 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 1 */ /* * This function contains 0 FP additions, 0 FP multiplications, * (or, 0 additions, 0 multiplications, 0 fused multiply/add), * 1 stack variables, and 2 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_1(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp1; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; output[0] = tmp1; } fftw_codelet_desc fftw_hc2real_1_desc = { "fftw_hc2real_1", (void (*)()) fftw_hc2real_1, 1, FFTW_BACKWARD, FFTW_HC2REAL, 37, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_2.c����������������������������������������������������������������������������0000644�0001754�0000144�00000003756�07637527220�010462� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:56 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 2 */ /* * This function contains 2 FP additions, 0 FP multiplications, * (or, 2 additions, 0 multiplications, 0 fused multiply/add), * 2 stack variables, and 4 memory accesses */ /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_2(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; tmp2 = real_input[real_istride]; output[ostride] = tmp1 - tmp2; output[0] = tmp1 + tmp2; } fftw_codelet_desc fftw_hc2real_2_desc = { "fftw_hc2real_2", (void (*)()) fftw_hc2real_2, 2, FFTW_BACKWARD, FFTW_HC2REAL, 59, 0, (const int *) 0, }; ������������������fftw-2.1.5/rfftw/fcr_3.c����������������������������������������������������������������������������0000644�0001754�0000144�00000004616�07637527220�010457� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:56 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 3 */ /* * This function contains 4 FP additions, 2 FP multiplications, * (or, 3 additions, 1 multiplications, 1 fused multiply/add), * 5 stack variables, and 6 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_3(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp5; fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp4 = imag_input[imag_istride]; tmp5 = K1_732050807 * tmp4; tmp1 = real_input[0]; tmp2 = real_input[real_istride]; tmp3 = tmp1 - tmp2; output[0] = tmp1 + (K2_000000000 * tmp2); output[2 * ostride] = tmp3 + tmp5; output[ostride] = tmp3 - tmp5; } fftw_codelet_desc fftw_hc2real_3_desc = { "fftw_hc2real_3", (void (*)()) fftw_hc2real_3, 3, FFTW_BACKWARD, FFTW_HC2REAL, 81, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_4.c����������������������������������������������������������������������������0000644�0001754�0000144�00000004765�07637527220�010465� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:56 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 4 */ /* * This function contains 6 FP additions, 2 FP multiplications, * (or, 6 additions, 2 multiplications, 0 fused multiply/add), * 8 stack variables, and 8 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_4(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp5; fftw_real tmp8; fftw_real tmp3; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp7; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[real_istride]; tmp5 = K2_000000000 * tmp4; tmp7 = imag_input[imag_istride]; tmp8 = K2_000000000 * tmp7; tmp1 = real_input[0]; tmp2 = real_input[2 * real_istride]; tmp3 = tmp1 + tmp2; tmp6 = tmp1 - tmp2; } output[2 * ostride] = tmp3 - tmp5; output[0] = tmp3 + tmp5; output[ostride] = tmp6 - tmp8; output[3 * ostride] = tmp6 + tmp8; } fftw_codelet_desc fftw_hc2real_4_desc = { "fftw_hc2real_4", (void (*)()) fftw_hc2real_4, 4, FFTW_BACKWARD, FFTW_HC2REAL, 103, 0, (const int *) 0, }; �����������fftw-2.1.5/rfftw/fcr_5.c����������������������������������������������������������������������������0000644�0001754�0000144�00000006344�07637527221�010462� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:56 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 5 */ /* * This function contains 12 FP additions, 7 FP multiplications, * (or, 8 additions, 3 multiplications, 4 fused multiply/add), * 12 stack variables, and 10 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_5(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp10; fftw_real tmp12; fftw_real tmp1; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp11; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp8 = imag_input[imag_istride]; tmp9 = imag_input[2 * imag_istride]; tmp10 = (K1_175570504 * tmp8) - (K1_902113032 * tmp9); tmp12 = (K1_902113032 * tmp8) + (K1_175570504 * tmp9); tmp1 = real_input[0]; tmp2 = real_input[real_istride]; tmp3 = real_input[2 * real_istride]; tmp4 = tmp2 + tmp3; tmp5 = tmp1 - (K500000000 * tmp4); tmp6 = K1_118033988 * (tmp2 - tmp3); } output[0] = tmp1 + (K2_000000000 * tmp4); tmp11 = tmp6 + tmp5; output[ostride] = tmp11 - tmp12; output[4 * ostride] = tmp11 + tmp12; tmp7 = tmp5 - tmp6; output[2 * ostride] = tmp7 - tmp10; output[3 * ostride] = tmp7 + tmp10; } fftw_codelet_desc fftw_hc2real_5_desc = { "fftw_hc2real_5", (void (*)()) fftw_hc2real_5, 5, FFTW_BACKWARD, FFTW_HC2REAL, 125, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_6.c����������������������������������������������������������������������������0000644�0001754�0000144�00000006053�07637527221�010460� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:57 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 6 */ /* * This function contains 14 FP additions, 4 FP multiplications, * (or, 12 additions, 2 multiplications, 2 fused multiply/add), * 14 stack variables, and 12 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_6(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp3; fftw_real tmp7; fftw_real tmp12; fftw_real tmp14; fftw_real tmp6; fftw_real tmp8; fftw_real tmp1; fftw_real tmp2; fftw_real tmp13; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; tmp2 = real_input[3 * real_istride]; tmp3 = tmp1 - tmp2; tmp7 = tmp1 + tmp2; { fftw_real tmp10; fftw_real tmp11; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp10 = imag_input[2 * imag_istride]; tmp11 = imag_input[imag_istride]; tmp12 = K1_732050807 * (tmp10 - tmp11); tmp14 = K1_732050807 * (tmp10 + tmp11); tmp4 = real_input[2 * real_istride]; tmp5 = real_input[real_istride]; tmp6 = tmp4 - tmp5; tmp8 = tmp4 + tmp5; } output[3 * ostride] = tmp3 + (K2_000000000 * tmp6); tmp13 = tmp3 - tmp6; output[ostride] = tmp13 - tmp14; output[5 * ostride] = tmp13 + tmp14; output[0] = tmp7 + (K2_000000000 * tmp8); tmp9 = tmp7 - tmp8; output[4 * ostride] = tmp9 - tmp12; output[2 * ostride] = tmp9 + tmp12; } fftw_codelet_desc fftw_hc2real_6_desc = { "fftw_hc2real_6", (void (*)()) fftw_hc2real_6, 6, FFTW_BACKWARD, FFTW_HC2REAL, 147, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_7.c����������������������������������������������������������������������������0000644�0001754�0000144�00000007556�07637527225�010476� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:06:57 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 7 */ /* * This function contains 24 FP additions, 19 FP multiplications, * (or, 23 additions, 18 multiplications, 1 fused multiply/add), * 13 stack variables, and 14 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_7(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp9; fftw_real tmp13; fftw_real tmp11; fftw_real tmp1; fftw_real tmp4; fftw_real tmp2; fftw_real tmp3; fftw_real tmp5; fftw_real tmp12; fftw_real tmp10; fftw_real tmp6; fftw_real tmp8; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp6 = imag_input[2 * imag_istride]; tmp8 = imag_input[imag_istride]; tmp7 = imag_input[3 * imag_istride]; tmp9 = (K1_563662964 * tmp6) - (K1_949855824 * tmp7) - (K867767478 * tmp8); tmp13 = (K867767478 * tmp6) + (K1_563662964 * tmp7) - (K1_949855824 * tmp8); tmp11 = (K1_563662964 * tmp8) + (K1_949855824 * tmp6) + (K867767478 * tmp7); tmp1 = real_input[0]; tmp4 = real_input[3 * real_istride]; tmp2 = real_input[real_istride]; tmp3 = real_input[2 * real_istride]; tmp5 = tmp1 + (K1_246979603 * tmp3) - (K445041867 * tmp4) - (K1_801937735 * tmp2); tmp12 = tmp1 + (K1_246979603 * tmp4) - (K1_801937735 * tmp3) - (K445041867 * tmp2); tmp10 = tmp1 + (K1_246979603 * tmp2) - (K1_801937735 * tmp4) - (K445041867 * tmp3); output[4 * ostride] = tmp5 - tmp9; output[3 * ostride] = tmp5 + tmp9; output[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4)); output[2 * ostride] = tmp12 + tmp13; output[5 * ostride] = tmp12 - tmp13; output[6 * ostride] = tmp10 + tmp11; output[ostride] = tmp10 - tmp11; } fftw_codelet_desc fftw_hc2real_7_desc = { "fftw_hc2real_7", (void (*)()) fftw_hc2real_7, 7, FFTW_BACKWARD, FFTW_HC2REAL, 169, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_8.c����������������������������������������������������������������������������0000644�0001754�0000144�00000007231�07637527225�010465� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:01 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 8 */ /* * This function contains 20 FP additions, 6 FP multiplications, * (or, 20 additions, 6 multiplications, 0 fused multiply/add), * 18 stack variables, and 16 memory accesses */ static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_8(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp5; fftw_real tmp12; fftw_real tmp3; fftw_real tmp10; fftw_real tmp9; fftw_real tmp14; fftw_real tmp17; fftw_real tmp22; fftw_real tmp6; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp11; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[2 * real_istride]; tmp5 = K2_000000000 * tmp4; tmp11 = imag_input[2 * imag_istride]; tmp12 = K2_000000000 * tmp11; tmp1 = real_input[0]; tmp2 = real_input[4 * real_istride]; tmp3 = tmp1 + tmp2; tmp10 = tmp1 - tmp2; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp15; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[real_istride]; tmp8 = real_input[3 * real_istride]; tmp9 = K2_000000000 * (tmp7 + tmp8); tmp14 = tmp7 - tmp8; tmp15 = imag_input[3 * imag_istride]; tmp16 = imag_input[imag_istride]; tmp17 = tmp15 + tmp16; tmp22 = K2_000000000 * (tmp16 - tmp15); } } tmp6 = tmp3 + tmp5; output[4 * ostride] = tmp6 - tmp9; output[0] = tmp6 + tmp9; tmp21 = tmp3 - tmp5; output[2 * ostride] = tmp21 - tmp22; output[6 * ostride] = tmp21 + tmp22; { fftw_real tmp13; fftw_real tmp18; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp13 = tmp10 - tmp12; tmp18 = K1_414213562 * (tmp14 - tmp17); output[5 * ostride] = tmp13 - tmp18; output[ostride] = tmp13 + tmp18; tmp19 = tmp10 + tmp12; tmp20 = K1_414213562 * (tmp14 + tmp17); output[3 * ostride] = tmp19 - tmp20; output[7 * ostride] = tmp19 + tmp20; } } fftw_codelet_desc fftw_hc2real_8_desc = { "fftw_hc2real_8", (void (*)()) fftw_hc2real_8, 8, FFTW_BACKWARD, FFTW_HC2REAL, 191, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_9.c����������������������������������������������������������������������������0000644�0001754�0000144�00000012623�07637527227�010471� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:01 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 9 */ /* * This function contains 32 FP additions, 18 FP multiplications, * (or, 22 additions, 8 multiplications, 10 fused multiply/add), * 22 stack variables, and 18 memory accesses */ static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K300767466 = FFTW_KONST(+0.300767466360870593278543795225003852144476517); static const fftw_real K1_705737063 = FFTW_KONST(+1.705737063904886419256501927880148143872040591); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K1_326827896 = FFTW_KONST(+1.326827896337876792410842639271782594433726619); static const fftw_real K1_113340798 = FFTW_KONST(+1.113340798452838732905825904094046265936583811); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_9(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp3; fftw_real tmp26; fftw_real tmp12; fftw_real tmp20; fftw_real tmp19; fftw_real tmp8; fftw_real tmp17; fftw_real tmp27; fftw_real tmp22; fftw_real tmp28; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp1; fftw_real tmp2; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp10 = imag_input[3 * imag_istride]; tmp11 = K1_732050807 * tmp10; tmp1 = real_input[0]; tmp2 = real_input[3 * real_istride]; tmp9 = tmp1 - tmp2; tmp3 = tmp1 + (K2_000000000 * tmp2); tmp26 = tmp9 + tmp11; tmp12 = tmp9 - tmp11; } { fftw_real tmp4; fftw_real tmp7; fftw_real tmp18; fftw_real tmp16; fftw_real tmp13; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[real_istride]; tmp20 = imag_input[imag_istride]; { fftw_real tmp5; fftw_real tmp6; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp5 = real_input[4 * real_istride]; tmp6 = real_input[2 * real_istride]; tmp7 = tmp5 + tmp6; tmp18 = K866025403 * (tmp5 - tmp6); tmp14 = imag_input[4 * imag_istride]; tmp15 = imag_input[2 * imag_istride]; tmp16 = K866025403 * (tmp14 + tmp15); tmp19 = tmp15 - tmp14; } tmp8 = tmp4 + tmp7; tmp13 = tmp4 - (K500000000 * tmp7); tmp17 = tmp13 - tmp16; tmp27 = tmp13 + tmp16; tmp21 = (K500000000 * tmp19) + tmp20; tmp22 = tmp18 + tmp21; tmp28 = tmp21 - tmp18; } output[0] = tmp3 + (K2_000000000 * tmp8); tmp32 = tmp3 - tmp8; tmp33 = K1_732050807 * (tmp20 - tmp19); output[3 * ostride] = tmp32 - tmp33; output[6 * ostride] = tmp32 + tmp33; { fftw_real tmp25; fftw_real tmp23; fftw_real tmp24; fftw_real tmp31; fftw_real tmp29; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp25 = (K1_113340798 * tmp17) + (K1_326827896 * tmp22); tmp23 = (K766044443 * tmp17) - (K642787609 * tmp22); tmp24 = tmp12 - tmp23; output[ostride] = tmp12 + (K2_000000000 * tmp23); output[7 * ostride] = tmp24 + tmp25; output[4 * ostride] = tmp24 - tmp25; tmp31 = (K1_705737063 * tmp27) + (K300767466 * tmp28); tmp29 = (K173648177 * tmp27) - (K984807753 * tmp28); tmp30 = tmp26 - tmp29; output[2 * ostride] = tmp26 + (K2_000000000 * tmp29); output[8 * ostride] = tmp30 + tmp31; output[5 * ostride] = tmp30 - tmp31; } } fftw_codelet_desc fftw_hc2real_9_desc = { "fftw_hc2real_9", (void (*)()) fftw_hc2real_9, 9, FFTW_BACKWARD, FFTW_HC2REAL, 213, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_10.c���������������������������������������������������������������������������0000644�0001754�0000144�00000011515�07637527230�010532� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:03 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 10 */ /* * This function contains 34 FP additions, 14 FP multiplications, * (or, 26 additions, 6 multiplications, 8 fused multiply/add), * 20 stack variables, and 20 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_10(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp3; fftw_real tmp11; fftw_real tmp23; fftw_real tmp31; fftw_real tmp20; fftw_real tmp30; fftw_real tmp10; fftw_real tmp28; fftw_real tmp14; fftw_real tmp16; fftw_real tmp18; fftw_real tmp19; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; tmp2 = real_input[5 * real_istride]; tmp3 = tmp1 - tmp2; tmp11 = tmp1 + tmp2; tmp21 = imag_input[4 * imag_istride]; tmp22 = imag_input[imag_istride]; tmp23 = tmp21 - tmp22; tmp31 = tmp21 + tmp22; } tmp18 = imag_input[2 * imag_istride]; tmp19 = imag_input[3 * imag_istride]; tmp20 = tmp18 - tmp19; tmp30 = tmp18 + tmp19; { fftw_real tmp6; fftw_real tmp12; fftw_real tmp9; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[2 * real_istride]; tmp5 = real_input[3 * real_istride]; tmp6 = tmp4 - tmp5; tmp12 = tmp4 + tmp5; tmp7 = real_input[4 * real_istride]; tmp8 = real_input[real_istride]; tmp9 = tmp7 - tmp8; tmp13 = tmp7 + tmp8; } tmp10 = tmp6 + tmp9; tmp28 = K1_118033988 * (tmp6 - tmp9); tmp14 = tmp12 + tmp13; tmp16 = K1_118033988 * (tmp12 - tmp13); } output[5 * ostride] = tmp3 + (K2_000000000 * tmp10); { fftw_real tmp32; fftw_real tmp34; fftw_real tmp29; fftw_real tmp33; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp32 = (K1_175570504 * tmp30) - (K1_902113032 * tmp31); tmp34 = (K1_902113032 * tmp30) + (K1_175570504 * tmp31); tmp27 = tmp3 - (K500000000 * tmp10); tmp29 = tmp27 - tmp28; tmp33 = tmp28 + tmp27; output[7 * ostride] = tmp29 - tmp32; output[3 * ostride] = tmp29 + tmp32; output[ostride] = tmp33 - tmp34; output[9 * ostride] = tmp33 + tmp34; } output[0] = tmp11 + (K2_000000000 * tmp14); { fftw_real tmp24; fftw_real tmp26; fftw_real tmp17; fftw_real tmp25; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp24 = (K1_175570504 * tmp20) - (K1_902113032 * tmp23); tmp26 = (K1_902113032 * tmp20) + (K1_175570504 * tmp23); tmp15 = tmp11 - (K500000000 * tmp14); tmp17 = tmp15 - tmp16; tmp25 = tmp16 + tmp15; output[2 * ostride] = tmp17 - tmp24; output[8 * ostride] = tmp17 + tmp24; output[6 * ostride] = tmp25 - tmp26; output[4 * ostride] = tmp25 + tmp26; } } fftw_codelet_desc fftw_hc2real_10_desc = { "fftw_hc2real_10", (void (*)()) fftw_hc2real_10, 10, FFTW_BACKWARD, FFTW_HC2REAL, 235, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_11.c���������������������������������������������������������������������������0000644�0001754�0000144�00000013317�07637527244�010542� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:04 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 11 */ /* * This function contains 60 FP additions, 51 FP multiplications, * (or, 59 additions, 50 multiplications, 1 fused multiply/add), * 21 stack variables, and 22 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_918985947 = FFTW_KONST(+1.918985947228994779780736114132655398124909697); static const fftw_real K1_309721467 = FFTW_KONST(+1.309721467890570128113850144932587106367582399); static const fftw_real K284629676 = FFTW_KONST(+0.284629676546570280887585337232739337582102722); static const fftw_real K830830026 = FFTW_KONST(+0.830830026003772851058548298459246407048009821); static const fftw_real K1_682507065 = FFTW_KONST(+1.682507065662362337723623297838735435026584997); static const fftw_real K563465113 = FFTW_KONST(+0.563465113682859395422835830693233798071555798); static const fftw_real K1_511499148 = FFTW_KONST(+1.511499148708516567548071687944688840359434890); static const fftw_real K1_979642883 = FFTW_KONST(+1.979642883761865464752184075553437574753038744); static const fftw_real K1_819263990 = FFTW_KONST(+1.819263990709036742823430766158056920120482102); static const fftw_real K1_081281634 = FFTW_KONST(+1.081281634911195164215271908637383390863541216); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_11(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp13; fftw_real tmp21; fftw_real tmp15; fftw_real tmp17; fftw_real tmp19; fftw_real tmp1; fftw_real tmp2; fftw_real tmp6; fftw_real tmp5; fftw_real tmp4; fftw_real tmp3; fftw_real tmp7; fftw_real tmp20; fftw_real tmp14; fftw_real tmp16; fftw_real tmp18; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp12; fftw_real tmp9; fftw_real tmp10; fftw_real tmp11; ASSERT_ALIGNED_DOUBLE; tmp8 = imag_input[2 * imag_istride]; tmp12 = imag_input[imag_istride]; tmp9 = imag_input[4 * imag_istride]; tmp10 = imag_input[5 * imag_istride]; tmp11 = imag_input[3 * imag_istride]; tmp13 = (K1_081281634 * tmp8) + (K1_819263990 * tmp9) - (K1_979642883 * tmp10) - (K1_511499148 * tmp11) - (K563465113 * tmp12); tmp21 = (K1_979642883 * tmp8) + (K1_819263990 * tmp10) - (K563465113 * tmp9) - (K1_081281634 * tmp11) - (K1_511499148 * tmp12); tmp15 = (K563465113 * tmp8) + (K1_819263990 * tmp11) - (K1_511499148 * tmp10) - (K1_081281634 * tmp9) - (K1_979642883 * tmp12); tmp17 = (K1_081281634 * tmp12) + (K1_819263990 * tmp8) + (K1_979642883 * tmp11) + (K1_511499148 * tmp9) + (K563465113 * tmp10); tmp19 = (K563465113 * tmp11) + (K1_979642883 * tmp9) + (K1_081281634 * tmp10) - (K1_511499148 * tmp8) - (K1_819263990 * tmp12); } tmp1 = real_input[0]; tmp2 = real_input[real_istride]; tmp6 = real_input[5 * real_istride]; tmp5 = real_input[4 * real_istride]; tmp4 = real_input[3 * real_istride]; tmp3 = real_input[2 * real_istride]; tmp7 = tmp1 + (K1_682507065 * tmp3) + (K830830026 * tmp5) - (K284629676 * tmp6) - (K1_309721467 * tmp4) - (K1_918985947 * tmp2); tmp20 = tmp1 + (K1_682507065 * tmp4) + (K830830026 * tmp6) - (K1_918985947 * tmp5) - (K284629676 * tmp3) - (K1_309721467 * tmp2); tmp14 = tmp1 + (K830830026 * tmp4) + (K1_682507065 * tmp5) - (K1_309721467 * tmp6) - (K1_918985947 * tmp3) - (K284629676 * tmp2); tmp16 = tmp1 + (K1_682507065 * tmp2) + (K830830026 * tmp3) - (K1_918985947 * tmp6) - (K1_309721467 * tmp5) - (K284629676 * tmp4); tmp18 = tmp1 + (K830830026 * tmp2) + (K1_682507065 * tmp6) - (K284629676 * tmp5) - (K1_918985947 * tmp4) - (K1_309721467 * tmp3); output[6 * ostride] = tmp7 - tmp13; output[5 * ostride] = tmp7 + tmp13; output[7 * ostride] = tmp20 - tmp21; output[4 * ostride] = tmp20 + tmp21; output[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4 + tmp5 + tmp6)); output[2 * ostride] = tmp18 + tmp19; output[9 * ostride] = tmp18 - tmp19; output[10 * ostride] = tmp16 + tmp17; output[ostride] = tmp16 - tmp17; output[8 * ostride] = tmp14 - tmp15; output[3 * ostride] = tmp14 + tmp15; } fftw_codelet_desc fftw_hc2real_11_desc = { "fftw_hc2real_11", (void (*)()) fftw_hc2real_11, 11, FFTW_BACKWARD, FFTW_HC2REAL, 257, 0, (const int *) 0, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_12.c���������������������������������������������������������������������������0000644�0001754�0000144�00000011660�07637527234�010541� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:07 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 12 */ /* * This function contains 38 FP additions, 10 FP multiplications, * (or, 34 additions, 6 multiplications, 4 fused multiply/add), * 22 stack variables, and 24 memory accesses */ static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_12(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp8; fftw_real tmp11; fftw_real tmp22; fftw_real tmp36; fftw_real tmp32; fftw_real tmp33; fftw_real tmp25; fftw_real tmp37; fftw_real tmp3; fftw_real tmp27; fftw_real tmp16; fftw_real tmp6; fftw_real tmp28; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp9; fftw_real tmp10; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp8 = real_input[3 * real_istride]; tmp9 = real_input[5 * real_istride]; tmp10 = real_input[real_istride]; tmp11 = tmp9 + tmp10; tmp22 = (K2_000000000 * tmp8) - tmp11; tmp36 = K1_732050807 * (tmp9 - tmp10); tmp32 = imag_input[3 * imag_istride]; tmp23 = imag_input[5 * imag_istride]; tmp24 = imag_input[imag_istride]; tmp33 = tmp23 + tmp24; tmp25 = K1_732050807 * (tmp23 - tmp24); tmp37 = tmp33 + (K2_000000000 * tmp32); } { fftw_real tmp15; fftw_real tmp1; fftw_real tmp2; fftw_real tmp13; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; tmp14 = imag_input[4 * imag_istride]; tmp15 = K1_732050807 * tmp14; tmp1 = real_input[0]; tmp2 = real_input[4 * real_istride]; tmp13 = tmp1 - tmp2; tmp3 = tmp1 + (K2_000000000 * tmp2); tmp27 = tmp13 - tmp15; tmp16 = tmp13 + tmp15; } { fftw_real tmp19; fftw_real tmp4; fftw_real tmp5; fftw_real tmp17; fftw_real tmp18; ASSERT_ALIGNED_DOUBLE; tmp18 = imag_input[2 * imag_istride]; tmp19 = K1_732050807 * tmp18; tmp4 = real_input[6 * real_istride]; tmp5 = real_input[2 * real_istride]; tmp17 = tmp4 - tmp5; tmp6 = tmp4 + (K2_000000000 * tmp5); tmp28 = tmp17 + tmp19; tmp20 = tmp17 - tmp19; } { fftw_real tmp7; fftw_real tmp12; fftw_real tmp39; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp7 = tmp3 + tmp6; tmp12 = K2_000000000 * (tmp8 + tmp11); output[6 * ostride] = tmp7 - tmp12; output[0] = tmp7 + tmp12; { fftw_real tmp31; fftw_real tmp34; fftw_real tmp21; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp31 = tmp3 - tmp6; tmp34 = K2_000000000 * (tmp32 - tmp33); output[9 * ostride] = tmp31 - tmp34; output[3 * ostride] = tmp31 + tmp34; tmp21 = tmp16 + tmp20; tmp26 = tmp22 - tmp25; output[2 * ostride] = tmp21 - tmp26; output[8 * ostride] = tmp21 + tmp26; } tmp39 = tmp16 - tmp20; tmp40 = tmp37 - tmp36; output[5 * ostride] = tmp39 - tmp40; output[11 * ostride] = tmp39 + tmp40; { fftw_real tmp35; fftw_real tmp38; fftw_real tmp29; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp35 = tmp27 - tmp28; tmp38 = tmp36 + tmp37; output[ostride] = tmp35 - tmp38; output[7 * ostride] = tmp35 + tmp38; tmp29 = tmp27 + tmp28; tmp30 = tmp22 + tmp25; output[10 * ostride] = tmp29 - tmp30; output[4 * ostride] = tmp29 + tmp30; } } } fftw_codelet_desc fftw_hc2real_12_desc = { "fftw_hc2real_12", (void (*)()) fftw_hc2real_12, 12, FFTW_BACKWARD, FFTW_HC2REAL, 279, 0, (const int *) 0, }; ��������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_13.c���������������������������������������������������������������������������0000644�0001754�0000144�00000022305�07637527243�010540� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:08 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 13 */ /* * This function contains 76 FP additions, 35 FP multiplications, * (or, 56 additions, 15 multiplications, 20 fused multiply/add), * 36 stack variables, and 26 memory accesses */ static const fftw_real K531932498 = FFTW_KONST(+0.531932498429674575175042127684371897596660533); static const fftw_real K774781170 = FFTW_KONST(+0.774781170935234584261351932853525703557550433); static const fftw_real K1_007074065 = FFTW_KONST(+1.007074065727533254493747707736933954186697125); static const fftw_real K227708958 = FFTW_KONST(+0.227708958111581597949308691735310621069285120); static const fftw_real K265966249 = FFTW_KONST(+0.265966249214837287587521063842185948798330267); static const fftw_real K516520780 = FFTW_KONST(+0.516520780623489722840901288569017135705033622); static const fftw_real K151805972 = FFTW_KONST(+0.151805972074387731966205794490207080712856746); static const fftw_real K503537032 = FFTW_KONST(+0.503537032863766627246873853868466977093348562); static const fftw_real K166666666 = FFTW_KONST(+0.166666666666666666666666666666666666666666667); static const fftw_real K600925212 = FFTW_KONST(+0.600925212577331548853203544578415991041882762); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K348277202 = FFTW_KONST(+0.348277202304271810011321589858529485233929352); static const fftw_real K1_150281458 = FFTW_KONST(+1.150281458948006242736771094910906776922003215); static const fftw_real K256247671 = FFTW_KONST(+0.256247671582936600958684654061725059144125175); static const fftw_real K156891391 = FFTW_KONST(+0.156891391051584611046832726756003269660212636); static const fftw_real K300238635 = FFTW_KONST(+0.300238635966332641462884626667381504676006424); static const fftw_real K011599105 = FFTW_KONST(+0.011599105605768290721655456654083252189827041); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_13(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp42; fftw_real tmp52; fftw_real tmp45; fftw_real tmp51; fftw_real tmp56; fftw_real tmp67; fftw_real tmp1; fftw_real tmp22; fftw_real tmp12; fftw_real tmp13; fftw_real tmp16; fftw_real tmp19; fftw_real tmp20; fftw_real tmp23; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp28; fftw_real tmp31; fftw_real tmp32; fftw_real tmp37; fftw_real tmp39; fftw_real tmp38; fftw_real tmp35; fftw_real tmp40; fftw_real tmp36; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp29; fftw_real tmp30; fftw_real tmp33; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp28 = imag_input[imag_istride]; tmp29 = imag_input[3 * imag_istride]; tmp30 = imag_input[4 * imag_istride]; tmp31 = tmp29 - tmp30; tmp32 = (K2_000000000 * tmp28) - tmp31; tmp37 = K1_732050807 * (tmp29 + tmp30); tmp39 = imag_input[5 * imag_istride]; tmp33 = imag_input[6 * imag_istride]; tmp34 = imag_input[2 * imag_istride]; tmp38 = tmp33 + tmp34; tmp35 = K1_732050807 * (tmp33 - tmp34); tmp40 = tmp38 - (K2_000000000 * tmp39); } tmp36 = tmp32 + tmp35; tmp41 = tmp37 - tmp40; tmp42 = (K011599105 * tmp36) - (K300238635 * tmp41); tmp52 = (K300238635 * tmp36) + (K011599105 * tmp41); { fftw_real tmp43; fftw_real tmp44; fftw_real tmp54; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp32 - tmp35; tmp44 = tmp37 + tmp40; tmp45 = (K156891391 * tmp43) + (K256247671 * tmp44); tmp51 = (K256247671 * tmp43) - (K156891391 * tmp44); tmp54 = tmp28 + tmp31; tmp55 = tmp38 + tmp39; tmp56 = (K1_150281458 * tmp54) - (K348277202 * tmp55); tmp67 = (K348277202 * tmp54) + (K1_150281458 * tmp55); } } { fftw_real tmp11; fftw_real tmp18; fftw_real tmp15; fftw_real tmp6; fftw_real tmp17; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp9; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[5 * real_istride]; tmp8 = real_input[6 * real_istride]; tmp9 = real_input[2 * real_istride]; tmp10 = tmp8 + tmp9; tmp11 = tmp7 + tmp10; tmp18 = tmp7 - (K500000000 * tmp10); tmp15 = tmp8 - tmp9; } { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; ASSERT_ALIGNED_DOUBLE; tmp2 = real_input[real_istride]; tmp3 = real_input[3 * real_istride]; tmp4 = real_input[4 * real_istride]; tmp5 = tmp3 + tmp4; tmp6 = tmp2 + tmp5; tmp17 = tmp2 - (K500000000 * tmp5); tmp14 = tmp3 - tmp4; } tmp22 = K600925212 * (tmp6 - tmp11); tmp12 = tmp6 + tmp11; tmp13 = tmp1 - (K166666666 * tmp12); tmp16 = tmp14 - tmp15; tmp19 = tmp17 + tmp18; tmp20 = (K503537032 * tmp16) + (K151805972 * tmp19); tmp23 = tmp17 - tmp18; tmp24 = tmp14 + tmp15; tmp25 = (K516520780 * tmp23) - (K265966249 * tmp24); } output[0] = tmp1 + (K2_000000000 * tmp12); { fftw_real tmp46; fftw_real tmp68; fftw_real tmp70; fftw_real tmp27; fftw_real tmp69; fftw_real tmp73; fftw_real tmp57; fftw_real tmp64; fftw_real tmp63; fftw_real tmp65; fftw_real tmp50; fftw_real tmp72; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp66; fftw_real tmp21; fftw_real tmp26; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; tmp46 = K1_732050807 * (tmp42 + tmp45); tmp66 = tmp42 - tmp45; tmp68 = (K2_000000000 * tmp66) - tmp67; tmp70 = tmp66 + tmp67; tmp21 = tmp13 - tmp20; tmp26 = tmp22 - tmp25; tmp27 = tmp21 - tmp26; tmp69 = tmp26 + tmp21; tmp73 = K1_732050807 * (tmp52 + tmp51); tmp53 = tmp51 - tmp52; tmp57 = tmp53 + tmp56; tmp64 = tmp56 - (K2_000000000 * tmp53); { fftw_real tmp61; fftw_real tmp62; fftw_real tmp48; fftw_real tmp49; ASSERT_ALIGNED_DOUBLE; tmp61 = (K2_000000000 * tmp20) + tmp13; tmp62 = (K2_000000000 * tmp25) + tmp22; tmp63 = tmp61 - tmp62; tmp65 = tmp62 + tmp61; tmp48 = (K227708958 * tmp16) - (K1_007074065 * tmp19); tmp49 = (K774781170 * tmp24) + (K531932498 * tmp23); tmp50 = tmp48 - tmp49; tmp72 = tmp49 + tmp48; } } output[5 * ostride] = tmp63 - tmp64; output[8 * ostride] = tmp63 + tmp64; { fftw_real tmp47; fftw_real tmp58; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp27 - tmp46; tmp58 = tmp50 + tmp57; output[2 * ostride] = tmp47 - tmp58; output[7 * ostride] = tmp47 + tmp58; tmp59 = tmp27 + tmp46; tmp60 = tmp57 - tmp50; output[6 * ostride] = tmp59 - tmp60; output[11 * ostride] = tmp59 + tmp60; } output[12 * ostride] = tmp65 - tmp68; output[ostride] = tmp65 + tmp68; { fftw_real tmp71; fftw_real tmp74; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp71 = tmp69 - tmp70; tmp74 = tmp72 + tmp73; output[3 * ostride] = tmp71 - tmp74; output[9 * ostride] = tmp74 + tmp71; tmp75 = tmp69 + tmp70; tmp76 = tmp73 - tmp72; output[4 * ostride] = tmp75 - tmp76; output[10 * ostride] = tmp76 + tmp75; } } } fftw_codelet_desc fftw_hc2real_13_desc = { "fftw_hc2real_13", (void (*)()) fftw_hc2real_13, 13, FFTW_BACKWARD, FFTW_HC2REAL, 301, 0, (const int *) 0, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_14.c���������������������������������������������������������������������������0000644�0001754�0000144�00000014462�07637527253�010547� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:15 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 14 */ /* * This function contains 62 FP additions, 38 FP multiplications, * (or, 60 additions, 36 multiplications, 2 fused multiply/add), * 24 stack variables, and 28 memory accesses */ static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_14(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp3; fftw_real tmp13; fftw_real tmp6; fftw_real tmp14; fftw_real tmp26; fftw_real tmp35; fftw_real tmp23; fftw_real tmp34; fftw_real tmp12; fftw_real tmp16; fftw_real tmp20; fftw_real tmp33; fftw_real tmp9; fftw_real tmp15; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = real_input[0]; tmp2 = real_input[7 * real_istride]; tmp3 = tmp1 - tmp2; tmp13 = tmp1 + tmp2; { fftw_real tmp4; fftw_real tmp5; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[2 * real_istride]; tmp5 = real_input[5 * real_istride]; tmp6 = tmp4 - tmp5; tmp14 = tmp4 + tmp5; tmp24 = imag_input[2 * imag_istride]; tmp25 = imag_input[5 * imag_istride]; tmp26 = tmp24 - tmp25; tmp35 = tmp24 + tmp25; } { fftw_real tmp21; fftw_real tmp22; fftw_real tmp10; fftw_real tmp11; ASSERT_ALIGNED_DOUBLE; tmp21 = imag_input[6 * imag_istride]; tmp22 = imag_input[imag_istride]; tmp23 = tmp21 - tmp22; tmp34 = tmp21 + tmp22; tmp10 = real_input[6 * real_istride]; tmp11 = real_input[real_istride]; tmp12 = tmp10 - tmp11; tmp16 = tmp10 + tmp11; } { fftw_real tmp18; fftw_real tmp19; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp18 = imag_input[4 * imag_istride]; tmp19 = imag_input[3 * imag_istride]; tmp20 = tmp18 - tmp19; tmp33 = tmp18 + tmp19; tmp7 = real_input[4 * real_istride]; tmp8 = real_input[3 * real_istride]; tmp9 = tmp7 - tmp8; tmp15 = tmp7 + tmp8; } { fftw_real tmp38; fftw_real tmp37; fftw_real tmp29; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; output[7 * ostride] = tmp3 + (K2_000000000 * (tmp6 + tmp9 + tmp12)); tmp38 = (K1_563662964 * tmp35) + (K1_949855824 * tmp33) + (K867767478 * tmp34); tmp37 = tmp3 + (K1_246979603 * tmp6) - (K1_801937735 * tmp12) - (K445041867 * tmp9); output[ostride] = tmp37 - tmp38; output[13 * ostride] = tmp37 + tmp38; { fftw_real tmp40; fftw_real tmp39; fftw_real tmp36; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp40 = (K867767478 * tmp33) + (K1_563662964 * tmp34) - (K1_949855824 * tmp35); tmp39 = tmp3 + (K1_246979603 * tmp12) - (K1_801937735 * tmp9) - (K445041867 * tmp6); output[5 * ostride] = tmp39 - tmp40; output[9 * ostride] = tmp39 + tmp40; tmp36 = (K1_563662964 * tmp33) - (K1_949855824 * tmp34) - (K867767478 * tmp35); tmp32 = tmp3 + (K1_246979603 * tmp9) - (K445041867 * tmp12) - (K1_801937735 * tmp6); output[11 * ostride] = tmp32 - tmp36; output[3 * ostride] = tmp32 + tmp36; } output[0] = tmp13 + (K2_000000000 * (tmp14 + tmp15 + tmp16)); tmp29 = (K867767478 * tmp20) + (K1_563662964 * tmp23) - (K1_949855824 * tmp26); tmp28 = tmp13 + (K1_246979603 * tmp16) - (K1_801937735 * tmp15) - (K445041867 * tmp14); output[12 * ostride] = tmp28 - tmp29; output[2 * ostride] = tmp28 + tmp29; { fftw_real tmp31; fftw_real tmp30; fftw_real tmp27; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp31 = (K1_563662964 * tmp26) + (K1_949855824 * tmp20) + (K867767478 * tmp23); tmp30 = tmp13 + (K1_246979603 * tmp14) - (K1_801937735 * tmp16) - (K445041867 * tmp15); output[8 * ostride] = tmp30 - tmp31; output[6 * ostride] = tmp30 + tmp31; tmp27 = (K1_563662964 * tmp20) - (K1_949855824 * tmp23) - (K867767478 * tmp26); tmp17 = tmp13 + (K1_246979603 * tmp15) - (K445041867 * tmp16) - (K1_801937735 * tmp14); output[4 * ostride] = tmp17 - tmp27; output[10 * ostride] = tmp17 + tmp27; } } } fftw_codelet_desc fftw_hc2real_14_desc = { "fftw_hc2real_14", (void (*)()) fftw_hc2real_14, 14, FFTW_BACKWARD, FFTW_HC2REAL, 323, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_15.c���������������������������������������������������������������������������0000644�0001754�0000144�00000016034�07637527246�010547� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:16 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 15 */ /* * This function contains 64 FP additions, 31 FP multiplications, * (or, 47 additions, 14 multiplications, 17 fused multiply/add), * 36 stack variables, and 30 memory accesses */ static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_15(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp3; fftw_real tmp30; fftw_real tmp18; fftw_real tmp37; fftw_real tmp61; fftw_real tmp62; fftw_real tmp45; fftw_real tmp40; fftw_real tmp23; fftw_real tmp31; fftw_real tmp42; fftw_real tmp28; fftw_real tmp32; fftw_real tmp8; fftw_real tmp13; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp17; fftw_real tmp1; fftw_real tmp2; fftw_real tmp15; fftw_real tmp16; ASSERT_ALIGNED_DOUBLE; tmp16 = imag_input[5 * imag_istride]; tmp17 = K1_732050807 * tmp16; tmp1 = real_input[0]; tmp2 = real_input[5 * real_istride]; tmp15 = tmp1 - tmp2; tmp3 = tmp1 + (K2_000000000 * tmp2); tmp30 = tmp15 - tmp17; tmp18 = tmp15 + tmp17; } { fftw_real tmp4; fftw_real tmp39; fftw_real tmp5; fftw_real tmp6; fftw_real tmp7; fftw_real tmp22; fftw_real tmp38; fftw_real tmp9; fftw_real tmp44; fftw_real tmp10; fftw_real tmp11; fftw_real tmp12; fftw_real tmp27; fftw_real tmp43; fftw_real tmp19; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp20; fftw_real tmp21; fftw_real tmp25; fftw_real tmp26; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[3 * real_istride]; tmp39 = imag_input[3 * imag_istride]; tmp5 = real_input[7 * real_istride]; tmp6 = real_input[2 * real_istride]; tmp7 = tmp5 + tmp6; tmp20 = imag_input[7 * imag_istride]; tmp21 = imag_input[2 * imag_istride]; tmp22 = K866025403 * (tmp20 - tmp21); tmp38 = tmp20 + tmp21; tmp9 = real_input[6 * real_istride]; tmp44 = imag_input[6 * imag_istride]; tmp10 = real_input[4 * real_istride]; tmp11 = real_input[real_istride]; tmp12 = tmp10 + tmp11; tmp25 = imag_input[4 * imag_istride]; tmp26 = imag_input[imag_istride]; tmp27 = K866025403 * (tmp25 + tmp26); tmp43 = tmp25 - tmp26; } tmp37 = K866025403 * (tmp5 - tmp6); tmp61 = tmp39 - tmp38; tmp62 = tmp44 - tmp43; tmp45 = (K500000000 * tmp43) + tmp44; tmp40 = (K500000000 * tmp38) + tmp39; tmp19 = tmp4 - (K500000000 * tmp7); tmp23 = tmp19 - tmp22; tmp31 = tmp19 + tmp22; tmp42 = K866025403 * (tmp10 - tmp11); tmp24 = tmp9 - (K500000000 * tmp12); tmp28 = tmp24 - tmp27; tmp32 = tmp24 + tmp27; tmp8 = tmp4 + tmp7; tmp13 = tmp9 + tmp12; tmp14 = tmp8 + tmp13; } output[0] = tmp3 + (K2_000000000 * tmp14); { fftw_real tmp63; fftw_real tmp65; fftw_real tmp60; fftw_real tmp64; fftw_real tmp58; fftw_real tmp59; ASSERT_ALIGNED_DOUBLE; tmp63 = (K1_175570504 * tmp61) - (K1_902113032 * tmp62); tmp65 = (K1_902113032 * tmp61) + (K1_175570504 * tmp62); tmp58 = tmp3 - (K500000000 * tmp14); tmp59 = K1_118033988 * (tmp8 - tmp13); tmp60 = tmp58 - tmp59; tmp64 = tmp59 + tmp58; output[12 * ostride] = tmp60 - tmp63; output[3 * ostride] = tmp60 + tmp63; output[6 * ostride] = tmp64 - tmp65; output[9 * ostride] = tmp64 + tmp65; } { fftw_real tmp51; fftw_real tmp29; fftw_real tmp50; fftw_real tmp55; fftw_real tmp57; fftw_real tmp53; fftw_real tmp54; fftw_real tmp56; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp51 = K1_118033988 * (tmp23 - tmp28); tmp29 = tmp23 + tmp28; tmp50 = tmp18 - (K500000000 * tmp29); tmp53 = tmp40 - tmp37; tmp54 = tmp45 - tmp42; tmp55 = (K1_175570504 * tmp53) - (K1_902113032 * tmp54); tmp57 = (K1_902113032 * tmp53) + (K1_175570504 * tmp54); output[5 * ostride] = tmp18 + (K2_000000000 * tmp29); tmp56 = tmp51 + tmp50; output[11 * ostride] = tmp56 - tmp57; output[14 * ostride] = tmp56 + tmp57; tmp52 = tmp50 - tmp51; output[2 * ostride] = tmp52 - tmp55; output[8 * ostride] = tmp52 + tmp55; } { fftw_real tmp35; fftw_real tmp33; fftw_real tmp34; fftw_real tmp47; fftw_real tmp49; fftw_real tmp41; fftw_real tmp46; fftw_real tmp48; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp35 = K1_118033988 * (tmp31 - tmp32); tmp33 = tmp31 + tmp32; tmp34 = tmp30 - (K500000000 * tmp33); tmp41 = tmp37 + tmp40; tmp46 = tmp42 + tmp45; tmp47 = (K1_175570504 * tmp41) - (K1_902113032 * tmp46); tmp49 = (K1_902113032 * tmp41) + (K1_175570504 * tmp46); output[10 * ostride] = tmp30 + (K2_000000000 * tmp33); tmp48 = tmp35 + tmp34; output[ostride] = tmp48 - tmp49; output[4 * ostride] = tmp48 + tmp49; tmp36 = tmp34 - tmp35; output[7 * ostride] = tmp36 - tmp47; output[13 * ostride] = tmp36 + tmp47; } } fftw_codelet_desc fftw_hc2real_15_desc = { "fftw_hc2real_15", (void (*)()) fftw_hc2real_15, 15, FFTW_BACKWARD, FFTW_HC2REAL, 345, 0, (const int *) 0, }; ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_16.c���������������������������������������������������������������������������0000644�0001754�0000144�00000015125�07637527250�010543� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:18 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 16 */ /* * This function contains 58 FP additions, 18 FP multiplications, * (or, 54 additions, 14 multiplications, 4 fused multiply/add), * 26 stack variables, and 32 memory accesses */ static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_16(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp9; fftw_real tmp54; fftw_real tmp38; fftw_real tmp21; fftw_real tmp6; fftw_real tmp18; fftw_real tmp42; fftw_real tmp53; fftw_real tmp13; fftw_real tmp29; fftw_real tmp16; fftw_real tmp26; fftw_real tmp23; fftw_real tmp49; fftw_real tmp57; fftw_real tmp56; fftw_real tmp46; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp36; fftw_real tmp19; fftw_real tmp20; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[2 * real_istride]; tmp8 = real_input[6 * real_istride]; tmp36 = tmp7 - tmp8; tmp19 = imag_input[2 * imag_istride]; tmp20 = imag_input[6 * imag_istride]; tmp37 = tmp19 + tmp20; tmp9 = K2_000000000 * (tmp7 + tmp8); tmp54 = K1_414213562 * (tmp36 + tmp37); tmp38 = K1_414213562 * (tmp36 - tmp37); tmp21 = K2_000000000 * (tmp19 - tmp20); } { fftw_real tmp5; fftw_real tmp41; fftw_real tmp3; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp40; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[4 * real_istride]; tmp5 = K2_000000000 * tmp4; tmp40 = imag_input[4 * imag_istride]; tmp41 = K2_000000000 * tmp40; tmp1 = real_input[0]; tmp2 = real_input[8 * real_istride]; tmp3 = tmp1 + tmp2; tmp39 = tmp1 - tmp2; } tmp6 = tmp3 + tmp5; tmp18 = tmp3 - tmp5; tmp42 = tmp39 - tmp41; tmp53 = tmp39 + tmp41; } { fftw_real tmp44; fftw_real tmp48; fftw_real tmp47; fftw_real tmp45; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp11 = real_input[real_istride]; tmp12 = real_input[7 * real_istride]; tmp13 = tmp11 + tmp12; tmp44 = tmp11 - tmp12; tmp27 = imag_input[imag_istride]; tmp28 = imag_input[7 * imag_istride]; tmp29 = tmp27 - tmp28; tmp48 = tmp27 + tmp28; } { fftw_real tmp14; fftw_real tmp15; fftw_real tmp24; fftw_real tmp25; ASSERT_ALIGNED_DOUBLE; tmp14 = real_input[3 * real_istride]; tmp15 = real_input[5 * real_istride]; tmp16 = tmp14 + tmp15; tmp47 = tmp15 - tmp14; tmp24 = imag_input[3 * imag_istride]; tmp25 = imag_input[5 * imag_istride]; tmp26 = tmp24 - tmp25; tmp45 = tmp24 + tmp25; } tmp23 = tmp13 - tmp16; tmp49 = tmp47 + tmp48; tmp57 = tmp48 - tmp47; tmp56 = tmp44 + tmp45; tmp46 = tmp44 - tmp45; tmp30 = tmp26 + tmp29; } { fftw_real tmp10; fftw_real tmp17; fftw_real tmp34; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; tmp10 = tmp6 + tmp9; tmp17 = K2_000000000 * (tmp13 + tmp16); output[8 * ostride] = tmp10 - tmp17; output[0] = tmp10 + tmp17; tmp34 = tmp6 - tmp9; tmp35 = K2_000000000 * (tmp29 - tmp26); output[4 * ostride] = tmp34 - tmp35; output[12 * ostride] = tmp34 + tmp35; } { fftw_real tmp22; fftw_real tmp31; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp22 = tmp18 - tmp21; tmp31 = K1_414213562 * (tmp23 - tmp30); output[10 * ostride] = tmp22 - tmp31; output[2 * ostride] = tmp22 + tmp31; tmp32 = tmp18 + tmp21; tmp33 = K1_414213562 * (tmp23 + tmp30); output[6 * ostride] = tmp32 - tmp33; output[14 * ostride] = tmp32 + tmp33; } { fftw_real tmp43; fftw_real tmp50; fftw_real tmp51; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; tmp43 = tmp38 + tmp42; tmp50 = (K1_847759065 * tmp46) - (K765366864 * tmp49); output[9 * ostride] = tmp43 - tmp50; output[ostride] = tmp50 + tmp43; tmp51 = tmp42 - tmp38; tmp52 = (K765366864 * tmp46) + (K1_847759065 * tmp49); output[5 * ostride] = tmp51 - tmp52; output[13 * ostride] = tmp52 + tmp51; } { fftw_real tmp55; fftw_real tmp58; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp55 = tmp53 - tmp54; tmp58 = (K765366864 * tmp56) - (K1_847759065 * tmp57); output[11 * ostride] = tmp55 - tmp58; output[3 * ostride] = tmp58 + tmp55; tmp59 = tmp54 + tmp53; tmp60 = (K1_847759065 * tmp56) + (K765366864 * tmp57); output[7 * ostride] = tmp59 - tmp60; output[15 * ostride] = tmp60 + tmp59; } } fftw_codelet_desc fftw_hc2real_16_desc = { "fftw_hc2real_16", (void (*)()) fftw_hc2real_16, 16, FFTW_BACKWARD, FFTW_HC2REAL, 367, 0, (const int *) 0, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_32.c���������������������������������������������������������������������������0000644�0001754�0000144�00000034456�07637527260�010552� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:20 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 32 */ /* * This function contains 156 FP additions, 54 FP multiplications, * (or, 140 additions, 38 multiplications, 16 fused multiply/add), * 44 stack variables, and 64 memory accesses */ static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_32(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp9; fftw_real tmp134; fftw_real tmp99; fftw_real tmp37; fftw_real tmp32; fftw_real tmp58; fftw_real tmp56; fftw_real tmp80; fftw_real tmp145; fftw_real tmp149; fftw_real tmp112; fftw_real tmp123; fftw_real tmp6; fftw_real tmp34; fftw_real tmp103; fftw_real tmp133; fftw_real tmp17; fftw_real tmp39; fftw_real tmp46; fftw_real tmp83; fftw_real tmp92; fftw_real tmp136; fftw_real tmp95; fftw_real tmp137; fftw_real tmp25; fftw_real tmp49; fftw_real tmp65; fftw_real tmp79; fftw_real tmp142; fftw_real tmp148; fftw_real tmp119; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp97; fftw_real tmp35; fftw_real tmp36; fftw_real tmp98; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[4 * real_istride]; tmp8 = real_input[12 * real_istride]; tmp97 = tmp7 - tmp8; tmp35 = imag_input[4 * imag_istride]; tmp36 = imag_input[12 * imag_istride]; tmp98 = tmp35 + tmp36; tmp9 = K2_000000000 * (tmp7 + tmp8); tmp134 = K1_414213562 * (tmp97 + tmp98); tmp99 = K1_414213562 * (tmp97 - tmp98); tmp37 = K2_000000000 * (tmp35 - tmp36); } { fftw_real tmp28; fftw_real tmp106; fftw_real tmp55; fftw_real tmp110; fftw_real tmp31; fftw_real tmp109; fftw_real tmp52; fftw_real tmp107; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp26; fftw_real tmp27; fftw_real tmp53; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp26 = real_input[3 * real_istride]; tmp27 = real_input[13 * real_istride]; tmp28 = tmp26 + tmp27; tmp106 = tmp26 - tmp27; tmp53 = imag_input[3 * imag_istride]; tmp54 = imag_input[13 * imag_istride]; tmp55 = tmp53 - tmp54; tmp110 = tmp53 + tmp54; } { fftw_real tmp29; fftw_real tmp30; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp29 = real_input[5 * real_istride]; tmp30 = real_input[11 * real_istride]; tmp31 = tmp29 + tmp30; tmp109 = tmp30 - tmp29; tmp50 = imag_input[5 * imag_istride]; tmp51 = imag_input[11 * imag_istride]; tmp52 = tmp50 - tmp51; tmp107 = tmp50 + tmp51; } tmp32 = tmp28 + tmp31; tmp58 = tmp31 - tmp28; tmp56 = tmp52 + tmp55; tmp80 = tmp55 - tmp52; { fftw_real tmp143; fftw_real tmp144; fftw_real tmp108; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp143 = tmp106 + tmp107; tmp144 = tmp110 - tmp109; tmp145 = (K980785280 * tmp143) - (K195090322 * tmp144); tmp149 = (K195090322 * tmp143) + (K980785280 * tmp144); tmp108 = tmp106 - tmp107; tmp111 = tmp109 + tmp110; tmp112 = (K831469612 * tmp108) - (K555570233 * tmp111); tmp123 = (K555570233 * tmp108) + (K831469612 * tmp111); } } { fftw_real tmp5; fftw_real tmp102; fftw_real tmp3; fftw_real tmp100; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp101; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[8 * real_istride]; tmp5 = K2_000000000 * tmp4; tmp101 = imag_input[8 * imag_istride]; tmp102 = K2_000000000 * tmp101; tmp1 = real_input[0]; tmp2 = real_input[16 * real_istride]; tmp3 = tmp1 + tmp2; tmp100 = tmp1 - tmp2; } tmp6 = tmp3 + tmp5; tmp34 = tmp3 - tmp5; tmp103 = tmp100 - tmp102; tmp133 = tmp100 + tmp102; } { fftw_real tmp13; fftw_real tmp90; fftw_real tmp45; fftw_real tmp94; fftw_real tmp16; fftw_real tmp93; fftw_real tmp42; fftw_real tmp91; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp43; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp11 = real_input[2 * real_istride]; tmp12 = real_input[14 * real_istride]; tmp13 = tmp11 + tmp12; tmp90 = tmp11 - tmp12; tmp43 = imag_input[2 * imag_istride]; tmp44 = imag_input[14 * imag_istride]; tmp45 = tmp43 - tmp44; tmp94 = tmp43 + tmp44; } { fftw_real tmp14; fftw_real tmp15; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp14 = real_input[6 * real_istride]; tmp15 = real_input[10 * real_istride]; tmp16 = tmp14 + tmp15; tmp93 = tmp15 - tmp14; tmp40 = imag_input[6 * imag_istride]; tmp41 = imag_input[10 * imag_istride]; tmp42 = tmp40 - tmp41; tmp91 = tmp40 + tmp41; } tmp17 = K2_000000000 * (tmp13 + tmp16); tmp39 = tmp13 - tmp16; tmp46 = tmp42 + tmp45; tmp83 = K2_000000000 * (tmp45 - tmp42); tmp92 = tmp90 - tmp91; tmp136 = tmp90 + tmp91; tmp95 = tmp93 + tmp94; tmp137 = tmp94 - tmp93; } { fftw_real tmp21; fftw_real tmp113; fftw_real tmp64; fftw_real tmp117; fftw_real tmp24; fftw_real tmp116; fftw_real tmp61; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp20; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp19 = real_input[real_istride]; tmp20 = real_input[15 * real_istride]; tmp21 = tmp19 + tmp20; tmp113 = tmp19 - tmp20; tmp62 = imag_input[imag_istride]; tmp63 = imag_input[15 * imag_istride]; tmp64 = tmp62 - tmp63; tmp117 = tmp62 + tmp63; } { fftw_real tmp22; fftw_real tmp23; fftw_real tmp59; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp22 = real_input[7 * real_istride]; tmp23 = real_input[9 * real_istride]; tmp24 = tmp22 + tmp23; tmp116 = tmp23 - tmp22; tmp59 = imag_input[7 * imag_istride]; tmp60 = imag_input[9 * imag_istride]; tmp61 = tmp59 - tmp60; tmp114 = tmp59 + tmp60; } tmp25 = tmp21 + tmp24; tmp49 = tmp21 - tmp24; tmp65 = tmp61 + tmp64; tmp79 = tmp64 - tmp61; { fftw_real tmp140; fftw_real tmp141; fftw_real tmp115; fftw_real tmp118; ASSERT_ALIGNED_DOUBLE; tmp140 = tmp113 + tmp114; tmp141 = tmp117 - tmp116; tmp142 = (K555570233 * tmp140) + (K831469612 * tmp141); tmp148 = (K831469612 * tmp140) - (K555570233 * tmp141); tmp115 = tmp113 - tmp114; tmp118 = tmp116 + tmp117; tmp119 = (K980785280 * tmp115) - (K195090322 * tmp118); tmp122 = (K195090322 * tmp115) + (K980785280 * tmp118); } } { fftw_real tmp33; fftw_real tmp81; fftw_real tmp18; fftw_real tmp78; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp33 = K2_000000000 * (tmp25 + tmp32); tmp81 = K2_000000000 * (tmp79 - tmp80); tmp10 = tmp6 + tmp9; tmp18 = tmp10 + tmp17; tmp78 = tmp10 - tmp17; output[16 * ostride] = tmp18 - tmp33; output[0] = tmp18 + tmp33; output[8 * ostride] = tmp78 - tmp81; output[24 * ostride] = tmp78 + tmp81; } { fftw_real tmp84; fftw_real tmp88; fftw_real tmp87; fftw_real tmp89; fftw_real tmp82; fftw_real tmp85; fftw_real tmp86; ASSERT_ALIGNED_DOUBLE; tmp82 = tmp6 - tmp9; tmp84 = tmp82 - tmp83; tmp88 = tmp82 + tmp83; tmp85 = tmp25 - tmp32; tmp86 = tmp80 + tmp79; tmp87 = K1_414213562 * (tmp85 - tmp86); tmp89 = K1_414213562 * (tmp85 + tmp86); output[20 * ostride] = tmp84 - tmp87; output[4 * ostride] = tmp84 + tmp87; output[12 * ostride] = tmp88 - tmp89; output[28 * ostride] = tmp88 + tmp89; } { fftw_real tmp48; fftw_real tmp68; fftw_real tmp67; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp38; fftw_real tmp47; fftw_real tmp57; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp34 - tmp37; tmp47 = K1_414213562 * (tmp39 - tmp46); tmp48 = tmp38 + tmp47; tmp68 = tmp38 - tmp47; tmp57 = tmp49 - tmp56; tmp66 = tmp58 + tmp65; tmp67 = (K1_847759065 * tmp57) - (K765366864 * tmp66); tmp69 = (K765366864 * tmp57) + (K1_847759065 * tmp66); } output[18 * ostride] = tmp48 - tmp67; output[2 * ostride] = tmp48 + tmp67; output[10 * ostride] = tmp68 - tmp69; output[26 * ostride] = tmp68 + tmp69; } { fftw_real tmp72; fftw_real tmp76; fftw_real tmp75; fftw_real tmp77; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp70; fftw_real tmp71; fftw_real tmp73; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp34 + tmp37; tmp71 = K1_414213562 * (tmp39 + tmp46); tmp72 = tmp70 - tmp71; tmp76 = tmp70 + tmp71; tmp73 = tmp49 + tmp56; tmp74 = tmp65 - tmp58; tmp75 = (K765366864 * tmp73) - (K1_847759065 * tmp74); tmp77 = (K1_847759065 * tmp73) + (K765366864 * tmp74); } output[22 * ostride] = tmp72 - tmp75; output[6 * ostride] = tmp72 + tmp75; output[14 * ostride] = tmp76 - tmp77; output[30 * ostride] = tmp76 + tmp77; } { fftw_real tmp120; fftw_real tmp124; fftw_real tmp105; fftw_real tmp121; fftw_real tmp96; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp120 = K2_000000000 * (tmp112 + tmp119); tmp124 = K2_000000000 * (tmp122 - tmp123); tmp96 = (K1_847759065 * tmp92) - (K765366864 * tmp95); tmp104 = tmp99 + tmp103; tmp105 = tmp96 + tmp104; tmp121 = tmp104 - tmp96; output[17 * ostride] = tmp105 - tmp120; output[ostride] = tmp120 + tmp105; output[9 * ostride] = tmp121 - tmp124; output[25 * ostride] = tmp124 + tmp121; } { fftw_real tmp127; fftw_real tmp131; fftw_real tmp130; fftw_real tmp132; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp125; fftw_real tmp126; fftw_real tmp128; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp125 = tmp103 - tmp99; tmp126 = (K765366864 * tmp92) + (K1_847759065 * tmp95); tmp127 = tmp125 - tmp126; tmp131 = tmp126 + tmp125; tmp128 = tmp119 - tmp112; tmp129 = tmp123 + tmp122; tmp130 = K1_414213562 * (tmp128 - tmp129); tmp132 = K1_414213562 * (tmp128 + tmp129); } output[21 * ostride] = tmp127 - tmp130; output[5 * ostride] = tmp130 + tmp127; output[13 * ostride] = tmp131 - tmp132; output[29 * ostride] = tmp132 + tmp131; } { fftw_real tmp146; fftw_real tmp150; fftw_real tmp139; fftw_real tmp147; fftw_real tmp135; fftw_real tmp138; ASSERT_ALIGNED_DOUBLE; tmp146 = K2_000000000 * (tmp142 - tmp145); tmp150 = K2_000000000 * (tmp148 - tmp149); tmp135 = tmp133 - tmp134; tmp138 = (K765366864 * tmp136) - (K1_847759065 * tmp137); tmp139 = tmp135 - tmp138; tmp147 = tmp138 + tmp135; output[11 * ostride] = tmp139 - tmp146; output[27 * ostride] = tmp146 + tmp139; output[19 * ostride] = tmp147 - tmp150; output[3 * ostride] = tmp150 + tmp147; } { fftw_real tmp153; fftw_real tmp157; fftw_real tmp156; fftw_real tmp158; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp151; fftw_real tmp152; fftw_real tmp154; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp151 = tmp134 + tmp133; tmp152 = (K1_847759065 * tmp136) + (K765366864 * tmp137); tmp153 = tmp151 - tmp152; tmp157 = tmp152 + tmp151; tmp154 = tmp149 + tmp148; tmp155 = tmp145 + tmp142; tmp156 = K1_414213562 * (tmp154 - tmp155); tmp158 = K1_414213562 * (tmp154 + tmp155); } output[23 * ostride] = tmp153 - tmp156; output[7 * ostride] = tmp156 + tmp153; output[15 * ostride] = tmp157 - tmp158; output[31 * ostride] = tmp158 + tmp157; } } fftw_codelet_desc fftw_hc2real_32_desc = { "fftw_hc2real_32", (void (*)()) fftw_hc2real_32, 32, FFTW_BACKWARD, FFTW_HC2REAL, 719, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_64.c���������������������������������������������������������������������������0000644�0001754�0000144�00000102450�07637527301�010541� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:23 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 64 */ /* * This function contains 394 FP additions, 146 FP multiplications, * (or, 342 additions, 94 multiplications, 52 fused multiply/add), * 86 stack variables, and 128 memory accesses */ static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_64(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp10; fftw_real tmp196; fftw_real tmp70; fftw_real tmp152; fftw_real tmp249; fftw_real tmp304; fftw_real tmp337; fftw_real tmp376; fftw_real tmp64; fftw_real tmp206; fftw_real tmp128; fftw_real tmp162; fftw_real tmp184; fftw_real tmp204; fftw_real tmp137; fftw_real tmp163; fftw_real tmp273; fftw_real tmp288; fftw_real tmp349; fftw_real tmp360; fftw_real tmp280; fftw_real tmp287; fftw_real tmp352; fftw_real tmp359; fftw_real tmp17; fftw_real tmp79; fftw_real tmp153; fftw_real tmp197; fftw_real tmp241; fftw_real tmp305; fftw_real tmp334; fftw_real tmp377; fftw_real tmp25; fftw_real tmp32; fftw_real tmp199; fftw_real tmp89; fftw_real tmp155; fftw_real tmp187; fftw_real tmp188; fftw_real tmp200; fftw_real tmp98; fftw_real tmp156; fftw_real tmp226; fftw_real tmp293; fftw_real tmp330; fftw_real tmp365; fftw_real tmp233; fftw_real tmp292; fftw_real tmp327; fftw_real tmp364; fftw_real tmp49; fftw_real tmp203; fftw_real tmp109; fftw_real tmp159; fftw_real tmp181; fftw_real tmp207; fftw_real tmp118; fftw_real tmp160; fftw_real tmp258; fftw_real tmp285; fftw_real tmp345; fftw_real tmp357; fftw_real tmp265; fftw_real tmp284; fftw_real tmp342; fftw_real tmp356; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp5; fftw_real tmp247; fftw_real tmp3; fftw_real tmp245; fftw_real tmp9; fftw_real tmp242; fftw_real tmp69; fftw_real tmp243; fftw_real tmp6; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp246; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[16 * real_istride]; tmp5 = K2_000000000 * tmp4; tmp246 = imag_input[16 * imag_istride]; tmp247 = K2_000000000 * tmp246; tmp1 = real_input[0]; tmp2 = real_input[32 * real_istride]; tmp3 = tmp1 + tmp2; tmp245 = tmp1 - tmp2; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[8 * real_istride]; tmp8 = real_input[24 * real_istride]; tmp9 = K2_000000000 * (tmp7 + tmp8); tmp242 = tmp7 - tmp8; tmp67 = imag_input[8 * imag_istride]; tmp68 = imag_input[24 * imag_istride]; tmp69 = K2_000000000 * (tmp67 - tmp68); tmp243 = tmp67 + tmp68; } } tmp6 = tmp3 + tmp5; tmp10 = tmp6 + tmp9; tmp196 = tmp6 - tmp9; tmp66 = tmp3 - tmp5; tmp70 = tmp66 - tmp69; tmp152 = tmp66 + tmp69; { fftw_real tmp244; fftw_real tmp248; fftw_real tmp335; fftw_real tmp336; ASSERT_ALIGNED_DOUBLE; tmp244 = K1_414213562 * (tmp242 - tmp243); tmp248 = tmp245 - tmp247; tmp249 = tmp244 + tmp248; tmp304 = tmp248 - tmp244; tmp335 = tmp245 + tmp247; tmp336 = K1_414213562 * (tmp242 + tmp243); tmp337 = tmp335 - tmp336; tmp376 = tmp336 + tmp335; } } { fftw_real tmp52; fftw_real tmp274; fftw_real tmp135; fftw_real tmp278; fftw_real tmp55; fftw_real tmp277; fftw_real tmp132; fftw_real tmp275; fftw_real tmp59; fftw_real tmp267; fftw_real tmp126; fftw_real tmp271; fftw_real tmp62; fftw_real tmp270; fftw_real tmp123; fftw_real tmp268; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp50; fftw_real tmp51; fftw_real tmp133; fftw_real tmp134; ASSERT_ALIGNED_DOUBLE; tmp50 = real_input[3 * real_istride]; tmp51 = real_input[29 * real_istride]; tmp52 = tmp50 + tmp51; tmp274 = tmp50 - tmp51; tmp133 = imag_input[3 * imag_istride]; tmp134 = imag_input[29 * imag_istride]; tmp135 = tmp133 - tmp134; tmp278 = tmp133 + tmp134; } { fftw_real tmp53; fftw_real tmp54; fftw_real tmp130; fftw_real tmp131; ASSERT_ALIGNED_DOUBLE; tmp53 = real_input[13 * real_istride]; tmp54 = real_input[19 * real_istride]; tmp55 = tmp53 + tmp54; tmp277 = tmp54 - tmp53; tmp130 = imag_input[13 * imag_istride]; tmp131 = imag_input[19 * imag_istride]; tmp132 = tmp130 - tmp131; tmp275 = tmp130 + tmp131; } { fftw_real tmp57; fftw_real tmp58; fftw_real tmp124; fftw_real tmp125; ASSERT_ALIGNED_DOUBLE; tmp57 = real_input[5 * real_istride]; tmp58 = real_input[27 * real_istride]; tmp59 = tmp57 + tmp58; tmp267 = tmp57 - tmp58; tmp124 = imag_input[5 * imag_istride]; tmp125 = imag_input[27 * imag_istride]; tmp126 = tmp124 - tmp125; tmp271 = tmp124 + tmp125; } { fftw_real tmp60; fftw_real tmp61; fftw_real tmp121; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp60 = real_input[11 * real_istride]; tmp61 = real_input[21 * real_istride]; tmp62 = tmp60 + tmp61; tmp270 = tmp61 - tmp60; tmp121 = imag_input[11 * imag_istride]; tmp122 = imag_input[21 * imag_istride]; tmp123 = tmp121 - tmp122; tmp268 = tmp121 + tmp122; } { fftw_real tmp56; fftw_real tmp63; fftw_real tmp120; fftw_real tmp127; ASSERT_ALIGNED_DOUBLE; tmp56 = tmp52 + tmp55; tmp63 = tmp59 + tmp62; tmp64 = tmp56 + tmp63; tmp206 = tmp63 - tmp56; tmp120 = tmp52 - tmp55; tmp127 = tmp123 + tmp126; tmp128 = tmp120 - tmp127; tmp162 = tmp120 + tmp127; } { fftw_real tmp182; fftw_real tmp183; fftw_real tmp129; fftw_real tmp136; ASSERT_ALIGNED_DOUBLE; tmp182 = tmp135 - tmp132; tmp183 = tmp126 - tmp123; tmp184 = tmp182 - tmp183; tmp204 = tmp183 + tmp182; tmp129 = tmp62 - tmp59; tmp136 = tmp132 + tmp135; tmp137 = tmp129 + tmp136; tmp163 = tmp136 - tmp129; } { fftw_real tmp269; fftw_real tmp272; fftw_real tmp347; fftw_real tmp348; ASSERT_ALIGNED_DOUBLE; tmp269 = tmp267 - tmp268; tmp272 = tmp270 + tmp271; tmp273 = (K881921264 * tmp269) - (K471396736 * tmp272); tmp288 = (K471396736 * tmp269) + (K881921264 * tmp272); tmp347 = tmp267 + tmp268; tmp348 = tmp271 - tmp270; tmp349 = (K098017140 * tmp347) - (K995184726 * tmp348); tmp360 = (K995184726 * tmp347) + (K098017140 * tmp348); } { fftw_real tmp276; fftw_real tmp279; fftw_real tmp350; fftw_real tmp351; ASSERT_ALIGNED_DOUBLE; tmp276 = tmp274 - tmp275; tmp279 = tmp277 + tmp278; tmp280 = (K956940335 * tmp276) - (K290284677 * tmp279); tmp287 = (K290284677 * tmp276) + (K956940335 * tmp279); tmp350 = tmp274 + tmp275; tmp351 = tmp278 - tmp277; tmp352 = (K634393284 * tmp350) - (K773010453 * tmp351); tmp359 = (K773010453 * tmp350) + (K634393284 * tmp351); } } { fftw_real tmp13; fftw_real tmp235; fftw_real tmp77; fftw_real tmp239; fftw_real tmp16; fftw_real tmp238; fftw_real tmp74; fftw_real tmp236; fftw_real tmp71; fftw_real tmp78; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp11 = real_input[4 * real_istride]; tmp12 = real_input[28 * real_istride]; tmp13 = tmp11 + tmp12; tmp235 = tmp11 - tmp12; tmp75 = imag_input[4 * imag_istride]; tmp76 = imag_input[28 * imag_istride]; tmp77 = tmp75 - tmp76; tmp239 = tmp75 + tmp76; } { fftw_real tmp14; fftw_real tmp15; fftw_real tmp72; fftw_real tmp73; ASSERT_ALIGNED_DOUBLE; tmp14 = real_input[12 * real_istride]; tmp15 = real_input[20 * real_istride]; tmp16 = tmp14 + tmp15; tmp238 = tmp15 - tmp14; tmp72 = imag_input[12 * imag_istride]; tmp73 = imag_input[20 * imag_istride]; tmp74 = tmp72 - tmp73; tmp236 = tmp72 + tmp73; } tmp17 = K2_000000000 * (tmp13 + tmp16); tmp71 = tmp13 - tmp16; tmp78 = tmp74 + tmp77; tmp79 = K1_414213562 * (tmp71 - tmp78); tmp153 = K1_414213562 * (tmp71 + tmp78); tmp197 = K2_000000000 * (tmp77 - tmp74); { fftw_real tmp237; fftw_real tmp240; fftw_real tmp332; fftw_real tmp333; ASSERT_ALIGNED_DOUBLE; tmp237 = tmp235 - tmp236; tmp240 = tmp238 + tmp239; tmp241 = (K1_847759065 * tmp237) - (K765366864 * tmp240); tmp305 = (K765366864 * tmp237) + (K1_847759065 * tmp240); tmp332 = tmp235 + tmp236; tmp333 = tmp239 - tmp238; tmp334 = (K765366864 * tmp332) - (K1_847759065 * tmp333); tmp377 = (K1_847759065 * tmp332) + (K765366864 * tmp333); } } { fftw_real tmp21; fftw_real tmp227; fftw_real tmp96; fftw_real tmp231; fftw_real tmp24; fftw_real tmp230; fftw_real tmp93; fftw_real tmp228; fftw_real tmp28; fftw_real tmp220; fftw_real tmp87; fftw_real tmp224; fftw_real tmp31; fftw_real tmp223; fftw_real tmp84; fftw_real tmp221; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp20; fftw_real tmp94; fftw_real tmp95; ASSERT_ALIGNED_DOUBLE; tmp19 = real_input[2 * real_istride]; tmp20 = real_input[30 * real_istride]; tmp21 = tmp19 + tmp20; tmp227 = tmp19 - tmp20; tmp94 = imag_input[2 * imag_istride]; tmp95 = imag_input[30 * imag_istride]; tmp96 = tmp94 - tmp95; tmp231 = tmp94 + tmp95; } { fftw_real tmp22; fftw_real tmp23; fftw_real tmp91; fftw_real tmp92; ASSERT_ALIGNED_DOUBLE; tmp22 = real_input[14 * real_istride]; tmp23 = real_input[18 * real_istride]; tmp24 = tmp22 + tmp23; tmp230 = tmp23 - tmp22; tmp91 = imag_input[14 * imag_istride]; tmp92 = imag_input[18 * imag_istride]; tmp93 = tmp91 - tmp92; tmp228 = tmp91 + tmp92; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp85; fftw_real tmp86; ASSERT_ALIGNED_DOUBLE; tmp26 = real_input[6 * real_istride]; tmp27 = real_input[26 * real_istride]; tmp28 = tmp26 + tmp27; tmp220 = tmp26 - tmp27; tmp85 = imag_input[6 * imag_istride]; tmp86 = imag_input[26 * imag_istride]; tmp87 = tmp85 - tmp86; tmp224 = tmp85 + tmp86; } { fftw_real tmp29; fftw_real tmp30; fftw_real tmp82; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp29 = real_input[10 * real_istride]; tmp30 = real_input[22 * real_istride]; tmp31 = tmp29 + tmp30; tmp223 = tmp30 - tmp29; tmp82 = imag_input[10 * imag_istride]; tmp83 = imag_input[22 * imag_istride]; tmp84 = tmp82 - tmp83; tmp221 = tmp82 + tmp83; } { fftw_real tmp81; fftw_real tmp88; fftw_real tmp90; fftw_real tmp97; ASSERT_ALIGNED_DOUBLE; tmp25 = tmp21 + tmp24; tmp32 = tmp28 + tmp31; tmp199 = tmp25 - tmp32; tmp81 = tmp21 - tmp24; tmp88 = tmp84 + tmp87; tmp89 = tmp81 - tmp88; tmp155 = tmp81 + tmp88; tmp187 = tmp96 - tmp93; tmp188 = tmp87 - tmp84; tmp200 = tmp188 + tmp187; tmp90 = tmp31 - tmp28; tmp97 = tmp93 + tmp96; tmp98 = tmp90 + tmp97; tmp156 = tmp97 - tmp90; } { fftw_real tmp222; fftw_real tmp225; fftw_real tmp328; fftw_real tmp329; ASSERT_ALIGNED_DOUBLE; tmp222 = tmp220 - tmp221; tmp225 = tmp223 + tmp224; tmp226 = (K831469612 * tmp222) - (K555570233 * tmp225); tmp293 = (K555570233 * tmp222) + (K831469612 * tmp225); tmp328 = tmp220 + tmp221; tmp329 = tmp224 - tmp223; tmp330 = (K195090322 * tmp328) + (K980785280 * tmp329); tmp365 = (K980785280 * tmp328) - (K195090322 * tmp329); } { fftw_real tmp229; fftw_real tmp232; fftw_real tmp325; fftw_real tmp326; ASSERT_ALIGNED_DOUBLE; tmp229 = tmp227 - tmp228; tmp232 = tmp230 + tmp231; tmp233 = (K980785280 * tmp229) - (K195090322 * tmp232); tmp292 = (K195090322 * tmp229) + (K980785280 * tmp232); tmp325 = tmp227 + tmp228; tmp326 = tmp231 - tmp230; tmp327 = (K831469612 * tmp325) - (K555570233 * tmp326); tmp364 = (K555570233 * tmp325) + (K831469612 * tmp326); } } { fftw_real tmp37; fftw_real tmp259; fftw_real tmp116; fftw_real tmp263; fftw_real tmp40; fftw_real tmp262; fftw_real tmp113; fftw_real tmp260; fftw_real tmp44; fftw_real tmp252; fftw_real tmp107; fftw_real tmp256; fftw_real tmp47; fftw_real tmp255; fftw_real tmp104; fftw_real tmp253; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp35; fftw_real tmp36; fftw_real tmp114; fftw_real tmp115; ASSERT_ALIGNED_DOUBLE; tmp35 = real_input[real_istride]; tmp36 = real_input[31 * real_istride]; tmp37 = tmp35 + tmp36; tmp259 = tmp35 - tmp36; tmp114 = imag_input[imag_istride]; tmp115 = imag_input[31 * imag_istride]; tmp116 = tmp114 - tmp115; tmp263 = tmp114 + tmp115; } { fftw_real tmp38; fftw_real tmp39; fftw_real tmp111; fftw_real tmp112; ASSERT_ALIGNED_DOUBLE; tmp38 = real_input[15 * real_istride]; tmp39 = real_input[17 * real_istride]; tmp40 = tmp38 + tmp39; tmp262 = tmp39 - tmp38; tmp111 = imag_input[15 * imag_istride]; tmp112 = imag_input[17 * imag_istride]; tmp113 = tmp111 - tmp112; tmp260 = tmp111 + tmp112; } { fftw_real tmp42; fftw_real tmp43; fftw_real tmp105; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; tmp42 = real_input[7 * real_istride]; tmp43 = real_input[25 * real_istride]; tmp44 = tmp42 + tmp43; tmp252 = tmp42 - tmp43; tmp105 = imag_input[7 * imag_istride]; tmp106 = imag_input[25 * imag_istride]; tmp107 = tmp105 - tmp106; tmp256 = tmp105 + tmp106; } { fftw_real tmp45; fftw_real tmp46; fftw_real tmp102; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp45 = real_input[9 * real_istride]; tmp46 = real_input[23 * real_istride]; tmp47 = tmp45 + tmp46; tmp255 = tmp46 - tmp45; tmp102 = imag_input[9 * imag_istride]; tmp103 = imag_input[23 * imag_istride]; tmp104 = tmp102 - tmp103; tmp253 = tmp102 + tmp103; } { fftw_real tmp41; fftw_real tmp48; fftw_real tmp101; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; tmp41 = tmp37 + tmp40; tmp48 = tmp44 + tmp47; tmp49 = tmp41 + tmp48; tmp203 = tmp41 - tmp48; tmp101 = tmp37 - tmp40; tmp108 = tmp104 + tmp107; tmp109 = tmp101 - tmp108; tmp159 = tmp101 + tmp108; } { fftw_real tmp179; fftw_real tmp180; fftw_real tmp110; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp179 = tmp116 - tmp113; tmp180 = tmp107 - tmp104; tmp181 = tmp179 - tmp180; tmp207 = tmp180 + tmp179; tmp110 = tmp47 - tmp44; tmp117 = tmp113 + tmp116; tmp118 = tmp110 + tmp117; tmp160 = tmp117 - tmp110; } { fftw_real tmp254; fftw_real tmp257; fftw_real tmp343; fftw_real tmp344; ASSERT_ALIGNED_DOUBLE; tmp254 = tmp252 - tmp253; tmp257 = tmp255 + tmp256; tmp258 = (K773010453 * tmp254) - (K634393284 * tmp257); tmp285 = (K634393284 * tmp254) + (K773010453 * tmp257); tmp343 = tmp252 + tmp253; tmp344 = tmp256 - tmp255; tmp345 = (K471396736 * tmp343) + (K881921264 * tmp344); tmp357 = (K881921264 * tmp343) - (K471396736 * tmp344); } { fftw_real tmp261; fftw_real tmp264; fftw_real tmp340; fftw_real tmp341; ASSERT_ALIGNED_DOUBLE; tmp261 = tmp259 - tmp260; tmp264 = tmp262 + tmp263; tmp265 = (K995184726 * tmp261) - (K098017140 * tmp264); tmp284 = (K098017140 * tmp261) + (K995184726 * tmp264); tmp340 = tmp259 + tmp260; tmp341 = tmp263 - tmp262; tmp342 = (K956940335 * tmp340) - (K290284677 * tmp341); tmp356 = (K290284677 * tmp340) + (K956940335 * tmp341); } } { fftw_real tmp65; fftw_real tmp185; fftw_real tmp34; fftw_real tmp178; fftw_real tmp18; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp65 = K2_000000000 * (tmp49 + tmp64); tmp185 = K2_000000000 * (tmp181 - tmp184); tmp18 = tmp10 + tmp17; tmp33 = K2_000000000 * (tmp25 + tmp32); tmp34 = tmp18 + tmp33; tmp178 = tmp18 - tmp33; output[32 * ostride] = tmp34 - tmp65; output[0] = tmp34 + tmp65; output[16 * ostride] = tmp178 - tmp185; output[48 * ostride] = tmp178 + tmp185; } { fftw_real tmp190; fftw_real tmp194; fftw_real tmp193; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp186; fftw_real tmp189; fftw_real tmp191; fftw_real tmp192; ASSERT_ALIGNED_DOUBLE; tmp186 = tmp10 - tmp17; tmp189 = K2_000000000 * (tmp187 - tmp188); tmp190 = tmp186 - tmp189; tmp194 = tmp186 + tmp189; tmp191 = tmp49 - tmp64; tmp192 = tmp181 + tmp184; tmp193 = K1_414213562 * (tmp191 - tmp192); tmp195 = K1_414213562 * (tmp191 + tmp192); } output[40 * ostride] = tmp190 - tmp193; output[8 * ostride] = tmp190 + tmp193; output[24 * ostride] = tmp194 - tmp195; output[56 * ostride] = tmp194 + tmp195; } { fftw_real tmp100; fftw_real tmp140; fftw_real tmp146; fftw_real tmp150; fftw_real tmp139; fftw_real tmp147; fftw_real tmp143; fftw_real tmp148; fftw_real tmp151; fftw_real tmp149; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp80; fftw_real tmp99; fftw_real tmp144; fftw_real tmp145; ASSERT_ALIGNED_DOUBLE; tmp80 = tmp70 + tmp79; tmp99 = (K1_847759065 * tmp89) - (K765366864 * tmp98); tmp100 = tmp80 + tmp99; tmp140 = tmp80 - tmp99; tmp144 = tmp70 - tmp79; tmp145 = (K765366864 * tmp89) + (K1_847759065 * tmp98); tmp146 = tmp144 - tmp145; tmp150 = tmp144 + tmp145; } { fftw_real tmp119; fftw_real tmp138; fftw_real tmp141; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; tmp119 = (K980785280 * tmp109) - (K195090322 * tmp118); tmp138 = (K831469612 * tmp128) - (K555570233 * tmp137); tmp139 = K2_000000000 * (tmp119 + tmp138); tmp147 = tmp119 - tmp138; tmp141 = (K195090322 * tmp109) + (K980785280 * tmp118); tmp142 = (K555570233 * tmp128) + (K831469612 * tmp137); tmp143 = K2_000000000 * (tmp141 - tmp142); tmp148 = tmp141 + tmp142; } output[34 * ostride] = tmp100 - tmp139; output[2 * ostride] = tmp100 + tmp139; output[18 * ostride] = tmp140 - tmp143; output[50 * ostride] = tmp140 + tmp143; tmp151 = K1_414213562 * (tmp147 + tmp148); output[26 * ostride] = tmp150 - tmp151; output[58 * ostride] = tmp150 + tmp151; tmp149 = K1_414213562 * (tmp147 - tmp148); output[42 * ostride] = tmp146 - tmp149; output[10 * ostride] = tmp146 + tmp149; } { fftw_real tmp339; fftw_real tmp355; fftw_real tmp367; fftw_real tmp371; fftw_real tmp354; fftw_real tmp368; fftw_real tmp362; fftw_real tmp369; fftw_real tmp372; fftw_real tmp370; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp331; fftw_real tmp338; fftw_real tmp363; fftw_real tmp366; ASSERT_ALIGNED_DOUBLE; tmp331 = K2_000000000 * (tmp327 - tmp330); tmp338 = tmp334 + tmp337; tmp339 = tmp331 + tmp338; tmp355 = tmp338 - tmp331; tmp363 = tmp337 - tmp334; tmp366 = K2_000000000 * (tmp364 - tmp365); tmp367 = tmp363 - tmp366; tmp371 = tmp366 + tmp363; } { fftw_real tmp346; fftw_real tmp353; fftw_real tmp358; fftw_real tmp361; ASSERT_ALIGNED_DOUBLE; tmp346 = tmp342 - tmp345; tmp353 = tmp349 + tmp352; tmp354 = K2_000000000 * (tmp346 + tmp353); tmp368 = tmp346 - tmp353; tmp358 = tmp356 - tmp357; tmp361 = tmp359 - tmp360; tmp362 = K2_000000000 * (tmp358 - tmp361); tmp369 = tmp358 + tmp361; } output[35 * ostride] = tmp339 - tmp354; output[3 * ostride] = tmp354 + tmp339; output[19 * ostride] = tmp355 - tmp362; output[51 * ostride] = tmp362 + tmp355; tmp372 = K1_414213562 * (tmp368 + tmp369); output[27 * ostride] = tmp371 - tmp372; output[59 * ostride] = tmp372 + tmp371; tmp370 = K1_414213562 * (tmp368 - tmp369); output[43 * ostride] = tmp367 - tmp370; output[11 * ostride] = tmp370 + tmp367; } { fftw_real tmp378; fftw_real tmp389; fftw_real tmp375; fftw_real tmp390; fftw_real tmp382; fftw_real tmp392; fftw_real tmp385; fftw_real tmp393; fftw_real tmp373; fftw_real tmp374; ASSERT_ALIGNED_DOUBLE; tmp378 = tmp376 - tmp377; tmp389 = tmp377 + tmp376; tmp373 = tmp330 + tmp327; tmp374 = tmp365 + tmp364; tmp375 = K1_414213562 * (tmp373 - tmp374); tmp390 = K1_414213562 * (tmp373 + tmp374); { fftw_real tmp380; fftw_real tmp381; fftw_real tmp383; fftw_real tmp384; ASSERT_ALIGNED_DOUBLE; tmp380 = tmp345 + tmp342; tmp381 = tmp360 + tmp359; tmp382 = tmp380 - tmp381; tmp392 = tmp380 + tmp381; tmp383 = tmp357 + tmp356; tmp384 = tmp349 - tmp352; tmp385 = tmp383 + tmp384; tmp393 = tmp383 - tmp384; } { fftw_real tmp379; fftw_real tmp386; fftw_real tmp387; fftw_real tmp388; ASSERT_ALIGNED_DOUBLE; tmp379 = tmp375 + tmp378; tmp386 = (K1_847759065 * tmp382) - (K765366864 * tmp385); output[39 * ostride] = tmp379 - tmp386; output[7 * ostride] = tmp386 + tmp379; tmp387 = tmp378 - tmp375; tmp388 = (K1_847759065 * tmp385) + (K765366864 * tmp382); output[23 * ostride] = tmp387 - tmp388; output[55 * ostride] = tmp388 + tmp387; } { fftw_real tmp391; fftw_real tmp394; fftw_real tmp395; fftw_real tmp396; ASSERT_ALIGNED_DOUBLE; tmp391 = tmp389 - tmp390; tmp394 = (K765366864 * tmp392) - (K1_847759065 * tmp393); output[47 * ostride] = tmp391 - tmp394; output[15 * ostride] = tmp394 + tmp391; tmp395 = tmp390 + tmp389; tmp396 = (K765366864 * tmp393) + (K1_847759065 * tmp392); output[31 * ostride] = tmp395 - tmp396; output[63 * ostride] = tmp396 + tmp395; } } { fftw_real tmp214; fftw_real tmp218; fftw_real tmp217; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp212; fftw_real tmp213; fftw_real tmp215; fftw_real tmp216; ASSERT_ALIGNED_DOUBLE; tmp212 = tmp196 + tmp197; tmp213 = K1_414213562 * (tmp199 + tmp200); tmp214 = tmp212 - tmp213; tmp218 = tmp212 + tmp213; tmp215 = tmp203 + tmp204; tmp216 = tmp207 - tmp206; tmp217 = (K765366864 * tmp215) - (K1_847759065 * tmp216); tmp219 = (K765366864 * tmp216) + (K1_847759065 * tmp215); } output[44 * ostride] = tmp214 - tmp217; output[12 * ostride] = tmp214 + tmp217; output[28 * ostride] = tmp218 - tmp219; output[60 * ostride] = tmp218 + tmp219; } { fftw_real tmp202; fftw_real tmp210; fftw_real tmp209; fftw_real tmp211; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp198; fftw_real tmp201; fftw_real tmp205; fftw_real tmp208; ASSERT_ALIGNED_DOUBLE; tmp198 = tmp196 - tmp197; tmp201 = K1_414213562 * (tmp199 - tmp200); tmp202 = tmp198 + tmp201; tmp210 = tmp198 - tmp201; tmp205 = tmp203 - tmp204; tmp208 = tmp206 + tmp207; tmp209 = (K1_847759065 * tmp205) - (K765366864 * tmp208); tmp211 = (K1_847759065 * tmp208) + (K765366864 * tmp205); } output[36 * ostride] = tmp202 - tmp209; output[4 * ostride] = tmp202 + tmp209; output[20 * ostride] = tmp210 - tmp211; output[52 * ostride] = tmp210 + tmp211; } { fftw_real tmp158; fftw_real tmp166; fftw_real tmp172; fftw_real tmp176; fftw_real tmp165; fftw_real tmp174; fftw_real tmp169; fftw_real tmp173; fftw_real tmp177; fftw_real tmp175; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp154; fftw_real tmp157; fftw_real tmp170; fftw_real tmp171; ASSERT_ALIGNED_DOUBLE; tmp154 = tmp152 - tmp153; tmp157 = (K765366864 * tmp155) - (K1_847759065 * tmp156); tmp158 = tmp154 - tmp157; tmp166 = tmp154 + tmp157; tmp170 = tmp152 + tmp153; tmp171 = (K1_847759065 * tmp155) + (K765366864 * tmp156); tmp172 = tmp170 - tmp171; tmp176 = tmp170 + tmp171; } { fftw_real tmp161; fftw_real tmp164; fftw_real tmp167; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp161 = (K555570233 * tmp159) + (K831469612 * tmp160); tmp164 = (K980785280 * tmp162) - (K195090322 * tmp163); tmp165 = K2_000000000 * (tmp161 - tmp164); tmp174 = tmp161 + tmp164; tmp167 = (K831469612 * tmp159) - (K555570233 * tmp160); tmp168 = (K195090322 * tmp162) + (K980785280 * tmp163); tmp169 = K2_000000000 * (tmp167 - tmp168); tmp173 = tmp167 + tmp168; } output[22 * ostride] = tmp158 - tmp165; output[54 * ostride] = tmp158 + tmp165; output[38 * ostride] = tmp166 - tmp169; output[6 * ostride] = tmp166 + tmp169; tmp177 = K1_414213562 * (tmp174 + tmp173); output[30 * ostride] = tmp176 - tmp177; output[62 * ostride] = tmp176 + tmp177; tmp175 = K1_414213562 * (tmp173 - tmp174); output[46 * ostride] = tmp172 - tmp175; output[14 * ostride] = tmp172 + tmp175; } { fftw_real tmp251; fftw_real tmp283; fftw_real tmp295; fftw_real tmp299; fftw_real tmp282; fftw_real tmp296; fftw_real tmp290; fftw_real tmp297; fftw_real tmp300; fftw_real tmp298; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp234; fftw_real tmp250; fftw_real tmp291; fftw_real tmp294; ASSERT_ALIGNED_DOUBLE; tmp234 = K2_000000000 * (tmp226 + tmp233); tmp250 = tmp241 + tmp249; tmp251 = tmp234 + tmp250; tmp283 = tmp250 - tmp234; tmp291 = tmp249 - tmp241; tmp294 = K2_000000000 * (tmp292 - tmp293); tmp295 = tmp291 - tmp294; tmp299 = tmp294 + tmp291; } { fftw_real tmp266; fftw_real tmp281; fftw_real tmp286; fftw_real tmp289; ASSERT_ALIGNED_DOUBLE; tmp266 = tmp258 + tmp265; tmp281 = tmp273 + tmp280; tmp282 = K2_000000000 * (tmp266 + tmp281); tmp296 = tmp266 - tmp281; tmp286 = tmp284 - tmp285; tmp289 = tmp287 - tmp288; tmp290 = K2_000000000 * (tmp286 - tmp289); tmp297 = tmp286 + tmp289; } output[33 * ostride] = tmp251 - tmp282; output[ostride] = tmp282 + tmp251; output[17 * ostride] = tmp283 - tmp290; output[49 * ostride] = tmp290 + tmp283; tmp300 = K1_414213562 * (tmp296 + tmp297); output[25 * ostride] = tmp299 - tmp300; output[57 * ostride] = tmp300 + tmp299; tmp298 = K1_414213562 * (tmp296 - tmp297); output[41 * ostride] = tmp295 - tmp298; output[9 * ostride] = tmp298 + tmp295; } { fftw_real tmp306; fftw_real tmp317; fftw_real tmp303; fftw_real tmp318; fftw_real tmp310; fftw_real tmp320; fftw_real tmp313; fftw_real tmp321; fftw_real tmp301; fftw_real tmp302; ASSERT_ALIGNED_DOUBLE; tmp306 = tmp304 - tmp305; tmp317 = tmp305 + tmp304; tmp301 = tmp233 - tmp226; tmp302 = tmp293 + tmp292; tmp303 = K1_414213562 * (tmp301 - tmp302); tmp318 = K1_414213562 * (tmp301 + tmp302); { fftw_real tmp308; fftw_real tmp309; fftw_real tmp311; fftw_real tmp312; ASSERT_ALIGNED_DOUBLE; tmp308 = tmp265 - tmp258; tmp309 = tmp288 + tmp287; tmp310 = tmp308 - tmp309; tmp320 = tmp308 + tmp309; tmp311 = tmp285 + tmp284; tmp312 = tmp273 - tmp280; tmp313 = tmp311 + tmp312; tmp321 = tmp311 - tmp312; } { fftw_real tmp307; fftw_real tmp314; fftw_real tmp315; fftw_real tmp316; ASSERT_ALIGNED_DOUBLE; tmp307 = tmp303 + tmp306; tmp314 = (K1_847759065 * tmp310) - (K765366864 * tmp313); output[37 * ostride] = tmp307 - tmp314; output[5 * ostride] = tmp314 + tmp307; tmp315 = tmp306 - tmp303; tmp316 = (K1_847759065 * tmp313) + (K765366864 * tmp310); output[21 * ostride] = tmp315 - tmp316; output[53 * ostride] = tmp316 + tmp315; } { fftw_real tmp319; fftw_real tmp322; fftw_real tmp323; fftw_real tmp324; ASSERT_ALIGNED_DOUBLE; tmp319 = tmp317 - tmp318; tmp322 = (K765366864 * tmp320) - (K1_847759065 * tmp321); output[45 * ostride] = tmp319 - tmp322; output[13 * ostride] = tmp322 + tmp319; tmp323 = tmp318 + tmp317; tmp324 = (K765366864 * tmp321) + (K1_847759065 * tmp320); output[29 * ostride] = tmp323 - tmp324; output[61 * ostride] = tmp324 + tmp323; } } } fftw_codelet_desc fftw_hc2real_64_desc = { "fftw_hc2real_64", (void (*)()) fftw_hc2real_64, 64, FFTW_BACKWARD, FFTW_HC2REAL, 1423, 0, (const int *) 0, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fcr_128.c��������������������������������������������������������������������������0000644�0001754�0000144�00000231424�07637527361�010634� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:07:28 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2real 128 */ /* * This function contains 956 FP additions, 374 FP multiplications, * (or, 812 additions, 230 multiplications, 144 fused multiply/add), * 176 stack variables, and 256 memory accesses */ static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K995184726 = FFTW_KONST(+0.995184726672196886244836953109479921575474869); static const fftw_real K098017140 = FFTW_KONST(+0.098017140329560601994195563888641845861136673); static const fftw_real K471396736 = FFTW_KONST(+0.471396736825997648556387625905254377657460319); static const fftw_real K881921264 = FFTW_KONST(+0.881921264348355029712756863660388349508442621); static const fftw_real K803207531 = FFTW_KONST(+0.803207531480644909806676512963141923879569427); static const fftw_real K595699304 = FFTW_KONST(+0.595699304492433343467036528829969889511926338); static const fftw_real K989176509 = FFTW_KONST(+0.989176509964780973451673738016243063983689533); static const fftw_real K146730474 = FFTW_KONST(+0.146730474455361751658850129646717819706215317); static const fftw_real K773010453 = FFTW_KONST(+0.773010453362736960810906609758469800971041293); static const fftw_real K634393284 = FFTW_KONST(+0.634393284163645498215171613225493370675687095); static const fftw_real K290284677 = FFTW_KONST(+0.290284677254462367636192375817395274691476278); static const fftw_real K956940335 = FFTW_KONST(+0.956940335732208864935797886980269969482849206); static const fftw_real K336889853 = FFTW_KONST(+0.336889853392220050689253212619147570477766780); static const fftw_real K941544065 = FFTW_KONST(+0.941544065183020778412509402599502357185589796); static const fftw_real K903989293 = FFTW_KONST(+0.903989293123443331586200297230537048710132025); static const fftw_real K427555093 = FFTW_KONST(+0.427555093430282094320966856888798534304578629); static const fftw_real K998795456 = FFTW_KONST(+0.998795456205172392714771604759100694443203615); static const fftw_real K049067674 = FFTW_KONST(+0.049067674327418014254954976942682658314745363); static const fftw_real K671558954 = FFTW_KONST(+0.671558954847018400625376850427421803228750632); static const fftw_real K740951125 = FFTW_KONST(+0.740951125354959091175616897495162729728955309); static const fftw_real K242980179 = FFTW_KONST(+0.242980179903263889948274162077471118320990783); static const fftw_real K970031253 = FFTW_KONST(+0.970031253194543992603984207286100251456865962); static const fftw_real K514102744 = FFTW_KONST(+0.514102744193221726593693838968815772608049120); static const fftw_real K857728610 = FFTW_KONST(+0.857728610000272069902269984284770137042490799); static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2real_128(const fftw_real *real_input, const fftw_real *imag_input, fftw_real *output, int real_istride, int imag_istride, int ostride) { fftw_real tmp10; fftw_real tmp454; fftw_real tmp134; fftw_real tmp326; fftw_real tmp582; fftw_real tmp715; fftw_real tmp785; fftw_real tmp901; fftw_real tmp17; fftw_real tmp143; fftw_real tmp327; fftw_real tmp455; fftw_real tmp574; fftw_real tmp716; fftw_real tmp782; fftw_real tmp902; fftw_real tmp112; fftw_real tmp478; fftw_real tmp507; fftw_real tmp411; fftw_real tmp646; fftw_real tmp731; fftw_real tmp662; fftw_real tmp728; fftw_real tmp848; fftw_real tmp917; fftw_real tmp832; fftw_real tmp914; fftw_real tmp825; fftw_real tmp916; fftw_real tmp845; fftw_real tmp913; fftw_real tmp127; fftw_real tmp481; fftw_real tmp506; fftw_real tmp408; fftw_real tmp262; fftw_real tmp288; fftw_real tmp350; fftw_real tmp360; fftw_real tmp659; fftw_real tmp730; fftw_real tmp631; fftw_real tmp727; fftw_real tmp281; fftw_real tmp289; fftw_real tmp353; fftw_real tmp361; fftw_real tmp33; fftw_real tmp457; fftw_real tmp153; fftw_real tmp329; fftw_real tmp431; fftw_real tmp458; fftw_real tmp162; fftw_real tmp330; fftw_real tmp559; fftw_real tmp566; fftw_real tmp712; fftw_real tmp683; fftw_real tmp684; fftw_real tmp713; fftw_real tmp775; fftw_real tmp778; fftw_real tmp898; fftw_real tmp865; fftw_real tmp866; fftw_real tmp899; fftw_real tmp49; fftw_real tmp461; fftw_real tmp668; fftw_real tmp708; fftw_real tmp854; fftw_real tmp894; fftw_real tmp794; fftw_real tmp891; fftw_real tmp536; fftw_real tmp705; fftw_real tmp335; fftw_real tmp365; fftw_real tmp183; fftw_real tmp293; fftw_real tmp417; fftw_real tmp465; fftw_real tmp64; fftw_real tmp464; fftw_real tmp671; fftw_real tmp706; fftw_real tmp857; fftw_real tmp892; fftw_real tmp801; fftw_real tmp895; fftw_real tmp551; fftw_real tmp709; fftw_real tmp338; fftw_real tmp366; fftw_real tmp202; fftw_real tmp294; fftw_real tmp420; fftw_real tmp462; fftw_real tmp81; fftw_real tmp471; fftw_real tmp503; fftw_real tmp404; fftw_real tmp615; fftw_real tmp724; fftw_real tmp655; fftw_real tmp721; fftw_real tmp841; fftw_real tmp910; fftw_real tmp817; fftw_real tmp907; fftw_real tmp810; fftw_real tmp909; fftw_real tmp838; fftw_real tmp906; fftw_real tmp96; fftw_real tmp474; fftw_real tmp504; fftw_real tmp401; fftw_real tmp223; fftw_real tmp285; fftw_real tmp343; fftw_real tmp357; fftw_real tmp652; fftw_real tmp723; fftw_real tmp600; fftw_real tmp720; fftw_real tmp242; fftw_real tmp286; fftw_real tmp346; fftw_real tmp358; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp5; fftw_real tmp580; fftw_real tmp3; fftw_real tmp578; fftw_real tmp9; fftw_real tmp575; fftw_real tmp133; fftw_real tmp576; fftw_real tmp6; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp4; fftw_real tmp579; fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp4 = real_input[32 * real_istride]; tmp5 = K2_000000000 * tmp4; tmp579 = imag_input[32 * imag_istride]; tmp580 = K2_000000000 * tmp579; tmp1 = real_input[0]; tmp2 = real_input[64 * real_istride]; tmp3 = tmp1 + tmp2; tmp578 = tmp1 - tmp2; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp131; fftw_real tmp132; ASSERT_ALIGNED_DOUBLE; tmp7 = real_input[16 * real_istride]; tmp8 = real_input[48 * real_istride]; tmp9 = K2_000000000 * (tmp7 + tmp8); tmp575 = tmp7 - tmp8; tmp131 = imag_input[16 * imag_istride]; tmp132 = imag_input[48 * imag_istride]; tmp133 = K2_000000000 * (tmp131 - tmp132); tmp576 = tmp131 + tmp132; } } tmp6 = tmp3 + tmp5; tmp10 = tmp6 + tmp9; tmp454 = tmp6 - tmp9; tmp130 = tmp3 - tmp5; tmp134 = tmp130 - tmp133; tmp326 = tmp130 + tmp133; { fftw_real tmp577; fftw_real tmp581; fftw_real tmp783; fftw_real tmp784; ASSERT_ALIGNED_DOUBLE; tmp577 = K1_414213562 * (tmp575 - tmp576); tmp581 = tmp578 - tmp580; tmp582 = tmp577 + tmp581; tmp715 = tmp581 - tmp577; tmp783 = tmp578 + tmp580; tmp784 = K1_414213562 * (tmp575 + tmp576); tmp785 = tmp783 - tmp784; tmp901 = tmp784 + tmp783; } } { fftw_real tmp13; fftw_real tmp568; fftw_real tmp141; fftw_real tmp572; fftw_real tmp16; fftw_real tmp571; fftw_real tmp138; fftw_real tmp569; fftw_real tmp135; fftw_real tmp142; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp11; fftw_real tmp12; fftw_real tmp139; fftw_real tmp140; ASSERT_ALIGNED_DOUBLE; tmp11 = real_input[8 * real_istride]; tmp12 = real_input[56 * real_istride]; tmp13 = tmp11 + tmp12; tmp568 = tmp11 - tmp12; tmp139 = imag_input[8 * imag_istride]; tmp140 = imag_input[56 * imag_istride]; tmp141 = tmp139 - tmp140; tmp572 = tmp139 + tmp140; } { fftw_real tmp14; fftw_real tmp15; fftw_real tmp136; fftw_real tmp137; ASSERT_ALIGNED_DOUBLE; tmp14 = real_input[24 * real_istride]; tmp15 = real_input[40 * real_istride]; tmp16 = tmp14 + tmp15; tmp571 = tmp15 - tmp14; tmp136 = imag_input[24 * imag_istride]; tmp137 = imag_input[40 * imag_istride]; tmp138 = tmp136 - tmp137; tmp569 = tmp136 + tmp137; } tmp17 = K2_000000000 * (tmp13 + tmp16); tmp135 = tmp13 - tmp16; tmp142 = tmp138 + tmp141; tmp143 = K1_414213562 * (tmp135 - tmp142); tmp327 = K1_414213562 * (tmp135 + tmp142); tmp455 = K2_000000000 * (tmp141 - tmp138); { fftw_real tmp570; fftw_real tmp573; fftw_real tmp780; fftw_real tmp781; ASSERT_ALIGNED_DOUBLE; tmp570 = tmp568 - tmp569; tmp573 = tmp571 + tmp572; tmp574 = (K1_847759065 * tmp570) - (K765366864 * tmp573); tmp716 = (K765366864 * tmp570) + (K1_847759065 * tmp573); tmp780 = tmp568 + tmp569; tmp781 = tmp572 - tmp571; tmp782 = (K765366864 * tmp780) - (K1_847759065 * tmp781); tmp902 = (K1_847759065 * tmp780) + (K765366864 * tmp781); } } { fftw_real tmp104; fftw_real tmp244; fftw_real tmp260; fftw_real tmp406; fftw_real tmp626; fftw_real tmp819; fftw_real tmp629; fftw_real tmp820; fftw_real tmp126; fftw_real tmp272; fftw_real tmp270; fftw_real tmp410; fftw_real tmp634; fftw_real tmp829; fftw_real tmp637; fftw_real tmp830; fftw_real tmp111; fftw_real tmp253; fftw_real tmp251; fftw_real tmp407; fftw_real tmp619; fftw_real tmp822; fftw_real tmp622; fftw_real tmp823; fftw_real tmp119; fftw_real tmp263; fftw_real tmp279; fftw_real tmp409; fftw_real tmp641; fftw_real tmp826; fftw_real tmp644; fftw_real tmp827; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp100; fftw_real tmp624; fftw_real tmp259; fftw_real tmp628; fftw_real tmp103; fftw_real tmp627; fftw_real tmp256; fftw_real tmp625; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp98; fftw_real tmp99; fftw_real tmp257; fftw_real tmp258; ASSERT_ALIGNED_DOUBLE; tmp98 = real_input[3 * real_istride]; tmp99 = real_input[61 * real_istride]; tmp100 = tmp98 + tmp99; tmp624 = tmp98 - tmp99; tmp257 = imag_input[3 * imag_istride]; tmp258 = imag_input[61 * imag_istride]; tmp259 = tmp257 - tmp258; tmp628 = tmp257 + tmp258; } { fftw_real tmp101; fftw_real tmp102; fftw_real tmp254; fftw_real tmp255; ASSERT_ALIGNED_DOUBLE; tmp101 = real_input[29 * real_istride]; tmp102 = real_input[35 * real_istride]; tmp103 = tmp101 + tmp102; tmp627 = tmp102 - tmp101; tmp254 = imag_input[29 * imag_istride]; tmp255 = imag_input[35 * imag_istride]; tmp256 = tmp254 - tmp255; tmp625 = tmp254 + tmp255; } tmp104 = tmp100 + tmp103; tmp244 = tmp100 - tmp103; tmp260 = tmp256 + tmp259; tmp406 = tmp259 - tmp256; tmp626 = tmp624 - tmp625; tmp819 = tmp624 + tmp625; tmp629 = tmp627 + tmp628; tmp820 = tmp628 - tmp627; } { fftw_real tmp122; fftw_real tmp632; fftw_real tmp269; fftw_real tmp636; fftw_real tmp125; fftw_real tmp635; fftw_real tmp266; fftw_real tmp633; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp120; fftw_real tmp121; fftw_real tmp267; fftw_real tmp268; ASSERT_ALIGNED_DOUBLE; tmp120 = real_input[11 * real_istride]; tmp121 = real_input[53 * real_istride]; tmp122 = tmp120 + tmp121; tmp632 = tmp120 - tmp121; tmp267 = imag_input[11 * imag_istride]; tmp268 = imag_input[53 * imag_istride]; tmp269 = tmp267 - tmp268; tmp636 = tmp267 + tmp268; } { fftw_real tmp123; fftw_real tmp124; fftw_real tmp264; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; tmp123 = real_input[21 * real_istride]; tmp124 = real_input[43 * real_istride]; tmp125 = tmp123 + tmp124; tmp635 = tmp124 - tmp123; tmp264 = imag_input[21 * imag_istride]; tmp265 = imag_input[43 * imag_istride]; tmp266 = tmp264 - tmp265; tmp633 = tmp264 + tmp265; } tmp126 = tmp122 + tmp125; tmp272 = tmp125 - tmp122; tmp270 = tmp266 + tmp269; tmp410 = tmp269 - tmp266; tmp634 = tmp632 - tmp633; tmp829 = tmp632 + tmp633; tmp637 = tmp635 + tmp636; tmp830 = tmp636 - tmp635; } { fftw_real tmp107; fftw_real tmp617; fftw_real tmp250; fftw_real tmp621; fftw_real tmp110; fftw_real tmp620; fftw_real tmp247; fftw_real tmp618; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp105; fftw_real tmp106; fftw_real tmp248; fftw_real tmp249; ASSERT_ALIGNED_DOUBLE; tmp105 = real_input[13 * real_istride]; tmp106 = real_input[51 * real_istride]; tmp107 = tmp105 + tmp106; tmp617 = tmp105 - tmp106; tmp248 = imag_input[13 * imag_istride]; tmp249 = imag_input[51 * imag_istride]; tmp250 = tmp248 - tmp249; tmp621 = tmp248 + tmp249; } { fftw_real tmp108; fftw_real tmp109; fftw_real tmp245; fftw_real tmp246; ASSERT_ALIGNED_DOUBLE; tmp108 = real_input[19 * real_istride]; tmp109 = real_input[45 * real_istride]; tmp110 = tmp108 + tmp109; tmp620 = tmp109 - tmp108; tmp245 = imag_input[19 * imag_istride]; tmp246 = imag_input[45 * imag_istride]; tmp247 = tmp245 - tmp246; tmp618 = tmp245 + tmp246; } tmp111 = tmp107 + tmp110; tmp253 = tmp110 - tmp107; tmp251 = tmp247 + tmp250; tmp407 = tmp250 - tmp247; tmp619 = tmp617 - tmp618; tmp822 = tmp617 + tmp618; tmp622 = tmp620 + tmp621; tmp823 = tmp621 - tmp620; } { fftw_real tmp115; fftw_real tmp639; fftw_real tmp278; fftw_real tmp643; fftw_real tmp118; fftw_real tmp642; fftw_real tmp275; fftw_real tmp640; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp113; fftw_real tmp114; fftw_real tmp276; fftw_real tmp277; ASSERT_ALIGNED_DOUBLE; tmp113 = real_input[5 * real_istride]; tmp114 = real_input[59 * real_istride]; tmp115 = tmp113 + tmp114; tmp639 = tmp113 - tmp114; tmp276 = imag_input[5 * imag_istride]; tmp277 = imag_input[59 * imag_istride]; tmp278 = tmp276 - tmp277; tmp643 = tmp276 + tmp277; } { fftw_real tmp116; fftw_real tmp117; fftw_real tmp273; fftw_real tmp274; ASSERT_ALIGNED_DOUBLE; tmp116 = real_input[27 * real_istride]; tmp117 = real_input[37 * real_istride]; tmp118 = tmp116 + tmp117; tmp642 = tmp117 - tmp116; tmp273 = imag_input[27 * imag_istride]; tmp274 = imag_input[37 * imag_istride]; tmp275 = tmp273 - tmp274; tmp640 = tmp273 + tmp274; } tmp119 = tmp115 + tmp118; tmp263 = tmp115 - tmp118; tmp279 = tmp275 + tmp278; tmp409 = tmp278 - tmp275; tmp641 = tmp639 - tmp640; tmp826 = tmp639 + tmp640; tmp644 = tmp642 + tmp643; tmp827 = tmp643 - tmp642; } { fftw_real tmp828; fftw_real tmp831; fftw_real tmp623; fftw_real tmp630; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp476; fftw_real tmp477; fftw_real tmp638; fftw_real tmp645; ASSERT_ALIGNED_DOUBLE; tmp112 = tmp104 + tmp111; tmp476 = tmp104 - tmp111; tmp477 = tmp410 + tmp409; tmp478 = tmp476 - tmp477; tmp507 = tmp476 + tmp477; tmp411 = tmp409 - tmp410; tmp638 = (K857728610 * tmp634) - (K514102744 * tmp637); tmp645 = (K970031253 * tmp641) - (K242980179 * tmp644); tmp646 = tmp638 + tmp645; tmp731 = tmp638 - tmp645; } { fftw_real tmp660; fftw_real tmp661; fftw_real tmp846; fftw_real tmp847; ASSERT_ALIGNED_DOUBLE; tmp660 = (K242980179 * tmp641) + (K970031253 * tmp644); tmp661 = (K514102744 * tmp634) + (K857728610 * tmp637); tmp662 = tmp660 - tmp661; tmp728 = tmp661 + tmp660; tmp846 = (K740951125 * tmp826) - (K671558954 * tmp827); tmp847 = (K049067674 * tmp829) + (K998795456 * tmp830); tmp848 = tmp846 - tmp847; tmp917 = tmp847 + tmp846; } tmp828 = (K671558954 * tmp826) + (K740951125 * tmp827); tmp831 = (K998795456 * tmp829) - (K049067674 * tmp830); tmp832 = tmp828 - tmp831; tmp914 = tmp831 + tmp828; { fftw_real tmp821; fftw_real tmp824; fftw_real tmp843; fftw_real tmp844; ASSERT_ALIGNED_DOUBLE; tmp821 = (K427555093 * tmp819) + (K903989293 * tmp820); tmp824 = (K941544065 * tmp822) - (K336889853 * tmp823); tmp825 = tmp821 - tmp824; tmp916 = tmp824 + tmp821; tmp843 = (K903989293 * tmp819) - (K427555093 * tmp820); tmp844 = (K336889853 * tmp822) + (K941544065 * tmp823); tmp845 = tmp843 - tmp844; tmp913 = tmp844 + tmp843; } { fftw_real tmp479; fftw_real tmp480; fftw_real tmp252; fftw_real tmp261; ASSERT_ALIGNED_DOUBLE; tmp127 = tmp119 + tmp126; tmp479 = tmp126 - tmp119; tmp480 = tmp407 + tmp406; tmp481 = tmp479 + tmp480; tmp506 = tmp480 - tmp479; tmp408 = tmp406 - tmp407; tmp252 = tmp244 - tmp251; tmp261 = tmp253 + tmp260; tmp262 = (K956940335 * tmp252) - (K290284677 * tmp261); tmp288 = (K290284677 * tmp252) + (K956940335 * tmp261); } { fftw_real tmp348; fftw_real tmp349; fftw_real tmp657; fftw_real tmp658; ASSERT_ALIGNED_DOUBLE; tmp348 = tmp244 + tmp251; tmp349 = tmp260 - tmp253; tmp350 = (K634393284 * tmp348) - (K773010453 * tmp349); tmp360 = (K773010453 * tmp348) + (K634393284 * tmp349); tmp657 = (K146730474 * tmp626) + (K989176509 * tmp629); tmp658 = (K595699304 * tmp619) + (K803207531 * tmp622); tmp659 = tmp657 - tmp658; tmp730 = tmp658 + tmp657; } tmp623 = (K803207531 * tmp619) - (K595699304 * tmp622); tmp630 = (K989176509 * tmp626) - (K146730474 * tmp629); tmp631 = tmp623 + tmp630; tmp727 = tmp630 - tmp623; { fftw_real tmp271; fftw_real tmp280; fftw_real tmp351; fftw_real tmp352; ASSERT_ALIGNED_DOUBLE; tmp271 = tmp263 - tmp270; tmp280 = tmp272 + tmp279; tmp281 = (K881921264 * tmp271) - (K471396736 * tmp280); tmp289 = (K471396736 * tmp271) + (K881921264 * tmp280); tmp351 = tmp263 + tmp270; tmp352 = tmp279 - tmp272; tmp353 = (K098017140 * tmp351) - (K995184726 * tmp352); tmp361 = (K995184726 * tmp351) + (K098017140 * tmp352); } } } { fftw_real tmp21; fftw_real tmp773; fftw_real tmp562; fftw_real tmp157; fftw_real tmp24; fftw_real tmp774; fftw_real tmp565; fftw_real tmp160; fftw_real tmp28; fftw_real tmp776; fftw_real tmp555; fftw_real tmp148; fftw_real tmp31; fftw_real tmp777; fftw_real tmp558; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp20; fftw_real tmp560; fftw_real tmp155; fftw_real tmp156; fftw_real tmp561; ASSERT_ALIGNED_DOUBLE; tmp19 = real_input[4 * real_istride]; tmp20 = real_input[60 * real_istride]; tmp560 = tmp19 - tmp20; tmp155 = imag_input[28 * imag_istride]; tmp156 = imag_input[36 * imag_istride]; tmp561 = tmp155 + tmp156; tmp21 = tmp19 + tmp20; tmp773 = tmp560 + tmp561; tmp562 = tmp560 - tmp561; tmp157 = tmp155 - tmp156; } { fftw_real tmp22; fftw_real tmp23; fftw_real tmp563; fftw_real tmp158; fftw_real tmp159; fftw_real tmp564; ASSERT_ALIGNED_DOUBLE; tmp22 = real_input[28 * real_istride]; tmp23 = real_input[36 * real_istride]; tmp563 = tmp23 - tmp22; tmp158 = imag_input[4 * imag_istride]; tmp159 = imag_input[60 * imag_istride]; tmp564 = tmp158 + tmp159; tmp24 = tmp22 + tmp23; tmp774 = tmp564 - tmp563; tmp565 = tmp563 + tmp564; tmp160 = tmp158 - tmp159; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp553; fftw_real tmp146; fftw_real tmp147; fftw_real tmp554; ASSERT_ALIGNED_DOUBLE; tmp26 = real_input[12 * real_istride]; tmp27 = real_input[52 * real_istride]; tmp553 = tmp26 - tmp27; tmp146 = imag_input[20 * imag_istride]; tmp147 = imag_input[44 * imag_istride]; tmp554 = tmp146 + tmp147; tmp28 = tmp26 + tmp27; tmp776 = tmp553 + tmp554; tmp555 = tmp553 - tmp554; tmp148 = tmp146 - tmp147; } { fftw_real tmp29; fftw_real tmp30; fftw_real tmp556; fftw_real tmp149; fftw_real tmp150; fftw_real tmp557; ASSERT_ALIGNED_DOUBLE; tmp29 = real_input[20 * real_istride]; tmp30 = real_input[44 * real_istride]; tmp556 = tmp30 - tmp29; tmp149 = imag_input[12 * imag_istride]; tmp150 = imag_input[52 * imag_istride]; tmp557 = tmp149 + tmp150; tmp31 = tmp29 + tmp30; tmp777 = tmp557 - tmp556; tmp558 = tmp556 + tmp557; tmp151 = tmp149 - tmp150; } { fftw_real tmp25; fftw_real tmp32; fftw_real tmp145; fftw_real tmp152; ASSERT_ALIGNED_DOUBLE; tmp25 = tmp21 + tmp24; tmp32 = tmp28 + tmp31; tmp33 = K2_000000000 * (tmp25 + tmp32); tmp457 = tmp25 - tmp32; tmp145 = tmp21 - tmp24; tmp152 = tmp148 + tmp151; tmp153 = tmp145 - tmp152; tmp329 = tmp145 + tmp152; } { fftw_real tmp429; fftw_real tmp430; fftw_real tmp154; fftw_real tmp161; ASSERT_ALIGNED_DOUBLE; tmp429 = tmp160 - tmp157; tmp430 = tmp151 - tmp148; tmp431 = K2_000000000 * (tmp429 - tmp430); tmp458 = tmp430 + tmp429; tmp154 = tmp31 - tmp28; tmp161 = tmp157 + tmp160; tmp162 = tmp154 + tmp161; tmp330 = tmp161 - tmp154; } tmp559 = (K831469612 * tmp555) - (K555570233 * tmp558); tmp566 = (K980785280 * tmp562) - (K195090322 * tmp565); tmp712 = tmp566 - tmp559; tmp683 = (K195090322 * tmp562) + (K980785280 * tmp565); tmp684 = (K555570233 * tmp555) + (K831469612 * tmp558); tmp713 = tmp684 + tmp683; tmp775 = (K831469612 * tmp773) - (K555570233 * tmp774); tmp778 = (K195090322 * tmp776) + (K980785280 * tmp777); tmp898 = tmp778 + tmp775; tmp865 = (K555570233 * tmp773) + (K831469612 * tmp774); tmp866 = (K980785280 * tmp776) - (K195090322 * tmp777); tmp899 = tmp866 + tmp865; } { fftw_real tmp37; fftw_real tmp180; fftw_real tmp40; fftw_real tmp177; fftw_real tmp165; fftw_real tmp534; fftw_real tmp789; fftw_real tmp788; fftw_real tmp531; fftw_real tmp181; fftw_real tmp44; fftw_real tmp171; fftw_real tmp47; fftw_real tmp168; fftw_real tmp172; fftw_real tmp527; fftw_real tmp792; fftw_real tmp791; fftw_real tmp524; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp529; fftw_real tmp533; fftw_real tmp532; fftw_real tmp530; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp35; fftw_real tmp36; fftw_real tmp178; fftw_real tmp179; ASSERT_ALIGNED_DOUBLE; tmp35 = real_input[2 * real_istride]; tmp36 = real_input[62 * real_istride]; tmp37 = tmp35 + tmp36; tmp529 = tmp35 - tmp36; tmp178 = imag_input[2 * imag_istride]; tmp179 = imag_input[62 * imag_istride]; tmp180 = tmp178 - tmp179; tmp533 = tmp178 + tmp179; } { fftw_real tmp38; fftw_real tmp39; fftw_real tmp175; fftw_real tmp176; ASSERT_ALIGNED_DOUBLE; tmp38 = real_input[30 * real_istride]; tmp39 = real_input[34 * real_istride]; tmp40 = tmp38 + tmp39; tmp532 = tmp39 - tmp38; tmp175 = imag_input[30 * imag_istride]; tmp176 = imag_input[34 * imag_istride]; tmp177 = tmp175 - tmp176; tmp530 = tmp175 + tmp176; } tmp165 = tmp37 - tmp40; tmp534 = tmp532 + tmp533; tmp789 = tmp533 - tmp532; tmp788 = tmp529 + tmp530; tmp531 = tmp529 - tmp530; tmp181 = tmp177 + tmp180; } { fftw_real tmp522; fftw_real tmp526; fftw_real tmp525; fftw_real tmp523; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp42; fftw_real tmp43; fftw_real tmp169; fftw_real tmp170; ASSERT_ALIGNED_DOUBLE; tmp42 = real_input[14 * real_istride]; tmp43 = real_input[50 * real_istride]; tmp44 = tmp42 + tmp43; tmp522 = tmp42 - tmp43; tmp169 = imag_input[14 * imag_istride]; tmp170 = imag_input[50 * imag_istride]; tmp171 = tmp169 - tmp170; tmp526 = tmp169 + tmp170; } { fftw_real tmp45; fftw_real tmp46; fftw_real tmp166; fftw_real tmp167; ASSERT_ALIGNED_DOUBLE; tmp45 = real_input[18 * real_istride]; tmp46 = real_input[46 * real_istride]; tmp47 = tmp45 + tmp46; tmp525 = tmp46 - tmp45; tmp166 = imag_input[18 * imag_istride]; tmp167 = imag_input[46 * imag_istride]; tmp168 = tmp166 - tmp167; tmp523 = tmp166 + tmp167; } tmp172 = tmp168 + tmp171; tmp527 = tmp525 + tmp526; tmp792 = tmp526 - tmp525; tmp791 = tmp522 + tmp523; tmp524 = tmp522 - tmp523; tmp174 = tmp47 - tmp44; } { fftw_real tmp41; fftw_real tmp48; fftw_real tmp666; fftw_real tmp667; ASSERT_ALIGNED_DOUBLE; tmp41 = tmp37 + tmp40; tmp48 = tmp44 + tmp47; tmp49 = tmp41 + tmp48; tmp461 = tmp41 - tmp48; tmp666 = (K098017140 * tmp531) + (K995184726 * tmp534); tmp667 = (K634393284 * tmp524) + (K773010453 * tmp527); tmp668 = tmp666 - tmp667; tmp708 = tmp667 + tmp666; } { fftw_real tmp852; fftw_real tmp853; fftw_real tmp790; fftw_real tmp793; ASSERT_ALIGNED_DOUBLE; tmp852 = (K290284677 * tmp788) + (K956940335 * tmp789); tmp853 = (K881921264 * tmp791) - (K471396736 * tmp792); tmp854 = tmp852 - tmp853; tmp894 = tmp853 + tmp852; tmp790 = (K956940335 * tmp788) - (K290284677 * tmp789); tmp793 = (K471396736 * tmp791) + (K881921264 * tmp792); tmp794 = tmp790 - tmp793; tmp891 = tmp793 + tmp790; } { fftw_real tmp528; fftw_real tmp535; fftw_real tmp333; fftw_real tmp334; ASSERT_ALIGNED_DOUBLE; tmp528 = (K773010453 * tmp524) - (K634393284 * tmp527); tmp535 = (K995184726 * tmp531) - (K098017140 * tmp534); tmp536 = tmp528 + tmp535; tmp705 = tmp535 - tmp528; tmp333 = tmp165 + tmp172; tmp334 = tmp181 - tmp174; tmp335 = (K831469612 * tmp333) - (K555570233 * tmp334); tmp365 = (K555570233 * tmp333) + (K831469612 * tmp334); } { fftw_real tmp173; fftw_real tmp182; fftw_real tmp415; fftw_real tmp416; ASSERT_ALIGNED_DOUBLE; tmp173 = tmp165 - tmp172; tmp182 = tmp174 + tmp181; tmp183 = (K980785280 * tmp173) - (K195090322 * tmp182); tmp293 = (K195090322 * tmp173) + (K980785280 * tmp182); tmp415 = tmp180 - tmp177; tmp416 = tmp171 - tmp168; tmp417 = tmp415 - tmp416; tmp465 = tmp416 + tmp415; } } { fftw_real tmp52; fftw_real tmp199; fftw_real tmp55; fftw_real tmp196; fftw_real tmp184; fftw_real tmp549; fftw_real tmp799; fftw_real tmp798; fftw_real tmp546; fftw_real tmp200; fftw_real tmp59; fftw_real tmp190; fftw_real tmp62; fftw_real tmp187; fftw_real tmp191; fftw_real tmp542; fftw_real tmp796; fftw_real tmp795; fftw_real tmp539; fftw_real tmp193; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp544; fftw_real tmp548; fftw_real tmp547; fftw_real tmp545; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp50; fftw_real tmp51; fftw_real tmp197; fftw_real tmp198; ASSERT_ALIGNED_DOUBLE; tmp50 = real_input[6 * real_istride]; tmp51 = real_input[58 * real_istride]; tmp52 = tmp50 + tmp51; tmp544 = tmp50 - tmp51; tmp197 = imag_input[6 * imag_istride]; tmp198 = imag_input[58 * imag_istride]; tmp199 = tmp197 - tmp198; tmp548 = tmp197 + tmp198; } { fftw_real tmp53; fftw_real tmp54; fftw_real tmp194; fftw_real tmp195; ASSERT_ALIGNED_DOUBLE; tmp53 = real_input[26 * real_istride]; tmp54 = real_input[38 * real_istride]; tmp55 = tmp53 + tmp54; tmp547 = tmp54 - tmp53; tmp194 = imag_input[26 * imag_istride]; tmp195 = imag_input[38 * imag_istride]; tmp196 = tmp194 - tmp195; tmp545 = tmp194 + tmp195; } tmp184 = tmp52 - tmp55; tmp549 = tmp547 + tmp548; tmp799 = tmp548 - tmp547; tmp798 = tmp544 + tmp545; tmp546 = tmp544 - tmp545; tmp200 = tmp196 + tmp199; } { fftw_real tmp537; fftw_real tmp541; fftw_real tmp540; fftw_real tmp538; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp57; fftw_real tmp58; fftw_real tmp188; fftw_real tmp189; ASSERT_ALIGNED_DOUBLE; tmp57 = real_input[10 * real_istride]; tmp58 = real_input[54 * real_istride]; tmp59 = tmp57 + tmp58; tmp537 = tmp57 - tmp58; tmp188 = imag_input[10 * imag_istride]; tmp189 = imag_input[54 * imag_istride]; tmp190 = tmp188 - tmp189; tmp541 = tmp188 + tmp189; } { fftw_real tmp60; fftw_real tmp61; fftw_real tmp185; fftw_real tmp186; ASSERT_ALIGNED_DOUBLE; tmp60 = real_input[22 * real_istride]; tmp61 = real_input[42 * real_istride]; tmp62 = tmp60 + tmp61; tmp540 = tmp61 - tmp60; tmp185 = imag_input[22 * imag_istride]; tmp186 = imag_input[42 * imag_istride]; tmp187 = tmp185 - tmp186; tmp538 = tmp185 + tmp186; } tmp191 = tmp187 + tmp190; tmp542 = tmp540 + tmp541; tmp796 = tmp541 - tmp540; tmp795 = tmp537 + tmp538; tmp539 = tmp537 - tmp538; tmp193 = tmp62 - tmp59; } { fftw_real tmp56; fftw_real tmp63; fftw_real tmp669; fftw_real tmp670; ASSERT_ALIGNED_DOUBLE; tmp56 = tmp52 + tmp55; tmp63 = tmp59 + tmp62; tmp64 = tmp56 + tmp63; tmp464 = tmp63 - tmp56; tmp669 = (K290284677 * tmp546) + (K956940335 * tmp549); tmp670 = (K471396736 * tmp539) + (K881921264 * tmp542); tmp671 = tmp669 - tmp670; tmp706 = tmp670 + tmp669; } { fftw_real tmp855; fftw_real tmp856; fftw_real tmp797; fftw_real tmp800; ASSERT_ALIGNED_DOUBLE; tmp855 = (K773010453 * tmp798) + (K634393284 * tmp799); tmp856 = (K995184726 * tmp795) + (K098017140 * tmp796); tmp857 = tmp855 - tmp856; tmp892 = tmp856 + tmp855; tmp797 = (K098017140 * tmp795) - (K995184726 * tmp796); tmp800 = (K634393284 * tmp798) - (K773010453 * tmp799); tmp801 = tmp797 + tmp800; tmp895 = tmp797 - tmp800; } { fftw_real tmp543; fftw_real tmp550; fftw_real tmp336; fftw_real tmp337; ASSERT_ALIGNED_DOUBLE; tmp543 = (K881921264 * tmp539) - (K471396736 * tmp542); tmp550 = (K956940335 * tmp546) - (K290284677 * tmp549); tmp551 = tmp543 + tmp550; tmp709 = tmp543 - tmp550; tmp336 = tmp184 + tmp191; tmp337 = tmp200 - tmp193; tmp338 = (K195090322 * tmp336) + (K980785280 * tmp337); tmp366 = (K980785280 * tmp336) - (K195090322 * tmp337); } { fftw_real tmp192; fftw_real tmp201; fftw_real tmp418; fftw_real tmp419; ASSERT_ALIGNED_DOUBLE; tmp192 = tmp184 - tmp191; tmp201 = tmp193 + tmp200; tmp202 = (K831469612 * tmp192) - (K555570233 * tmp201); tmp294 = (K555570233 * tmp192) + (K831469612 * tmp201); tmp418 = tmp199 - tmp196; tmp419 = tmp190 - tmp187; tmp420 = tmp418 - tmp419; tmp462 = tmp419 + tmp418; } } { fftw_real tmp73; fftw_real tmp205; fftw_real tmp221; fftw_real tmp399; fftw_real tmp595; fftw_real tmp804; fftw_real tmp598; fftw_real tmp805; fftw_real tmp95; fftw_real tmp233; fftw_real tmp231; fftw_real tmp403; fftw_real tmp603; fftw_real tmp814; fftw_real tmp606; fftw_real tmp815; fftw_real tmp80; fftw_real tmp214; fftw_real tmp212; fftw_real tmp400; fftw_real tmp588; fftw_real tmp807; fftw_real tmp591; fftw_real tmp808; fftw_real tmp88; fftw_real tmp224; fftw_real tmp240; fftw_real tmp402; fftw_real tmp610; fftw_real tmp811; fftw_real tmp613; fftw_real tmp812; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp69; fftw_real tmp593; fftw_real tmp220; fftw_real tmp597; fftw_real tmp72; fftw_real tmp596; fftw_real tmp217; fftw_real tmp594; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp67; fftw_real tmp68; fftw_real tmp218; fftw_real tmp219; ASSERT_ALIGNED_DOUBLE; tmp67 = real_input[real_istride]; tmp68 = real_input[63 * real_istride]; tmp69 = tmp67 + tmp68; tmp593 = tmp67 - tmp68; tmp218 = imag_input[imag_istride]; tmp219 = imag_input[63 * imag_istride]; tmp220 = tmp218 - tmp219; tmp597 = tmp218 + tmp219; } { fftw_real tmp70; fftw_real tmp71; fftw_real tmp215; fftw_real tmp216; ASSERT_ALIGNED_DOUBLE; tmp70 = real_input[31 * real_istride]; tmp71 = real_input[33 * real_istride]; tmp72 = tmp70 + tmp71; tmp596 = tmp71 - tmp70; tmp215 = imag_input[31 * imag_istride]; tmp216 = imag_input[33 * imag_istride]; tmp217 = tmp215 - tmp216; tmp594 = tmp215 + tmp216; } tmp73 = tmp69 + tmp72; tmp205 = tmp69 - tmp72; tmp221 = tmp217 + tmp220; tmp399 = tmp220 - tmp217; tmp595 = tmp593 - tmp594; tmp804 = tmp593 + tmp594; tmp598 = tmp596 + tmp597; tmp805 = tmp597 - tmp596; } { fftw_real tmp91; fftw_real tmp601; fftw_real tmp230; fftw_real tmp605; fftw_real tmp94; fftw_real tmp604; fftw_real tmp227; fftw_real tmp602; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp89; fftw_real tmp90; fftw_real tmp228; fftw_real tmp229; ASSERT_ALIGNED_DOUBLE; tmp89 = real_input[9 * real_istride]; tmp90 = real_input[55 * real_istride]; tmp91 = tmp89 + tmp90; tmp601 = tmp89 - tmp90; tmp228 = imag_input[9 * imag_istride]; tmp229 = imag_input[55 * imag_istride]; tmp230 = tmp228 - tmp229; tmp605 = tmp228 + tmp229; } { fftw_real tmp92; fftw_real tmp93; fftw_real tmp225; fftw_real tmp226; ASSERT_ALIGNED_DOUBLE; tmp92 = real_input[23 * real_istride]; tmp93 = real_input[41 * real_istride]; tmp94 = tmp92 + tmp93; tmp604 = tmp93 - tmp92; tmp225 = imag_input[23 * imag_istride]; tmp226 = imag_input[41 * imag_istride]; tmp227 = tmp225 - tmp226; tmp602 = tmp225 + tmp226; } tmp95 = tmp91 + tmp94; tmp233 = tmp94 - tmp91; tmp231 = tmp227 + tmp230; tmp403 = tmp230 - tmp227; tmp603 = tmp601 - tmp602; tmp814 = tmp601 + tmp602; tmp606 = tmp604 + tmp605; tmp815 = tmp605 - tmp604; } { fftw_real tmp76; fftw_real tmp586; fftw_real tmp211; fftw_real tmp590; fftw_real tmp79; fftw_real tmp589; fftw_real tmp208; fftw_real tmp587; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp74; fftw_real tmp75; fftw_real tmp209; fftw_real tmp210; ASSERT_ALIGNED_DOUBLE; tmp74 = real_input[15 * real_istride]; tmp75 = real_input[49 * real_istride]; tmp76 = tmp74 + tmp75; tmp586 = tmp74 - tmp75; tmp209 = imag_input[15 * imag_istride]; tmp210 = imag_input[49 * imag_istride]; tmp211 = tmp209 - tmp210; tmp590 = tmp209 + tmp210; } { fftw_real tmp77; fftw_real tmp78; fftw_real tmp206; fftw_real tmp207; ASSERT_ALIGNED_DOUBLE; tmp77 = real_input[17 * real_istride]; tmp78 = real_input[47 * real_istride]; tmp79 = tmp77 + tmp78; tmp589 = tmp78 - tmp77; tmp206 = imag_input[17 * imag_istride]; tmp207 = imag_input[47 * imag_istride]; tmp208 = tmp206 - tmp207; tmp587 = tmp206 + tmp207; } tmp80 = tmp76 + tmp79; tmp214 = tmp79 - tmp76; tmp212 = tmp208 + tmp211; tmp400 = tmp211 - tmp208; tmp588 = tmp586 - tmp587; tmp807 = tmp586 + tmp587; tmp591 = tmp589 + tmp590; tmp808 = tmp590 - tmp589; } { fftw_real tmp84; fftw_real tmp608; fftw_real tmp239; fftw_real tmp612; fftw_real tmp87; fftw_real tmp611; fftw_real tmp236; fftw_real tmp609; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp82; fftw_real tmp83; fftw_real tmp237; fftw_real tmp238; ASSERT_ALIGNED_DOUBLE; tmp82 = real_input[7 * real_istride]; tmp83 = real_input[57 * real_istride]; tmp84 = tmp82 + tmp83; tmp608 = tmp82 - tmp83; tmp237 = imag_input[7 * imag_istride]; tmp238 = imag_input[57 * imag_istride]; tmp239 = tmp237 - tmp238; tmp612 = tmp237 + tmp238; } { fftw_real tmp85; fftw_real tmp86; fftw_real tmp234; fftw_real tmp235; ASSERT_ALIGNED_DOUBLE; tmp85 = real_input[25 * real_istride]; tmp86 = real_input[39 * real_istride]; tmp87 = tmp85 + tmp86; tmp611 = tmp86 - tmp85; tmp234 = imag_input[25 * imag_istride]; tmp235 = imag_input[39 * imag_istride]; tmp236 = tmp234 - tmp235; tmp609 = tmp234 + tmp235; } tmp88 = tmp84 + tmp87; tmp224 = tmp84 - tmp87; tmp240 = tmp236 + tmp239; tmp402 = tmp239 - tmp236; tmp610 = tmp608 - tmp609; tmp811 = tmp608 + tmp609; tmp613 = tmp611 + tmp612; tmp812 = tmp612 - tmp611; } { fftw_real tmp813; fftw_real tmp816; fftw_real tmp592; fftw_real tmp599; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp469; fftw_real tmp470; fftw_real tmp607; fftw_real tmp614; ASSERT_ALIGNED_DOUBLE; tmp81 = tmp73 + tmp80; tmp469 = tmp73 - tmp80; tmp470 = tmp403 + tmp402; tmp471 = tmp469 - tmp470; tmp503 = tmp469 + tmp470; tmp404 = tmp402 - tmp403; tmp607 = (K903989293 * tmp603) - (K427555093 * tmp606); tmp614 = (K941544065 * tmp610) - (K336889853 * tmp613); tmp615 = tmp607 + tmp614; tmp724 = tmp607 - tmp614; } { fftw_real tmp653; fftw_real tmp654; fftw_real tmp839; fftw_real tmp840; ASSERT_ALIGNED_DOUBLE; tmp653 = (K336889853 * tmp610) + (K941544065 * tmp613); tmp654 = (K427555093 * tmp603) + (K903989293 * tmp606); tmp655 = tmp653 - tmp654; tmp721 = tmp654 + tmp653; tmp839 = (K242980179 * tmp814) - (K970031253 * tmp815); tmp840 = (K514102744 * tmp811) - (K857728610 * tmp812); tmp841 = tmp839 + tmp840; tmp910 = tmp839 - tmp840; } tmp813 = (K857728610 * tmp811) + (K514102744 * tmp812); tmp816 = (K970031253 * tmp814) + (K242980179 * tmp815); tmp817 = tmp813 - tmp816; tmp907 = tmp816 + tmp813; { fftw_real tmp806; fftw_real tmp809; fftw_real tmp836; fftw_real tmp837; ASSERT_ALIGNED_DOUBLE; tmp806 = (K146730474 * tmp804) + (K989176509 * tmp805); tmp809 = (K803207531 * tmp807) - (K595699304 * tmp808); tmp810 = tmp806 - tmp809; tmp909 = tmp809 + tmp806; tmp836 = (K989176509 * tmp804) - (K146730474 * tmp805); tmp837 = (K595699304 * tmp807) + (K803207531 * tmp808); tmp838 = tmp836 - tmp837; tmp906 = tmp837 + tmp836; } { fftw_real tmp472; fftw_real tmp473; fftw_real tmp213; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; tmp96 = tmp88 + tmp95; tmp472 = tmp95 - tmp88; tmp473 = tmp400 + tmp399; tmp474 = tmp472 + tmp473; tmp504 = tmp473 - tmp472; tmp401 = tmp399 - tmp400; tmp213 = tmp205 - tmp212; tmp222 = tmp214 + tmp221; tmp223 = (K995184726 * tmp213) - (K098017140 * tmp222); tmp285 = (K098017140 * tmp213) + (K995184726 * tmp222); } { fftw_real tmp341; fftw_real tmp342; fftw_real tmp650; fftw_real tmp651; ASSERT_ALIGNED_DOUBLE; tmp341 = tmp205 + tmp212; tmp342 = tmp221 - tmp214; tmp343 = (K956940335 * tmp341) - (K290284677 * tmp342); tmp357 = (K290284677 * tmp341) + (K956940335 * tmp342); tmp650 = (K049067674 * tmp595) + (K998795456 * tmp598); tmp651 = (K671558954 * tmp588) + (K740951125 * tmp591); tmp652 = tmp650 - tmp651; tmp723 = tmp651 + tmp650; } tmp592 = (K740951125 * tmp588) - (K671558954 * tmp591); tmp599 = (K998795456 * tmp595) - (K049067674 * tmp598); tmp600 = tmp592 + tmp599; tmp720 = tmp599 - tmp592; { fftw_real tmp232; fftw_real tmp241; fftw_real tmp344; fftw_real tmp345; ASSERT_ALIGNED_DOUBLE; tmp232 = tmp224 - tmp231; tmp241 = tmp233 + tmp240; tmp242 = (K773010453 * tmp232) - (K634393284 * tmp241); tmp286 = (K634393284 * tmp232) + (K773010453 * tmp241); tmp344 = tmp224 + tmp231; tmp345 = tmp240 - tmp233; tmp346 = (K471396736 * tmp344) + (K881921264 * tmp345); tmp358 = (K881921264 * tmp344) - (K471396736 * tmp345); } } } { fftw_real tmp65; fftw_real tmp421; fftw_real tmp34; fftw_real tmp414; fftw_real tmp129; fftw_real tmp423; fftw_real tmp413; fftw_real tmp424; fftw_real tmp18; fftw_real tmp66; fftw_real tmp398; ASSERT_ALIGNED_DOUBLE; tmp65 = K2_000000000 * (tmp49 + tmp64); tmp421 = K2_000000000 * (tmp417 - tmp420); tmp18 = tmp10 + tmp17; tmp34 = tmp18 + tmp33; tmp414 = tmp18 - tmp33; { fftw_real tmp97; fftw_real tmp128; fftw_real tmp405; fftw_real tmp412; ASSERT_ALIGNED_DOUBLE; tmp97 = tmp81 + tmp96; tmp128 = tmp112 + tmp127; tmp129 = K2_000000000 * (tmp97 + tmp128); tmp423 = tmp97 - tmp128; tmp405 = tmp401 - tmp404; tmp412 = tmp408 - tmp411; tmp413 = K2_000000000 * (tmp405 - tmp412); tmp424 = tmp405 + tmp412; } tmp66 = tmp34 + tmp65; output[64 * ostride] = tmp66 - tmp129; output[0] = tmp66 + tmp129; tmp398 = tmp34 - tmp65; output[32 * ostride] = tmp398 - tmp413; output[96 * ostride] = tmp398 + tmp413; { fftw_real tmp422; fftw_real tmp425; fftw_real tmp426; fftw_real tmp427; ASSERT_ALIGNED_DOUBLE; tmp422 = tmp414 - tmp421; tmp425 = K1_414213562 * (tmp423 - tmp424); output[80 * ostride] = tmp422 - tmp425; output[16 * ostride] = tmp422 + tmp425; tmp426 = tmp414 + tmp421; tmp427 = K1_414213562 * (tmp423 + tmp424); output[48 * ostride] = tmp426 - tmp427; output[112 * ostride] = tmp426 + tmp427; } } { fftw_real tmp432; fftw_real tmp446; fftw_real tmp442; fftw_real tmp450; fftw_real tmp435; fftw_real tmp447; fftw_real tmp439; fftw_real tmp449; fftw_real tmp428; fftw_real tmp440; fftw_real tmp441; ASSERT_ALIGNED_DOUBLE; tmp428 = tmp10 - tmp17; tmp432 = tmp428 - tmp431; tmp446 = tmp428 + tmp431; tmp440 = tmp127 - tmp112; tmp441 = tmp401 + tmp404; tmp442 = tmp440 + tmp441; tmp450 = tmp441 - tmp440; { fftw_real tmp433; fftw_real tmp434; fftw_real tmp437; fftw_real tmp438; ASSERT_ALIGNED_DOUBLE; tmp433 = tmp49 - tmp64; tmp434 = tmp417 + tmp420; tmp435 = K1_414213562 * (tmp433 - tmp434); tmp447 = K1_414213562 * (tmp433 + tmp434); tmp437 = tmp81 - tmp96; tmp438 = tmp408 + tmp411; tmp439 = tmp437 - tmp438; tmp449 = tmp437 + tmp438; } { fftw_real tmp436; fftw_real tmp443; fftw_real tmp444; fftw_real tmp445; ASSERT_ALIGNED_DOUBLE; tmp436 = tmp432 + tmp435; tmp443 = (K1_847759065 * tmp439) - (K765366864 * tmp442); output[72 * ostride] = tmp436 - tmp443; output[8 * ostride] = tmp436 + tmp443; tmp444 = tmp432 - tmp435; tmp445 = (K1_847759065 * tmp442) + (K765366864 * tmp439); output[40 * ostride] = tmp444 - tmp445; output[104 * ostride] = tmp444 + tmp445; } { fftw_real tmp448; fftw_real tmp451; fftw_real tmp452; fftw_real tmp453; ASSERT_ALIGNED_DOUBLE; tmp448 = tmp446 - tmp447; tmp451 = (K765366864 * tmp449) - (K1_847759065 * tmp450); output[88 * ostride] = tmp448 - tmp451; output[24 * ostride] = tmp448 + tmp451; tmp452 = tmp446 + tmp447; tmp453 = (K765366864 * tmp450) + (K1_847759065 * tmp449); output[56 * ostride] = tmp452 - tmp453; output[120 * ostride] = tmp452 + tmp453; } } { fftw_real tmp203; fftw_real tmp295; fftw_real tmp164; fftw_real tmp292; fftw_real tmp283; fftw_real tmp297; fftw_real tmp291; fftw_real tmp298; fftw_real tmp144; fftw_real tmp163; fftw_real tmp204; fftw_real tmp284; ASSERT_ALIGNED_DOUBLE; tmp203 = K2_000000000 * (tmp183 + tmp202); tmp295 = K2_000000000 * (tmp293 - tmp294); tmp144 = tmp134 + tmp143; tmp163 = (K1_847759065 * tmp153) - (K765366864 * tmp162); tmp164 = tmp144 + tmp163; tmp292 = tmp144 - tmp163; { fftw_real tmp243; fftw_real tmp282; fftw_real tmp287; fftw_real tmp290; ASSERT_ALIGNED_DOUBLE; tmp243 = tmp223 + tmp242; tmp282 = tmp262 + tmp281; tmp283 = K2_000000000 * (tmp243 + tmp282); tmp297 = tmp243 - tmp282; tmp287 = tmp285 - tmp286; tmp290 = tmp288 - tmp289; tmp291 = K2_000000000 * (tmp287 - tmp290); tmp298 = tmp287 + tmp290; } tmp204 = tmp164 + tmp203; output[66 * ostride] = tmp204 - tmp283; output[2 * ostride] = tmp204 + tmp283; tmp284 = tmp164 - tmp203; output[34 * ostride] = tmp284 - tmp291; output[98 * ostride] = tmp284 + tmp291; { fftw_real tmp296; fftw_real tmp299; fftw_real tmp300; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; tmp296 = tmp292 - tmp295; tmp299 = K1_414213562 * (tmp297 - tmp298); output[82 * ostride] = tmp296 - tmp299; output[18 * ostride] = tmp296 + tmp299; tmp300 = tmp292 + tmp295; tmp301 = K1_414213562 * (tmp297 + tmp298); output[50 * ostride] = tmp300 - tmp301; output[114 * ostride] = tmp300 + tmp301; } } { fftw_real tmp304; fftw_real tmp318; fftw_real tmp314; fftw_real tmp322; fftw_real tmp307; fftw_real tmp319; fftw_real tmp311; fftw_real tmp321; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp302; fftw_real tmp303; fftw_real tmp312; fftw_real tmp313; ASSERT_ALIGNED_DOUBLE; tmp302 = tmp134 - tmp143; tmp303 = (K765366864 * tmp153) + (K1_847759065 * tmp162); tmp304 = tmp302 - tmp303; tmp318 = tmp302 + tmp303; tmp312 = tmp285 + tmp286; tmp313 = tmp281 - tmp262; tmp314 = tmp312 + tmp313; tmp322 = tmp312 - tmp313; } { fftw_real tmp305; fftw_real tmp306; fftw_real tmp309; fftw_real tmp310; ASSERT_ALIGNED_DOUBLE; tmp305 = tmp183 - tmp202; tmp306 = tmp293 + tmp294; tmp307 = K1_414213562 * (tmp305 - tmp306); tmp319 = K1_414213562 * (tmp305 + tmp306); tmp309 = tmp223 - tmp242; tmp310 = tmp288 + tmp289; tmp311 = tmp309 - tmp310; tmp321 = tmp309 + tmp310; } { fftw_real tmp308; fftw_real tmp315; fftw_real tmp316; fftw_real tmp317; ASSERT_ALIGNED_DOUBLE; tmp308 = tmp304 + tmp307; tmp315 = (K1_847759065 * tmp311) - (K765366864 * tmp314); output[74 * ostride] = tmp308 - tmp315; output[10 * ostride] = tmp308 + tmp315; tmp316 = tmp304 - tmp307; tmp317 = (K1_847759065 * tmp314) + (K765366864 * tmp311); output[42 * ostride] = tmp316 - tmp317; output[106 * ostride] = tmp316 + tmp317; } { fftw_real tmp320; fftw_real tmp323; fftw_real tmp324; fftw_real tmp325; ASSERT_ALIGNED_DOUBLE; tmp320 = tmp318 - tmp319; tmp323 = (K765366864 * tmp321) - (K1_847759065 * tmp322); output[90 * ostride] = tmp320 - tmp323; output[26 * ostride] = tmp320 + tmp323; tmp324 = tmp318 + tmp319; tmp325 = (K765366864 * tmp322) + (K1_847759065 * tmp321); output[58 * ostride] = tmp324 - tmp325; output[122 * ostride] = tmp324 + tmp325; } } { fftw_real tmp460; fftw_real tmp488; fftw_real tmp487; fftw_real tmp492; fftw_real tmp483; fftw_real tmp491; fftw_real tmp467; fftw_real tmp489; fftw_real tmp468; fftw_real tmp484; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp456; fftw_real tmp459; fftw_real tmp485; fftw_real tmp486; ASSERT_ALIGNED_DOUBLE; tmp456 = tmp454 - tmp455; tmp459 = K1_414213562 * (tmp457 - tmp458); tmp460 = tmp456 + tmp459; tmp488 = tmp456 - tmp459; tmp485 = (K980785280 * tmp474) + (K195090322 * tmp471); tmp486 = (K831469612 * tmp481) + (K555570233 * tmp478); tmp487 = K2_000000000 * (tmp485 - tmp486); tmp492 = tmp485 + tmp486; } { fftw_real tmp475; fftw_real tmp482; fftw_real tmp463; fftw_real tmp466; ASSERT_ALIGNED_DOUBLE; tmp475 = (K980785280 * tmp471) - (K195090322 * tmp474); tmp482 = (K831469612 * tmp478) - (K555570233 * tmp481); tmp483 = K2_000000000 * (tmp475 + tmp482); tmp491 = tmp475 - tmp482; tmp463 = tmp461 - tmp462; tmp466 = tmp464 + tmp465; tmp467 = (K1_847759065 * tmp463) - (K765366864 * tmp466); tmp489 = (K1_847759065 * tmp466) + (K765366864 * tmp463); } tmp468 = tmp460 + tmp467; output[68 * ostride] = tmp468 - tmp483; output[4 * ostride] = tmp468 + tmp483; tmp484 = tmp460 - tmp467; output[36 * ostride] = tmp484 - tmp487; output[100 * ostride] = tmp484 + tmp487; { fftw_real tmp490; fftw_real tmp493; fftw_real tmp494; fftw_real tmp495; ASSERT_ALIGNED_DOUBLE; tmp490 = tmp488 - tmp489; tmp493 = K1_414213562 * (tmp491 - tmp492); output[84 * ostride] = tmp490 - tmp493; output[20 * ostride] = tmp490 + tmp493; tmp494 = tmp488 + tmp489; tmp495 = K1_414213562 * (tmp491 + tmp492); output[52 * ostride] = tmp494 - tmp495; output[116 * ostride] = tmp494 + tmp495; } } { fftw_real tmp498; fftw_real tmp514; fftw_real tmp513; fftw_real tmp518; fftw_real tmp509; fftw_real tmp517; fftw_real tmp501; fftw_real tmp515; fftw_real tmp502; fftw_real tmp510; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp496; fftw_real tmp497; fftw_real tmp511; fftw_real tmp512; ASSERT_ALIGNED_DOUBLE; tmp496 = tmp454 + tmp455; tmp497 = K1_414213562 * (tmp457 + tmp458); tmp498 = tmp496 - tmp497; tmp514 = tmp496 + tmp497; tmp511 = (K831469612 * tmp504) + (K555570233 * tmp503); tmp512 = (K980785280 * tmp507) - (K195090322 * tmp506); tmp513 = K2_000000000 * (tmp511 - tmp512); tmp518 = tmp511 + tmp512; } { fftw_real tmp505; fftw_real tmp508; fftw_real tmp499; fftw_real tmp500; ASSERT_ALIGNED_DOUBLE; tmp505 = (K831469612 * tmp503) - (K555570233 * tmp504); tmp508 = (K980785280 * tmp506) + (K195090322 * tmp507); tmp509 = K2_000000000 * (tmp505 - tmp508); tmp517 = tmp505 + tmp508; tmp499 = tmp461 + tmp462; tmp500 = tmp465 - tmp464; tmp501 = (K765366864 * tmp499) - (K1_847759065 * tmp500); tmp515 = (K765366864 * tmp500) + (K1_847759065 * tmp499); } tmp502 = tmp498 + tmp501; output[76 * ostride] = tmp502 - tmp509; output[12 * ostride] = tmp502 + tmp509; tmp510 = tmp498 - tmp501; output[44 * ostride] = tmp510 - tmp513; output[108 * ostride] = tmp510 + tmp513; { fftw_real tmp516; fftw_real tmp519; fftw_real tmp520; fftw_real tmp521; ASSERT_ALIGNED_DOUBLE; tmp516 = tmp514 - tmp515; tmp519 = K1_414213562 * (tmp517 - tmp518); output[92 * ostride] = tmp516 - tmp519; output[28 * ostride] = tmp516 + tmp519; tmp520 = tmp514 + tmp515; tmp521 = K1_414213562 * (tmp517 + tmp518); output[60 * ostride] = tmp520 - tmp521; output[124 * ostride] = tmp520 + tmp521; } } { fftw_real tmp339; fftw_real tmp367; fftw_real tmp332; fftw_real tmp364; fftw_real tmp355; fftw_real tmp369; fftw_real tmp363; fftw_real tmp370; fftw_real tmp328; fftw_real tmp331; fftw_real tmp340; fftw_real tmp356; ASSERT_ALIGNED_DOUBLE; tmp339 = K2_000000000 * (tmp335 - tmp338); tmp367 = K2_000000000 * (tmp365 - tmp366); tmp328 = tmp326 - tmp327; tmp331 = (K765366864 * tmp329) - (K1_847759065 * tmp330); tmp332 = tmp328 + tmp331; tmp364 = tmp328 - tmp331; { fftw_real tmp347; fftw_real tmp354; fftw_real tmp359; fftw_real tmp362; ASSERT_ALIGNED_DOUBLE; tmp347 = tmp343 - tmp346; tmp354 = tmp350 + tmp353; tmp355 = K2_000000000 * (tmp347 + tmp354); tmp369 = tmp347 - tmp354; tmp359 = tmp357 - tmp358; tmp362 = tmp360 - tmp361; tmp363 = K2_000000000 * (tmp359 - tmp362); tmp370 = tmp359 + tmp362; } tmp340 = tmp332 + tmp339; output[70 * ostride] = tmp340 - tmp355; output[6 * ostride] = tmp340 + tmp355; tmp356 = tmp332 - tmp339; output[38 * ostride] = tmp356 - tmp363; output[102 * ostride] = tmp356 + tmp363; { fftw_real tmp368; fftw_real tmp371; fftw_real tmp372; fftw_real tmp373; ASSERT_ALIGNED_DOUBLE; tmp368 = tmp364 - tmp367; tmp371 = K1_414213562 * (tmp369 - tmp370); output[86 * ostride] = tmp368 - tmp371; output[22 * ostride] = tmp368 + tmp371; tmp372 = tmp364 + tmp367; tmp373 = K1_414213562 * (tmp369 + tmp370); output[54 * ostride] = tmp372 - tmp373; output[118 * ostride] = tmp372 + tmp373; } } { fftw_real tmp376; fftw_real tmp390; fftw_real tmp386; fftw_real tmp394; fftw_real tmp379; fftw_real tmp391; fftw_real tmp383; fftw_real tmp393; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp374; fftw_real tmp375; fftw_real tmp384; fftw_real tmp385; ASSERT_ALIGNED_DOUBLE; tmp374 = tmp326 + tmp327; tmp375 = (K1_847759065 * tmp329) + (K765366864 * tmp330); tmp376 = tmp374 - tmp375; tmp390 = tmp374 + tmp375; tmp384 = tmp357 + tmp358; tmp385 = tmp353 - tmp350; tmp386 = tmp384 + tmp385; tmp394 = tmp384 - tmp385; } { fftw_real tmp377; fftw_real tmp378; fftw_real tmp381; fftw_real tmp382; ASSERT_ALIGNED_DOUBLE; tmp377 = tmp335 + tmp338; tmp378 = tmp365 + tmp366; tmp379 = K1_414213562 * (tmp377 - tmp378); tmp391 = K1_414213562 * (tmp378 + tmp377); tmp381 = tmp343 + tmp346; tmp382 = tmp360 + tmp361; tmp383 = tmp381 - tmp382; tmp393 = tmp381 + tmp382; } { fftw_real tmp380; fftw_real tmp387; fftw_real tmp388; fftw_real tmp389; ASSERT_ALIGNED_DOUBLE; tmp380 = tmp376 + tmp379; tmp387 = (K1_847759065 * tmp383) - (K765366864 * tmp386); output[78 * ostride] = tmp380 - tmp387; output[14 * ostride] = tmp380 + tmp387; tmp388 = tmp376 - tmp379; tmp389 = (K1_847759065 * tmp386) + (K765366864 * tmp383); output[46 * ostride] = tmp388 - tmp389; output[110 * ostride] = tmp388 + tmp389; } { fftw_real tmp392; fftw_real tmp395; fftw_real tmp396; fftw_real tmp397; ASSERT_ALIGNED_DOUBLE; tmp392 = tmp390 - tmp391; tmp395 = (K765366864 * tmp393) - (K1_847759065 * tmp394); output[94 * ostride] = tmp392 - tmp395; output[30 * ostride] = tmp392 + tmp395; tmp396 = tmp390 + tmp391; tmp397 = (K765366864 * tmp394) + (K1_847759065 * tmp393); output[62 * ostride] = tmp396 - tmp397; output[126 * ostride] = tmp396 + tmp397; } } { fftw_real tmp552; fftw_real tmp672; fftw_real tmp584; fftw_real tmp665; fftw_real tmp648; fftw_real tmp674; fftw_real tmp664; fftw_real tmp675; fftw_real tmp567; fftw_real tmp583; fftw_real tmp585; fftw_real tmp649; ASSERT_ALIGNED_DOUBLE; tmp552 = K2_000000000 * (tmp536 + tmp551); tmp672 = K2_000000000 * (tmp668 - tmp671); tmp567 = K2_000000000 * (tmp559 + tmp566); tmp583 = tmp574 + tmp582; tmp584 = tmp567 + tmp583; tmp665 = tmp583 - tmp567; { fftw_real tmp616; fftw_real tmp647; fftw_real tmp656; fftw_real tmp663; ASSERT_ALIGNED_DOUBLE; tmp616 = tmp600 + tmp615; tmp647 = tmp631 + tmp646; tmp648 = K2_000000000 * (tmp616 + tmp647); tmp674 = tmp616 - tmp647; tmp656 = tmp652 - tmp655; tmp663 = tmp659 - tmp662; tmp664 = K2_000000000 * (tmp656 - tmp663); tmp675 = tmp656 + tmp663; } tmp585 = tmp552 + tmp584; output[65 * ostride] = tmp585 - tmp648; output[ostride] = tmp648 + tmp585; tmp649 = tmp584 - tmp552; output[33 * ostride] = tmp649 - tmp664; output[97 * ostride] = tmp664 + tmp649; { fftw_real tmp673; fftw_real tmp676; fftw_real tmp677; fftw_real tmp678; ASSERT_ALIGNED_DOUBLE; tmp673 = tmp665 - tmp672; tmp676 = K1_414213562 * (tmp674 - tmp675); output[81 * ostride] = tmp673 - tmp676; output[17 * ostride] = tmp676 + tmp673; tmp677 = tmp672 + tmp665; tmp678 = K1_414213562 * (tmp674 + tmp675); output[49 * ostride] = tmp677 - tmp678; output[113 * ostride] = tmp678 + tmp677; } } { fftw_real tmp681; fftw_real tmp698; fftw_real tmp693; fftw_real tmp701; fftw_real tmp686; fftw_real tmp697; fftw_real tmp690; fftw_real tmp700; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp679; fftw_real tmp680; fftw_real tmp691; fftw_real tmp692; ASSERT_ALIGNED_DOUBLE; tmp679 = tmp536 - tmp551; tmp680 = tmp668 + tmp671; tmp681 = K1_414213562 * (tmp679 - tmp680); tmp698 = K1_414213562 * (tmp679 + tmp680); tmp691 = tmp652 + tmp655; tmp692 = tmp646 - tmp631; tmp693 = tmp691 + tmp692; tmp701 = tmp691 - tmp692; } { fftw_real tmp682; fftw_real tmp685; fftw_real tmp688; fftw_real tmp689; ASSERT_ALIGNED_DOUBLE; tmp682 = tmp582 - tmp574; tmp685 = K2_000000000 * (tmp683 - tmp684); tmp686 = tmp682 - tmp685; tmp697 = tmp685 + tmp682; tmp688 = tmp600 - tmp615; tmp689 = tmp659 + tmp662; tmp690 = tmp688 - tmp689; tmp700 = tmp688 + tmp689; } { fftw_real tmp687; fftw_real tmp694; fftw_real tmp695; fftw_real tmp696; ASSERT_ALIGNED_DOUBLE; tmp687 = tmp681 + tmp686; tmp694 = (K1_847759065 * tmp690) - (K765366864 * tmp693); output[73 * ostride] = tmp687 - tmp694; output[9 * ostride] = tmp694 + tmp687; tmp695 = tmp686 - tmp681; tmp696 = (K1_847759065 * tmp693) + (K765366864 * tmp690); output[41 * ostride] = tmp695 - tmp696; output[105 * ostride] = tmp696 + tmp695; } { fftw_real tmp699; fftw_real tmp702; fftw_real tmp703; fftw_real tmp704; ASSERT_ALIGNED_DOUBLE; tmp699 = tmp697 - tmp698; tmp702 = (K765366864 * tmp700) - (K1_847759065 * tmp701); output[89 * ostride] = tmp699 - tmp702; output[25 * ostride] = tmp702 + tmp699; tmp703 = tmp698 + tmp697; tmp704 = (K765366864 * tmp701) + (K1_847759065 * tmp700); output[57 * ostride] = tmp703 - tmp704; output[121 * ostride] = tmp704 + tmp703; } } { fftw_real tmp711; fftw_real tmp740; fftw_real tmp718; fftw_real tmp739; fftw_real tmp726; fftw_real tmp736; fftw_real tmp733; fftw_real tmp737; fftw_real tmp742; fftw_real tmp743; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp707; fftw_real tmp710; fftw_real tmp714; fftw_real tmp717; ASSERT_ALIGNED_DOUBLE; tmp707 = tmp705 - tmp706; tmp710 = tmp708 + tmp709; tmp711 = (K1_847759065 * tmp707) - (K765366864 * tmp710); tmp740 = (K1_847759065 * tmp710) + (K765366864 * tmp707); tmp714 = K1_414213562 * (tmp712 - tmp713); tmp717 = tmp715 - tmp716; tmp718 = tmp714 + tmp717; tmp739 = tmp717 - tmp714; { fftw_real tmp722; fftw_real tmp725; fftw_real tmp729; fftw_real tmp732; ASSERT_ALIGNED_DOUBLE; tmp722 = tmp720 - tmp721; tmp725 = tmp723 + tmp724; tmp726 = (K980785280 * tmp722) - (K195090322 * tmp725); tmp736 = (K980785280 * tmp725) + (K195090322 * tmp722); tmp729 = tmp727 - tmp728; tmp732 = tmp730 + tmp731; tmp733 = (K831469612 * tmp729) - (K555570233 * tmp732); tmp737 = (K831469612 * tmp732) + (K555570233 * tmp729); } tmp742 = tmp726 - tmp733; tmp743 = tmp736 + tmp737; } { fftw_real tmp719; fftw_real tmp734; fftw_real tmp735; fftw_real tmp738; ASSERT_ALIGNED_DOUBLE; tmp719 = tmp711 + tmp718; tmp734 = K2_000000000 * (tmp726 + tmp733); output[69 * ostride] = tmp719 - tmp734; output[5 * ostride] = tmp734 + tmp719; tmp735 = tmp718 - tmp711; tmp738 = K2_000000000 * (tmp736 - tmp737); output[37 * ostride] = tmp735 - tmp738; output[101 * ostride] = tmp738 + tmp735; } { fftw_real tmp741; fftw_real tmp744; fftw_real tmp745; fftw_real tmp746; ASSERT_ALIGNED_DOUBLE; tmp741 = tmp739 - tmp740; tmp744 = K1_414213562 * (tmp742 - tmp743); output[85 * ostride] = tmp741 - tmp744; output[21 * ostride] = tmp744 + tmp741; tmp745 = tmp740 + tmp739; tmp746 = K1_414213562 * (tmp742 + tmp743); output[53 * ostride] = tmp745 - tmp746; output[117 * ostride] = tmp746 + tmp745; } } { fftw_real tmp749; fftw_real tmp766; fftw_real tmp752; fftw_real tmp765; fftw_real tmp756; fftw_real tmp762; fftw_real tmp759; fftw_real tmp763; fftw_real tmp768; fftw_real tmp769; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp747; fftw_real tmp748; fftw_real tmp750; fftw_real tmp751; ASSERT_ALIGNED_DOUBLE; tmp747 = tmp705 + tmp706; tmp748 = tmp708 - tmp709; tmp749 = (K765366864 * tmp747) - (K1_847759065 * tmp748); tmp766 = (K765366864 * tmp748) + (K1_847759065 * tmp747); tmp750 = tmp716 + tmp715; tmp751 = K1_414213562 * (tmp712 + tmp713); tmp752 = tmp750 - tmp751; tmp765 = tmp751 + tmp750; { fftw_real tmp754; fftw_real tmp755; fftw_real tmp757; fftw_real tmp758; ASSERT_ALIGNED_DOUBLE; tmp754 = tmp720 + tmp721; tmp755 = tmp723 - tmp724; tmp756 = (K831469612 * tmp754) - (K555570233 * tmp755); tmp762 = (K831469612 * tmp755) + (K555570233 * tmp754); tmp757 = tmp730 - tmp731; tmp758 = tmp727 + tmp728; tmp759 = (K980785280 * tmp757) + (K195090322 * tmp758); tmp763 = (K980785280 * tmp758) - (K195090322 * tmp757); } tmp768 = tmp756 + tmp759; tmp769 = tmp762 + tmp763; } { fftw_real tmp753; fftw_real tmp760; fftw_real tmp761; fftw_real tmp764; ASSERT_ALIGNED_DOUBLE; tmp753 = tmp749 + tmp752; tmp760 = K2_000000000 * (tmp756 - tmp759); output[77 * ostride] = tmp753 - tmp760; output[13 * ostride] = tmp760 + tmp753; tmp761 = tmp752 - tmp749; tmp764 = K2_000000000 * (tmp762 - tmp763); output[45 * ostride] = tmp761 - tmp764; output[109 * ostride] = tmp764 + tmp761; } { fftw_real tmp767; fftw_real tmp770; fftw_real tmp771; fftw_real tmp772; ASSERT_ALIGNED_DOUBLE; tmp767 = tmp765 - tmp766; tmp770 = K1_414213562 * (tmp768 - tmp769); output[93 * ostride] = tmp767 - tmp770; output[29 * ostride] = tmp770 + tmp767; tmp771 = tmp766 + tmp765; tmp772 = K1_414213562 * (tmp768 + tmp769); output[61 * ostride] = tmp771 - tmp772; output[125 * ostride] = tmp772 + tmp771; } } { fftw_real tmp802; fftw_real tmp858; fftw_real tmp787; fftw_real tmp851; fftw_real tmp834; fftw_real tmp861; fftw_real tmp850; fftw_real tmp860; fftw_real tmp779; fftw_real tmp786; fftw_real tmp803; fftw_real tmp835; ASSERT_ALIGNED_DOUBLE; tmp802 = K2_000000000 * (tmp794 + tmp801); tmp858 = K2_000000000 * (tmp854 - tmp857); tmp779 = K2_000000000 * (tmp775 - tmp778); tmp786 = tmp782 + tmp785; tmp787 = tmp779 + tmp786; tmp851 = tmp786 - tmp779; { fftw_real tmp818; fftw_real tmp833; fftw_real tmp842; fftw_real tmp849; ASSERT_ALIGNED_DOUBLE; tmp818 = tmp810 - tmp817; tmp833 = tmp825 - tmp832; tmp834 = K2_000000000 * (tmp818 - tmp833); tmp861 = tmp818 + tmp833; tmp842 = tmp838 + tmp841; tmp849 = tmp845 + tmp848; tmp850 = K2_000000000 * (tmp842 + tmp849); tmp860 = tmp842 - tmp849; } tmp803 = tmp787 - tmp802; output[35 * ostride] = tmp803 - tmp834; output[99 * ostride] = tmp834 + tmp803; tmp835 = tmp802 + tmp787; output[67 * ostride] = tmp835 - tmp850; output[3 * ostride] = tmp850 + tmp835; { fftw_real tmp859; fftw_real tmp862; fftw_real tmp863; fftw_real tmp864; ASSERT_ALIGNED_DOUBLE; tmp859 = tmp851 - tmp858; tmp862 = K1_414213562 * (tmp860 - tmp861); output[83 * ostride] = tmp859 - tmp862; output[19 * ostride] = tmp862 + tmp859; tmp863 = tmp858 + tmp851; tmp864 = K1_414213562 * (tmp860 + tmp861); output[51 * ostride] = tmp863 - tmp864; output[115 * ostride] = tmp864 + tmp863; } } { fftw_real tmp869; fftw_real tmp884; fftw_real tmp879; fftw_real tmp887; fftw_real tmp872; fftw_real tmp883; fftw_real tmp876; fftw_real tmp886; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp867; fftw_real tmp868; fftw_real tmp877; fftw_real tmp878; ASSERT_ALIGNED_DOUBLE; tmp867 = K2_000000000 * (tmp865 - tmp866); tmp868 = tmp785 - tmp782; tmp869 = tmp867 + tmp868; tmp884 = tmp868 - tmp867; tmp877 = tmp810 + tmp817; tmp878 = tmp848 - tmp845; tmp879 = tmp877 - tmp878; tmp887 = tmp877 + tmp878; } { fftw_real tmp870; fftw_real tmp871; fftw_real tmp874; fftw_real tmp875; ASSERT_ALIGNED_DOUBLE; tmp870 = tmp794 - tmp801; tmp871 = tmp854 + tmp857; tmp872 = K1_414213562 * (tmp870 + tmp871); tmp883 = K1_414213562 * (tmp870 - tmp871); tmp874 = tmp838 - tmp841; tmp875 = tmp825 + tmp832; tmp876 = tmp874 + tmp875; tmp886 = tmp874 - tmp875; } { fftw_real tmp873; fftw_real tmp880; fftw_real tmp881; fftw_real tmp882; ASSERT_ALIGNED_DOUBLE; tmp873 = tmp869 - tmp872; tmp880 = (K765366864 * tmp876) - (K1_847759065 * tmp879); output[91 * ostride] = tmp873 - tmp880; output[27 * ostride] = tmp880 + tmp873; tmp881 = tmp872 + tmp869; tmp882 = (K765366864 * tmp879) + (K1_847759065 * tmp876); output[59 * ostride] = tmp881 - tmp882; output[123 * ostride] = tmp882 + tmp881; } { fftw_real tmp885; fftw_real tmp888; fftw_real tmp889; fftw_real tmp890; ASSERT_ALIGNED_DOUBLE; tmp885 = tmp883 + tmp884; tmp888 = (K1_847759065 * tmp886) - (K765366864 * tmp887); output[75 * ostride] = tmp885 - tmp888; output[11 * ostride] = tmp888 + tmp885; tmp889 = tmp884 - tmp883; tmp890 = (K1_847759065 * tmp887) + (K765366864 * tmp886); output[43 * ostride] = tmp889 - tmp890; output[107 * ostride] = tmp890 + tmp889; } } { fftw_real tmp897; fftw_real tmp926; fftw_real tmp904; fftw_real tmp925; fftw_real tmp912; fftw_real tmp922; fftw_real tmp919; fftw_real tmp923; fftw_real tmp928; fftw_real tmp929; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp893; fftw_real tmp896; fftw_real tmp900; fftw_real tmp903; ASSERT_ALIGNED_DOUBLE; tmp893 = tmp891 - tmp892; tmp896 = tmp894 + tmp895; tmp897 = (K1_847759065 * tmp893) - (K765366864 * tmp896); tmp926 = (K1_847759065 * tmp896) + (K765366864 * tmp893); tmp900 = K1_414213562 * (tmp898 - tmp899); tmp903 = tmp901 - tmp902; tmp904 = tmp900 + tmp903; tmp925 = tmp903 - tmp900; { fftw_real tmp908; fftw_real tmp911; fftw_real tmp915; fftw_real tmp918; ASSERT_ALIGNED_DOUBLE; tmp908 = tmp906 - tmp907; tmp911 = tmp909 + tmp910; tmp912 = (K980785280 * tmp908) - (K195090322 * tmp911); tmp922 = (K980785280 * tmp911) + (K195090322 * tmp908); tmp915 = tmp913 - tmp914; tmp918 = tmp916 - tmp917; tmp919 = (K831469612 * tmp915) - (K555570233 * tmp918); tmp923 = (K831469612 * tmp918) + (K555570233 * tmp915); } tmp928 = tmp912 - tmp919; tmp929 = tmp922 + tmp923; } { fftw_real tmp905; fftw_real tmp920; fftw_real tmp921; fftw_real tmp924; ASSERT_ALIGNED_DOUBLE; tmp905 = tmp897 + tmp904; tmp920 = K2_000000000 * (tmp912 + tmp919); output[71 * ostride] = tmp905 - tmp920; output[7 * ostride] = tmp920 + tmp905; tmp921 = tmp904 - tmp897; tmp924 = K2_000000000 * (tmp922 - tmp923); output[39 * ostride] = tmp921 - tmp924; output[103 * ostride] = tmp924 + tmp921; } { fftw_real tmp927; fftw_real tmp930; fftw_real tmp931; fftw_real tmp932; ASSERT_ALIGNED_DOUBLE; tmp927 = tmp925 - tmp926; tmp930 = K1_414213562 * (tmp928 - tmp929); output[87 * ostride] = tmp927 - tmp930; output[23 * ostride] = tmp930 + tmp927; tmp931 = tmp926 + tmp925; tmp932 = K1_414213562 * (tmp928 + tmp929); output[55 * ostride] = tmp931 - tmp932; output[119 * ostride] = tmp932 + tmp931; } } { fftw_real tmp935; fftw_real tmp951; fftw_real tmp938; fftw_real tmp952; fftw_real tmp942; fftw_real tmp948; fftw_real tmp945; fftw_real tmp949; fftw_real tmp954; fftw_real tmp955; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp933; fftw_real tmp934; fftw_real tmp936; fftw_real tmp937; ASSERT_ALIGNED_DOUBLE; tmp933 = tmp902 + tmp901; tmp934 = K1_414213562 * (tmp898 + tmp899); tmp935 = tmp933 - tmp934; tmp951 = tmp934 + tmp933; tmp936 = tmp891 + tmp892; tmp937 = tmp894 - tmp895; tmp938 = (K765366864 * tmp936) - (K1_847759065 * tmp937); tmp952 = (K765366864 * tmp937) + (K1_847759065 * tmp936); { fftw_real tmp940; fftw_real tmp941; fftw_real tmp943; fftw_real tmp944; ASSERT_ALIGNED_DOUBLE; tmp940 = tmp909 - tmp910; tmp941 = tmp906 + tmp907; tmp942 = (K831469612 * tmp940) + (K555570233 * tmp941); tmp948 = (K831469612 * tmp941) - (K555570233 * tmp940); tmp943 = tmp913 + tmp914; tmp944 = tmp916 + tmp917; tmp945 = (K980785280 * tmp943) - (K195090322 * tmp944); tmp949 = (K980785280 * tmp944) + (K195090322 * tmp943); } tmp954 = tmp948 + tmp949; tmp955 = tmp942 + tmp945; } { fftw_real tmp939; fftw_real tmp946; fftw_real tmp947; fftw_real tmp950; ASSERT_ALIGNED_DOUBLE; tmp939 = tmp935 - tmp938; tmp946 = K2_000000000 * (tmp942 - tmp945); output[47 * ostride] = tmp939 - tmp946; output[111 * ostride] = tmp946 + tmp939; tmp947 = tmp938 + tmp935; tmp950 = K2_000000000 * (tmp948 - tmp949); output[79 * ostride] = tmp947 - tmp950; output[15 * ostride] = tmp950 + tmp947; } { fftw_real tmp953; fftw_real tmp956; fftw_real tmp957; fftw_real tmp958; ASSERT_ALIGNED_DOUBLE; tmp953 = tmp951 - tmp952; tmp956 = K1_414213562 * (tmp954 - tmp955); output[95 * ostride] = tmp953 - tmp956; output[31 * ostride] = tmp956 + tmp953; tmp957 = tmp952 + tmp951; tmp958 = K1_414213562 * (tmp955 + tmp954); output[63 * ostride] = tmp957 - tmp958; output[127 * ostride] = tmp958 + tmp957; } } } fftw_codelet_desc fftw_hc2real_128_desc = { "fftw_hc2real_128", (void (*)()) fftw_hc2real_128, 128, FFTW_BACKWARD, FFTW_HC2REAL, 2831, 0, (const int *) 0, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_2.c����������������������������������������������������������������������������0000644�0001754�0000144�00000005712�07637527403�010444� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 2 */ /* * This function contains 8 FP additions, 6 FP multiplications, * (or, 6 additions, 4 multiplications, 2 fused multiply/add), * 11 stack variables, and 16 memory accesses */ static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (2 * iostride); { fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp11 = X[0]; tmp12 = X[iostride]; X[iostride] = tmp11 - tmp12; X[0] = tmp11 + tmp12; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 1) { fftw_real tmp3; fftw_real tmp4; fftw_real tmp8; fftw_real tmp5; fftw_real tmp6; fftw_real tmp10; fftw_real tmp7; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp3 = X[0]; tmp4 = Y[-iostride]; tmp8 = tmp3 - tmp4; tmp5 = Y[0]; tmp6 = X[iostride]; tmp10 = tmp5 + tmp6; X[0] = tmp3 + tmp4; Y[-iostride] = tmp5 - tmp6; tmp7 = c_re(W[0]); tmp9 = c_im(W[0]); X[iostride] = (tmp7 * tmp8) + (tmp9 * tmp10); Y[0] = (tmp7 * tmp10) - (tmp9 * tmp8); } if (i == m) { fftw_real tmp1; fftw_real tmp2; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; X[0] = K2_000000000 * tmp1; tmp2 = Y[0]; X[iostride] = -(K2_000000000 * tmp2); } } static const int twiddle_order[] = { 1 }; fftw_codelet_desc fftw_hc2hc_backward_2_desc = { "fftw_hc2hc_backward_2", (void (*)()) fftw_hc2hc_backward_2, 2, FFTW_BACKWARD, FFTW_HC2HC, 58, 1, twiddle_order, }; ������������������������������������������������������fftw-2.1.5/rfftw/fhb_3.c����������������������������������������������������������������������������0000644�0001754�0000144�00000011165�07637527404�010445� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:51 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 3 */ /* * This function contains 24 FP additions, 16 FP multiplications, * (or, 16 additions, 8 multiplications, 8 fused multiply/add), * 15 stack variables, and 24 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_3(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (3 * iostride); { fftw_real tmp30; fftw_real tmp26; fftw_real tmp27; fftw_real tmp28; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp29 = Y[-iostride]; tmp30 = K1_732050807 * tmp29; tmp26 = X[0]; tmp27 = X[iostride]; tmp28 = tmp26 - tmp27; X[0] = tmp26 + (K2_000000000 * tmp27); X[iostride] = tmp28 - tmp30; X[2 * iostride] = tmp28 + tmp30; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 2) { fftw_real tmp6; fftw_real tmp9; fftw_real tmp15; fftw_real tmp19; fftw_real tmp10; fftw_real tmp13; fftw_real tmp16; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp11; fftw_real tmp12; ASSERT_ALIGNED_DOUBLE; tmp6 = X[0]; tmp7 = X[iostride]; tmp8 = Y[-2 * iostride]; tmp9 = tmp7 + tmp8; tmp15 = K866025403 * (tmp7 - tmp8); tmp19 = tmp6 - (K500000000 * tmp9); tmp10 = Y[0]; tmp11 = Y[-iostride]; tmp12 = X[2 * iostride]; tmp13 = tmp11 - tmp12; tmp16 = tmp10 - (K500000000 * tmp13); tmp20 = K866025403 * (tmp11 + tmp12); } X[0] = tmp6 + tmp9; { fftw_real tmp23; fftw_real tmp25; fftw_real tmp22; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp23 = tmp16 - tmp15; tmp25 = tmp19 + tmp20; tmp22 = c_re(W[1]); tmp24 = c_im(W[1]); Y[0] = (tmp22 * tmp23) - (tmp24 * tmp25); X[2 * iostride] = (tmp24 * tmp23) + (tmp22 * tmp25); } Y[-2 * iostride] = tmp10 + tmp13; { fftw_real tmp17; fftw_real tmp21; fftw_real tmp14; fftw_real tmp18; ASSERT_ALIGNED_DOUBLE; tmp17 = tmp15 + tmp16; tmp21 = tmp19 - tmp20; tmp14 = c_re(W[0]); tmp18 = c_im(W[0]); Y[-iostride] = (tmp14 * tmp17) - (tmp18 * tmp21); X[iostride] = (tmp18 * tmp17) + (tmp14 * tmp21); } } if (i == m) { fftw_real tmp5; fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; ASSERT_ALIGNED_DOUBLE; tmp4 = Y[0]; tmp5 = K1_732050807 * tmp4; tmp1 = X[iostride]; tmp2 = X[0]; tmp3 = tmp2 - tmp1; X[0] = tmp1 + (K2_000000000 * tmp2); X[2 * iostride] = -(tmp3 + tmp5); X[iostride] = tmp3 - tmp5; } } static const int twiddle_order[] = { 1, 2 }; fftw_codelet_desc fftw_hc2hc_backward_3_desc = { "fftw_hc2hc_backward_3", (void (*)()) fftw_hc2hc_backward_3, 3, FFTW_BACKWARD, FFTW_HC2HC, 80, 2, twiddle_order, }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_4.c����������������������������������������������������������������������������0000644�0001754�0000144�00000012620�07637527405�010444� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:52 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 4 */ /* * This function contains 34 FP additions, 18 FP multiplications, * (or, 28 additions, 12 multiplications, 6 fused multiply/add), * 15 stack variables, and 32 memory accesses */ static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_4(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (4 * iostride); { fftw_real tmp39; fftw_real tmp42; fftw_real tmp37; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp38; fftw_real tmp41; fftw_real tmp35; fftw_real tmp36; ASSERT_ALIGNED_DOUBLE; tmp38 = X[iostride]; tmp39 = K2_000000000 * tmp38; tmp41 = Y[-iostride]; tmp42 = K2_000000000 * tmp41; tmp35 = X[0]; tmp36 = X[2 * iostride]; tmp37 = tmp35 + tmp36; tmp40 = tmp35 - tmp36; } X[2 * iostride] = tmp37 - tmp39; X[0] = tmp37 + tmp39; X[3 * iostride] = tmp40 + tmp42; X[iostride] = tmp40 - tmp42; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) { fftw_real tmp9; fftw_real tmp28; fftw_real tmp18; fftw_real tmp25; fftw_real tmp12; fftw_real tmp24; fftw_real tmp21; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp7; fftw_real tmp8; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp7 = X[0]; tmp8 = Y[-2 * iostride]; tmp9 = tmp7 + tmp8; tmp28 = tmp7 - tmp8; tmp16 = Y[0]; tmp17 = X[2 * iostride]; tmp18 = tmp16 - tmp17; tmp25 = tmp16 + tmp17; } { fftw_real tmp10; fftw_real tmp11; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp10 = X[iostride]; tmp11 = Y[-3 * iostride]; tmp12 = tmp10 + tmp11; tmp24 = tmp10 - tmp11; tmp19 = Y[-iostride]; tmp20 = X[3 * iostride]; tmp21 = tmp19 - tmp20; tmp29 = tmp19 + tmp20; } X[0] = tmp9 + tmp12; { fftw_real tmp14; fftw_real tmp22; fftw_real tmp13; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp14 = tmp9 - tmp12; tmp22 = tmp18 - tmp21; tmp13 = c_re(W[1]); tmp15 = c_im(W[1]); X[2 * iostride] = (tmp13 * tmp14) + (tmp15 * tmp22); Y[-iostride] = (tmp13 * tmp22) - (tmp15 * tmp14); } Y[-3 * iostride] = tmp18 + tmp21; { fftw_real tmp26; fftw_real tmp30; fftw_real tmp23; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp26 = tmp24 + tmp25; tmp30 = tmp28 - tmp29; tmp23 = c_re(W[0]); tmp27 = c_im(W[0]); Y[-2 * iostride] = (tmp23 * tmp26) - (tmp27 * tmp30); X[iostride] = (tmp27 * tmp26) + (tmp23 * tmp30); } { fftw_real tmp32; fftw_real tmp34; fftw_real tmp31; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp32 = tmp25 - tmp24; tmp34 = tmp28 + tmp29; tmp31 = c_re(W[2]); tmp33 = c_im(W[2]); Y[0] = (tmp31 * tmp32) - (tmp33 * tmp34); X[3 * iostride] = (tmp33 * tmp32) + (tmp31 * tmp34); } } if (i == m) { fftw_real tmp1; fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp2 = X[iostride]; tmp3 = tmp1 - tmp2; tmp4 = Y[0]; tmp5 = Y[-iostride]; tmp6 = tmp4 + tmp5; X[0] = K2_000000000 * (tmp1 + tmp2); X[2 * iostride] = -(K2_000000000 * (tmp4 - tmp5)); X[iostride] = K1_414213562 * (tmp3 - tmp6); X[3 * iostride] = -(K1_414213562 * (tmp3 + tmp6)); } } static const int twiddle_order[] = { 1, 2, 3 }; fftw_codelet_desc fftw_hc2hc_backward_4_desc = { "fftw_hc2hc_backward_4", (void (*)()) fftw_hc2hc_backward_4, 4, FFTW_BACKWARD, FFTW_HC2HC, 102, 3, twiddle_order, }; ����������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_5.c����������������������������������������������������������������������������0000644�0001754�0000144�00000020442�07637527407�010450� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:53 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 5 */ /* * This function contains 64 FP additions, 42 FP multiplications, * (or, 42 additions, 20 multiplications, 22 fused multiply/add), * 25 stack variables, and 40 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_5(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (5 * iostride); { fftw_real tmp70; fftw_real tmp72; fftw_real tmp61; fftw_real tmp64; fftw_real tmp65; fftw_real tmp66; fftw_real tmp71; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp68; fftw_real tmp69; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp68 = Y[-iostride]; tmp69 = Y[-2 * iostride]; tmp70 = (K1_902113032 * tmp68) + (K1_175570504 * tmp69); tmp72 = (K1_902113032 * tmp69) - (K1_175570504 * tmp68); tmp61 = X[0]; tmp62 = X[iostride]; tmp63 = X[2 * iostride]; tmp64 = tmp62 + tmp63; tmp65 = K1_118033988 * (tmp62 - tmp63); tmp66 = tmp61 - (K500000000 * tmp64); } X[0] = tmp61 + (K2_000000000 * tmp64); tmp71 = tmp66 - tmp65; X[3 * iostride] = tmp71 - tmp72; X[2 * iostride] = tmp71 + tmp72; tmp67 = tmp65 + tmp66; X[4 * iostride] = tmp67 + tmp70; X[iostride] = tmp67 - tmp70; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 4) { fftw_real tmp13; fftw_real tmp32; fftw_real tmp50; fftw_real tmp39; fftw_real tmp20; fftw_real tmp38; fftw_real tmp21; fftw_real tmp34; fftw_real tmp28; fftw_real tmp33; fftw_real tmp43; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp19; fftw_real tmp31; fftw_real tmp16; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp13 = X[0]; { fftw_real tmp17; fftw_real tmp18; fftw_real tmp14; fftw_real tmp15; ASSERT_ALIGNED_DOUBLE; tmp17 = X[2 * iostride]; tmp18 = Y[-3 * iostride]; tmp19 = tmp17 + tmp18; tmp31 = tmp17 - tmp18; tmp14 = X[iostride]; tmp15 = Y[-4 * iostride]; tmp16 = tmp14 + tmp15; tmp30 = tmp14 - tmp15; } tmp32 = (K587785252 * tmp30) - (K951056516 * tmp31); tmp50 = (K951056516 * tmp30) + (K587785252 * tmp31); tmp39 = K559016994 * (tmp16 - tmp19); tmp20 = tmp16 + tmp19; tmp38 = tmp13 - (K250000000 * tmp20); } { fftw_real tmp27; fftw_real tmp42; fftw_real tmp24; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp21 = Y[0]; { fftw_real tmp25; fftw_real tmp26; fftw_real tmp22; fftw_real tmp23; ASSERT_ALIGNED_DOUBLE; tmp25 = Y[-2 * iostride]; tmp26 = X[3 * iostride]; tmp27 = tmp25 - tmp26; tmp42 = tmp25 + tmp26; tmp22 = Y[-iostride]; tmp23 = X[4 * iostride]; tmp24 = tmp22 - tmp23; tmp41 = tmp22 + tmp23; } tmp34 = K559016994 * (tmp24 - tmp27); tmp28 = tmp24 + tmp27; tmp33 = tmp21 - (K250000000 * tmp28); tmp43 = (K587785252 * tmp41) - (K951056516 * tmp42); tmp55 = (K951056516 * tmp41) + (K587785252 * tmp42); } X[0] = tmp13 + tmp20; { fftw_real tmp52; fftw_real tmp58; fftw_real tmp56; fftw_real tmp60; fftw_real tmp51; fftw_real tmp54; ASSERT_ALIGNED_DOUBLE; tmp51 = tmp34 + tmp33; tmp52 = tmp50 + tmp51; tmp58 = tmp51 - tmp50; tmp54 = tmp39 + tmp38; tmp56 = tmp54 - tmp55; tmp60 = tmp54 + tmp55; { fftw_real tmp49; fftw_real tmp53; fftw_real tmp57; fftw_real tmp59; ASSERT_ALIGNED_DOUBLE; tmp49 = c_re(W[0]); tmp53 = c_im(W[0]); Y[-3 * iostride] = (tmp49 * tmp52) - (tmp53 * tmp56); X[iostride] = (tmp53 * tmp52) + (tmp49 * tmp56); tmp57 = c_re(W[3]); tmp59 = c_im(W[3]); Y[0] = (tmp57 * tmp58) - (tmp59 * tmp60); X[4 * iostride] = (tmp59 * tmp58) + (tmp57 * tmp60); } } Y[-4 * iostride] = tmp21 + tmp28; { fftw_real tmp36; fftw_real tmp46; fftw_real tmp44; fftw_real tmp48; fftw_real tmp35; fftw_real tmp40; ASSERT_ALIGNED_DOUBLE; tmp35 = tmp33 - tmp34; tmp36 = tmp32 + tmp35; tmp46 = tmp35 - tmp32; tmp40 = tmp38 - tmp39; tmp44 = tmp40 - tmp43; tmp48 = tmp40 + tmp43; { fftw_real tmp29; fftw_real tmp37; fftw_real tmp45; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp29 = c_re(W[1]); tmp37 = c_im(W[1]); Y[-2 * iostride] = (tmp29 * tmp36) - (tmp37 * tmp44); X[2 * iostride] = (tmp37 * tmp36) + (tmp29 * tmp44); tmp45 = c_re(W[2]); tmp47 = c_im(W[2]); Y[-iostride] = (tmp45 * tmp46) - (tmp47 * tmp48); X[3 * iostride] = (tmp47 * tmp46) + (tmp45 * tmp48); } } } if (i == m) { fftw_real tmp10; fftw_real tmp12; fftw_real tmp1; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp11; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp2; fftw_real tmp3; ASSERT_ALIGNED_DOUBLE; tmp8 = Y[-iostride]; tmp9 = Y[0]; tmp10 = (K1_902113032 * tmp8) + (K1_175570504 * tmp9); tmp12 = (K1_175570504 * tmp8) - (K1_902113032 * tmp9); tmp1 = X[2 * iostride]; tmp2 = X[iostride]; tmp3 = X[0]; tmp4 = tmp2 + tmp3; tmp5 = (K500000000 * tmp4) - tmp1; tmp6 = K1_118033988 * (tmp3 - tmp2); } X[0] = tmp1 + (K2_000000000 * tmp4); tmp11 = tmp6 - tmp5; X[2 * iostride] = tmp11 + tmp12; X[3 * iostride] = tmp12 - tmp11; tmp7 = tmp5 + tmp6; X[iostride] = tmp7 - tmp10; X[4 * iostride] = -(tmp7 + tmp10); } } static const int twiddle_order[] = { 1, 2, 3, 4 }; fftw_codelet_desc fftw_hc2hc_backward_5_desc = { "fftw_hc2hc_backward_5", (void (*)()) fftw_hc2hc_backward_5, 5, FFTW_BACKWARD, FFTW_HC2HC, 124, 4, twiddle_order, }; ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_6.c����������������������������������������������������������������������������0000644�0001754�0000144�00000020734�07637527406�010454� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:53 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 6 */ /* * This function contains 72 FP additions, 38 FP multiplications, * (or, 54 additions, 20 multiplications, 18 fused multiply/add), * 25 stack variables, and 48 memory accesses */ static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_6(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (6 * iostride); { fftw_real tmp71; fftw_real tmp75; fftw_real tmp80; fftw_real tmp82; fftw_real tmp74; fftw_real tmp76; fftw_real tmp69; fftw_real tmp70; fftw_real tmp77; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp69 = X[0]; tmp70 = X[3 * iostride]; tmp71 = tmp69 - tmp70; tmp75 = tmp69 + tmp70; { fftw_real tmp78; fftw_real tmp79; fftw_real tmp72; fftw_real tmp73; ASSERT_ALIGNED_DOUBLE; tmp78 = Y[-2 * iostride]; tmp79 = Y[-iostride]; tmp80 = K1_732050807 * (tmp78 + tmp79); tmp82 = K1_732050807 * (tmp78 - tmp79); tmp72 = X[2 * iostride]; tmp73 = X[iostride]; tmp74 = tmp72 - tmp73; tmp76 = tmp72 + tmp73; } X[3 * iostride] = tmp71 + (K2_000000000 * tmp74); tmp77 = tmp71 - tmp74; X[iostride] = tmp77 - tmp80; X[5 * iostride] = tmp77 + tmp80; X[0] = tmp75 + (K2_000000000 * tmp76); tmp81 = tmp75 - tmp76; X[2 * iostride] = tmp81 + tmp82; X[4 * iostride] = tmp81 - tmp82; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 5) { fftw_real tmp15; fftw_real tmp46; fftw_real tmp25; fftw_real tmp52; fftw_real tmp22; fftw_real tmp35; fftw_real tmp49; fftw_real tmp62; fftw_real tmp32; fftw_real tmp39; fftw_real tmp55; fftw_real tmp59; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp13; fftw_real tmp14; fftw_real tmp23; fftw_real tmp24; ASSERT_ALIGNED_DOUBLE; tmp13 = X[0]; tmp14 = Y[-3 * iostride]; tmp15 = tmp13 + tmp14; tmp46 = tmp13 - tmp14; tmp23 = Y[0]; tmp24 = X[3 * iostride]; tmp25 = tmp23 - tmp24; tmp52 = tmp23 + tmp24; } { fftw_real tmp18; fftw_real tmp47; fftw_real tmp21; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp19; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp16 = X[2 * iostride]; tmp17 = Y[-5 * iostride]; tmp18 = tmp16 + tmp17; tmp47 = tmp16 - tmp17; tmp19 = Y[-4 * iostride]; tmp20 = X[iostride]; tmp21 = tmp19 + tmp20; tmp48 = tmp19 - tmp20; } tmp22 = tmp18 + tmp21; tmp35 = K866025403 * (tmp18 - tmp21); tmp49 = tmp47 + tmp48; tmp62 = K866025403 * (tmp47 - tmp48); } { fftw_real tmp28; fftw_real tmp54; fftw_real tmp31; fftw_real tmp53; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp26; fftw_real tmp27; fftw_real tmp29; fftw_real tmp30; ASSERT_ALIGNED_DOUBLE; tmp26 = Y[-2 * iostride]; tmp27 = X[5 * iostride]; tmp28 = tmp26 - tmp27; tmp54 = tmp26 + tmp27; tmp29 = Y[-iostride]; tmp30 = X[4 * iostride]; tmp31 = tmp29 - tmp30; tmp53 = tmp29 + tmp30; } tmp32 = tmp28 + tmp31; tmp39 = K866025403 * (tmp31 - tmp28); tmp55 = tmp53 - tmp54; tmp59 = K866025403 * (tmp54 + tmp53); } X[0] = tmp15 + tmp22; { fftw_real tmp36; fftw_real tmp42; fftw_real tmp40; fftw_real tmp44; fftw_real tmp34; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp34 = tmp25 - (K500000000 * tmp32); tmp36 = tmp34 - tmp35; tmp42 = tmp35 + tmp34; tmp38 = tmp15 - (K500000000 * tmp22); tmp40 = tmp38 - tmp39; tmp44 = tmp38 + tmp39; { fftw_real tmp33; fftw_real tmp37; fftw_real tmp41; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp33 = c_re(W[1]); tmp37 = c_im(W[1]); Y[-3 * iostride] = (tmp33 * tmp36) - (tmp37 * tmp40); X[2 * iostride] = (tmp37 * tmp36) + (tmp33 * tmp40); tmp41 = c_re(W[3]); tmp43 = c_im(W[3]); Y[-iostride] = (tmp41 * tmp42) - (tmp43 * tmp44); X[4 * iostride] = (tmp43 * tmp42) + (tmp41 * tmp44); } } Y[-5 * iostride] = tmp25 + tmp32; { fftw_real tmp50; fftw_real tmp56; fftw_real tmp45; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp50 = tmp46 + tmp49; tmp56 = tmp52 - tmp55; tmp45 = c_re(W[2]); tmp51 = c_im(W[2]); X[3 * iostride] = (tmp45 * tmp50) + (tmp51 * tmp56); Y[-2 * iostride] = (tmp45 * tmp56) - (tmp51 * tmp50); } { fftw_real tmp60; fftw_real tmp66; fftw_real tmp64; fftw_real tmp68; fftw_real tmp58; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp58 = tmp46 - (K500000000 * tmp49); tmp60 = tmp58 - tmp59; tmp66 = tmp58 + tmp59; tmp63 = tmp52 + (K500000000 * tmp55); tmp64 = tmp62 + tmp63; tmp68 = tmp63 - tmp62; { fftw_real tmp57; fftw_real tmp61; fftw_real tmp65; fftw_real tmp67; ASSERT_ALIGNED_DOUBLE; tmp57 = c_re(W[0]); tmp61 = c_im(W[0]); X[iostride] = (tmp57 * tmp60) + (tmp61 * tmp64); Y[-4 * iostride] = (tmp57 * tmp64) - (tmp61 * tmp60); tmp65 = c_re(W[4]); tmp67 = c_im(W[4]); X[5 * iostride] = (tmp65 * tmp66) + (tmp67 * tmp68); Y[0] = (tmp65 * tmp68) - (tmp67 * tmp66); } } } if (i == m) { fftw_real tmp1; fftw_real tmp6; fftw_real tmp4; fftw_real tmp5; fftw_real tmp9; fftw_real tmp11; fftw_real tmp12; fftw_real tmp10; ASSERT_ALIGNED_DOUBLE; tmp1 = X[iostride]; tmp6 = Y[-iostride]; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp7; fftw_real tmp8; ASSERT_ALIGNED_DOUBLE; tmp2 = X[2 * iostride]; tmp3 = X[0]; tmp4 = tmp2 + tmp3; tmp5 = K1_732050807 * (tmp2 - tmp3); tmp7 = Y[-2 * iostride]; tmp8 = Y[0]; tmp9 = tmp7 + tmp8; tmp11 = K1_732050807 * (tmp7 - tmp8); } X[0] = K2_000000000 * (tmp1 + tmp4); tmp12 = (K2_000000000 * tmp1) - tmp4; X[2 * iostride] = tmp11 - tmp12; X[4 * iostride] = tmp12 + tmp11; X[3 * iostride] = K2_000000000 * (tmp6 - tmp9); tmp10 = (K2_000000000 * tmp6) + tmp9; X[iostride] = -(tmp5 + tmp10); X[5 * iostride] = tmp5 - tmp10; } } static const int twiddle_order[] = { 1, 2, 3, 4, 5 }; fftw_codelet_desc fftw_hc2hc_backward_6_desc = { "fftw_hc2hc_backward_6", (void (*)()) fftw_hc2hc_backward_6, 6, FFTW_BACKWARD, FFTW_HC2HC, 146, 5, twiddle_order, }; ������������������������������������fftw-2.1.5/rfftw/fhb_7.c����������������������������������������������������������������������������0000644�0001754�0000144�00000026177�07637527427�010467� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:54 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 7 */ /* * This function contains 120 FP additions, 98 FP multiplications, * (or, 106 additions, 84 multiplications, 14 fused multiply/add), * 32 stack variables, and 56 memory accesses */ static const fftw_real K222520933 = FFTW_KONST(+0.222520933956314404288902564496794759466355569); static const fftw_real K900968867 = FFTW_KONST(+0.900968867902419126236102319507445051165919162); static const fftw_real K623489801 = FFTW_KONST(+0.623489801858733530525004884004239810632274731); static const fftw_real K781831482 = FFTW_KONST(+0.781831482468029808708444526674057750232334519); static const fftw_real K974927912 = FFTW_KONST(+0.974927912181823607018131682993931217232785801); static const fftw_real K433883739 = FFTW_KONST(+0.433883739117558120475768332848358754609990728); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_801937735 = FFTW_KONST(+1.801937735804838252472204639014890102331838324); static const fftw_real K445041867 = FFTW_KONST(+0.445041867912628808577805128993589518932711138); static const fftw_real K1_246979603 = FFTW_KONST(+1.246979603717467061050009768008479621264549462); static const fftw_real K867767478 = FFTW_KONST(+0.867767478235116240951536665696717509219981456); static const fftw_real K1_949855824 = FFTW_KONST(+1.949855824363647214036263365987862434465571601); static const fftw_real K1_563662964 = FFTW_KONST(+1.563662964936059617416889053348115500464669037); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_7(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (7 * iostride); { fftw_real tmp84; fftw_real tmp88; fftw_real tmp86; fftw_real tmp76; fftw_real tmp79; fftw_real tmp77; fftw_real tmp78; fftw_real tmp80; fftw_real tmp87; fftw_real tmp85; fftw_real tmp81; fftw_real tmp83; fftw_real tmp82; ASSERT_ALIGNED_DOUBLE; tmp81 = Y[-2 * iostride]; tmp83 = Y[-iostride]; tmp82 = Y[-3 * iostride]; tmp84 = (K1_563662964 * tmp81) - (K1_949855824 * tmp82) - (K867767478 * tmp83); tmp88 = (K867767478 * tmp81) + (K1_563662964 * tmp82) - (K1_949855824 * tmp83); tmp86 = (K1_563662964 * tmp83) + (K1_949855824 * tmp81) + (K867767478 * tmp82); tmp76 = X[0]; tmp79 = X[3 * iostride]; tmp77 = X[iostride]; tmp78 = X[2 * iostride]; tmp80 = tmp76 + (K1_246979603 * tmp78) - (K445041867 * tmp79) - (K1_801937735 * tmp77); tmp87 = tmp76 + (K1_246979603 * tmp79) - (K1_801937735 * tmp78) - (K445041867 * tmp77); tmp85 = tmp76 + (K1_246979603 * tmp77) - (K1_801937735 * tmp79) - (K445041867 * tmp78); X[4 * iostride] = tmp80 - tmp84; X[3 * iostride] = tmp80 + tmp84; X[0] = tmp76 + (K2_000000000 * (tmp77 + tmp78 + tmp79)); X[2 * iostride] = tmp87 + tmp88; X[5 * iostride] = tmp87 - tmp88; X[iostride] = tmp85 - tmp86; X[6 * iostride] = tmp85 + tmp86; } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 6) { fftw_real tmp14; fftw_real tmp23; fftw_real tmp17; fftw_real tmp20; fftw_real tmp39; fftw_real tmp53; fftw_real tmp66; fftw_real tmp69; fftw_real tmp57; fftw_real tmp42; fftw_real tmp24; fftw_real tmp33; fftw_real tmp27; fftw_real tmp30; fftw_real tmp46; fftw_real tmp58; fftw_real tmp70; fftw_real tmp65; fftw_real tmp54; fftw_real tmp35; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp37; fftw_real tmp36; fftw_real tmp38; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp14 = X[0]; tmp21 = X[3 * iostride]; tmp22 = Y[-4 * iostride]; tmp23 = tmp21 + tmp22; tmp37 = tmp21 - tmp22; { fftw_real tmp15; fftw_real tmp16; fftw_real tmp18; fftw_real tmp19; ASSERT_ALIGNED_DOUBLE; tmp15 = X[iostride]; tmp16 = Y[-6 * iostride]; tmp17 = tmp15 + tmp16; tmp36 = tmp15 - tmp16; tmp18 = X[2 * iostride]; tmp19 = Y[-5 * iostride]; tmp20 = tmp18 + tmp19; tmp38 = tmp18 - tmp19; } tmp39 = (K433883739 * tmp36) + (K974927912 * tmp37) - (K781831482 * tmp38); tmp53 = (K781831482 * tmp36) + (K974927912 * tmp38) + (K433883739 * tmp37); tmp66 = (K974927912 * tmp36) - (K781831482 * tmp37) - (K433883739 * tmp38); tmp69 = tmp14 + (K623489801 * tmp23) - (K900968867 * tmp20) - (K222520933 * tmp17); tmp57 = tmp14 + (K623489801 * tmp17) - (K900968867 * tmp23) - (K222520933 * tmp20); tmp42 = tmp14 + (K623489801 * tmp20) - (K222520933 * tmp23) - (K900968867 * tmp17); } { fftw_real tmp44; fftw_real tmp45; fftw_real tmp43; fftw_real tmp31; fftw_real tmp32; ASSERT_ALIGNED_DOUBLE; tmp24 = Y[0]; tmp31 = Y[-3 * iostride]; tmp32 = X[4 * iostride]; tmp33 = tmp31 - tmp32; tmp44 = tmp31 + tmp32; { fftw_real tmp25; fftw_real tmp26; fftw_real tmp28; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp25 = Y[-iostride]; tmp26 = X[6 * iostride]; tmp27 = tmp25 - tmp26; tmp45 = tmp25 + tmp26; tmp28 = Y[-2 * iostride]; tmp29 = X[5 * iostride]; tmp30 = tmp28 - tmp29; tmp43 = tmp28 + tmp29; } tmp46 = (K781831482 * tmp43) - (K974927912 * tmp44) - (K433883739 * tmp45); tmp58 = (K781831482 * tmp45) + (K974927912 * tmp43) + (K433883739 * tmp44); tmp70 = (K433883739 * tmp43) + (K781831482 * tmp44) - (K974927912 * tmp45); tmp65 = tmp24 + (K623489801 * tmp33) - (K900968867 * tmp30) - (K222520933 * tmp27); tmp54 = tmp24 + (K623489801 * tmp27) - (K900968867 * tmp33) - (K222520933 * tmp30); tmp35 = tmp24 + (K623489801 * tmp30) - (K222520933 * tmp33) - (K900968867 * tmp27); } X[0] = tmp14 + tmp17 + tmp20 + tmp23; { fftw_real tmp61; fftw_real tmp63; fftw_real tmp60; fftw_real tmp62; ASSERT_ALIGNED_DOUBLE; tmp61 = tmp54 - tmp53; tmp63 = tmp57 + tmp58; tmp60 = c_re(W[5]); tmp62 = c_im(W[5]); Y[0] = (tmp60 * tmp61) - (tmp62 * tmp63); X[6 * iostride] = (tmp62 * tmp61) + (tmp60 * tmp63); } { fftw_real tmp73; fftw_real tmp75; fftw_real tmp72; fftw_real tmp74; ASSERT_ALIGNED_DOUBLE; tmp73 = tmp66 + tmp65; tmp75 = tmp69 + tmp70; tmp72 = c_re(W[1]); tmp74 = c_im(W[1]); Y[-4 * iostride] = (tmp72 * tmp73) - (tmp74 * tmp75); X[2 * iostride] = (tmp74 * tmp73) + (tmp72 * tmp75); } { fftw_real tmp67; fftw_real tmp71; fftw_real tmp64; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp67 = tmp65 - tmp66; tmp71 = tmp69 - tmp70; tmp64 = c_re(W[4]); tmp68 = c_im(W[4]); Y[-iostride] = (tmp64 * tmp67) - (tmp68 * tmp71); X[5 * iostride] = (tmp68 * tmp67) + (tmp64 * tmp71); } Y[-6 * iostride] = tmp24 + tmp27 + tmp30 + tmp33; { fftw_real tmp40; fftw_real tmp47; fftw_real tmp34; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp40 = tmp35 - tmp39; tmp47 = tmp42 - tmp46; tmp34 = c_re(W[3]); tmp41 = c_im(W[3]); Y[-2 * iostride] = (tmp34 * tmp40) - (tmp41 * tmp47); X[4 * iostride] = (tmp41 * tmp40) + (tmp34 * tmp47); } { fftw_real tmp49; fftw_real tmp51; fftw_real tmp48; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; tmp49 = tmp39 + tmp35; tmp51 = tmp42 + tmp46; tmp48 = c_re(W[2]); tmp50 = c_im(W[2]); Y[-3 * iostride] = (tmp48 * tmp49) - (tmp50 * tmp51); X[3 * iostride] = (tmp50 * tmp49) + (tmp48 * tmp51); } { fftw_real tmp55; fftw_real tmp59; fftw_real tmp52; fftw_real tmp56; ASSERT_ALIGNED_DOUBLE; tmp55 = tmp53 + tmp54; tmp59 = tmp57 - tmp58; tmp52 = c_re(W[0]); tmp56 = c_im(W[0]); Y[-5 * iostride] = (tmp52 * tmp55) - (tmp56 * tmp59); X[iostride] = (tmp56 * tmp55) + (tmp52 * tmp59); } } if (i == m) { fftw_real tmp9; fftw_real tmp13; fftw_real tmp11; fftw_real tmp1; fftw_real tmp4; fftw_real tmp2; fftw_real tmp3; fftw_real tmp5; fftw_real tmp12; fftw_real tmp10; fftw_real tmp6; fftw_real tmp8; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp6 = Y[-2 * iostride]; tmp8 = Y[0]; tmp7 = Y[-iostride]; tmp9 = (K1_563662964 * tmp6) + (K1_949855824 * tmp7) + (K867767478 * tmp8); tmp13 = (K1_563662964 * tmp7) - (K1_949855824 * tmp8) - (K867767478 * tmp6); tmp11 = (K1_949855824 * tmp6) - (K1_563662964 * tmp8) - (K867767478 * tmp7); tmp1 = X[3 * iostride]; tmp4 = X[0]; tmp2 = X[2 * iostride]; tmp3 = X[iostride]; tmp5 = (K445041867 * tmp3) + (K1_801937735 * tmp4) - (K1_246979603 * tmp2) - tmp1; tmp12 = (K1_801937735 * tmp2) + (K445041867 * tmp4) - (K1_246979603 * tmp3) - tmp1; tmp10 = tmp1 + (K1_246979603 * tmp4) - (K1_801937735 * tmp3) - (K445041867 * tmp2); X[iostride] = tmp5 - tmp9; X[6 * iostride] = -(tmp5 + tmp9); X[0] = tmp1 + (K2_000000000 * (tmp2 + tmp3 + tmp4)); X[4 * iostride] = tmp13 - tmp12; X[3 * iostride] = tmp12 + tmp13; X[5 * iostride] = tmp11 - tmp10; X[2 * iostride] = tmp10 + tmp11; } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6 }; fftw_codelet_desc fftw_hc2hc_backward_7_desc = { "fftw_hc2hc_backward_7", (void (*)()) fftw_hc2hc_backward_7, 7, FFTW_BACKWARD, FFTW_HC2HC, 168, 6, twiddle_order, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_8.c����������������������������������������������������������������������������0000644�0001754�0000144�00000027306�07637527413�010456� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:55 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 8 */ /* * This function contains 108 FP additions, 50 FP multiplications, * (or, 90 additions, 32 multiplications, 18 fused multiply/add), * 31 stack variables, and 64 memory accesses */ static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_8(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (8 * iostride); { fftw_real tmp107; fftw_real tmp118; fftw_real tmp105; fftw_real tmp116; fftw_real tmp111; fftw_real tmp120; fftw_real tmp115; fftw_real tmp121; fftw_real tmp108; fftw_real tmp112; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp106; fftw_real tmp117; fftw_real tmp103; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp106 = X[2 * iostride]; tmp107 = K2_000000000 * tmp106; tmp117 = Y[-2 * iostride]; tmp118 = K2_000000000 * tmp117; tmp103 = X[0]; tmp104 = X[4 * iostride]; tmp105 = tmp103 + tmp104; tmp116 = tmp103 - tmp104; { fftw_real tmp109; fftw_real tmp110; fftw_real tmp113; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; tmp109 = X[iostride]; tmp110 = X[3 * iostride]; tmp111 = K2_000000000 * (tmp109 + tmp110); tmp120 = tmp109 - tmp110; tmp113 = Y[-iostride]; tmp114 = Y[-3 * iostride]; tmp115 = K2_000000000 * (tmp113 - tmp114); tmp121 = tmp114 + tmp113; } } tmp108 = tmp105 + tmp107; X[4 * iostride] = tmp108 - tmp111; X[0] = tmp108 + tmp111; tmp112 = tmp105 - tmp107; X[6 * iostride] = tmp112 + tmp115; X[2 * iostride] = tmp112 - tmp115; { fftw_real tmp119; fftw_real tmp122; fftw_real tmp123; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; tmp119 = tmp116 - tmp118; tmp122 = K1_414213562 * (tmp120 - tmp121); X[5 * iostride] = tmp119 - tmp122; X[iostride] = tmp119 + tmp122; tmp123 = tmp116 + tmp118; tmp124 = K1_414213562 * (tmp120 + tmp121); X[3 * iostride] = tmp123 - tmp124; X[7 * iostride] = tmp123 + tmp124; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 7) { fftw_real tmp29; fftw_real tmp60; fftw_real tmp46; fftw_real tmp56; fftw_real tmp70; fftw_real tmp96; fftw_real tmp82; fftw_real tmp92; fftw_real tmp36; fftw_real tmp57; fftw_real tmp53; fftw_real tmp61; fftw_real tmp73; fftw_real tmp83; fftw_real tmp76; fftw_real tmp84; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp25; fftw_real tmp68; fftw_real tmp42; fftw_real tmp81; fftw_real tmp28; fftw_real tmp80; fftw_real tmp45; fftw_real tmp69; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp40; fftw_real tmp41; ASSERT_ALIGNED_DOUBLE; tmp23 = X[0]; tmp24 = Y[-4 * iostride]; tmp25 = tmp23 + tmp24; tmp68 = tmp23 - tmp24; tmp40 = Y[0]; tmp41 = X[4 * iostride]; tmp42 = tmp40 - tmp41; tmp81 = tmp40 + tmp41; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp43; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp26 = X[2 * iostride]; tmp27 = Y[-6 * iostride]; tmp28 = tmp26 + tmp27; tmp80 = tmp26 - tmp27; tmp43 = Y[-2 * iostride]; tmp44 = X[6 * iostride]; tmp45 = tmp43 - tmp44; tmp69 = tmp43 + tmp44; } tmp29 = tmp25 + tmp28; tmp60 = tmp25 - tmp28; tmp46 = tmp42 + tmp45; tmp56 = tmp42 - tmp45; tmp70 = tmp68 - tmp69; tmp96 = tmp68 + tmp69; tmp82 = tmp80 + tmp81; tmp92 = tmp81 - tmp80; } { fftw_real tmp32; fftw_real tmp71; fftw_real tmp49; fftw_real tmp72; fftw_real tmp35; fftw_real tmp74; fftw_real tmp52; fftw_real tmp75; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp30; fftw_real tmp31; fftw_real tmp47; fftw_real tmp48; ASSERT_ALIGNED_DOUBLE; tmp30 = X[iostride]; tmp31 = Y[-5 * iostride]; tmp32 = tmp30 + tmp31; tmp71 = tmp30 - tmp31; tmp47 = Y[-iostride]; tmp48 = X[5 * iostride]; tmp49 = tmp47 - tmp48; tmp72 = tmp47 + tmp48; } { fftw_real tmp33; fftw_real tmp34; fftw_real tmp50; fftw_real tmp51; ASSERT_ALIGNED_DOUBLE; tmp33 = Y[-7 * iostride]; tmp34 = X[3 * iostride]; tmp35 = tmp33 + tmp34; tmp74 = tmp33 - tmp34; tmp50 = Y[-3 * iostride]; tmp51 = X[7 * iostride]; tmp52 = tmp50 - tmp51; tmp75 = tmp50 + tmp51; } tmp36 = tmp32 + tmp35; tmp57 = tmp32 - tmp35; tmp53 = tmp49 + tmp52; tmp61 = tmp52 - tmp49; tmp73 = tmp71 - tmp72; tmp83 = tmp71 + tmp72; tmp76 = tmp74 - tmp75; tmp84 = tmp74 + tmp75; } X[0] = tmp29 + tmp36; Y[-7 * iostride] = tmp46 + tmp53; { fftw_real tmp38; fftw_real tmp54; fftw_real tmp37; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp38 = tmp29 - tmp36; tmp54 = tmp46 - tmp53; tmp37 = c_re(W[3]); tmp39 = c_im(W[3]); X[4 * iostride] = (tmp37 * tmp38) + (tmp39 * tmp54); Y[-3 * iostride] = (tmp37 * tmp54) - (tmp39 * tmp38); } { fftw_real tmp64; fftw_real tmp66; fftw_real tmp63; fftw_real tmp65; ASSERT_ALIGNED_DOUBLE; tmp64 = tmp57 + tmp56; tmp66 = tmp60 + tmp61; tmp63 = c_re(W[1]); tmp65 = c_im(W[1]); Y[-5 * iostride] = (tmp63 * tmp64) - (tmp65 * tmp66); X[2 * iostride] = (tmp65 * tmp64) + (tmp63 * tmp66); } { fftw_real tmp58; fftw_real tmp62; fftw_real tmp55; fftw_real tmp59; ASSERT_ALIGNED_DOUBLE; tmp58 = tmp56 - tmp57; tmp62 = tmp60 - tmp61; tmp55 = c_re(W[5]); tmp59 = c_im(W[5]); Y[-iostride] = (tmp55 * tmp58) - (tmp59 * tmp62); X[6 * iostride] = (tmp59 * tmp58) + (tmp55 * tmp62); } { fftw_real tmp94; fftw_real tmp100; fftw_real tmp98; fftw_real tmp102; fftw_real tmp93; fftw_real tmp97; ASSERT_ALIGNED_DOUBLE; tmp93 = K707106781 * (tmp73 - tmp76); tmp94 = tmp92 + tmp93; tmp100 = tmp92 - tmp93; tmp97 = K707106781 * (tmp83 + tmp84); tmp98 = tmp96 - tmp97; tmp102 = tmp96 + tmp97; { fftw_real tmp91; fftw_real tmp95; fftw_real tmp99; fftw_real tmp101; ASSERT_ALIGNED_DOUBLE; tmp91 = c_re(W[2]); tmp95 = c_im(W[2]); Y[-4 * iostride] = (tmp91 * tmp94) - (tmp95 * tmp98); X[3 * iostride] = (tmp95 * tmp94) + (tmp91 * tmp98); tmp99 = c_re(W[6]); tmp101 = c_im(W[6]); Y[0] = (tmp99 * tmp100) - (tmp101 * tmp102); X[7 * iostride] = (tmp101 * tmp100) + (tmp99 * tmp102); } } { fftw_real tmp78; fftw_real tmp88; fftw_real tmp86; fftw_real tmp90; fftw_real tmp77; fftw_real tmp85; ASSERT_ALIGNED_DOUBLE; tmp77 = K707106781 * (tmp73 + tmp76); tmp78 = tmp70 - tmp77; tmp88 = tmp70 + tmp77; tmp85 = K707106781 * (tmp83 - tmp84); tmp86 = tmp82 - tmp85; tmp90 = tmp82 + tmp85; { fftw_real tmp67; fftw_real tmp79; fftw_real tmp87; fftw_real tmp89; ASSERT_ALIGNED_DOUBLE; tmp67 = c_re(W[4]); tmp79 = c_im(W[4]); X[5 * iostride] = (tmp67 * tmp78) + (tmp79 * tmp86); Y[-2 * iostride] = (tmp67 * tmp86) - (tmp79 * tmp78); tmp87 = c_re(W[0]); tmp89 = c_im(W[0]); X[iostride] = (tmp87 * tmp88) + (tmp89 * tmp90); Y[-6 * iostride] = (tmp87 * tmp90) - (tmp89 * tmp88); } } } if (i == m) { fftw_real tmp3; fftw_real tmp7; fftw_real tmp15; fftw_real tmp20; fftw_real tmp6; fftw_real tmp12; fftw_real tmp10; fftw_real tmp21; fftw_real tmp19; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp13; fftw_real tmp14; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp2 = X[3 * iostride]; tmp3 = tmp1 + tmp2; tmp7 = tmp1 - tmp2; tmp13 = Y[0]; tmp14 = Y[-3 * iostride]; tmp15 = tmp13 + tmp14; tmp20 = tmp13 - tmp14; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp8; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp4 = X[2 * iostride]; tmp5 = X[iostride]; tmp6 = tmp4 + tmp5; tmp12 = tmp4 - tmp5; tmp8 = Y[-2 * iostride]; tmp9 = Y[-iostride]; tmp10 = tmp8 + tmp9; tmp21 = tmp8 - tmp9; } X[0] = K2_000000000 * (tmp3 + tmp6); tmp19 = tmp3 - tmp6; tmp22 = tmp20 - tmp21; X[2 * iostride] = K1_414213562 * (tmp19 - tmp22); X[6 * iostride] = -(K1_414213562 * (tmp19 + tmp22)); X[4 * iostride] = -(K2_000000000 * (tmp21 + tmp20)); { fftw_real tmp11; fftw_real tmp16; fftw_real tmp17; fftw_real tmp18; ASSERT_ALIGNED_DOUBLE; tmp11 = tmp7 - tmp10; tmp16 = tmp12 + tmp15; X[iostride] = (K1_847759065 * tmp11) - (K765366864 * tmp16); X[5 * iostride] = -((K765366864 * tmp11) + (K1_847759065 * tmp16)); tmp17 = tmp7 + tmp10; tmp18 = tmp15 - tmp12; X[3 * iostride] = (K765366864 * tmp17) - (K1_847759065 * tmp18); X[7 * iostride] = -((K1_847759065 * tmp17) + (K765366864 * tmp18)); } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7 }; fftw_codelet_desc fftw_hc2hc_backward_8_desc = { "fftw_hc2hc_backward_8", (void (*)()) fftw_hc2hc_backward_8, 8, FFTW_BACKWARD, FFTW_HC2HC, 190, 7, twiddle_order, }; ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_9.c����������������������������������������������������������������������������0000644�0001754�0000144�00000044031�07637527423�010452� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:58 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 9 */ /* * This function contains 182 FP additions, 121 FP multiplications, * (or, 130 additions, 69 multiplications, 52 fused multiply/add), * 43 stack variables, and 72 memory accesses */ static const fftw_real K296198132 = FFTW_KONST(+0.296198132726023843175338011893050938967728390); static const fftw_real K813797681 = FFTW_KONST(+0.813797681349373692844693217248393223289101568); static const fftw_real K852868531 = FFTW_KONST(+0.852868531952443209628250963940074071936020296); static const fftw_real K150383733 = FFTW_KONST(+0.150383733180435296639271897612501926072238258); static const fftw_real K663413948 = FFTW_KONST(+0.663413948168938396205421319635891297216863310); static const fftw_real K556670399 = FFTW_KONST(+0.556670399226419366452912952047023132968291906); static const fftw_real K939692620 = FFTW_KONST(+0.939692620785908384054109277324731469936208134); static const fftw_real K342020143 = FFTW_KONST(+0.342020143325668733044099614682259580763083368); static const fftw_real K984807753 = FFTW_KONST(+0.984807753012208059366743024589523013670643252); static const fftw_real K173648177 = FFTW_KONST(+0.173648177666930348851716626769314796000375677); static const fftw_real K1_705737063 = FFTW_KONST(+1.705737063904886419256501927880148143872040591); static const fftw_real K300767466 = FFTW_KONST(+0.300767466360870593278543795225003852144476517); static const fftw_real K642787609 = FFTW_KONST(+0.642787609686539326322643409907263432907559884); static const fftw_real K766044443 = FFTW_KONST(+0.766044443118978035202392650555416673935832457); static const fftw_real K1_113340798 = FFTW_KONST(+1.113340798452838732905825904094046265936583811); static const fftw_real K1_326827896 = FFTW_KONST(+1.326827896337876792410842639271782594433726619); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K866025403 = FFTW_KONST(+0.866025403784438646763723170752936183471402627); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_732050807 = FFTW_KONST(+1.732050807568877293527446341505872366942805254); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_9(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (9 * iostride); { fftw_real tmp154; fftw_real tmp182; fftw_real tmp176; fftw_real tmp161; fftw_real tmp164; fftw_real tmp159; fftw_real tmp168; fftw_real tmp179; fftw_real tmp171; fftw_real tmp180; fftw_real tmp160; fftw_real tmp165; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp175; fftw_real tmp152; fftw_real tmp153; fftw_real tmp173; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp174 = Y[-3 * iostride]; tmp175 = K1_732050807 * tmp174; tmp152 = X[0]; tmp153 = X[3 * iostride]; tmp173 = tmp153 - tmp152; tmp154 = tmp152 + (K2_000000000 * tmp153); tmp182 = tmp175 - tmp173; tmp176 = tmp173 + tmp175; } { fftw_real tmp155; fftw_real tmp158; fftw_real tmp169; fftw_real tmp167; fftw_real tmp166; fftw_real tmp170; ASSERT_ALIGNED_DOUBLE; tmp155 = X[iostride]; tmp161 = Y[-iostride]; { fftw_real tmp156; fftw_real tmp157; fftw_real tmp162; fftw_real tmp163; ASSERT_ALIGNED_DOUBLE; tmp156 = X[4 * iostride]; tmp157 = X[2 * iostride]; tmp158 = tmp156 + tmp157; tmp169 = K866025403 * (tmp156 - tmp157); tmp162 = Y[-2 * iostride]; tmp163 = Y[-4 * iostride]; tmp164 = tmp162 - tmp163; tmp167 = K866025403 * (tmp162 + tmp163); } tmp159 = tmp155 + tmp158; tmp166 = tmp155 - (K500000000 * tmp158); tmp168 = tmp166 - tmp167; tmp179 = tmp166 + tmp167; tmp170 = tmp161 + (K500000000 * tmp164); tmp171 = tmp169 + tmp170; tmp180 = tmp170 - tmp169; } X[0] = tmp154 + (K2_000000000 * tmp159); tmp160 = tmp154 - tmp159; tmp165 = K1_732050807 * (tmp161 - tmp164); X[6 * iostride] = tmp160 + tmp165; X[3 * iostride] = tmp160 - tmp165; { fftw_real tmp177; fftw_real tmp172; fftw_real tmp178; fftw_real tmp184; fftw_real tmp181; fftw_real tmp183; ASSERT_ALIGNED_DOUBLE; tmp177 = (K1_326827896 * tmp171) + (K1_113340798 * tmp168); tmp172 = (K766044443 * tmp168) - (K642787609 * tmp171); tmp178 = tmp172 + tmp176; X[iostride] = (K2_000000000 * tmp172) - tmp176; X[7 * iostride] = tmp177 - tmp178; X[4 * iostride] = -(tmp177 + tmp178); tmp184 = (K300767466 * tmp180) + (K1_705737063 * tmp179); tmp181 = (K173648177 * tmp179) - (K984807753 * tmp180); tmp183 = tmp182 - tmp181; X[2 * iostride] = (K2_000000000 * tmp181) + tmp182; X[8 * iostride] = tmp184 + tmp183; X[5 * iostride] = tmp183 - tmp184; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 8) { fftw_real tmp44; fftw_real tmp87; fftw_real tmp135; fftw_real tmp60; fftw_real tmp107; fftw_real tmp125; fftw_real tmp49; fftw_real tmp54; fftw_real tmp55; fftw_real tmp101; fftw_real tmp109; fftw_real tmp131; fftw_real tmp137; fftw_real tmp128; fftw_real tmp136; fftw_real tmp94; fftw_real tmp108; fftw_real tmp65; fftw_real tmp70; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp40; fftw_real tmp56; fftw_real tmp43; fftw_real tmp105; fftw_real tmp59; fftw_real tmp86; fftw_real tmp85; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; tmp40 = X[0]; tmp56 = Y[0]; { fftw_real tmp41; fftw_real tmp42; fftw_real tmp57; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; tmp41 = X[3 * iostride]; tmp42 = Y[-6 * iostride]; tmp43 = tmp41 + tmp42; tmp105 = K866025403 * (tmp41 - tmp42); tmp57 = Y[-3 * iostride]; tmp58 = X[6 * iostride]; tmp59 = tmp57 - tmp58; tmp86 = K866025403 * (tmp57 + tmp58); } tmp44 = tmp40 + tmp43; tmp85 = tmp40 - (K500000000 * tmp43); tmp87 = tmp85 - tmp86; tmp135 = tmp85 + tmp86; tmp60 = tmp56 + tmp59; tmp106 = tmp56 - (K500000000 * tmp59); tmp107 = tmp105 + tmp106; tmp125 = tmp106 - tmp105; } { fftw_real tmp45; fftw_real tmp48; fftw_real tmp88; fftw_real tmp91; fftw_real tmp61; fftw_real tmp64; fftw_real tmp89; fftw_real tmp92; fftw_real tmp50; fftw_real tmp53; fftw_real tmp95; fftw_real tmp98; fftw_real tmp66; fftw_real tmp69; fftw_real tmp96; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp46; fftw_real tmp47; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp45 = X[iostride]; tmp46 = X[4 * iostride]; tmp47 = Y[-7 * iostride]; tmp48 = tmp46 + tmp47; tmp88 = tmp45 - (K500000000 * tmp48); tmp91 = K866025403 * (tmp46 - tmp47); tmp61 = Y[-iostride]; tmp62 = Y[-4 * iostride]; tmp63 = X[7 * iostride]; tmp64 = tmp62 - tmp63; tmp89 = K866025403 * (tmp62 + tmp63); tmp92 = tmp61 - (K500000000 * tmp64); } { fftw_real tmp51; fftw_real tmp52; fftw_real tmp67; fftw_real tmp68; ASSERT_ALIGNED_DOUBLE; tmp50 = X[2 * iostride]; tmp51 = Y[-5 * iostride]; tmp52 = Y[-8 * iostride]; tmp53 = tmp51 + tmp52; tmp95 = tmp50 - (K500000000 * tmp53); tmp98 = K866025403 * (tmp51 - tmp52); tmp66 = Y[-2 * iostride]; tmp67 = X[5 * iostride]; tmp68 = X[8 * iostride]; tmp69 = tmp67 + tmp68; tmp96 = K866025403 * (tmp67 - tmp68); tmp99 = tmp66 + (K500000000 * tmp69); } tmp49 = tmp45 + tmp48; tmp54 = tmp50 + tmp53; tmp55 = tmp49 + tmp54; { fftw_real tmp97; fftw_real tmp100; fftw_real tmp129; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; tmp97 = tmp95 + tmp96; tmp100 = tmp98 + tmp99; tmp101 = (K173648177 * tmp97) - (K984807753 * tmp100); tmp109 = (K984807753 * tmp97) + (K173648177 * tmp100); tmp129 = tmp95 - tmp96; tmp130 = tmp99 - tmp98; tmp131 = (K342020143 * tmp129) - (K939692620 * tmp130); tmp137 = (K939692620 * tmp129) + (K342020143 * tmp130); } { fftw_real tmp126; fftw_real tmp127; fftw_real tmp90; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp126 = tmp92 - tmp91; tmp127 = tmp88 + tmp89; tmp128 = (K173648177 * tmp126) + (K984807753 * tmp127); tmp136 = (K173648177 * tmp127) - (K984807753 * tmp126); tmp90 = tmp88 - tmp89; tmp93 = tmp91 + tmp92; tmp94 = (K766044443 * tmp90) - (K642787609 * tmp93); tmp108 = (K766044443 * tmp93) + (K642787609 * tmp90); tmp65 = tmp61 + tmp64; tmp70 = tmp66 - tmp69; tmp71 = tmp65 + tmp70; } } X[0] = tmp44 + tmp55; { fftw_real tmp75; fftw_real tmp81; fftw_real tmp79; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp73; fftw_real tmp74; fftw_real tmp77; fftw_real tmp78; ASSERT_ALIGNED_DOUBLE; tmp73 = tmp60 - (K500000000 * tmp71); tmp74 = K866025403 * (tmp49 - tmp54); tmp75 = tmp73 - tmp74; tmp81 = tmp74 + tmp73; tmp77 = tmp44 - (K500000000 * tmp55); tmp78 = K866025403 * (tmp70 - tmp65); tmp79 = tmp77 - tmp78; tmp83 = tmp77 + tmp78; } { fftw_real tmp72; fftw_real tmp76; fftw_real tmp80; fftw_real tmp82; ASSERT_ALIGNED_DOUBLE; tmp72 = c_re(W[5]); tmp76 = c_im(W[5]); Y[-2 * iostride] = (tmp72 * tmp75) - (tmp76 * tmp79); X[6 * iostride] = (tmp76 * tmp75) + (tmp72 * tmp79); tmp80 = c_re(W[2]); tmp82 = c_im(W[2]); Y[-5 * iostride] = (tmp80 * tmp81) - (tmp82 * tmp83); X[3 * iostride] = (tmp82 * tmp81) + (tmp80 * tmp83); } } Y[-8 * iostride] = tmp60 + tmp71; { fftw_real tmp114; fftw_real tmp103; fftw_real tmp117; fftw_real tmp118; fftw_real tmp111; fftw_real tmp113; fftw_real tmp102; fftw_real tmp110; fftw_real tmp84; fftw_real tmp104; ASSERT_ALIGNED_DOUBLE; tmp114 = K866025403 * (tmp94 - tmp101); tmp102 = tmp94 + tmp101; tmp103 = tmp87 + tmp102; tmp117 = tmp87 - (K500000000 * tmp102); tmp118 = K866025403 * (tmp109 - tmp108); tmp110 = tmp108 + tmp109; tmp111 = tmp107 + tmp110; tmp113 = tmp107 - (K500000000 * tmp110); tmp84 = c_re(W[0]); tmp104 = c_im(W[0]); X[iostride] = (tmp84 * tmp103) + (tmp104 * tmp111); Y[-7 * iostride] = (tmp84 * tmp111) - (tmp104 * tmp103); { fftw_real tmp121; fftw_real tmp123; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; tmp121 = tmp114 + tmp113; tmp123 = tmp117 + tmp118; tmp120 = c_re(W[3]); tmp122 = c_im(W[3]); Y[-4 * iostride] = (tmp120 * tmp121) - (tmp122 * tmp123); X[4 * iostride] = (tmp122 * tmp121) + (tmp120 * tmp123); } { fftw_real tmp115; fftw_real tmp119; fftw_real tmp112; fftw_real tmp116; ASSERT_ALIGNED_DOUBLE; tmp115 = tmp113 - tmp114; tmp119 = tmp117 - tmp118; tmp112 = c_re(W[6]); tmp116 = c_im(W[6]); Y[-iostride] = (tmp112 * tmp115) - (tmp116 * tmp119); X[7 * iostride] = (tmp116 * tmp115) + (tmp112 * tmp119); } } { fftw_real tmp142; fftw_real tmp133; fftw_real tmp145; fftw_real tmp146; fftw_real tmp139; fftw_real tmp141; fftw_real tmp132; fftw_real tmp138; fftw_real tmp124; fftw_real tmp134; ASSERT_ALIGNED_DOUBLE; tmp142 = K866025403 * (tmp131 - tmp128); tmp132 = tmp128 + tmp131; tmp133 = tmp125 + tmp132; tmp145 = tmp125 - (K500000000 * tmp132); tmp146 = K866025403 * (tmp136 + tmp137); tmp138 = tmp136 - tmp137; tmp139 = tmp135 + tmp138; tmp141 = tmp135 - (K500000000 * tmp138); tmp124 = c_re(W[1]); tmp134 = c_im(W[1]); Y[-6 * iostride] = (tmp124 * tmp133) - (tmp134 * tmp139); X[2 * iostride] = (tmp134 * tmp133) + (tmp124 * tmp139); { fftw_real tmp149; fftw_real tmp151; fftw_real tmp148; fftw_real tmp150; ASSERT_ALIGNED_DOUBLE; tmp149 = tmp142 + tmp141; tmp151 = tmp145 + tmp146; tmp148 = c_re(W[4]); tmp150 = c_im(W[4]); X[5 * iostride] = (tmp148 * tmp149) + (tmp150 * tmp151); Y[-3 * iostride] = (tmp148 * tmp151) - (tmp150 * tmp149); } { fftw_real tmp143; fftw_real tmp147; fftw_real tmp140; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; tmp143 = tmp141 - tmp142; tmp147 = tmp145 - tmp146; tmp140 = c_re(W[7]); tmp144 = c_im(W[7]); X[8 * iostride] = (tmp140 * tmp143) + (tmp144 * tmp147); Y[0] = (tmp140 * tmp147) - (tmp144 * tmp143); } } } if (i == m) { fftw_real tmp3; fftw_real tmp37; fftw_real tmp30; fftw_real tmp12; fftw_real tmp11; fftw_real tmp18; fftw_real tmp33; fftw_real tmp7; fftw_real tmp35; fftw_real tmp24; fftw_real tmp21; fftw_real tmp34; fftw_real tmp32; fftw_real tmp15; fftw_real tmp8; fftw_real tmp13; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp29; fftw_real tmp1; fftw_real tmp2; fftw_real tmp27; fftw_real tmp28; ASSERT_ALIGNED_DOUBLE; tmp28 = Y[-iostride]; tmp29 = K1_732050807 * tmp28; tmp1 = X[4 * iostride]; tmp2 = X[iostride]; tmp27 = tmp2 - tmp1; tmp3 = tmp1 + (K2_000000000 * tmp2); tmp37 = tmp27 + tmp29; tmp30 = tmp27 - tmp29; } { fftw_real tmp4; fftw_real tmp6; fftw_real tmp5; fftw_real tmp14; fftw_real tmp16; fftw_real tmp19; fftw_real tmp22; fftw_real tmp10; fftw_real tmp23; fftw_real tmp17; fftw_real tmp9; fftw_real tmp20; ASSERT_ALIGNED_DOUBLE; tmp4 = X[3 * iostride]; tmp6 = X[2 * iostride]; tmp5 = X[0]; tmp14 = K500000000 * (tmp5 + tmp6); tmp16 = K866025403 * (tmp6 - tmp5); tmp19 = K866025403 * (tmp4 - tmp5); tmp22 = K500000000 * (tmp4 + tmp5); tmp9 = Y[-3 * iostride]; tmp12 = Y[-2 * iostride]; tmp10 = Y[0]; tmp11 = tmp9 + tmp10; tmp23 = K866025403 * (tmp10 - tmp9); tmp17 = tmp9 + (K500000000 * (tmp12 - tmp10)); tmp18 = tmp16 + tmp17; tmp33 = tmp16 - tmp17; tmp7 = tmp4 + tmp5 + tmp6; tmp35 = (tmp6 + tmp23) - tmp22; tmp24 = tmp22 + tmp23 - tmp6; tmp20 = (K500000000 * tmp11) + tmp12; tmp21 = tmp19 + tmp20; tmp34 = tmp19 - tmp20; tmp32 = tmp4 - (K866025403 * (tmp10 + tmp12)) - tmp14; tmp15 = tmp14 - (K866025403 * (tmp10 + tmp12)) - tmp4; } X[0] = tmp3 + (K2_000000000 * tmp7); tmp8 = tmp7 - tmp3; tmp13 = K1_732050807 * (tmp11 - tmp12); X[3 * iostride] = tmp8 - tmp13; X[6 * iostride] = -(tmp8 + tmp13); { fftw_real tmp25; fftw_real tmp26; fftw_real tmp31; fftw_real tmp38; fftw_real tmp36; fftw_real tmp39; ASSERT_ALIGNED_DOUBLE; tmp25 = (K556670399 * tmp15) + (K663413948 * tmp18) - (K150383733 * tmp21) - (K852868531 * tmp24); tmp26 = (K173648177 * tmp24) + (K766044443 * tmp15) - (K642787609 * tmp18) - (K984807753 * tmp21); tmp31 = (K500000000 * tmp26) - tmp30; X[7 * iostride] = tmp25 - tmp31; X[4 * iostride] = tmp25 + tmp31; X[iostride] = tmp26 + tmp30; tmp38 = (K813797681 * tmp34) + (K852868531 * tmp32) + (K150383733 * tmp33) - (K296198132 * tmp35); tmp36 = (K173648177 * tmp32) - (K984807753 * tmp33) - (K342020143 * tmp34) - (K939692620 * tmp35); tmp39 = (K500000000 * tmp36) + tmp37; X[2 * iostride] = tmp36 - tmp37; X[5 * iostride] = tmp38 + tmp39; X[8 * iostride] = tmp38 - tmp39; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; fftw_codelet_desc fftw_hc2hc_backward_9_desc = { "fftw_hc2hc_backward_9", (void (*)()) fftw_hc2hc_backward_9, 9, FFTW_BACKWARD, FFTW_HC2HC, 212, 8, twiddle_order, }; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_10.c���������������������������������������������������������������������������0000644�0001754�0000144�00000041647�07637527420�010531� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:08:59 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 10 */ /* * This function contains 168 FP additions, 90 FP multiplications, * (or, 124 additions, 46 multiplications, 44 fused multiply/add), * 37 stack variables, and 80 memory accesses */ static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_10(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (10 * iostride); { fftw_real tmp155; fftw_real tmp163; fftw_real tmp175; fftw_real tmp183; fftw_real tmp172; fftw_real tmp182; fftw_real tmp162; fftw_real tmp180; fftw_real tmp166; fftw_real tmp167; fftw_real tmp170; fftw_real tmp171; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp153; fftw_real tmp154; fftw_real tmp173; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp153 = X[0]; tmp154 = X[5 * iostride]; tmp155 = tmp153 - tmp154; tmp163 = tmp153 + tmp154; tmp173 = Y[-4 * iostride]; tmp174 = Y[-iostride]; tmp175 = tmp173 - tmp174; tmp183 = tmp173 + tmp174; } tmp170 = Y[-2 * iostride]; tmp171 = Y[-3 * iostride]; tmp172 = tmp170 - tmp171; tmp182 = tmp170 + tmp171; { fftw_real tmp158; fftw_real tmp164; fftw_real tmp161; fftw_real tmp165; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp156; fftw_real tmp157; fftw_real tmp159; fftw_real tmp160; ASSERT_ALIGNED_DOUBLE; tmp156 = X[2 * iostride]; tmp157 = X[3 * iostride]; tmp158 = tmp156 - tmp157; tmp164 = tmp156 + tmp157; tmp159 = X[4 * iostride]; tmp160 = X[iostride]; tmp161 = tmp159 - tmp160; tmp165 = tmp159 + tmp160; } tmp162 = tmp158 + tmp161; tmp180 = K1_118033988 * (tmp158 - tmp161); tmp166 = tmp164 + tmp165; tmp167 = K1_118033988 * (tmp164 - tmp165); } X[5 * iostride] = tmp155 + (K2_000000000 * tmp162); { fftw_real tmp184; fftw_real tmp186; fftw_real tmp181; fftw_real tmp185; fftw_real tmp179; ASSERT_ALIGNED_DOUBLE; tmp184 = (K1_175570504 * tmp182) - (K1_902113032 * tmp183); tmp186 = (K1_902113032 * tmp182) + (K1_175570504 * tmp183); tmp179 = tmp155 - (K500000000 * tmp162); tmp181 = tmp179 - tmp180; tmp185 = tmp179 + tmp180; X[7 * iostride] = tmp181 - tmp184; X[3 * iostride] = tmp181 + tmp184; X[iostride] = tmp185 - tmp186; X[9 * iostride] = tmp185 + tmp186; } X[0] = tmp163 + (K2_000000000 * tmp166); { fftw_real tmp176; fftw_real tmp178; fftw_real tmp169; fftw_real tmp177; fftw_real tmp168; ASSERT_ALIGNED_DOUBLE; tmp176 = (K1_902113032 * tmp172) + (K1_175570504 * tmp175); tmp178 = (K1_902113032 * tmp175) - (K1_175570504 * tmp172); tmp168 = tmp163 - (K500000000 * tmp166); tmp169 = tmp167 + tmp168; tmp177 = tmp168 - tmp167; X[4 * iostride] = tmp169 + tmp176; X[6 * iostride] = tmp169 - tmp176; X[8 * iostride] = tmp177 - tmp178; X[2 * iostride] = tmp177 + tmp178; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 9) { fftw_real tmp35; fftw_real tmp102; fftw_real tmp77; fftw_real tmp119; fftw_real tmp72; fftw_real tmp73; fftw_real tmp50; fftw_real tmp53; fftw_real tmp123; fftw_real tmp122; fftw_real tmp109; fftw_real tmp131; fftw_real tmp61; fftw_real tmp68; fftw_real tmp80; fftw_real tmp82; fftw_real tmp134; fftw_real tmp133; fftw_real tmp118; fftw_real tmp126; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp33; fftw_real tmp34; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp33 = X[0]; tmp34 = Y[-5 * iostride]; tmp35 = tmp33 + tmp34; tmp102 = tmp33 - tmp34; tmp75 = Y[0]; tmp76 = X[5 * iostride]; tmp77 = tmp75 - tmp76; tmp119 = tmp75 + tmp76; } { fftw_real tmp38; fftw_real tmp103; fftw_real tmp48; fftw_real tmp107; fftw_real tmp41; fftw_real tmp104; fftw_real tmp45; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp36; fftw_real tmp37; fftw_real tmp46; fftw_real tmp47; ASSERT_ALIGNED_DOUBLE; tmp36 = X[2 * iostride]; tmp37 = Y[-7 * iostride]; tmp38 = tmp36 + tmp37; tmp103 = tmp36 - tmp37; tmp46 = Y[-6 * iostride]; tmp47 = X[iostride]; tmp48 = tmp46 + tmp47; tmp107 = tmp46 - tmp47; } { fftw_real tmp39; fftw_real tmp40; fftw_real tmp43; fftw_real tmp44; ASSERT_ALIGNED_DOUBLE; tmp39 = Y[-8 * iostride]; tmp40 = X[3 * iostride]; tmp41 = tmp39 + tmp40; tmp104 = tmp39 - tmp40; tmp43 = X[4 * iostride]; tmp44 = Y[-9 * iostride]; tmp45 = tmp43 + tmp44; tmp106 = tmp43 - tmp44; } { fftw_real tmp42; fftw_real tmp49; fftw_real tmp105; fftw_real tmp108; ASSERT_ALIGNED_DOUBLE; tmp72 = tmp38 - tmp41; tmp73 = tmp45 - tmp48; tmp42 = tmp38 + tmp41; tmp49 = tmp45 + tmp48; tmp50 = tmp42 + tmp49; tmp53 = K559016994 * (tmp42 - tmp49); tmp123 = tmp106 - tmp107; tmp122 = tmp103 - tmp104; tmp105 = tmp103 + tmp104; tmp108 = tmp106 + tmp107; tmp109 = tmp105 + tmp108; tmp131 = K559016994 * (tmp105 - tmp108); } } { fftw_real tmp57; fftw_real tmp112; fftw_real tmp67; fftw_real tmp116; fftw_real tmp60; fftw_real tmp113; fftw_real tmp64; fftw_real tmp115; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp55; fftw_real tmp56; fftw_real tmp65; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp55 = Y[-2 * iostride]; tmp56 = X[7 * iostride]; tmp57 = tmp55 - tmp56; tmp112 = tmp55 + tmp56; tmp65 = Y[-iostride]; tmp66 = X[6 * iostride]; tmp67 = tmp65 - tmp66; tmp116 = tmp65 + tmp66; } { fftw_real tmp58; fftw_real tmp59; fftw_real tmp62; fftw_real tmp63; ASSERT_ALIGNED_DOUBLE; tmp58 = Y[-3 * iostride]; tmp59 = X[8 * iostride]; tmp60 = tmp58 - tmp59; tmp113 = tmp58 + tmp59; tmp62 = Y[-4 * iostride]; tmp63 = X[9 * iostride]; tmp64 = tmp62 - tmp63; tmp115 = tmp62 + tmp63; } { fftw_real tmp78; fftw_real tmp79; fftw_real tmp114; fftw_real tmp117; ASSERT_ALIGNED_DOUBLE; tmp61 = tmp57 - tmp60; tmp68 = tmp64 - tmp67; tmp78 = tmp57 + tmp60; tmp79 = tmp64 + tmp67; tmp80 = tmp78 + tmp79; tmp82 = K559016994 * (tmp78 - tmp79); tmp134 = tmp115 + tmp116; tmp133 = tmp112 + tmp113; tmp114 = tmp112 - tmp113; tmp117 = tmp115 - tmp116; tmp118 = tmp114 + tmp117; tmp126 = K559016994 * (tmp114 - tmp117); } } X[0] = tmp35 + tmp50; { fftw_real tmp69; fftw_real tmp91; fftw_real tmp54; fftw_real tmp90; fftw_real tmp95; fftw_real tmp74; fftw_real tmp83; fftw_real tmp94; fftw_real tmp52; fftw_real tmp81; ASSERT_ALIGNED_DOUBLE; tmp69 = (K587785252 * tmp61) - (K951056516 * tmp68); tmp91 = (K951056516 * tmp61) + (K587785252 * tmp68); tmp52 = tmp35 - (K250000000 * tmp50); tmp54 = tmp52 - tmp53; tmp90 = tmp53 + tmp52; tmp95 = (K951056516 * tmp72) + (K587785252 * tmp73); tmp74 = (K587785252 * tmp72) - (K951056516 * tmp73); tmp81 = tmp77 - (K250000000 * tmp80); tmp83 = tmp81 - tmp82; tmp94 = tmp82 + tmp81; { fftw_real tmp70; fftw_real tmp84; fftw_real tmp51; fftw_real tmp71; ASSERT_ALIGNED_DOUBLE; tmp70 = tmp54 - tmp69; tmp84 = tmp74 + tmp83; tmp51 = c_re(W[1]); tmp71 = c_im(W[1]); X[2 * iostride] = (tmp51 * tmp70) + (tmp71 * tmp84); Y[-7 * iostride] = (tmp51 * tmp84) - (tmp71 * tmp70); } { fftw_real tmp86; fftw_real tmp88; fftw_real tmp85; fftw_real tmp87; ASSERT_ALIGNED_DOUBLE; tmp86 = tmp54 + tmp69; tmp88 = tmp83 - tmp74; tmp85 = c_re(W[7]); tmp87 = c_im(W[7]); X[8 * iostride] = (tmp85 * tmp86) + (tmp87 * tmp88); Y[-iostride] = (tmp85 * tmp88) - (tmp87 * tmp86); } { fftw_real tmp92; fftw_real tmp96; fftw_real tmp89; fftw_real tmp93; ASSERT_ALIGNED_DOUBLE; tmp92 = tmp90 + tmp91; tmp96 = tmp94 - tmp95; tmp89 = c_re(W[3]); tmp93 = c_im(W[3]); X[4 * iostride] = (tmp89 * tmp92) + (tmp93 * tmp96); Y[-5 * iostride] = (tmp89 * tmp96) - (tmp93 * tmp92); } { fftw_real tmp98; fftw_real tmp100; fftw_real tmp97; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp98 = tmp90 - tmp91; tmp100 = tmp95 + tmp94; tmp97 = c_re(W[5]); tmp99 = c_im(W[5]); X[6 * iostride] = (tmp97 * tmp98) + (tmp99 * tmp100); Y[-3 * iostride] = (tmp97 * tmp100) - (tmp99 * tmp98); } } Y[-9 * iostride] = tmp80 + tmp77; { fftw_real tmp110; fftw_real tmp120; fftw_real tmp101; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp110 = tmp102 + tmp109; tmp120 = tmp118 + tmp119; tmp101 = c_re(W[4]); tmp111 = c_im(W[4]); X[5 * iostride] = (tmp101 * tmp110) + (tmp111 * tmp120); Y[-4 * iostride] = (tmp101 * tmp120) - (tmp111 * tmp110); } { fftw_real tmp124; fftw_real tmp142; fftw_real tmp127; fftw_real tmp143; fftw_real tmp147; fftw_real tmp135; fftw_real tmp132; fftw_real tmp146; fftw_real tmp125; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; tmp124 = (K587785252 * tmp122) - (K951056516 * tmp123); tmp142 = (K951056516 * tmp122) + (K587785252 * tmp123); tmp125 = tmp119 - (K250000000 * tmp118); tmp127 = tmp125 - tmp126; tmp143 = tmp126 + tmp125; tmp147 = (K951056516 * tmp133) + (K587785252 * tmp134); tmp135 = (K587785252 * tmp133) - (K951056516 * tmp134); tmp130 = tmp102 - (K250000000 * tmp109); tmp132 = tmp130 - tmp131; tmp146 = tmp131 + tmp130; { fftw_real tmp128; fftw_real tmp136; fftw_real tmp121; fftw_real tmp129; ASSERT_ALIGNED_DOUBLE; tmp128 = tmp124 + tmp127; tmp136 = tmp132 - tmp135; tmp121 = c_re(W[6]); tmp129 = c_im(W[6]); Y[-2 * iostride] = (tmp121 * tmp128) - (tmp129 * tmp136); X[7 * iostride] = (tmp121 * tmp136) + (tmp129 * tmp128); } { fftw_real tmp138; fftw_real tmp140; fftw_real tmp137; fftw_real tmp139; ASSERT_ALIGNED_DOUBLE; tmp138 = tmp127 - tmp124; tmp140 = tmp132 + tmp135; tmp137 = c_re(W[2]); tmp139 = c_im(W[2]); Y[-6 * iostride] = (tmp137 * tmp138) - (tmp139 * tmp140); X[3 * iostride] = (tmp137 * tmp140) + (tmp139 * tmp138); } { fftw_real tmp144; fftw_real tmp148; fftw_real tmp141; fftw_real tmp145; ASSERT_ALIGNED_DOUBLE; tmp144 = tmp142 + tmp143; tmp148 = tmp146 - tmp147; tmp141 = c_re(W[0]); tmp145 = c_im(W[0]); Y[-8 * iostride] = (tmp141 * tmp144) - (tmp145 * tmp148); X[iostride] = (tmp141 * tmp148) + (tmp145 * tmp144); } { fftw_real tmp150; fftw_real tmp152; fftw_real tmp149; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp150 = tmp143 - tmp142; tmp152 = tmp146 + tmp147; tmp149 = c_re(W[8]); tmp151 = c_im(W[8]); Y[0] = (tmp149 * tmp150) - (tmp151 * tmp152); X[9 * iostride] = (tmp149 * tmp152) + (tmp151 * tmp150); } } } if (i == m) { fftw_real tmp1; fftw_real tmp24; fftw_real tmp8; fftw_real tmp10; fftw_real tmp25; fftw_real tmp26; fftw_real tmp14; fftw_real tmp28; fftw_real tmp23; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp1 = X[2 * iostride]; tmp24 = Y[-2 * iostride]; { fftw_real tmp2; fftw_real tmp3; fftw_real tmp4; fftw_real tmp5; fftw_real tmp6; fftw_real tmp7; ASSERT_ALIGNED_DOUBLE; tmp2 = X[4 * iostride]; tmp3 = X[0]; tmp4 = tmp2 + tmp3; tmp5 = X[3 * iostride]; tmp6 = X[iostride]; tmp7 = tmp5 + tmp6; tmp8 = tmp4 + tmp7; tmp10 = K1_118033988 * (tmp7 - tmp4); tmp25 = tmp2 - tmp3; tmp26 = tmp5 - tmp6; } { fftw_real tmp12; fftw_real tmp13; fftw_real tmp22; fftw_real tmp15; fftw_real tmp16; fftw_real tmp21; ASSERT_ALIGNED_DOUBLE; tmp12 = Y[-4 * iostride]; tmp13 = Y[0]; tmp22 = tmp12 + tmp13; tmp15 = Y[-iostride]; tmp16 = Y[-3 * iostride]; tmp21 = tmp15 + tmp16; tmp14 = tmp12 - tmp13; tmp28 = K1_118033988 * (tmp22 + tmp21); tmp23 = tmp21 - tmp22; tmp17 = tmp15 - tmp16; } X[0] = K2_000000000 * (tmp1 + tmp8); { fftw_real tmp18; fftw_real tmp19; fftw_real tmp11; fftw_real tmp20; fftw_real tmp9; ASSERT_ALIGNED_DOUBLE; tmp18 = (K1_175570504 * tmp14) - (K1_902113032 * tmp17); tmp19 = (K1_902113032 * tmp14) + (K1_175570504 * tmp17); tmp9 = (K500000000 * tmp8) - (K2_000000000 * tmp1); tmp11 = tmp9 - tmp10; tmp20 = tmp9 + tmp10; X[2 * iostride] = tmp11 + tmp18; X[8 * iostride] = tmp18 - tmp11; X[4 * iostride] = tmp19 - tmp20; X[6 * iostride] = tmp20 + tmp19; } X[5 * iostride] = K2_000000000 * (tmp23 - tmp24); { fftw_real tmp27; fftw_real tmp31; fftw_real tmp30; fftw_real tmp32; fftw_real tmp29; ASSERT_ALIGNED_DOUBLE; tmp27 = (K1_902113032 * tmp25) + (K1_175570504 * tmp26); tmp31 = (K1_902113032 * tmp26) - (K1_175570504 * tmp25); tmp29 = (K500000000 * tmp23) + (K2_000000000 * tmp24); tmp30 = tmp28 + tmp29; tmp32 = tmp29 - tmp28; X[iostride] = -(tmp27 + tmp30); X[9 * iostride] = tmp27 - tmp30; X[3 * iostride] = tmp31 + tmp32; X[7 * iostride] = tmp32 - tmp31; } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; fftw_codelet_desc fftw_hc2hc_backward_10_desc = { "fftw_hc2hc_backward_10", (void (*)()) fftw_hc2hc_backward_10, 10, FFTW_BACKWARD, FFTW_HC2HC, 234, 9, twiddle_order, }; �����������������������������������������������������������������������������������������fftw-2.1.5/rfftw/fhb_16.c���������������������������������������������������������������������������0000644�0001754�0000144�00000067735�07637527436�010554� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:09:04 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 16 */ /* * This function contains 298 FP additions, 134 FP multiplications, * (or, 244 additions, 80 multiplications, 54 fused multiply/add), * 49 stack variables, and 128 memory accesses */ static const fftw_real K1_961570560 = FFTW_KONST(+1.961570560806460898252364472268478073947867462); static const fftw_real K390180644 = FFTW_KONST(+0.390180644032256535696569736954044481855383236); static const fftw_real K1_111140466 = FFTW_KONST(+1.111140466039204449485661627897065748749874382); static const fftw_real K1_662939224 = FFTW_KONST(+1.662939224605090474157576755235811513477121624); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_16(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (16 * iostride); { fftw_real tmp279; fftw_real tmp324; fftw_real tmp308; fftw_real tmp299; fftw_real tmp276; fftw_real tmp296; fftw_real tmp312; fftw_real tmp323; fftw_real tmp283; fftw_real tmp291; fftw_real tmp286; fftw_real tmp294; fftw_real tmp301; fftw_real tmp319; fftw_real tmp327; fftw_real tmp326; fftw_real tmp316; fftw_real tmp302; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp277; fftw_real tmp278; fftw_real tmp306; fftw_real tmp297; fftw_real tmp298; fftw_real tmp307; ASSERT_ALIGNED_DOUBLE; tmp277 = X[2 * iostride]; tmp278 = X[6 * iostride]; tmp306 = tmp277 - tmp278; tmp297 = Y[-2 * iostride]; tmp298 = Y[-6 * iostride]; tmp307 = tmp297 + tmp298; tmp279 = K2_000000000 * (tmp277 + tmp278); tmp324 = K1_414213562 * (tmp306 + tmp307); tmp308 = K1_414213562 * (tmp306 - tmp307); tmp299 = K2_000000000 * (tmp297 - tmp298); } { fftw_real tmp275; fftw_real tmp311; fftw_real tmp273; fftw_real tmp309; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp274; fftw_real tmp310; fftw_real tmp271; fftw_real tmp272; ASSERT_ALIGNED_DOUBLE; tmp274 = X[4 * iostride]; tmp275 = K2_000000000 * tmp274; tmp310 = Y[-4 * iostride]; tmp311 = K2_000000000 * tmp310; tmp271 = X[0]; tmp272 = X[8 * iostride]; tmp273 = tmp271 + tmp272; tmp309 = tmp271 - tmp272; } tmp276 = tmp273 + tmp275; tmp296 = tmp273 - tmp275; tmp312 = tmp309 - tmp311; tmp323 = tmp309 + tmp311; } { fftw_real tmp314; fftw_real tmp318; fftw_real tmp317; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp281; fftw_real tmp282; fftw_real tmp289; fftw_real tmp290; ASSERT_ALIGNED_DOUBLE; tmp281 = X[iostride]; tmp282 = X[7 * iostride]; tmp283 = tmp281 + tmp282; tmp314 = tmp281 - tmp282; tmp289 = Y[-iostride]; tmp290 = Y[-7 * iostride]; tmp291 = tmp289 - tmp290; tmp318 = tmp289 + tmp290; } { fftw_real tmp284; fftw_real tmp285; fftw_real tmp292; fftw_real tmp293; ASSERT_ALIGNED_DOUBLE; tmp284 = X[3 * iostride]; tmp285 = X[5 * iostride]; tmp286 = tmp284 + tmp285; tmp317 = tmp285 - tmp284; tmp292 = Y[-3 * iostride]; tmp293 = Y[-5 * iostride]; tmp294 = tmp292 - tmp293; tmp315 = tmp292 + tmp293; } tmp301 = tmp283 - tmp286; tmp319 = tmp317 + tmp318; tmp327 = tmp318 - tmp317; tmp326 = tmp314 + tmp315; tmp316 = tmp314 - tmp315; tmp302 = tmp291 + tmp294; } { fftw_real tmp280; fftw_real tmp287; fftw_real tmp288; fftw_real tmp295; ASSERT_ALIGNED_DOUBLE; tmp280 = tmp276 + tmp279; tmp287 = K2_000000000 * (tmp283 + tmp286); X[8 * iostride] = tmp280 - tmp287; X[0] = tmp280 + tmp287; tmp288 = tmp276 - tmp279; tmp295 = K2_000000000 * (tmp291 - tmp294); X[12 * iostride] = tmp288 + tmp295; X[4 * iostride] = tmp288 - tmp295; } { fftw_real tmp300; fftw_real tmp303; fftw_real tmp304; fftw_real tmp305; ASSERT_ALIGNED_DOUBLE; tmp300 = tmp296 - tmp299; tmp303 = K1_414213562 * (tmp301 - tmp302); X[10 * iostride] = tmp300 - tmp303; X[2 * iostride] = tmp303 + tmp300; tmp304 = tmp296 + tmp299; tmp305 = K1_414213562 * (tmp301 + tmp302); X[6 * iostride] = tmp304 - tmp305; X[14 * iostride] = tmp305 + tmp304; } { fftw_real tmp313; fftw_real tmp320; fftw_real tmp321; fftw_real tmp322; ASSERT_ALIGNED_DOUBLE; tmp313 = tmp308 + tmp312; tmp320 = (K1_847759065 * tmp316) - (K765366864 * tmp319); X[9 * iostride] = tmp313 - tmp320; X[iostride] = tmp320 + tmp313; tmp321 = tmp312 - tmp308; tmp322 = (K1_847759065 * tmp319) + (K765366864 * tmp316); X[5 * iostride] = tmp321 - tmp322; X[13 * iostride] = tmp322 + tmp321; } { fftw_real tmp325; fftw_real tmp328; fftw_real tmp329; fftw_real tmp330; ASSERT_ALIGNED_DOUBLE; tmp325 = tmp323 - tmp324; tmp328 = (K765366864 * tmp326) - (K1_847759065 * tmp327); X[11 * iostride] = tmp325 - tmp328; X[3 * iostride] = tmp328 + tmp325; tmp329 = tmp324 + tmp323; tmp330 = (K765366864 * tmp327) + (K1_847759065 * tmp326); X[7 * iostride] = tmp329 - tmp330; X[15 * iostride] = tmp330 + tmp329; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 15) { fftw_real tmp73; fftw_real tmp98; fftw_real tmp135; fftw_real tmp160; fftw_real tmp182; fftw_real tmp236; fftw_real tmp210; fftw_real tmp248; fftw_real tmp95; fftw_real tmp124; fftw_real tmp138; fftw_real tmp164; fftw_real tmp197; fftw_real tmp216; fftw_real tmp244; fftw_real tmp252; fftw_real tmp80; fftw_real tmp128; fftw_real tmp105; fftw_real tmp161; fftw_real tmp213; fftw_real tmp237; fftw_real tmp189; fftw_real tmp249; fftw_real tmp88; fftw_real tmp115; fftw_real tmp137; fftw_real tmp163; fftw_real tmp204; fftw_real tmp215; fftw_real tmp241; fftw_real tmp251; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp69; fftw_real tmp180; fftw_real tmp131; fftw_real tmp209; fftw_real tmp72; fftw_real tmp208; fftw_real tmp134; fftw_real tmp181; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp67; fftw_real tmp68; fftw_real tmp129; fftw_real tmp130; ASSERT_ALIGNED_DOUBLE; tmp67 = X[0]; tmp68 = Y[-8 * iostride]; tmp69 = tmp67 + tmp68; tmp180 = tmp67 - tmp68; tmp129 = Y[0]; tmp130 = X[8 * iostride]; tmp131 = tmp129 - tmp130; tmp209 = tmp129 + tmp130; } { fftw_real tmp70; fftw_real tmp71; fftw_real tmp132; fftw_real tmp133; ASSERT_ALIGNED_DOUBLE; tmp70 = X[4 * iostride]; tmp71 = Y[-12 * iostride]; tmp72 = tmp70 + tmp71; tmp208 = tmp70 - tmp71; tmp132 = Y[-4 * iostride]; tmp133 = X[12 * iostride]; tmp134 = tmp132 - tmp133; tmp181 = tmp132 + tmp133; } tmp73 = tmp69 + tmp72; tmp98 = tmp69 - tmp72; tmp135 = tmp131 - tmp134; tmp160 = tmp131 + tmp134; tmp182 = tmp180 - tmp181; tmp236 = tmp180 + tmp181; tmp210 = tmp208 + tmp209; tmp248 = tmp209 - tmp208; } { fftw_real tmp91; fftw_real tmp194; fftw_real tmp119; fftw_real tmp192; fftw_real tmp94; fftw_real tmp191; fftw_real tmp122; fftw_real tmp195; fftw_real tmp116; fftw_real tmp123; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp89; fftw_real tmp90; fftw_real tmp117; fftw_real tmp118; ASSERT_ALIGNED_DOUBLE; tmp89 = Y[-15 * iostride]; tmp90 = X[7 * iostride]; tmp91 = tmp89 + tmp90; tmp194 = tmp89 - tmp90; tmp117 = Y[-7 * iostride]; tmp118 = X[15 * iostride]; tmp119 = tmp117 - tmp118; tmp192 = tmp117 + tmp118; } { fftw_real tmp92; fftw_real tmp93; fftw_real tmp120; fftw_real tmp121; ASSERT_ALIGNED_DOUBLE; tmp92 = X[3 * iostride]; tmp93 = Y[-11 * iostride]; tmp94 = tmp92 + tmp93; tmp191 = tmp92 - tmp93; tmp120 = Y[-3 * iostride]; tmp121 = X[11 * iostride]; tmp122 = tmp120 - tmp121; tmp195 = tmp120 + tmp121; } tmp95 = tmp91 + tmp94; tmp116 = tmp91 - tmp94; tmp123 = tmp119 - tmp122; tmp124 = tmp116 + tmp123; tmp138 = tmp123 - tmp116; tmp164 = tmp119 + tmp122; { fftw_real tmp193; fftw_real tmp196; fftw_real tmp242; fftw_real tmp243; ASSERT_ALIGNED_DOUBLE; tmp193 = tmp191 - tmp192; tmp196 = tmp194 - tmp195; tmp197 = (K923879532 * tmp193) - (K382683432 * tmp196); tmp216 = (K382683432 * tmp193) + (K923879532 * tmp196); tmp242 = tmp194 + tmp195; tmp243 = tmp191 + tmp192; tmp244 = (K382683432 * tmp242) - (K923879532 * tmp243); tmp252 = (K382683432 * tmp243) + (K923879532 * tmp242); } } { fftw_real tmp76; fftw_real tmp183; fftw_real tmp104; fftw_real tmp184; fftw_real tmp79; fftw_real tmp186; fftw_real tmp101; fftw_real tmp187; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp74; fftw_real tmp75; fftw_real tmp102; fftw_real tmp103; ASSERT_ALIGNED_DOUBLE; tmp74 = X[2 * iostride]; tmp75 = Y[-10 * iostride]; tmp76 = tmp74 + tmp75; tmp183 = tmp74 - tmp75; tmp102 = Y[-2 * iostride]; tmp103 = X[10 * iostride]; tmp104 = tmp102 - tmp103; tmp184 = tmp102 + tmp103; } { fftw_real tmp77; fftw_real tmp78; fftw_real tmp99; fftw_real tmp100; ASSERT_ALIGNED_DOUBLE; tmp77 = Y[-14 * iostride]; tmp78 = X[6 * iostride]; tmp79 = tmp77 + tmp78; tmp186 = tmp77 - tmp78; tmp99 = Y[-6 * iostride]; tmp100 = X[14 * iostride]; tmp101 = tmp99 - tmp100; tmp187 = tmp99 + tmp100; } tmp80 = tmp76 + tmp79; tmp128 = tmp76 - tmp79; tmp105 = tmp101 - tmp104; tmp161 = tmp104 + tmp101; { fftw_real tmp211; fftw_real tmp212; fftw_real tmp185; fftw_real tmp188; ASSERT_ALIGNED_DOUBLE; tmp211 = tmp183 + tmp184; tmp212 = tmp186 + tmp187; tmp213 = K707106781 * (tmp211 - tmp212); tmp237 = K707106781 * (tmp211 + tmp212); tmp185 = tmp183 - tmp184; tmp188 = tmp186 - tmp187; tmp189 = K707106781 * (tmp185 + tmp188); tmp249 = K707106781 * (tmp185 - tmp188); } } { fftw_real tmp84; fftw_real tmp201; fftw_real tmp110; fftw_real tmp199; fftw_real tmp87; fftw_real tmp198; fftw_real tmp113; fftw_real tmp202; fftw_real tmp107; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp82; fftw_real tmp83; fftw_real tmp108; fftw_real tmp109; ASSERT_ALIGNED_DOUBLE; tmp82 = X[iostride]; tmp83 = Y[-9 * iostride]; tmp84 = tmp82 + tmp83; tmp201 = tmp82 - tmp83; tmp108 = Y[-iostride]; tmp109 = X[9 * iostride]; tmp110 = tmp108 - tmp109; tmp199 = tmp108 + tmp109; } { fftw_real tmp85; fftw_real tmp86; fftw_real tmp111; fftw_real tmp112; ASSERT_ALIGNED_DOUBLE; tmp85 = X[5 * iostride]; tmp86 = Y[-13 * iostride]; tmp87 = tmp85 + tmp86; tmp198 = tmp85 - tmp86; tmp111 = Y[-5 * iostride]; tmp112 = X[13 * iostride]; tmp113 = tmp111 - tmp112; tmp202 = tmp111 + tmp112; } tmp88 = tmp84 + tmp87; tmp107 = tmp84 - tmp87; tmp114 = tmp110 - tmp113; tmp115 = tmp107 - tmp114; tmp137 = tmp107 + tmp114; tmp163 = tmp110 + tmp113; { fftw_real tmp200; fftw_real tmp203; fftw_real tmp239; fftw_real tmp240; ASSERT_ALIGNED_DOUBLE; tmp200 = tmp198 + tmp199; tmp203 = tmp201 - tmp202; tmp204 = (K923879532 * tmp200) + (K382683432 * tmp203); tmp215 = (K923879532 * tmp203) - (K382683432 * tmp200); tmp239 = tmp201 + tmp202; tmp240 = tmp199 - tmp198; tmp241 = (K382683432 * tmp239) - (K923879532 * tmp240); tmp251 = (K382683432 * tmp240) + (K923879532 * tmp239); } } { fftw_real tmp81; fftw_real tmp96; fftw_real tmp158; fftw_real tmp162; fftw_real tmp165; fftw_real tmp166; fftw_real tmp157; fftw_real tmp159; ASSERT_ALIGNED_DOUBLE; tmp81 = tmp73 + tmp80; tmp96 = tmp88 + tmp95; tmp158 = tmp81 - tmp96; tmp162 = tmp160 + tmp161; tmp165 = tmp163 + tmp164; tmp166 = tmp162 - tmp165; X[0] = tmp81 + tmp96; Y[-15 * iostride] = tmp162 + tmp165; tmp157 = c_re(W[7]); tmp159 = c_im(W[7]); X[8 * iostride] = (tmp157 * tmp158) + (tmp159 * tmp166); Y[-7 * iostride] = (tmp157 * tmp166) - (tmp159 * tmp158); } { fftw_real tmp170; fftw_real tmp176; fftw_real tmp174; fftw_real tmp178; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp168; fftw_real tmp169; fftw_real tmp172; fftw_real tmp173; ASSERT_ALIGNED_DOUBLE; tmp168 = tmp160 - tmp161; tmp169 = tmp88 - tmp95; tmp170 = tmp168 - tmp169; tmp176 = tmp169 + tmp168; tmp172 = tmp73 - tmp80; tmp173 = tmp164 - tmp163; tmp174 = tmp172 - tmp173; tmp178 = tmp172 + tmp173; } { fftw_real tmp167; fftw_real tmp171; fftw_real tmp175; fftw_real tmp177; ASSERT_ALIGNED_DOUBLE; tmp167 = c_re(W[11]); tmp171 = c_im(W[11]); Y[-3 * iostride] = (tmp167 * tmp170) - (tmp171 * tmp174); X[12 * iostride] = (tmp171 * tmp170) + (tmp167 * tmp174); tmp175 = c_re(W[3]); tmp177 = c_im(W[3]); Y[-11 * iostride] = (tmp175 * tmp176) - (tmp177 * tmp178); X[4 * iostride] = (tmp177 * tmp176) + (tmp175 * tmp178); } } { fftw_real tmp126; fftw_real tmp142; fftw_real tmp140; fftw_real tmp144; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp106; fftw_real tmp125; fftw_real tmp136; fftw_real tmp139; ASSERT_ALIGNED_DOUBLE; tmp106 = tmp98 + tmp105; tmp125 = K707106781 * (tmp115 + tmp124); tmp126 = tmp106 - tmp125; tmp142 = tmp106 + tmp125; tmp136 = tmp128 + tmp135; tmp139 = K707106781 * (tmp137 + tmp138); tmp140 = tmp136 - tmp139; tmp144 = tmp136 + tmp139; } { fftw_real tmp97; fftw_real tmp127; fftw_real tmp141; fftw_real tmp143; ASSERT_ALIGNED_DOUBLE; tmp97 = c_re(W[9]); tmp127 = c_im(W[9]); X[10 * iostride] = (tmp97 * tmp126) + (tmp127 * tmp140); Y[-5 * iostride] = (tmp97 * tmp140) - (tmp127 * tmp126); tmp141 = c_re(W[1]); tmp143 = c_im(W[1]); X[2 * iostride] = (tmp141 * tmp142) + (tmp143 * tmp144); Y[-13 * iostride] = (tmp141 * tmp144) - (tmp143 * tmp142); } } { fftw_real tmp148; fftw_real tmp154; fftw_real tmp152; fftw_real tmp156; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp146; fftw_real tmp147; fftw_real tmp150; fftw_real tmp151; ASSERT_ALIGNED_DOUBLE; tmp146 = tmp135 - tmp128; tmp147 = K707106781 * (tmp115 - tmp124); tmp148 = tmp146 - tmp147; tmp154 = tmp146 + tmp147; tmp150 = tmp98 - tmp105; tmp151 = K707106781 * (tmp138 - tmp137); tmp152 = tmp150 - tmp151; tmp156 = tmp150 + tmp151; } { fftw_real tmp145; fftw_real tmp149; fftw_real tmp153; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp145 = c_re(W[13]); tmp149 = c_im(W[13]); Y[-iostride] = (tmp145 * tmp148) - (tmp149 * tmp152); X[14 * iostride] = (tmp149 * tmp148) + (tmp145 * tmp152); tmp153 = c_re(W[5]); tmp155 = c_im(W[5]); Y[-9 * iostride] = (tmp153 * tmp154) - (tmp155 * tmp156); X[6 * iostride] = (tmp155 * tmp154) + (tmp153 * tmp156); } } { fftw_real tmp206; fftw_real tmp220; fftw_real tmp218; fftw_real tmp222; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp190; fftw_real tmp205; fftw_real tmp214; fftw_real tmp217; ASSERT_ALIGNED_DOUBLE; tmp190 = tmp182 - tmp189; tmp205 = tmp197 - tmp204; tmp206 = tmp190 - tmp205; tmp220 = tmp190 + tmp205; tmp214 = tmp210 - tmp213; tmp217 = tmp215 - tmp216; tmp218 = tmp214 - tmp217; tmp222 = tmp214 + tmp217; } { fftw_real tmp179; fftw_real tmp207; fftw_real tmp219; fftw_real tmp221; ASSERT_ALIGNED_DOUBLE; tmp179 = c_re(W[12]); tmp207 = c_im(W[12]); X[13 * iostride] = (tmp179 * tmp206) + (tmp207 * tmp218); Y[-2 * iostride] = (tmp179 * tmp218) - (tmp207 * tmp206); tmp219 = c_re(W[4]); tmp221 = c_im(W[4]); X[5 * iostride] = (tmp219 * tmp220) + (tmp221 * tmp222); Y[-10 * iostride] = (tmp219 * tmp222) - (tmp221 * tmp220); } } { fftw_real tmp226; fftw_real tmp232; fftw_real tmp230; fftw_real tmp234; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp224; fftw_real tmp225; fftw_real tmp228; fftw_real tmp229; ASSERT_ALIGNED_DOUBLE; tmp224 = tmp210 + tmp213; tmp225 = tmp204 + tmp197; tmp226 = tmp224 - tmp225; tmp232 = tmp224 + tmp225; tmp228 = tmp182 + tmp189; tmp229 = tmp215 + tmp216; tmp230 = tmp228 - tmp229; tmp234 = tmp228 + tmp229; } { fftw_real tmp223; fftw_real tmp227; fftw_real tmp231; fftw_real tmp233; ASSERT_ALIGNED_DOUBLE; tmp223 = c_re(W[8]); tmp227 = c_im(W[8]); Y[-6 * iostride] = (tmp223 * tmp226) - (tmp227 * tmp230); X[9 * iostride] = (tmp227 * tmp226) + (tmp223 * tmp230); tmp231 = c_re(W[0]); tmp233 = c_im(W[0]); Y[-14 * iostride] = (tmp231 * tmp232) - (tmp233 * tmp234); X[iostride] = (tmp233 * tmp232) + (tmp231 * tmp234); } } { fftw_real tmp246; fftw_real tmp256; fftw_real tmp254; fftw_real tmp258; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp238; fftw_real tmp245; fftw_real tmp250; fftw_real tmp253; ASSERT_ALIGNED_DOUBLE; tmp238 = tmp236 - tmp237; tmp245 = tmp241 + tmp244; tmp246 = tmp238 - tmp245; tmp256 = tmp238 + tmp245; tmp250 = tmp248 + tmp249; tmp253 = tmp251 - tmp252; tmp254 = tmp250 - tmp253; tmp258 = tmp250 + tmp253; } { fftw_real tmp235; fftw_real tmp247; fftw_real tmp255; fftw_real tmp257; ASSERT_ALIGNED_DOUBLE; tmp235 = c_re(W[10]); tmp247 = c_im(W[10]); X[11 * iostride] = (tmp235 * tmp246) + (tmp247 * tmp254); Y[-4 * iostride] = (tmp235 * tmp254) - (tmp247 * tmp246); tmp255 = c_re(W[2]); tmp257 = c_im(W[2]); X[3 * iostride] = (tmp255 * tmp256) + (tmp257 * tmp258); Y[-12 * iostride] = (tmp255 * tmp258) - (tmp257 * tmp256); } } { fftw_real tmp262; fftw_real tmp268; fftw_real tmp266; fftw_real tmp270; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp260; fftw_real tmp261; fftw_real tmp264; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; tmp260 = tmp248 - tmp249; tmp261 = tmp241 - tmp244; tmp262 = tmp260 + tmp261; tmp268 = tmp260 - tmp261; tmp264 = tmp236 + tmp237; tmp265 = tmp251 + tmp252; tmp266 = tmp264 - tmp265; tmp270 = tmp264 + tmp265; } { fftw_real tmp259; fftw_real tmp263; fftw_real tmp267; fftw_real tmp269; ASSERT_ALIGNED_DOUBLE; tmp259 = c_re(W[6]); tmp263 = c_im(W[6]); Y[-8 * iostride] = (tmp259 * tmp262) - (tmp263 * tmp266); X[7 * iostride] = (tmp263 * tmp262) + (tmp259 * tmp266); tmp267 = c_re(W[14]); tmp269 = c_im(W[14]); Y[0] = (tmp267 * tmp268) - (tmp269 * tmp270); X[15 * iostride] = (tmp269 * tmp268) + (tmp267 * tmp270); } } } if (i == m) { fftw_real tmp7; fftw_real tmp51; fftw_real tmp19; fftw_real tmp43; fftw_real tmp39; fftw_real tmp47; fftw_real tmp59; fftw_real tmp64; fftw_real tmp14; fftw_real tmp56; fftw_real tmp24; fftw_real tmp32; fftw_real tmp29; fftw_real tmp33; fftw_real tmp54; fftw_real tmp65; fftw_real tmp63; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp15; fftw_real tmp38; fftw_real tmp57; fftw_real tmp6; fftw_real tmp35; fftw_real tmp18; fftw_real tmp58; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp36; fftw_real tmp37; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp2 = X[7 * iostride]; tmp3 = tmp1 + tmp2; tmp15 = tmp1 - tmp2; tmp36 = Y[0]; tmp37 = Y[-7 * iostride]; tmp38 = tmp36 + tmp37; tmp57 = tmp36 - tmp37; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp16; fftw_real tmp17; ASSERT_ALIGNED_DOUBLE; tmp4 = X[4 * iostride]; tmp5 = X[3 * iostride]; tmp6 = tmp4 + tmp5; tmp35 = tmp4 - tmp5; tmp16 = Y[-4 * iostride]; tmp17 = Y[-3 * iostride]; tmp18 = tmp16 + tmp17; tmp58 = tmp16 - tmp17; } tmp7 = tmp3 + tmp6; tmp51 = tmp3 - tmp6; tmp19 = tmp15 - tmp18; tmp43 = tmp15 + tmp18; tmp39 = tmp35 + tmp38; tmp47 = tmp38 - tmp35; tmp59 = tmp57 - tmp58; tmp64 = tmp58 + tmp57; } { fftw_real tmp10; fftw_real tmp20; fftw_real tmp23; fftw_real tmp53; fftw_real tmp13; fftw_real tmp25; fftw_real tmp28; fftw_real tmp52; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp21; fftw_real tmp22; ASSERT_ALIGNED_DOUBLE; tmp8 = X[2 * iostride]; tmp9 = X[5 * iostride]; tmp10 = tmp8 + tmp9; tmp20 = tmp8 - tmp9; tmp21 = Y[-2 * iostride]; tmp22 = Y[-5 * iostride]; tmp23 = tmp21 + tmp22; tmp53 = tmp21 - tmp22; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp26; fftw_real tmp27; ASSERT_ALIGNED_DOUBLE; tmp11 = X[iostride]; tmp12 = X[6 * iostride]; tmp13 = tmp11 + tmp12; tmp25 = tmp11 - tmp12; tmp26 = Y[-iostride]; tmp27 = Y[-6 * iostride]; tmp28 = tmp26 + tmp27; tmp52 = tmp27 - tmp26; } tmp14 = tmp10 + tmp13; tmp56 = tmp10 - tmp13; tmp24 = tmp20 - tmp23; tmp32 = tmp20 + tmp23; tmp29 = tmp25 - tmp28; tmp33 = tmp25 + tmp28; tmp54 = tmp52 - tmp53; tmp65 = tmp53 + tmp52; } X[0] = K2_000000000 * (tmp7 + tmp14); X[8 * iostride] = -(K2_000000000 * (tmp65 + tmp64)); tmp63 = tmp7 - tmp14; tmp66 = tmp64 - tmp65; X[4 * iostride] = K1_414213562 * (tmp63 - tmp66); X[12 * iostride] = -(K1_414213562 * (tmp63 + tmp66)); { fftw_real tmp61; fftw_real tmp62; fftw_real tmp55; fftw_real tmp60; ASSERT_ALIGNED_DOUBLE; tmp61 = tmp51 - tmp54; tmp62 = tmp59 - tmp56; X[6 * iostride] = (K765366864 * tmp61) - (K1_847759065 * tmp62); X[14 * iostride] = -((K1_847759065 * tmp61) + (K765366864 * tmp62)); tmp55 = tmp51 + tmp54; tmp60 = tmp56 + tmp59; X[2 * iostride] = (K1_847759065 * tmp55) - (K765366864 * tmp60); X[10 * iostride] = -((K765366864 * tmp55) + (K1_847759065 * tmp60)); } { fftw_real tmp45; fftw_real tmp49; fftw_real tmp48; fftw_real tmp50; fftw_real tmp44; fftw_real tmp46; ASSERT_ALIGNED_DOUBLE; tmp44 = K707106781 * (tmp32 + tmp33); tmp45 = tmp43 - tmp44; tmp49 = tmp43 + tmp44; tmp46 = K707106781 * (tmp24 - tmp29); tmp48 = tmp46 + tmp47; tmp50 = tmp47 - tmp46; X[3 * iostride] = (K1_662939224 * tmp45) - (K1_111140466 * tmp48); X[11 * iostride] = -((K1_111140466 * tmp45) + (K1_662939224 * tmp48)); X[7 * iostride] = (K390180644 * tmp49) - (K1_961570560 * tmp50); X[15 * iostride] = -((K1_961570560 * tmp49) + (K390180644 * tmp50)); } { fftw_real tmp31; fftw_real tmp41; fftw_real tmp40; fftw_real tmp42; fftw_real tmp30; fftw_real tmp34; ASSERT_ALIGNED_DOUBLE; tmp30 = K707106781 * (tmp24 + tmp29); tmp31 = tmp19 + tmp30; tmp41 = tmp19 - tmp30; tmp34 = K707106781 * (tmp32 - tmp33); tmp40 = tmp34 + tmp39; tmp42 = tmp39 - tmp34; X[iostride] = (K1_961570560 * tmp31) - (K390180644 * tmp40); X[9 * iostride] = -((K390180644 * tmp31) + (K1_961570560 * tmp40)); X[5 * iostride] = (K1_111140466 * tmp41) - (K1_662939224 * tmp42); X[13 * iostride] = -((K1_662939224 * tmp41) + (K1_111140466 * tmp42)); } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; fftw_codelet_desc fftw_hc2hc_backward_16_desc = { "fftw_hc2hc_backward_16", (void (*)()) fftw_hc2hc_backward_16, 16, FFTW_BACKWARD, FFTW_HC2HC, 366, 15, twiddle_order, }; �����������������������������������fftw-2.1.5/rfftw/fhb_32.c���������������������������������������������������������������������������0000644�0001754�0000144�00000204027�07637527464�010536� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* This file was automatically generated --- DO NOT EDIT */ /* Generated on Mon Mar 24 02:09:07 EST 2003 */ #include "fftw-int.h" #include "fftw.h" /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 32 */ /* * This function contains 764 FP additions, 346 FP multiplications, * (or, 618 additions, 200 multiplications, 146 fused multiply/add), * 93 stack variables, and 256 memory accesses */ static const fftw_real K1_662939224 = FFTW_KONST(+1.662939224605090474157576755235811513477121624); static const fftw_real K1_111140466 = FFTW_KONST(+1.111140466039204449485661627897065748749874382); static const fftw_real K390180644 = FFTW_KONST(+0.390180644032256535696569736954044481855383236); static const fftw_real K1_961570560 = FFTW_KONST(+1.961570560806460898252364472268478073947867462); static const fftw_real K1_913880671 = FFTW_KONST(+1.913880671464417729871595773960539938965698411); static const fftw_real K580569354 = FFTW_KONST(+0.580569354508924735272384751634790549382952557); static const fftw_real K942793473 = FFTW_KONST(+0.942793473651995297112775251810508755314920638); static const fftw_real K1_763842528 = FFTW_KONST(+1.763842528696710059425513727320776699016885241); static const fftw_real K1_546020906 = FFTW_KONST(+1.546020906725473921621813219516939601942082586); static const fftw_real K1_268786568 = FFTW_KONST(+1.268786568327290996430343226450986741351374190); static const fftw_real K196034280 = FFTW_KONST(+0.196034280659121203988391127777283691722273346); static const fftw_real K1_990369453 = FFTW_KONST(+1.990369453344393772489673906218959843150949737); static const fftw_real K382683432 = FFTW_KONST(+0.382683432365089771728459984030398866761344562); static const fftw_real K923879532 = FFTW_KONST(+0.923879532511286756128183189396788286822416626); static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); static const fftw_real K765366864 = FFTW_KONST(+0.765366864730179543456919968060797733522689125); static const fftw_real K1_847759065 = FFTW_KONST(+1.847759065022573512256366378793576573644833252); static const fftw_real K555570233 = FFTW_KONST(+0.555570233019602224742830813948532874374937191); static const fftw_real K831469612 = FFTW_KONST(+0.831469612302545237078788377617905756738560812); static const fftw_real K195090322 = FFTW_KONST(+0.195090322016128267848284868477022240927691618); static const fftw_real K980785280 = FFTW_KONST(+0.980785280403230449126182236134239036973933731); static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875); static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); /* * Generator Id's : * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ */ void fftw_hc2hc_backward_32(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) { int i; fftw_real *X; fftw_real *Y; X = A; Y = A + (32 * iostride); { fftw_real tmp679; fftw_real tmp804; fftw_real tmp769; fftw_real tmp707; fftw_real tmp702; fftw_real tmp728; fftw_real tmp726; fftw_real tmp750; fftw_real tmp815; fftw_real tmp819; fftw_real tmp782; fftw_real tmp793; fftw_real tmp676; fftw_real tmp704; fftw_real tmp773; fftw_real tmp803; fftw_real tmp687; fftw_real tmp709; fftw_real tmp716; fftw_real tmp753; fftw_real tmp762; fftw_real tmp806; fftw_real tmp765; fftw_real tmp807; fftw_real tmp695; fftw_real tmp719; fftw_real tmp735; fftw_real tmp749; fftw_real tmp812; fftw_real tmp818; fftw_real tmp789; fftw_real tmp792; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp677; fftw_real tmp678; fftw_real tmp767; fftw_real tmp705; fftw_real tmp706; fftw_real tmp768; ASSERT_ALIGNED_DOUBLE; tmp677 = X[4 * iostride]; tmp678 = X[12 * iostride]; tmp767 = tmp677 - tmp678; tmp705 = Y[-4 * iostride]; tmp706 = Y[-12 * iostride]; tmp768 = tmp705 + tmp706; tmp679 = K2_000000000 * (tmp677 + tmp678); tmp804 = K1_414213562 * (tmp767 + tmp768); tmp769 = K1_414213562 * (tmp767 - tmp768); tmp707 = K2_000000000 * (tmp705 - tmp706); } { fftw_real tmp698; fftw_real tmp776; fftw_real tmp725; fftw_real tmp780; fftw_real tmp701; fftw_real tmp779; fftw_real tmp722; fftw_real tmp777; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp696; fftw_real tmp697; fftw_real tmp723; fftw_real tmp724; ASSERT_ALIGNED_DOUBLE; tmp696 = X[3 * iostride]; tmp697 = X[13 * iostride]; tmp698 = tmp696 + tmp697; tmp776 = tmp696 - tmp697; tmp723 = Y[-3 * iostride]; tmp724 = Y[-13 * iostride]; tmp725 = tmp723 - tmp724; tmp780 = tmp723 + tmp724; } { fftw_real tmp699; fftw_real tmp700; fftw_real tmp720; fftw_real tmp721; ASSERT_ALIGNED_DOUBLE; tmp699 = X[5 * iostride]; tmp700 = X[11 * iostride]; tmp701 = tmp699 + tmp700; tmp779 = tmp700 - tmp699; tmp720 = Y[-5 * iostride]; tmp721 = Y[-11 * iostride]; tmp722 = tmp720 - tmp721; tmp777 = tmp720 + tmp721; } tmp702 = tmp698 + tmp701; tmp728 = tmp701 - tmp698; tmp726 = tmp722 + tmp725; tmp750 = tmp725 - tmp722; { fftw_real tmp813; fftw_real tmp814; fftw_real tmp778; fftw_real tmp781; ASSERT_ALIGNED_DOUBLE; tmp813 = tmp776 + tmp777; tmp814 = tmp780 - tmp779; tmp815 = (K980785280 * tmp813) - (K195090322 * tmp814); tmp819 = (K195090322 * tmp813) + (K980785280 * tmp814); tmp778 = tmp776 - tmp777; tmp781 = tmp779 + tmp780; tmp782 = (K831469612 * tmp778) - (K555570233 * tmp781); tmp793 = (K555570233 * tmp778) + (K831469612 * tmp781); } } { fftw_real tmp675; fftw_real tmp772; fftw_real tmp673; fftw_real tmp770; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp674; fftw_real tmp771; fftw_real tmp671; fftw_real tmp672; ASSERT_ALIGNED_DOUBLE; tmp674 = X[8 * iostride]; tmp675 = K2_000000000 * tmp674; tmp771 = Y[-8 * iostride]; tmp772 = K2_000000000 * tmp771; tmp671 = X[0]; tmp672 = X[16 * iostride]; tmp673 = tmp671 + tmp672; tmp770 = tmp671 - tmp672; } tmp676 = tmp673 + tmp675; tmp704 = tmp673 - tmp675; tmp773 = tmp770 - tmp772; tmp803 = tmp770 + tmp772; } { fftw_real tmp683; fftw_real tmp760; fftw_real tmp715; fftw_real tmp764; fftw_real tmp686; fftw_real tmp763; fftw_real tmp712; fftw_real tmp761; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp681; fftw_real tmp682; fftw_real tmp713; fftw_real tmp714; ASSERT_ALIGNED_DOUBLE; tmp681 = X[2 * iostride]; tmp682 = X[14 * iostride]; tmp683 = tmp681 + tmp682; tmp760 = tmp681 - tmp682; tmp713 = Y[-2 * iostride]; tmp714 = Y[-14 * iostride]; tmp715 = tmp713 - tmp714; tmp764 = tmp713 + tmp714; } { fftw_real tmp684; fftw_real tmp685; fftw_real tmp710; fftw_real tmp711; ASSERT_ALIGNED_DOUBLE; tmp684 = X[6 * iostride]; tmp685 = X[10 * iostride]; tmp686 = tmp684 + tmp685; tmp763 = tmp685 - tmp684; tmp710 = Y[-6 * iostride]; tmp711 = Y[-10 * iostride]; tmp712 = tmp710 - tmp711; tmp761 = tmp710 + tmp711; } tmp687 = K2_000000000 * (tmp683 + tmp686); tmp709 = tmp683 - tmp686; tmp716 = tmp712 + tmp715; tmp753 = K2_000000000 * (tmp715 - tmp712); tmp762 = tmp760 - tmp761; tmp806 = tmp760 + tmp761; tmp765 = tmp763 + tmp764; tmp807 = tmp764 - tmp763; } { fftw_real tmp691; fftw_real tmp783; fftw_real tmp734; fftw_real tmp787; fftw_real tmp694; fftw_real tmp786; fftw_real tmp731; fftw_real tmp784; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp689; fftw_real tmp690; fftw_real tmp732; fftw_real tmp733; ASSERT_ALIGNED_DOUBLE; tmp689 = X[iostride]; tmp690 = X[15 * iostride]; tmp691 = tmp689 + tmp690; tmp783 = tmp689 - tmp690; tmp732 = Y[-iostride]; tmp733 = Y[-15 * iostride]; tmp734 = tmp732 - tmp733; tmp787 = tmp732 + tmp733; } { fftw_real tmp692; fftw_real tmp693; fftw_real tmp729; fftw_real tmp730; ASSERT_ALIGNED_DOUBLE; tmp692 = X[7 * iostride]; tmp693 = X[9 * iostride]; tmp694 = tmp692 + tmp693; tmp786 = tmp693 - tmp692; tmp729 = Y[-7 * iostride]; tmp730 = Y[-9 * iostride]; tmp731 = tmp729 - tmp730; tmp784 = tmp729 + tmp730; } tmp695 = tmp691 + tmp694; tmp719 = tmp691 - tmp694; tmp735 = tmp731 + tmp734; tmp749 = tmp734 - tmp731; { fftw_real tmp810; fftw_real tmp811; fftw_real tmp785; fftw_real tmp788; ASSERT_ALIGNED_DOUBLE; tmp810 = tmp783 + tmp784; tmp811 = tmp787 - tmp786; tmp812 = (K555570233 * tmp810) + (K831469612 * tmp811); tmp818 = (K831469612 * tmp810) - (K555570233 * tmp811); tmp785 = tmp783 - tmp784; tmp788 = tmp786 + tmp787; tmp789 = (K980785280 * tmp785) - (K195090322 * tmp788); tmp792 = (K195090322 * tmp785) + (K980785280 * tmp788); } } { fftw_real tmp703; fftw_real tmp751; fftw_real tmp688; fftw_real tmp748; fftw_real tmp680; ASSERT_ALIGNED_DOUBLE; tmp703 = K2_000000000 * (tmp695 + tmp702); tmp751 = K2_000000000 * (tmp749 - tmp750); tmp680 = tmp676 + tmp679; tmp688 = tmp680 + tmp687; tmp748 = tmp680 - tmp687; X[16 * iostride] = tmp688 - tmp703; X[0] = tmp688 + tmp703; X[24 * iostride] = tmp748 + tmp751; X[8 * iostride] = tmp748 - tmp751; } { fftw_real tmp754; fftw_real tmp758; fftw_real tmp757; fftw_real tmp759; fftw_real tmp752; fftw_real tmp755; fftw_real tmp756; ASSERT_ALIGNED_DOUBLE; tmp752 = tmp676 - tmp679; tmp754 = tmp752 - tmp753; tmp758 = tmp752 + tmp753; tmp755 = tmp695 - tmp702; tmp756 = tmp750 + tmp749; tmp757 = K1_414213562 * (tmp755 - tmp756); tmp759 = K1_414213562 * (tmp755 + tmp756); X[20 * iostride] = tmp754 - tmp757; X[4 * iostride] = tmp754 + tmp757; X[12 * iostride] = tmp758 - tmp759; X[28 * iostride] = tmp758 + tmp759; } { fftw_real tmp718; fftw_real tmp738; fftw_real tmp737; fftw_real tmp739; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp708; fftw_real tmp717; fftw_real tmp727; fftw_real tmp736; ASSERT_ALIGNED_DOUBLE; tmp708 = tmp704 - tmp707; tmp717 = K1_414213562 * (tmp709 - tmp716); tmp718 = tmp708 + tmp717; tmp738 = tmp708 - tmp717; tmp727 = tmp719 - tmp726; tmp736 = tmp728 + tmp735; tmp737 = (K1_847759065 * tmp727) - (K765366864 * tmp736); tmp739 = (K765366864 * tmp727) + (K1_847759065 * tmp736); } X[18 * iostride] = tmp718 - tmp737; X[2 * iostride] = tmp718 + tmp737; X[10 * iostride] = tmp738 - tmp739; X[26 * iostride] = tmp738 + tmp739; } { fftw_real tmp742; fftw_real tmp746; fftw_real tmp745; fftw_real tmp747; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp740; fftw_real tmp741; fftw_real tmp743; fftw_real tmp744; ASSERT_ALIGNED_DOUBLE; tmp740 = tmp704 + tmp707; tmp741 = K1_414213562 * (tmp709 + tmp716); tmp742 = tmp740 - tmp741; tmp746 = tmp740 + tmp741; tmp743 = tmp719 + tmp726; tmp744 = tmp735 - tmp728; tmp745 = (K765366864 * tmp743) - (K1_847759065 * tmp744); tmp747 = (K1_847759065 * tmp743) + (K765366864 * tmp744); } X[22 * iostride] = tmp742 - tmp745; X[6 * iostride] = tmp742 + tmp745; X[14 * iostride] = tmp746 - tmp747; X[30 * iostride] = tmp746 + tmp747; } { fftw_real tmp790; fftw_real tmp794; fftw_real tmp775; fftw_real tmp791; fftw_real tmp766; fftw_real tmp774; ASSERT_ALIGNED_DOUBLE; tmp790 = K2_000000000 * (tmp782 + tmp789); tmp794 = K2_000000000 * (tmp792 - tmp793); tmp766 = (K1_847759065 * tmp762) - (K765366864 * tmp765); tmp774 = tmp769 + tmp773; tmp775 = tmp766 + tmp774; tmp791 = tmp774 - tmp766; X[17 * iostride] = tmp775 - tmp790; X[iostride] = tmp790 + tmp775; X[9 * iostride] = tmp791 - tmp794; X[25 * iostride] = tmp794 + tmp791; } { fftw_real tmp797; fftw_real tmp801; fftw_real tmp800; fftw_real tmp802; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp795; fftw_real tmp796; fftw_real tmp798; fftw_real tmp799; ASSERT_ALIGNED_DOUBLE; tmp795 = tmp773 - tmp769; tmp796 = (K765366864 * tmp762) + (K1_847759065 * tmp765); tmp797 = tmp795 - tmp796; tmp801 = tmp796 + tmp795; tmp798 = tmp789 - tmp782; tmp799 = tmp793 + tmp792; tmp800 = K1_414213562 * (tmp798 - tmp799); tmp802 = K1_414213562 * (tmp798 + tmp799); } X[21 * iostride] = tmp797 - tmp800; X[5 * iostride] = tmp800 + tmp797; X[13 * iostride] = tmp801 - tmp802; X[29 * iostride] = tmp802 + tmp801; } { fftw_real tmp816; fftw_real tmp820; fftw_real tmp809; fftw_real tmp817; fftw_real tmp805; fftw_real tmp808; ASSERT_ALIGNED_DOUBLE; tmp816 = K2_000000000 * (tmp812 - tmp815); tmp820 = K2_000000000 * (tmp818 - tmp819); tmp805 = tmp803 - tmp804; tmp808 = (K765366864 * tmp806) - (K1_847759065 * tmp807); tmp809 = tmp805 - tmp808; tmp817 = tmp808 + tmp805; X[11 * iostride] = tmp809 - tmp816; X[27 * iostride] = tmp816 + tmp809; X[19 * iostride] = tmp817 - tmp820; X[3 * iostride] = tmp820 + tmp817; } { fftw_real tmp823; fftw_real tmp827; fftw_real tmp826; fftw_real tmp828; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp821; fftw_real tmp822; fftw_real tmp824; fftw_real tmp825; ASSERT_ALIGNED_DOUBLE; tmp821 = tmp804 + tmp803; tmp822 = (K1_847759065 * tmp806) + (K765366864 * tmp807); tmp823 = tmp821 - tmp822; tmp827 = tmp822 + tmp821; tmp824 = tmp819 + tmp818; tmp825 = tmp815 + tmp812; tmp826 = K1_414213562 * (tmp824 - tmp825); tmp828 = K1_414213562 * (tmp824 + tmp825); } X[23 * iostride] = tmp823 - tmp826; X[7 * iostride] = tmp826 + tmp823; X[15 * iostride] = tmp827 - tmp828; X[31 * iostride] = tmp828 + tmp827; } } X = X + dist; Y = Y - dist; for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 31) { fftw_real tmp446; fftw_real tmp580; fftw_real tmp189; fftw_real tmp238; fftw_real tmp382; fftw_real tmp420; fftw_real tmp307; fftw_real tmp332; fftw_real tmp514; fftw_real tmp608; fftw_real tmp354; fftw_real tmp408; fftw_real tmp453; fftw_real tmp609; fftw_real tmp517; fftw_real tmp581; fftw_real tmp235; fftw_real tmp272; fftw_real tmp365; fftw_real tmp411; fftw_real tmp287; fftw_real tmp336; fftw_real tmp368; fftw_real tmp412; fftw_real tmp500; fftw_real tmp550; fftw_real tmp593; fftw_real tmp643; fftw_real tmp507; fftw_real tmp551; fftw_real tmp596; fftw_real tmp642; fftw_real tmp204; fftw_real tmp292; fftw_real tmp357; fftw_real tmp384; fftw_real tmp253; fftw_real tmp333; fftw_real tmp360; fftw_real tmp383; fftw_real tmp461; fftw_real tmp520; fftw_real tmp588; fftw_real tmp612; fftw_real tmp468; fftw_real tmp519; fftw_real tmp585; fftw_real tmp611; fftw_real tmp220; fftw_real tmp255; fftw_real tmp372; fftw_real tmp414; fftw_real tmp270; fftw_real tmp335; fftw_real tmp375; fftw_real tmp415; fftw_real tmp481; fftw_real tmp547; fftw_real tmp600; fftw_real tmp640; fftw_real tmp488; fftw_real tmp548; fftw_real tmp603; fftw_real tmp639; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp177; fftw_real tmp444; fftw_real tmp295; fftw_real tmp513; fftw_real tmp180; fftw_real tmp512; fftw_real tmp298; fftw_real tmp445; fftw_real tmp184; fftw_real tmp447; fftw_real tmp302; fftw_real tmp448; fftw_real tmp187; fftw_real tmp450; fftw_real tmp305; fftw_real tmp451; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp175; fftw_real tmp176; fftw_real tmp293; fftw_real tmp294; ASSERT_ALIGNED_DOUBLE; tmp175 = X[0]; tmp176 = Y[-16 * iostride]; tmp177 = tmp175 + tmp176; tmp444 = tmp175 - tmp176; tmp293 = Y[0]; tmp294 = X[16 * iostride]; tmp295 = tmp293 - tmp294; tmp513 = tmp293 + tmp294; } { fftw_real tmp178; fftw_real tmp179; fftw_real tmp296; fftw_real tmp297; ASSERT_ALIGNED_DOUBLE; tmp178 = X[8 * iostride]; tmp179 = Y[-24 * iostride]; tmp180 = tmp178 + tmp179; tmp512 = tmp178 - tmp179; tmp296 = Y[-8 * iostride]; tmp297 = X[24 * iostride]; tmp298 = tmp296 - tmp297; tmp445 = tmp296 + tmp297; } { fftw_real tmp182; fftw_real tmp183; fftw_real tmp300; fftw_real tmp301; ASSERT_ALIGNED_DOUBLE; tmp182 = X[4 * iostride]; tmp183 = Y[-20 * iostride]; tmp184 = tmp182 + tmp183; tmp447 = tmp182 - tmp183; tmp300 = Y[-4 * iostride]; tmp301 = X[20 * iostride]; tmp302 = tmp300 - tmp301; tmp448 = tmp300 + tmp301; } { fftw_real tmp185; fftw_real tmp186; fftw_real tmp303; fftw_real tmp304; ASSERT_ALIGNED_DOUBLE; tmp185 = Y[-28 * iostride]; tmp186 = X[12 * iostride]; tmp187 = tmp185 + tmp186; tmp450 = tmp185 - tmp186; tmp303 = Y[-12 * iostride]; tmp304 = X[28 * iostride]; tmp305 = tmp303 - tmp304; tmp451 = tmp303 + tmp304; } { fftw_real tmp181; fftw_real tmp188; fftw_real tmp352; fftw_real tmp353; ASSERT_ALIGNED_DOUBLE; tmp446 = tmp444 - tmp445; tmp580 = tmp444 + tmp445; tmp181 = tmp177 + tmp180; tmp188 = tmp184 + tmp187; tmp189 = tmp181 + tmp188; tmp238 = tmp181 - tmp188; { fftw_real tmp380; fftw_real tmp381; fftw_real tmp299; fftw_real tmp306; ASSERT_ALIGNED_DOUBLE; tmp380 = tmp295 - tmp298; tmp381 = tmp184 - tmp187; tmp382 = tmp380 - tmp381; tmp420 = tmp381 + tmp380; tmp299 = tmp295 + tmp298; tmp306 = tmp302 + tmp305; tmp307 = tmp299 - tmp306; tmp332 = tmp299 + tmp306; } tmp514 = tmp512 + tmp513; tmp608 = tmp513 - tmp512; tmp352 = tmp177 - tmp180; tmp353 = tmp305 - tmp302; tmp354 = tmp352 - tmp353; tmp408 = tmp352 + tmp353; { fftw_real tmp449; fftw_real tmp452; fftw_real tmp515; fftw_real tmp516; ASSERT_ALIGNED_DOUBLE; tmp449 = tmp447 - tmp448; tmp452 = tmp450 - tmp451; tmp453 = K707106781 * (tmp449 + tmp452); tmp609 = K707106781 * (tmp449 - tmp452); tmp515 = tmp447 + tmp448; tmp516 = tmp450 + tmp451; tmp517 = K707106781 * (tmp515 - tmp516); tmp581 = K707106781 * (tmp515 + tmp516); } } } { fftw_real tmp223; fftw_real tmp490; fftw_real tmp275; fftw_real tmp502; fftw_real tmp226; fftw_real tmp501; fftw_real tmp278; fftw_real tmp491; fftw_real tmp233; fftw_real tmp505; fftw_real tmp498; fftw_real tmp285; fftw_real tmp230; fftw_real tmp504; fftw_real tmp495; fftw_real tmp282; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp221; fftw_real tmp222; fftw_real tmp276; fftw_real tmp277; ASSERT_ALIGNED_DOUBLE; tmp221 = Y[-31 * iostride]; tmp222 = X[15 * iostride]; tmp223 = tmp221 + tmp222; tmp490 = tmp221 - tmp222; { fftw_real tmp273; fftw_real tmp274; fftw_real tmp224; fftw_real tmp225; ASSERT_ALIGNED_DOUBLE; tmp273 = Y[-15 * iostride]; tmp274 = X[31 * iostride]; tmp275 = tmp273 - tmp274; tmp502 = tmp273 + tmp274; tmp224 = X[7 * iostride]; tmp225 = Y[-23 * iostride]; tmp226 = tmp224 + tmp225; tmp501 = tmp224 - tmp225; } tmp276 = Y[-7 * iostride]; tmp277 = X[23 * iostride]; tmp278 = tmp276 - tmp277; tmp491 = tmp276 + tmp277; { fftw_real tmp231; fftw_real tmp232; fftw_real tmp496; fftw_real tmp283; fftw_real tmp284; fftw_real tmp497; ASSERT_ALIGNED_DOUBLE; tmp231 = Y[-27 * iostride]; tmp232 = X[11 * iostride]; tmp496 = tmp231 - tmp232; tmp283 = Y[-11 * iostride]; tmp284 = X[27 * iostride]; tmp497 = tmp283 + tmp284; tmp233 = tmp231 + tmp232; tmp505 = tmp496 + tmp497; tmp498 = tmp496 - tmp497; tmp285 = tmp283 - tmp284; } { fftw_real tmp228; fftw_real tmp229; fftw_real tmp493; fftw_real tmp280; fftw_real tmp281; fftw_real tmp494; ASSERT_ALIGNED_DOUBLE; tmp228 = X[3 * iostride]; tmp229 = Y[-19 * iostride]; tmp493 = tmp228 - tmp229; tmp280 = Y[-3 * iostride]; tmp281 = X[19 * iostride]; tmp494 = tmp280 + tmp281; tmp230 = tmp228 + tmp229; tmp504 = tmp493 + tmp494; tmp495 = tmp493 - tmp494; tmp282 = tmp280 - tmp281; } } { fftw_real tmp227; fftw_real tmp234; fftw_real tmp363; fftw_real tmp364; ASSERT_ALIGNED_DOUBLE; tmp227 = tmp223 + tmp226; tmp234 = tmp230 + tmp233; tmp235 = tmp227 + tmp234; tmp272 = tmp227 - tmp234; tmp363 = tmp275 - tmp278; tmp364 = tmp230 - tmp233; tmp365 = tmp363 - tmp364; tmp411 = tmp364 + tmp363; } { fftw_real tmp279; fftw_real tmp286; fftw_real tmp366; fftw_real tmp367; ASSERT_ALIGNED_DOUBLE; tmp279 = tmp275 + tmp278; tmp286 = tmp282 + tmp285; tmp287 = tmp279 - tmp286; tmp336 = tmp279 + tmp286; tmp366 = tmp223 - tmp226; tmp367 = tmp285 - tmp282; tmp368 = tmp366 - tmp367; tmp412 = tmp366 + tmp367; } { fftw_real tmp492; fftw_real tmp499; fftw_real tmp591; fftw_real tmp592; ASSERT_ALIGNED_DOUBLE; tmp492 = tmp490 - tmp491; tmp499 = K707106781 * (tmp495 + tmp498); tmp500 = tmp492 - tmp499; tmp550 = tmp492 + tmp499; tmp591 = K707106781 * (tmp495 - tmp498); tmp592 = tmp501 + tmp502; tmp593 = tmp591 - tmp592; tmp643 = tmp592 + tmp591; } { fftw_real tmp503; fftw_real tmp506; fftw_real tmp594; fftw_real tmp595; ASSERT_ALIGNED_DOUBLE; tmp503 = tmp501 - tmp502; tmp506 = K707106781 * (tmp504 - tmp505); tmp507 = tmp503 - tmp506; tmp551 = tmp503 + tmp506; tmp594 = tmp490 + tmp491; tmp595 = K707106781 * (tmp504 + tmp505); tmp596 = tmp594 - tmp595; tmp642 = tmp594 + tmp595; } } { fftw_real tmp192; fftw_real tmp465; fftw_real tmp248; fftw_real tmp463; fftw_real tmp195; fftw_real tmp462; fftw_real tmp251; fftw_real tmp466; fftw_real tmp199; fftw_real tmp458; fftw_real tmp241; fftw_real tmp456; fftw_real tmp202; fftw_real tmp455; fftw_real tmp244; fftw_real tmp459; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp190; fftw_real tmp191; fftw_real tmp246; fftw_real tmp247; ASSERT_ALIGNED_DOUBLE; tmp190 = X[2 * iostride]; tmp191 = Y[-18 * iostride]; tmp192 = tmp190 + tmp191; tmp465 = tmp190 - tmp191; tmp246 = Y[-2 * iostride]; tmp247 = X[18 * iostride]; tmp248 = tmp246 - tmp247; tmp463 = tmp246 + tmp247; } { fftw_real tmp193; fftw_real tmp194; fftw_real tmp249; fftw_real tmp250; ASSERT_ALIGNED_DOUBLE; tmp193 = X[10 * iostride]; tmp194 = Y[-26 * iostride]; tmp195 = tmp193 + tmp194; tmp462 = tmp193 - tmp194; tmp249 = Y[-10 * iostride]; tmp250 = X[26 * iostride]; tmp251 = tmp249 - tmp250; tmp466 = tmp249 + tmp250; } { fftw_real tmp197; fftw_real tmp198; fftw_real tmp239; fftw_real tmp240; ASSERT_ALIGNED_DOUBLE; tmp197 = Y[-30 * iostride]; tmp198 = X[14 * iostride]; tmp199 = tmp197 + tmp198; tmp458 = tmp197 - tmp198; tmp239 = Y[-14 * iostride]; tmp240 = X[30 * iostride]; tmp241 = tmp239 - tmp240; tmp456 = tmp239 + tmp240; } { fftw_real tmp200; fftw_real tmp201; fftw_real tmp242; fftw_real tmp243; ASSERT_ALIGNED_DOUBLE; tmp200 = X[6 * iostride]; tmp201 = Y[-22 * iostride]; tmp202 = tmp200 + tmp201; tmp455 = tmp200 - tmp201; tmp242 = Y[-6 * iostride]; tmp243 = X[22 * iostride]; tmp244 = tmp242 - tmp243; tmp459 = tmp242 + tmp243; } { fftw_real tmp196; fftw_real tmp203; fftw_real tmp355; fftw_real tmp356; ASSERT_ALIGNED_DOUBLE; tmp196 = tmp192 + tmp195; tmp203 = tmp199 + tmp202; tmp204 = tmp196 + tmp203; tmp292 = tmp196 - tmp203; tmp355 = tmp241 - tmp244; tmp356 = tmp199 - tmp202; tmp357 = tmp355 - tmp356; tmp384 = tmp356 + tmp355; } { fftw_real tmp245; fftw_real tmp252; fftw_real tmp358; fftw_real tmp359; ASSERT_ALIGNED_DOUBLE; tmp245 = tmp241 + tmp244; tmp252 = tmp248 + tmp251; tmp253 = tmp245 - tmp252; tmp333 = tmp252 + tmp245; tmp358 = tmp192 - tmp195; tmp359 = tmp248 - tmp251; tmp360 = tmp358 + tmp359; tmp383 = tmp358 - tmp359; } { fftw_real tmp457; fftw_real tmp460; fftw_real tmp586; fftw_real tmp587; ASSERT_ALIGNED_DOUBLE; tmp457 = tmp455 - tmp456; tmp460 = tmp458 - tmp459; tmp461 = (K923879532 * tmp457) - (K382683432 * tmp460); tmp520 = (K382683432 * tmp457) + (K923879532 * tmp460); tmp586 = tmp458 + tmp459; tmp587 = tmp455 + tmp456; tmp588 = (K382683432 * tmp586) - (K923879532 * tmp587); tmp612 = (K382683432 * tmp587) + (K923879532 * tmp586); } { fftw_real tmp464; fftw_real tmp467; fftw_real tmp583; fftw_real tmp584; ASSERT_ALIGNED_DOUBLE; tmp464 = tmp462 + tmp463; tmp467 = tmp465 - tmp466; tmp468 = (K923879532 * tmp464) + (K382683432 * tmp467); tmp519 = (K923879532 * tmp467) - (K382683432 * tmp464); tmp583 = tmp465 + tmp466; tmp584 = tmp463 - tmp462; tmp585 = (K382683432 * tmp583) - (K923879532 * tmp584); tmp611 = (K382683432 * tmp584) + (K923879532 * tmp583); } } { fftw_real tmp208; fftw_real tmp471; fftw_real tmp258; fftw_real tmp483; fftw_real tmp211; fftw_real tmp482; fftw_real tmp261; fftw_real tmp472; fftw_real tmp218; fftw_real tmp486; fftw_real tmp479; fftw_real tmp268; fftw_real tmp215; fftw_real tmp485; fftw_real tmp476; fftw_real tmp265; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp206; fftw_real tmp207; fftw_real tmp259; fftw_real tmp260; ASSERT_ALIGNED_DOUBLE; tmp206 = X[iostride]; tmp207 = Y[-17 * iostride]; tmp208 = tmp206 + tmp207; tmp471 = tmp206 - tmp207; { fftw_real tmp256; fftw_real tmp257; fftw_real tmp209; fftw_real tmp210; ASSERT_ALIGNED_DOUBLE; tmp256 = Y[-iostride]; tmp257 = X[17 * iostride]; tmp258 = tmp256 - tmp257; tmp483 = tmp256 + tmp257; tmp209 = X[9 * iostride]; tmp210 = Y[-25 * iostride]; tmp211 = tmp209 + tmp210; tmp482 = tmp209 - tmp210; } tmp259 = Y[-9 * iostride]; tmp260 = X[25 * iostride]; tmp261 = tmp259 - tmp260; tmp472 = tmp259 + tmp260; { fftw_real tmp216; fftw_real tmp217; fftw_real tmp477; fftw_real tmp266; fftw_real tmp267; fftw_real tmp478; ASSERT_ALIGNED_DOUBLE; tmp216 = Y[-29 * iostride]; tmp217 = X[13 * iostride]; tmp477 = tmp216 - tmp217; tmp266 = Y[-13 * iostride]; tmp267 = X[29 * iostride]; tmp478 = tmp266 + tmp267; tmp218 = tmp216 + tmp217; tmp486 = tmp477 + tmp478; tmp479 = tmp477 - tmp478; tmp268 = tmp266 - tmp267; } { fftw_real tmp213; fftw_real tmp214; fftw_real tmp474; fftw_real tmp263; fftw_real tmp264; fftw_real tmp475; ASSERT_ALIGNED_DOUBLE; tmp213 = X[5 * iostride]; tmp214 = Y[-21 * iostride]; tmp474 = tmp213 - tmp214; tmp263 = Y[-5 * iostride]; tmp264 = X[21 * iostride]; tmp475 = tmp263 + tmp264; tmp215 = tmp213 + tmp214; tmp485 = tmp474 + tmp475; tmp476 = tmp474 - tmp475; tmp265 = tmp263 - tmp264; } } { fftw_real tmp212; fftw_real tmp219; fftw_real tmp370; fftw_real tmp371; ASSERT_ALIGNED_DOUBLE; tmp212 = tmp208 + tmp211; tmp219 = tmp215 + tmp218; tmp220 = tmp212 + tmp219; tmp255 = tmp212 - tmp219; tmp370 = tmp258 - tmp261; tmp371 = tmp215 - tmp218; tmp372 = tmp370 - tmp371; tmp414 = tmp371 + tmp370; } { fftw_real tmp262; fftw_real tmp269; fftw_real tmp373; fftw_real tmp374; ASSERT_ALIGNED_DOUBLE; tmp262 = tmp258 + tmp261; tmp269 = tmp265 + tmp268; tmp270 = tmp262 - tmp269; tmp335 = tmp262 + tmp269; tmp373 = tmp208 - tmp211; tmp374 = tmp268 - tmp265; tmp375 = tmp373 - tmp374; tmp415 = tmp373 + tmp374; } { fftw_real tmp473; fftw_real tmp480; fftw_real tmp598; fftw_real tmp599; ASSERT_ALIGNED_DOUBLE; tmp473 = tmp471 - tmp472; tmp480 = K707106781 * (tmp476 + tmp479); tmp481 = tmp473 - tmp480; tmp547 = tmp473 + tmp480; tmp598 = tmp483 - tmp482; tmp599 = K707106781 * (tmp476 - tmp479); tmp600 = tmp598 + tmp599; tmp640 = tmp598 - tmp599; } { fftw_real tmp484; fftw_real tmp487; fftw_real tmp601; fftw_real tmp602; ASSERT_ALIGNED_DOUBLE; tmp484 = tmp482 + tmp483; tmp487 = K707106781 * (tmp485 - tmp486); tmp488 = tmp484 - tmp487; tmp548 = tmp484 + tmp487; tmp601 = tmp471 + tmp472; tmp602 = K707106781 * (tmp485 + tmp486); tmp603 = tmp601 - tmp602; tmp639 = tmp601 + tmp602; } } { fftw_real tmp205; fftw_real tmp236; fftw_real tmp330; fftw_real tmp334; fftw_real tmp337; fftw_real tmp338; fftw_real tmp329; fftw_real tmp331; ASSERT_ALIGNED_DOUBLE; tmp205 = tmp189 + tmp204; tmp236 = tmp220 + tmp235; tmp330 = tmp205 - tmp236; tmp334 = tmp332 + tmp333; tmp337 = tmp335 + tmp336; tmp338 = tmp334 - tmp337; X[0] = tmp205 + tmp236; Y[-31 * iostride] = tmp334 + tmp337; tmp329 = c_re(W[15]); tmp331 = c_im(W[15]); X[16 * iostride] = (tmp329 * tmp330) + (tmp331 * tmp338); Y[-15 * iostride] = (tmp329 * tmp338) - (tmp331 * tmp330); } { fftw_real tmp342; fftw_real tmp348; fftw_real tmp346; fftw_real tmp350; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp340; fftw_real tmp341; fftw_real tmp344; fftw_real tmp345; ASSERT_ALIGNED_DOUBLE; tmp340 = tmp332 - tmp333; tmp341 = tmp220 - tmp235; tmp342 = tmp340 - tmp341; tmp348 = tmp341 + tmp340; tmp344 = tmp189 - tmp204; tmp345 = tmp336 - tmp335; tmp346 = tmp344 - tmp345; tmp350 = tmp344 + tmp345; } { fftw_real tmp339; fftw_real tmp343; fftw_real tmp347; fftw_real tmp349; ASSERT_ALIGNED_DOUBLE; tmp339 = c_re(W[23]); tmp343 = c_im(W[23]); Y[-7 * iostride] = (tmp339 * tmp342) - (tmp343 * tmp346); X[24 * iostride] = (tmp343 * tmp342) + (tmp339 * tmp346); tmp347 = c_re(W[7]); tmp349 = c_im(W[7]); Y[-23 * iostride] = (tmp347 * tmp348) - (tmp349 * tmp350); X[8 * iostride] = (tmp349 * tmp348) + (tmp347 * tmp350); } } { fftw_real tmp254; fftw_real tmp322; fftw_real tmp289; fftw_real tmp319; fftw_real tmp308; fftw_real tmp318; fftw_real tmp311; fftw_real tmp323; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp271; fftw_real tmp288; fftw_real tmp309; fftw_real tmp310; ASSERT_ALIGNED_DOUBLE; tmp254 = tmp238 + tmp253; tmp322 = tmp238 - tmp253; tmp271 = tmp255 - tmp270; tmp288 = tmp272 + tmp287; tmp289 = K707106781 * (tmp271 + tmp288); tmp319 = K707106781 * (tmp271 - tmp288); tmp308 = tmp292 + tmp307; tmp318 = tmp307 - tmp292; tmp309 = tmp255 + tmp270; tmp310 = tmp287 - tmp272; tmp311 = K707106781 * (tmp309 + tmp310); tmp323 = K707106781 * (tmp310 - tmp309); } { fftw_real tmp290; fftw_real tmp312; fftw_real tmp237; fftw_real tmp291; ASSERT_ALIGNED_DOUBLE; tmp290 = tmp254 - tmp289; tmp312 = tmp308 - tmp311; tmp237 = c_re(W[19]); tmp291 = c_im(W[19]); X[20 * iostride] = (tmp237 * tmp290) + (tmp291 * tmp312); Y[-11 * iostride] = (tmp237 * tmp312) - (tmp291 * tmp290); } { fftw_real tmp314; fftw_real tmp316; fftw_real tmp313; fftw_real tmp315; ASSERT_ALIGNED_DOUBLE; tmp314 = tmp254 + tmp289; tmp316 = tmp308 + tmp311; tmp313 = c_re(W[3]); tmp315 = c_im(W[3]); X[4 * iostride] = (tmp313 * tmp314) + (tmp315 * tmp316); Y[-27 * iostride] = (tmp313 * tmp316) - (tmp315 * tmp314); } { fftw_real tmp320; fftw_real tmp324; fftw_real tmp317; fftw_real tmp321; ASSERT_ALIGNED_DOUBLE; tmp320 = tmp318 - tmp319; tmp324 = tmp322 - tmp323; tmp317 = c_re(W[27]); tmp321 = c_im(W[27]); Y[-3 * iostride] = (tmp317 * tmp320) - (tmp321 * tmp324); X[28 * iostride] = (tmp321 * tmp320) + (tmp317 * tmp324); } { fftw_real tmp326; fftw_real tmp328; fftw_real tmp325; fftw_real tmp327; ASSERT_ALIGNED_DOUBLE; tmp326 = tmp318 + tmp319; tmp328 = tmp322 + tmp323; tmp325 = c_re(W[11]); tmp327 = c_im(W[11]); Y[-19 * iostride] = (tmp325 * tmp326) - (tmp327 * tmp328); X[12 * iostride] = (tmp327 * tmp326) + (tmp325 * tmp328); } } { fftw_real tmp638; fftw_real tmp664; fftw_real tmp653; fftw_real tmp665; fftw_real tmp645; fftw_real tmp661; fftw_real tmp650; fftw_real tmp660; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp636; fftw_real tmp637; fftw_real tmp651; fftw_real tmp652; ASSERT_ALIGNED_DOUBLE; tmp636 = tmp580 + tmp581; tmp637 = tmp611 + tmp612; tmp638 = tmp636 - tmp637; tmp664 = tmp636 + tmp637; tmp651 = (K195090322 * tmp640) + (K980785280 * tmp639); tmp652 = (K195090322 * tmp643) + (K980785280 * tmp642); tmp653 = tmp651 - tmp652; tmp665 = tmp651 + tmp652; } { fftw_real tmp641; fftw_real tmp644; fftw_real tmp648; fftw_real tmp649; ASSERT_ALIGNED_DOUBLE; tmp641 = (K195090322 * tmp639) - (K980785280 * tmp640); tmp644 = (K195090322 * tmp642) - (K980785280 * tmp643); tmp645 = tmp641 + tmp644; tmp661 = tmp641 - tmp644; tmp648 = tmp608 - tmp609; tmp649 = tmp585 - tmp588; tmp650 = tmp648 + tmp649; tmp660 = tmp648 - tmp649; } { fftw_real tmp646; fftw_real tmp654; fftw_real tmp635; fftw_real tmp647; ASSERT_ALIGNED_DOUBLE; tmp646 = tmp638 - tmp645; tmp654 = tmp650 - tmp653; tmp635 = c_re(W[22]); tmp647 = c_im(W[22]); X[23 * iostride] = (tmp635 * tmp646) + (tmp647 * tmp654); Y[-8 * iostride] = (tmp635 * tmp654) - (tmp647 * tmp646); } { fftw_real tmp656; fftw_real tmp658; fftw_real tmp655; fftw_real tmp657; ASSERT_ALIGNED_DOUBLE; tmp656 = tmp638 + tmp645; tmp658 = tmp650 + tmp653; tmp655 = c_re(W[6]); tmp657 = c_im(W[6]); X[7 * iostride] = (tmp655 * tmp656) + (tmp657 * tmp658); Y[-24 * iostride] = (tmp655 * tmp658) - (tmp657 * tmp656); } { fftw_real tmp662; fftw_real tmp666; fftw_real tmp659; fftw_real tmp663; ASSERT_ALIGNED_DOUBLE; tmp662 = tmp660 + tmp661; tmp666 = tmp664 - tmp665; tmp659 = c_re(W[14]); tmp663 = c_im(W[14]); Y[-16 * iostride] = (tmp659 * tmp662) - (tmp663 * tmp666); X[15 * iostride] = (tmp663 * tmp662) + (tmp659 * tmp666); } { fftw_real tmp668; fftw_real tmp670; fftw_real tmp667; fftw_real tmp669; ASSERT_ALIGNED_DOUBLE; tmp668 = tmp660 - tmp661; tmp670 = tmp664 + tmp665; tmp667 = c_re(W[30]); tmp669 = c_im(W[30]); Y[0] = (tmp667 * tmp668) - (tmp669 * tmp670); X[31 * iostride] = (tmp669 * tmp668) + (tmp667 * tmp670); } } { fftw_real tmp410; fftw_real tmp436; fftw_real tmp425; fftw_real tmp437; fftw_real tmp422; fftw_real tmp432; fftw_real tmp417; fftw_real tmp433; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp409; fftw_real tmp423; fftw_real tmp424; fftw_real tmp421; fftw_real tmp413; fftw_real tmp416; ASSERT_ALIGNED_DOUBLE; tmp409 = K707106781 * (tmp383 + tmp384); tmp410 = tmp408 - tmp409; tmp436 = tmp408 + tmp409; tmp423 = (K923879532 * tmp415) - (K382683432 * tmp414); tmp424 = (K382683432 * tmp411) + (K923879532 * tmp412); tmp425 = tmp423 - tmp424; tmp437 = tmp423 + tmp424; tmp421 = K707106781 * (tmp360 + tmp357); tmp422 = tmp420 - tmp421; tmp432 = tmp420 + tmp421; tmp413 = (K923879532 * tmp411) - (K382683432 * tmp412); tmp416 = (K923879532 * tmp414) + (K382683432 * tmp415); tmp417 = tmp413 - tmp416; tmp433 = tmp416 + tmp413; } { fftw_real tmp418; fftw_real tmp426; fftw_real tmp407; fftw_real tmp419; ASSERT_ALIGNED_DOUBLE; tmp418 = tmp410 - tmp417; tmp426 = tmp422 - tmp425; tmp407 = c_re(W[25]); tmp419 = c_im(W[25]); X[26 * iostride] = (tmp407 * tmp418) + (tmp419 * tmp426); Y[-5 * iostride] = (tmp407 * tmp426) - (tmp419 * tmp418); } { fftw_real tmp428; fftw_real tmp430; fftw_real tmp427; fftw_real tmp429; ASSERT_ALIGNED_DOUBLE; tmp428 = tmp410 + tmp417; tmp430 = tmp422 + tmp425; tmp427 = c_re(W[9]); tmp429 = c_im(W[9]); X[10 * iostride] = (tmp427 * tmp428) + (tmp429 * tmp430); Y[-21 * iostride] = (tmp427 * tmp430) - (tmp429 * tmp428); } { fftw_real tmp434; fftw_real tmp438; fftw_real tmp431; fftw_real tmp435; ASSERT_ALIGNED_DOUBLE; tmp434 = tmp432 - tmp433; tmp438 = tmp436 - tmp437; tmp431 = c_re(W[17]); tmp435 = c_im(W[17]); Y[-13 * iostride] = (tmp431 * tmp434) - (tmp435 * tmp438); X[18 * iostride] = (tmp435 * tmp434) + (tmp431 * tmp438); } { fftw_real tmp440; fftw_real tmp442; fftw_real tmp439; fftw_real tmp441; ASSERT_ALIGNED_DOUBLE; tmp440 = tmp432 + tmp433; tmp442 = tmp436 + tmp437; tmp439 = c_re(W[1]); tmp441 = c_im(W[1]); Y[-29 * iostride] = (tmp439 * tmp440) - (tmp441 * tmp442); X[2 * iostride] = (tmp441 * tmp440) + (tmp439 * tmp442); } } { fftw_real tmp362; fftw_real tmp400; fftw_real tmp389; fftw_real tmp401; fftw_real tmp386; fftw_real tmp396; fftw_real tmp377; fftw_real tmp397; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp361; fftw_real tmp387; fftw_real tmp388; fftw_real tmp385; fftw_real tmp369; fftw_real tmp376; ASSERT_ALIGNED_DOUBLE; tmp361 = K707106781 * (tmp357 - tmp360); tmp362 = tmp354 - tmp361; tmp400 = tmp354 + tmp361; tmp387 = (K382683432 * tmp375) - (K923879532 * tmp372); tmp388 = (K923879532 * tmp365) + (K382683432 * tmp368); tmp389 = tmp387 - tmp388; tmp401 = tmp387 + tmp388; tmp385 = K707106781 * (tmp383 - tmp384); tmp386 = tmp382 - tmp385; tmp396 = tmp382 + tmp385; tmp369 = (K382683432 * tmp365) - (K923879532 * tmp368); tmp376 = (K382683432 * tmp372) + (K923879532 * tmp375); tmp377 = tmp369 - tmp376; tmp397 = tmp376 + tmp369; } { fftw_real tmp378; fftw_real tmp390; fftw_real tmp351; fftw_real tmp379; ASSERT_ALIGNED_DOUBLE; tmp378 = tmp362 - tmp377; tmp390 = tmp386 - tmp389; tmp351 = c_re(W[29]); tmp379 = c_im(W[29]); X[30 * iostride] = (tmp351 * tmp378) + (tmp379 * tmp390); Y[-iostride] = (tmp351 * tmp390) - (tmp379 * tmp378); } { fftw_real tmp392; fftw_real tmp394; fftw_real tmp391; fftw_real tmp393; ASSERT_ALIGNED_DOUBLE; tmp392 = tmp362 + tmp377; tmp394 = tmp386 + tmp389; tmp391 = c_re(W[13]); tmp393 = c_im(W[13]); X[14 * iostride] = (tmp391 * tmp392) + (tmp393 * tmp394); Y[-17 * iostride] = (tmp391 * tmp394) - (tmp393 * tmp392); } { fftw_real tmp398; fftw_real tmp402; fftw_real tmp395; fftw_real tmp399; ASSERT_ALIGNED_DOUBLE; tmp398 = tmp396 - tmp397; tmp402 = tmp400 - tmp401; tmp395 = c_re(W[21]); tmp399 = c_im(W[21]); Y[-9 * iostride] = (tmp395 * tmp398) - (tmp399 * tmp402); X[22 * iostride] = (tmp399 * tmp398) + (tmp395 * tmp402); } { fftw_real tmp404; fftw_real tmp406; fftw_real tmp403; fftw_real tmp405; ASSERT_ALIGNED_DOUBLE; tmp404 = tmp396 + tmp397; tmp406 = tmp400 + tmp401; tmp403 = c_re(W[5]); tmp405 = c_im(W[5]); Y[-25 * iostride] = (tmp403 * tmp404) - (tmp405 * tmp406); X[6 * iostride] = (tmp405 * tmp404) + (tmp403 * tmp406); } } { fftw_real tmp590; fftw_real tmp628; fftw_real tmp617; fftw_real tmp629; fftw_real tmp605; fftw_real tmp625; fftw_real tmp614; fftw_real tmp624; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp582; fftw_real tmp589; fftw_real tmp615; fftw_real tmp616; ASSERT_ALIGNED_DOUBLE; tmp582 = tmp580 - tmp581; tmp589 = tmp585 + tmp588; tmp590 = tmp582 - tmp589; tmp628 = tmp582 + tmp589; tmp615 = (K831469612 * tmp603) - (K555570233 * tmp600); tmp616 = (K555570233 * tmp593) + (K831469612 * tmp596); tmp617 = tmp615 - tmp616; tmp629 = tmp615 + tmp616; } { fftw_real tmp597; fftw_real tmp604; fftw_real tmp610; fftw_real tmp613; ASSERT_ALIGNED_DOUBLE; tmp597 = (K831469612 * tmp593) - (K555570233 * tmp596); tmp604 = (K831469612 * tmp600) + (K555570233 * tmp603); tmp605 = tmp597 - tmp604; tmp625 = tmp604 + tmp597; tmp610 = tmp608 + tmp609; tmp613 = tmp611 - tmp612; tmp614 = tmp610 - tmp613; tmp624 = tmp610 + tmp613; } { fftw_real tmp606; fftw_real tmp618; fftw_real tmp579; fftw_real tmp607; ASSERT_ALIGNED_DOUBLE; tmp606 = tmp590 - tmp605; tmp618 = tmp614 - tmp617; tmp579 = c_re(W[26]); tmp607 = c_im(W[26]); X[27 * iostride] = (tmp579 * tmp606) + (tmp607 * tmp618); Y[-4 * iostride] = (tmp579 * tmp618) - (tmp607 * tmp606); } { fftw_real tmp620; fftw_real tmp622; fftw_real tmp619; fftw_real tmp621; ASSERT_ALIGNED_DOUBLE; tmp620 = tmp590 + tmp605; tmp622 = tmp614 + tmp617; tmp619 = c_re(W[10]); tmp621 = c_im(W[10]); X[11 * iostride] = (tmp619 * tmp620) + (tmp621 * tmp622); Y[-20 * iostride] = (tmp619 * tmp622) - (tmp621 * tmp620); } { fftw_real tmp626; fftw_real tmp630; fftw_real tmp623; fftw_real tmp627; ASSERT_ALIGNED_DOUBLE; tmp626 = tmp624 - tmp625; tmp630 = tmp628 - tmp629; tmp623 = c_re(W[18]); tmp627 = c_im(W[18]); Y[-12 * iostride] = (tmp623 * tmp626) - (tmp627 * tmp630); X[19 * iostride] = (tmp627 * tmp626) + (tmp623 * tmp630); } { fftw_real tmp632; fftw_real tmp634; fftw_real tmp631; fftw_real tmp633; ASSERT_ALIGNED_DOUBLE; tmp632 = tmp624 + tmp625; tmp634 = tmp628 + tmp629; tmp631 = c_re(W[2]); tmp633 = c_im(W[2]); Y[-28 * iostride] = (tmp631 * tmp632) - (tmp633 * tmp634); X[3 * iostride] = (tmp633 * tmp632) + (tmp631 * tmp634); } } { fftw_real tmp546; fftw_real tmp572; fftw_real tmp561; fftw_real tmp573; fftw_real tmp553; fftw_real tmp569; fftw_real tmp558; fftw_real tmp568; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp544; fftw_real tmp545; fftw_real tmp559; fftw_real tmp560; ASSERT_ALIGNED_DOUBLE; tmp544 = tmp446 + tmp453; tmp545 = tmp519 + tmp520; tmp546 = tmp544 + tmp545; tmp572 = tmp544 - tmp545; tmp559 = (K195090322 * tmp547) + (K980785280 * tmp548); tmp560 = (K980785280 * tmp551) - (K195090322 * tmp550); tmp561 = tmp559 + tmp560; tmp573 = tmp560 - tmp559; } { fftw_real tmp549; fftw_real tmp552; fftw_real tmp556; fftw_real tmp557; ASSERT_ALIGNED_DOUBLE; tmp549 = (K980785280 * tmp547) - (K195090322 * tmp548); tmp552 = (K980785280 * tmp550) + (K195090322 * tmp551); tmp553 = tmp549 + tmp552; tmp569 = tmp549 - tmp552; tmp556 = tmp514 + tmp517; tmp557 = tmp468 + tmp461; tmp558 = tmp556 + tmp557; tmp568 = tmp556 - tmp557; } { fftw_real tmp554; fftw_real tmp562; fftw_real tmp543; fftw_real tmp555; ASSERT_ALIGNED_DOUBLE; tmp554 = tmp546 - tmp553; tmp562 = tmp558 - tmp561; tmp543 = c_re(W[16]); tmp555 = c_im(W[16]); X[17 * iostride] = (tmp543 * tmp554) + (tmp555 * tmp562); Y[-14 * iostride] = (tmp543 * tmp562) - (tmp555 * tmp554); } { fftw_real tmp564; fftw_real tmp566; fftw_real tmp563; fftw_real tmp565; ASSERT_ALIGNED_DOUBLE; tmp564 = tmp546 + tmp553; tmp566 = tmp558 + tmp561; tmp563 = c_re(W[0]); tmp565 = c_im(W[0]); X[iostride] = (tmp563 * tmp564) + (tmp565 * tmp566); Y[-30 * iostride] = (tmp563 * tmp566) - (tmp565 * tmp564); } { fftw_real tmp570; fftw_real tmp574; fftw_real tmp567; fftw_real tmp571; ASSERT_ALIGNED_DOUBLE; tmp570 = tmp568 - tmp569; tmp574 = tmp572 - tmp573; tmp567 = c_re(W[24]); tmp571 = c_im(W[24]); Y[-6 * iostride] = (tmp567 * tmp570) - (tmp571 * tmp574); X[25 * iostride] = (tmp571 * tmp570) + (tmp567 * tmp574); } { fftw_real tmp576; fftw_real tmp578; fftw_real tmp575; fftw_real tmp577; ASSERT_ALIGNED_DOUBLE; tmp576 = tmp568 + tmp569; tmp578 = tmp572 + tmp573; tmp575 = c_re(W[8]); tmp577 = c_im(W[8]); Y[-22 * iostride] = (tmp575 * tmp576) - (tmp577 * tmp578); X[9 * iostride] = (tmp577 * tmp576) + (tmp575 * tmp578); } } { fftw_real tmp470; fftw_real tmp536; fftw_real tmp525; fftw_real tmp537; fftw_real tmp509; fftw_real tmp533; fftw_real tmp522; fftw_real tmp532; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp454; fftw_real tmp469; fftw_real tmp523; fftw_real tmp524; ASSERT_ALIGNED_DOUBLE; tmp454 = tmp446 - tmp453; tmp469 = tmp461 - tmp468; tmp470 = tmp454 + tmp469; tmp536 = tmp454 - tmp469; tmp523 = (K831469612 * tmp481) + (K555570233 * tmp488); tmp524 = (K555570233 * tmp507) - (K831469612 * tmp500); tmp525 = tmp523 + tmp524; tmp537 = tmp524 - tmp523; } { fftw_real tmp489; fftw_real tmp508; fftw_real tmp518; fftw_real tmp521; ASSERT_ALIGNED_DOUBLE; tmp489 = (K555570233 * tmp481) - (K831469612 * tmp488); tmp508 = (K555570233 * tmp500) + (K831469612 * tmp507); tmp509 = tmp489 + tmp508; tmp533 = tmp489 - tmp508; tmp518 = tmp514 - tmp517; tmp521 = tmp519 - tmp520; tmp522 = tmp518 + tmp521; tmp532 = tmp518 - tmp521; } { fftw_real tmp510; fftw_real tmp526; fftw_real tmp443; fftw_real tmp511; ASSERT_ALIGNED_DOUBLE; tmp510 = tmp470 - tmp509; tmp526 = tmp522 - tmp525; tmp443 = c_re(W[20]); tmp511 = c_im(W[20]); X[21 * iostride] = (tmp443 * tmp510) + (tmp511 * tmp526); Y[-10 * iostride] = (tmp443 * tmp526) - (tmp511 * tmp510); } { fftw_real tmp528; fftw_real tmp530; fftw_real tmp527; fftw_real tmp529; ASSERT_ALIGNED_DOUBLE; tmp528 = tmp470 + tmp509; tmp530 = tmp522 + tmp525; tmp527 = c_re(W[4]); tmp529 = c_im(W[4]); X[5 * iostride] = (tmp527 * tmp528) + (tmp529 * tmp530); Y[-26 * iostride] = (tmp527 * tmp530) - (tmp529 * tmp528); } { fftw_real tmp534; fftw_real tmp538; fftw_real tmp531; fftw_real tmp535; ASSERT_ALIGNED_DOUBLE; tmp534 = tmp532 - tmp533; tmp538 = tmp536 - tmp537; tmp531 = c_re(W[28]); tmp535 = c_im(W[28]); Y[-2 * iostride] = (tmp531 * tmp534) - (tmp535 * tmp538); X[29 * iostride] = (tmp535 * tmp534) + (tmp531 * tmp538); } { fftw_real tmp540; fftw_real tmp542; fftw_real tmp539; fftw_real tmp541; ASSERT_ALIGNED_DOUBLE; tmp540 = tmp532 + tmp533; tmp542 = tmp536 + tmp537; tmp539 = c_re(W[12]); tmp541 = c_im(W[12]); Y[-18 * iostride] = (tmp539 * tmp540) - (tmp541 * tmp542); X[13 * iostride] = (tmp541 * tmp540) + (tmp539 * tmp542); } } } if (i == m) { fftw_real tmp7; fftw_real tmp123; fftw_real tmp35; fftw_real tmp95; fftw_real tmp82; fftw_real tmp110; fftw_real tmp146; fftw_real tmp165; fftw_real tmp29; fftw_real tmp137; fftw_real tmp141; fftw_real tmp160; fftw_real tmp69; fftw_real tmp73; fftw_real tmp103; fftw_real tmp107; fftw_real tmp14; fftw_real tmp143; fftw_real tmp46; fftw_real tmp109; fftw_real tmp126; fftw_real tmp166; fftw_real tmp77; fftw_real tmp96; fftw_real tmp22; fftw_real tmp132; fftw_real tmp140; fftw_real tmp161; fftw_real tmp58; fftw_real tmp72; fftw_real tmp100; fftw_real tmp106; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp3; fftw_real tmp31; fftw_real tmp81; fftw_real tmp144; fftw_real tmp6; fftw_real tmp78; fftw_real tmp34; fftw_real tmp145; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp1; fftw_real tmp2; fftw_real tmp79; fftw_real tmp80; ASSERT_ALIGNED_DOUBLE; tmp1 = X[0]; tmp2 = X[15 * iostride]; tmp3 = tmp1 + tmp2; tmp31 = tmp1 - tmp2; tmp79 = Y[0]; tmp80 = Y[-15 * iostride]; tmp81 = tmp79 + tmp80; tmp144 = tmp79 - tmp80; } { fftw_real tmp4; fftw_real tmp5; fftw_real tmp32; fftw_real tmp33; ASSERT_ALIGNED_DOUBLE; tmp4 = X[8 * iostride]; tmp5 = X[7 * iostride]; tmp6 = tmp4 + tmp5; tmp78 = tmp4 - tmp5; tmp32 = Y[-8 * iostride]; tmp33 = Y[-7 * iostride]; tmp34 = tmp32 + tmp33; tmp145 = tmp32 - tmp33; } tmp7 = tmp3 + tmp6; tmp123 = tmp3 - tmp6; tmp35 = tmp31 - tmp34; tmp95 = tmp31 + tmp34; tmp82 = tmp78 + tmp81; tmp110 = tmp81 - tmp78; tmp146 = tmp144 - tmp145; tmp165 = tmp145 + tmp144; } { fftw_real tmp25; fftw_real tmp59; fftw_real tmp67; fftw_real tmp134; fftw_real tmp28; fftw_real tmp64; fftw_real tmp62; fftw_real tmp135; fftw_real tmp133; fftw_real tmp136; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp23; fftw_real tmp24; fftw_real tmp65; fftw_real tmp66; ASSERT_ALIGNED_DOUBLE; tmp23 = X[iostride]; tmp24 = X[14 * iostride]; tmp25 = tmp23 + tmp24; tmp59 = tmp23 - tmp24; tmp65 = Y[-iostride]; tmp66 = Y[-14 * iostride]; tmp67 = tmp65 + tmp66; tmp134 = tmp66 - tmp65; } { fftw_real tmp26; fftw_real tmp27; fftw_real tmp60; fftw_real tmp61; ASSERT_ALIGNED_DOUBLE; tmp26 = X[6 * iostride]; tmp27 = X[9 * iostride]; tmp28 = tmp26 + tmp27; tmp64 = tmp26 - tmp27; tmp60 = Y[-6 * iostride]; tmp61 = Y[-9 * iostride]; tmp62 = tmp60 + tmp61; tmp135 = tmp60 - tmp61; } tmp29 = tmp25 + tmp28; tmp133 = tmp25 - tmp28; tmp136 = tmp134 - tmp135; tmp137 = tmp133 + tmp136; tmp141 = tmp136 - tmp133; tmp160 = tmp135 + tmp134; { fftw_real tmp63; fftw_real tmp68; fftw_real tmp101; fftw_real tmp102; ASSERT_ALIGNED_DOUBLE; tmp63 = tmp59 - tmp62; tmp68 = tmp64 - tmp67; tmp69 = (K923879532 * tmp63) + (K382683432 * tmp68); tmp73 = (K923879532 * tmp68) - (K382683432 * tmp63); tmp101 = tmp59 + tmp62; tmp102 = tmp64 + tmp67; tmp103 = (K382683432 * tmp101) - (K923879532 * tmp102); tmp107 = (K923879532 * tmp101) + (K382683432 * tmp102); } } { fftw_real tmp10; fftw_real tmp36; fftw_real tmp39; fftw_real tmp125; fftw_real tmp13; fftw_real tmp41; fftw_real tmp44; fftw_real tmp124; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp8; fftw_real tmp9; fftw_real tmp37; fftw_real tmp38; ASSERT_ALIGNED_DOUBLE; tmp8 = X[4 * iostride]; tmp9 = X[11 * iostride]; tmp10 = tmp8 + tmp9; tmp36 = tmp8 - tmp9; tmp37 = Y[-4 * iostride]; tmp38 = Y[-11 * iostride]; tmp39 = tmp37 + tmp38; tmp125 = tmp37 - tmp38; } { fftw_real tmp11; fftw_real tmp12; fftw_real tmp42; fftw_real tmp43; ASSERT_ALIGNED_DOUBLE; tmp11 = X[3 * iostride]; tmp12 = X[12 * iostride]; tmp13 = tmp11 + tmp12; tmp41 = tmp11 - tmp12; tmp42 = Y[-3 * iostride]; tmp43 = Y[-12 * iostride]; tmp44 = tmp42 + tmp43; tmp124 = tmp43 - tmp42; } { fftw_real tmp40; fftw_real tmp45; fftw_real tmp75; fftw_real tmp76; ASSERT_ALIGNED_DOUBLE; tmp14 = tmp10 + tmp13; tmp143 = tmp10 - tmp13; tmp40 = tmp36 - tmp39; tmp45 = tmp41 - tmp44; tmp46 = K707106781 * (tmp40 + tmp45); tmp109 = K707106781 * (tmp40 - tmp45); tmp126 = tmp124 - tmp125; tmp166 = tmp125 + tmp124; tmp75 = tmp36 + tmp39; tmp76 = tmp41 + tmp44; tmp77 = K707106781 * (tmp75 - tmp76); tmp96 = K707106781 * (tmp75 + tmp76); } } { fftw_real tmp18; fftw_real tmp48; fftw_real tmp56; fftw_real tmp129; fftw_real tmp21; fftw_real tmp53; fftw_real tmp51; fftw_real tmp130; fftw_real tmp128; fftw_real tmp131; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp16; fftw_real tmp17; fftw_real tmp54; fftw_real tmp55; ASSERT_ALIGNED_DOUBLE; tmp16 = X[2 * iostride]; tmp17 = X[13 * iostride]; tmp18 = tmp16 + tmp17; tmp48 = tmp16 - tmp17; tmp54 = Y[-2 * iostride]; tmp55 = Y[-13 * iostride]; tmp56 = tmp54 + tmp55; tmp129 = tmp54 - tmp55; } { fftw_real tmp19; fftw_real tmp20; fftw_real tmp49; fftw_real tmp50; ASSERT_ALIGNED_DOUBLE; tmp19 = X[10 * iostride]; tmp20 = X[5 * iostride]; tmp21 = tmp19 + tmp20; tmp53 = tmp19 - tmp20; tmp49 = Y[-10 * iostride]; tmp50 = Y[-5 * iostride]; tmp51 = tmp49 + tmp50; tmp130 = tmp49 - tmp50; } tmp22 = tmp18 + tmp21; tmp128 = tmp18 - tmp21; tmp131 = tmp129 - tmp130; tmp132 = tmp128 - tmp131; tmp140 = tmp128 + tmp131; tmp161 = tmp130 + tmp129; { fftw_real tmp52; fftw_real tmp57; fftw_real tmp98; fftw_real tmp99; ASSERT_ALIGNED_DOUBLE; tmp52 = tmp48 - tmp51; tmp57 = tmp53 + tmp56; tmp58 = (K923879532 * tmp52) - (K382683432 * tmp57); tmp72 = (K382683432 * tmp52) + (K923879532 * tmp57); tmp98 = tmp48 + tmp51; tmp99 = tmp56 - tmp53; tmp100 = (K382683432 * tmp98) - (K923879532 * tmp99); tmp106 = (K923879532 * tmp98) + (K382683432 * tmp99); } } { fftw_real tmp15; fftw_real tmp30; fftw_real tmp171; fftw_real tmp172; fftw_real tmp173; fftw_real tmp174; ASSERT_ALIGNED_DOUBLE; tmp15 = tmp7 + tmp14; tmp30 = tmp22 + tmp29; tmp171 = tmp15 - tmp30; tmp172 = tmp166 + tmp165; tmp173 = tmp161 + tmp160; tmp174 = tmp172 - tmp173; X[0] = K2_000000000 * (tmp15 + tmp30); X[16 * iostride] = -(K2_000000000 * (tmp173 + tmp172)); X[8 * iostride] = K1_414213562 * (tmp171 - tmp174); X[24 * iostride] = -(K1_414213562 * (tmp171 + tmp174)); } { fftw_real tmp163; fftw_real tmp169; fftw_real tmp168; fftw_real tmp170; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp159; fftw_real tmp162; fftw_real tmp164; fftw_real tmp167; ASSERT_ALIGNED_DOUBLE; tmp159 = tmp7 - tmp14; tmp162 = tmp160 - tmp161; tmp163 = tmp159 + tmp162; tmp169 = tmp159 - tmp162; tmp164 = tmp22 - tmp29; tmp167 = tmp165 - tmp166; tmp168 = tmp164 + tmp167; tmp170 = tmp167 - tmp164; } X[4 * iostride] = (K1_847759065 * tmp163) - (K765366864 * tmp168); X[20 * iostride] = -((K765366864 * tmp163) + (K1_847759065 * tmp168)); X[12 * iostride] = (K765366864 * tmp169) - (K1_847759065 * tmp170); X[28 * iostride] = -((K1_847759065 * tmp169) + (K765366864 * tmp170)); } { fftw_real tmp71; fftw_real tmp85; fftw_real tmp84; fftw_real tmp86; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp47; fftw_real tmp70; fftw_real tmp74; fftw_real tmp83; ASSERT_ALIGNED_DOUBLE; tmp47 = tmp35 + tmp46; tmp70 = tmp58 + tmp69; tmp71 = tmp47 + tmp70; tmp85 = tmp47 - tmp70; tmp74 = tmp72 + tmp73; tmp83 = tmp77 + tmp82; tmp84 = tmp74 + tmp83; tmp86 = tmp83 - tmp74; } X[iostride] = (K1_990369453 * tmp71) - (K196034280 * tmp84); X[17 * iostride] = -((K196034280 * tmp71) + (K1_990369453 * tmp84)); X[9 * iostride] = (K1_268786568 * tmp85) - (K1_546020906 * tmp86); X[25 * iostride] = -((K1_546020906 * tmp85) + (K1_268786568 * tmp86)); } { fftw_real tmp89; fftw_real tmp93; fftw_real tmp92; fftw_real tmp94; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp87; fftw_real tmp88; fftw_real tmp90; fftw_real tmp91; ASSERT_ALIGNED_DOUBLE; tmp87 = tmp35 - tmp46; tmp88 = tmp73 - tmp72; tmp89 = tmp87 + tmp88; tmp93 = tmp87 - tmp88; tmp90 = tmp58 - tmp69; tmp91 = tmp82 - tmp77; tmp92 = tmp90 + tmp91; tmp94 = tmp91 - tmp90; } X[5 * iostride] = (K1_763842528 * tmp89) - (K942793473 * tmp92); X[21 * iostride] = -((K942793473 * tmp89) + (K1_763842528 * tmp92)); X[13 * iostride] = (K580569354 * tmp93) - (K1_913880671 * tmp94); X[29 * iostride] = -((K1_913880671 * tmp93) + (K580569354 * tmp94)); } { fftw_real tmp105; fftw_real tmp113; fftw_real tmp112; fftw_real tmp114; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp97; fftw_real tmp104; fftw_real tmp108; fftw_real tmp111; ASSERT_ALIGNED_DOUBLE; tmp97 = tmp95 - tmp96; tmp104 = tmp100 + tmp103; tmp105 = tmp97 + tmp104; tmp113 = tmp97 - tmp104; tmp108 = tmp106 - tmp107; tmp111 = tmp109 + tmp110; tmp112 = tmp108 + tmp111; tmp114 = tmp111 - tmp108; } X[3 * iostride] = (K1_913880671 * tmp105) - (K580569354 * tmp112); X[19 * iostride] = -((K580569354 * tmp105) + (K1_913880671 * tmp112)); X[11 * iostride] = (K942793473 * tmp113) - (K1_763842528 * tmp114); X[27 * iostride] = -((K1_763842528 * tmp113) + (K942793473 * tmp114)); } { fftw_real tmp117; fftw_real tmp121; fftw_real tmp120; fftw_real tmp122; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp115; fftw_real tmp116; fftw_real tmp118; fftw_real tmp119; ASSERT_ALIGNED_DOUBLE; tmp115 = tmp95 + tmp96; tmp116 = tmp106 + tmp107; tmp117 = tmp115 - tmp116; tmp121 = tmp115 + tmp116; tmp118 = tmp100 - tmp103; tmp119 = tmp110 - tmp109; tmp120 = tmp118 + tmp119; tmp122 = tmp119 - tmp118; } X[7 * iostride] = (K1_546020906 * tmp117) - (K1_268786568 * tmp120); X[23 * iostride] = -((K1_268786568 * tmp117) + (K1_546020906 * tmp120)); X[15 * iostride] = (K196034280 * tmp121) - (K1_990369453 * tmp122); X[31 * iostride] = -((K1_990369453 * tmp121) + (K196034280 * tmp122)); } { fftw_real tmp139; fftw_real tmp149; fftw_real tmp148; fftw_real tmp150; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp127; fftw_real tmp138; fftw_real tmp142; fftw_real tmp147; ASSERT_ALIGNED_DOUBLE; tmp127 = tmp123 + tmp126; tmp138 = K707106781 * (tmp132 + tmp137); tmp139 = tmp127 + tmp138; tmp149 = tmp127 - tmp138; tmp142 = K707106781 * (tmp140 + tmp141); tmp147 = tmp143 + tmp146; tmp148 = tmp142 + tmp147; tmp150 = tmp147 - tmp142; } X[2 * iostride] = (K1_961570560 * tmp139) - (K390180644 * tmp148); X[18 * iostride] = -((K390180644 * tmp139) + (K1_961570560 * tmp148)); X[10 * iostride] = (K1_111140466 * tmp149) - (K1_662939224 * tmp150); X[26 * iostride] = -((K1_662939224 * tmp149) + (K1_111140466 * tmp150)); } { fftw_real tmp153; fftw_real tmp157; fftw_real tmp156; fftw_real tmp158; ASSERT_ALIGNED_DOUBLE; { fftw_real tmp151; fftw_real tmp152; fftw_real tmp154; fftw_real tmp155; ASSERT_ALIGNED_DOUBLE; tmp151 = tmp123 - tmp126; tmp152 = K707106781 * (tmp141 - tmp140); tmp153 = tmp151 + tmp152; tmp157 = tmp151 - tmp152; tmp154 = K707106781 * (tmp132 - tmp137); tmp155 = tmp146 - tmp143; tmp156 = tmp154 + tmp155; tmp158 = tmp155 - tmp154; } X[6 * iostride] = (K1_662939224 * tmp153) - (K1_111140466 * tmp156); X[22 * iostride] = -((K1_111140466 * tmp153) + (K1_662939224 * tmp156)); X[14 * iostride] = (K390180644 * tmp157) - (K1_961570560 * tmp158); X[30 * iostride] = -((K1_961570560 * tmp157) + (K390180644 * tmp158)); } } } static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; fftw_codelet_desc fftw_hc2hc_backward_32_desc = { "fftw_hc2hc_backward_32", (void (*)()) fftw_hc2hc_backward_32, 32, FFTW_BACKWARD, FFTW_HC2HC, 718, 31, twiddle_order, }; ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rconfig.c��������������������������������������������������������������������������0000644�0001754�0000144�00000013055�07637527464�011121� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* rconfig.c -- this file contains all the real-complex codelets the system knows about */ #include "fftw-int.h" #include "rfftw.h" #define NOTW_CODELET(x) \ &fftw_real2hc_##x##_desc #define NOTWI_CODELET(x) \ &fftw_hc2real_##x##_desc #define TWIDDLE_CODELET(x) \ &fftw_hc2hc_forward_##x##_desc #define TWIDDLEI_CODELET(x) \ &fftw_hc2hc_backward_##x##_desc /* automatically-generated list of codelets */ extern fftw_codelet_desc fftw_real2hc_1_desc; extern fftw_codelet_desc fftw_hc2real_1_desc; extern fftw_codelet_desc fftw_real2hc_2_desc; extern fftw_codelet_desc fftw_hc2real_2_desc; extern fftw_codelet_desc fftw_real2hc_3_desc; extern fftw_codelet_desc fftw_hc2real_3_desc; extern fftw_codelet_desc fftw_real2hc_4_desc; extern fftw_codelet_desc fftw_hc2real_4_desc; extern fftw_codelet_desc fftw_real2hc_5_desc; extern fftw_codelet_desc fftw_hc2real_5_desc; extern fftw_codelet_desc fftw_real2hc_6_desc; extern fftw_codelet_desc fftw_hc2real_6_desc; extern fftw_codelet_desc fftw_real2hc_7_desc; extern fftw_codelet_desc fftw_hc2real_7_desc; extern fftw_codelet_desc fftw_real2hc_8_desc; extern fftw_codelet_desc fftw_hc2real_8_desc; extern fftw_codelet_desc fftw_real2hc_9_desc; extern fftw_codelet_desc fftw_hc2real_9_desc; extern fftw_codelet_desc fftw_real2hc_10_desc; extern fftw_codelet_desc fftw_hc2real_10_desc; extern fftw_codelet_desc fftw_real2hc_11_desc; extern fftw_codelet_desc fftw_hc2real_11_desc; extern fftw_codelet_desc fftw_real2hc_12_desc; extern fftw_codelet_desc fftw_hc2real_12_desc; extern fftw_codelet_desc fftw_real2hc_13_desc; extern fftw_codelet_desc fftw_hc2real_13_desc; extern fftw_codelet_desc fftw_real2hc_14_desc; extern fftw_codelet_desc fftw_hc2real_14_desc; extern fftw_codelet_desc fftw_real2hc_15_desc; extern fftw_codelet_desc fftw_hc2real_15_desc; extern fftw_codelet_desc fftw_real2hc_16_desc; extern fftw_codelet_desc fftw_hc2real_16_desc; extern fftw_codelet_desc fftw_real2hc_32_desc; extern fftw_codelet_desc fftw_hc2real_32_desc; extern fftw_codelet_desc fftw_real2hc_64_desc; extern fftw_codelet_desc fftw_hc2real_64_desc; extern fftw_codelet_desc fftw_real2hc_128_desc; extern fftw_codelet_desc fftw_hc2real_128_desc; extern fftw_codelet_desc fftw_hc2hc_forward_2_desc; extern fftw_codelet_desc fftw_hc2hc_backward_2_desc; extern fftw_codelet_desc fftw_hc2hc_forward_3_desc; extern fftw_codelet_desc fftw_hc2hc_backward_3_desc; extern fftw_codelet_desc fftw_hc2hc_forward_4_desc; extern fftw_codelet_desc fftw_hc2hc_backward_4_desc; extern fftw_codelet_desc fftw_hc2hc_forward_5_desc; extern fftw_codelet_desc fftw_hc2hc_backward_5_desc; extern fftw_codelet_desc fftw_hc2hc_forward_6_desc; extern fftw_codelet_desc fftw_hc2hc_backward_6_desc; extern fftw_codelet_desc fftw_hc2hc_forward_7_desc; extern fftw_codelet_desc fftw_hc2hc_backward_7_desc; extern fftw_codelet_desc fftw_hc2hc_forward_8_desc; extern fftw_codelet_desc fftw_hc2hc_backward_8_desc; extern fftw_codelet_desc fftw_hc2hc_forward_9_desc; extern fftw_codelet_desc fftw_hc2hc_backward_9_desc; extern fftw_codelet_desc fftw_hc2hc_forward_10_desc; extern fftw_codelet_desc fftw_hc2hc_backward_10_desc; extern fftw_codelet_desc fftw_hc2hc_forward_16_desc; extern fftw_codelet_desc fftw_hc2hc_backward_16_desc; extern fftw_codelet_desc fftw_hc2hc_forward_32_desc; extern fftw_codelet_desc fftw_hc2hc_backward_32_desc; fftw_codelet_desc *rfftw_config[] = { NOTW_CODELET(1), NOTWI_CODELET(1), NOTW_CODELET(2), NOTWI_CODELET(2), NOTW_CODELET(3), NOTWI_CODELET(3), NOTW_CODELET(4), NOTWI_CODELET(4), NOTW_CODELET(5), NOTWI_CODELET(5), NOTW_CODELET(6), NOTWI_CODELET(6), NOTW_CODELET(7), NOTWI_CODELET(7), NOTW_CODELET(8), NOTWI_CODELET(8), NOTW_CODELET(9), NOTWI_CODELET(9), NOTW_CODELET(10), NOTWI_CODELET(10), NOTW_CODELET(11), NOTWI_CODELET(11), NOTW_CODELET(12), NOTWI_CODELET(12), NOTW_CODELET(13), NOTWI_CODELET(13), NOTW_CODELET(14), NOTWI_CODELET(14), NOTW_CODELET(15), NOTWI_CODELET(15), NOTW_CODELET(16), NOTWI_CODELET(16), NOTW_CODELET(32), NOTWI_CODELET(32), NOTW_CODELET(64), NOTWI_CODELET(64), NOTW_CODELET(128), NOTWI_CODELET(128), TWIDDLE_CODELET(2), TWIDDLEI_CODELET(2), TWIDDLE_CODELET(3), TWIDDLEI_CODELET(3), TWIDDLE_CODELET(4), TWIDDLEI_CODELET(4), TWIDDLE_CODELET(5), TWIDDLEI_CODELET(5), TWIDDLE_CODELET(6), TWIDDLEI_CODELET(6), TWIDDLE_CODELET(7), TWIDDLEI_CODELET(7), TWIDDLE_CODELET(8), TWIDDLEI_CODELET(8), TWIDDLE_CODELET(9), TWIDDLEI_CODELET(9), TWIDDLE_CODELET(10), TWIDDLEI_CODELET(10), TWIDDLE_CODELET(16), TWIDDLEI_CODELET(16), TWIDDLE_CODELET(32), TWIDDLEI_CODELET(32), (fftw_codelet_desc *) 0 }; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rplanner.c�������������������������������������������������������������������������0000644�0001754�0000144�00000030751�07635206062�011277� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * planner.c -- find the optimal plan */ /* $Id: rplanner.c,v 1.25 2003/03/16 23:43:46 stevenj Exp $ */ #ifdef FFTW_USING_CILK #include #include #endif #include #include #include "fftw-int.h" #include "rfftw.h" extern fftw_codelet_desc *rfftw_config[]; /* global from rconfig.c */ extern fftw_rgeneric_codelet fftw_hc2hc_forward_generic; extern fftw_rgeneric_codelet fftw_hc2hc_backward_generic; fftw_plan_hook_ptr rfftw_plan_hook = (fftw_plan_hook_ptr) NULL; /* timing rfftw plans: */ static double rfftw_measure_runtime(fftw_plan plan, fftw_real *in, int istride, fftw_real *out, int ostride) { fftw_time begin, end, start; double t, tmin; int i, iter; int n; int repeat; int howmany = plan->vector_size; n = plan->n; iter = 1; for (;;) { tmin = 1.0E10; for (i = 0; i < n * howmany; ++i) in[istride * i] = 0.0; start = fftw_get_time(); /* repeat the measurement FFTW_TIME_REPEAT times */ for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { begin = fftw_get_time(); for (i = 0; i < iter; ++i) rfftw(plan, howmany, in, istride, istride, out, ostride, ostride); end = fftw_get_time(); t = fftw_time_to_sec(fftw_time_diff(end, begin)); if (t < tmin) tmin = t; /* do not run for too long */ t = fftw_time_to_sec(fftw_time_diff(end, start)); if (t > FFTW_TIME_LIMIT) break; } if (tmin >= FFTW_TIME_MIN) break; iter *= 2; } tmin /= (double) iter; return tmin; } /* auxiliary functions */ static void rcompute_cost(fftw_plan plan, fftw_real *in, int istride, fftw_real *out, int ostride) { if (plan->flags & FFTW_MEASURE) plan->cost = rfftw_measure_runtime(plan, in, istride, out, ostride); else { double c; c = plan->n * fftw_estimate_node(plan->root) * plan->vector_size; plan->cost = c; } } static void run_plan_hooks(fftw_plan p) { if (rfftw_plan_hook && p) { fftw_complete_twiddle(p->root, p->n); rfftw_plan_hook(p); } } /* macrology */ #define FOR_ALL_RCODELETS(p) \ fftw_codelet_desc **__q, *p; \ for (__q = &rfftw_config[0]; (p = (*__q)); ++__q) /****************************************** * Recursive planner * ******************************************/ static fftw_plan rplanner(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_real *, int, fftw_real *, int); /* * the planner consists of two parts: one that tries to * use accumulated wisdom, and one that does not. * A small driver invokes both parts in sequence */ /* planner with wisdom: look up the codelet suggested by the wisdom */ static fftw_plan rplanner_wisdom(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_real *in, int istride, fftw_real *out, int ostride) { fftw_plan best = (fftw_plan) 0; fftw_plan_node *node; int have_wisdom; enum fftw_node_type wisdom_type; int wisdom_signature; fftw_recurse_kind wisdom_recurse_kind; /* see if we remember any wisdom for this case */ have_wisdom = fftw_wisdom_lookup(n, flags, dir, RFFTW_WISDOM, istride, ostride, &wisdom_type, &wisdom_signature, &wisdom_recurse_kind, 0); if (!have_wisdom) return best; if (wisdom_type == FFTW_REAL2HC || wisdom_type == FFTW_HC2REAL) { FOR_ALL_RCODELETS(p) { if (p->dir == dir && p->type == wisdom_type) { /* see if wisdom applies */ if (wisdom_signature == p->signature && p->size == n) { if (wisdom_type == FFTW_REAL2HC) node = fftw_make_node_real2hc(n, p); else node = fftw_make_node_hc2real(n, p); best = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(best); run_plan_hooks(best); return best; } } } } if (wisdom_type == FFTW_HC2HC) { FOR_ALL_RCODELETS(p) { if (p->dir == dir && p->type == wisdom_type) { /* see if wisdom applies */ if (wisdom_signature == p->signature && p->size > 1 && (n % p->size) == 0) { fftw_plan r = rplanner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, wisdom_recurse_kind == FFTW_VECTOR_RECURSE ? p->size : vector_size, in, istride, out, ostride); if (!r) continue; node = fftw_make_node_hc2hc(n, dir, p, r->root, flags); best = fftw_make_plan(n, dir, node, flags, p->type, p->signature, wisdom_recurse_kind, vector_size); fftw_use_plan(best); run_plan_hooks(best); fftw_destroy_plan_internal(r); return best; } } } } /* * BUG (or: TODO) Can we have generic wisdom? This is probably * an academic question */ return best; } /* * planner with no wisdom: try all combinations and pick * the best */ static fftw_plan rplanner_normal(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_real *in, int istride, fftw_real *out, int ostride) { fftw_plan best = (fftw_plan) 0; fftw_plan newplan; fftw_plan_node *node; /* see if we have any codelet that solves the problem */ { FOR_ALL_RCODELETS(p) { if (p->dir == dir && (p->type == FFTW_REAL2HC || p->type == FFTW_HC2REAL)) { if (p->size == n) { if (p->type == FFTW_REAL2HC) node = fftw_make_node_real2hc(n, p); else node = fftw_make_node_hc2real(n, p); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); run_plan_hooks(newplan); rcompute_cost(newplan, in, istride, out, ostride); best = fftw_pick_better(newplan, best); } } } } /* Then, try all available twiddle codelets */ { FOR_ALL_RCODELETS(p) { if (p->dir == dir && p->type == FFTW_HC2HC) { if ((n % p->size) == 0 && p->size > 1 && (!best || n != p->size)) { fftw_plan r = rplanner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, vector_size, in, istride, out, ostride); if (!r) continue; node = fftw_make_node_hc2hc(n, dir, p, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); run_plan_hooks(newplan); fftw_destroy_plan_internal(r); rcompute_cost(newplan, in, istride, out, ostride); best = fftw_pick_better(newplan, best); } } } } /* try vector recursion unless prohibited by the flags: */ if (! (flags & FFTW_NO_VECTOR_RECURSE)) { FOR_ALL_RCODELETS(p) { if (p->dir == dir && p->type == FFTW_HC2HC) { if ((n % p->size) == 0 && p->size > 1 && (!best || n != p->size)) { fftw_plan r = rplanner(table, n / p->size, dir, flags | FFTW_NO_VECTOR_RECURSE, p->size, in, istride, out, ostride); if (!r) continue; node = fftw_make_node_hc2hc(n, dir, p, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, p->type, p->signature, FFTW_VECTOR_RECURSE, vector_size); fftw_use_plan(newplan); run_plan_hooks(newplan); fftw_destroy_plan_internal(r); rcompute_cost(newplan, in, istride, out, ostride); best = fftw_pick_better(newplan, best); } } } } /* * Resort to generic codelets for unknown factors, but only if * n is odd--the rgeneric codelets can't handle even n's. */ if (n % 2 != 0) { fftw_rgeneric_codelet *codelet = (dir == FFTW_FORWARD ? fftw_hc2hc_forward_generic : fftw_hc2hc_backward_generic); int size, prev_size = 0, remaining_factors = n; fftw_plan r; while (remaining_factors > 1) { size = fftw_factor(remaining_factors); remaining_factors /= size; /* don't try the same factor more than once */ if (size == prev_size) continue; prev_size = size; /* Look for codelets corresponding to this factor. */ { FOR_ALL_RCODELETS(p) { if (p->dir == dir && p->type == FFTW_HC2HC && p->size == size) { size = 0; break; } } } /* * only try a generic/rader codelet if there were no * twiddle codelets for this factor */ if (!size) continue; r = rplanner(table, n / size, dir, flags | FFTW_NO_VECTOR_RECURSE, vector_size, in, istride, out, ostride); node = fftw_make_node_rgeneric(n, size, dir, codelet, r->root, flags); newplan = fftw_make_plan(n, dir, node, flags, FFTW_RGENERIC, 0, FFTW_NORMAL_RECURSE, vector_size); fftw_use_plan(newplan); run_plan_hooks(newplan); fftw_destroy_plan_internal(r); rcompute_cost(newplan, in, istride, out, ostride); best = fftw_pick_better(newplan, best); } } return best; } static fftw_plan rplanner(fftw_plan *table, int n, fftw_direction dir, int flags, int vector_size, fftw_real *in, int istride, fftw_real *out, int ostride) { fftw_plan best = (fftw_plan) 0; if (vector_size > 1) flags |= FFTW_NO_VECTOR_RECURSE; /* see if plan has already been computed */ best = fftw_lookup(table, n, flags, vector_size); if (best) { fftw_use_plan(best); return best; } /* try a wise plan */ best = rplanner_wisdom(table, n, dir, flags, vector_size, in, istride, out, ostride); if (!best) { /* No wisdom. Plan normally. */ best = rplanner_normal(table, n, dir, flags, vector_size, in, istride, out, ostride); } if (best) { fftw_insert(table, best); /* remember the wisdom */ fftw_wisdom_add(n, flags, dir, RFFTW_WISDOM, istride, ostride, best->wisdom_type, best->wisdom_signature, best->recurse_kind); } return best; } fftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride) { fftw_plan table; fftw_plan p1; /* validate parameters */ if (n <= 0) return (fftw_plan) 0; #ifndef FFTW_ENABLE_VECTOR_RECURSE /* TEMPORARY: disable vector recursion until it is more tested. */ flags |= FFTW_NO_VECTOR_RECURSE; #endif if ((dir != FFTW_FORWARD) && (dir != FFTW_BACKWARD)) return (fftw_plan) 0; fftw_make_empty_table(&table); p1 = rplanner(&table, n, dir, flags, 1, in, istride, out, ostride); fftw_destroy_table(&table); if (p1) fftw_complete_twiddle(p1->root, n); return p1; } fftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags) { fftw_real *tmp_in; fftw_real *tmp_out; fftw_plan p; if (flags & FFTW_MEASURE) { tmp_in = (fftw_real *) fftw_malloc(2 * n * sizeof(fftw_real)); if (!tmp_in) return 0; tmp_out = tmp_in + n; p = rfftw_create_plan_specific(n, dir, flags, tmp_in, 1, tmp_out, 1); fftw_free(tmp_in); } else p = rfftw_create_plan_specific(n, dir, flags, (fftw_real *) 0, 1, (fftw_real *) 0, 1); return p; } void rfftw_destroy_plan(fftw_plan plan) { fftw_destroy_plan_internal(plan); } void rfftw_fprint_plan(FILE *f, fftw_plan p) { fftw_fprint_plan(f, p); } void rfftw_print_plan(fftw_plan p) { rfftw_fprint_plan(stdout, p); } �����������������������fftw-2.1.5/rfftw/rexec.c����������������������������������������������������������������������������0000644�0001754�0000144�00000032306�07635206062�010562� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * rexec.c -- execute the fft */ /* $Id: rexec.c,v 1.28 2003/03/16 23:43:46 stevenj Exp $ */ #include #include #include "fftw-int.h" #include "rfftw.h" void rfftw_strided_copy(int n, fftw_real *in, int ostride, fftw_real *out) { int i; fftw_real r0, r1, r2, r3; i = 0; for (; i < (n & 3); ++i) { out[i * ostride] = in[i]; } for (; i < n; i += 4) { r0 = in[i]; r1 = in[i + 1]; r2 = in[i + 2]; r3 = in[i + 3]; out[i * ostride] = r0; out[(i + 1) * ostride] = r1; out[(i + 2) * ostride] = r2; out[(i + 3) * ostride] = r3; } } static void rexecutor_many(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist, fftw_recurse_kind recurse_kind) { int s; switch (p->type) { case FFTW_REAL2HC: { fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, out + n * ostride + s * odist, istride, ostride, -ostride); break; } case FFTW_HC2REAL: { fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + n * istride + s * idist, out + s * odist, istride, -istride, ostride); break; } default: for (s = 0; s < howmany; ++s) rfftw_executor_simple(n, in + s * idist, out + s * odist, p, istride, ostride, recurse_kind); } } #ifdef FFTW_ENABLE_VECTOR_RECURSE /* rexecutor_many_vector is like rexecutor_many, but it pushes the howmany loop down to the leaves of the transform: */ static void rexecutor_many_vector(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist) { switch (p->type) { case FFTW_REAL2HC: { fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; int s; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, out + n * ostride + s * odist, istride, ostride, -ostride); break; } case FFTW_HC2REAL: { fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; int s; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + n * istride + s * idist, out + s * odist, istride, -istride, ostride); break; } case FFTW_HC2HC: { int r = p->nodeu.hc2hc.size; int m = n / r; int i; fftw_hc2hc_codelet *codelet; fftw_complex *W; switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: for (i = 0; i < r; ++i) rexecutor_many_vector(m, in + i * istride, out + i * (m*ostride), p->nodeu.hc2hc.recurse, istride * r, ostride, howmany, idist, odist); W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; for (i = 0; i < howmany; ++i) codelet(out + i * odist, W, m * ostride, m, ostride); break; case FFTW_COMPLEX_TO_REAL: W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; for (i = 0; i < howmany; ++i) codelet(in + i * idist, W, m * istride, m, istride); for (i = 0; i < r; ++i) rexecutor_many_vector(m, in + i * (m*istride), out + i * ostride, p->nodeu.hc2hc.recurse, istride, ostride * r, howmany, idist, odist); break; default: goto bug; } break; } case FFTW_RGENERIC: { int r = p->nodeu.rgeneric.size; int m = n / r; int i; fftw_rgeneric_codelet *codelet = p->nodeu.rgeneric.codelet; fftw_complex *W = p->nodeu.rgeneric.tw->twarray; switch (p->nodeu.rgeneric.dir) { case FFTW_REAL_TO_COMPLEX: for (i = 0; i < r; ++i) rexecutor_many_vector(m, in + i * istride, out + i * (m * ostride), p->nodeu.rgeneric.recurse, istride * r, ostride, howmany, idist, odist); for (i = 0; i < howmany; ++i) codelet(out + i * odist, W, m, r, n, ostride); break; case FFTW_COMPLEX_TO_REAL: for (i = 0; i < howmany; ++i) codelet(in + i * idist, W, m, r, n, istride); for (i = 0; i < r; ++i) rexecutor_many_vector(m, in + i * m * istride, out + i * ostride, p->nodeu.rgeneric.recurse, istride, ostride * r, howmany, idist, odist); break; default: goto bug; } break; } default: bug: fftw_die("BUG in rexecutor: invalid plan\n"); break; } } #endif /* FFTW_ENABLE_VECTOR_RECURSE */ void rfftw_executor_simple(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_REAL2HC: HACK_ALIGN_STACK_ODD; (p->nodeu.real2hc.codelet) (in, out, out + n * ostride, istride, ostride, -ostride); break; case FFTW_HC2REAL: HACK_ALIGN_STACK_ODD; (p->nodeu.hc2real.codelet) (in, in + n * istride, out, istride, -istride, ostride); break; case FFTW_HC2HC: { int r = p->nodeu.hc2hc.size; int m = n / r; /* * please do resist the temptation of initializing * these variables here. Doing so forces the * compiler to keep a live variable across the * recursive call. */ fftw_hc2hc_codelet *codelet; fftw_complex *W; switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif rexecutor_many(m, in, out, p->nodeu.hc2hc.recurse, istride * r, ostride, r, istride, m * ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else rexecutor_many_vector(m, in, out, p->nodeu.hc2hc.recurse, istride * r, ostride, r, istride, m * ostride); #endif W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(out, W, m * ostride, m, ostride); break; case FFTW_COMPLEX_TO_REAL: W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(in, W, m * istride, m, istride); #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif rexecutor_many(m, in, out, p->nodeu.hc2hc.recurse, istride, ostride * r, r, m * istride, ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else rexecutor_many_vector(m, in, out, p->nodeu.hc2hc.recurse, istride, ostride * r, r, m * istride, ostride); #endif break; default: goto bug; } break; } case FFTW_RGENERIC: { int r = p->nodeu.rgeneric.size; int m = n / r; fftw_rgeneric_codelet *codelet = p->nodeu.rgeneric.codelet; fftw_complex *W = p->nodeu.rgeneric.tw->twarray; switch (p->nodeu.rgeneric.dir) { case FFTW_REAL_TO_COMPLEX: #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif rexecutor_many(m, in, out, p->nodeu.rgeneric.recurse, istride * r, ostride, r, istride, m * ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else rexecutor_many_vector(m, in, out, p->nodeu.rgeneric.recurse, istride * r, ostride, r, istride, m * ostride); #endif codelet(out, W, m, r, n, ostride); break; case FFTW_COMPLEX_TO_REAL: codelet(in, W, m, r, n, istride); #ifdef FFTW_ENABLE_VECTOR_RECURSE if (recurse_kind == FFTW_NORMAL_RECURSE) #endif rexecutor_many(m, in, out, p->nodeu.rgeneric.recurse, istride, ostride * r, r, m * istride, ostride, FFTW_NORMAL_RECURSE); #ifdef FFTW_ENABLE_VECTOR_RECURSE else rexecutor_many_vector(m, in, out, p->nodeu.rgeneric.recurse, istride, ostride * r, r, m * istride, ostride); #endif break; default: goto bug; } break; } default: bug: fftw_die("BUG in rexecutor: invalid plan\n"); break; } } static void rexecutor_simple_inplace(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_REAL2HC: HACK_ALIGN_STACK_ODD; (p->nodeu.real2hc.codelet) (in, in, in + n * istride, istride, istride, -istride); break; case FFTW_HC2REAL: HACK_ALIGN_STACK_ODD; (p->nodeu.hc2real.codelet) (in, in + n * istride, in, istride, -istride, istride); break; default: { fftw_real *tmp; if (out) tmp = out; else tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); rfftw_executor_simple(n, in, tmp, p, istride, 1, recurse_kind); rfftw_strided_copy(n, tmp, istride, in); if (!out) fftw_free(tmp); } } } static void rexecutor_many_inplace(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int howmany, int idist, fftw_recurse_kind recurse_kind) { switch (p->type) { case FFTW_REAL2HC: { fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; int s; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + s * idist, in + n * istride + s * idist, istride, istride, -istride); break; } case FFTW_HC2REAL: { fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; int s; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + n * istride + s * idist, in + s * idist, istride, -istride, istride); break; } default: { int s; fftw_real *tmp; if (out) tmp = out; else tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); for (s = 0; s < howmany; ++s) { rfftw_executor_simple(n, in + s * idist, tmp, p, istride, 1, recurse_kind); rfftw_strided_copy(n, tmp, istride, in + s * idist); } if (!out) fftw_free(tmp); } } } /* user interface */ void rfftw(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) { if (howmany == 1) { rexecutor_simple_inplace(n, in, out, plan->root, istride, plan->recurse_kind); } else { rexecutor_many_inplace(n, in, out, plan->root, istride, howmany, idist, plan->recurse_kind); } } else { if (howmany == 1) { rfftw_executor_simple(n, in, out, plan->root, istride, ostride, plan->recurse_kind); } else { #ifdef FFTW_ENABLE_VECTOR_RECURSE int vector_size = plan->vector_size; if (vector_size <= 1) #endif rexecutor_many(n, in, out, plan->root, istride, ostride, howmany, idist, odist, plan->recurse_kind); #ifdef FFTW_ENABLE_VECTOR_RECURSE else { int s; int num_vects = howmany / vector_size; fftw_plan_node *root = plan->root; for (s = 0; s < num_vects; ++s) rexecutor_many_vector(n, in + s * (vector_size * idist), out + s * (vector_size * odist), root, istride, ostride, vector_size, idist, odist); s = howmany % vector_size; if (s > 0) rexecutor_many(n, in + num_vects * (vector_size*idist), out + num_vects * (vector_size*odist), root, istride, ostride, s, idist, odist, FFTW_NORMAL_RECURSE); } #endif } } } void rfftw_one(fftw_plan plan, fftw_real *in, fftw_real *out) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) rexecutor_simple_inplace(n, in, out, plan->root, 1, plan->recurse_kind); else rfftw_executor_simple(n, in, out, plan->root, 1, 1, plan->recurse_kind); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rexec2.c���������������������������������������������������������������������������0000644�0001754�0000144�00000014501�07635206062�010641� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* $Id: rexec2.c,v 1.20 2003/03/16 23:43:46 stevenj Exp $ */ /* * rexec2.c -- alternate rfftw executor, specifically designed for the * multidimensional transforms. Given an extra work array, * expects complex data in FFTW_COMPLEX format, and does * not destroy the input in hc2real transforms. */ #include "fftw-int.h" #include "rfftw.h" /* copies halfcomplex array in (contiguous) to fftw_complex array out. */ void rfftw_hc2c(int n, fftw_real *in, fftw_complex *out, int ostride) { int n2 = (n + 1) / 2; int i = 1; c_re(out[0]) = in[0]; c_im(out[0]) = 0.0; for (; i < ((n2 - 1) & 3) + 1; ++i) { c_re(out[i * ostride]) = in[i]; c_im(out[i * ostride]) = in[n - i]; } for (; i < n2; i += 4) { fftw_real r0, r1, r2, r3; fftw_real i0, i1, i2, i3; r0 = in[i]; r1 = in[i + 1]; r2 = in[i + 2]; r3 = in[i + 3]; i3 = in[n - (i + 3)]; i2 = in[n - (i + 2)]; i1 = in[n - (i + 1)]; i0 = in[n - i]; c_re(out[i * ostride]) = r0; c_im(out[i * ostride]) = i0; c_re(out[(i + 1) * ostride]) = r1; c_im(out[(i + 1) * ostride]) = i1; c_re(out[(i + 2) * ostride]) = r2; c_im(out[(i + 2) * ostride]) = i2; c_re(out[(i + 3) * ostride]) = r3; c_im(out[(i + 3) * ostride]) = i3; } if ((n & 1) == 0) { /* store the Nyquist frequency */ c_re(out[n2 * ostride]) = in[n2]; c_im(out[n2 * ostride]) = 0.0; } } /* reverse of rfftw_hc2c */ void rfftw_c2hc(int n, fftw_complex *in, int istride, fftw_real *out) { int n2 = (n + 1) / 2; int i = 1; out[0] = c_re(in[0]); for (; i < ((n2 - 1) & 3) + 1; ++i) { out[i] = c_re(in[i * istride]); out[n - i] = c_im(in[i * istride]); } for (; i < n2; i += 4) { fftw_real r0, r1, r2, r3; fftw_real i0, i1, i2, i3; r0 = c_re(in[i * istride]); i0 = c_im(in[i * istride]); r1 = c_re(in[(i + 1) * istride]); i1 = c_im(in[(i + 1) * istride]); r2 = c_re(in[(i + 2) * istride]); i2 = c_im(in[(i + 2) * istride]); r3 = c_re(in[(i + 3) * istride]); i3 = c_im(in[(i + 3) * istride]); out[i] = r0; out[i + 1] = r1; out[i + 2] = r2; out[i + 3] = r3; out[n - (i + 3)] = i3; out[n - (i + 2)] = i2; out[n - (i + 1)] = i1; out[n - i] = i0; } if ((n & 1) == 0) /* store the Nyquist frequency */ out[n2] = c_re(in[n2 * istride]); } /* * in: array of n real numbers (* howmany). * out: array of n/2 + 1 complex numbers (* howmany). * work: array of n real numbers (stride 1) * * We must have out != in if dist < stride. */ void rfftw_real2c_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work) { fftw_plan_node *p = plan->root; int j; switch (p->type) { case FFTW_REAL2HC: { fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; int n = plan->n; int n2 = (n & 1) ? 0 : (n + 1) / 2; HACK_ALIGN_STACK_ODD; for (j = 0; j < howmany; ++j, out += odist) { codelet(in + j * idist, &c_re(*out), &c_im(*out), istride, ostride * 2, ostride * 2); c_im(out[0]) = 0.0; c_im(out[n2 * ostride]) = 0.0; } break; } default: { int n = plan->n; fftw_recurse_kind recurse_kind = plan->recurse_kind; for (j = 0; j < howmany; ++j, in += idist, out += odist) { rfftw_executor_simple(n, in, work, p, istride, 1, recurse_kind); rfftw_hc2c(n, work, out, ostride); } break; } } } /* * in: array of n/2 + 1 complex numbers (* howmany). * out: array of n real numbers (* howmany). * work: array of n real numbers (stride 1) * * We must have out != in if dist < stride. */ void rfftw_c2real_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work) { fftw_plan_node *p = plan->root; switch (p->type) { case FFTW_HC2REAL: { fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; int j; HACK_ALIGN_STACK_ODD; for (j = 0; j < howmany; ++j) codelet(&c_re(*(in + j * idist)), &c_im(*(in + j * idist)), out + j * odist, istride * 2, istride * 2, ostride); break; } default: { int j, n = plan->n; fftw_recurse_kind recurse_kind = plan->recurse_kind; for (j = 0; j < howmany; ++j, in += idist, out += odist) { rfftw_c2hc(n, in, istride, work); rfftw_executor_simple(n, work, out, p, 1, ostride, recurse_kind); } break; } } } /* * The following two functions are similar to the ones above, BUT: * * work must contain n * howmany elements (stride 1) * * Can handle out == in for any stride/dist. */ void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work) { int n = plan->n; int j; rfftw(plan, howmany, in, istride, idist, work, 1, n); /* copy from work to out: */ for (j = 0; j < howmany; ++j, work += n, out += odist) rfftw_hc2c(n, work, out, ostride); } void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work) { int n = plan->n; int j; /* copy from in to work: */ for (j = 0; j < howmany; ++j, in += idist) rfftw_c2hc(n, in, istride, work + j * n); rfftw(plan, howmany, work, 1, n, out, ostride, odist); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rfftwnd.c��������������������������������������������������������������������������0000644�0001754�0000144�00000040464�07635206062�011132� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* $Id: rfftwnd.c,v 1.35 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include "rfftw.h" /********************** prototypes for rexec2 routines **********************/ extern void rfftw_real2c_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); extern void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); /********************** Initializing the RFFTWND Plan ***********************/ /* * Create an fftwnd_plan specialized for specific arrays. (These * arrays are ignored, however, if they are NULL or if the flags * do not include FFTW_MEASURE.) The main advantage of being * provided arrays like this is that we can do runtime timing * measurements of our options, without worrying about allocating * excessive scratch space. */ fftwnd_plan rfftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride) { fftwnd_plan p; int i; int rflags = flags & ~FFTW_IN_PLACE; /* note that we always do rfftw transforms out-of-place in rexec2.c */ if (flags & FFTW_IN_PLACE) { out = NULL; ostride = istride; } istride = ostride = 1; /* * strides don't work yet, since it is not * clear whether they apply to real * or complex data */ if (!(p = fftwnd_create_plan_aux(rank, n, dir, flags))) return 0; for (i = 0; i < rank - 1; ++i) p->n_after[i] = (n[rank - 1]/2 + 1) * (p->n_after[i] / n[rank - 1]); if (rank > 0) p->n[rank - 1] = n[rank - 1] / 2 + 1; p->plans = fftwnd_new_plan_array(rank); if (rank > 0 && !p->plans) { rfftwnd_destroy_plan(p); return 0; } if (rank > 0) { p->plans[rank - 1] = rfftw_create_plan(n[rank - 1], dir, rflags); if (!p->plans[rank - 1]) { rfftwnd_destroy_plan(p); return 0; } } if (rank > 1) { if (!(flags & FFTW_MEASURE) || in == 0 || (!p->is_in_place && out == 0)) { if (!fftwnd_create_plans_generic(p->plans, rank - 1, n, dir, flags | FFTW_IN_PLACE)) { rfftwnd_destroy_plan(p); return 0; } } else if (dir == FFTW_COMPLEX_TO_REAL || (flags & FFTW_IN_PLACE)) { if (!fftwnd_create_plans_specific(p->plans, rank - 1, n, p->n_after, dir, flags | FFTW_IN_PLACE, (fftw_complex *) in, istride, 0, 0)) { rfftwnd_destroy_plan(p); return 0; } } else { if (!fftwnd_create_plans_specific(p->plans, rank - 1, n, p->n_after, dir, flags | FFTW_IN_PLACE, (fftw_complex *) out, ostride, 0, 0)) { rfftwnd_destroy_plan(p); return 0; } } } p->nbuffers = 0; p->nwork = fftwnd_work_size(rank, p->n, flags | FFTW_IN_PLACE, p->nbuffers + 1); if (p->nwork && !(flags & FFTW_THREADSAFE)) { p->work = (fftw_complex *) fftw_malloc(p->nwork * sizeof(fftw_complex)); if (!p->work) { rfftwnd_destroy_plan(p); return 0; } } return p; } fftwnd_plan rfftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride) { int n[2]; n[0] = nx; n[1] = ny; return rfftwnd_create_plan_specific(2, n, dir, flags, in, istride, out, ostride); } fftwnd_plan rfftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride) { int n[3]; n[0] = nx; n[1] = ny; n[2] = nz; return rfftwnd_create_plan_specific(3, n, dir, flags, in, istride, out, ostride); } /* Create a generic fftwnd plan: */ fftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags) { return rfftwnd_create_plan_specific(rank, n, dir, flags, 0, 1, 0, 1); } fftwnd_plan rfftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags) { return rfftw2d_create_plan_specific(nx, ny, dir, flags, 0, 1, 0, 1); } fftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags) { return rfftw3d_create_plan_specific(nx, ny, nz, dir, flags, 0, 1, 0, 1); } /************************ Freeing the RFFTWND Plan ************************/ void rfftwnd_destroy_plan(fftwnd_plan plan) { fftwnd_destroy_plan(plan); } /************************ Printing the RFFTWND Plan ************************/ void rfftwnd_fprint_plan(FILE *f, fftwnd_plan plan) { fftwnd_fprint_plan(f, plan); } void rfftwnd_print_plan(fftwnd_plan plan) { rfftwnd_fprint_plan(stdout, plan); } /*********** Computing the N-Dimensional FFT: Auxiliary Routines ************/ void rfftwnd_real2c_aux(fftwnd_plan p, int cur_dim, fftw_real *in, int istride, fftw_complex *out, int ostride, fftw_real *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) rfftw_real2c_aux(p->plans[p->rank - 1], n, in, istride, (n_after * istride) * 2, out, istride, n_after * istride, work); else rfftw_real2c_aux(p->plans[p->rank - 1], n, in, istride, p->plans[p->rank - 1]->n * istride, out, ostride, n_after * ostride, work); } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); int i; /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ for (i = 0; i < n; ++i) rfftwnd_real2c_aux(p, cur_dim + 1, in + i * n_after_r * istride, istride, out + i * n_after * ostride, ostride, work); } /* do the current dimension (in-place): */ fftw(p->plans[cur_dim], n_after, out, n_after * ostride, ostride, (fftw_complex *) work, 1, 0); /* I hate this cast */ } void rfftwnd_c2real_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_real *out, int ostride, fftw_real *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; /* do the current dimension (in-place): */ fftw(p->plans[cur_dim], n_after, in, n_after * istride, istride, (fftw_complex *) work, 1, 0); if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) rfftw_c2real_aux(p->plans[p->rank - 1], n, in, istride, n_after * istride, out, istride, (n_after * istride) * 2, work); else rfftw_c2real_aux(p->plans[p->rank - 1], n, in, istride, n_after * istride, out, ostride, p->plans[p->rank - 1]->n * ostride, work); } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); int i; /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ for (i = 0; i < n; ++i) rfftwnd_c2real_aux(p, cur_dim + 1, in + i * n_after * istride, istride, out + i * n_after_r * ostride, ostride, work); } } /* * alternate version of rfftwnd_aux -- this version pushes the howmany * loop down to the leaves of the computation, for greater locality * in cases where dist < stride. It is also required for correctness * if in==out, and we must call a special version of the executor. * Note that work must point to 'howmany' copies of its data * if in == out. */ void rfftwnd_real2c_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; int k; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) for (k = 0; k < n; ++k) rfftw_real2c_overlap_aux(p->plans[p->rank - 1], howmany, in + (k * n_after * istride) * 2, istride, idist, out + (k * n_after * ostride), ostride, odist, (fftw_real *) work); else { int nlast = p->plans[p->rank - 1]->n; for (k = 0; k < n; ++k) rfftw_real2c_aux(p->plans[p->rank - 1], howmany, in + k * nlast * istride, istride, idist, out + k * n_after * ostride, ostride, odist, (fftw_real *) work); } } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); int i; /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ for (i = 0; i < n; ++i) rfftwnd_real2c_aux_howmany(p, cur_dim + 1, howmany, in + i * n_after_r * istride, istride, idist, out + i * n_after * ostride, ostride, odist, work); } /* do the current dimension (in-place): */ for (k = 0; k < n_after; ++k) fftw(p->plans[cur_dim], howmany, out + k * ostride, n_after * ostride, odist, work, 1, 0); } void rfftwnd_c2real_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_complex *work) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; int k; /* do the current dimension (in-place): */ for (k = 0; k < n_after; ++k) fftw(p->plans[cur_dim], howmany, in + k * istride, n_after * istride, idist, work, 1, 0); if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) for (k = 0; k < n; ++k) rfftw_c2real_overlap_aux(p->plans[p->rank - 1], howmany, in + (k * n_after * istride), istride, idist, out + (k * n_after * ostride) * 2, ostride, odist, (fftw_real *) work); else { int nlast = p->plans[p->rank - 1]->n; for (k = 0; k < n; ++k) rfftw_c2real_aux(p->plans[p->rank - 1], howmany, in + k * n_after * istride, istride, idist, out + k * nlast * ostride, ostride, odist, (fftw_real *) work); } } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); int i; /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ for (i = 0; i < n; ++i) rfftwnd_c2real_aux_howmany(p, cur_dim + 1, howmany, in + i * n_after * istride, istride, idist, out + i * n_after_r * ostride, ostride, odist, work); } } /********** Computing the N-Dimensional FFT: User-Visible Routines **********/ void rfftwnd_real_to_complex(fftwnd_plan p, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { fftw_complex *work = p->work; int rank = p->rank; int free_work = 0; if (p->dir != FFTW_REAL_TO_COMPLEX) fftw_die("rfftwnd_real_to_complex with complex-to-real plan"); #ifdef FFTW_DEBUG if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) && p->nwork && p->work) fftw_die("bug with FFTW_THREADSAFE flag"); #endif if (p->is_in_place) { ostride = istride; odist = (idist == 1 && idist < istride) ? 1 : (idist / 2); /* ugh */ out = (fftw_complex *) in; if (howmany > 1 && istride > idist && rank > 0) { int new_nwork; new_nwork = p->n[rank - 1] * howmany; if (new_nwork > p->nwork) { work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * new_nwork); if (!work) fftw_die("error allocating work array"); free_work = 1; } } } if (p->nwork && !work) { work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * p->nwork); free_work = 1; } switch (rank) { case 0: break; case 1: if (p->is_in_place && howmany > 1 && istride > idist) rfftw_real2c_overlap_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work); else rfftw_real2c_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work); break; default: /* rank >= 2 */ { if (howmany > 1 && ostride > odist) rfftwnd_real2c_aux_howmany(p, 0, howmany, in, istride, idist, out, ostride, odist, work); else { int i; for (i = 0; i < howmany; ++i) rfftwnd_real2c_aux(p, 0, in + i * idist, istride, out + i * odist, ostride, (fftw_real *) work); } } } if (free_work) fftw_free(work); } void rfftwnd_complex_to_real(fftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist) { fftw_complex *work = p->work; int rank = p->rank; int free_work = 0; if (p->dir != FFTW_COMPLEX_TO_REAL) fftw_die("rfftwnd_complex_to_real with real-to-complex plan"); #ifdef FFTW_DEBUG if (p->rank > 0 && (p->plans[0]->flags & FFTW_THREADSAFE) && p->nwork && p->work) fftw_die("bug with FFTW_THREADSAFE flag"); #endif if (p->is_in_place) { ostride = istride; odist = idist; odist = (idist == 1 && idist < istride) ? 1 : (idist * 2); /* ugh */ out = (fftw_real *) in; if (howmany > 1 && istride > idist && rank > 0) { int new_nwork = p->n[rank - 1] * howmany; if (new_nwork > p->nwork) { work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * new_nwork); if (!work) fftw_die("error allocating work array"); free_work = 1; } } } if (p->nwork && !work) { work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * p->nwork); free_work = 1; } switch (rank) { case 0: break; case 1: if (p->is_in_place && howmany > 1 && istride > idist) rfftw_c2real_overlap_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work); else rfftw_c2real_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work); break; default: /* rank >= 2 */ { if (howmany > 1 && ostride > odist) rfftwnd_c2real_aux_howmany(p, 0, howmany, in, istride, idist, out, ostride, odist, work); else { int i; for (i = 0; i < howmany; ++i) rfftwnd_c2real_aux(p, 0, in + i * idist, istride, out + i * odist, ostride, (fftw_real *) work); } } } if (free_work) fftw_free(work); } void rfftwnd_one_real_to_complex(fftwnd_plan p, fftw_real *in, fftw_complex *out) { rfftwnd_real_to_complex(p, 1, in, 1, 1, out, 1, 1); } void rfftwnd_one_complex_to_real(fftwnd_plan p, fftw_complex *in, fftw_real *out) { rfftwnd_complex_to_real(p, 1, in, 1, 1, out, 1, 1); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rgeneric.c�������������������������������������������������������������������������0000644�0001754�0000144�00000012164�07635206027�011253� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * rgeneric.c -- "generic" rfftw codelets. They work for all n (and * they are slow) */ #include "fftw-int.h" #include "rfftw.h" /* this code assumes that r and m are both odd */ void fftw_hc2hc_forward_generic(fftw_real *A, const fftw_complex *W, int m, int r, int n, int dist) { int i, j, k; fftw_complex *tmp = (fftw_complex *) fftw_malloc(r * sizeof(fftw_complex)); fftw_real rsum, isum; fftw_real *X, *YO, *YI; int wp, wincr; int iostride = m * dist; X = A; YO = A + r * iostride; YI = A + iostride; /* compute the transform of the r 0th elements (which are real) */ for (i = 0; i + i < r; ++i) { rsum = 0.0; isum = 0.0; wincr = m * i; for (j = 0, wp = 0; j < r; ++j) { fftw_real tw_r = c_re(W[wp]); fftw_real tw_i = c_im(W[wp]); fftw_real re = X[j * iostride]; rsum += re * tw_r; isum += re * tw_i; wp += wincr; if (wp >= n) wp -= n; } c_re(tmp[i]) = rsum; c_im(tmp[i]) = isum; } /* store the transform back onto the A array */ X[0] = c_re(tmp[0]); for (i = 1; i + i < r; ++i) { X[i * iostride] = c_re(tmp[i]); YO[-i * iostride] = c_im(tmp[i]); } X += dist; YI -= dist; YO -= dist; /* compute the transform of the middle elements (which are complex) */ for (k = 1; k + k < m; ++k, X += dist, YI -= dist, YO -= dist) { for (i = 0; i < r; ++i) { rsum = 0.0; isum = 0.0; wincr = k + m * i; for (j = 0, wp = 0; j < r; ++j) { fftw_real tw_r = c_re(W[wp]); fftw_real tw_i = c_im(W[wp]); fftw_real re = X[j * iostride]; fftw_real im = YI[j * iostride]; rsum += re * tw_r - im * tw_i; isum += re * tw_i + im * tw_r; wp += wincr; if (wp >= n) wp -= n; } c_re(tmp[i]) = rsum; c_im(tmp[i]) = isum; } /* store the transform back onto the A array */ for (i = 0; i + i < r; ++i) { X[i * iostride] = c_re(tmp[i]); YO[-i * iostride] = c_im(tmp[i]); } for (; i < r; ++i) { X[i * iostride] = -c_im(tmp[i]); YO[-i * iostride] = c_re(tmp[i]); } } /* no final element, since m is odd */ fftw_free(tmp); } void fftw_hc2hc_backward_generic(fftw_real *A, const fftw_complex *W, int m, int r, int n, int dist) { int i, j, k; int wp, wincr; fftw_complex *tmp = (fftw_complex *) fftw_malloc(r * sizeof(fftw_complex)); fftw_real rsum, isum; fftw_real *X, *YO, *YI; int iostride = m * dist; X = A; YO = A + iostride; YI = A + r * iostride; /* * compute the transform of the r 0th elements (which are halfcomplex) * yielding real numbers */ /* copy the input into the temporary array */ c_re(tmp[0]) = X[0]; for (i = 1; i + i < r; ++i) { c_re(tmp[i]) = X[i * iostride]; c_im(tmp[i]) = YI[-i * iostride]; } for (i = 0; i < r; ++i) { rsum = 0.0; wincr = m * i; for (j = 1, wp = wincr; j + j < r; ++j) { fftw_real tw_r = c_re(W[wp]); fftw_real tw_i = c_im(W[wp]); fftw_real re = c_re(tmp[j]); fftw_real im = c_im(tmp[j]); rsum += re * tw_r + im * tw_i; wp += wincr; if (wp >= n) wp -= n; } X[i * iostride] = 2.0 * rsum + c_re(tmp[0]); } X += dist; YI -= dist; YO -= dist; /* compute the transform of the middle elements (which are complex) */ for (k = 1; k + k < m; ++k, X += dist, YI -= dist, YO -= dist) { /* copy the input into the temporary array */ for (i = 0; i + i < r; ++i) { c_re(tmp[i]) = X[i * iostride]; c_im(tmp[i]) = YI[-i * iostride]; } for (; i < r; ++i) { c_im(tmp[i]) = -X[i * iostride]; c_re(tmp[i]) = YI[-i * iostride]; } for (i = 0; i < r; ++i) { rsum = 0.0; isum = 0.0; wincr = m * i; for (j = 0, wp = k * i; j < r; ++j) { fftw_real tw_r = c_re(W[wp]); fftw_real tw_i = c_im(W[wp]); fftw_real re = c_re(tmp[j]); fftw_real im = c_im(tmp[j]); rsum += re * tw_r + im * tw_i; isum += im * tw_r - re * tw_i; wp += wincr; if (wp >= n) wp -= n; } X[i * iostride] = rsum; YO[i * iostride] = isum; } } /* no final element, since m is odd */ fftw_free(tmp); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/rfftw/rfftwf77.c�������������������������������������������������������������������������0000644�0001754�0000144�00000007746�07635543251�011146� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "rfftw.h" #include "config.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ /* rfftwf77.c: FORTRAN-callable "wrappers" for some of the RFFTW routines. See also fftwf77.c. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ void F77_FUNC_(rfftw_f77_create_plan,RFFTW_F77_CREATE_PLAN) (fftw_plan *p, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = rfftw_create_plan(*n,dir,*flags); } void F77_FUNC_(rfftw_f77_destroy_plan,RFFTW_F77_DESTROY_PLAN) (fftw_plan *p) { rfftw_destroy_plan(*p); } void F77_FUNC_(rfftw_f77,RFFTW_F77) (fftw_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, fftw_real *out, int *ostride, int *odist) { rfftw(*p,*howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(rfftw_f77_one,RFFTW_F77_ONE) (fftw_plan *p, fftw_real *in, fftw_real *out) { rfftw_one(*p,in,out); } extern void fftw_reverse_int_array(int *a, int n); void F77_FUNC_(rfftwnd_f77_create_plan,RFFTWND_F77_CREATE_PLAN) (fftwnd_plan *p, int *rank, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; fftw_reverse_int_array(n,*rank); /* column-major -> row-major */ *p = rfftwnd_create_plan(*rank,n,dir,*flags); fftw_reverse_int_array(n,*rank); /* reverse back */ } void F77_FUNC_(rfftw2d_f77_create_plan,RFFTW2D_F77_CREATE_PLAN) (fftwnd_plan *p, int *nx, int *ny, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = rfftw2d_create_plan(*ny,*nx,dir,*flags); } void F77_FUNC_(rfftw3d_f77_create_plan,RFFTW3D_F77_CREATE_PLAN) (fftwnd_plan *p, int *nx, int *ny, int *nz, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = rfftw3d_create_plan(*nz,*ny,*nx,dir,*flags); } void F77_FUNC_(rfftwnd_f77_destroy_plan,RFFTWND_F77_DESTROY_PLAN) (fftwnd_plan *p) { rfftwnd_destroy_plan(*p); } void F77_FUNC_(rfftwnd_f77_real_to_complex,RFFTWND_F77_REAL_TO_COMPLEX) (fftwnd_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { rfftwnd_real_to_complex(*p,*howmany,in,*istride,*idist, out,*ostride,*odist); } void F77_FUNC_(rfftwnd_f77_one_real_to_complex,RFFTWND_F77_ONE_REAL_TO_COMPLEX) (fftwnd_plan *p, fftw_real *in, fftw_complex *out) { rfftwnd_one_real_to_complex(*p,in,out); } void F77_FUNC_(rfftwnd_f77_complex_to_real,RFFTWND_F77_COMPLEX_TO_REAL) (fftwnd_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_real *out, int *ostride, int *odist) { rfftwnd_complex_to_real(*p,*howmany,in,*istride,*idist, out,*ostride,*odist); } void F77_FUNC_(rfftwnd_f77_one_complex_to_real,RFFTWND_F77_ONE_COMPLEX_TO_REAL) (fftwnd_plan *p, fftw_complex *in, fftw_real *out) { rfftwnd_one_complex_to_real(*p,in,out); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ ��������������������������fftw-2.1.5/tests/�����������������������������������������������������������������������������������0002777�0001754�0000144�00000000000�07637531660�007413� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/README�����������������������������������������������������������������������������0000644�0001754�0000144�00000007041�07635206027�010201� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This directory contains a test program, fftw_test, for the one- and multi-dimensional transforms. There is also a corresponding program, rfftw_test, for the real-complex transforms, which takes the same command-line options as fftw_test. (See the FFTW manual for compilation instructions.) They take a number of command-line options that determine what to tests. (On systems lacking a command-line, they will prompt the user interactively for this information.) We use the following conventions. is a size parameter, and it has the form N1xN2xN3... . For example, 3x8 denotes a two-dimensional array with 3 rows and 8 columns. A single number N denotes a 1D transform of size N. For the cases where it matters, the syntax xN denotes a ND-transform of rank 1. For example, x5 denotes a n-dimensional array of rank 1 with 5 elements. (This matters for real->complex transforms) is an integer. Rank 0 denotes 1D transforms. Rank >= 1 denotes n-dimensional transforms. Again, rank 0 uses [R]FFTW, but rank >= 1 uses [R]FFTWND. -r Tests the forward and backward transforms of random dimensions and sizes. Does not terminate (press ^C when you are tired). We use the FFT testing algorithm described in: Funda Ergün, "Testing multivariate linear functions: Overcoming the generator bottleneck." Proceedings of the Twenty-Seventh Annual ACM Symposium on the Theory of Computing, pp. 407-416 (1995). -c Checks the forward and backward transform of size -s Test the speed of the transform of size Times both in-place and out-of-place transforms. -a Like fftw_test -c for all n = 1 ... infinity. Does not terminate (press ^C when you are tired) -p Exercises the planner to make sure there are no memory leaks. -m Uses the FFTW_MEASURE flag (instead of FFTW_ESTIMATE) during correctness tests (this will slow things down considerably). -w Tests the "wisdom" mechanism (wisdom is used in all transforms computed...this option should precede one of the other options above). Also, loads wisdom from and stores accumulated wisdom in (after tests are completed). ( is created if it does not exist.) -t Tests the resolution of the timer you are currently using. This is done by measuring the time per iteration of a simple loop--the time/iter should converge to some value for large numbers of iterations, and the rate of convergence can be used to infer something about the timer resolution. The minimum timing interval required to achieve various levels of consistency/accuracy is outputted. You can compare this to the FFTW_TIME_MIN setting in fftw.h to see how appropriate it is for your machine's clock. -v Verbose output (should precede other options). -h Prints help on these and other command-line flags �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/test_main.h������������������������������������������������������������������������0000644�0001754�0000144�00000005751�07635206027�011463� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TEST_MAIN_H #define TEST_MAIN_H /* max # of dimensions accepted on the command line */ #define MAX_CMDLINE_RANK 20 struct size { int rank; int is_nd; int narray[MAX_CMDLINE_RANK]; }; /******************** * macrology: ********************/ #ifndef TRUE #define TRUE 42 #endif #ifndef FALSE #define FALSE (!TRUE) #endif #define CHECK(condition, complaint) \ if (!(condition)) { \ fflush(stdout); \ fprintf(stderr, "FATAL ERROR: %s\n", complaint); \ fftw_die("failed test.\n"); \ } #define WHEN_VERBOSE(a, x) if (verbose >= a) x #ifdef FFTW_ENABLE_FLOAT #define TOLERANCE (1e-2) #else #define TOLERANCE (1e-6) #endif #define DRAND() mydrand() #define SPECIFICP(x) (x ? "specific" : "generic") /******************* * global variables *******************/ extern int verbose; extern int only_one_speed_test; extern int speed_flag, wisdom_flag, measure_flag, no_vector_flag; extern int chk_mem_leak; extern int paranoid; extern int howmany_fields; extern int io_okay; /* Time an FFT routine, invoked by fft. a is the array being * transformed, n is its total length. t should be a variable * --the time (sec) per fft is assigned to it. */ #define FFTW_TIME_FFT(fft,a,n,t) \ { \ fftw_time ts,te; \ double total_t; \ int tfft_iters = 1, tfft_iter; \ zero_arr((n), (a)); \ do { \ ts = fftw_get_time(); \ for (tfft_iter = 0; tfft_iter < tfft_iters; ++tfft_iter) fft; \ te = fftw_get_time(); \ t = (total_t=fftw_time_to_sec(fftw_time_diff(te,ts))) / tfft_iters; \ tfft_iters *= 2; \ } while (total_t < 2.0); \ } #define MAX_STRIDE 3 #define MAX_HOWMANY 3 #define MAX_RANK 5 #define PLANNER_TEST_SIZE 100 extern int coinflip(void); extern double mydrand(void); extern char *smart_sprint_time(double x); extern void please_wait(void); extern void please_wait_forever(void); extern double mflops(double t, int N); extern void print_dims(struct size sz); #define SQR(x) ((x) * (x)) extern double compute_error_complex(fftw_complex * A, int astride, fftw_complex * B, int bstride, int n); extern fftw_direction random_dir(void); /*** the following symbols should be defined in fftw_test.c/rfftw_test.c ***/ extern char fftw_prefix[]; extern void test_speed_aux(int n, fftw_direction dir, int flags, int specific); extern void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific); extern void test_correctness(int n); extern void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf); extern void test_planner(int rank); extern void test_init(int *argc, char ***argv); extern void test_finish(void); extern void enter_paranoid_mode(void); extern int get_option(int argc, char **argv, char *argval, int argval_maxlen); extern int default_get_option(int argc, char **argv, char *argval, int argval_maxlen); #endif /* TEST_MAIN_H */ �����������������������fftw-2.1.5/tests/Makefile.am������������������������������������������������������������������������0000644�0001754�0000144�00000002115�07635206027�011352� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������noinst_PROGRAMS = fftw_test rfftw_test noinst_HEADERS = test_main.h FFTWDIR=../fftw RFFTWDIR=../rfftw INCLUDES = -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) fftw_test_SOURCES = fftw_test.c test_main.c fftw_test_LDADD = $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la rfftw_test_SOURCES = rfftw_test.c test_main.c rfftw_test_LDADD = $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la check: fftw-tests rfftw-tests fftw-tests: fftw_test ./fftw_test -p 0 ./fftw_test -x 128 -a 0 ./fftw_test -x 32 -a 2 ./fftw_test -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " FFTW complex-complex transforms passed tests!" @echo "--------------------------------------------------------------" rfftw-tests: rfftw_test ./rfftw_test -p 0 ./rfftw_test -x 128 -a 0 ./rfftw_test -x 32 -a 2 ./rfftw_test -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " RFFTW real-complex transforms passed tests!" @echo "--------------------------------------------------------------" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/Makefile.in������������������������������������������������������������������������0000644�0001754�0000144�00000034523�07637527506�011405� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_PROGRAMS = fftw_test rfftw_test noinst_HEADERS = test_main.h FFTWDIR = ../fftw RFFTWDIR = ../rfftw INCLUDES = -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) fftw_test_SOURCES = fftw_test.c test_main.c fftw_test_LDADD = $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la rfftw_test_SOURCES = rfftw_test.c test_main.c rfftw_test_LDADD = $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la subdir = tests mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = noinst_PROGRAMS = fftw_test$(EXEEXT) rfftw_test$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_fftw_test_OBJECTS = fftw_test.$(OBJEXT) test_main.$(OBJEXT) fftw_test_OBJECTS = $(am_fftw_test_OBJECTS) fftw_test_DEPENDENCIES = $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la fftw_test_LDFLAGS = am_rfftw_test_OBJECTS = rfftw_test.$(OBJEXT) test_main.$(OBJEXT) rfftw_test_OBJECTS = $(am_rfftw_test_OBJECTS) rfftw_test_DEPENDENCIES = $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la rfftw_test_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/fftw -I$(top_builddir)/fftw depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/fftw_test.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftw_test.Po ./$(DEPDIR)/test_main.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(fftw_test_SOURCES) $(rfftw_test_SOURCES) HEADERS = $(noinst_HEADERS) DIST_COMMON = README $(noinst_HEADERS) Makefile.am Makefile.in SOURCES = $(fftw_test_SOURCES) $(rfftw_test_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done fftw_test$(EXEEXT): $(fftw_test_OBJECTS) $(fftw_test_DEPENDENCIES) @rm -f fftw_test$(EXEEXT) $(LINK) $(fftw_test_LDFLAGS) $(fftw_test_OBJECTS) $(fftw_test_LDADD) $(LIBS) rfftw_test$(EXEEXT): $(rfftw_test_OBJECTS) $(rfftw_test_DEPENDENCIES) @rm -f rfftw_test$(EXEEXT) $(LINK) $(rfftw_test_LDFLAGS) $(rfftw_test_OBJECTS) $(rfftw_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftw_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_main.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am check: fftw-tests rfftw-tests fftw-tests: fftw_test ./fftw_test -p 0 ./fftw_test -x 128 -a 0 ./fftw_test -x 32 -a 2 ./fftw_test -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " FFTW complex-complex transforms passed tests!" @echo "--------------------------------------------------------------" rfftw-tests: rfftw_test ./rfftw_test -p 0 ./rfftw_test -x 128 -a 0 ./rfftw_test -x 32 -a 2 ./rfftw_test -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " RFFTW real-complex transforms passed tests!" @echo "--------------------------------------------------------------" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/fftw_test.c������������������������������������������������������������������������0000644�0001754�0000144�00000071452�07635206062�011500� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * fftw_test.c : test program for complex-complex transforms */ /* $Id: fftw_test.c,v 1.103 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include #include #include #include #include "test_main.h" char fftw_prefix[] = "fftw"; void test_ergun(int n, fftw_direction dir, fftw_plan plan); /************************************************* * Speed tests *************************************************/ void zero_arr(int n, fftw_complex *a) { int i; for (i = 0; i < n; ++i) c_re(a[i]) = c_im(a[i]) = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { fftw_complex *in, *out; fftw_plan plan; double t; fftw_time begin, end; in = (fftw_complex *) fftw_malloc(n * howmany_fields * sizeof(fftw_complex)); out = (fftw_complex *) fftw_malloc(n * howmany_fields * sizeof(fftw_complex)); if (specific) { begin = fftw_get_time(); plan = fftw_create_plan_specific(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, out, howmany_fields); end = fftw_get_time(); } else { begin = fftw_get_time(); plan = fftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); end = fftw_get_time(); } CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, fftw_print_plan(plan)); if (paranoid && !(flags & FFTW_IN_PLACE)) { begin = fftw_get_time(); test_ergun(n, dir, plan); end = fftw_get_time(); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for validation: %f s\n", t)); } FFTW_TIME_FFT(fftw(plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t); fftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft: %s", smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5 (n log2 n) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, n))); fftw_free(in); fftw_free(out); WHEN_VERBOSE(1, printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { fftw_complex *in; fftwnd_plan plan; double t; fftw_time begin, end; int i, N; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank; ++i) N *= (sz.narray[i]); in = (fftw_complex *) fftw_malloc(N * howmany_fields * sizeof(fftw_complex)); if (specific) { begin = fftw_get_time(); plan = fftwnd_create_plan_specific(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, 0, 1); } else { begin = fftw_get_time(); plan = fftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } end = fftw_get_time(); CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, printf("\n")); WHEN_VERBOSE(2, (fftwnd_print_plan(plan))); WHEN_VERBOSE(2, printf("\n")); FFTW_TIME_FFT(fftwnd(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); fftwnd_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft: %s", smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("\"mflops\" = 5 (N log2 N) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); fftw_free(in); WHEN_VERBOSE(1, printf("\n")); } /************************************************* * correctness tests *************************************************/ void fill_random(fftw_complex *a, int n) { int i; /* generate random inputs */ for (i = 0; i < n; ++i) { c_re(a[i]) = DRAND(); c_im(a[i]) = DRAND(); } } void array_copy(fftw_complex *out, fftw_complex *in, int n) { int i; for (i = 0; i < n; ++i) out[i] = in[i]; } /* C = A + B */ void array_add(fftw_complex *C, fftw_complex *A, fftw_complex *B, int n) { int i; for (i = 0; i < n; ++i) { c_re(C[i]) = c_re(A[i]) + c_re(B[i]); c_im(C[i]) = c_im(A[i]) + c_im(B[i]); } } /* C = A - B */ void array_sub(fftw_complex *C, fftw_complex *A, fftw_complex *B, int n) { int i; for (i = 0; i < n; ++i) { c_re(C[i]) = c_re(A[i]) - c_re(B[i]); c_im(C[i]) = c_im(A[i]) - c_im(B[i]); } } /* B = rotate left A */ void array_rol(fftw_complex *B, fftw_complex *A, int n, int n_before, int n_after) { int i, ib, ia; for (ib = 0; ib < n_before; ++ib) { for (i = 0; i < n - 1; ++i) for (ia = 0; ia < n_after; ++ia) B[(ib * n + i) * n_after + ia] = A[(ib * n + i + 1) * n_after + ia]; for (ia = 0; ia < n_after; ++ia) B[(ib * n + n - 1) * n_after + ia] = A[ib * n * n_after + ia]; } } /* A = alpha * A (in place) */ void array_scale(fftw_complex *A, fftw_complex alpha, int n) { int i; for (i = 0; i < n; ++i) { fftw_complex a = A[i]; c_re(A[i]) = c_re(a) * c_re(alpha) - c_im(a) * c_im(alpha); c_im(A[i]) = c_re(a) * c_im(alpha) + c_im(a) * c_re(alpha); } } void array_compare(fftw_complex *A, fftw_complex *B, int n) { double d = compute_error_complex(A, 1, B, 1, n); if (d > TOLERANCE) { fflush(stdout); fprintf(stderr, "Found relative error %e\n", d); fftw_die("failure in Ergun's verification procedure\n"); } } /* * guaranteed out-of-place transform. Does the necessary * copying if the plan is in-place. */ static void fftw_out_of_place(fftw_plan plan, int n, fftw_complex *in, fftw_complex *out) { if (plan->flags & FFTW_IN_PLACE) { array_copy(out, in, n); fftw(plan, 1, out, 1, n, (fftw_complex *)0, 1, n); } else { fftw(plan, 1, in, 1, n, out, 1, n); } } /* * Implementation of the FFT tester described in * * Funda Ergün. Testing multivariate linear functions: Overcoming the * generator bottleneck. In Proceedings of the Twenty-Seventh Annual * ACM Symposium on the Theory of Computing, pages 407-416, Las Vegas, * Nevada, 29 May--1 June 1995. */ void test_ergun(int n, fftw_direction dir, fftw_plan plan) { fftw_complex *inA, *inB, *inC, *outA, *outB, *outC; fftw_complex *tmp; fftw_complex impulse; int i; int rounds = 20; FFTW_TRIG_REAL twopin = FFTW_K2PI / (FFTW_TRIG_REAL) n; inA = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); inB = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); inC = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); outA = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); outB = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); outC = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); tmp = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); WHEN_VERBOSE(2, printf("Validating plan, n = %d, dir = %s\n", n, dir == FFTW_FORWARD ? "FORWARD" : "BACKWARD")); /* test 1: check linearity */ for (i = 0; i < rounds; ++i) { fftw_complex alpha, beta; c_re(alpha) = DRAND(); c_im(alpha) = DRAND(); c_re(beta) = DRAND(); c_im(beta) = DRAND(); fill_random(inA, n); fill_random(inB, n); fftw_out_of_place(plan, n, inA, outA); fftw_out_of_place(plan, n, inB, outB); array_scale(outA, alpha, n); array_scale(outB, beta, n); array_add(tmp, outA, outB, n); array_scale(inA, alpha, n); array_scale(inB, beta, n); array_add(inC, inA, inB, n); fftw_out_of_place(plan, n, inC, outC); array_compare(outC, tmp, n); } /* test 2: check that the unit impulse is transformed properly */ c_re(impulse) = 1.0; c_im(impulse) = 0.0; for (i = 0; i < n; ++i) { /* impulse */ c_re(inA[i]) = 0.0; c_im(inA[i]) = 0.0; /* transform of the impulse */ outA[i] = impulse; } inA[0] = impulse; for (i = 0; i < rounds; ++i) { fill_random(inB, n); array_sub(inC, inA, inB, n); fftw_out_of_place(plan, n, inB, outB); fftw_out_of_place(plan, n, inC, outC); array_add(tmp, outB, outC, n); array_compare(tmp, outA, n); } /* test 3: check the time-shift property */ /* the paper performs more tests, but this code should be fine too */ for (i = 0; i < rounds; ++i) { int j; fill_random(inA, n); array_rol(inB, inA, n, 1, 1); fftw_out_of_place(plan, n, inA, outA); fftw_out_of_place(plan, n, inB, outB); for (j = 0; j < n; ++j) { FFTW_TRIG_REAL s = dir * FFTW_TRIG_SIN(j * twopin); FFTW_TRIG_REAL c = FFTW_TRIG_COS(j * twopin); c_re(tmp[j]) = c_re(outB[j]) * c - c_im(outB[j]) * s; c_im(tmp[j]) = c_re(outB[j]) * s + c_im(outB[j]) * c; } array_compare(tmp, outA, n); } WHEN_VERBOSE(2, printf("Validation done\n")); fftw_free(tmp); fftw_free(outC); fftw_free(outB); fftw_free(outA); fftw_free(inC); fftw_free(inB); fftw_free(inA); } static void fftw_plan_hook_function(fftw_plan p) { WHEN_VERBOSE(3, printf("Validating tentative plan\n")); WHEN_VERBOSE(3, fftw_print_plan(p)); test_ergun(p->n, p->dir, p); } /* Same as test_ergun, but for multi-dimensional transforms: */ void testnd_ergun(int rank, int *n, fftw_direction dir, fftwnd_plan plan) { fftw_complex *inA, *inB, *inC, *outA, *outB, *outC; fftw_complex *tmp; fftw_complex impulse; int N, n_before, n_after, dim; int i, which_impulse; int rounds = 20; FFTW_TRIG_REAL twopin; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; inA = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); inB = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); inC = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); outA = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); outB = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); outC = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); tmp = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); WHEN_VERBOSE(2, printf("Validating plan, N = %d, dir = %s\n", N, dir == FFTW_FORWARD ? "FORWARD" : "BACKWARD")); /* test 1: check linearity */ for (i = 0; i < rounds; ++i) { fftw_complex alpha, beta; c_re(alpha) = DRAND(); c_im(alpha) = DRAND(); c_re(beta) = DRAND(); c_im(beta) = DRAND(); fill_random(inA, N); fill_random(inB, N); fftwnd(plan, 1, inA, 1, N, outA, 1, N); fftwnd(plan, 1, inB, 1, N, outB, 1, N); array_scale(outA, alpha, N); array_scale(outB, beta, N); array_add(tmp, outA, outB, N); array_scale(inA, alpha, N); array_scale(inB, beta, N); array_add(inC, inA, inB, N); fftwnd(plan, 1, inC, 1, N, outC, 1, N); array_compare(outC, tmp, N); } /* * test 2: check that the unit impulse is transformed properly -- we * need to test both the real and imaginary impulses */ for (which_impulse = 0; which_impulse < 2; ++which_impulse) { if (which_impulse == 0) { /* real impulse */ c_re(impulse) = 1.0; c_im(impulse) = 0.0; } else { /* imaginary impulse */ c_re(impulse) = 0.0; c_im(impulse) = 1.0; } for (i = 0; i < N; ++i) { /* impulse */ c_re(inA[i]) = 0.0; c_im(inA[i]) = 0.0; /* transform of the impulse */ outA[i] = impulse; } inA[0] = impulse; for (i = 0; i < rounds; ++i) { fill_random(inB, N); array_sub(inC, inA, inB, N); fftwnd(plan, 1, inB, 1, N, outB, 1, N); fftwnd(plan, 1, inC, 1, N, outC, 1, N); array_add(tmp, outB, outC, N); array_compare(tmp, outA, N); } } /* test 3: check the time-shift property */ /* the paper performs more tests, but this code should be fine too */ /* -- we have to check shifts in each dimension */ n_before = 1; n_after = N; for (dim = 0; dim < rank; ++dim) { int n_cur = n[dim]; n_after /= n_cur; twopin = FFTW_K2PI / (FFTW_TRIG_REAL) n_cur; for (i = 0; i < rounds; ++i) { int j, jb, ja; fill_random(inA, N); array_rol(inB, inA, n_cur, n_before, n_after); fftwnd(plan, 1, inA, 1, N, outA, 1, N); fftwnd(plan, 1, inB, 1, N, outB, 1, N); for (jb = 0; jb < n_before; ++jb) for (j = 0; j < n_cur; ++j) { FFTW_TRIG_REAL s = dir * FFTW_TRIG_SIN(j * twopin); FFTW_TRIG_REAL c = FFTW_TRIG_COS(j * twopin); for (ja = 0; ja < n_after; ++ja) { c_re(tmp[(jb * n_cur + j) * n_after + ja]) = c_re(outB[(jb * n_cur + j) * n_after + ja]) * c - c_im(outB[(jb * n_cur + j) * n_after + ja]) * s; c_im(tmp[(jb * n_cur + j) * n_after + ja]) = c_re(outB[(jb * n_cur + j) * n_after + ja]) * s + c_im(outB[(jb * n_cur + j) * n_after + ja]) * c; } } array_compare(tmp, outA, N); } n_before *= n_cur; } WHEN_VERBOSE(2, printf("Validation done\n")); fftw_free(tmp); fftw_free(outC); fftw_free(outB); fftw_free(outA); fftw_free(inC); fftw_free(inB); fftw_free(inA); } void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in1, *in2, *out1, *out2; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag | FFTW_OUT_OF_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_complex *) fftw_malloc(istride * n * sizeof(fftw_complex) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); out1 = (fftw_complex *) fftw_malloc(ostride * n * sizeof(fftw_complex) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); if (!specific) plan = fftw_create_plan(n, dir, flags); else plan = fftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); /* generate random inputs */ for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride]) = c_re(in2[i]) = DRAND(); c_im(in1[i * istride]) = c_im(in2[i]) = DRAND(); } /* * fill in other positions of the array, to make sure that * fftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride + j]) = i * istride + j; c_im(in1[i * istride + j]) = i * istride - j; } for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(out1[i * ostride + j]) = -i * ostride + j; c_im(out1[i * ostride + j]) = -i * ostride - j; } CHECK(plan != NULL, "can't create plan"); WHEN_VERBOSE(2, fftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) fftw(plan, howmany, in1, istride, n * istride, out1, ostride, n * ostride); else fftw_one(plan, in1, out1); fftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(in1[i * istride + j]) == i * istride + j && c_im(in1[i * istride + j]) == i * istride - j, "input has been overwritten"); for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(out1[i * ostride + j]) == -i * ostride + j && c_im(out1[i * ostride + j]) == -i * ostride - j, "output has been overwritten"); for (i = 0; i < howmany; ++i) { fftw(validated_plan, 1, in2 + n * i, 1, n, out2 + n * i, 1, n); } CHECK(compute_error_complex(out1, ostride, out2, 1, n * howmany) < TOLERANCE, "test_out_of_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out1); fftw_free(out2); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in1, *in2, *out2; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_complex *) fftw_malloc(istride * n * sizeof(fftw_complex) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); if (!specific) plan = fftw_create_plan(n, dir, flags); else plan = fftw_create_plan_specific(n, dir, flags, in1, istride, (fftw_complex *) NULL, 0); /* generate random inputs */ for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride]) = c_re(in2[i]) = DRAND(); c_im(in1[i * istride]) = c_im(in2[i]) = DRAND(); } /* * fill in other positions of the array, to make sure that * fftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride + j]) = i * istride + j; c_im(in1[i * istride + j]) = i * istride - j; } CHECK(plan != NULL, "can't create plan"); WHEN_VERBOSE(2, fftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || coinflip()) fftw(plan, howmany, in1, istride, n * istride, (fftw_complex *) NULL, 0, 0); else fftw_one(plan, in1, NULL); fftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(in1[i * istride + j]) == i * istride + j && c_im(in1[i * istride + j]) == i * istride - j, "input has been overwritten"); for (i = 0; i < howmany; ++i) { fftw(validated_plan, 1, in2 + n * i, 1, n, out2 + n * i, 1, n); } CHECK(compute_error_complex(in1, istride, out2, 1, n * howmany) < TOLERANCE, "test_in_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out2); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_FORWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_BACKWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_correctness(int n) { int istride, ostride, howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, printf("Testing correctness for n = %d...", n); fflush(stdout)); /* produce a *good* plan (validated by Ergun's test procedure) */ validated_plan_forward = fftw_create_plan(n, FFTW_FORWARD, measure_flag | wisdom_flag); test_ergun(n, FFTW_FORWARD, validated_plan_forward); validated_plan_backward = fftw_create_plan(n, FFTW_BACKWARD, measure_flag | wisdom_flag); test_ergun(n, FFTW_BACKWARD, validated_plan_backward); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_out_of_place_both(n, istride, ostride, howmany, validated_plan_forward, validated_plan_backward); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_in_place_both(n, istride, howmany, validated_plan_forward, validated_plan_backward); fftw_destroy_plan(validated_plan_forward); fftw_destroy_plan(validated_plan_backward); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); WHEN_VERBOSE(1, printf("OK\n")); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan) { int istride, ostride; int N, dim, i; fftw_complex *in1, *in2, *out1, *out2; fftwnd_plan p; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; in1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); out1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); p = fftwnd_create_plan(rank, n, dir, flags); for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < N; ++i) { int j; c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); for (j = 0; j < istride; ++j) { c_re(in1[i * istride + j]) = c_re(in2[i]); c_im(in1[i * istride + j]) = c_im(in2[i]); } } for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) { int howmany = (istride < ostride) ? istride : ostride; if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) fftwnd(p, howmany, in1, istride, 1, out1, ostride, 1); else fftwnd_one(p, in1, out1); fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (i = 0; i < howmany; ++i) CHECK(compute_error_complex(out1 + i, ostride, out2, 1, N) < TOLERANCE, "testnd_out_of_place: wrong answer"); } } fftwnd_destroy_plan(p); fftw_free(out2); fftw_free(in2); fftw_free(out1); fftw_free(in1); } void testnd_in_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan, int alternate_api, int specific, int force_buffered) { int istride; int N, dim, i; fftw_complex *in1, *in2, *out2; fftwnd_plan p; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; if (force_buffered) flags |= FFTWND_FORCE_BUFFERED; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; in1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); if (!specific) { if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) p = fftw2d_create_plan(n[0], n[1], dir, flags); else p = fftw3d_create_plan(n[0], n[1], n[2], dir, flags); } else /* standard api */ p = fftwnd_create_plan(rank, n, dir, flags); } else { /* specific plan creation */ if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) p = fftw2d_create_plan_specific(n[0], n[1], dir, flags, in1, 1, (fftw_complex *) NULL, 1); else p = fftw3d_create_plan_specific(n[0], n[1], n[2], dir, flags, in1, 1, (fftw_complex *) NULL, 1); } else /* standard api */ p = fftwnd_create_plan_specific(rank, n, dir, flags, in1, 1, (fftw_complex *) NULL, 1); } for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* * generate random inputs */ for (i = 0; i < N; ++i) { int j; c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); for (j = 0; j < istride; ++j) { c_re(in1[i * istride + j]) = c_re(in2[i]); c_im(in1[i * istride + j]) = c_im(in2[i]); } } if (istride != 1 || istride != 1 || coinflip()) fftwnd(p, istride, in1, istride, 1, (fftw_complex *) NULL, 1, 1); else fftwnd_one(p, in1, NULL); fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (i = 0; i < istride; ++i) CHECK(compute_error_complex(in1 + i, istride, out2, 1, N) < TOLERANCE, "testnd_in_place: wrong answer"); } fftwnd_destroy_plan(p); fftw_free(out2); fftw_free(in2); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag); testnd_ergun(sz.rank, sz.narray, dir, validated_plan); testnd_out_of_place(sz.rank, sz.narray, dir, validated_plan); testnd_in_place(sz.rank, sz.narray, dir, validated_plan, alt_api, specific, force_buf); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { /* * create and destroy many plans, at random. Check the * garbage-collecting allocator of twiddle factors */ int i, dim; int r, s; fftw_plan p[PLANNER_TEST_SIZE]; fftwnd_plan pnd[PLANNER_TEST_SIZE]; int *narr, maxdim; chk_mem_leak = 0; verbose--; please_wait(); if (rank < 1) rank = 1; narr = (int *) fftw_malloc(rank * sizeof(int)); maxdim = (int) pow(8192.0, 1.0/rank); for (i = 0; i < PLANNER_TEST_SIZE; ++i) { p[i] = (fftw_plan) 0; pnd[i] = (fftwnd_plan) 0; } for (i = 0; i < PLANNER_TEST_SIZE * PLANNER_TEST_SIZE; ++i) { r = rand(); if (r < 0) r = -r; r = r % PLANNER_TEST_SIZE; for (dim = 0; dim < rank; ++dim) { do { s = rand(); if (s < 0) s = -s; s = s % maxdim + 1; } while (s == 0); narr[dim] = s; } if (rank == 1) { if (p[r]) fftw_destroy_plan(p[r]); p[r] = fftw_create_plan(narr[0], random_dir(), measure_flag | wisdom_flag); if (paranoid && narr[0] < 200) test_correctness(narr[0]); } if (pnd[r]) fftwnd_destroy_plan(pnd[r]); pnd[r] = fftwnd_create_plan(rank, narr, random_dir(), measure_flag | wisdom_flag); if (i % (PLANNER_TEST_SIZE * PLANNER_TEST_SIZE / 20) == 0) { WHEN_VERBOSE(0, printf("test planner: so far so good\n")); WHEN_VERBOSE(0, printf("test planner: iteration %d out of %d\n", i, PLANNER_TEST_SIZE * PLANNER_TEST_SIZE)); } } for (i = 0; i < PLANNER_TEST_SIZE; ++i) { if (p[i]) fftw_destroy_plan(p[i]); if (pnd[i]) fftwnd_destroy_plan(pnd[i]); } fftw_free(narr); verbose++; chk_mem_leak = 1; } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { } void test_finish(void) { } void enter_paranoid_mode(void) { fftw_plan_hook = fftw_plan_hook_function; } int get_option(int argc, char **argv, char *argval, int argval_maxlen) { return default_get_option(argc,argv,argval,argval_maxlen); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/test_main.c������������������������������������������������������������������������0000644�0001754�0000144�00000061611�07635206062�011452� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * test_main.c: driver for test programs (linked with fftw_test.c/rfftw_test.c) */ /* $Id: test_main.c,v 1.39 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include #include #include #include #include #include "test_main.h" #ifdef HAVE_GETOPT # ifdef HAVE_GETOPT_H # include # elif defined(HAVE_UNISTD_H) # include # endif #endif double mydrand(void) { double d = rand(); return (d / (double) RAND_MAX) - .5; } /* return random 0 or non-zero */ int coinflip(void) { return (rand() & 8192); /* higher-order bits are often more random * */ } /* parse a string of the form N1xN2x... and return a size structure */ struct size parse_size(char *s) { struct size sz; int n; sz.rank = 0; sz.is_nd = 0; if (*s == 'x' || *s == 'X' || *s == '*') { ++s; /* force ND transform of rank 1 */ sz.is_nd = 1; } accept_digit: n = 0; CHECK(isdigit(*s), "invalid digit"); while (isdigit(*s)) { n = n * 10 + (*s - '0'); ++s; } sz.narray[sz.rank] = n; ++sz.rank; CHECK(sz.rank < MAX_CMDLINE_RANK, "maximum rank exceeded"); if (*s == 'x' || *s == 'X' || *s == '*') { ++s; goto accept_digit; } /* force ND transform if rank > 1 */ if (sz.rank > 1) sz.is_nd = 1; return sz; } /******************* * global variables *******************/ int verbose = 1; int only_one_speed_test = 0; int wisdom_flag = 0, measure_flag = FFTW_ESTIMATE; int speed_flag = FFTW_MEASURE; int no_vector_flag = 0; int chk_mem_leak = 1; int paranoid = 0; int howmany_fields = 1; /* maximum number of iterations to perform in "infinite" tests; default (0) means no limit: */ int max_iterations = 0; /* When testing MPI stuff, only one process gets to do I/O: */ int io_okay = 1; #define my_printf if (io_okay) printf #define my_fprintf if (io_okay) fprintf #define my_fflush if (io_okay) fflush /******************* * procedures *******************/ /* smart time printer */ char *smart_sprint_time(double x) { static char buf[128]; if (x < 1.0E-6) sprintf(buf, "%f ns", x * 1.0E9); else if (x < 1.0E-3) sprintf(buf, "%f us", x * 1.0E6); else if (x < 1.0) sprintf(buf, "%f ms", x * 1.0E3); else sprintf(buf, "%f s", x); return buf; } /* greet the user */ /* jokes stolen from http://whereis.mit.edu/bin/map */ void please_wait(void) { int i; const char *s[] = { "(while a large software vendor in Seattle takes over the world)", "(and remember, this is faster than Java)", "(and dream of faster computers)", "(checking the gravitational constant in your locale)", "(at least you are not on hold)", "(while X11 grows by another kilobyte)", "(while Windows NT reboots)", "(correcting for the phase of the moon)", "(your call is important to us)", "(while the Linux user-base doubles)", "(while you decide where you want to go tomorrow)", "(exorcising evil spirits)", "(while the C++ standard gains another page)", }; int choices = sizeof(s) / sizeof(*s); i = rand() % choices; my_printf("Please wait %s.\n", s[i < 0 ? -i : i]); } void please_wait_forever(void) { int i; const char *s[] = { "(but it won't crash, either)", "(at least in theory)", "(please be patient)", "(our next release will complete it more quickly)", #ifdef HAVE_WIN32 "(by the way, Linux executes infinite loops faster)", #endif }; int choices = sizeof(s) / sizeof(*s); if (!max_iterations) { i = rand() % choices; my_printf("This test does not terminate %s.\n", s[i < 0 ? -i : i]); } else { my_printf("This test will run for %d iterations.\n", max_iterations); please_wait(); } } /************************************************* * Speed tests *************************************************/ double mflops(double t, int N) { return (5.0 * N * log((double) N) / (log(2.0) * t * 1.0e6)); } void print_dims(struct size sz) { int i; my_printf("%d", sz.narray[0]); for (i = 1; i < sz.rank; ++i) my_printf("x%d", sz.narray[i]); } void test_speed(int n) { int specific; please_wait(); if (howmany_fields > 1) WHEN_VERBOSE(1, my_printf("TIMING MULTIPLE-FIELD FFT: " "howmany=%d, stride=%d, dist=%d\n\n", howmany_fields, howmany_fields, 1)); if (!only_one_speed_test) { for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(1, my_printf("SPEED TEST: n = %d, FFTW_FORWARD, out of place, %s\n", n, SPECIFICP(specific))); test_speed_aux(n, FFTW_FORWARD, 0, specific); WHEN_VERBOSE(1, my_printf("SPEED TEST: n = %d, FFTW_FORWARD, in place, %s\n", n, SPECIFICP(specific))); test_speed_aux(n, FFTW_FORWARD, FFTW_IN_PLACE, specific); WHEN_VERBOSE(1, my_printf("SPEED TEST: n = %d, FFTW_BACKWARD, out of place, %s\n", n, SPECIFICP(specific))); test_speed_aux(n, FFTW_BACKWARD, 0, specific); WHEN_VERBOSE(1, my_printf("SPEED TEST: n = %d, FFTW_BACKWARD, in place, %s\n", n, SPECIFICP(specific))); test_speed_aux(n, FFTW_BACKWARD, FFTW_IN_PLACE, specific); } } else { WHEN_VERBOSE(1, my_printf("SPEED TEST: n = %d, FFTW_FORWARD, out of place, %s\n", n, SPECIFICP(1))); test_speed_aux(n, FFTW_FORWARD, 0, 1); } } void test_speed_nd(struct size sz) { int specific; please_wait(); if (howmany_fields > 1) WHEN_VERBOSE(1, my_printf("TIMING MULTIPLE-FIELD FFT: " "howmany=%d, stride=%d, dist=%d\n\n", howmany_fields, howmany_fields, 1)); if (!only_one_speed_test) { for (specific = 0; specific <= 1; ++specific) { my_printf("SPEED TEST: "); WHEN_VERBOSE(1, print_dims(sz)); WHEN_VERBOSE(1, my_printf(", FFTW_FORWARD, in place, %s\n", SPECIFICP(specific))); test_speed_nd_aux(sz, FFTW_FORWARD, FFTW_IN_PLACE, specific); WHEN_VERBOSE(1, my_printf("SPEED TEST: ")); print_dims(sz); WHEN_VERBOSE(1, my_printf(", FFTW_BACKWARD, in place, %s\n", SPECIFICP(specific))); test_speed_nd_aux(sz, FFTW_BACKWARD, FFTW_IN_PLACE, specific); } } else { my_printf("SPEED TEST: "); WHEN_VERBOSE(1, print_dims(sz)); WHEN_VERBOSE(1, my_printf(", FFTW_FORWARD, in place, %s\n", SPECIFICP(1))); test_speed_nd_aux(sz, FFTW_FORWARD, FFTW_IN_PLACE, 1); } } /************************************************* * correctness tests *************************************************/ double compute_error_complex(fftw_complex * A, int astride, fftw_complex * B, int bstride, int n) { /* compute the relative error */ double error = 0.0; int i; for (i = 0; i < n; ++i) { double a; double mag; a = sqrt(SQR(c_re(A[i * astride]) - c_re(B[i * bstride])) + SQR(c_im(A[i * astride]) - c_im(B[i * bstride]))); mag = 0.5 * (sqrt(SQR(c_re(A[i * astride])) + SQR(c_im(A[i * astride]))) + sqrt(SQR(c_re(B[i * bstride])) + SQR(c_im(B[i * bstride])))) + TOLERANCE; a /= mag; if (a > error) error = a; #ifdef HAVE_ISNAN CHECK(!isnan(a), "NaN in answer"); #endif } return error; } /* test forever */ void test_all(void) { int n; please_wait_forever(); for (n = 1; !max_iterations || n <= max_iterations; ++n) { test_correctness(n); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); } } #define MAX_FACTOR 13 int rand_small_factors(int N) { int f, n = 1; f = rand() % MAX_FACTOR + 1; while (n * f <= N) { n *= f; f = rand() % MAX_FACTOR + 1; } return n; } #define MAX_N 16384 struct size random_dims(int rank) { int maxsize, dim; double maxsize_d; struct size sz; /* workaround to weird gcc warning */ maxsize_d = pow((double) (rank == 1 ? MAX_N / 4 : MAX_N), 1.0 / (double) rank); maxsize = (int) maxsize_d; if (maxsize < 1) maxsize = 1; sz.rank = rank; for (dim = 0; dim < rank; ++dim) sz.narray[dim] = rand_small_factors(maxsize); return sz; } void test_random(void) { static int counter = 0; struct size sz; if ((++counter) % 16 == 0) { sz.rank = 1; sz.narray[0] = rand() % (MAX_N / 16) + 1; } else { sz = random_dims(1); } test_correctness(sz.narray[0]); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_correctness_both(struct size sz, int alt_api, int specific, int force_buf) { WHEN_VERBOSE(1, my_printf("Testing nd correctness for size = "); print_dims(sz); my_printf("..."); my_fflush(stdout)); if (alt_api) WHEN_VERBOSE(1, my_printf("alt. api...")); if (specific) WHEN_VERBOSE(1, my_printf("specific...")); if (force_buf) WHEN_VERBOSE(1, my_printf("force buf...")); testnd_correctness(sz, FFTW_FORWARD, alt_api, specific, force_buf); testnd_correctness(sz, FFTW_BACKWARD, alt_api, specific, force_buf); WHEN_VERBOSE(1, my_printf("OK\n")); } void testnd_correctness_aux(struct size sz) { int alt_api, specific, force_buf; for (alt_api = 0; alt_api <= 1; ++alt_api) for (specific = 0; specific <= 1; ++specific) for (force_buf = 0; force_buf <= 1; ++force_buf) testnd_correctness_both(sz, alt_api, specific, force_buf); } void testnd_correctness_square(int rank, int size) { struct size sz; int alt_api, specific, force_buf; int i; sz.rank = rank; for (i = 0; i < rank; ++i) sz.narray[i] = size; for (alt_api = 0; alt_api <= 1; ++alt_api) for (specific = 0; specific <= 1; ++specific) for (force_buf = 0; force_buf <= 1; ++force_buf) testnd_correctness_both(sz, alt_api, specific, force_buf); } void testnd_random(int rank) { struct size sz; sz = random_dims(rank); testnd_correctness_both(sz, coinflip(), coinflip(), coinflip()); } /* loop forever */ void test_all_random(int rank) { int counter; please_wait_forever(); for (counter = 0; !max_iterations || counter < max_iterations; ++counter) { if (rank > 0) testnd_random(rank); else if ((counter) % 2 == 0) test_random(); else testnd_random(rand() % MAX_RANK + 1); } } int pow2sqrt(int n) /* return greatest power of two <= sqrt(n) */ { int s = 1; while (s * s * 4 <= n) s *= 2; return s; } /* test forever */ void testnd_all(int rank) { int n; please_wait_forever(); for (n = 1; !max_iterations || n <= max_iterations; ++n) testnd_correctness_square(rank, n); } fftw_direction random_dir(void) { if (coinflip()) return FFTW_FORWARD; else return FFTW_BACKWARD; } /************************************************* * timer tests *************************************************/ static int hack_sum_i; void negative_time(void) { my_fprintf(stderr, "* PROBLEM: I measured a negative time interval.\n" "* Please make sure you defined the timer correctly\n" "* or contact fftw@fftw.org for help.\n"); } /* * paranoid test to see if time is monotonic. If not, you are * really in trouble */ void test_timer_paranoid(void) { fftw_time start_t, end_t; double sec; int i; start_t = fftw_get_time(); /* waste some time */ for (i = 0; i < 10000; ++i) hack_sum_i = i; end_t = fftw_get_time(); sec = fftw_time_to_sec(fftw_time_diff(end_t, start_t)); if (sec < 0.0) negative_time(); } /* compute useful numbers */ static int fib(int n) { if (n < 2) return n; else { int x, y; x = fib(n - 1); y = fib(n - 2); return x + y; } } static int hack_fib; void test_timer(void) { double times[32], acc, min_time = 10000.00; unsigned long iters, iter; fftw_time begin, end, start; double t, tmax, tmin; int last = 0, i, repeat; please_wait(); test_timer_paranoid(); start = fftw_get_time(); for (i = 0; i < 32; i++) { iters = 1 << i; tmin = 1.0E10; tmax = -1.0E10; for (repeat = 0; repeat < FFTW_TIME_REPEAT; ++repeat) { begin = fftw_get_time(); for (iter = 0; iter < iters; ++iter) { hack_fib = fib(10); } end = fftw_get_time(); t = fftw_time_to_sec(fftw_time_diff(end, begin)); if (t < tmin) tmin = t; if (t > tmax) tmax = t; /* do not run for too long */ t = fftw_time_to_sec(fftw_time_diff(end, start)); if (t > FFTW_TIME_LIMIT) break; } if (tmin < 0.0) negative_time(); times[i] = tmin; WHEN_VERBOSE(2, my_printf("Number of iterations = 2^%d = %lu, time = %g, " "time/iter = %g\n", i, iters, times[i], times[i] / iters)); WHEN_VERBOSE(2, my_printf(" (out of %d tries, tmin = %g, tmax = %g)\n", FFTW_TIME_REPEAT, tmin, tmax)); last = i; if (times[i] > 10.0) break; } /* * at this point, `last' is the last valid element in the * `times' array. */ for (i = 0; i <= last; ++i) if (times[i] > 0.0 && times[i] < min_time) min_time = times[i]; WHEN_VERBOSE(1, my_printf("\nMinimum resolvable time interval = %g seconds.\n\n", min_time)); for (acc = 0.1; acc > 0.0005; acc *= 0.1) { double t_final; t_final = times[last] / (1 << last); for (i = last; i >= 0; --i) { double t_cur, error; iters = 1 << i; t_cur = times[i] / iters; error = (t_cur - t_final) / t_final; if (error < 0.0) error = -error; if (error > acc) break; } ++i; WHEN_VERBOSE(1, my_printf("Minimum time for %g%% consistency = %g seconds.\n", acc * 100.0, times[i])); } WHEN_VERBOSE(1, my_printf("\nMinimum time used in FFTW timing (FFTW_TIME_MIN)" " = %g seconds.\n", FFTW_TIME_MIN)); } /************************************************* * help *************************************************/ #ifdef HAVE_GETOPT_LONG # define WHEN_LONG_OPTIONS(x) x #else # define WHEN_LONG_OPTIONS(x) "" #endif static void usage(int exit_when_done) { my_printf("Usage: %s_test [options]\n", fftw_prefix); my_printf(WHEN_LONG_OPTIONS(" --speed=\n") " -s : test speed for size n\n"); my_printf(WHEN_LONG_OPTIONS("\n --correctness=\n") " -c : test correctness for size n\n"); my_printf(WHEN_LONG_OPTIONS("\n --random=\n") " -r : test correctness for random sizes " "(does not terminate)\n"); my_printf(WHEN_LONG_OPTIONS("\n --all=\n") " -a : test correctness for all sizes " "(does not terminate)\n"); my_printf(WHEN_LONG_OPTIONS("\n --fields=\n") " -f : n fields ('howmany' param) in speed tests\n"); my_printf(WHEN_LONG_OPTIONS("\n --planner=\n") " -p : test planner\n"); my_printf(WHEN_LONG_OPTIONS("\n --measure\n") " -m : use FFTW_MEASURE in correctness tests\n"); my_printf(WHEN_LONG_OPTIONS("\n --estimate\n") " -e : use FFTW_ESTIMATE in speed tests\n"); my_printf(WHEN_LONG_OPTIONS("\n --wisdom=\n") " -w : use wisdom & read/write it from/to file\n"); my_printf(WHEN_LONG_OPTIONS("\n --timer\n") " -t : test timer resolution\n"); my_printf(WHEN_LONG_OPTIONS("\n --x-repeat=\n") " -x : run non-terminating tests (-r, -a) only n times\n"); my_printf(WHEN_LONG_OPTIONS("\n --paranoid\n") " -P : enable paranoid tests\n"); my_printf(WHEN_LONG_OPTIONS("\n --verbose\n") " -v : verbose output for subsequent options\n"); my_printf(WHEN_LONG_OPTIONS("\n --version\n") " -V : print FFTW version information\n"); my_printf(WHEN_LONG_OPTIONS("\n --help\n") " -h : this help\n"); #ifndef HAVE_GETOPT my_printf("(When run with no arguments, an interactive mode is used.)\n"); #endif if (exit_when_done) exit(EXIT_FAILURE); } char wfname[128]; void handle_option(char opt, char *optarg) { FILE *wf; struct size sz; int rank, n; switch (opt) { case 's': sz = parse_size(optarg); if (!sz.is_nd) test_speed(sz.narray[0]); else test_speed_nd(sz); break; case 'c': sz = parse_size(optarg); if (!sz.is_nd) test_correctness(sz.narray[0]); else testnd_correctness_aux(sz); break; case 'p': rank = atoi(optarg); test_planner(rank); break; case 'P': paranoid = 1; enter_paranoid_mode(); break; case 'r': rank = atoi(optarg); test_all_random(rank); break; case 'a': rank = atoi(optarg); if (rank == 0) test_all(); else testnd_all(rank); break; case 't': test_timer(); break; case 'f': n = atoi(optarg); CHECK(n > 0, "-f requires a positive integer argument"); howmany_fields = n; break; case 'm': measure_flag = FFTW_MEASURE; break; case 'e': speed_flag = FFTW_ESTIMATE; break; case 'N': no_vector_flag = FFTW_NO_VECTOR_RECURSE; break; case 'w': wisdom_flag = FFTW_USE_WISDOM; strcpy(wfname, optarg); wf = fopen(wfname, "r"); if (wf == 0) { my_printf("Couldn't open wisdom file \"%s\".\n", wfname); my_printf("This file will be created upon completion.\n"); } else { CHECK(FFTW_SUCCESS == fftw_import_wisdom_from_file(wf), "invalid wisdom file format"); fclose(wf); } break; case '1': only_one_speed_test = 1; break; case 'v': verbose++; break; case 'V': my_printf("%s\n", fftw_version); my_printf("%s test program, compiled in %s precision.\n", fftw_prefix, sizeof(fftw_real) == sizeof(double) ? "double" : (sizeof(fftw_real) == sizeof(float) ? "single" : "unknown")); my_printf( "\nCopyright (C) Massachusetts Institute of Technology.\n" "FFTW comes with ABSOLUTELY NO WARRANTY. This is free software, and\n" "you are welcome to redistribute it under the terms of the GNU\n" "General Public License. For more information, see the file COPYING or\n" "the GNU web site at http://www.gnu.org.\n" "\nFor more information regarding FFTW, or to download the latest version,\n" "see the FFTW home page at http://www.fftw.org.\n"); break; case 'x': n = atoi(optarg); CHECK(n > 0, "-x requires a positive integer argument"); max_iterations = n; break; case 'h': usage(FALSE); break; default: usage(TRUE); } /* every test must free all the used FFTW memory */ if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); } short askuser(const char *s) { char line[200] = "", c; int i, count = 0; do { if (count++ > 0) my_printf("Invalid response. Please enter \"y\" or \"n\".\n"); my_printf("%s (y/n) ", s); /* skip blank lines */ while (line[0] == 0 || line[0] == '\n') fgets(line, 200, stdin); for (i = 0; line[i] && (line[i] == ' ' || line[i] == '\t'); ++i); c = line[i]; } while (c != 'n' && c != 'N' && c != 'y' && c != 'Y'); return (c == 'y' || c == 'Y'); } /* Standard function to get the next command-line argument for the program. Returns the option character (or -1 if there are no more options), and the option argument (if any) in argval, which is an array of length at least argval_maxlen. The test programs need to implement a function get_option with the same arguments as this one, which will typically just call default_get_option. The reason we need to put this in a separate function is that the MPI test programs can't rely on all of the processes having direct access to the program arguments--they need to pass them as explicit messages from the master process. Sigh. */ int default_get_option(int argc, char **argv, char *argval, int argval_maxlen) { int c = -1; if (argc <= 1) usage(TRUE); #ifdef HAVE_GETOPT { const char short_options[] = "s:c:w:f:p:Pa:r:tvVmehx:N1"; extern char *optarg; extern int optind; # if defined(HAVE_GETOPT_LONG) && defined(HAVE_GETOPT_H) { int option_index; const struct option long_options[] = { {"speed", 1, 0, 's'}, {"correctness", 1, 0, 'c'}, {"wisdom", 1, 0, 'w'}, {"fields", 1, 0, 'f'}, {"planner", 1, 0, 'p'}, {"paranoid", 0, 0, 'P'}, {"all", 1, 0, 'a'}, {"random", 1, 0, 'r'}, {"timer", 0, 0, 't'}, {"verbose", 0, 0, 'v'}, {"version", 0, 0, 'V'}, {"measure", 0, 0, 'm'}, {"estimate", 0, 0, 'e'}, {"help", 0, 0, 'h'}, {"x-repeat", 1, 0, 'x'}, {"no-vector-recurse", 0, 0, 'N'}, {"only-one-speed-test", 0, 0, '1'}, {0, 0, 0, 0} }; c = getopt_long(argc, argv, short_options, long_options, &option_index); } # else /* not HAVE_GETOPT_LONG */ c = getopt(argc, argv, short_options); # endif /* not HAVE_GETOPT_LONG */ if (c == -1 && argc != optind) usage(TRUE); /* there were invalid args; print usage info */ if (optarg) { strncpy(argval, optarg, argval_maxlen - 1); argval[argval_maxlen - 1] = 0; } else argval[0] = 0; } #endif /* HAVE_GETOPT */ return c; } int main(int argc, char *argv[]) { #ifdef DETERMINISTIC srand(1123); #else srand((unsigned int) time(NULL)); #endif test_init(&argc, &argv); /* * To parse the command line, we use getopt, but this does not seem * to be in the ANSI standard (it is only available on UNIX, * apparently). */ #ifndef HAVE_GETOPT if (argc > 1) my_printf("Sorry, command-line arguments are not available on\n" "this system. Run fftw_test with no arguments to\n" "use it in interactive mode.\n"); if (argc <= 1) { int n = 0; char s[128] = ""; usage(FALSE); my_printf("\n"); if (askuser("Perform random correctness tests (non-terminating)?")) handle_option('r', "0"); if (askuser("Verbose output?")) handle_option('v', ""); if (askuser("Paranoid test?")) handle_option('P', ""); if (askuser("Use/test wisdom?")) { my_printf(" Enter wisdom file name to use: "); fgets(s, 128, stdin); handle_option('w', s); } if (askuser("Test correctness?")) { if (askuser(" -- for all sizes?")) handle_option('a', ""); else { my_printf(" Enter n: "); fgets(s, 128, stdin); handle_option('c', s); } } if (askuser("Test speed?")) { my_printf(" Enter n: "); fgets(s, 128, stdin); handle_option('s', s); } if (askuser("Test planner?")) handle_option('p', ""); if (askuser("Test timer?")) handle_option('t', ""); } #else /* * read command-line args using getopt * facility */ { char option_arg[128]; int c; while ((c = get_option(argc, argv, option_arg, 128)) != EOF) handle_option((int) c, option_arg); } #endif if (wisdom_flag & FFTW_USE_WISDOM) { char *ws; FILE *wf; ws = fftw_export_wisdom_to_string(); CHECK(ws != 0, "error exporting wisdom to string"); my_printf("\nAccumulated wisdom:\n %s\n", ws); fftw_forget_wisdom(); CHECK(FFTW_SUCCESS == fftw_import_wisdom_from_string(ws), "unexpected error reading in wisdom from string"); fftw_free(ws); if (io_okay) { wf = fopen(wfname, "w"); CHECK(wf != 0, "error creating wisdom file"); fftw_export_wisdom_to_file(wf); fclose(wf); } } /* make sure to dispose of wisdom before checking for memory leaks */ fftw_forget_wisdom(); fftw_check_memory_leaks(); if (io_okay) fftw_print_max_memory_usage(); test_finish(); return EXIT_SUCCESS; } �����������������������������������������������������������������������������������������������������������������������fftw-2.1.5/tests/rfftw_test.c�����������������������������������������������������������������������0000644�0001754�0000144�00000076673�07635206062�011674� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * fftw_test.c : test program for complex-complex transforms */ /* $Id: rfftw_test.c,v 1.28 2003/03/16 23:43:46 stevenj Exp $ */ #include "fftw-int.h" #include #include #include #include #include #include "rfftw.h" #include "test_main.h" char fftw_prefix[] = "rfftw"; /************************************************* * Speed tests *************************************************/ void zero_arr(int n, fftw_real * a) { int i; for (i = 0; i < n; ++i) a[i] = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { fftw_real *in, *out; fftw_plan plan; double t; fftw_time begin, end; in = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); out = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); if (specific) { begin = fftw_get_time(); plan = rfftw_create_plan_specific(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, out, howmany_fields); end = fftw_get_time(); } else { begin = fftw_get_time(); plan = rfftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); end = fftw_get_time(); } CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, rfftw_print_plan(plan)); FFTW_TIME_FFT(rfftw(plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t); rfftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft: %s", smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5/2 (n log2 n) / (t in microseconds)" " = %f\n", 0.5 * howmany_fields * mflops(t, n))); fftw_free(in); fftw_free(out); WHEN_VERBOSE(1, printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { fftw_real *in; fftwnd_plan plan; double t; fftw_time begin, end; int i, N; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank - 1; ++i) N *= sz.narray[i]; N *= (sz.narray[i] + 2); in = (fftw_real *) fftw_malloc(N * howmany_fields * sizeof(fftw_real)); if (specific) { begin = fftw_get_time(); plan = rfftwnd_create_plan_specific(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, 0, 1); } else { begin = fftw_get_time(); plan = rfftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } end = fftw_get_time(); CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, printf("\n")); WHEN_VERBOSE(2, (rfftwnd_print_plan(plan))); WHEN_VERBOSE(2, printf("\n")); if (dir == FFTW_REAL_TO_COMPLEX) { FFTW_TIME_FFT(rfftwnd_real_to_complex(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); } else { FFTW_TIME_FFT(rfftwnd_complex_to_real(plan, howmany_fields, (fftw_complex *) in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); } rfftwnd_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft: %s", smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("\"mflops\" = 5/2 (N log2 N) / (t in microseconds)" " = %f\n", 0.5 * howmany_fields * mflops(t, N))); fftw_free(in); WHEN_VERBOSE(1, printf("\n")); } /************************************************* * correctness tests *************************************************/ void fill_random(fftw_real * a, int n, int stride) { int i; /* generate random inputs */ for (i = 0; i < n; ++i) a[i * stride] = DRAND(); } double compute_error(fftw_real * A, int astride, fftw_real * B, int bstride, int n) { /* compute the relative error */ double error = 0.0; int i; for (i = 0; i < n; ++i) { double a; double mag; a = fabs(A[i * astride] - B[i * bstride]); mag = 0.5 * (fabs(A[i * astride]) + fabs(B[i * bstride])) + TOLERANCE; a /= mag; if (a > error) error = a; #ifdef HAVE_ISNAN CHECK(!isnan(a), "NaN in answer"); #endif } return error; } void array_compare(fftw_real * A, fftw_real * B, int n) { CHECK(compute_error(A, 1, B, 1, n) < TOLERANCE, "failure in RFFTW verification"); } void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in2, *out2; fftw_real *in1, *out1, *out3; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_real *) fftw_malloc(istride * n * sizeof(fftw_real) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out1 = (fftw_real *) fftw_malloc(ostride * n * sizeof(fftw_real) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out3 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); if (!specific) plan = rfftw_create_plan(n, dir, flags); else plan = rfftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); CHECK(plan != NULL, "can't create plan"); /* generate random inputs */ fill_random(in1, n, istride); for (j = 1; j < howmany; ++j) for (i = 0; i < n; ++i) in1[(j * n + i) * istride] = in1[i * istride]; /* copy random inputs to complex array for comparison with fftw: */ if (dir == FFTW_REAL_TO_COMPLEX) for (i = 0; i < n; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = 0.0; } else { int n2 = (n + 1) / 2; c_re(in2[0]) = in1[0]; c_im(in2[0]) = 0.0; for (i = 1; i < n2; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = in1[(n - i) * istride]; } if (n2 * 2 == n) { c_re(in2[n2]) = in1[n2 * istride]; c_im(in2[n2]) = 0.0; ++i; } for (; i < n; ++i) { c_re(in2[i]) = c_re(in2[n - i]); c_im(in2[i]) = -c_im(in2[n - i]); } } /* * fill in other positions of the array, to make sure that * rfftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) in1[i * istride + j] = i * istride + j; for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) out1[i * ostride + j] = -i * ostride + j; WHEN_VERBOSE(2, rfftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftw(plan, howmany, in1, istride, n * istride, out1, ostride, n * ostride); else rfftw_one(plan, in1, out1); rfftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(in1[i * istride + j] == i * istride + j, "input has been overwritten"); for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(out1[i * ostride + j] == -i * ostride + j, "output has been overwritten"); fftw(validated_plan, 1, in2, 1, n, out2, 1, n); if (dir == FFTW_REAL_TO_COMPLEX) { int n2 = (n + 1) / 2; out3[0] = c_re(out2[0]); for (i = 1; i < n2; ++i) { out3[i] = c_re(out2[i]); out3[n - i] = c_im(out2[i]); } if (n2 * 2 == n) out3[n2] = c_re(out2[n2]); } else { for (i = 0; i < n; ++i) out3[i] = c_re(out2[i]); } for (j = 0; j < howmany; ++j) CHECK(compute_error(out1 + j * n * ostride, ostride, out3, 1, n) < TOLERANCE, "test_out_of_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out1); fftw_free(out2); fftw_free(out3); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in2, *out2; fftw_real *in1, *out1, *out3; fftw_plan plan; int i, j; int ostride = istride; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_real *) fftw_malloc(istride * n * sizeof(fftw_real) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out1 = in1; out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out3 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); if (!specific) plan = rfftw_create_plan(n, dir, flags); else plan = rfftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); CHECK(plan != NULL, "can't create plan"); /* generate random inputs */ fill_random(in1, n, istride); for (j = 1; j < howmany; ++j) for (i = 0; i < n; ++i) in1[(j * n + i) * istride] = in1[i * istride]; /* copy random inputs to complex array for comparison with fftw: */ if (dir == FFTW_REAL_TO_COMPLEX) for (i = 0; i < n; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = 0.0; } else { int n2 = (n + 1) / 2; c_re(in2[0]) = in1[0]; c_im(in2[0]) = 0.0; for (i = 1; i < n2; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = in1[(n - i) * istride]; } if (n2 * 2 == n) { c_re(in2[n2]) = in1[n2 * istride]; c_im(in2[n2]) = 0.0; ++i; } for (; i < n; ++i) { c_re(in2[i]) = c_re(in2[n - i]); c_im(in2[i]) = -c_im(in2[n - i]); } } /* * fill in other positions of the array, to make sure that * rfftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) in1[i * istride + j] = i * istride + j; WHEN_VERBOSE(2, rfftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || coinflip()) rfftw(plan, howmany, in1, istride, n * istride, 0, 0, 0); else rfftw_one(plan, in1, NULL); rfftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(out1[i * ostride + j] == i * ostride + j, "output has been overwritten"); fftw(validated_plan, 1, in2, 1, n, out2, 1, n); if (dir == FFTW_REAL_TO_COMPLEX) { int n2 = (n + 1) / 2; out3[0] = c_re(out2[0]); for (i = 1; i < n2; ++i) { out3[i] = c_re(out2[i]); out3[n - i] = c_im(out2[i]); } if (n2 * 2 == n) out3[n2] = c_re(out2[n2]); } else { for (i = 0; i < n; ++i) out3[i] = c_re(out2[i]); } for (j = 0; j < howmany; ++j) CHECK(compute_error(out1 + j * n * ostride, ostride, out3, 1, n) < TOLERANCE, "test_in_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out2); fftw_free(out3); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_FORWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_BACKWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_correctness(int n) { int istride, ostride, howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, printf("Testing correctness for n = %d...", n); fflush(stdout)); /* produce a *good* plan (validated by Ergun's test procedure) */ validated_plan_forward = fftw_create_plan(n, FFTW_FORWARD, measure_flag | wisdom_flag); validated_plan_backward = fftw_create_plan(n, FFTW_BACKWARD, measure_flag | wisdom_flag); CHECK(validated_plan_forward != NULL, "can't create plan"); CHECK(validated_plan_backward != NULL, "can't create plan"); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_out_of_place_both(n, istride, ostride, howmany, validated_plan_forward, validated_plan_backward); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_in_place_both(n, istride, howmany, validated_plan_forward, validated_plan_backward); fftw_destroy_plan(validated_plan_forward); fftw_destroy_plan(validated_plan_backward); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); WHEN_VERBOSE(1, printf("OK\n")); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftwnd_plan validated_plan) { int istride, ostride; int N, dim, i, j, k; int nc, nhc, nr; fftw_real *in1, *out3; fftw_complex *in2, *out1, *out2; fftwnd_plan p, ip; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; N = nc = nr = nhc = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (rank > 0) { nr = n[rank - 1]; nc = N / nr; nhc = nr / 2 + 1; } in1 = (fftw_real *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_real)); out3 = (fftw_real *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_real)); out1 = (fftw_complex *) fftw_malloc(nhc * nc * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); p = rfftwnd_create_plan(rank, n, FFTW_REAL_TO_COMPLEX, flags); ip = rfftwnd_create_plan(rank, n, FFTW_COMPLEX_TO_REAL, flags); CHECK(p != NULL && ip != NULL, "can't create plan"); for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < nc; ++i) for (j = 0; j < nr; ++j) { c_re(in2[i * nr + j]) = DRAND(); c_im(in2[i * nr + j]) = 0.0; for (k = 0; k < istride; ++k) in1[(i * nr + j) * istride + k] = c_re(in2[i * nr + j]); } for (i = 0; i < N * istride; ++i) out3[i] = 0.0; fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) { int howmany = (istride < ostride) ? istride : ostride; WHEN_VERBOSE(2, printf("\n testing stride %d/%d...", istride, ostride)); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_real_to_complex(p, howmany, in1, istride, 1, out1, ostride, 1); else rfftwnd_one_real_to_complex(p, in1, out1); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error_complex(out1 + i * nhc * ostride + k, ostride, out2 + i * nr, 1, nhc) < TOLERANCE, "out-of-place (r2c): wrong answer"); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_complex_to_real(ip, howmany, out1, ostride, 1, out3, istride, 1); else rfftwnd_one_complex_to_real(ip, out1, out3); for (i = 0; i < N * istride; ++i) out3[i] *= 1.0 / N; if (istride == howmany) CHECK(compute_error(out3, 1, in1, 1, N * istride) < TOLERANCE, "out-of-place (c2r): wrong answer"); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error(out3 + i * nr * istride + k, istride, (fftw_real *) (in2 + i * nr), 2, nr) < TOLERANCE, "out-of-place (c2r): wrong answer (check 2)"); } } rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(ip); fftw_free(out3); fftw_free(out2); fftw_free(in2); fftw_free(out1); fftw_free(in1); } void testnd_in_place(int rank, int *n, fftwnd_plan validated_plan, int alternate_api, int specific) { int istride, ostride, howmany; int N, dim, i, j, k; int nc, nhc, nr; fftw_real *in1, *out3; fftw_complex *in2, *out1, *out2; fftwnd_plan p, ip; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; N = nc = nr = nhc = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (rank > 0) { nr = n[rank - 1]; nc = N / nr; nhc = nr / 2 + 1; } in1 = (fftw_real *) fftw_malloc(2 * nhc * nc * MAX_STRIDE * sizeof(fftw_real)); out3 = in1; out1 = (fftw_complex *) in1; in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); if (alternate_api && specific && (rank == 2 || rank == 3)) { if (rank == 2) { p = rfftw2d_create_plan_specific(n[0], n[1], FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, 0, 0); ip = rfftw2d_create_plan_specific(n[0], n[1], FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, 0, 0); } else { p = rfftw3d_create_plan_specific(n[0], n[1], n[2], FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, 0, 0); ip = rfftw3d_create_plan_specific(n[0], n[1], n[2], FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, 0, 0); } } else if (specific) { p = rfftwnd_create_plan_specific(rank, n, FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, in1, MAX_STRIDE); ip = rfftwnd_create_plan_specific(rank, n, FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, in1, MAX_STRIDE); } else if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) { p = rfftw2d_create_plan(n[0], n[1], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw2d_create_plan(n[0], n[1], FFTW_COMPLEX_TO_REAL, flags); } else { p = rfftw3d_create_plan(n[0], n[1], n[2], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw3d_create_plan(n[0], n[1], n[2], FFTW_COMPLEX_TO_REAL, flags); } } else { p = rfftwnd_create_plan(rank, n, FFTW_REAL_TO_COMPLEX, flags); ip = rfftwnd_create_plan(rank, n, FFTW_COMPLEX_TO_REAL, flags); } CHECK(p != NULL && ip != NULL, "can't create plan"); for (i = 0; i < nc * nhc * 2 * MAX_STRIDE; ++i) out3[i] = 0; for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < nc; ++i) for (j = 0; j < nr; ++j) { c_re(in2[i * nr + j]) = DRAND(); c_im(in2[i * nr + j]) = 0.0; for (k = 0; k < istride; ++k) in1[(i * nhc * 2 + j) * istride + k] = c_re(in2[i * nr + j]); } fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); howmany = ostride = istride; WHEN_VERBOSE(2, printf("\n testing in-place stride %d...", istride)); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_real_to_complex(p, howmany, in1, istride, 1, out1, ostride, 1); else rfftwnd_one_real_to_complex(p, in1, NULL); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error_complex(out1 + i * nhc * ostride + k, ostride, out2 + i * nr, 1, nhc) < TOLERANCE, "in-place (r2c): wrong answer"); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_complex_to_real(ip, howmany, out1, ostride, 1, out3, istride, 1); else rfftwnd_one_complex_to_real(ip, out1, NULL); for (i = 0; i < nc * nhc * 2 * istride; ++i) out3[i] *= 1.0 / N; for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error(out3 + i * nhc * 2 * istride + k, istride, (fftw_real *) (in2 + i * nr), 2, nr) < TOLERANCE, "in-place (c2r): wrong answer (check 2)"); } rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(ip); fftw_free(out2); fftw_free(in2); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; if (dir != FFTW_FORWARD) return; if (force_buf) return; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag); CHECK(validated_plan != NULL, "can't create plan"); testnd_out_of_place(sz.rank, sz.narray, validated_plan); testnd_in_place(sz.rank, sz.narray, validated_plan, alt_api, specific); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { /* * create and destroy many plans, at random. Check the * garbage-collecting allocator of twiddle factors */ int i, dim; int r, s; fftw_plan p[PLANNER_TEST_SIZE]; fftwnd_plan pnd[PLANNER_TEST_SIZE]; int *narr, maxdim; chk_mem_leak = 0; verbose--; please_wait(); if (rank < 1) rank = 1; narr = (int *) fftw_malloc(rank * sizeof(int)); maxdim = (int) pow(8192.0, 1.0/rank); for (i = 0; i < PLANNER_TEST_SIZE; ++i) { p[i] = (fftw_plan) 0; pnd[i] = (fftwnd_plan) 0; } for (i = 0; i < PLANNER_TEST_SIZE * PLANNER_TEST_SIZE; ++i) { r = rand(); if (r < 0) r = -r; r = r % PLANNER_TEST_SIZE; for (dim = 0; dim < rank; ++dim) { do { s = rand(); if (s < 0) s = -s; s = s % maxdim + 1; } while (s == 0); narr[dim] = s; } if (rank == 1) { if (p[r]) rfftw_destroy_plan(p[r]); p[r] = rfftw_create_plan(narr[0], random_dir(), measure_flag | wisdom_flag); if (paranoid && narr[0] < 200) test_correctness(narr[0]); } if (pnd[r]) rfftwnd_destroy_plan(pnd[r]); pnd[r] = rfftwnd_create_plan(rank, narr, random_dir(), measure_flag | wisdom_flag); if (i % (PLANNER_TEST_SIZE * PLANNER_TEST_SIZE / 20) == 0) { WHEN_VERBOSE(0, printf("test planner: so far so good\n")); WHEN_VERBOSE(0, printf("test planner: iteration %d out of %d\n", i, PLANNER_TEST_SIZE * PLANNER_TEST_SIZE)); } } for (i = 0; i < PLANNER_TEST_SIZE; ++i) { if (p[i]) rfftw_destroy_plan(p[i]); if (pnd[i]) rfftwnd_destroy_plan(pnd[i]); } fftw_free(narr); verbose++; chk_mem_leak = 1; } /************************************************* * Ergun's test for real->complex transforms *************************************************/ static void rfill_random(fftw_real *a, int n) { int i; for (i = 0; i < n; ++i) { a[i] = DRAND(); } } static void rarray_copy(fftw_real *out, fftw_real *in, int n) { int i; for (i = 0; i < n; ++i) out[i] = in[i]; } /* C = A + B */ void rarray_add(fftw_real *C, fftw_real *A, fftw_real *B, int n) { int i; for (i = 0; i < n; ++i) { C[i] = A[i] + B[i]; } } /* C = A - B */ void rarray_sub(fftw_real *C, fftw_real *A, fftw_real *B, int n) { int i; for (i = 0; i < n; ++i) { C[i] = A[i] - B[i]; } } /* B = rotate left A */ void rarray_rol(fftw_real *B, fftw_real *A, int n, int n_before, int n_after) { int i, ib, ia; for (ib = 0; ib < n_before; ++ib) { for (i = 0; i < n - 1; ++i) for (ia = 0; ia < n_after; ++ia) B[(ib * n + i) * n_after + ia] = A[(ib * n + i + 1) * n_after + ia]; for (ia = 0; ia < n_after; ++ia) B[(ib * n + n - 1) * n_after + ia] = A[ib * n * n_after + ia]; } } /* A = alpha * B (out of place) */ void rarray_scale(fftw_real *A, fftw_real *B, fftw_real alpha, int n) { int i; for (i = 0; i < n; ++i) { A[i] = B[i] * alpha; } } void rarray_compare(fftw_real *A, fftw_real *B, int n) { double d = compute_error(A, 1, B, 1, n); if (d > TOLERANCE) { fflush(stdout); fprintf(stderr, "Found relative error %e\n", d); fftw_die("failure in Ergun's verification procedure\n"); } } /* * guaranteed out-of-place transform. Does the necessary * copying if the plan is in-place. */ static void rfftw_out_of_place(fftw_plan plan, int n, fftw_real *in, fftw_real *out) { if (plan->flags & FFTW_IN_PLACE) { rarray_copy(out, in, n); rfftw(plan, 1, out, 1, n, (fftw_real *)0, 1, n); } else { rfftw(plan, 1, in, 1, n, out, 1, n); } } /* * This is a real (as opposed to complex) variation of the FFT tester * described in * * Funda Ergün. Testing multivariate linear functions: Overcoming the * generator bottleneck. In Proceedings of the Twenty-Seventh Annual * ACM Symposium on the Theory of Computing, pages 407-416, Las Vegas, * Nevada, 29 May--1 June 1995. */ void test_ergun(int n, fftw_direction dir, fftw_plan plan) { fftw_real *inA, *inB, *inC, *outA, *outB, *outC; fftw_real *inA1, *inB1; fftw_real *tmp; int i; int rounds = 20; FFTW_TRIG_REAL twopin = FFTW_K2PI / (FFTW_TRIG_REAL) n; inA = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); inB = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); inA1 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); inB1 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); inC = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); outA = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); outB = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); outC = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); WHEN_VERBOSE(2, printf("Validating plan, n = %d, dir = %s\n", n, dir == FFTW_REAL_TO_COMPLEX ? "REAL_TO_COMPLEX" : "COMPLEX_TO_REAL")); /* test 1: check linearity */ for (i = 0; i < rounds; ++i) { fftw_real alpha, beta; alpha = DRAND(); beta = DRAND(); rfill_random(inA, n); rfill_random(inB, n); rarray_scale(inA1, inA, alpha, n); rarray_scale(inB1, inB, beta, n); rarray_add(inC, inA1, inB1, n); rfftw_out_of_place(plan, n, inA, outA); rfftw_out_of_place(plan, n, inB, outB); rarray_scale(outA, outA, alpha, n); rarray_scale(outB, outB, beta, n); rarray_add(tmp, outA, outB, n); rfftw_out_of_place(plan, n, inC, outC); rarray_compare(outC, tmp, n); } /* test 2: check that the unit impulse is transformed properly */ for (i = 0; i < n; ++i) { /* impulse */ inA[i] = 0.0; /* transform of the impulse */ if (2 * i <= n) outA[i] = 1.0; else outA[i] = 0.0; } inA[0] = 1.0; if (dir == FFTW_REAL_TO_COMPLEX) { for (i = 0; i < rounds; ++i) { rfill_random(inB, n); rarray_sub(inC, inA, inB, n); rfftw_out_of_place(plan, n, inB, outB); rfftw_out_of_place(plan, n, inC, outC); rarray_add(tmp, outB, outC, n); rarray_compare(tmp, outA, n); } } else { for (i = 0; i < rounds; ++i) { rfill_random(outB, n); rarray_sub(outC, outA, outB, n); rfftw_out_of_place(plan, n, outB, inB); rfftw_out_of_place(plan, n, outC, inC); rarray_add(tmp, inB, inC, n); rarray_scale(tmp, tmp, 1.0 / ((double) n), n); rarray_compare(tmp, inA, n); } } /* test 3: check the time-shift property */ /* the paper performs more tests, but this code should be fine too */ if (dir == FFTW_REAL_TO_COMPLEX) { for (i = 0; i < rounds; ++i) { int j; rfill_random(inA, n); rarray_rol(inB, inA, n, 1, 1); rfftw_out_of_place(plan, n, inA, outA); rfftw_out_of_place(plan, n, inB, outB); tmp[0] = outB[0]; for (j = 1; 2 * j < n; ++j) { FFTW_TRIG_REAL s = dir * FFTW_TRIG_SIN(j * twopin); FFTW_TRIG_REAL c = FFTW_TRIG_COS(j * twopin); tmp[j] = outB[j] * c - outB[n - j] * s; tmp[n - j] = outB[j] * s + outB[n - j] * c; } if (2 * j == n) tmp[j] = -outB[j]; rarray_compare(tmp, outA, n); } } else { for (i = 0; i < rounds; ++i) { int j; rfill_random(inA, n); inB[0] = inA[0]; for (j = 1; 2 * j < n; ++j) { FFTW_TRIG_REAL s = dir * FFTW_TRIG_SIN(j * twopin); FFTW_TRIG_REAL c = FFTW_TRIG_COS(j * twopin); inB[j] = inA[j] * c - inA[n - j] * s; inB[n - j] = inA[j] * s + inA[n - j] * c; } if (2 * j == n) inB[j] = -inA[j]; rfftw_out_of_place(plan, n, inA, outA); rfftw_out_of_place(plan, n, inB, outB); rarray_rol(tmp, outA, n, 1, 1); rarray_compare(tmp, outB, n); } } WHEN_VERBOSE(2, printf("Validation done\n")); fftw_free(tmp); fftw_free(outC); fftw_free(outB); fftw_free(outA); fftw_free(inC); fftw_free(inB1); fftw_free(inA1); fftw_free(inB); fftw_free(inA); } static void rfftw_plan_hook_function(fftw_plan p) { WHEN_VERBOSE(3, printf("Validating tentative plan\n")); WHEN_VERBOSE(3, fftw_print_plan(p)); test_ergun(p->n, p->dir, p); } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { } void test_finish(void) { } void enter_paranoid_mode(void) { rfftw_plan_hook = rfftw_plan_hook_function; } int get_option(int argc, char **argv, char *argval, int argval_maxlen) { return default_get_option(argc,argv,argval,argval_maxlen); } ���������������������������������������������������������������������fftw-2.1.5/doc/�������������������������������������������������������������������������������������0002777�0001754�0000144�00000000000�07637531661�007017� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������fftw-2.1.5/doc/fftw.texi����������������������������������������������������������������������������0000644�0001754�0000144�00000620177�07635206026�010577� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*- texinfo -*- @c % $Id: fftw.texi,v 1.256 2003/01/15 21:09:33 stevenj Exp $ @c %**start of header @setfilename fftw.info @settitle FFTW @c %**end of header @include version.texi @setchapternewpage odd @c define constant index (ct) @defcodeindex ct @syncodeindex ct fn @syncodeindex vr fn @syncodeindex pg fn @syncodeindex tp fn @c define foreign function index (ff) @defcodeindex ff @syncodeindex ff cp @c define foreign constant index (fc) @defcodeindex fc @syncodeindex fc cp @c define foreign program index (fp) @defcodeindex fp @syncodeindex fp cp @ifinfo This is the FFTW User's manual. Copyright @copyright{} 1997--1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. @end ifinfo @titlepage @sp 10 @comment The title is printed in a large font. @title{FFTW User's Manual} @subtitle For version @value{VERSION}, @value{UPDATED} @author{Matteo Frigo} @author{Steven G. Johnson} @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll Copyright @copyright{} 1997--1999 Massachusetts Institute of Technology. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. @end titlepage @node Top, Introduction, (dir), (dir) @ifinfo @top FFTW User Manual Welcome to FFTW, the Fastest Fourier Transform in the West. FFTW is a collection of fast C routines to compute the discrete Fourier transform. This manual documents FFTW version @value{VERSION}. @end ifinfo @menu * Introduction:: * Tutorial:: * FFTW Reference:: * Parallel FFTW:: * Calling FFTW from Fortran:: * Installation and Customization:: * Acknowledgments:: * License and Copyright:: * Concept Index:: * Library Index:: @detailmenu --- The Detailed Node Listing --- Tutorial * Complex One-dimensional Transforms Tutorial:: * Complex Multi-dimensional Transforms Tutorial:: * Real One-dimensional Transforms Tutorial:: * Real Multi-dimensional Transforms Tutorial:: * Multi-dimensional Array Format:: * Words of Wisdom:: Multi-dimensional Array Format * Row-major Format:: * Column-major Format:: * Static Arrays in C:: * Dynamic Arrays in C:: * Dynamic Arrays in C-The Wrong Way:: Words of Wisdom * Caveats in Using Wisdom:: What you should worry about in using wisdom * Importing and Exporting Wisdom:: I/O of wisdom to disk and other media FFTW Reference * Data Types:: real, complex, and halfcomplex numbers * One-dimensional Transforms Reference:: * Multi-dimensional Transforms Reference:: * Real One-dimensional Transforms Reference:: * Real Multi-dimensional Transforms Reference:: * Wisdom Reference:: * Memory Allocator Reference:: * Thread safety:: One-dimensional Transforms Reference * fftw_create_plan:: Plan Creation * Discussion on Specific Plans:: * fftw:: Plan Execution * fftw_destroy_plan:: Plan Destruction * What FFTW Really Computes:: Definition of the DFT. Multi-dimensional Transforms Reference * fftwnd_create_plan:: Plan Creation * fftwnd:: Plan Execution * fftwnd_destroy_plan:: Plan Destruction * What FFTWND Really Computes:: Real One-dimensional Transforms Reference * rfftw_create_plan:: Plan Creation * rfftw:: Plan Execution * rfftw_destroy_plan:: Plan Destruction * What RFFTW Really Computes:: Real Multi-dimensional Transforms Reference * rfftwnd_create_plan:: Plan Creation * rfftwnd:: Plan Execution * Array Dimensions for Real Multi-dimensional Transforms:: * Strides in In-place RFFTWND:: * rfftwnd_destroy_plan:: Plan Destruction * What RFFTWND Really Computes:: Wisdom Reference * fftw_export_wisdom:: * fftw_import_wisdom:: * fftw_forget_wisdom:: Parallel FFTW * Multi-threaded FFTW:: * MPI FFTW:: Multi-threaded FFTW * Installation and Supported Hardware/Software:: * Usage of Multi-threaded FFTW:: * How Many Threads to Use?:: * Using Multi-threaded FFTW in a Multi-threaded Program:: * Tips for Optimal Threading:: MPI FFTW * MPI FFTW Installation:: * Usage of MPI FFTW for Complex Multi-dimensional Transforms:: * MPI Data Layout:: * Usage of MPI FFTW for Real Multi-dimensional Transforms:: * Usage of MPI FFTW for Complex One-dimensional Transforms:: * MPI Tips:: Calling FFTW from Fortran * Wrapper Routines:: * FFTW Constants in Fortran:: * Fortran Examples:: Installation and Customization * Installation on Unix:: * Installation on non-Unix Systems:: * Installing FFTW in both single and double precision:: * gcc and Pentium hacks:: * Customizing the timer:: * Generating your own code:: @end detailmenu @end menu @c ************************************************************ @node Introduction, Tutorial, Top, Top @chapter Introduction This manual documents version @value{VERSION} of FFTW, the @emph{Fastest Fourier Transform in the West}. FFTW is a comprehensive collection of fast C routines for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. FFTW also includes parallel transforms for both shared- and distributed-memory systems. We assume herein that the reader is already familiar with the properties and uses of the DFT that are relevant to her application. Otherwise, see e.g. @cite{The Fast Fourier Transform} by E. O. Brigham (Prentice-Hall, Englewood Cliffs, NJ, 1974). @uref{http://www.fftw.org, Our web page} also has links to FFT-related information online. @cindex FFTW FFTW is usually faster (and sometimes much faster) than all other freely-available Fourier transform programs found on the Net. For transforms whose size is a power of two, it compares favorably with the FFT codes in Sun's Performance Library and IBM's ESSL library, which are targeted at specific machines. Moreover, FFTW's performance is @emph{portable}. Indeed, FFTW is unique in that it automatically adapts itself to your machine, your cache, the size of your memory, the number of registers, and all the other factors that normally make it impossible to optimize a program for more than one machine. An extensive comparison of FFTW's performance with that of other Fourier transform codes has been made. The results are available on the Web at @uref{http://theory.lcs.mit.edu/~benchfft, the benchFFT home page}. @cindex benchmark @fpindex benchfft In order to use FFTW effectively, you need to understand one basic concept of FFTW's internal structure. FFTW does not used a fixed algorithm for computing the transform, but it can adapt the DFT algorithm to details of the underlying hardware in order to achieve best performance. Hence, the computation of the transform is split into two phases. First, FFTW's @dfn{planner} is called, which ``learns'' the @cindex plan fastest way to compute the transform on your machine. The planner @cindex planner produces a data structure called a @dfn{plan} that contains this information. Subsequently, the plan is passed to FFTW's @dfn{executor}, @cindex executor along with an array of input data. The executor computes the actual transform, as dictated by the plan. The plan can be reused as many times as needed. In typical high-performance applications, many transforms of the same size are computed, and consequently a relatively-expensive initialization of this sort is acceptable. On the other hand, if you need a single transform of a given size, the one-time cost of the planner becomes significant. For this case, FFTW provides fast planners based on heuristics or on previously computed plans. The pattern of planning/execution applies to all four operation modes of FFTW, that is, @w{I) one-dimensional} complex transforms (FFTW), @w{II) multi-dimensional} complex transforms (FFTWND), @w{III) one-dimensional} transforms of real data (RFFTW), @w{IV) multi-dimensional} transforms of real data (RFFTWND). Each mode comes with its own planner and executor. Besides the automatic performance adaptation performed by the planner, it is also possible for advanced users to customize FFTW for their special needs. As distributed, FFTW works most efficiently for arrays whose size can be factored into small primes (@math{2}, @math{3}, @math{5}, and @math{7}), and uses a slower general-purpose routine for other factors. FFTW, however, comes with a code generator that can produce fast C programs for any particular array size you may care about. @cindex code generator For example, if you need transforms of size @ifinfo @math{513 = 19 x 3^3}, @end ifinfo @tex $513 = 19 \cdot 3^3$, @end tex @ifhtml 513 = 19*33, @end ifhtml you can customize FFTW to support the factor @math{19} efficiently. FFTW can exploit multiple processors if you have them. FFTW comes with a shared-memory implementation on top of POSIX (and similar) threads, as well as a distributed-memory implementation based on MPI. @cindex parallel transform @cindex threads @cindex MPI We also provide an experimental parallel implementation written in Cilk, @emph{the superior programming tool of choice for discriminating hackers} (Olin Shivers). (See @uref{http://supertech.lcs.mit.edu/cilk, the Cilk home page}.) @cindex Cilk For more information regarding FFTW, see the paper, ``The Fastest Fourier Transform in the West,'' by M. Frigo and S. G. Johnson, which is the technical report MIT-LCS-TR-728 (Sep. '97). See also, ``FFTW: An Adaptive Software Architecture for the FFT,'' by M. Frigo and S. G. Johnson, which appeared in the 23rd International Conference on Acoustics, Speech, and Signal Processing (@cite{Proc. ICASSP 1998} @b{3}, p. 1381). The code generator is described in the paper ``A Fast Fourier Transform Compiler'', @cindex compiler by M. Frigo, to appear in the @cite{Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Atlanta, Georgia, May 1999}. These papers, along with the latest version of FFTW, the FAQ, benchmarks, and other links, are available at @uref{http://www.fftw.org, the FFTW home page}. The current version of FFTW incorporates many good ideas from the past thirty years of FFT literature. In one way or another, FFTW uses the Cooley-Tukey algorithm, the Prime Factor algorithm, Rader's algorithm for prime sizes, and the split-radix algorithm (with a variation due to Dan Bernstein). Our code generator also produces new algorithms that we do not yet completely understand. @cindex algorithm The reader is referred to the cited papers for the appropriate references. The rest of this manual is organized as follows. We first discuss the sequential (one-processor) implementation. We start by describing the basic features of FFTW in @ref{Tutorial}. This discussion includes the storage scheme of multi-dimensional arrays (@ref{Multi-dimensional Array Format}) and FFTW's mechanisms for storing plans on disk (@ref{Words of Wisdom}). Next, @ref{FFTW Reference} provides comprehensive documentation of all FFTW's features. Parallel transforms are discussed in their own chapter @ref{Parallel FFTW}. Fortran programmers can also use FFTW, as described in @ref{Calling FFTW from Fortran}. @ref{Installation and Customization} explains how to install FFTW in your computer system and how to adapt FFTW to your needs. License and copyright information is given in @ref{License and Copyright}. Finally, we thank all the people who helped us in @ref{Acknowledgments}. @c ************************************************************ @node Tutorial, FFTW Reference, Introduction, Top @chapter Tutorial @cindex Tutorial This chapter describes the basic usage of FFTW, i.e., how to compute the Fourier transform of a single array. This chapter tells the truth, but not the @emph{whole} truth. Specifically, FFTW implements additional routines and flags, providing extra functionality, that are not documented here. @xref{FFTW Reference}, for more complete information. (Note that you need to compile and install FFTW before you can use it in a program. @xref{Installation and Customization}, for the details of the installation.) Here, we assume a default installation of FFTW. In some installations (particulary from binary packages), the FFTW header files and libraries are prefixed with @samp{@code{d}} or @samp{@code{s}} to indicate versions in double or single precision, respectively. The usage of FFTW in that case is the same, except that @code{#include} directives and link commands must use the appropriate prefix. @xref{Installing FFTW in both single and double precision}, for more information. This tutorial chapter is structured as follows. @ref{Complex One-dimensional Transforms Tutorial} describes the basic usage of the one-dimensional transform of complex data. @ref{Complex Multi-dimensional Transforms Tutorial} describes the basic usage of the multi-dimensional transform of complex data. @ref{Real One-dimensional Transforms Tutorial} describes the one-dimensional transform of real data and its inverse. Finally, @ref{Real Multi-dimensional Transforms Tutorial} describes the multi-dimensional transform of real data and its inverse. We recommend that you read these sections in the order that they are presented. We then discuss two topics in detail. In @ref{Multi-dimensional Array Format}, we discuss the various alternatives for storing multi-dimensional arrays in memory. @ref{Words of Wisdom} shows how you can save FFTW's plans for future use. @menu * Complex One-dimensional Transforms Tutorial:: * Complex Multi-dimensional Transforms Tutorial:: * Real One-dimensional Transforms Tutorial:: * Real Multi-dimensional Transforms Tutorial:: * Multi-dimensional Array Format:: * Words of Wisdom:: @end menu @node Complex One-dimensional Transforms Tutorial, Complex Multi-dimensional Transforms Tutorial, Tutorial, Tutorial @section Complex One-dimensional Transforms Tutorial @cindex complex one-dimensional transform @cindex complex transform The basic usage of FFTW is simple. A typical call to FFTW looks like: @example #include ... @{ fftw_complex in[N], out[N]; fftw_plan p; ... p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE); ... fftw_one(p, in, out); ... fftw_destroy_plan(p); @} @end example The first thing we do is to create a @dfn{plan}, which is an object @cindex plan that contains all the data that FFTW needs to compute the FFT, using the following function: @example fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); @end example @findex fftw_create_plan @findex fftw_direction @tindex fftw_plan The first argument, @code{n}, is the size of the transform you are trying to compute. The size @code{n} can be any positive integer, but sizes that are products of small factors are transformed most efficiently. The second argument, @code{dir}, can be either @code{FFTW_FORWARD} or @code{FFTW_BACKWARD}, and indicates the direction of the transform you @ctindex FFTW_FORWARD @ctindex FFTW_BACKWARD are interested in. Alternatively, you can use the sign of the exponent in the transform, @math{-1} or @math{+1}, which corresponds to @code{FFTW_FORWARD} or @code{FFTW_BACKWARD} respectively. The @code{flags} argument is either @code{FFTW_MEASURE} or @cindex flags @code{FFTW_ESTIMATE}. @code{FFTW_MEASURE} means that FFTW actually runs @ctindex FFTW_MEASURE and measures the execution time of several FFTs in order to find the best way to compute the transform of size @code{n}. This may take some time, depending on your installation and on the precision of the timer in your machine. @code{FFTW_ESTIMATE}, on the contrary, does not run any computation, and just builds a @ctindex FFTW_ESTIMATE reasonable plan, which may be sub-optimal. In other words, if your program performs many transforms of the same size and initialization time is not important, use @code{FFTW_MEASURE}; otherwise use the estimate. (A compromise between these two extremes exists. @xref{Words of Wisdom}.) Once the plan has been created, you can use it as many times as you like for transforms on arrays of the same size. When you are done with the plan, you deallocate it by calling @code{fftw_destroy_plan(plan)}. @findex fftw_destroy_plan The transform itself is computed by passing the plan along with the input and output arrays to @code{fftw_one}: @example void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); @end example @findex fftw_one Note that the transform is out of place: @code{in} and @code{out} must point to distinct arrays. It operates on data of type @code{fftw_complex}, a data structure with real (@code{in[i].re}) and imaginary (@code{in[i].im}) floating-point components. The @code{in} and @code{out} arrays should have the length specified when the plan was created. An alternative function, @code{fftw}, allows you to efficiently perform multiple and/or strided transforms (@pxref{FFTW Reference}). @tindex fftw_complex The DFT results are stored in-order in the array @code{out}, with the zero-frequency (DC) component in @code{out[0]}. @cindex frequency The array @code{in} is not modified. Users should note that FFTW computes an unnormalized DFT, the sign of whose exponent is given by the @code{dir} parameter of @code{fftw_create_plan}. Thus, computing a forward followed by a backward transform (or vice versa) results in the original array scaled by @code{n}. @xref{What FFTW Really Computes}, for the definition of DFT. @cindex normalization A program using FFTW should be linked with @code{-lfftw -lm} on Unix systems, or with the FFTW and standard math libraries in general. @cindex linking on Unix @node Complex Multi-dimensional Transforms Tutorial, Real One-dimensional Transforms Tutorial, Complex One-dimensional Transforms Tutorial, Tutorial @section Complex Multi-dimensional Transforms Tutorial @cindex complex multi-dimensional transform @cindex multi-dimensional transform FFTW can also compute transforms of any number of dimensions (@dfn{rank}). The syntax is similar to that for the one-dimensional @cindex rank transforms, with @samp{fftw_} replaced by @samp{fftwnd_} (which stands for ``@code{fftw} in @code{N} dimensions''). As before, we @code{#include } and create a plan for the transforms, this time of type @code{fftwnd_plan}: @example fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); @end example @tindex fftwnd_plan @tindex fftw_direction @findex fftwnd_create_plan @code{rank} is the dimensionality of the array, and can be any non-negative integer. The next argument, @code{n}, is a pointer to an integer array of length @code{rank} containing the (positive) sizes of each dimension of the array. (Note that the array will be stored in row-major order. @xref{Multi-dimensional Array Format}, for information on row-major order.) The last two parameters are the same as in @code{fftw_create_plan}. We now, however, have an additional possible flag, @code{FFTW_IN_PLACE}, since @code{fftwnd} supports true in-place @cindex flags @ctindex FFTW_IN_PLACE @findex fftwnd transforms. Multiple flags are combined using a bitwise @dfn{or} (@samp{|}). (An @dfn{in-place} transform is one in which the output data overwrite the input data. It thus requires half as much memory as---and is often faster than---its opposite, an @dfn{out-of-place} transform.) @cindex in-place transform @cindex out-of-place transform For two- and three-dimensional transforms, FFTWND provides alternative routines that accept the sizes of each dimension directly, rather than indirectly through a rank and an array of sizes. These are otherwise identical to @code{fftwnd_create_plan}, and are sometimes more convenient: @example fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); @end example @findex fftw2d_create_plan @findex fftw3d_create_plan Once the plan has been created, you can use it any number of times for transforms of the same size. When you do not need a plan anymore, you can deallocate the plan by calling @code{fftwnd_destroy_plan(plan)}. @findex fftwnd_destroy_plan Given a plan, you can compute the transform of an array of data by calling: @example void fftwnd_one(fftwnd_plan plan, fftw_complex *in, fftw_complex *out); @end example @findex fftwnd_one Here, @code{in} and @code{out} point to multi-dimensional arrays in row-major order, of the size specified when the plan was created. In the case of an in-place transform, the @code{out} parameter is ignored and the output data are stored in the @code{in} array. The results are stored in-order, unnormalized, with the zero-frequency component in @code{out[0]}. @cindex frequency A forward followed by a backward transform (or vice-versa) yields the original data multiplied by the size of the array (i.e. the product of the dimensions). @xref{What FFTWND Really Computes}, for a discussion of what FFTWND computes. @cindex normalization For example, code to perform an in-place FFT of a three-dimensional array might look like: @example #include ... @{ fftw_complex in[L][M][N]; fftwnd_plan p; ... p = fftw3d_create_plan(L, M, N, FFTW_FORWARD, FFTW_MEASURE | FFTW_IN_PLACE); ... fftwnd_one(p, &in[0][0][0], NULL); ... fftwnd_destroy_plan(p); @} @end example Note that @code{in} is a statically-declared array, which is automatically in row-major order, but we must take the address of the first element in order to fit the type expected by @code{fftwnd_one}. (@xref{Multi-dimensional Array Format}.) @node Real One-dimensional Transforms Tutorial, Real Multi-dimensional Transforms Tutorial, Complex Multi-dimensional Transforms Tutorial, Tutorial @section Real One-dimensional Transforms Tutorial @cindex real transform @cindex complex to real transform @cindex RFFTW If the input data are purely real, you can save roughly a factor of two in both time and storage by using the @dfn{rfftw} transforms, which are FFTs specialized for real data. The output of a such a transform is a @dfn{halfcomplex} array, which consists of only half of the complex DFT amplitudes (since the negative-frequency amplitudes for real data are the complex conjugate of the positive-frequency amplitudes). @cindex halfcomplex array In exchange for these speed and space advantages, the user sacrifices some of the simplicity of FFTW's complex transforms. First of all, to allow maximum performance, the output format of the one-dimensional real transforms is different from that used by the multi-dimensional transforms. Second, the inverse transform (halfcomplex to real) has the side-effect of destroying its input array. Neither of these inconveniences should pose a serious problem for users, but it is important to be aware of them. (Both the inconvenient output format and the side-effect of the inverse transform can be ameliorated for one-dimensional transforms, at the expense of some performance, by using instead the multi-dimensional transform routines with a rank of one.) The computation of the plan is similar to that for the complex transforms. First, you @code{#include }. Then, you create a plan (of type @code{rfftw_plan}) by calling: @example rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); @end example @tindex rfftw_plan @tindex fftw_direction @findex rfftw_create_plan @code{n} is the length of the @emph{real} array in the transform (even for halfcomplex-to-real transforms), and can be any positive integer (although sizes with small factors are transformed more efficiently). @code{dir} is either @code{FFTW_REAL_TO_COMPLEX} or @code{FFTW_COMPLEX_TO_REAL}. @ctindex FFTW_REAL_TO_COMPLEX @ctindex FFTW_COMPLEX_TO_REAL The @code{flags} parameter is the same as in @code{fftw_create_plan}. Once created, a plan can be used for any number of transforms, and is deallocated when you are done with it by calling @code{rfftw_destroy_plan(plan)}. @findex rfftw_destroy_plan Given a plan, a real-to-complex or complex-to-real transform is computed by calling: @example void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); @end example @findex rfftw_one (Note that @code{fftw_real} is an alias for the floating-point type for which FFTW was compiled.) Depending upon the direction of the plan, either the input or the output array is halfcomplex, and is stored in the following format: @cindex halfcomplex array @tex $$ r_0, r_1, r_2, \ldots, r_{n/2}, i_{(n+1)/2-1}, \ldots, i_2, i_1 $$ @end tex @ifinfo r0, r1, r2, r(n/2), i((n+1)/2-1), ..., i2, i1 @end ifinfo @ifhtml

r0, r1, r2, ..., rn/2, i(n+1)/2-1, ..., i2, i1

@end ifhtml Here, @ifinfo rk @end ifinfo @tex $r_k$ @end tex @ifhtml rk @end ifhtml is the real part of the @math{k}th output, and @ifinfo ik @end ifinfo @tex $i_k$ @end tex @ifhtml ik @end ifhtml is the imaginary part. (We follow here the C convention that integer division is rounded down, e.g. @math{7 / 2 = 3}.) For a halfcomplex array @code{hc[]}, the @math{k}th component has its real part in @code{hc[k]} and its imaginary part in @code{hc[n-k]}, with the exception of @code{k} @code{==} @code{0} or @code{n/2} (the latter only if n is even)---in these two cases, the imaginary part is zero due to symmetries of the real-complex transform, and is not stored. Thus, the transform of @code{n} real values is a halfcomplex array of length @code{n}, and vice versa. @footnote{The output for the multi-dimensional rfftw is a more-conventional array of @code{fftw_complex} values, but the format here permitted us greater efficiency in one dimension.} This is actually only half of the DFT spectrum of the data. Although the other half can be obtained by complex conjugation, it is not required by many applications such as convolution and filtering. Like the complex transforms, the RFFTW transforms are unnormalized, so a forward followed by a backward transform (or vice-versa) yields the original data scaled by the length of the array, @code{n}. @cindex normalization Let us reiterate here our warning that an @code{FFTW_COMPLEX_TO_REAL} transform has the side-effect of destroying its (halfcomplex) input. The @code{FFTW_REAL_TO_COMPLEX} transform, however, leaves its (real) input untouched, just as you would hope. As an example, here is an outline of how you might use RFFTW to compute the power spectrum of a real array (i.e. the squares of the absolute values of the DFT amplitudes): @cindex power spectrum @example #include ... @{ fftw_real in[N], out[N], power_spectrum[N/2+1]; rfftw_plan p; int k; ... p = rfftw_create_plan(N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); ... rfftw_one(p, in, out); power_spectrum[0] = out[0]*out[0]; /* DC component */ for (k = 1; k < (N+1)/2; ++k) /* (k < N/2 rounded up) */ power_spectrum[k] = out[k]*out[k] + out[N-k]*out[N-k]; if (N % 2 == 0) /* N is even */ power_spectrum[N/2] = out[N/2]*out[N/2]; /* Nyquist freq. */ ... rfftw_destroy_plan(p); @} @end example Programs using RFFTW should link with @code{-lrfftw -lfftw -lm} on Unix, or with the FFTW, RFFTW, and math libraries in general. @cindex linking on Unix @node Real Multi-dimensional Transforms Tutorial, Multi-dimensional Array Format, Real One-dimensional Transforms Tutorial, Tutorial @section Real Multi-dimensional Transforms Tutorial @cindex real multi-dimensional transform FFTW includes multi-dimensional transforms for real data of any rank. As with the one-dimensional real transforms, they save roughly a factor of two in time and storage over complex transforms of the same size. Also as in one dimension, these gains come at the expense of some increase in complexity---the output format is different from the one-dimensional RFFTW (and is more similar to that of the complex FFTW) and the inverse (complex to real) transforms have the side-effect of overwriting their input data. To use the real multi-dimensional transforms, you first @code{#include } and then create a plan for the size and direction of transform that you are interested in: @example rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); @end example @tindex rfftwnd_plan @findex rfftwnd_create_plan The first two parameters describe the size of the real data (not the halfcomplex data, which will have different dimensions). The last two parameters are the same as those for @code{rfftw_create_plan}. Just as for fftwnd, there are two alternate versions of this routine, @code{rfftw2d_create_plan} and @code{rfftw3d_create_plan}, that are sometimes more convenient for two- and three-dimensional transforms. @findex rfftw2d_create_plan @findex rfftw3d_create_plan Also as in fftwnd, rfftwnd supports true in-place transforms, specified by including @code{FFTW_IN_PLACE} in the flags. Once created, a plan can be used for any number of transforms, and is deallocated by calling @code{rfftwnd_destroy_plan(plan)}. Given a plan, the transform is computed by calling one of the following two routines: @example void rfftwnd_one_real_to_complex(rfftwnd_plan plan, fftw_real *in, fftw_complex *out); void rfftwnd_one_complex_to_real(rfftwnd_plan plan, fftw_complex *in, fftw_real *out); @end example @findex rfftwnd_one_real_to_complex @findex rfftwnd_one_complex_to_real As is clear from their names and parameter types, the former function is for @code{FFTW_REAL_TO_COMPLEX} transforms and the latter is for @code{FFTW_COMPLEX_TO_REAL} transforms. (We could have used only a single routine, since the direction of the transform is encoded in the plan, but we wanted to correctly express the datatypes of the parameters.) The latter routine, as we discuss elsewhere, has the side-effect of overwriting its input (except when the rank of the array is one). In both cases, the @code{out} parameter is ignored for in-place transforms. The format of the complex arrays deserves careful attention. @cindex rfftwnd array format Suppose that the real data has dimensions @tex $n_1 \times n_2 \times \cdots \times n_d$ @end tex @ifinfo n1 x n2 x ... x nd @end ifinfo @ifhtml n1 x n2 x ... x nd @end ifhtml (in row-major order). Then, after a real-to-complex transform, the output is an @tex $n_1 \times n_2 \times \cdots \times (n_d/2+1)$ @end tex @ifinfo n1 x n2 x ... x (nd/2+1) @end ifinfo @ifhtml n1 x n2 x ... x (nd/2+1) @end ifhtml array of @code{fftw_complex} values in row-major order, corresponding to slightly over half of the output of the corresponding complex transform. (Note that the division is rounded down.) The ordering of the data is otherwise exactly the same as in the complex case. (In principle, the output could be exactly half the size of the complex transform output, but in more than one dimension this requires too complicated a format to be practical.) Note that, unlike the one-dimensional RFFTW, the real and imaginary parts of the DFT amplitudes are here stored together in the natural way. Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data---two extra if the last dimension is even and one if it is odd. @cindex padding That is, the last dimension of the real data must physically contain @tex $2 (n_d/2+1)$ @end tex @ifinfo 2 * (nd/2+1) @end ifinfo @ifhtml 2 * (nd/2+1) @end ifhtml @code{fftw_real} values (exactly enough to hold the complex data). This physical array size does not, however, change the @emph{logical} array size---only @tex $n_d$ @end tex @ifinfo nd @end ifinfo @ifhtml nd @end ifhtml values are actually stored in the last dimension, and @tex $n_d$ @end tex @ifinfo nd @end ifinfo @ifhtml nd @end ifhtml is the last dimension passed to @code{rfftwnd_create_plan}. For example, consider the transform of a two-dimensional real array of size @code{nx} by @code{ny}. The output of the @code{rfftwnd} transform is a two-dimensional complex array of size @code{nx} by @code{ny/2+1}, where the @code{y} dimension has been cut nearly in half because of redundancies in the output. Because @code{fftw_complex} is twice the size of @code{fftw_real}, the output array is slightly bigger than the input array. Thus, if we want to compute the transform in place, we must @emph{pad} the input array so that it is of size @code{nx} by @code{2*(ny/2+1)}. If @code{ny} is even, then there are two padding elements at the end of each row (which need not be initialized, as they are only used for output). @ifhtml The following illustration depicts the input and output arrays just described, for both the out-of-place and in-place transforms (with the arrows indicating consecutive memory locations):

@end ifhtml @tex Figure 1 depicts the input and output arrays just described, for both the out-of-place and in-place transforms (with the arrows indicating consecutive memory locations). { \pageinsert \vfill \vskip405pt \hskip40pt \special{psfile="rfftwnd.eps" } \vskip 24pt Figure 1: Illustration of the data layout for real to complex transforms. \vfill \endinsert} @end tex The RFFTWND transforms are unnormalized, so a forward followed by a backward transform will result in the original data scaled by the number of real data elements---that is, the product of the (logical) dimensions of the real data. @cindex normalization Below, we illustrate the use of RFFTWND by showing how you might use it to compute the (cyclic) convolution of two-dimensional real arrays @code{a} and @code{b} (using the identity that a convolution corresponds to a pointwise product of the Fourier transforms). For variety, in-place transforms are used for the forward FFTs and an out-of-place transform is used for the inverse transform. @cindex convolution @cindex cyclic convolution @example #include ... @{ fftw_real a[M][2*(N/2+1)], b[M][2*(N/2+1)], c[M][N]; fftw_complex *A, *B, C[M][N/2+1]; rfftwnd_plan p, pinv; fftw_real scale = 1.0 / (M * N); int i, j; ... p = rfftw2d_create_plan(M, N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE | FFTW_IN_PLACE); pinv = rfftw2d_create_plan(M, N, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); /* aliases for accessing complex transform outputs: */ A = (fftw_complex*) &a[0][0]; B = (fftw_complex*) &b[0][0]; ... for (i = 0; i < M; ++i) for (j = 0; j < N; ++j) @{ a[i][j] = ... ; b[i][j] = ... ; @} ... rfftwnd_one_real_to_complex(p, &a[0][0], NULL); rfftwnd_one_real_to_complex(p, &b[0][0], NULL); for (i = 0; i < M; ++i) for (j = 0; j < N/2+1; ++j) @{ int ij = i*(N/2+1) + j; C[i][j].re = (A[ij].re * B[ij].re - A[ij].im * B[ij].im) * scale; C[i][j].im = (A[ij].re * B[ij].im + A[ij].im * B[ij].re) * scale; @} /* inverse transform to get c, the convolution of a and b; this has the side effect of overwriting C */ rfftwnd_one_complex_to_real(pinv, &C[0][0], &c[0][0]); ... rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(pinv); @} @end example We access the complex outputs of the in-place transforms by casting each real array to a @code{fftw_complex} pointer. Because this is a ``flat'' pointer, we have to compute the row-major index @code{ij} explicitly in the convolution product loop. @cindex row-major In order to normalize the convolution, we must multiply by a scale factor---we can do so either before or after the inverse transform, and choose the former because it obviates the necessity of an additional loop. @cindex normalization Notice the limits of the loops and the dimensions of the various arrays. As with the one-dimensional RFFTW, an out-of-place @code{FFTW_COMPLEX_TO_REAL} transform has the side-effect of overwriting its input array. (The real-to-complex transform, on the other hand, leaves its input array untouched.) If you use RFFTWND for a rank-one transform, however, this side-effect does not occur. Because of this fact (and the simpler output format), users may find the RFFTWND interface more convenient than RFFTW for one-dimensional transforms. However, RFFTWND in one dimension is slightly slower than RFFTW because RFFTWND uses an extra buffer array internally. @c ------------------------------------------------------------ @node Multi-dimensional Array Format, Words of Wisdom, Real Multi-dimensional Transforms Tutorial, Tutorial @section Multi-dimensional Array Format This section describes the format in which multi-dimensional arrays are stored. We felt that a detailed discussion of this topic was necessary, since it is often a source of confusion among users and several different formats are common. Although the comments below refer to @code{fftwnd}, they are also applicable to the @code{rfftwnd} routines. @menu * Row-major Format:: * Column-major Format:: * Static Arrays in C:: * Dynamic Arrays in C:: * Dynamic Arrays in C-The Wrong Way:: @end menu @node Row-major Format, Column-major Format, Multi-dimensional Array Format, Multi-dimensional Array Format @subsection Row-major Format @cindex row-major The multi-dimensional arrays passed to @code{fftwnd} are expected to be stored as a single contiguous block in @dfn{row-major} order (sometimes called ``C order''). Basically, this means that as you step through adjacent memory locations, the first dimension's index varies most slowly and the last dimension's index varies most quickly. To be more explicit, let us consider an array of rank @math{d} whose dimensions are @tex $n_1 \times n_2 \times n_3 \times \cdots \times n_d$. @end tex @ifinfo n1 x n2 x n3 x ... x nd. @end ifinfo @ifhtml n1 x n2 x n3 x ... x nd. @end ifhtml Now, we specify a location in the array by a sequence of (zero-based) indices, one for each dimension: @tex $(i_1, i_2, i_3, \ldots, i_d)$. @end tex @ifinfo (i1, i2, ..., id). @end ifinfo @ifhtml (i1, i2, i3,..., id). @end ifhtml If the array is stored in row-major order, then this element is located at the position @tex $i_d + n_d (i_{d-1} + n_{d-1} (\ldots + n_2 i_1))$. @end tex @ifinfo id + nd * (id-1 + nd-1 * (... + n2 * i1)). @end ifinfo @ifhtml id + nd * (id-1 + nd-1 * (... + n2 * i1)). @end ifhtml Note that each element of the array must be of type @code{fftw_complex}; i.e. a (real, imaginary) pair of (double-precision) numbers. Note also that, in @code{fftwnd}, the expression above is multiplied by the stride to get the actual array index---this is useful in situations where each element of the multi-dimensional array is actually a data structure or another array, and you just want to transform a single field. In most cases, however, you use a stride of 1. @cindex stride @node Column-major Format, Static Arrays in C, Row-major Format, Multi-dimensional Array Format @subsection Column-major Format @cindex column-major Readers from the Fortran world are used to arrays stored in @dfn{column-major} order (sometimes called ``Fortran order''). This is essentially the exact opposite of row-major order in that, here, the @emph{first} dimension's index varies most quickly. If you have an array stored in column-major order and wish to transform it using @code{fftwnd}, it is quite easy to do. When creating the plan, simply pass the dimensions of the array to @code{fftwnd_create_plan} in @emph{reverse order}. For example, if your array is a rank three @code{N x M x L} matrix in column-major order, you should pass the dimensions of the array as if it were an @code{L x M x N} matrix (which it is, from the perspective of @code{fftwnd}). This is done for you automatically by the FFTW Fortran wrapper routines (@pxref{Calling FFTW from Fortran}). @cindex Fortran-callable wrappers @node Static Arrays in C, Dynamic Arrays in C, Column-major Format, Multi-dimensional Array Format @subsection Static Arrays in C @cindex C multi-dimensional arrays Multi-dimensional arrays declared statically (that is, at compile time, not necessarily with the @code{static} keyword) in C are @emph{already} in row-major order. You don't have to do anything special to transform them. (@xref{Complex Multi-dimensional Transforms Tutorial}, for an example of this sort of code.) @node Dynamic Arrays in C, Dynamic Arrays in C-The Wrong Way, Static Arrays in C, Multi-dimensional Array Format @subsection Dynamic Arrays in C Often, especially for large arrays, it is desirable to allocate the arrays dynamically, at runtime. This isn't too hard to do, although it is not as straightforward for multi-dimensional arrays as it is for one-dimensional arrays. Creating the array is simple: using a dynamic-allocation routine like @code{malloc}, allocate an array big enough to store N @code{fftw_complex} values, where N is the product of the sizes of the array dimensions (i.e. the total number of complex values in the array). For example, here is code to allocate a 5x12x27 rank 3 array: @ffindex malloc @example fftw_complex *an_array; an_array = (fftw_complex *) malloc(5 * 12 * 27 * sizeof(fftw_complex)); @end example Accessing the array elements, however, is more tricky---you can't simply use multiple applications of the @samp{[]} operator like you could for static arrays. Instead, you have to explicitly compute the offset into the array using the formula given earlier for row-major arrays. For example, to reference the @math{(i,j,k)}-th element of the array allocated above, you would use the expression @code{an_array[k + 27 * (j + 12 * i)]}. This pain can be alleviated somewhat by defining appropriate macros, or, in C++, creating a class and overloading the @samp{()} operator. @node Dynamic Arrays in C-The Wrong Way, , Dynamic Arrays in C, Multi-dimensional Array Format @subsection Dynamic Arrays in C---The Wrong Way A different method for allocating multi-dimensional arrays in C is often suggested that is incompatible with @code{fftwnd}: @emph{using it will cause FFTW to die a painful death}. We discuss the technique here, however, because it is so commonly known and used. This method is to create arrays of pointers of arrays of pointers of @dots{}etcetera. For example, the analogue in this method to the example above is: @example int i,j; fftw_complex ***a_bad_array; /* another way to make a 5x12x27 array */ a_bad_array = (fftw_complex ***) malloc(5 * sizeof(fftw_complex **)); for (i = 0; i < 5; ++i) @{ a_bad_array[i] = (fftw_complex **) malloc(12 * sizeof(fftw_complex *)); for (j = 0; j < 12; ++j) a_bad_array[i][j] = (fftw_complex *) malloc(27 * sizeof(fftw_complex)); @} @end example As you can see, this sort of array is inconvenient to allocate (and deallocate). On the other hand, it has the advantage that the @math{(i,j,k)}-th element can be referenced simply by @code{a_bad_array[i][j][k]}. If you like this technique and want to maximize convenience in accessing the array, but still want to pass the array to FFTW, you can use a hybrid method. Allocate the array as one contiguous block, but also declare an array of arrays of pointers that point to appropriate places in the block. That sort of trick is beyond the scope of this documentation; for more information on multi-dimensional arrays in C, see the @code{comp.lang.c} @uref{http://www.eskimo.com/~scs/C-faq/s6.html, FAQ}. @c ------------------------------------------------------------ @node Words of Wisdom, , Multi-dimensional Array Format, Tutorial @section Words of Wisdom @cindex wisdom @cindex saving plans to disk FFTW implements a method for saving plans to disk and restoring them. In fact, what FFTW does is more general than just saving and loading plans. The mechanism is called @dfn{@code{wisdom}}. Here, we describe this feature at a high level. @xref{FFTW Reference}, for a less casual (but more complete) discussion of how to use @code{wisdom} in FFTW. Plans created with the @code{FFTW_MEASURE} option produce near-optimal FFT performance, but it can take a long time to compute a plan because FFTW must actually measure the runtime of many possible plans and select the best one. This is designed for the situations where so many transforms of the same size must be computed that the start-up time is irrelevant. For short initialization times but slightly slower transforms, we have provided @code{FFTW_ESTIMATE}. The @code{wisdom} mechanism is a way to get the best of both worlds. There are, however, certain caveats that the user must be aware of in using @code{wisdom}. For this reason, @code{wisdom} is an optional feature which is not enabled by default. At its simplest, @code{wisdom} provides a way of saving plans to disk so that they can be reused in other program runs. You create a plan with the flags @code{FFTW_MEASURE} and @code{FFTW_USE_WISDOM}, and then save the @code{wisdom} using @code{fftw_export_wisdom}: @ctindex FFTW_USE_WISDOM @example plan = fftw_create_plan(..., ... | FFTW_MEASURE | FFTW_USE_WISDOM); fftw_export_wisdom(...); @end example @findex fftw_export_wisdom The next time you run the program, you can restore the @code{wisdom} with @code{fftw_import_wisdom}, and then recreate the plan using the same flags as before. This time, however, the same optimal plan will be created very quickly without measurements. (FFTW still needs some time to compute trigonometric tables, however.) The basic outline is: @example fftw_import_wisdom(...); plan = fftw_create_plan(..., ... | FFTW_USE_WISDOM); @end example @findex fftw_import_wisdom Wisdom is more than mere rote memorization, however. FFTW's @code{wisdom} encompasses all of the knowledge and measurements that were used to create the plan for a given size. Therefore, existing @code{wisdom} is also applied to the creation of other plans of different sizes. Whenever a plan is created with the @code{FFTW_MEASURE} and @code{FFTW_USE_WISDOM} flags, @code{wisdom} is generated. Thereafter, plans for any transform with a similar factorization will be computed more quickly, so long as they use the @code{FFTW_USE_WISDOM} flag. In fact, for transforms with the same factors and of equal or lesser size, no measurements at all need to be made and an optimal plan can be created with negligible delay! For example, suppose that you create a plan for @tex $N = 2^{16}$. @end tex @ifinfo N = 2^16. @end ifinfo @ifhtml N = 216. @end ifhtml Then, for any equal or smaller power of two, FFTW can create a plan (with the same direction and flags) quickly, using the precomputed @code{wisdom}. Even for larger powers of two, or sizes that are a power of two times some other prime factors, plans will be computed more quickly than they would otherwise (although some measurements still have to be made). The @code{wisdom} is cumulative, and is stored in a global, private data structure managed internally by FFTW. The storage space required is minimal, proportional to the logarithm of the sizes the @code{wisdom} was generated from. The @code{wisdom} can be forgotten (and its associated memory freed) by a call to @code{fftw_forget_wisdom()}; otherwise, it is remembered until the program terminates. It can also be exported to a file, a string, or any other medium using @code{fftw_export_wisdom} and restored during a subsequent execution of the program (or a different program) using @code{fftw_import_wisdom} (these functions are described below). Because @code{wisdom} is incorporated into FFTW at a very low level, the same @code{wisdom} can be used for one-dimensional transforms, multi-dimensional transforms, and even the parallel extensions to FFTW. Just include @code{FFTW_USE_WISDOM} in the flags for whatever plans you create (i.e., always plan wisely). Plans created with the @code{FFTW_ESTIMATE} plan can use @code{wisdom}, but cannot generate it; only @code{FFTW_MEASURE} plans actually produce @code{wisdom}. Also, plans can only use @code{wisdom} generated from plans created with the same direction and flags. For example, a size @code{42} @code{FFTW_BACKWARD} transform will not use @code{wisdom} produced by a size @code{42} @code{FFTW_FORWARD} transform. The only exception to this rule is that @code{FFTW_ESTIMATE} plans can use @code{wisdom} from @code{FFTW_MEASURE} plans. @menu * Caveats in Using Wisdom:: What you should worry about in using wisdom * Importing and Exporting Wisdom:: I/O of wisdom to disk and other media @end menu @node Caveats in Using Wisdom, Importing and Exporting Wisdom, Words of Wisdom, Words of Wisdom @subsection Caveats in Using Wisdom @cindex wisdom, problems with @quotation @ifhtml @end ifhtml For in much wisdom is much grief, and he that increaseth knowledge increaseth sorrow. @ifhtml @end ifhtml [Ecclesiastes 1:18] @cindex Ecclesiastes @end quotation There are pitfalls to using @code{wisdom}, in that it can negate FFTW's ability to adapt to changing hardware and other conditions. For example, it would be perfectly possible to export @code{wisdom} from a program running on one processor and import it into a program running on another processor. Doing so, however, would mean that the second program would use plans optimized for the first processor, instead of the one it is running on. It should be safe to reuse @code{wisdom} as long as the hardware and program binaries remain unchanged. (Actually, the optimal plan may change even between runs of the same binary on identical hardware, due to differences in the virtual memory environment, etcetera. Users seriously interested in performance should worry about this problem, too.) It is likely that, if the same @code{wisdom} is used for two different program binaries, even running on the same machine, the plans may be sub-optimal because of differing code alignments. It is therefore wise to recreate @code{wisdom} every time an application is recompiled. The more the underlying hardware and software changes between the creation of @code{wisdom} and its use, the greater grows the risk of sub-optimal plans. @node Importing and Exporting Wisdom, , Caveats in Using Wisdom, Words of Wisdom @subsection Importing and Exporting Wisdom @cindex wisdom, import and export @example void fftw_export_wisdom_to_file(FILE *output_file); fftw_status fftw_import_wisdom_from_file(FILE *input_file); @end example @findex fftw_export_wisdom_to_file @findex fftw_import_wisdom_from_file @code{fftw_export_wisdom_to_file} writes the @code{wisdom} to @code{output_file}, which must be a file open for writing. @code{fftw_import_wisdom_from_file} reads the @code{wisdom} from @code{input_file}, which must be a file open for reading, and returns @code{FFTW_SUCCESS} if successful and @code{FFTW_FAILURE} otherwise. In both cases, the file is left open and must be closed by the caller. It is perfectly fine if other data lie before or after the @code{wisdom} in the file, as long as the file is positioned at the beginning of the @code{wisdom} data before import. @example char *fftw_export_wisdom_to_string(void); fftw_status fftw_import_wisdom_from_string(const char *input_string) @end example @findex fftw_export_wisdom_to_string @findex fftw_import_wisdom_from_string @code{fftw_export_wisdom_to_string} allocates a string, exports the @code{wisdom} to it in @code{NULL}-terminated format, and returns a pointer to the string. If there is an error in allocating or writing the data, it returns @code{NULL}. The caller is responsible for deallocating the string (with @code{fftw_free}) when she is done with it. @code{fftw_import_wisdom_from_string} imports the @code{wisdom} from @code{input_string}, returning @code{FFTW_SUCCESS} if successful and @code{FFTW_FAILURE} otherwise. Exporting @code{wisdom} does not affect the store of @code{wisdom}. Imported @code{wisdom} supplements the current store rather than replacing it (except when there is conflicting @code{wisdom}, in which case the older @code{wisdom} is discarded). The format of the exported @code{wisdom} is ``nerd-readable'' LISP-like ASCII text; we will not document it here except to note that it is insensitive to white space (interested users can contact us for more details). @cindex LISP @cindex nerd-readable text @xref{FFTW Reference}, for more information, and for a description of how you can implement @code{wisdom} import/export for other media besides files and strings. The following is a brief example in which the @code{wisdom} is read from a file, a plan is created (possibly generating more @code{wisdom}), and then the @code{wisdom} is exported to a string and printed to @code{stdout}. @example @{ fftw_plan plan; char *wisdom_string; FILE *input_file; /* open file to read wisdom from */ input_file = fopen("sample.wisdom", "r"); if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file)) printf("Error reading wisdom!\n"); fclose(input_file); /* be sure to close the file! */ /* create a plan for N=64, possibly creating and/or using wisdom */ plan = fftw_create_plan(64,FFTW_FORWARD, FFTW_MEASURE | FFTW_USE_WISDOM); /* ... do some computations with the plan ... */ /* always destroy plans when you are done */ fftw_destroy_plan(plan); /* write the wisdom to a string */ wisdom_string = fftw_export_wisdom_to_string(); if (wisdom_string != NULL) @{ printf("Accumulated wisdom: %s\n",wisdom_string); /* Just for fun, destroy and restore the wisdom */ fftw_forget_wisdom(); /* all gone! */ fftw_import_wisdom_from_string(wisdom_string); /* wisdom is back! */ fftw_free(wisdom_string); /* deallocate it since we're done */ @} @} @end example @c ************************************************************ @node FFTW Reference, Parallel FFTW, Tutorial, Top @chapter FFTW Reference This chapter provides a complete reference for all sequential (i.e., one-processor) FFTW functions. We first define the data types upon which FFTW operates, that is, real, complex, and ``halfcomplex'' numbers (@pxref{Data Types}). Then, in four sections, we explain the FFTW program interface for complex one-dimensional transforms (@pxref{One-dimensional Transforms Reference}), complex multi-dimensional transforms (@pxref{Multi-dimensional Transforms Reference}), and real one-dimensional transforms (@pxref{Real One-dimensional Transforms Reference}), real multi-dimensional transforms (@pxref{Real Multi-dimensional Transforms Reference}). @ref{Wisdom Reference} describes the @code{wisdom} mechanism for exporting and importing plans. Finally, @ref{Memory Allocator Reference} describes how to change FFTW's default memory allocator. For parallel transforms, @xref{Parallel FFTW}. @menu * Data Types:: real, complex, and halfcomplex numbers * One-dimensional Transforms Reference:: * Multi-dimensional Transforms Reference:: * Real One-dimensional Transforms Reference:: * Real Multi-dimensional Transforms Reference:: * Wisdom Reference:: * Memory Allocator Reference:: * Thread safety:: @end menu @c ------------------------------------------------------- @node Data Types, One-dimensional Transforms Reference, FFTW Reference, FFTW Reference @section Data Types @cindex real number @cindex complex number @cindex halfcomplex array The routines in the FFTW package use three main kinds of data types. @dfn{Real} and @dfn{complex} numbers should be already known to the reader. We also use the term @dfn{halfcomplex} to describe complex arrays in a special packed format used by the one-dimensional real transforms (taking advantage of the @dfn{hermitian} symmetry that arises in those cases). By including @code{} or @code{}, you will have access to the following definitions: @example typedef double fftw_real; typedef struct @{ fftw_real re, im; @} fftw_complex; #define c_re(c) ((c).re) #define c_im(c) ((c).im) @end example @tindex fftw_real @tindex fftw_complex All FFTW operations are performed on the @code{fftw_real} and @code{fftw_complex} data types. For @code{fftw_complex} numbers, the two macros @code{c_re} and @code{c_im} retrieve, respectively, the real and imaginary parts of the number. A @dfn{real array} is an array of real numbers. A @dfn{complex array} is an array of complex numbers. A one-dimensional array @math{X} of @math{n} complex numbers is @dfn{hermitian} if the following property holds: @tex for all $0 \leq i < n$, we have $X_i = X^{*}_{n-i}$, where $x^*$ denotes the complex conjugate of $x$. @end tex @ifinfo for all @math{0 <= i < n}, we have @math{X[i] = conj(X[n-i])}. @end ifinfo @ifhtml for all 0 <= i < n, we have Xi = conj(Xn-i)}. @end ifhtml Hermitian arrays are relevant to FFTW because the Fourier transform of a real array is hermitian. Because of its symmetry, a hermitian array can be stored in half the space of a complex array of the same size. FFTW's one-dimensional real transforms store hermitian arrays as @dfn{halfcomplex} arrays. A halfcomplex array of size @math{n} is @cindex hermitian array a one-dimensional array of @math{n} @code{fftw_real} numbers. A hermitian array @math{X} in stored into a halfcomplex array @math{Y} as follows. @tex For all integers $i$ such that $0 \leq i \leq n / 2$, we have $Y_i := \hbox{Re}(X_i)$. For all integers $i$ such that $0 < i < n / 2$, we have $Y_{n - i} := \hbox{Im}(X_i)$. @end tex @ifinfo For all integers @math{i} such that @math{0 <= i <= n / 2}, we have @math{Y[i] = Re(X[i])}. For all integers @math{i} such that @math{0 < i < n / 2}, we have @math{Y[n-i] = Im(X[i])}. @end ifinfo @ifhtml For all integers i such that 0 <= i <= n / 2, we have Yi = Re(Xi). For all integers i such that 0 < i < n / 2, we have Yn-i = Im(Xi). @end ifhtml We now illustrate halfcomplex storage for @math{n = 4} and @math{n = 5}, since the scheme depends on the parity of @math{n}. Let @math{n = 4}. In this case, we have @tex $Y_0 := \hbox{Re}(X_0)$, $Y_1 := \hbox{Re}(X_1)$, $Y_2 := \hbox{Re}(X_2)$, and $Y_3 := \hbox{Im}(X_1)$. @end tex @ifinfo @math{Y[0] = Re(X[0])}, @math{Y[1] = Re(X[1])}, @math{Y[2] = Re(X[2])}, and @math{Y[3] = Im(X[1])}. @end ifinfo @ifhtml Y0 = Re(X0), Y1 = Re(X1), Y2 = Re(X2), and Y3 = Im(X1). @end ifhtml Let now @math{n = 5}. In this case, we have @tex $Y_0 := \hbox{Re}(X_0)$, $Y_1 := \hbox{Re}(X_1)$, $Y_2 := \hbox{Re}(X_2)$, $Y_3 := \hbox{Im}(X_2)$, and $Y_4 := \hbox{Im}(X_1)$. @end tex @ifinfo @math{Y[0] = Re(X[0])}, @math{Y[1] = Re(X[1])}, @math{Y[2] = Re(X[2])}, @math{Y[3] = Im(X[2])}, and @math{Y[4] = Im(X[1])}. @end ifinfo @ifhtml Y0 = Re(X0), Y1 = Re(X1), Y2 = Re(X2), Y3 = Im(X2), and Y4 = Im(X1). @end ifhtml @cindex floating-point precision By default, the type @code{fftw_real} equals the C type @code{double}. To work in single precision rather than double precision, @code{#define} the symbol @code{FFTW_ENABLE_FLOAT} in @code{fftw.h} and then recompile the library. On Unix systems, you can instead use @code{configure --enable-float} at installation time (@pxref{Installation and Customization}). @fpindex configure @ctindex FFTW_ENABLE_FLOAT In version 1 of FFTW, the data types were called @code{FFTW_REAL} and @code{FFTW_COMPLEX}. We changed the capitalization for consistency with the rest of FFTW's conventions. The old names are still supported, but their use is deprecated. @tindex FFTW_REAL @tindex FFTW_COMPLEX @c ------------------------------------------------------- @node One-dimensional Transforms Reference, Multi-dimensional Transforms Reference, Data Types, FFTW Reference @section One-dimensional Transforms Reference The one-dimensional complex routines are generally prefixed with @code{fftw_}. Programs using FFTW should be linked with @code{-lfftw -lm} on Unix systems, or with the FFTW and standard math libraries in general. @menu * fftw_create_plan:: Plan Creation * Discussion on Specific Plans:: * fftw:: Plan Execution * fftw_destroy_plan:: Plan Destruction * What FFTW Really Computes:: Definition of the DFT. @end menu @node fftw_create_plan, Discussion on Specific Plans, One-dimensional Transforms Reference, One-dimensional Transforms Reference @subsection Plan Creation for One-dimensional Transforms @example #include fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); @end example @tindex fftw_plan @tindex fftw_direction @findex fftw_create_plan @findex fftw_create_plan_specific The function @code{fftw_create_plan} creates a plan, which is a data structure containing all the information that @code{fftw} needs in order to compute the 1D Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). @code{fftw_create_plan} returns a valid plan, or @code{NULL} if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure FFTW in such a way that some input sizes are forbidden, and FFTW cannot create a plan. The @code{fftw_create_plan_specific} variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to @code{fftw}. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are @emph{destroyed} by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). @subsubheading Arguments @itemize @bullet @item @code{n} is the size of the transform. It can be any positive integer. @itemize @minus @item FFTW is best at handling sizes of the form @ifinfo @math{2^a 3^b 5^c 7^d 11^e 13^f}, @end ifinfo @tex $2^a 3^b 5^c 7^d 11^e 13^f$, @end tex @ifhtml 2a 3b 5c 7d 11e 13f, @end ifhtml where @math{e+f} is either @math{0} or @math{1}, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (which nevertheless retains @tex $O(n \log n)$ @end tex @ifinfo O(n lg n) @end ifinfo @ifhtml O(n lg n) @end ifhtml performance, even for prime sizes). (It is possible to customize FFTW for different array sizes. @xref{Installation and Customization}, for more information.) Transforms whose sizes are powers of @math{2} are especially fast. @end itemize @item @code{dir} is the sign of the exponent in the formula that defines the Fourier transform. It can be @math{-1} or @math{+1}. The aliases @code{FFTW_FORWARD} and @code{FFTW_BACKWARD} are provided, where @code{FFTW_FORWARD} stands for @math{-1}. @item @cindex flags @code{flags} is a boolean OR (@samp{|}) of zero or more of the following: @itemize @minus @item @code{FFTW_MEASURE}: this flag tells FFTW to find the optimal plan by actually @emph{computing} several FFTs and measuring their execution time. Depending on the installation, this can take some time. @footnote{The basic problem is the resolution of the clock: FFTW needs to run for a certain time for the clock to be reliable.} @item @code{FFTW_ESTIMATE}: do not run any FFT and provide a ``reasonable'' plan (for a RISC processor with many registers). If neither @code{FFTW_ESTIMATE} nor @code{FFTW_MEASURE} is provided, the default is @code{FFTW_ESTIMATE}. @item @code{FFTW_OUT_OF_PLACE}: produce a plan assuming that the input and output arrays will be distinct (this is the default). @ctindex FFTW_OUT_OF_PLACE @item @cindex in-place transform @code{FFTW_IN_PLACE}: produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: FFTW is able to compute true in-place transforms only for small values of @code{n}. If FFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. @emph{Warning: This option changes the meaning of some parameters of @code{fftw}} (@pxref{fftw,,Computing the One-dimensional Transform}). The in-place option is mainly provided for people who want to write their own in-place multi-dimensional Fourier transform, using FFTW as a base. For example, consider a three-dimensional @code{n * n * n} transform. An out-of-place algorithm will need another array (which may be huge). However, FFTW can compute the in-place transform along each dimension using only a temporary array of size @code{n}. Moreover, if FFTW happens to be able to compute the transform truly in-place, no temporary array and no copying are needed. As distributed, FFTW `knows' how to compute in-place transforms of size 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32 and 64. The default mode of operation is @code{FFTW_OUT_OF_PLACE}. @item @cindex wisdom @code{FFTW_USE_WISDOM}: use any @code{wisdom} that is available to help in the creation of the plan. (@xref{Words of Wisdom}.) This can greatly speed the creation of plans, especially with the @code{FFTW_MEASURE} option. @code{FFTW_ESTIMATE} plans can also take advantage of @code{wisdom} to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the @code{FFTW_MEASURE} option is used, new @code{wisdom} will also be generated if the current transform size is not completely understood by existing @code{wisdom}. @end itemize @item @code{in}, @code{out}, @code{istride}, @code{ostride} (only for @code{fftw_create_plan_specific}): see corresponding arguments in the description of @code{fftw}. (@xref{fftw,,Computing the One-dimensional Transform}.) In particular, the @code{out} and @code{ostride} parameters have the same special meaning for @code{FFTW_IN_PLACE} transforms as they have for @code{fftw}. @end itemize @node Discussion on Specific Plans, fftw, fftw_create_plan, One-dimensional Transforms Reference @subsection Discussion on Specific Plans @cindex specific planner We recommend the use of the specific planners, even in cases where you will be transforming arrays different from those passed to the specific planners, as they confer the following advantages: @itemize @bullet @item The resulting plans will be optimized for your specific arrays and strides. This may or may not make a significant difference, but it certainly doesn't hurt. (The ordinary planner does its planning based upon a stride-one temporary array that it allocates.) @item Less intermediate storage is required during the planning process. (The ordinary planner uses O(@code{N}) temporary storage, where @code{N} is the maximum dimension, while it is creating the plan.) @item For multi-dimensional transforms, new parameters become accessible for optimization by the planner. (Since multi-dimensional arrays can be very large, we don't dare to allocate one in the ordinary planner for experimentation. This prevents us from doing certain optimizations that can yield dramatic improvements in some cases.) @end itemize On the other hand, note that @emph{the specific planner destroys the contents of the @code{in} and @code{out} arrays}. @node fftw, fftw_destroy_plan, Discussion on Specific Plans, One-dimensional Transforms Reference @subsection Computing the One-dimensional Transform @example #include void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); @end example @findex fftw @findex fftw_one The function @code{fftw} computes the one-dimensional Fourier transform, using a plan created by @code{fftw_create_plan} (@xref{fftw_create_plan, , Plan Creation for One-dimensional Transforms}.) The function @code{fftw_one} provides a simplified interface for the common case of single input array of stride 1. @cindex stride @subsubheading Arguments @itemize @bullet @item @code{plan} is the plan created by @code{fftw_create_plan} (@pxref{fftw_create_plan,,Plan Creation for One-dimensional Transforms}). @item @code{howmany} is the number of transforms @code{fftw} will compute. It is faster to tell FFTW to compute many transforms, instead of simply calling @code{fftw} many times. @item @code{in}, @code{istride} and @code{idist} describe the input array(s). There are @code{howmany} input arrays; the first one is pointed to by @code{in}, the second one is pointed to by @code{in + idist}, and so on, up to @code{in + (howmany - 1) * idist}. Each input array consists of complex numbers (@pxref{Data Types}), which are not necessarily contiguous in memory. Specifically, @code{in[0]} is the first element of the first array, @code{in[istride]} is the second element of the first array, and so on. In general, the @code{i}-th element of the @code{j}-th input array will be in position @code{in[i * istride + j * idist]}. @item @code{out}, @code{ostride} and @code{odist} describe the output array(s). The format is the same as for the input array. @itemize @minus @item @emph{In-place transforms}: @cindex in-place transform If the @code{plan} specifies an in-place transform, @code{ostride} and @code{odist} are always ignored. If @code{out} is @code{NULL}, @code{out} is ignored, too. Otherwise, @code{out} is interpreted as a pointer to an array of @code{n} complex numbers, that FFTW will use as temporary space to perform the in-place computation. @code{out} is used as scratch space and its contents destroyed. In this case, @code{out} must be an ordinary array whose elements are contiguous in memory (no striding). @end itemize @end itemize The function @code{fftw_one} transforms a single, contiguous input array to a contiguous output array. By definition, the call @example fftw_one(plan, in, out) @end example is equivalent to @example fftw(plan, 1, in, 1, 0, out, 1, 0) @end example @node fftw_destroy_plan, What FFTW Really Computes, fftw, One-dimensional Transforms Reference @subsection Destroying a One-dimensional Plan @example #include void fftw_destroy_plan(fftw_plan plan); @end example @tindex fftw_destroy_plan The function @code{fftw_destroy_plan} frees the plan @code{plan} and releases all the memory associated with it. After destruction, a plan is no longer valid. @node What FFTW Really Computes, , fftw_destroy_plan, One-dimensional Transforms Reference @subsection What FFTW Really Computes @cindex Discrete Fourier Transform In this section, we define precisely what FFTW computes. Please be warned that different authors and software packages might employ different conventions than FFTW does. The forward transform of a complex array @math{X} of size @math{n} computes an array @math{Y}, where @tex $$ Y_i = \sum_{j = 0}^{n - 1} X_j e^{-2\pi i j \sqrt{-1}/n} \ . $$ @end tex @ifinfo @center Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(-2 pi i j sqrt(-1)/n) . @end ifinfo @ifhtml

@end ifhtml The backward transform computes @tex $$ Y_i = \sum_{j = 0}^{n - 1} X_j e^{2\pi i j \sqrt{-1}/n} \ . $$ @end tex @ifinfo @center Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(2 pi i j sqrt(-1)/n) . @end ifinfo @ifhtml
@end ifhtml @cindex normalization FFTW computes an unnormalized transform, that is, the equation @math{IFFT(FFT(X)) = n X} holds. In other words, applying the forward and then the backward transform will multiply the input by @math{n}. @cindex frequency An @code{FFTW_FORWARD} transform corresponds to a sign of @math{-1} in the exponent of the DFT. Note also that we use the standard ``in-order'' output ordering---the @math{k}-th output corresponds to the frequency @math{k/n} (or @math{k/T}, where @math{T} is your total sampling period). For those who like to think in terms of positive and negative frequencies, this means that the positive frequencies are stored in the first half of the output and the negative frequencies are stored in backwards order in the second half of the output. (The frequency @math{-k/n} is the same as the frequency @math{(n-k)/n}.) @c ------------------------------------------------------- @node Multi-dimensional Transforms Reference, Real One-dimensional Transforms Reference, One-dimensional Transforms Reference, FFTW Reference @section Multi-dimensional Transforms Reference @cindex complex multi-dimensional transform @cindex multi-dimensional transform The multi-dimensional complex routines are generally prefixed with @code{fftwnd_}. Programs using FFTWND should be linked with @code{-lfftw -lm} on Unix systems, or with the FFTW and standard math libraries in general. @cindex FFTWND @menu * fftwnd_create_plan:: Plan Creation * fftwnd:: Plan Execution * fftwnd_destroy_plan:: Plan Destruction * What FFTWND Really Computes:: @end menu @node fftwnd_create_plan, fftwnd, Multi-dimensional Transforms Reference, Multi-dimensional Transforms Reference @subsection Plan Creation for Multi-dimensional Transforms @example #include fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); @end example @tindex fftwnd_plan @tindex fftw_direction @findex fftwnd_create_plan @findex fftw2d_create_plan @findex fftw3d_create_plan @findex fftwnd_create_plan_specific @findex fftw2d_create_plan_specific @findex fftw3d_create_plan_specific The function @code{fftwnd_create_plan} creates a plan, which is a data structure containing all the information that @code{fftwnd} needs in order to compute a multi-dimensional Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions @code{fftw2d_create_plan} and @code{fftw3d_create_plan} are optional, alternative interfaces to @code{fftwnd_create_plan} for two and three dimensions, respectively. @code{fftwnd_create_plan} returns a valid plan, or @code{NULL} if, for some reason, the plan can't be created. This can happen if memory runs out or if the arguments are invalid in some way (e.g. if @code{rank} < 0). The @code{create_plan_specific} variants take as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to @code{fftwnd}. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are @emph{destroyed} by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). @xref{Discussion on Specific Plans}, for a discussion on specific plans. @subsubheading Arguments @itemize @bullet @item @code{rank} is the dimensionality of the arrays to be transformed. It can be any non-negative integer. @item @code{n} is a pointer to an array of @code{rank} integers, giving the size of each dimension of the arrays to be transformed. These sizes, which must be positive integers, correspond to the dimensions of @cindex row-major row-major arrays---i.e. @code{n[0]} is the size of the dimension whose indices vary most slowly, and so on. (@xref{Multi-dimensional Array Format}, for more information on row-major storage.) @xref{fftw_create_plan,,Plan Creation for One-dimensional Transforms}, for more information regarding optimal array sizes. @item @code{nx} and @code{ny} in @code{fftw2d_create_plan} are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on @code{nx x ny} arrays in row-major order, where @code{nx} is the number of rows and @code{ny} is the number of columns. @item @code{nx}, @code{ny} and @code{nz} in @code{fftw3d_create_plan} are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on @code{nx x ny x nz} arrays in row-major order. @item @code{dir} is the sign of the exponent in the formula that defines the Fourier transform. It can be @math{-1} or @math{+1}. The aliases @code{FFTW_FORWARD} and @code{FFTW_BACKWARD} are provided, where @code{FFTW_FORWARD} stands for @math{-1}. @item @cindex flags @code{flags} is a boolean OR (@samp{|}) of zero or more of the following: @itemize @minus @item @code{FFTW_MEASURE}: this flag tells FFTW to find the optimal plan by actually @emph{computing} several FFTs and measuring their execution time. @item @code{FFTW_ESTIMATE}: do not run any FFT and provide a ``reasonable'' plan (for a RISC processor with many registers). If neither @code{FFTW_ESTIMATE} nor @code{FFTW_MEASURE} is provided, the default is @code{FFTW_ESTIMATE}. @item @code{FFTW_OUT_OF_PLACE}: produce a plan assuming that the input and output arrays will be distinct (this is the default). @item @code{FFTW_IN_PLACE}: produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this ``really'' @footnote{@code{fftwnd} actually may use some temporary storage (hidden in the plan), but this storage space is only the size of the largest dimension of the array, rather than being as big as the entire array. (Unless you use @code{fftwnd} to perform one-dimensional transforms, in which case the temporary storage required for in-place transforms @emph{is} as big as the entire array.)} performs the transform in-place.) Note that, if you want to perform in-place transforms, you @emph{must} use a plan created with this option. The default mode of operation is @code{FFTW_OUT_OF_PLACE}. @item @cindex wisdom @code{FFTW_USE_WISDOM}: use any @code{wisdom} that is available to help in the creation of the plan. (@xref{Words of Wisdom}.) This can greatly speed the creation of plans, especially with the @code{FFTW_MEASURE} option. @code{FFTW_ESTIMATE} plans can also take advantage of @code{wisdom} to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the @code{FFTW_MEASURE} option is used, new @code{wisdom} will also be generated if the current transform size is not completely understood by existing @code{wisdom}. Note that the same @code{wisdom} is shared between one-dimensional and multi-dimensional transforms. @end itemize @item @code{in}, @code{out}, @code{istride}, @code{ostride} (only for the @code{_create_plan_specific} variants): see corresponding arguments in the description of @code{fftwnd}. (@xref{fftwnd,,Computing the Multi-dimensional Transform}.) @end itemize @node fftwnd, fftwnd_destroy_plan, fftwnd_create_plan, Multi-dimensional Transforms Reference @subsection Computing the Multi-dimensional Transform @example #include void fftwnd(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out); @end example @findex fftwnd @findex fftwnd_one The function @code{fftwnd} computes one or more multi-dimensional Fourier Transforms, using a plan created by @code{fftwnd_create_plan} (@pxref{fftwnd_create_plan,,Plan Creation for Multi-dimensional Transforms}). (Note that the plan determines the rank and dimensions of the array to be transformed.) The function @code{fftwnd_one} provides a simplified interface for the common case of single input array of stride 1. @cindex stride @subsubheading Arguments @itemize @bullet @item @code{plan} is the plan created by @code{fftwnd_create_plan}. (@pxref{fftwnd_create_plan,,Plan Creation for Multi-dimensional Transforms}). In the case of two and three-dimensional transforms, it could also have been created by @code{fftw2d_create_plan} or @code{fftw3d_create_plan}, respectively. @item @code{howmany} is the number of multi-dimensional transforms @code{fftwnd} will compute. @item @code{in}, @code{istride} and @code{idist} describe the input array(s). There are @code{howmany} multi-dimensional input arrays; the first one is pointed to by @code{in}, the second one is pointed to by @code{in + idist}, and so on, up to @code{in + (howmany - 1) * idist}. Each multi-dimensional input array consists of complex numbers (@pxref{Data Types}), stored in row-major format (@pxref{Multi-dimensional Array Format}), which are not necessarily contiguous in memory. Specifically, @code{in[0]} is the first element of the first array, @code{in[istride]} is the second element of the first array, and so on. In general, the @code{i}-th element of the @code{j}-th input array will be in position @code{in[i * istride + j * idist]}. Note that, here, @code{i} refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension. @itemize @minus @item @emph{In-place transforms}: @cindex in-place transform For plans created with the @code{FFTW_IN_PLACE} option, the transform is computed in-place---the output is returned in the @code{in} array, using the same strides, etcetera, as were used in the input. @end itemize @item @code{out}, @code{ostride} and @code{odist} describe the output array(s). The format is the same as for the input array. @itemize @minus @item @emph{In-place transforms}: These parameters are ignored for plans created with the @code{FFTW_IN_PLACE} option. @end itemize @end itemize The function @code{fftwnd_one} transforms a single, contiguous input array to a contiguous output array. By definition, the call @example fftwnd_one(plan, in, out) @end example is equivalent to @example fftwnd(plan, 1, in, 1, 0, out, 1, 0) @end example @node fftwnd_destroy_plan, What FFTWND Really Computes, fftwnd, Multi-dimensional Transforms Reference @subsection Destroying a Multi-dimensional Plan @example #include void fftwnd_destroy_plan(fftwnd_plan plan); @end example @findex fftwnd_destroy_plan The function @code{fftwnd_destroy_plan} frees the plan @code{plan} and releases all the memory associated with it. After destruction, a plan is no longer valid. @node What FFTWND Really Computes, , fftwnd_destroy_plan, Multi-dimensional Transforms Reference @subsection What FFTWND Really Computes @cindex Discrete Fourier Transform The conventions that we follow for the multi-dimensional transform are analogous to those for the one-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions. The output is in-order, and the zeroth element of the output is the amplitude of the zero frequency component. @tex The exact mathematical definition of our multi-dimensional transform follows. Let $X$ be a $d$-dimensional complex array whose elements are $X[j_1, j_2, \ldots, j_d]$, where $0 \leq j_s < n_s$ for all~$s \in \{ 1, 2, \ldots, d \}$. Let also $\omega_s = e^{2\pi \sqrt{-1}/n_s}$, for all ~$s \in \{ 1, 2, \ldots, d \}$. The forward transform computes a complex array~$Y$, whose structure is the same as that of~$X$, defined by $$ Y[i_1, i_2, \ldots, i_d] = \sum_{j_1 = 0}^{n_1 - 1} \sum_{j_2 = 0}^{n_2 - 1} \cdots \sum_{j_d = 0}^{n_d - 1} X[j_1, j_2, \ldots, j_d] \omega_1^{-i_1 j_1} \omega_2^{-i_2 j_2} \cdots \omega_d^{-i_d j_d} \ . $$ The backward transform computes $$ Y[i_1, i_2, \ldots, i_d] = \sum_{j_1 = 0}^{n_1 - 1} \sum_{j_2 = 0}^{n_2 - 1} \cdots \sum_{j_d = 0}^{n_d - 1} X[j_1, j_2, \ldots, j_d] \omega_1^{i_1 j_1} \omega_2^{i_2 j_2} \cdots \omega_d^{i_d j_d} \ . $$ Computing the forward transform followed by the backward transform will multiply the array by $\prod_{s=1}^{d} n_d$. @end tex @ifinfo The @TeX{} version of this manual contains the exact definition of the @math{n}-dimensional transform FFTW uses. It is not possible to display the definition on a ASCII terminal properly. @end ifinfo @ifhtml The Gods forbade using HTML to display mathematical formulas. Please see the TeX or Postscript version of this manual for the proper definition of the n-dimensional Fourier transform that FFTW uses. For completeness, we include a bitmap of the TeX output below:

@end ifhtml @c ------------------------------------------------------- @node Real One-dimensional Transforms Reference, Real Multi-dimensional Transforms Reference, Multi-dimensional Transforms Reference, FFTW Reference @section Real One-dimensional Transforms Reference The one-dimensional real routines are generally prefixed with @code{rfftw_}. @footnote{The etymologically-correct spelling would be @code{frftw_}, but it is hard to remember.} Programs using RFFTW should be linked with @code{-lrfftw -lfftw -lm} on Unix systems, or with the RFFTW, the FFTW, and the standard math libraries in general. @cindex RFFTW @cindex real transform @cindex complex to real transform @menu * rfftw_create_plan:: Plan Creation * rfftw:: Plan Execution * rfftw_destroy_plan:: Plan Destruction * What RFFTW Really Computes:: @end menu @node rfftw_create_plan, rfftw, Real One-dimensional Transforms Reference, Real One-dimensional Transforms Reference @subsection Plan Creation for Real One-dimensional Transforms @example #include rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); @end example @tindex rfftw_plan @findex rfftw_create_plan @findex rfftw_create_plan_specific The function @code{rfftw_create_plan} creates a plan, which is a data structure containing all the information that @code{rfftw} needs in order to compute the 1D real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). @code{rfftw_create_plan} returns a valid plan, or @code{NULL} if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure RFFTW in such a way that some input sizes are forbidden, and RFFTW cannot create a plan. The @code{rfftw_create_plan_specific} variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to @code{rfftw}. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are @emph{destroyed} by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). @xref{Discussion on Specific Plans}, for a discussion on specific plans. @subsubheading Arguments @itemize @bullet @item @code{n} is the size of the transform. It can be any positive integer. @itemize @minus @item RFFTW is best at handling sizes of the form @ifinfo @math{2^a 3^b 5^c 7^d 11^e 13^f}, @end ifinfo @tex $2^a 3^b 5^c 7^d 11^e 13^f$, @end tex @ifhtml 2a 3b 5c 7d 11e 13f, @end ifhtml where @math{e+f} is either @math{0} or @math{1}, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (reducing to @ifinfo @math{O(n^2)} @end ifinfo @tex $O(n^2)$ @end tex @ifhtml O(n2) @end ifhtml performance for prime sizes). (It is possible to customize RFFTW for different array sizes. @xref{Installation and Customization}, for more information.) Transforms whose sizes are powers of @math{2} are especially fast. If you have large prime factors, it may be faster to switch over to the complex FFTW routines, which have @iftex @tex $O(n \log n)$ @end tex @end iftex @ifinfo O(n lg n) @end ifinfo @ifhtml O(n lg n) @end ifhtml performance even for prime sizes (we don't know of a similar algorithm specialized for real data, unfortunately). @end itemize @item @code{dir} is the direction of the desired transform, either @code{FFTW_REAL_TO_COMPLEX} or @code{FFTW_COMPLEX_TO_REAL}, corresponding to @code{FFTW_FORWARD} or @code{FFTW_BACKWARD}, respectively. @ctindex FFTW_REAL_TO_COMPLEX @ctindex FFTW_COMPLEX_TO_REAL @item @cindex flags @code{flags} is a boolean OR (@samp{|}) of zero or more of the following: @itemize @minus @item @code{FFTW_MEASURE}: this flag tells RFFTW to find the optimal plan by actually @emph{computing} several FFTs and measuring their execution time. Depending on the installation, this can take some time. @item @code{FFTW_ESTIMATE}: do not run any FFT and provide a ``reasonable'' plan (for a RISC processor with many registers). If neither @code{FFTW_ESTIMATE} nor @code{FFTW_MEASURE} is provided, the default is @code{FFTW_ESTIMATE}. @item @code{FFTW_OUT_OF_PLACE}: produce a plan assuming that the input and output arrays will be distinct (this is the default). @item @code{FFTW_IN_PLACE}: produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: RFFTW is able to compute true in-place transforms only for small values of @code{n}. If RFFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. @emph{Warning: This option changes the meaning of some parameters of @code{rfftw}} (@pxref{rfftw,,Computing the Real One-dimensional Transform}). The default mode of operation is @code{FFTW_OUT_OF_PLACE}. @item @code{FFTW_USE_WISDOM}: use any @code{wisdom} that is available to help in the creation of the plan. (@xref{Words of Wisdom}.) This can greatly speed the creation of plans, especially with the @code{FFTW_MEASURE} option. @code{FFTW_ESTIMATE} plans can also take advantage of @code{wisdom} to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the @code{FFTW_MEASURE} option is used, new @code{wisdom} will also be generated if the current transform size is not completely understood by existing @code{wisdom}. @end itemize @item @code{in}, @code{out}, @code{istride}, @code{ostride} (only for @code{rfftw_create_plan_specific}): see corresponding arguments in the description of @code{rfftw}. (@xref{rfftw,,Computing the Real One-dimensional Transform}.) In particular, the @code{out} and @code{ostride} parameters have the same special meaning for @code{FFTW_IN_PLACE} transforms as they have for @code{rfftw}. @end itemize @node rfftw, rfftw_destroy_plan, rfftw_create_plan, Real One-dimensional Transforms Reference @subsection Computing the Real One-dimensional Transform @example #include void rfftw(rfftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist); void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); @end example @findex rfftw @findex rfftw_one The function @code{rfftw} computes the Real One-dimensional Fourier Transform, using a plan created by @code{rfftw_create_plan} (@pxref{rfftw_create_plan,,Plan Creation for Real One-dimensional Transforms}). The function @code{rfftw_one} provides a simplified interface for the common case of single input array of stride 1. @cindex stride @emph{Important:} When invoked for an out-of-place, @code{FFTW_COMPLEX_TO_REAL} transform, the input array is overwritten with scratch values by these routines. The input array is not modified for @code{FFTW_REAL_TO_COMPLEX} transforms. @subsubheading Arguments @itemize @bullet @item @code{plan} is the plan created by @code{rfftw_create_plan} (@pxref{rfftw_create_plan,,Plan Creation for Real One-dimensional Transforms}). @item @code{howmany} is the number of transforms @code{rfftw} will compute. It is faster to tell RFFTW to compute many transforms, instead of simply calling @code{rfftw} many times. @item @code{in}, @code{istride} and @code{idist} describe the input array(s). There are two cases. If the @code{plan} defines a @code{FFTW_REAL_TO_COMPLEX} transform, @code{in} is a real array. Otherwise, for @code{FFTW_COMPLEX_TO_REAL} transforms, @code{in} is a halfcomplex array @emph{whose contents will be destroyed}. @item @code{out}, @code{ostride} and @code{odist} describe the output array(s), and have the same meaning as the corresponding parameters for the input array. @itemize @minus @item @emph{In-place transforms}: If the @code{plan} specifies an in-place transform, @code{ostride} and @code{odist} are always ignored. If @code{out} is @code{NULL}, @code{out} is ignored, too. Otherwise, @code{out} is interpreted as a pointer to an array of @code{n} complex numbers, that FFTW will use as temporary space to perform the in-place computation. @code{out} is used as scratch space and its contents destroyed. In this case, @code{out} must be an ordinary array whose elements are contiguous in memory (no striding). @end itemize @end itemize The function @code{rfftw_one} transforms a single, contiguous input array to a contiguous output array. By definition, the call @example rfftw_one(plan, in, out) @end example is equivalent to @example rfftw(plan, 1, in, 1, 0, out, 1, 0) @end example @node rfftw_destroy_plan, What RFFTW Really Computes, rfftw, Real One-dimensional Transforms Reference @subsection Destroying a Real One-dimensional Plan @example #include void rfftw_destroy_plan(rfftw_plan plan); @end example @findex rfftw_destroy_plan The function @code{rfftw_destroy_plan} frees the plan @code{plan} and releases all the memory associated with it. After destruction, a plan is no longer valid. @node What RFFTW Really Computes, , rfftw_destroy_plan, Real One-dimensional Transforms Reference @subsection What RFFTW Really Computes @cindex Discrete Fourier Transform In this section, we define precisely what RFFTW computes. The real to complex (@code{FFTW_REAL_TO_COMPLEX}) transform of a real array @math{X} of size @math{n} computes an hermitian array @math{Y}, where @tex $$ Y_i = \sum_{j = 0}^{n - 1} X_j e^{-2\pi i j \sqrt{-1}/n} $$ @end tex @ifinfo @center Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(-2 pi i j sqrt(-1)/n) @end ifinfo @ifhtml
@end ifhtml (That @math{Y} is a hermitian array is not intended to be obvious, although the proof is easy.) The hermitian array @math{Y} is stored in halfcomplex order (@pxref{Data Types}). Currently, RFFTW provides no way to compute a real to complex transform with a positive sign in the exponent. The complex to real (@code{FFTW_COMPLEX_TO_REAL}) transform of a hermitian array @math{X} of size @math{n} computes a real array @math{Y}, where @tex $$ Y_i = \sum_{j = 0}^{n - 1} X_j e^{2\pi i j \sqrt{-1}/n} $$ @end tex @ifinfo @center Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(2 pi i j sqrt(-1)/n) @end ifinfo @ifhtml
@end ifhtml (That @math{Y} is a real array is not intended to be obvious, although the proof is easy.) The hermitian input array @math{X} is stored in halfcomplex order (@pxref{Data Types}). Currently, RFFTW provides no way to compute a complex to real transform with a negative sign in the exponent. @cindex normalization Like FFTW, RFFTW computes an unnormalized transform. In other words, applying the real to complex (forward) and then the complex to real (backward) transform will multiply the input by @math{n}. @c ------------------------------------------------------- @node Real Multi-dimensional Transforms Reference, Wisdom Reference, Real One-dimensional Transforms Reference, FFTW Reference @section Real Multi-dimensional Transforms Reference @cindex real multi-dimensional transform @cindex multi-dimensional transform The multi-dimensional real routines are generally prefixed with @code{rfftwnd_}. Programs using RFFTWND should be linked with @code{-lrfftw -lfftw -lm} on Unix systems, or with the FFTW, RFFTW, and standard math libraries in general. @cindex RFFTWND @menu * rfftwnd_create_plan:: Plan Creation * rfftwnd:: Plan Execution * Array Dimensions for Real Multi-dimensional Transforms:: * Strides in In-place RFFTWND:: * rfftwnd_destroy_plan:: Plan Destruction * What RFFTWND Really Computes:: @end menu @node rfftwnd_create_plan, rfftwnd, Real Multi-dimensional Transforms Reference, Real Multi-dimensional Transforms Reference @subsection Plan Creation for Real Multi-dimensional Transforms @example #include rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); rfftwnd_plan rfftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); @end example @tindex rfftwnd_plan @tindex fftw_direction @findex rfftwnd_create_plan @findex rfftw2d_create_plan @findex rfftw3d_create_plan The function @code{rfftwnd_create_plan} creates a plan, which is a data structure containing all the information that @code{rfftwnd} needs in order to compute a multi-dimensional real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions @code{rfftw2d_create_plan} and @code{rfftw3d_create_plan} are optional, alternative interfaces to @code{rfftwnd_create_plan} for two and three dimensions, respectively. @code{rfftwnd_create_plan} returns a valid plan, or @code{NULL} if, for some reason, the plan can't be created. This can happen if the arguments are invalid in some way (e.g. if @code{rank} < 0). @subsubheading Arguments @itemize @bullet @item @code{rank} is the dimensionality of the arrays to be transformed. It can be any non-negative integer. @item @code{n} is a pointer to an array of @code{rank} integers, giving the size of each dimension of the arrays to be transformed. Note that these are always the dimensions of the @emph{real} arrays; the complex arrays have different dimensions (@pxref{Array Dimensions for Real Multi-dimensional Transforms}). These sizes, which must be positive integers, correspond to the dimensions of row-major arrays---i.e. @code{n[0]} is the size of the dimension whose indices vary most slowly, and so on. (@xref{Multi-dimensional Array Format}, for more information.) @itemize @minus @item @xref{rfftw_create_plan,,Plan Creation for Real One-dimensional Transforms}, for more information regarding optimal array sizes. @end itemize @item @code{nx} and @code{ny} in @code{rfftw2d_create_plan} are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on @code{nx x ny} arrays in row-major order, where @code{nx} is the number of rows and @code{ny} is the number of columns. @item @code{nx}, @code{ny} and @code{nz} in @code{rfftw3d_create_plan} are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on @code{nx x ny x nz} arrays in row-major order. @item @code{dir} is the direction of the desired transform, either @code{FFTW_REAL_TO_COMPLEX} or @code{FFTW_COMPLEX_TO_REAL}, corresponding to @code{FFTW_FORWARD} or @code{FFTW_BACKWARD}, respectively. @item @cindex flags @code{flags} is a boolean OR (@samp{|}) of zero or more of the following: @itemize @minus @item @code{FFTW_MEASURE}: this flag tells FFTW to find the optimal plan by actually @emph{computing} several FFTs and measuring their execution time. @item @code{FFTW_ESTIMATE}: do not run any FFT and provide a ``reasonable'' plan (for a RISC processor with many registers). If neither @code{FFTW_ESTIMATE} nor @code{FFTW_MEASURE} is provided, the default is @code{FFTW_ESTIMATE}. @item @code{FFTW_OUT_OF_PLACE}: produce a plan assuming that the input and output arrays will be distinct (this is the default). @item @cindex in-place transform @code{FFTW_IN_PLACE}: produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this ``really'' performs the transform in-place.) Note that, if you want to perform in-place transforms, you @emph{must} use a plan created with this option. The use of this option has important implications for the size of the input/output array (@pxref{rfftwnd,,Computing the Real Multi-dimensional Transform}). The default mode of operation is @code{FFTW_OUT_OF_PLACE}. @item @cindex wisdom @code{FFTW_USE_WISDOM}: use any @code{wisdom} that is available to help in the creation of the plan. (@xref{Words of Wisdom}.) This can greatly speed the creation of plans, especially with the @code{FFTW_MEASURE} option. @code{FFTW_ESTIMATE} plans can also take advantage of @code{wisdom} to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the @code{FFTW_MEASURE} option is used, new @code{wisdom} will also be generated if the current transform size is not completely understood by existing @code{wisdom}. Note that the same @code{wisdom} is shared between one-dimensional and multi-dimensional transforms. @end itemize @end itemize @node rfftwnd, Array Dimensions for Real Multi-dimensional Transforms, rfftwnd_create_plan, Real Multi-dimensional Transforms Reference @subsection Computing the Real Multi-dimensional Transform @example #include void rfftwnd_real_to_complex(rfftwnd_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void rfftwnd_complex_to_real(rfftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist); void rfftwnd_one_real_to_complex(rfftwnd_plan p, fftw_real *in, fftw_complex *out); void rfftwnd_one_complex_to_real(rfftwnd_plan p, fftw_complex *in, fftw_real *out); @end example @findex rfftwnd_real_to_complex @findex rfftwnd_complex_to_real @findex rfftwnd_one_real_to_complex @findex rfftwnd_one_complex_to_real These functions compute the real multi-dimensional Fourier Transform, using a plan created by @code{rfftwnd_create_plan} (@pxref{rfftwnd_create_plan,,Plan Creation for Real Multi-dimensional Transforms}). (Note that the plan determines the rank and dimensions of the array to be transformed.) The @samp{@code{rfftwnd_one_}} functions provide a simplified interface for the common case of single input array of stride 1. Unlike other transform routines in FFTW, we here use separate functions for the two directions of the transform in order to correctly express the datatypes of the parameters. @emph{Important:} When invoked for an out-of-place, @code{FFTW_COMPLEX_TO_REAL} transform with @code{rank > 1}, the input array is overwritten with scratch values by these routines. The input array is not modified for @code{FFTW_REAL_TO_COMPLEX} transforms or for @code{FFTW_COMPLEX_TO_REAL} with @code{rank == 1}. @subsubheading Arguments @itemize @bullet @item @code{plan} is the plan created by @code{rfftwnd_create_plan}. (@pxref{rfftwnd_create_plan,,Plan Creation for Real Multi-dimensional Transforms}). In the case of two and three-dimensional transforms, it could also have been created by @code{rfftw2d_create_plan} or @code{rfftw3d_create_plan}, respectively. @code{FFTW_REAL_TO_COMPLEX} plans must be used with the @samp{@code{real_to_complex}} functions, and @code{FFTW_COMPLEX_TO_REAL} plans must be used with the @samp{@code{complex_to_real}} functions. It is an error to mismatch the plan direction and the transform function. @item @code{howmany} is the number of transforms to be computed. @item @cindex stride @code{in}, @code{istride} and @code{idist} describe the input array(s). There are @code{howmany} input arrays; the first one is pointed to by @code{in}, the second one is pointed to by @code{in + idist}, and so on, up to @code{in + (howmany - 1) * idist}. Each input array is stored in row-major format (@pxref{Multi-dimensional Array Format}), and is not necessarily contiguous in memory. Specifically, @code{in[0]} is the first element of the first array, @code{in[istride]} is the second element of the first array, and so on. In general, the @code{i}-th element of the @code{j}-th input array will be in position @code{in[i * istride + j * idist]}. Note that, here, @code{i} refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension. The dimensions of the arrays are different for real and complex data, and are discussed in more detail below (@pxref{Array Dimensions for Real Multi-dimensional Transforms}). @itemize @minus @item @emph{In-place transforms}: For plans created with the @code{FFTW_IN_PLACE} option, the transform is computed in-place---the output is returned in the @code{in} array. The meaning of the @code{stride} and @code{dist} parameters in this case is subtle and is discussed below (@pxref{Strides in In-place RFFTWND}). @end itemize @item @code{out}, @code{ostride} and @code{odist} describe the output array(s). The format is the same as that for the input array. See below for a discussion of the dimensions of the output array for real and complex data. @itemize @minus @item @emph{In-place transforms}: These parameters are ignored for plans created with the @code{FFTW_IN_PLACE} option. @end itemize @end itemize The function @code{rfftwnd_one} transforms a single, contiguous input array to a contiguous output array. By definition, the call @example rfftwnd_one_...(plan, in, out) @end example is equivalent to @example rfftwnd_...(plan, 1, in, 1, 0, out, 1, 0) @end example @node Array Dimensions for Real Multi-dimensional Transforms, Strides in In-place RFFTWND, rfftwnd, Real Multi-dimensional Transforms Reference @subsection Array Dimensions for Real Multi-dimensional Transforms @cindex rfftwnd array format The output of a multi-dimensional transform of real data contains symmetries that, in principle, make half of the outputs redundant (@pxref{What RFFTWND Really Computes}). In practice, it is not possible to entirely realize these savings in an efficient and understandable format. Instead, the output of the rfftwnd transforms is @emph{slightly} over half of the output of the corresponding complex transform. We do not ``pack'' the data in any way, but store it as an ordinary array of @code{fftw_complex} values. In fact, this data is simply a subsection of what would be the array in the corresponding complex transform. Specifically, for a real transform of dimensions @tex $n_1 \times n_2 \times \cdots \times n_d$, @end tex @ifinfo n1 x n2 x ... x nd, @end ifinfo @ifhtml n1 x n2 x ... x nd, @end ifhtml the complex data is an @tex $n_1 \times n_2 \times \cdots \times (n_d/2+1)$ @end tex @ifinfo n1 x n2 x ... x (nd/2+1) @end ifinfo @ifhtml n1 x n2 x ... x (nd/2+1) @end ifhtml array of @code{fftw_complex} values in row-major order (with the division rounded down). That is, we only store the lower half (plus one element) of the last dimension of the data from the ordinary complex transform. (We could have instead taken half of any other dimension, but implementation turns out to be simpler if the last, contiguous, dimension is used.) @cindex in-place transform @cindex padding Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data---two extra if the last dimension is even and one if it is odd. That is, the last dimension of the real data must physically contain @tex $2 (n_d/2+1)$ @end tex @ifinfo 2 * (nd/2+1) @end ifinfo @ifhtml 2 * (nd/2+1) @end ifhtml @code{fftw_real} values (exactly enough to hold the complex data). This physical array size does not, however, change the @emph{logical} array size---only @tex $n_d$ @end tex @ifinfo nd @end ifinfo @ifhtml nd @end ifhtml values are actually stored in the last dimension, and @tex $n_d$ @end tex @ifinfo nd @end ifinfo @ifhtml nd @end ifhtml is the last dimension passed to @code{rfftwnd_create_plan}. @node Strides in In-place RFFTWND, rfftwnd_destroy_plan, Array Dimensions for Real Multi-dimensional Transforms, Real Multi-dimensional Transforms Reference @subsection Strides in In-place RFFTWND @cindex rfftwnd array format @cindex stride The fact that the input and output datatypes are different for rfftwnd complicates the meaning of the @code{stride} and @code{dist} parameters of in-place transforms---are they in units of @code{fftw_real} or @code{fftw_complex} elements? When reading the input, they are interpreted in units of the datatype of the input data. When writing the output, the @code{istride} and @code{idist} are translated to the output datatype's ``units'' in one of two ways, corresponding to the two most common situations in which @code{stride} and @code{dist} parameters are useful. Below, we refer to these ``translated'' parameters as @code{ostride_t} and @code{odist_t}. (Note that these are computed internally by rfftwnd; the actual @code{ostride} and @code{odist} parameters are ignored for in-place transforms.) First, there is the case where you are transforming a number of contiguous arrays located one after another in memory. In this situation, @code{istride} is @code{1} and @code{idist} is the product of the physical dimensions of the array. @code{ostride_t} and @code{odist_t} are then chosen so that the output arrays are contiguous and lie on top of the input arrays. @code{ostride_t} is therefore @code{1}. For a real-to-complex transform, @code{odist_t} is @code{idist/2}; for a complex-to-real transform, @code{odist_t} is @code{idist*2}. The second case is when you have an array in which each element has @code{nc} components (e.g. a structure with @code{nc} numeric fields), and you want to transform all of the components at once. Here, @code{istride} is @code{nc} and @code{idist} is @code{1}. For this case, it is natural to want the output to also have @code{nc} consecutive components, now of the output data type; this is exactly what rfftwnd does. Specifically, it uses an @code{ostride_t} equal to @code{istride}, and an @code{odist_t} of @code{1}. (Astute readers will realize that some extra buffer space is required in order to perform such a transform; this is handled automatically by rfftwnd.) The general rule is as follows. @code{ostride_t} equals @code{istride}. If @code{idist} is @code{1} and @code{idist} is less than @code{istride}, then @code{odist_t} is @code{1}. Otherwise, for a real-to-complex transform @code{odist_t} is @code{idist/2} and for a complex-to-real transform @code{odist_t} is @code{idist*2}. @node rfftwnd_destroy_plan, What RFFTWND Really Computes, Strides in In-place RFFTWND, Real Multi-dimensional Transforms Reference @subsection Destroying a Multi-dimensional Plan @example #include void rfftwnd_destroy_plan(rfftwnd_plan plan); @end example @findex rfftwnd_destroy_plan The function @code{rfftwnd_destroy_plan} frees the plan @code{plan} and releases all the memory associated with it. After destruction, a plan is no longer valid. @node What RFFTWND Really Computes, , rfftwnd_destroy_plan, Real Multi-dimensional Transforms Reference @subsection What RFFTWND Really Computes @cindex Discrete Fourier Transform The conventions that we follow for the real multi-dimensional transform are analogous to those for the complex multi-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions (that is, the logical dimensions of the real data). The forward transform is real-to-complex and the backward transform is complex-to-real. @cindex Discrete Fourier Transform @cindex hermitian array @tex The exact mathematical definition of our real multi-dimensional transform follows. @noindent@emph{Real to complex (forward) transform.} Let $X$ be a $d$-dimensional real array whose elements are $X[j_1, j_2, \ldots, j_d]$, where $0 \leq j_s < n_s$ for all~$s \in \{ 1, 2, \ldots, d \}$. Let also $\omega_s = e^{2\pi \sqrt{-1}/n_s}$, for all ~$s \in \{ 1, 2, \ldots, d \}$. The real to complex transform computes a complex array~$Y$, whose structure is the same as that of~$X$, defined by $$ Y[i_1, i_2, \ldots, i_d] = \sum_{j_1 = 0}^{n_1 - 1} \sum_{j_2 = 0}^{n_2 - 1} \cdots \sum_{j_d = 0}^{n_d - 1} X[j_1, j_2, \ldots, j_d] \omega_1^{-i_1 j_1} \omega_2^{-i_2 j_2} \cdots \omega_d^{-i_d j_d} \ . $$ The output array $Y$ enjoys a multidimensional hermitian symmetry, that is, the identity $Y[i_1, i_2, \ldots, i_d] = Y[n_1-i_1, n_2-i_2, \ldots, n_d - i_d]^{*}$ holds for all $0 \leq i_s < n_s$. Because of this symmetry, $Y$ is stored in the peculiar way described in @ref{Array Dimensions for Real Multi-dimensional Transforms}. @cindex hermitian array @noindent@emph{Complex to real (backward) transform.} Let $X$ be a $d$-dimensional complex array whose elements are $X[j_1, j_2, \ldots, j_d]$, where $0 \leq j_s < n_s$ for all~$s \in \{ 1, 2, \ldots, d \}$. The array $X$ must be hermitian, that is, the identity $X[j_1, j_2, \ldots, j_d] = X[n_1-j_1, n_2-j_2, \ldots, n_d - j_d]^{*}$ must hold for all $0 \leq j_s < n_s$. Moreover, $X$ must be stored in memory in the peculiar way described in @ref{Array Dimensions for Real Multi-dimensional Transforms}. Let $\omega_s = e^{2\pi \sqrt{-1}/n_s}$, for all ~$s \in \{ 1, 2, \ldots, d \}$. The complex to real transform computes a real array~$Y$, whose structure is the same as that of~$X$, defined by $$ Y[i_1, i_2, \ldots, i_d] = \sum_{j_1 = 0}^{n_1 - 1} \sum_{j_2 = 0}^{n_2 - 1} \cdots \sum_{j_d = 0}^{n_d - 1} X[j_1, j_2, \ldots, j_d] \omega_1^{i_1 j_1} \omega_2^{i_2 j_2} \cdots \omega_d^{i_d j_d} \ . $$ (That $Y$ is real is not meant to be obvious, although the proof is easy.) Computing the forward transform followed by the backward transform will multiply the array by $\prod_{s=1}^{d} n_d$. @end tex @ifinfo The @TeX{} version of this manual contains the exact definition of the @math{n}-dimensional transform RFFTWND uses. It is not possible to display the definition on a ASCII terminal properly. @end ifinfo @ifhtml The Gods forbade using HTML to display mathematical formulas. Please see the TeX or Postscript version of this manual for the proper definition of the n-dimensional real Fourier transform that RFFTW uses. For completeness, we include a bitmap of the TeX output below:

@end ifhtml @c ------------------------------------------------------- @node Wisdom Reference, Memory Allocator Reference, Real Multi-dimensional Transforms Reference, FFTW Reference @section Wisdom Reference @menu * fftw_export_wisdom:: * fftw_import_wisdom:: * fftw_forget_wisdom:: @end menu @cindex wisdom @node fftw_export_wisdom, fftw_import_wisdom, Wisdom Reference, Wisdom Reference @subsection Exporting Wisdom @example #include void fftw_export_wisdom(void (*emitter)(char c, void *), void *data); void fftw_export_wisdom_to_file(FILE *output_file); char *fftw_export_wisdom_to_string(void); @end example @findex fftw_export_wisdom @findex fftw_export_wisdom_to_file @findex fftw_export_wisdom_to_string These functions allow you to export all currently accumulated @code{wisdom} in a form from which it can be later imported and restored, even during a separate run of the program. (@xref{Words of Wisdom}.) The current store of @code{wisdom} is not affected by calling any of these routines. @code{fftw_export_wisdom} exports the @code{wisdom} to any output medium, as specified by the callback function @code{emitter}. @code{emitter} is a @code{putc}-like function that writes the character @code{c} to some output; its second parameter is the @code{data} pointer passed to @code{fftw_export_wisdom}. For convenience, the following two ``wrapper'' routines are provided: @code{fftw_export_wisdom_to_file} writes the @code{wisdom} to the current position in @code{output_file}, which should be open with write permission. Upon exit, the file remains open and is positioned at the end of the @code{wisdom} data. @code{fftw_export_wisdom_to_string} returns a pointer to a @code{NULL}-terminated string holding the @code{wisdom} data. This string is dynamically allocated, and it is the responsibility of the caller to deallocate it with @code{fftw_free} when it is no longer needed. All of these routines export the wisdom in the same format, which we will not document here except to say that it is LISP-like ASCII text that is insensitive to white space. @node fftw_import_wisdom, fftw_forget_wisdom, fftw_export_wisdom, Wisdom Reference @subsection Importing Wisdom @example #include fftw_status fftw_import_wisdom(int (*get_input)(void *), void *data); fftw_status fftw_import_wisdom_from_file(FILE *input_file); fftw_status fftw_import_wisdom_from_string(const char *input_string); @end example @findex fftw_import_wisdom @findex fftw_import_wisdom_from_file @findex fftw_import_wisdom_from_string These functions import @code{wisdom} into a program from data stored by the @code{fftw_export_wisdom} functions above. (@xref{Words of Wisdom}.) The imported @code{wisdom} supplements rather than replaces any @code{wisdom} already accumulated by the running program (except when there is conflicting @code{wisdom}, in which case the existing wisdom is replaced). @code{fftw_import_wisdom} imports @code{wisdom} from any input medium, as specified by the callback function @code{get_input}. @code{get_input} is a @code{getc}-like function that returns the next character in the input; its parameter is the @code{data} pointer passed to @code{fftw_import_wisdom}. If the end of the input data is reached (which should never happen for valid data), it may return either @code{NULL} (ASCII 0) or @code{EOF} (as defined in @code{}). For convenience, the following two ``wrapper'' routines are provided: @code{fftw_import_wisdom_from_file} reads @code{wisdom} from the current position in @code{input_file}, which should be open with read permission. Upon exit, the file remains open and is positioned at the end of the @code{wisdom} data. @code{fftw_import_wisdom_from_string} reads @code{wisdom} from the @code{NULL}-terminated string @code{input_string}. The return value of these routines is @code{FFTW_SUCCESS} if the wisdom was read successfully, and @code{FFTW_FAILURE} otherwise. Note that, in all of these functions, any data in the input stream past the end of the @code{wisdom} data is simply ignored (it is not even read if the @code{wisdom} data is well-formed). @node fftw_forget_wisdom, , fftw_import_wisdom, Wisdom Reference @subsection Forgetting Wisdom @example #include void fftw_forget_wisdom(void); @end example @findex fftw_forget_wisdom Calling @code{fftw_forget_wisdom} causes all accumulated @code{wisdom} to be discarded and its associated memory to be freed. (New @code{wisdom} can still be gathered subsequently, however.) @c ------------------------------------------------------- @node Memory Allocator Reference, Thread safety, Wisdom Reference, FFTW Reference @section Memory Allocator Reference @example #include void *(*fftw_malloc_hook) (size_t n); void (*fftw_free_hook) (void *p); @end example @vindex fftw_malloc_hook @findex fftw_malloc @ffindex malloc @vindex fftw_free_hook Whenever it has to allocate and release memory, FFTW ordinarily calls @code{malloc} and @code{free}. If @code{malloc} fails, FFTW prints an error message and exits. This behavior may be undesirable in some applications. Also, special memory-handling functions may be necessary in certain environments. Consequently, FFTW provides means by which you can install your own memory allocator and take whatever error-correcting action you find appropriate. The variables @code{fftw_malloc_hook} and @code{fftw_free_hook} are pointers to functions, and they are normally @code{NULL}. If you set those variables to point to other functions, then FFTW will use your routines instead of @code{malloc} and @code{free}. @code{fftw_malloc_hook} must point to a @code{malloc}-like function, and @code{fftw_free_hook} must point to a @code{free}-like function. @c ------------------------------------------------------- @node Thread safety, , Memory Allocator Reference, FFTW Reference @section Thread safety @cindex threads @cindex thread safety Users writing multi-threaded programs must concern themselves with the @dfn{thread safety} of the libraries they use---that is, whether it is safe to call routines in parallel from multiple threads. FFTW can be used in such an environment, but some care must be taken because certain parts of FFTW use private global variables to share data between calls. In particular, the plan-creation functions share trigonometric tables and accumulated @code{wisdom}. (Users should note that these comments only apply to programs using shared-memory threads. Parallelism using MPI or forked processes involves a separate address-space and global variables for each process, and is not susceptible to problems of this sort.) The central restriction of FFTW is that it is not safe to create multiple plans in parallel. You must either create all of your plans from a single thread, or instead use a semaphore, mutex, or other mechanism to ensure that different threads don't attempt to create plans at the same time. The same restriction also holds for destruction of plans and importing/forgetting @code{wisdom}. Once created, a plan may safely be used in any thread. The actual transform routines in FFTW (@code{fftw_one}, etcetera) are re-entrant and thread-safe, so it is fine to call them simultaneously from multiple threads. Another question arises, however---is it safe to use the @emph{same plan} for multiple transforms in parallel? (It would be unsafe if, for example, the plan were modified in some way by the transform.) We address this question by defining an additional planner flag, @code{FFTW_THREADSAFE}. @ctindex FFTW_THREADSAFE When included in the flags for any of the plan-creation routines, @code{FFTW_THREADSAFE} guarantees that the resulting plan will be read-only and safe to use in parallel by multiple threads. @c ************************************************************ @node Parallel FFTW, Calling FFTW from Fortran, FFTW Reference, Top @chapter Parallel FFTW @cindex parallel transform In this chapter we discuss the use of FFTW in a parallel environment, documenting the different parallel libraries that we have provided. (Users calling FFTW from a multi-threaded program should also consult @ref{Thread safety}.) The FFTW package currently contains three parallel transform implementations that leverage the uniprocessor FFTW code: @itemize @bullet @item @cindex threads The first set of routines utilizes shared-memory threads for parallel one- and multi-dimensional transforms of both real and complex data. Any program using FFTW can be trivially modified to use the multi-threaded routines. This code can use any common threads implementation, including POSIX threads. (POSIX threads are available on most Unix variants, including Linux.) These routines are located in the @code{threads} directory, and are documented in @ref{Multi-threaded FFTW}. @item @cindex MPI @cindex distributed memory The @code{mpi} directory contains multi-dimensional transforms of real and complex data for parallel machines supporting MPI. It also includes parallel one-dimensional transforms for complex data. The main feature of this code is that it supports distributed-memory transforms, so it runs on everything from workstation clusters to massively-parallel supercomputers. More information on MPI can be found at the @uref{http://www.mcs.anl.gov/mpi, MPI home page}. The FFTW MPI routines are documented in @ref{MPI FFTW}. @item @cindex Cilk We also have an experimental parallel implementation written in Cilk, a C-like parallel language developed at MIT and currently available for several SMP platforms. For more information on Cilk see @uref{http://supertech.lcs.mit.edu/cilk, the Cilk home page}. The FFTW Cilk code can be found in the @code{cilk} directory, with parallelized one- and multi-dimensional transforms of complex data. The Cilk FFTW routines are documented in @code{cilk/README}. @end itemize @menu * Multi-threaded FFTW:: * MPI FFTW:: @end menu @c ------------------------------------------------------------ @node Multi-threaded FFTW, MPI FFTW, Parallel FFTW, Parallel FFTW @section Multi-threaded FFTW @cindex threads In this section we document the parallel FFTW routines for shared-memory threads on SMP hardware. These routines, which support parallel one- and multi-dimensional transforms of both real and complex data, are the easiest way to take advantage of multiple processors with FFTW. They work just like the corresponding uniprocessor transform routines, except that they take the number of parallel threads to use as an extra parameter. Any program that uses the uniprocessor FFTW can be trivially modified to use the multi-threaded FFTW. @menu * Installation and Supported Hardware/Software:: * Usage of Multi-threaded FFTW:: * How Many Threads to Use?:: * Using Multi-threaded FFTW in a Multi-threaded Program:: * Tips for Optimal Threading:: @end menu @c ------------------------------------------------------- @node Installation and Supported Hardware/Software, Usage of Multi-threaded FFTW, Multi-threaded FFTW, Multi-threaded FFTW @subsection Installation and Supported Hardware/Software All of the FFTW threads code is located in the @code{threads} subdirectory of the FFTW package. On Unix systems, the FFTW threads libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including @code{--enable-threads} in the flags to the @code{configure} script (@pxref{Installation on Unix}). (Note also that the threads routines, when enabled, are automatically tested by the @samp{@code{make check}} self-tests.) @fpindex configure The threads routines require your operating system to have some sort of shared-memory threads support. Specifically, the FFTW threads package works with POSIX threads (available on most Unix variants, including Linux), Solaris threads, @uref{http://www.be.com,BeOS} threads (tested on BeOS DR8.2), Mach C threads (reported to work by users), and Win32 threads (reported to work by users). (There is also untested code to use MacOS MP threads.) We also support using @uref{http://www.openmp.org,OpenMP} or SGI MP compiler directives to launch threads, enabled by using @code{--with-openmp} or @code{--with-sgimp} in addition to @code{--enable-threads}. This is especially useful if you are employing that sort of directive in your own code, in order to minimize conflicts. If you have a shared-memory machine that uses a different threads API, it should be a simple matter of programming to include support for it; see the file @code{fftw_threads-int.h} for more detail. SMP hardware is not required, although of course you need multiple processors to get any benefit from the multithreaded transforms. @c ------------------------------------------------------- @node Usage of Multi-threaded FFTW, How Many Threads to Use?, Installation and Supported Hardware/Software, Multi-threaded FFTW @subsection Usage of Multi-threaded FFTW Here, it is assumed that the reader is already familiar with the usage of the uniprocessor FFTW routines, described elsewhere in this manual. We only describe what one has to change in order to use the multi-threaded routines. First, instead of including @code{} or @code{}, you should include the files @code{} or @code{}, respectively. Second, before calling any FFTW routines, you should call the function: @example int fftw_threads_init(void); @end example @findex fftw_threads_init This function, which should only be called once (probably in your @code{main()} function), performs any one-time initialization required to use threads on your system. It returns zero if successful, and a non-zero value if there was an error (in which case, something is seriously wrong and you should probably exit the program). Third, when you want to actually compute the transform, you should use one of the following transform routines instead of the ordinary FFTW functions: @example fftw_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); @findex fftw_threads fftw_threads_one(nthreads, plan, in, out); @findex fftw_threads_one fftwnd_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); @findex fftwnd_threads fftwnd_threads_one(nthreads, plan, in, out); @findex fftwnd_threads_one rfftw_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); @findex rfftw_threads rfftw_threads_one(nthreads, plan, in, out); @findex rfftw_threads_one rfftwnd_threads_real_to_complex(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); @findex rfftwnd_threads_real_to_complex rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out); @findex rfftwnd_threads_one_real_to_complex rfftwnd_threads_complex_to_real(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); @findex rfftwnd_threads_complex_to_real rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out); @findex rfftwnd_threads_one_real_to_complex rfftwnd_threads_one_complex_to_real(nthreads, plan, in, out); @findex rfftwnd_threads_one_complex_to_real @end example All of these routines take exactly the same arguments and have exactly the same effects as their uniprocessor counterparts (i.e. without the @samp{@code{_threads}}) @emph{except} that they take one extra parameter, @code{nthreads} (of type @code{int}), before the normal parameters.@footnote{There is one exception: when performing one-dimensional in-place transforms, the @code{out} parameter is always ignored by the multi-threaded routines, instead of being used as a workspace if it is non-@code{NULL} as in the uniprocessor routines. The multi-threaded routines always allocate their own workspace (the size of which depends upon the number of threads).} The @code{nthreads} parameter specifies the number of threads of execution to use when performing the transform (actually, the maximum number of threads). @cindex number of threads For example, to parallelize a single one-dimensional transform of complex data, instead of calling the uniprocessor @code{fftw_one(plan, in, out)}, you would call @code{fftw_threads_one(nthreads, plan, in, out)}. Passing an @code{nthreads} of @code{1} means to use only one thread (the main thread), and is equivalent to calling the uniprocessor routine. Passing an @code{nthreads} of @code{2} means that the transform is potentially parallelized over two threads (and two processors, if you have them), and so on. These are the only changes you need to make to your source code. Calls to all other FFTW routines (plan creation, destruction, wisdom, etcetera) are not parallelized and remain the same. (The same plans and wisdom are used by both uniprocessor and multi-threaded transforms.) Your arrays are allocated and formatted in the same way, and so on. Programs using the parallel complex transforms should be linked with @code{-lfftw_threads -lfftw -lm} on Unix. Programs using the parallel real transforms should be linked with @code{-lrfftw_threads -lfftw_threads -lrfftw -lfftw -lm}. You will also need to link with whatever library is responsible for threads on your system (e.g. @code{-lpthread} on Linux). @cindex linking on Unix @c ------------------------------------------------------- @node How Many Threads to Use?, Using Multi-threaded FFTW in a Multi-threaded Program, Usage of Multi-threaded FFTW, Multi-threaded FFTW @subsection How Many Threads to Use? @cindex number of threads There is a fair amount of overhead involved in spawning and synchronizing threads, so the optimal number of threads to use depends upon the size of the transform as well as on the number of processors you have. As a general rule, you don't want to use more threads than you have processors. (Using more threads will work, but there will be extra overhead with no benefit.) In fact, if the problem size is too small, you may want to use fewer threads than you have processors. You will have to experiment with your system to see what level of parallelization is best for your problem size. Useful tools to help you do this are the test programs that are automatically compiled along with the threads libraries, @code{fftw_threads_test} and @code{rfftw_threads_test} (in the @code{threads} subdirectory). These @pindex fftw_threads_test @pindex rfftw_threads_test take the same arguments as the other FFTW test programs (see @code{tests/README}), except that they also take the number of threads to use as a first argument, and report the parallel speedup in speed tests. For example, @example fftw_threads_test 2 -s 128x128 @end example will benchmark complex 128x128 transforms using two threads and report the speedup relative to the uniprocessor transform. @cindex benchmark For instance, on a 4-processor 200MHz Pentium Pro system running Linux 2.2.0, we found that the "crossover" point at which 2 threads became beneficial for complex transforms was about 4k points, while 4 threads became beneficial at 8k points. @c ------------------------------------------------------- @node Using Multi-threaded FFTW in a Multi-threaded Program, Tips for Optimal Threading, How Many Threads to Use?, Multi-threaded FFTW @subsection Using Multi-threaded FFTW in a Multi-threaded Program @cindex thread safety It is perfectly possible to use the multi-threaded FFTW routines from a multi-threaded program (e.g. have multiple threads computing multi-threaded transforms simultaneously). If you have the processors, more power to you! However, the same restrictions apply as for the uniprocessor FFTW routines (@pxref{Thread safety}). In particular, you should recall that you may not create or destroy plans in parallel. @c ------------------------------------------------------- @node Tips for Optimal Threading, , Using Multi-threaded FFTW in a Multi-threaded Program, Multi-threaded FFTW @subsection Tips for Optimal Threading Not all transforms are equally well-parallelized by the multi-threaded FFTW routines. (This is merely a consequence of laziness on the part of the implementors, and is not inherent to the algorithms employed.) Mainly, the limitations are in the parallel one-dimensional transforms. The things to avoid if you want optimal parallelization are as follows: @subsection Parallelization deficiencies in one-dimensional transforms @itemize @bullet @item Large prime factors can sometimes parallelize poorly. Of course, you should avoid these anyway if you want high performance. @item @cindex in-place transform Single in-place transforms don't parallelize completely. (Multiple in-place transforms, i.e. @code{howmany > 1}, are fine.) Again, you should avoid these in any case if you want high performance, as they require transforming to a scratch array and copying back. @item Single real-complex (@code{rfftw}) transforms don't parallelize completely. This is unfortunate, but parallelizing this correctly would have involved a lot of extra code (and a much larger library). You still get some benefit from additional processors, but if you have a very large number of processors you will probably be better off using the parallel complex (@code{fftw}) transforms. Note that multi-dimensional real transforms or multiple one-dimensional real transforms are fine. @end itemize @c ------------------------------------------------------------ @node MPI FFTW, , Multi-threaded FFTW, Parallel FFTW @section MPI FFTW @cindex MPI This section describes the MPI FFTW routines for distributed-memory (and shared-memory) machines supporting MPI (Message Passing Interface). The MPI routines are significantly different from the ordinary FFTW because the transform data here are @emph{distributed} over multiple processes, so that each process gets only a portion of the array. @cindex distributed memory Currently, multi-dimensional transforms of both real and complex data, as well as one-dimensional transforms of complex data, are supported. @menu * MPI FFTW Installation:: * Usage of MPI FFTW for Complex Multi-dimensional Transforms:: * MPI Data Layout:: * Usage of MPI FFTW for Real Multi-dimensional Transforms:: * Usage of MPI FFTW for Complex One-dimensional Transforms:: * MPI Tips:: @end menu @c ------------------------------------------------------- @node MPI FFTW Installation, Usage of MPI FFTW for Complex Multi-dimensional Transforms, MPI FFTW, MPI FFTW @subsection MPI FFTW Installation The FFTW MPI library code is all located in the @code{mpi} subdirectoy of the FFTW package (along with source code for test programs). On Unix systems, the FFTW MPI libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including @code{--enable-mpi} in the flags to the @code{configure} script (@pxref{Installation on Unix}). @fpindex configure The only requirement of the FFTW MPI code is that you have the standard MPI 1.1 (or later) libraries and header files installed on your system. A free implementation of MPI is available from @uref{http://www-unix.mcs.anl.gov/mpi/mpich/,the MPICH home page}. Previous versions of the FFTW MPI routines have had an unfortunate tendency to expose bugs in MPI implementations. The current version has been largely rewritten, and hopefully avoids some of the problems. If you run into difficulties, try passing the optional workspace to @code{(r)fftwnd_mpi} (see below), as this allows us to use the standard (and hopefully well-tested) @code{MPI_Alltoall} primitive for @ffindex MPI_Alltoall communications. Please let us know (@email{fftw@@fftw.org}) how things work out. @pindex fftw_mpi_test @pindex rfftw_mpi_test Several test programs are included in the @code{mpi} directory. The ones most useful to you are probably the @code{fftw_mpi_test} and @code{rfftw_mpi_test} programs, which are run just like an ordinary MPI program and accept the same parameters as the other FFTW test programs (c.f. @code{tests/README}). For example, @code{mpirun @i{...params...} fftw_mpi_test -r 0} will run non-terminating complex-transform correctness tests of random dimensions. They can also do performance benchmarks. @c ------------------------------------------------------- @node Usage of MPI FFTW for Complex Multi-dimensional Transforms, MPI Data Layout, MPI FFTW Installation, MPI FFTW @subsection Usage of MPI FFTW for Complex Multi-dimensional Transforms Usage of the MPI FFTW routines is similar to that of the uniprocessor FFTW. We assume that the reader already understands the usage of the uniprocessor FFTW routines, described elsewhere in this manual. Some familiarity with MPI is also helpful. A typical program performing a complex two-dimensional MPI transform might look something like: @example #include int main(int argc, char **argv) @{ const int NX = ..., NY = ...; fftwnd_mpi_plan plan; fftw_complex *data; MPI_Init(&argc,&argv); plan = fftw2d_mpi_create_plan(MPI_COMM_WORLD, NX, NY, FFTW_FORWARD, FFTW_ESTIMATE); ...allocate and initialize data... fftwnd_mpi(p, 1, data, NULL, FFTW_NORMAL_ORDER); ... fftwnd_mpi_destroy_plan(plan); MPI_Finalize(); @} @end example The calls to @code{MPI_Init} and @code{MPI_Finalize} are required in all @ffindex MPI_Init @ffindex MPI_Finalize MPI programs; see the @uref{http://www.mcs.anl.gov/mpi/,MPI home page} for more information. Note that all of your processes run the program in parallel, as a group; there is no explicit launching of threads/processes in an MPI program. @cindex plan As in the ordinary FFTW, the first thing we do is to create a plan (of type @code{fftwnd_mpi_plan}), using: @example fftwnd_mpi_plan fftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags); @end example @findex fftw2d_mpi_create_plan @tindex fftwnd_mpi_plan Except for the first argument, the parameters are identical to those of @code{fftw2d_create_plan}. (There are also analogous @code{fftwnd_mpi_create_plan} and @code{fftw3d_mpi_create_plan} functions. Transforms of any rank greater than one are supported.) @findex fftwnd_mpi_create_plan @findex fftw3d_mpi_create_plan The first argument is an MPI @dfn{communicator}, which specifies the group of processes that are to be involved in the transform; the standard constant @code{MPI_COMM_WORLD} indicates all available processes. @fcindex MPI_COMM_WORLD Next, one has to allocate and initialize the data. This is somewhat tricky, because the transform data is distributed across the processes involved in the transform. It is discussed in detail by the next section (@pxref{MPI Data Layout}). The actual computation of the transform is performed by the function @code{fftwnd_mpi}, which differs somewhat from its uniprocessor equivalent and is described by: @example void fftwnd_mpi(fftwnd_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work, fftwnd_mpi_output_order output_order); @end example @findex fftwnd_mpi There are several things to notice here: @itemize @bullet @item @cindex in-place transform First of all, all @code{fftw_mpi} transforms are in-place: the output is in the @code{local_data} parameter, and there is no need to specify @code{FFTW_IN_PLACE} in the plan flags. @item @cindex n_fields @cindex stride The MPI transforms also only support a limited subset of the @code{howmany}/@code{stride}/@code{dist} functionality of the uniprocessor routines: the @code{n_fields} parameter is equivalent to @code{howmany=n_fields}, @code{stride=n_fields}, and @code{dist=1}. (Conceptually, the @code{n_fields} parameter allows you to transform an array of contiguous vectors, each with length @code{n_fields}.) @code{n_fields} is @code{1} if you are only transforming a single, ordinary array. @item The @code{work} parameter is an optional workspace. If it is not @code{NULL}, it should be exactly the same size as the @code{local_data} array. If it is provided, FFTW is able to use the built-in @code{MPI_Alltoall} primitive for (often) greater efficiency at the @ffindex MPI_Alltoall expense of extra storage space. @item Finally, the last parameter specifies whether the output data has the same ordering as the input data (@code{FFTW_NORMAL_ORDER}), or if it is transposed (@code{FFTW_TRANSPOSED_ORDER}). Leaving the data transposed @ctindex FFTW_NORMAL_ORDER @ctindex FFTW_TRANSPOSED_ORDER results in significant performance improvements due to a saved communication step (needed to un-transpose the data). Specifically, the first two dimensions of the array are transposed, as is described in more detail by the next section. @end itemize @cindex normalization The output of @code{fftwnd_mpi} is identical to that of the corresponding uniprocessor transform. In particular, you should recall our conventions for normalization and the sign of the transform exponent. The same plan can be used to compute many transforms of the same size. After you are done with it, you should deallocate it by calling @code{fftwnd_mpi_destroy_plan}. @findex fftwnd_mpi_destroy_plan @cindex blocking @ffindex MPI_Barrier @b{Important:} The FFTW MPI routines must be called in the same order by all processes involved in the transform. You should assume that they all are blocking, as if each contained a call to @code{MPI_Barrier}. Programs using the FFTW MPI routines should be linked with @code{-lfftw_mpi -lfftw -lm} on Unix, in addition to whatever libraries are required for MPI. @cindex linking on Unix @c ------------------------------------------------------- @node MPI Data Layout, Usage of MPI FFTW for Real Multi-dimensional Transforms, Usage of MPI FFTW for Complex Multi-dimensional Transforms, MPI FFTW @subsection MPI Data Layout @cindex distributed memory @cindex distributed array format The transform data used by the MPI FFTW routines is @dfn{distributed}: a distinct portion of it resides with each process involved in the transform. This allows the transform to be parallelized, for example, over a cluster of workstations, each with its own separate memory, so that you can take advantage of the total memory of all the processors you are parallelizing over. In particular, the array is divided according to the rows (first dimension) of the data: each process gets a subset of the rows of the @cindex slab decomposition data. (This is sometimes called a ``slab decomposition.'') One consequence of this is that you can't take advantage of more processors than you have rows (e.g. @code{64x64x64} matrix can at most use 64 processors). This isn't usually much of a limitation, however, as each processor needs a fair amount of data in order for the parallel-computation benefits to outweight the communications costs. Below, the first dimension of the data will be referred to as @samp{@code{x}} and the second dimension as @samp{@code{y}}. FFTW supplies a routine to tell you exactly how much data resides on the current process: @example void fftwnd_mpi_local_sizes(fftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size); @end example @findex fftwnd_mpi_local_sizes Given a plan @code{p}, the other parameters of this routine are set to values describing the required data layout, described below. @code{total_local_size} is the number of @code{fftw_complex} elements that you must allocate for your local data (and workspace, if you choose). (This value should, of course, be multiplied by @code{n_fields} if that parameter to @code{fftwnd_mpi} is not @code{1}.) The data on the current process has @code{local_nx} rows, starting at row @code{local_x_start}. If @code{fftwnd_mpi} is called with @code{FFTW_TRANSPOSED_ORDER} output, then @code{y} will be the first dimension of the output, and the local @code{y} extent will be given by @code{local_ny_after_transpose} and @code{local_y_start_after_transpose}. Otherwise, the output has the same dimensions and layout as the input. For instance, suppose you want to transform three-dimensional data of size @code{nx x ny x nz}. Then, the current process will store a subset of this data, of size @code{local_nx x ny x nz}, where the @code{x} indices correspond to the range @code{local_x_start} to @code{local_x_start+local_nx-1} in the ``real'' (i.e. logical) array. If @code{fftwnd_mpi} is called with @code{FFTW_TRANSPOSED_ORDER} output, @ctindex FFTW_TRANSPOSED_ORDER then the result will be a @code{ny x nx x nz} array, of which a @code{local_ny_after_transpose x nx x nz} subset is stored on the current process (corresponding to @code{y} values starting at @code{local_y_start_after_transpose}). The following is an example of allocating such a three-dimensional array array (@code{local_data}) before the transform and initializing it to some function @code{f(x,y,z)}: @example fftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); local_data = (fftw_complex*) malloc(sizeof(fftw_complex) * total_local_size); for (x = 0; x < local_nx; ++x) for (y = 0; y < ny; ++y) for (z = 0; z < nz; ++z) local_data[(x*ny + y)*nz + z] = f(x + local_x_start, y, z); @end example Some important things to remember: @itemize @bullet @item Although the local data is of dimensions @code{local_nx x ny x nz} in the above example, do @emph{not} allocate the array to be of size @code{local_nx*ny*nz}. Use @code{total_local_size} instead. @item The amount of data on each process will not necessarily be the same; in fact, @code{local_nx} may even be zero for some processes. (For example, suppose you are doing a @code{6x6} transform on four processors. There is no way to effectively use the fourth processor in a slab decomposition, so we leave it empty. Proof left as an exercise for the reader.) @item @cindex row-major All arrays are, of course, in row-major order (@pxref{Multi-dimensional Array Format}). @item If you want to compute the inverse transform of the output of @code{fftwnd_mpi}, the dimensions of the inverse transform are given by the dimensions of the output of the forward transform. For example, if you are using @code{FFTW_TRANSPOSED_ORDER} output in the above example, then the inverse plan should be created with dimensions @code{ny x nx x nz}. @item The data layout only depends upon the dimensions of the array, not on the plan, so you are guaranteed that different plans for the same size (or inverse plans) will use the same (consistent) data layouts. @end itemize @c ------------------------------------------------------- @node Usage of MPI FFTW for Real Multi-dimensional Transforms, Usage of MPI FFTW for Complex One-dimensional Transforms, MPI Data Layout, MPI FFTW @subsection Usage of MPI FFTW for Real Multi-dimensional Transforms MPI transforms specialized for real data are also available, similiar to the uniprocessor @code{rfftwnd} transforms. Just as in the uniprocessor case, the real-data MPI functions gain roughly a factor of two in speed (and save a factor of two in space) at the expense of more complicated data formats in the calling program. Before reading this section, you should definitely understand how to call the uniprocessor @code{rfftwnd} functions and also the complex MPI FFTW functions. The following is an example of a program using @code{rfftwnd_mpi}. It computes the size @code{nx x ny x nz} transform of a real function @code{f(x,y,z)}, multiplies the imaginary part by @code{2} for fun, then computes the inverse transform. (We'll also use @code{FFTW_TRANSPOSED_ORDER} output for the transform, and additionally supply the optional workspace parameter to @code{rfftwnd_mpi}, just to add a little spice.) @example #include int main(int argc, char **argv) @{ const int nx = ..., ny = ..., nz = ...; int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; int x, y, z; rfftwnd_mpi_plan plan, iplan; fftw_real *data, *work; fftw_complex *cdata; MPI_Init(&argc,&argv); /* create the forward and backward plans: */ plan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, nx, ny, nz, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); @findex rfftw3d_mpi_create_plan iplan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, /* dim.'s of REAL data --> */ nx, ny, nz, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); rfftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); @findex rfftwnd_mpi_local_sizes data = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size); /* workspace is the same size as the data: */ work = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size); /* initialize data to f(x,y,z): */ for (x = 0; x < local_nx; ++x) for (y = 0; y < ny; ++y) for (z = 0; z < nz; ++z) data[(x*ny + y) * (2*(nz/2+1)) + z] = f(x + local_x_start, y, z); /* Now, compute the forward transform: */ rfftwnd_mpi(plan, 1, data, work, FFTW_TRANSPOSED_ORDER); @findex rfftwnd_mpi /* the data is now complex, so typecast a pointer: */ cdata = (fftw_complex*) data; /* multiply imaginary part by 2, for fun: (note that the data is transposed) */ for (y = 0; y < local_ny_after_transpose; ++y) for (x = 0; x < nx; ++x) for (z = 0; z < (nz/2+1); ++z) cdata[(y*nx + x) * (nz/2+1) + z].im *= 2.0; /* Finally, compute the inverse transform; the result is transposed back to the original data layout: */ rfftwnd_mpi(iplan, 1, data, work, FFTW_TRANSPOSED_ORDER); free(data); free(work); rfftwnd_mpi_destroy_plan(plan); @findex rfftwnd_mpi_destroy_plan rfftwnd_mpi_destroy_plan(iplan); MPI_Finalize(); @} @end example There's a lot of stuff in this example, but it's all just what you would have guessed, right? We replaced all the @code{fftwnd_mpi*} functions by @code{rfftwnd_mpi*}, but otherwise the parameters were pretty much the same. The data layout distributed among the processes just like for the complex transforms (@pxref{MPI Data Layout}), but in addition the final dimension is padded just like it is for the uniprocessor in-place real transforms (@pxref{Array Dimensions for Real Multi-dimensional Transforms}). @cindex padding In particular, the @code{z} dimension of the real input data is padded to a size @code{2*(nz/2+1)}, and after the transform it contains @code{nz/2+1} complex values. @cindex distributed array format @cindex rfftwnd array format Some other important things to know about the real MPI transforms: @itemize @bullet @item As for the uniprocessor @code{rfftwnd_create_plan}, the dimensions passed for the @code{FFTW_COMPLEX_TO_REAL} plan are those of the @emph{real} data. In particular, even when @code{FFTW_TRANSPOSED_ORDER} @ctindex FFTW_COMPLEX_TO_REAL @ctindex FFTW_TRANSPOSED_ORDER is used as in this case, the dimensions are those of the (untransposed) real output, not the (transposed) complex input. (For the complex MPI transforms, on the other hand, the dimensions are always those of the input array.) @item The output ordering of the transform (@code{FFTW_TRANSPOSED_ORDER} or @code{FFTW_TRANSPOSED_ORDER}) @emph{must} be the same for both forward and backward transforms. (This is not required in the complex case.) @item @code{total_local_size} is the required size in @code{fftw_real} values, not @code{fftw_complex} values as it is for the complex transforms. @item @code{local_ny_after_transpose} and @code{local_y_start_after_transpose} describe the portion of the array after the transform; that is, they are indices in the complex array for an @code{FFTW_REAL_TO_COMPLEX} transform and in the real array for an @code{FFTW_COMPLEX_TO_REAL} transform. @item @code{rfftwnd_mpi} always expects @code{fftw_real*} array arguments, but of course these pointers can refer to either real or complex arrays, depending upon which side of the transform you are on. Just as for in-place uniprocessor real transforms (and also in the example above), this is most easily handled by typecasting to a complex pointer when handling the complex data. @item As with the complex transforms, there are also @code{rfftwnd_create_plan} and @code{rfftw2d_create_plan} functions, and any rank greater than one is supported. @findex rfftwnd_create_plan @findex rfftw2d_create_plan @end itemize Programs using the MPI FFTW real transforms should link with @code{-lrfftw_mpi -lfftw_mpi -lrfftw -lfftw -lm} on Unix. @cindex linking on Unix @c ------------------------------------------------------- @node Usage of MPI FFTW for Complex One-dimensional Transforms, MPI Tips, Usage of MPI FFTW for Real Multi-dimensional Transforms, MPI FFTW @subsection Usage of MPI FFTW for Complex One-dimensional Transforms The MPI FFTW also includes routines for parallel one-dimensional transforms of complex data (only). Although the speedup is generally worse than it is for the multi-dimensional routines,@footnote{The 1D transforms require much more communication. All the communication in our FFT routines takes the form of an all-to-all communication: the multi-dimensional transforms require two all-to-all communications (or one, if you use @code{FFTW_TRANSPOSED_ORDER}), while the one-dimensional transforms require @emph{three} (or two, if you use scrambled input or output).} these distributed-memory one-dimensional transforms are especially useful for performing one-dimensional transforms that don't fit into the memory of a single machine. The usage of these routines is straightforward, and is similar to that of the multi-dimensional MPI transform functions. You first include the header @code{} and then create a plan by calling: @example fftw_mpi_plan fftw_mpi_create_plan(MPI_Comm comm, int n, fftw_direction dir, int flags); @end example @findex fftw_mpi_create_plan @tindex fftw_mpi_plan The last three arguments are the same as for @code{fftw_create_plan} (except that all MPI transforms are automatically @code{FFTW_IN_PLACE}). The first argument specifies the group of processes you are using, and is usually @code{MPI_COMM_WORLD} (all processes). @fcindex MPI_COMM_WORLD A plan can be used for many transforms of the same size, and is destroyed when you are done with it by calling @code{fftw_mpi_destroy_plan(plan)}. @findex fftw_mpi_destroy_plan If you don't care about the ordering of the input or output data of the transform, you can include @code{FFTW_SCRAMBLED_INPUT} and/or @code{FFTW_SCRAMBLED_OUTPUT} in the @code{flags}. @ctindex FFTW_SCRAMBLED_INPUT @ctindex FFTW_SCRAMBLED_OUTPUT @cindex flags These save some communications at the expense of having the input and/or output reordered in an undocumented way. For example, if you are performing an FFT-based convolution, you might use @code{FFTW_SCRAMBLED_OUTPUT} for the forward transform and @code{FFTW_SCRAMBLED_INPUT} for the inverse transform. The transform itself is computed by: @example void fftw_mpi(fftw_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work); @end example @findex fftw_mpi @cindex n_fields @code{n_fields}, as in @code{fftwnd_mpi}, is equivalent to @code{howmany=n_fields}, @code{stride=n_fields}, and @code{dist=1}, and should be @code{1} when you are computing the transform of a single array. @code{local_data} contains the portion of the array local to the current process, described below. @code{work} is either @code{NULL} or an array exactly the same size as @code{local_data}; in the latter case, FFTW can use the @code{MPI_Alltoall} communications primitive which is (usually) faster at the expense of extra storage. Upon return, @code{local_data} contains the portion of the output local to the current process (see below). @ffindex MPI_Alltoall @cindex distributed array format To find out what portion of the array is stored local to the current process, you call the following routine: @example void fftw_mpi_local_sizes(fftw_mpi_plan p, int *local_n, int *local_start, int *local_n_after_transform, int *local_start_after_transform, int *total_local_size); @end example @findex fftw_mpi_local_sizes @code{total_local_size} is the number of @code{fftw_complex} elements you should actually allocate for @code{local_data} (and @code{work}). @code{local_n} and @code{local_start} indicate that the current process stores @code{local_n} elements corresponding to the indices @code{local_start} to @code{local_start+local_n-1} in the ``real'' array. @emph{After the transform, the process may store a different portion of the array.} The portion of the data stored on the process after the transform is given by @code{local_n_after_transform} and @code{local_start_after_transform}. This data is exactly the same as a contiguous segment of the corresponding uniprocessor transform output (i.e. an in-order sequence of sequential frequency bins). Note that, if you compute both a forward and a backward transform of the same size, the local sizes are guaranteed to be consistent. That is, the local size after the forward transform will be the same as the local size before the backward transform, and vice versa. Programs using the FFTW MPI routines should be linked with @code{-lfftw_mpi -lfftw -lm} on Unix, in addition to whatever libraries are required for MPI. @cindex linking on Unix @c ------------------------------------------------------- @node MPI Tips, , Usage of MPI FFTW for Complex One-dimensional Transforms, MPI FFTW @subsection MPI Tips There are several things you should consider in order to get the best performance out of the MPI FFTW routines. @cindex load-balancing First, if possible, the first and second dimensions of your data should be divisible by the number of processes you are using. (If only one can be divisible, then you should choose the first dimension.) This allows the computational load to be spread evenly among the processes, and also reduces the communications complexity and overhead. In the one-dimensional transform case, the size of the transform should ideally be divisible by the @emph{square} of the number of processors. @ctindex FFTW_TRANSPOSED_ORDER Second, you should consider using the @code{FFTW_TRANSPOSED_ORDER} output format if it is not too burdensome. The speed gains from communications savings are usually substantial. Third, you should consider allocating a workspace for @code{(r)fftw(nd)_mpi}, as this can often (but not always) improve performance (at the cost of extra storage). Fourth, you should experiment with the best number of processors to use for your problem. (There comes a point of diminishing returns, when the communications costs outweigh the computational benefits.@footnote{An FFT is particularly hard on communications systems, as it requires an @dfn{all-to-all} communication, which is more or less the worst possible case.}) The @code{fftw_mpi_test} program can output helpful performance benchmarks. @pindex fftw_mpi_test @cindex benchmark It accepts the same parameters as the uniprocessor test programs (c.f. @code{tests/README}) and is run like an ordinary MPI program. For example, @code{mpirun -np 4 fftw_mpi_test -s 128x128x128} will benchmark a @code{128x128x128} transform on four processors, reporting timings and parallel speedups for all variants of @code{fftwnd_mpi} (transposed, with workspace, etcetera). (Note also that there is the @code{rfftw_mpi_test} program for the real transforms.) @pindex rfftw_mpi_test @c ************************************************************ @node Calling FFTW from Fortran, Installation and Customization, Parallel FFTW, Top @chapter Calling FFTW from Fortran @cindex Fortran-callable wrappers The standard FFTW libraries include special wrapper functions that allow Fortran programs to call FFTW subroutines. This chapter describes how those functions may be employed to use FFTW from Fortran. We assume here that the reader is already familiar with the usage of FFTW in C, as described elsewhere in this manual. In general, it is not possible to call C functions directly from Fortran, due to Fortran's inability to pass arguments by value and also because Fortran compilers typically expect identifiers to be mangled @cindex compiler somehow for linking. However, if C functions are written in a special way, they @emph{are} callable from Fortran, and we have employed this technique to create Fortran-callable ``wrapper'' functions around the main FFTW routines. These wrapper functions are included in the FFTW libraries by default, unless a Fortran compiler isn't found on your system or @code{--disable-fortran} is included in the @code{configure} flags. As a result, calling FFTW from Fortran requires little more than appending @samp{@code{_f77}} to the function names and then linking normally with the FFTW libraries. There are a few wrinkles, however, as we shall discuss below. @menu * Wrapper Routines:: * FFTW Constants in Fortran:: * Fortran Examples:: @end menu @c ------------------------------------------------------- @node Wrapper Routines, FFTW Constants in Fortran, Calling FFTW from Fortran, Calling FFTW from Fortran @section Wrapper Routines All of the uniprocessor and multi-threaded transform routines have Fortran-callable wrappers, except for the wisdom import/export functions (since it is not possible to exchange string and file arguments portably with Fortran) and the specific planner routines (@pxref{Discussion on Specific Plans}). The name of the wrapper routine is the same as that of the corresponding C routine, but with @code{fftw/fftwnd/rfftw/rfftwnd} replaced by @code{fftw_f77/fftwnd_f77/rfftw_f77/rfftwnd_f77}. For example, in Fortran, instead of calling @code{fftw_one} you would call @code{fftw_f77_one}.@footnote{Technically, Fortran 77 identifiers are not allowed to have more than 6 characters, nor may they contain underscores. Any compiler that enforces this limitation doesn't deserve to link to FFTW.} @findex fftw_f77_one For the most part, all of the arguments to the functions are the same, with the following exceptions: @itemize @bullet @item @code{plan} variables (what would be of type @code{fftw_plan}, @code{rfftwnd_plan}, etcetera, in C), must be declared as a type that is the same size as a pointer (address) on your machine. (Fortran has no generic pointer type.) The Fortran @code{integer} type is usually the same size as a pointer, but you need to be wary (especially on 64-bit machines). (You could also use @code{integer*4} on a 32-bit machine and @code{integer*8} on a 64-bit machine.) Ugh. (@code{g77} has a special type, @code{integer(kind=7)}, that is defined to be the same size as a pointer.) @item Any function that returns a value (e.g. @code{fftw_create_plan}) is converted into a subroutine. The return value is converted into an additional (first) parameter of the wrapper subroutine. (The reason for this is that some Fortran implementations seem to have trouble with C function return values.) @item @cindex in-place transform When performing one-dimensional @code{FFTW_IN_PLACE} transforms, you don't have the option of passing @code{NULL} for the @code{out} argument (since there is no way to pass @code{NULL} from Fortran). Therefore, when performing such transforms, you @emph{must} allocate and pass a contiguous scratch array of the same size as the transform. Note that for in-place multi-dimensional (@code{(r)fftwnd}) transforms, the @code{out} argument is ignored, so you can pass anything for that parameter. @item @cindex column-major The wrapper routines expect multi-dimensional arrays to be in column-major order, which is the ordinary format of Fortran arrays. They do this transparently and costlessly simply by reversing the order of the dimensions passed to FFTW, but this has one important consequence for multi-dimensional real-complex transforms, discussed below. @end itemize @cindex floating-point precision In general, you should take care to use Fortran data types that correspond to (i.e. are the same size as) the C types used by FFTW. If your C and Fortran compilers are made by the same vendor, the correspondence is usually straightforward (i.e. @code{integer} corresponds to @code{int}, @code{real} corresponds to @code{float}, etcetera). Such simple correspondences are assumed in the examples below. The examples also assume that FFTW was compiled in double precision (the default). @c ------------------------------------------------------- @node FFTW Constants in Fortran, Fortran Examples, Wrapper Routines, Calling FFTW from Fortran @section FFTW Constants in Fortran When creating plans in FFTW, a number of constants are used to specify options, such as @code{FFTW_FORWARD} or @code{FFTW_USE_WISDOM}. The same constants must be used with the wrapper routines, but of course the C header files where the constants are defined can't be incorporated directly into Fortran code. Instead, we have placed Fortran equivalents of the FFTW constant definitions in the file @code{fortran/fftw_f77.i} of the FFTW package. If your Fortran compiler supports a preprocessor, you can use that to incorporate this file into your code whenever you need to call FFTW. Otherwise, you will have to paste the constant definitions in directly. They are: @example integer FFTW_FORWARD,FFTW_BACKWARD parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) integer FFTW_ESTIMATE,FFTW_MEASURE parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM parameter (FFTW_OUT_OF_PLACE=0) parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) integer FFTW_THREADSAFE parameter (FFTW_THREADSAFE=128) @end example @cindex flags In C, you combine different flags (like @code{FFTW_USE_WISDOM} and @code{FFTW_MEASURE}) using the @samp{@code{|}} operator; in Fortran you should just use @samp{@code{+}}. @c ------------------------------------------------------- @node Fortran Examples, , FFTW Constants in Fortran, Calling FFTW from Fortran @section Fortran Examples In C you might have something like the following to transform a one-dimensional complex array: @example fftw_complex in[N], *out[N]; fftw_plan plan; plan = fftw_create_plan(N,FFTW_FORWARD,FFTW_ESTIMATE); fftw_one(plan,in,out); fftw_destroy_plan(plan); @end example In Fortran, you use the following to accomplish the same thing: @example double complex in, out dimension in(N), out(N) integer plan call fftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE) call fftw_f77_one(plan,in,out) call fftw_f77_destroy_plan(plan) @end example @findex fftw_f77_create_plan @findex fftw_f77_one @findex fftw_f77_destroy_plan Notice how all routines are called as Fortran subroutines, and the plan is returned via the first argument to @code{fftw_f77_create_plan}. @emph{Important:} these examples assume that @code{integer} is the same size as a pointer, and may need modification on a 64-bit machine. @xref{Wrapper Routines}, above. To do the same thing, but using 8 threads in parallel (@pxref{Multi-threaded FFTW}), you would simply replace the call to @code{fftw_f77_one} with: @example call fftw_f77_threads_one(8,plan,in,out) @end example @findex fftw_f77_threads_one To transform a three-dimensional array in-place with C, you might do: @example fftw_complex arr[L][M][N]; fftwnd_plan plan; int n[3] = @{L,M,N@}; plan = fftwnd_create_plan(3,n,FFTW_FORWARD, FFTW_ESTIMATE | FFTW_IN_PLACE); fftwnd_one(plan, arr, 0); fftwnd_destroy_plan(plan); @end example In Fortran, you would use this instead: @example double complex arr dimension arr(L,M,N) integer n dimension n(3) integer plan n(1) = L n(2) = M n(3) = N call fftwnd_f77_create_plan(plan,3,n,FFTW_FORWARD, + FFTW_ESTIMATE + FFTW_IN_PLACE) call fftwnd_f77_one(plan, arr, 0) call fftwnd_f77_destroy_plan(plan) @end example @findex fftwnd_f77_create_plan @findex fftwnd_f77_one @findex fftwnd_f77_destroy_plan Instead of calling @code{fftwnd_f77_create_plan(plan,3,n,...)}, we could also have called @code{fftw3d_f77_create_plan(plan,L,M,N,...)}. @findex fftw3d_f77_create_plan Note that we pass the array dimensions in the "natural" order; also note that the last argument to @code{fftwnd_f77} is ignored since the transform is @code{FFTW_IN_PLACE}. To transform a one-dimensional real array in Fortran, you might do: @example double precision in, out dimension in(N), out(N) integer plan call rfftw_f77_create_plan(plan,N,FFTW_REAL_TO_COMPLEX, + FFTW_ESTIMATE) call rfftw_f77_one(plan,in,out) call rfftw_f77_destroy_plan(plan) @end example @findex rfftw_f77_create_plan @findex rfftw_f77_one @findex rfftw_f77_destroy_plan To transform a two-dimensional real array, out of place, you might use the following: @example double precision in double complex out dimension in(M,N), out(M/2 + 1, N) integer plan call rfftw2d_f77_create_plan(plan,M,N,FFTW_REAL_TO_COMPLEX, + FFTW_ESTIMATE) call rfftwnd_f77_one_real_to_complex(plan, in, out) call rfftwnd_f77_destroy_plan(plan) @end example @findex rfftw2d_f77_create_plan @findex rfftwnd_f77_one_real_to_complex @findex rfftwnd_f77_destroy_plan @b{Important:} Notice that it is the @emph{first} dimension of the complex output array that is cut in half in Fortran, rather than the last dimension as in C. This is a consequence of the wrapper routines reversing the order of the array dimensions passed to FFTW so that the Fortran program can use its ordinary column-major order. @cindex column-major @cindex rfftwnd array format @c ************************************************************ @node Installation and Customization, Acknowledgments, Calling FFTW from Fortran, Top @chapter Installation and Customization This chapter describes the installation and customization of FFTW, the latest version of which may be downloaded from @uref{http://www.fftw.org, the FFTW home page}. As distributed, FFTW makes very few assumptions about your system. All you need is an ANSI C compiler (@code{gcc} is fine, although vendor-provided compilers often produce faster code). @cindex compiler However, installation of FFTW is somewhat simpler if you have a Unix or a GNU system, such as Linux. In this chapter, we first describe the installation of FFTW on Unix and non-Unix systems. We then describe how you can customize FFTW to achieve better performance. Specifically, you can I) enable @code{gcc}/x86-specific hacks that improve performance on Pentia and PentiumPro's; II) adapt FFTW to use the high-resolution clock of your machine, if any; III) produce code (@emph{codelets}) to support fast transforms of sizes that are not supported efficiently by the standard FFTW distribution. @cindex installation @menu * Installation on Unix:: * Installation on non-Unix Systems:: * Installing FFTW in both single and double precision:: * gcc and Pentium hacks:: * Customizing the timer:: * Generating your own code:: @end menu @node Installation on Unix, Installation on non-Unix Systems, Installation and Customization, Installation and Customization @section Installation on Unix FFTW comes with a @code{configure} program in the GNU style. Installation can be as simple as: @fpindex configure @example ./configure make make install @end example This will build the uniprocessor complex and real transform libraries along with the test programs. We strongly recommend that you use GNU @code{make} if it is available; on some systems it is called @code{gmake}. The ``@code{make install}'' command installs the fftw and rfftw libraries in standard places, and typically requires root privileges (unless you specify a different install directory with the @code{--prefix} flag to @code{configure}). You can also type ``@code{make check}'' to put the FFTW test programs through their paces. If you have problems during configuration or compilation, you may want to run ``@code{make distclean}'' before trying again; this ensures that you don't have any stale files left over from previous compilation attempts. The @code{configure} script knows good @code{CFLAGS} (C compiler flags) @cindex compiler flags for a few systems. If your system is not known, the @code{configure} script will print out a warning. @footnote{Each version of @code{cc} seems to have its own magic incantation to get the fastest code most of the time---you'd think that people would have agreed upon some convention, e.g. "@code{-Omax}", by now.} In this case, you can compile FFTW with the command @example make CFLAGS="" @end example If you do find an optimal set of @code{CFLAGS} for your system, please let us know what they are (along with the output of @code{config.guess}) so that we can include them in future releases. The @code{configure} program supports all the standard flags defined by the GNU Coding Standards; see the @code{INSTALL} file in FFTW or @uref{http://www.gnu.org/prep/standards_toc.html, the GNU web page}. Note especially @code{--help} to list all flags and @code{--enable-shared} to create shared, rather than static, libraries. @code{configure} also accepts a few FFTW-specific flags, particularly: @itemize @bullet @item @cindex floating-point precision @code{--enable-float} Produces a single-precision version of FFTW (@code{float}) instead of the default double-precision (@code{double}). @xref{Installing FFTW in both single and double precision}. @item @code{--enable-type-prefix} Adds a @samp{d} or @samp{s} prefix to all installed libraries and header files to indicate the floating-point precision. @xref{Installing FFTW in both single and double precision}. (@code{--enable-type-prefix=} lets you add an arbitrary prefix.) By default, no prefix is used. @item @cindex threads @code{--enable-threads} Enables compilation and installation of the FFTW threads library (@pxref{Multi-threaded FFTW}), which provides a simple interface to parallel transforms for SMP systems. (By default, the threads routines are not compiled.) @item @code{--with-openmp}, @code{--with-sgimp} In conjunction with @code{--enable-threads}, causes the multi-threaded FFTW library to use OpenMP or SGI MP compiler directives in order to induce parallelism, rather than spawning its own threads directly. (Useful especially for programs already employing such directives, in order to minimize conflicts between different parallelization mechanisms.) @item @cindex MPI @code{--enable-mpi} Enables compilation and installation of the FFTW MPI library (@pxref{MPI FFTW}), which provides parallel transforms for distributed-memory systems with MPI. (By default, the MPI routines are not compiled.) @item @cindex Fortran-callable wrappers @code{--disable-fortran} Disables inclusion of Fortran-callable wrapper routines (@pxref{Calling FFTW from Fortran}) in the standard FFTW libraries. These wrapper routines increase the library size by only a negligible amount, so they are included by default as long as the @code{configure} script finds a Fortran compiler on your system. @item @code{--with-gcc} Enables the use of @code{gcc}. By default, FFTW uses the vendor-supplied @code{cc} compiler if present. Unfortunately, @code{gcc} produces slower code than @code{cc} on many systems. @item @code{--enable-i386-hacks} @xref{gcc and Pentium hacks}, below. @item @code{--enable-pentium-timer} @xref{gcc and Pentium hacks}, below. @end itemize To force @code{configure} to use a particular C compiler (instead of the @cindex compiler default, usually @code{cc}), set the environment variable @code{CC} to the name of the desired compiler before running @code{configure}; you may also need to set the flags via the variable @code{CFLAGS}. @cindex compiler flags @node Installation on non-Unix Systems, Installing FFTW in both single and double precision, Installation on Unix, Installation and Customization @section Installation on non-Unix Systems It is quite straightforward to install FFTW even on non-Unix systems lacking the niceties of the @code{configure} script. The FFTW Home Page may include some FFTW packages preconfigured for particular systems/compilers, and also contains installation notes sent in by @cindex compiler users. All you really need to do, though, is to compile all of the @code{.c} files in the appropriate directories of the FFTW package. (You needn't worry about the many extraneous files lying around.) For the complex transforms, compile all of the @code{.c} files in the @code{fftw} directory and link them into a library. Similarly, for the real transforms, compile all of the @code{.c} files in the @code{rfftw} directory into a library. Note that these sources @code{#include} various files in the @code{fftw} and @code{rfftw} directories, so you may need to set up the @code{#include} paths for your compiler appropriately. Be sure to enable the highest-possible level of optimization in your compiler. @cindex floating-point precision By default, FFTW is compiled for double-precision transforms. To work in single precision rather than double precision, @code{#define} the symbol @code{FFTW_ENABLE_FLOAT} in @code{fftw.h} (in the @code{fftw} directory) and (re)compile FFTW. These libraries should be linked with any program that uses the corresponding transforms. The required header files, @code{fftw.h} and @code{rfftw.h}, are located in the @code{fftw} and @code{rfftw} directories respectively; you may want to put them with the libraries, or wherever header files normally go on your system. FFTW includes test programs, @code{fftw_test} and @code{rfftw_test}, in @pindex fftw_test @pindex rfftw_test the @code{tests} directory. These are compiled and linked like any program using FFTW, except that they use additional header files located in the @code{fftw} and @code{rfftw} directories, so you will need to set your compiler @code{#include} paths appropriately. @code{fftw_test} is compiled from @code{fftw_test.c} and @code{test_main.c}, while @code{rfftw_test} is compiled from @code{rfftw_test.c} and @code{test_main.c}. When you run these programs, you will be prompted interactively for various possible tests to perform; see also @code{tests/README} for more information. @node Installing FFTW in both single and double precision, gcc and Pentium hacks, Installation on non-Unix Systems, Installation and Customization @section Installing FFTW in both single and double precision @cindex floating-point precision It is often useful to install both single- and double-precision versions of the FFTW libraries on the same machine, and we provide a convenient mechanism for achieving this on Unix systems. @fpindex configure When the @code{--enable-type-prefix} option of configure is used, the FFTW libraries and header files are installed with a prefix of @samp{d} or @samp{s}, depending upon whether you compiled in double or single precision. Then, instead of linking your program with @code{-lrfftw -lfftw}, for example, you would link with @code{-ldrfftw -ldfftw} to use the double-precision version or with @code{-lsrfftw -lsfftw} to use the single-precision version. Also, you would @code{#include} @code{} or @code{} instead of @code{}, and so on. @emph{The names of FFTW functions, data types, and constants remain unchanged!} You still call, for instance, @code{fftw_one} and not @code{dfftw_one}. Only the names of header files and libraries are modified. One consequence of this is that @emph{you @b{cannot} use both the single- and double-precision FFTW libraries in the same program, simultaneously,} as the function names would conflict. So, to install both the single- and double-precision libraries on the same machine, you would do: @example ./configure --enable-type-prefix @i{[ other options ]} make make install make clean ./configure --enable-float --enable-type-prefix @i{[ other options ]} make make install @end example @node gcc and Pentium hacks, Customizing the timer, Installing FFTW in both single and double precision, Installation and Customization @section @code{gcc} and Pentium hacks @cindex Pentium hack The @code{configure} option @code{--enable-i386-hacks} enables specific optimizations for the Pentium and later x86 CPUs under gcc, which can significantly improve performance of double-precision transforms. Specifically, we have tested these hacks on Linux with @code{gcc} 2.[789] and versions of @code{egcs} since 1.0.3. These optimizations affect only the performance and not the correctness of FFTW (i.e. it is always safe to try them out). These hacks provide a workaround to the incorrect alignment of local @code{double} variables in @code{gcc}. The compiler aligns these @cindex compiler variables to multiples of 4 bytes, but execution is much faster (on Pentium and PentiumPro) if @code{double}s are aligned to a multiple of 8 bytes. By carefully counting the number of variables allocated by the compiler in performance-critical regions of the code, we have been able to introduce dummy allocations (using @code{alloca}) that align the stack properly. The hack depends crucially on the compiler flags that are used. For example, it won't work without @code{-fomit-frame-pointer}. In principle, these hacks are no longer required under @code{gcc} versions 2.95 and later, which automatically align the stack correctly (see @code{-mpreferred-stack-boundary} in the @code{gcc} manual). However, we have encountered a @uref{http://egcs.cygnus.com/ml/gcc-bugs/1999-11/msg00259.html,bug} in the stack alignment of versions 2.95.[012] that causes FFTW's stack to be misaligned under some circumstances. The @code{configure} script automatically detects this bug and disables @code{gcc}'s stack alignment in favor of our own hacks when @code{--enable-i386-hacks} is used. The @code{fftw_test} program outputs speed measurements that you can use to see if these hacks are beneficial. @pindex fftw_test @cindex benchmark The @code{configure} option @code{--enable-pentium-timer} enables the use of the Pentium and PentiumPro cycle counter for timing purposes. In order to get correct results, you must define @code{FFTW_CYCLES_PER_SEC} in @code{fftw/config.h} to be the clock speed of your processor; the resulting FFTW library will be nonportable. The use of this option is deprecated. On serious operating systems (such as Linux), FFTW uses @code{gettimeofday()}, which has enough resolution and is portable. (Note that Win32 has its own high-resolution timing routines as well. FFTW contains unsupported code to use these routines.) @node Customizing the timer, Generating your own code, gcc and Pentium hacks, Installation and Customization @section Customizing the timer @cindex timer, customization of FFTW needs a reasonably-precise clock in order to find the optimal way to compute a transform. On Unix systems, @code{configure} looks for @code{gettimeofday} and other system-specific timers. If it does not find any high resolution clock, it defaults to using the @code{clock()} function, which is very portable, but forces FFTW to run for a long time in order to get reliable measurements. @ffindex gettimeofday @ffindex clock If your machine supports a high-resolution clock not recognized by FFTW, it is therefore advisable to use it. You must edit @code{fftw/fftw-int.h}. There are a few macros you must redefine. The code is documented and should be self-explanatory. (By the way, @code{fftw-int} stands for @code{fftw-internal}, but for some inexplicable reason people are still using primitive systems with 8.3 filenames.) Even if you don't install high-resolution timing code, we still recommend that you look at the @code{FFTW_TIME_MIN} constant in @ctindex FFTW_TIME_MIN @code{fftw/fftw-int.h}. This constant holds the minimum time interval (in seconds) required to get accurate timing measurements, and should be (at least) several hundred times the resolution of your clock. The default constants are on the conservative side, and may cause FFTW to take longer than necessary when you create a plan. Set @code{FFTW_TIME_MIN} to whatever is appropriate on your system (be sure to set the @emph{right} @code{FFTW_TIME_MIN}@dots{}there are several definitions in @code{fftw-int.h}, corresponding to different platforms and timers). As an aid in checking the resolution of your clock, you can use the @code{tests/fftw_test} program with the @code{-t} option (c.f. @code{tests/README}). Remember, the mere fact that your clock reports times in, say, picoseconds, does not mean that it is actually @emph{accurate} to that resolution. @node Generating your own code, , Customizing the timer, Installation and Customization @section Generating your own code @cindex Caml @cindex ML @cindex code generator If you know that you will only use transforms of a certain size (say, powers of @math{2}) and want to reduce the size of the library, you can reconfigure FFTW to support only those sizes you are interested in. You may even generate code to enable efficient transforms of a size not supported by the default distribution. The default distribution supports transforms of any size, but not all sizes are equally fast. The default installation of FFTW is best at handling sizes of the form @ifinfo @math{2^a 3^b 5^c 7^d 11^e 13^f}, @end ifinfo @tex $2^a 3^b 5^c 7^d 11^e 13^f$, @end tex @ifhtml 2a 3b 5c 7d 11e 13f, @end ifhtml where @math{e+f} is either @math{0} or @math{1}, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine. However, if you have an application that requires fast transforms of size, say, @code{17}, there is a way to generate specialized code to handle that. The directory @code{gensrc} contains all the programs and scripts that were used to generate FFTW. In particular, the program @code{gensrc/genfft.ml} was used to generate the code that FFTW uses to compute the transforms. We do not expect casual users to use it. @code{genfft} is a rather sophisticated program that generates directed acyclic graphs of FFT algorithms and performs algebraic simplifications on them. @code{genfft} is written in Objective Caml, a dialect of ML. Objective Caml is described at @uref{http://pauillac.inria.fr/ocaml/} and can be downloaded from from @uref{ftp://ftp.inria.fr/lang/caml-light}. @pindex genfft @cindex Caml If you have Objective Caml installed, you can type @code{sh bootstrap.sh} in the top-level directory to re-generate the files. If you change the @code{gensrc/config} file, you can optimize FFTW for sizes that are not currently supported efficiently (say, 17 or 19). We do not provide more details about the code-generation process, since we do not expect that users will need to generate their own code. However, feel free to contact us at @email{fftw@@fftw.org} if you are interested in the subject. @cindex monadic programming You might find it interesting to learn Caml and/or some modern programming techniques that we used in the generator (including monadic programming), especially if you heard the rumor that Java and object-oriented programming are the latest advancement in the field. The internal operation of the codelet generator is described in the paper, ``A Fast Fourier Transform Compiler,'' by M. Frigo, which is available from the @uref{http://www.fftw.org,FFTW home page} and will appear in the @cite{Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)}. @c ************************************************************ @node Acknowledgments, License and Copyright, Installation and Customization, Top @chapter Acknowledgments Matteo Frigo was supported in part by the Defense Advanced Research Projects Agency (DARPA) under Grants N00014-94-1-0985 and F30602-97-1-0270, and by a Digital Equipment Corporation Fellowship. Steven G. Johnson was supported in part by a DoD NDSEG Fellowship, an MIT Karl Taylor Compton Fellowship, and by the Materials Research Science and Engineering Center program of the National Science Foundation under award DMR-9400334. Both authors were also supported in part by their respective girlfriends, by the letters ``Q'' and ``R'', and by the number 12. @cindex girlfriends We are grateful to SUN Microsystems Inc.@ for its donation of a cluster of 9 8-processor Ultra HPC 5000 SMPs (24 Gflops peak). These machines served as the primary platform for the development of earlier versions of FFTW. We thank Intel Corporation for donating a four-processor Pentium Pro machine. We thank the Linux community for giving us a decent OS to run on that machine. The @code{genfft} program was written using Objective Caml, a dialect of ML. Objective Caml is a small and elegant language developed by Xavier Leroy. The implementation is available from @code{ftp.inria.fr} in the directory @code{lang/caml-light}. We used versions 1.07 and 2.00 of the software. In previous releases of FFTW, @code{genfft} was written in Caml Light, by the same authors. An even earlier implementation of @code{genfft} was written in Scheme, but Caml is definitely better for this kind of application. @pindex genfft @cindex Caml @cindex LISP FFTW uses many tools from the GNU project, including @code{automake}, @code{texinfo}, and @code{libtool}. Prof.@ Charles E.@ Leiserson of MIT provided continuous support and encouragement. This program would not exist without him. Charles also proposed the name ``codelets'' for the basic FFT blocks. Prof.@ John D.@ Joannopoulos of MIT demonstrated continuing tolerance of Steven's ``extra-curricular'' computer-science activities. Steven's chances at a physics degree would not exist without him. Andrew Sterian contributed the Windows timing code. Didier Miras reported a bug in the test procedure used in FFTW 1.2. We now use a completely different test algorithm by Funda Ergun that does not require a separate FFT program to compare against. Wolfgang Reimer contributed the Pentium cycle counter and a few fixes that help portability. Ming-Chang Liu uncovered a well-hidden bug in the complex transforms of FFTW 2.0 and supplied a patch to correct it. The FFTW FAQ was written in @code{bfnn} (Bizarre Format With No Name) and formatted using the tools developed by Ian Jackson for the Linux FAQ. @emph{We are especially thankful to all of our users for their continuing support, feedback, and interest during our development of FFTW.} @c ************************************************************ @node License and Copyright, Concept Index, Acknowledgments, Top @chapter License and Copyright FFTW is copyright @copyright{} 1997--1999 Massachusetts Institute of Technology. FFTW is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. You can also find the @uref{http://www.gnu.org/copyleft/gpl.html, GPL on the GNU web site}. In addition, we kindly ask you to acknowledge FFTW and its authors in any program or publication in which you use FFTW. (You are not @emph{required} to do so; it is up to your common sense to decide whether you want to comply with this request or not.) Non-free versions of FFTW are available under terms different than the General Public License. (e.g. they do not require you to accompany any object code using FFTW with the corresponding source code.) For these alternate terms you must purchase a license from MIT's Technology Licensing Office. Users interested in such a license should contact us (@email{fftw@@fftw.org}) for more information. @node Concept Index, Library Index, License and Copyright, Top @chapter Concept Index @printindex cp @node Library Index, , Concept Index, Top @chapter Library Index @printindex fn @c ************************************************************ @contents @bye @c LocalWords: texinfo fftw texi Exp setfilename settitle setchapternewpage @c LocalWords: syncodeindex fn cp vr pg tp ifinfo titlepage sp Matteo Frigo @c LocalWords: vskip pt filll dir detailmenu halfcomplex DFT fftwnd rfftw gcc @c LocalWords: rfftwnd Pentium PentiumPro NJ FFT cindex ESSL FFTW's emph uref @c LocalWords: http lcs mit edu benchfft benchFFT pindex dfn iftex tex cdot @c LocalWords: ifhtml nbsp TR Sep Proc ICASSP Tukey Rader's ref xref int FFTs @c LocalWords: findex tindex vindex im strided pxref DC lfftw lm samp const @c LocalWords: nx ny nz ldots rk ik hc freq lrfftw datatypes cdots pointwise @c LocalWords: pinv ij rote increaseth Ecclesiastes nerd stdout fopen printf @c LocalWords: fclose dimension's malloc sizeof comp lang www eskimo com scs @c LocalWords: faq html README Cilk SMP cilk POSIX Solaris BeOS MacOS mpi mcs @c LocalWords: anl gov mutex THREADSAFE struct leq conj lt hbox istride lg rt @c LocalWords: ostride subsubheading howmany idist odist exp IMG SRC gif IFFT @c LocalWords: frftw dist datatype datatype's nc noindent callback putc getc @c LocalWords: EOF Pentia PentiumPro's codelets CFLAGS cc Omax config org toc @c LocalWords: pentium preconfigured egcs alloca fomit SEC gettimeofday MIN @c LocalWords: picoseconds Caml gensrc genfft pauillac inria fr ocaml ftp sh @c LocalWords: caml DoD NDSEG DMR HPC SMPs Gflops automake libtool Leiserson @c LocalWords: Sterian Didier Miras Funda Ergun Reimer bfnn copyleft gpl @c LocalWords: printindex LocalWords fftw-2.1.5/doc/version.texi0000644000175400001440000000013707637527601011311 @set UPDATED 16 March 2003 @set UPDATED-MONTH March 2003 @set EDITION 2.1.5 @set VERSION 2.1.5 fftw-2.1.5/doc/Makefile.am0000644000175400001440000000134507635206026010760 info_TEXINFOS = fftw.texi fftw_TEXINFOS = fftw.texi version.texi HTML_FILES = equation-1.gif fftw_1.html fftw_4.html fftw_7.html \ fftw_foot.html equation-2.gif fftw_2.html fftw_5.html fftw_8.html \ fftw_toc.html equation-3.gif fftw_3.html fftw_6.html fftw_9.html \ fftw_10.html equation-4.gif EXTRA_DIST = fftw.ps $(HTML_FILES) texi2html rfftwnd.fig rfftwnd.gif PERL = @PERL@ DVIPS = dvips -Z html: $(fftw_TEXINFOS) rfftwnd.gif $(PERL) texi2html -split_chapter -no_toc_href fftw.texi $(HTML_FILES): html # fig2dev gif output sucks. # rfftwnd.gif: rfftwnd.fig # fig2dev -L gif rfftwnd.fig rfftwnd.gif fftw.ps: rfftwnd.eps rfftwnd.eps: rfftwnd.fig fig2dev -L ps -m .7 rfftwnd.fig rfftwnd.eps clean-local: rm -f *.html fftw-2.1.5/doc/Makefile.in0000644000175400001440000003151007637527505011000 # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ info_TEXINFOS = fftw.texi fftw_TEXINFOS = fftw.texi version.texi HTML_FILES = equation-1.gif fftw_1.html fftw_4.html fftw_7.html \ fftw_foot.html equation-2.gif fftw_2.html fftw_5.html fftw_8.html \ fftw_toc.html equation-3.gif fftw_3.html fftw_6.html fftw_9.html \ fftw_10.html equation-4.gif EXTRA_DIST = fftw.ps $(HTML_FILES) texi2html rfftwnd.fig rfftwnd.gif DVIPS = dvips -Z subdir = doc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = DIST_SOURCES = am__TEXINFO_TEX_DIR = $(srcdir) INFO_DEPS = fftw.info DVIS = fftw.dvi PDFS = fftw.pdf PSS = fftw.ps TEXINFOS = fftw.texi DIST_COMMON = $(fftw_TEXINFOS) Makefile.am Makefile.in mdate-sh \ stamp-vti texinfo.tex version.texi all: all-am .SUFFIXES: .SUFFIXES: .dvi .info .pdf .ps .texi $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool .texi.info: @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< fftw.info: fftw.texi version.texi $(fftw_TEXINFOS) fftw.dvi: fftw.texi version.texi $(fftw_TEXINFOS) fftw.pdf: fftw.texi version.texi $(fftw_TEXINFOS) version.texi: stamp-vti stamp-vti: fftw.texi $(top_srcdir)/configure @(dir=.; test -f ./fftw.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/fftw.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp version.texi \ || (echo "Updating version.texi"; \ cp vti.tmp version.texi) -@rm -f vti.tmp @cp version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f stamp-vti version.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch .dvi.ps: $(DVIPS) -o $@ $< uninstall-info-am: $(PRE_UNINSTALL) @if (install-info --version && \ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if cd $(DESTDIR)$(infodir); then \ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ for file in $$d/$$base*; do \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f $(distdir)/$$relfile || \ cp -p $$file $(distdir)/$$relfile; \ done; \ done mostlyclean-aminfo: -rm -f fftw.aux fftw.cp fftw.cps fftw.ct fftw.fc fftw.ff fftw.fn fftw.fns \ fftw.fp fftw.ky fftw.kys fftw.log fftw.pg fftw.tmp fftw.toc \ fftw.tp fftw.vr fftw.dvi fftw.pdf fftw.ps maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: $(mkinstalldirs) $(DESTDIR)$(infodir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: $(DVIS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-exec-am: install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) @list='$(INFO_DEPS)'; \ for file in $$list; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if (install-info --version && \ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ done; \ else : ; fi install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local dist-info distclean distclean-generic \ distclean-libtool distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \ mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am html: $(fftw_TEXINFOS) rfftwnd.gif $(PERL) texi2html -split_chapter -no_toc_href fftw.texi $(HTML_FILES): html # fig2dev gif output sucks. # rfftwnd.gif: rfftwnd.fig # fig2dev -L gif rfftwnd.fig rfftwnd.gif fftw.ps: rfftwnd.eps rfftwnd.eps: rfftwnd.fig fig2dev -L ps -m .7 rfftwnd.fig rfftwnd.eps clean-local: rm -f *.html # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: fftw-2.1.5/doc/mdate-sh0000755000175400001440000000516707363706726010374 #!/bin/sh # Get modification time of a file or directory and pretty-print it. # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # Get the extended ls output of the file or directory. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. if ls -L /dev/null 1>/dev/null 2>&1; then set - x`ls -L -l -d $1` else set - x`ls -l -d $1` fi # The month is at least the fourth argument # (3 shifts here, the next inside the loop). shift shift shift # Find the month. Next argument is day, followed by the year or time. month= until test $month do shift case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done day=$2 # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year fftw-2.1.5/doc/stamp-vti0000644000175400001440000000013707637527601010600 @set UPDATED 16 March 2003 @set UPDATED-MONTH March 2003 @set EDITION 2.1.5 @set VERSION 2.1.5 fftw-2.1.5/doc/texinfo.tex0000644000175400001440000062502707363706725011144 % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2001-05-24.08} % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, % 2000, 01 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation; either version 2, or (at % your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % In other words, you are welcome to use, share and improve this program. % You are forbidden to forbid anyone else to use, share and improve % what you give them. Help stamp out software-hoarding! % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % ftp://ftp.gnu.org/gnu/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) % ftp://texinfo.org/tex/texinfo.tex % ftp://us.ctan.org/macros/texinfo/texinfo.tex % (and all CTAN mirrors, finger ctan@us.ctan.org for a list). % /home/gd/gnu/doc/texinfo.tex on the GNU machines. % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. % Texinfo has a small home page at http://texinfo.org/. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. % The extra runs of TeX get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages. You can get % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t % We never want plain's outer \+ definition in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax \message{Basics,} \chardef\other=12 % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi % Ignore a token. % \def\gobble#1{} \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. \newdimen \bindingoffset \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \ifx\eTeXversion\undefined \def\loggingall{\tracingcommands2 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% \else \def\loggingall{\tracingcommands3 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \tracingscantokens1 \tracingassigns1 \tracingifs1 \tracinggroups1 \tracingnesting2 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% \fi % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \turnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg#1{% \let\next = #1% \begingroup \obeylines \futurelet\temp\parseargx } % If the next token is an obeyed space (from an @example environment or % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% % \obeyedspace is defined far below, after the definition of \sepspaces. \ifx\obeyedspace\temp \expandafter\parseargdiscardspace \else \expandafter\parseargline \fi } % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. % % First remove any @c comment, then any @comment. % Result of each macro is put in \toks0. \argremovec #1\c\relax % \expandafter\argremovecomment \the\toks0 \comment\relax % % % Call the caller's macro, saved as \next in \parsearg. \expandafter\next\expandafter{\the\toks0}% }% } % Since all \c{,omment} does is throw away the argument, we can let TeX % do that for us. The \relax here is matched by the \relax in the call % in \parseargline; it could be more or less anything, its purpose is % just to delimit the argument to the \c. \def\argremovec#1\c#2\relax{\toks0 = {#1}} \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} % \argremovec{,omment} might leave us with trailing spaces, though; e.g., % @end itemize @c foo % will have two active spaces as part of the argument with the % `itemize'. Here we remove all active spaces from #1, and assign the % result to \toks0. % % This loses if there are any *other* active characters besides spaces % in the argument -- _ ^ +, for example -- since they get expanded. % Fortunately, Texinfo does not define any such commands. (If it ever % does, the catcode of the characters in questionwill have to be changed % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. % \def\removeactivespaces#1{% \begingroup \ignoreactivespaces \edef\temp{#1}% \global\toks0 = \expandafter{\temp}% \endgroup } % Change the active space to expand to nothing. % \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} \endgroup \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} %% These are used to keep @begin/@end levels from running away %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% \ifENV\errmessage{Still within an environment; press RETURN to continue} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. \newhelp\EMsimple{Press RETURN to continue.} \outer\def\begin{\parsearg\beginxxx} \def\beginxxx #1{% \expandafter\ifx\csname #1\endcsname\relax {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else \csname #1\endcsname\fi} % @end foo executes the definition of \Efoo. % \def\end{\parsearg\endxxx} \def\endxxx #1{% \removeactivespaces{#1}% \edef\endthing{\the\toks0}% % \expandafter\ifx\csname E\endthing\endcsname\relax \expandafter\ifx\csname \endthing\endcsname\relax % There's no \foo, i.e., no ``environment'' foo. \errhelp = \EMsimple \errmessage{Undefined command `@end \endthing'}% \else \unmatchedenderror\endthing \fi \else % Everything's ok; the right environment has been started. \csname E\endthing\endcsname \fi } % There is an environment #1, but it hasn't been started. Give an error. % \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% } % Define the control sequence \E#1 to give an unmatched @end error. % \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } % Single-spacing is done by various environments (specifically, in % \nonfillstart and \quotations). \newskip\singlespaceskip \singlespaceskip = 12.5pt \def\singlespace{% % Why was this kern here? It messes up equalizing space above and below % environments. --karl, 6may93 %{\advance \baselineskip by -\singlespaceskip %\kern \baselineskip}% \setleading \singlespaceskip } %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce actual \{ & \} command in an index. \catcode`\{ = 12 \catcode`\} = 12 \catcode`\[ = 1 \catcode`\] = 2 \catcode`\@ = 0 \catcode`\\ = 12 @gdef@lbracecmd[\{]% @gdef@rbracecmd[\}]% @endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @! is an end-of-sentence bang. \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi % % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of % the TeXbook.) Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. \endgroup % End the \group. }% % \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group % and the first line afterwards is too small. But we can't put the % strut in \Egroup, since there it would be on a line by itself. % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % % Since we have a strut on every line, we don't need any of TeX's % normal interline spacing. \offinterlineskip % % OK, but now we have to do something about blank % lines in the input in @example-like environments, which normally % just turn into \lisppar, which will insert no space now that we've % turned off the interline space. Simplest is to make them be an % empty paragraph. \ifx\par\lisppar \edef\par{\leavevmode \par}% % % Reset ^^M's definition to new definition of \par. \obeylines \fi % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \def\need{\parsearg\needx} % Old definition--didn't work. %\def\needx #1{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \def\needx#1{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break \let\br = \par % @dots{} output an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \leavevmode \hbox to 2em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% \spacefactor=3000 } % @page forces the start of a new page % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \def\exdent{\parsearg\exdentyyy} \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} % This defn is used inside nofill environments such as @example. \def\nofillexdent{\parsearg\nofillexdentyyy} \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup \catcode`\\=12 \catcode`~=12 \catcode`^=12 \catcode`_=12 \catcode`|=12 \catcode`<=12 \catcode`>=12 \catcode`+=12 \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% \input\thisfile \endgroup} \def\thisfile{} % @center line outputs that line, centered \def\center{\parsearg\centerzzz} \def\centerzzz #1{{\advance\hsize by -\leftskip \advance\hsize by -\rightskip \centerline{#1}}} % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % We cannot implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \def\paragraphindent{\parsearg\doparagraphindent} \def\doparagraphindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \def\exampleindent{\parsearg\doexampleindent} \def\doexampleindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math means output in math mode. % We don't use $'s directly in the definition of \math because control % sequences like \math are expanded when the toc file is written. Then, % we read the toc file back, the $'s will be normal characters (as they % should be, according to the definition of Texinfo). So we must use a % control sequence to switch into and out of math mode. % % This isn't quite enough for @math to work properly in indices, but it % seems unlikely it will ever be needed there. % \let\implicitmath = $ \def\math#1{\implicitmath #1\implicitmath} % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \iflinks \readauxfile \fi % \openindices needs to do some work in any case. \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. % Just to be on the safe side, close the input stream before the \input. \openin 1 texinfo.cnf \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi \closein1 \temp % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest \ifx\pdfoutput\undefined \pdffalse \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \let\pdfmakeoutlines = \relax \else \pdftrue \pdfoutput = 1 \input pdfcolor \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% \ifnum\pdftexversion < 14 \pdfimage \else \pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 #1.pdf% \else {#1.pdf}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{\pdfdest name{#1} xyz} \def\pdfmkpgn#1{#1@} \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} \def\pdfmakeoutlines{{% \openin 1 \jobname.toc \ifeof 1\else\bgroup \closein 1 \indexnofonts \def\tt{} \let\_ = \normalunderscore % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} \def\unnumbchapentry ##1##2{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} \def\unnumbsubsubsecentry ##1##2{} \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} \def\unnumbchapentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} \def\unnumbsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} \def\unnumbsubsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} \def\unnumbsubsubsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \input \jobname.toc \egroup\fi }} \def\makelinks #1,{% \def\params{#1}\def\E{END}% \ifx\params\E \let\nextmakelinks=\relax \else \let\nextmakelinks=\makelinks \ifnum\lnkcount>0,\fi \picknum{#1}% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{\the\pgn}}% \linkcolor #1% \advance\lnkcount by 1% \endlink \fi \nextmakelinks } \def\picknum#1{\expandafter\pn#1} \def\pn#1{% \def\p{#1}% \ifx\p\lbrace \let\nextpn=\ppn \else \let\nextpn=\ppnn \def\first{#1} \fi \nextpn } \def\ppn#1{\pgn=#1\gobble} \def\ppnn{\pgn=\first} \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \let\value=\expandablevalue \leavevmode\Red \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% % #1 \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS| \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} \linkcolor #1\endlink} \def\mkpgn#1{#1@} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % \ifx\pdfoutput \message{fonts,} % Font-change commands. % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this one. \def\ttsl{\tenttsl} % Use Computer Modern fonts at \magstephalf (11pt). \newcount\mainmagstep \mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} \ifx\bigger\relax \let\mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. \setfont\defbf\bxshape{10}{\magstep1} %was 1314 \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices, footnotes, small examples (9pt). \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. % \setfont\ssecsl\slshape{10}{\magstep1} % \setfont\ssectt\ttshape{10}{\magstep1} % \setfont\ssecsf\sfshape{10}{\magstep1} %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} %\let\ssecbf=\ssecrm % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we % don't bother to reset \scriptfont and \scriptscriptfont (which would % also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf \textfont\ttfam = \tentt \textfont\sffam = \tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work % in math mode, where it is the current \fam that is relevant in most % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam % \tenbf}, for example. By redefining \tenbf, we obviate the need to % redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \resetmathfonts \setleading{11pt}} % Set up the default fonts, so we can use them for creating boxes. % \textfonts % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic \let\cite=\smartslanted \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in \code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } % % If we end up with any active - characters when handling the index, % just treat them as a normal -. \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \def\kbdinputstyle{\parsearg\kbdinputstylexxx} \def\kbdinputstylexxx#1{% \def\arg{#1}% \ifx\arg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\arg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is kbdinputdistinct. (Too much of a hassle to call the macro, % the catcodes are wrong for parsearg to work.) \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @url, @env, @command quotes seem unnecessary, so use \code. \let\url=\code \let\env=\code \let\command=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym downcases the argument and prints in smallcaps. \def\acronym#1{{\smallcaps \lowercase{#1}}} % @pounds{} is a sterling sign. \def\pounds{{\it\$}} \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Now you can put text using @subtitle. \def\subtitle{\parsearg\subtitlezzz}% \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% % % @author should come last, but may come many times. \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \oldpage \let\page = \oldpage \hbox{}}% % \def\page{\oldpage \hbox{}} } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi % \ifpdf \pdfmakepagedesttrue \fi % \HEADINGSon } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\oddheading{\parsearg\oddheadingxxx} \def\everyheading{\parsearg\everyheadingxxx} \def\evenfooting{\parsearg\evenfootingxxx} \def\oddfooting{\parsearg\oddfootingxxx} \def\everyfooting{\parsearg\everyfootingxxx} {\catcode`\@=0 % \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -\baselineskip \global\advance\vsize by -\baselineskip } \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{ \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @vtable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% \itemzzz {#1}} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemfont{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue. \nobreak \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a table}} \def\itemx{\errmessage{@itemx while not in a table}} \def\kitem{\errmessage{@kitem while not in a table}} \def\kitemx{\errmessage{@kitemx while not in a table}} \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} % Contains a kludge to get @end[description] to work. \def\description{\tablez{\dontindex}{1}{}{}{}{}} % @table, @ftable, @vtable. \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% \tabley\dontindex#1 \endtabley}} \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley \def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley \def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} \def\fnitemindex #1{\doind {fn}{\code{#1}}}% \def\vritemindex #1{\doind {vr}{\code{#1}}}% {\obeyspaces % \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} \def\tablez #1#2#3#4#5#6{% \aboveenvbreak % \begingroup % \def\Edescription{\Etable}% Necessary kludge. \let\itemindex=#1% \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % \ifnum 0#4>0 \tableindent=#4\mil \fi % \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % \def\itemfont{#2}% \itemmax=\tableindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \tableindent % \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% \def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % \let\kitemx = \internalBkitemx % \let\xitem = \internalBxitem % \let\xitemx = \internalBxitemx % } % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } \def\itemizey #1#2{% \aboveenvbreak % \itemmax=\itemindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \itemindent % \exdentamount=\itemindent \parindent = 0pt % \parskip = \smallskipamount % \ifdim \parskip=0pt \parskip=2pt \fi% \def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% \let\item=\itemizeitem} % Set sfcode to normal for the chars that usually have another value. % These are `.?!:;,' \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% \flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % % For those who want to use more than one line's worth of words in % the preamble, break the line within one argument and it % will parse correctly, i.e., % % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the part of the @columnfraction before the decimal point, which % is presumably either 0 or the empty string (but we don't check, we % just throw it away). #2 is the decimal part, which we use as the % percent of \hsize for this column. \def\pickupwholefraction#1.#2 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; % typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % This used to have \hskip1sp. But then the space in a template line is % not enough. That is bad. So let's go back to just & until we % encounter the problem it was intended to solve again. % --karl, nathan@acm.org, 20apr99. \def\tab{&} % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip \let\item\crcr \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \everycr{\noalign{% % % \filbreak%% keeps underfull box messages off when table breaks over pages. % Maybe so, but it also creates really weird page breaks when the table % breaks over pages. Wouldn't \vfil be better? Wait until the problem % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}}% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively marking % characters. \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut \else %% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% \let\chapter=\relax \let\unnumbered=\relax \let\top=\relax \let\unnumberedsec=\relax \let\unnumberedsection=\relax \let\unnumberedsubsec=\relax \let\unnumberedsubsection=\relax \let\unnumberedsubsubsec=\relax \let\unnumberedsubsubsection=\relax \let\section=\relax \let\subsec=\relax \let\subsubsec=\relax \let\subsection=\relax \let\subsubsection=\relax \let\appendix=\relax \let\appendixsec=\relax \let\appendixsection=\relax \let\appendixsubsec=\relax \let\appendixsubsection=\relax \let\appendixsubsubsec=\relax \let\appendixsubsubsection=\relax \let\contents=\relax \let\smallbook=\relax \let\titlepage=\relax } % Used in nested conditionals, where we have to parse the Texinfo source % and so want to turn off most commands, in case they are used % incorrectly. % \def\ignoremorecommands{% \let\defcodeindex = \relax \let\defcv = \relax \let\deffn = \relax \let\deffnx = \relax \let\defindex = \relax \let\defivar = \relax \let\defmac = \relax \let\defmethod = \relax \let\defop = \relax \let\defopt = \relax \let\defspec = \relax \let\deftp = \relax \let\deftypefn = \relax \let\deftypefun = \relax \let\deftypeivar = \relax \let\deftypeop = \relax \let\deftypevar = \relax \let\deftypevr = \relax \let\defun = \relax \let\defvar = \relax \let\defvr = \relax \let\ref = \relax \let\xref = \relax \let\printindex = \relax \let\pxref = \relax \let\settitle = \relax \let\setchapternewpage = \relax \let\setchapterstyle = \relax \let\everyheading = \relax \let\evenheading = \relax \let\oddheading = \relax \let\everyfooting = \relax \let\evenfooting = \relax \let\oddfooting = \relax \let\headings = \relax \let\include = \relax \let\lowersections = \relax \let\down = \relax \let\raisesections = \relax \let\up = \relax \let\set = \relax \let\clear = \relax \let\item = \relax } % Ignore @ignore ... @end ignore. % \def\ignore{\doignore{ignore}} % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\ifnottex{\doignore{ifnottex}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory = \comment % Ignore text until a line `@end #1'. % \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define a command to swallow text until we reach `@end #1'. % This @ is a catcode 12 token (that is the normal catcode of @ in % this texinfo.tex file). We change the catcode of @ below to match. \long\def\doignoretext##1@end #1{\enddoignore}% % % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. \catcode`\{ = 9 \catcode`\} = 9 % % We must not have @c interpreted as a control sequence. \catcode`\@ = 12 % % Make the letter c a comment character so that the rest of the line % will be ignored. This way, the document can have (for example) % @c @end ifinfo % and the @end ifinfo will be properly ignored. % (We've just changed @ to catcode 12.) \catcode`\c = 14 % % And now expand that command. \doignoretext } % What we do to finish off ignored text. % \def\enddoignore{\endgroup\ignorespaces}% \newif\ifwarnedobs\warnedobsfalse \def\obstexwarn{% \ifwarnedobs\relax\else % We need to warn folks that they may have trouble with TeX 3.0. % This uses \immediate\write16 rather than \message to get newlines. \immediate\write16{} \immediate\write16{WARNING: for users of Unix TeX 3.0!} \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} \immediate\write16{} \global\warnedobstrue \fi } % **In TeX 3.0, setting text in \nullfont hangs tex. For a % workaround (which requires the file ``dummy.tfm'' to be installed), % uncomment the following line: %%%%%\font\nullfont=dummy\let\obstexwarn=\relax % Ignore text, except that we keep track of conditional commands for % purposes of nesting, up to an `@end #1' command. % \def\nestedignore#1{% \obstexwarn % We must actually expand the ignored text to look for the @end % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize % the change of memory overflow, we follow the approach outlined on % page 401 of the TeXbook: make the current font be a dummy font. % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define `@end #1' to end the box, which will in turn undefine the % @end command again. \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% % % We are going to be parsing Texinfo commands. Most cause no % trouble when they are used incorrectly, but some commands do % complicated argument parsing or otherwise get confused, so we % undefine them. % % We can't do anything about stray @-signs, unfortunately; % they'll produce `undefined control sequence' errors. \ignoremorecommands % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use % dummy.tfm, as suggested in the TeXbook, because not all sites % might have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. % \nullfont \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont \let\tensf=\nullfont % Similarly for index fonts (mostly for their use in smallexample). \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont \let\smallsf=\nullfont % % Don't complain when characters are missing from the fonts. \tracinglostchars = 0 % % Don't bother to do space factor calculations. \frenchspacing % % Don't report underfull hboxes. \hbadness = 10000 % % Do minimal line-breaking. \pretolerance = 10000 % % Do not execute instructions in @tex \def\tex{\doignore{tex}}% % Do not execute macro definitions. % `c' is a comment character, so the word `macro' will get cut off. \def\macro{\doignore{ma}}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % \def\set{\begingroup\catcode` =10 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi \endgroup } % Can't use \xdef to pre-expand #2 and save some time, since \temp or % \next or other control sequences that we've defined might get us into % an infinite loop. Consider `@set foo @cite{bar}'. \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. % \def\clear{\parsearg\clearxxx} \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} % @value{foo} gets the text saved in variable foo. { \catcode`\_ = \active % % We might end up with active _ or - characters in the argument if % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup \catcode`\-=12 \catcode`\_=12 \indexbreaks \let_\normalunderscore \valuexxx} } \def\valuexxx#1{\expandablevalue{#1}\endgroup} % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything % about that. The command has to be fully expandable, since the result % winds up in the index file. This means that if the variable's value % contains other Texinfo commands, it's almost certain it will fail % (although perhaps we could fix that with sufficient work to do a % one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % \def\ifset{\parsearg\ifsetxxx} \def\ifsetxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifsetfail \else \expandafter\ifsetsucceed \fi } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\nestedignore{ifset}} \defineunmatchedend{ifset} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % \def\ifclear{\parsearg\ifclearxxx} \def\ifclearxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifclearsucceed \else \expandafter\ifclearfail \fi } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text % following, through the first @end iftex (etc.). Make `@end iftex' % (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no % effect (they'd get reverted at the end of the group). So we must % define \Eiftex to redefine itself to be its previous value. (We can't % just define it to fail again with an ``unmatched end'' error, since % the @ifset might be nested.) % \def\conditionalsucceed#1{% \edef\temp{% % Remember the current value of \E#1. \let\nece{prevE#1} = \nece{E#1}% % % At the `@end #1', redefine \E#1 to be its previous value. \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% }% \temp } % We need to expand lots of \csname's, but we don't want to expand the % control sequences after we've constructed them. % \def\nece#1{\expandafter\noexpand\csname#1\endcsname} % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \undefined % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname\donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% \def\ { }% % Take care of the plain tex accent commands. \def\"{\realbackslash "}% \def\`{\realbackslash `}% \def\'{\realbackslash '}% \def\^{\realbackslash ^}% \def\~{\realbackslash ~}% \def\={\realbackslash =}% \def\b{\realbackslash b}% \def\c{\realbackslash c}% \def\d{\realbackslash d}% \def\u{\realbackslash u}% \def\v{\realbackslash v}% \def\H{\realbackslash H}% % Take care of the plain tex special European modified letters. \def\oe{\realbackslash oe}% \def\ae{\realbackslash ae}% \def\aa{\realbackslash aa}% \def\OE{\realbackslash OE}% \def\AE{\realbackslash AE}% \def\AA{\realbackslash AA}% \def\o{\realbackslash o}% \def\O{\realbackslash O}% \def\l{\realbackslash l}% \def\L{\realbackslash L}% \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. % (Must be a way to avoid doing expansion at all, and thus not have to % laboriously list every single command here.) \def\@{@}% will be @@ when we switch to @ as escape char. % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% %\def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% \def\tt{\realbackslash tt}% \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% \def\result{\realbackslash result}% \def\equiv{\realbackslash equiv}% \def\expansion{\realbackslash expansion}% \def\print{\realbackslash print}% \def\error{\realbackslash error}% \def\point{\realbackslash point}% \def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\uref##1{\realbackslash uref {##1}}% \def\url##1{\realbackslash url {##1}}% \def\env##1{\realbackslash env {##1}}% \def\command##1{\realbackslash command {##1}}% \def\option##1{\realbackslash option {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% \def\,##1{\realbackslash ,{##1}}% \def\t##1{\realbackslash t {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% \def\sc##1{\realbackslash sc {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% \def\var##1{\realbackslash var {##1}}% \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% \def\acronym##1{\realbackslash acronym {##1}}% % % Handle some cases of @value -- where the variable name does not % contain - or _, and the value does not contain any % (non-fully-expandable) commands. \let\value = \expandablevalue % \unsepspaces % Turn off macro expansion \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} % \indexnofonts no-ops all font-change commands. % This is used when outputting the strings to sort the index by. \def\indexdummyfont#1{#1} \def\indexdummytex{TeX} \def\indexdummydots{...} \def\indexnofonts{% % Just ignore accents. \let\,=\indexdummyfont \let\"=\indexdummyfont \let\`=\indexdummyfont \let\'=\indexdummyfont \let\^=\indexdummyfont \let\~=\indexdummyfont \let\==\indexdummyfont \let\b=\indexdummyfont \let\c=\indexdummyfont \let\d=\indexdummyfont \let\u=\indexdummyfont \let\v=\indexdummyfont \let\H=\indexdummyfont \let\dotless=\indexdummyfont % Take care of the plain tex special European modified letters. \def\oe{oe}% \def\ae{ae}% \def\aa{aa}% \def\OE{OE}% \def\AE{AE}% \def\AA{AA}% \def\o{o}% \def\O{O}% \def\l{l}% \def\L{L}% \def\ss{ss}% \let\w=\indexdummyfont \let\t=\indexdummyfont \let\r=\indexdummyfont \let\i=\indexdummyfont \let\b=\indexdummyfont \let\emph=\indexdummyfont \let\strong=\indexdummyfont \let\cite=\indexdummyfont \let\sc=\indexdummyfont %Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |... %\let\tt=\indexdummyfont \let\tclose=\indexdummyfont \let\code=\indexdummyfont \let\url=\indexdummyfont \let\uref=\indexdummyfont \let\env=\indexdummyfont \let\acronym=\indexdummyfont \let\command=\indexdummyfont \let\option=\indexdummyfont \let\file=\indexdummyfont \let\samp=\indexdummyfont \let\kbd=\indexdummyfont \let\key=\indexdummyfont \let\var=\indexdummyfont \let\TeX=\indexdummytex \let\dots=\indexdummydots \def\@{@}% } % To define \realbackslash, we must make \ not be an escape. % We must first make another character (@) an escape % so we do not become unable to do a definition. {\catcode`\@=0 \catcode`\\=\other @gdef@realbackslash{\}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % For \ifx comparisons. \def\emptymacro{\empty} % Most index entries go through here, but \dosubind is the general case. % \def\doind#1#2{\dosubind{#1}{#2}\empty} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % \empty if called from \doind, as we usually are. The main exception % is with defuns, which call us directly. % \def\dosubind#1#2#3{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% \fi {% \count255=\lastpenalty {% \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ {% \let\folio = 0% We will expand all macros now EXCEPT \folio. \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % \def\thirdarg{#3}% % % If third arg is present, precede it with space in sort key. \ifx\thirdarg\emptymacro \let\subentry = \empty \else \def\subentry{ #3}% \fi % % First process the index entry with all font commands turned % off to get the string to sort by. {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% % % Now the real index entry with the fonts. \toks0 = {#2}% % % If the third (subentry) arg is present, add it to the index % line to write. \ifx\thirdarg\emptymacro \else \toks0 = \expandafter{\the\toks0{#3}}% \fi % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\csname#1indfile\endcsname{% \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% }% % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % \iflinks \ifvmode \skip0 = \lastskip \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi \fi % \temp % do the write % % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi }% }% \penalty\count255 }% } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \indexbreaks % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \penalty -300 % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% \vskip .33\baselineskip plus .1\baselineskip % % Do our best not to break after the initial. \nobreak }} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % \def\entry#1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing columns. \vskip 0pt plus1pt % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent % % Insert the text of the index entry. TeX will do line-breaking on it. #1% % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#2}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd\ \else% % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else \ #2% The page number ends the paragraph. \fi \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % \def\appendixletter{\char\the\appendixno} % We do the following for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise. \def\thischapter{} \def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raise/lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % Choose a numbered-heading macro % #1 is heading level if unmodified by @raisesections or @lowersections % #2 is text for heading \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \chapterzzz{#2} \or \seczzz{#2} \or \numberedsubseczzz{#2} \or \numberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \chapterzzz{#2} \else \numberedsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses appendix heading levels \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \appendixzzz{#2} \or \appendixsectionzzz{#2} \or \appendixsubseczzz{#2} \or \appendixsubsubseczzz{#2} \else \ifnum \absseclevel<0 \appendixzzz{#2} \else \appendixsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses numberless heading levels \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \unnumberedzzz{#2} \or \unnumberedseczzz{#2} \or \unnumberedsubseczzz{#2} \or \unnumberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \unnumberedzzz{#2} \else \unnumberedsubsubseczzz{#2} \fi \fi } % @chapter, @appendix, @unnumbered. \def\thischaptername{No Chapter Title} \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% {\the\chapno}}}% \temp \donoderef \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{\putwordAppendix\space \appendixletter}% \chapmacro {#1}{\putwordAppendix{} \appendixletter}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% {\putwordAppendix{} \appendixletter}}}% \temp \appendixnoderef \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} % @top is like @unnumbered. \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}\message{(\the\toks0)}% % \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% \temp \unnumbnoderef \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% {\the\chapno}{\the\secno}}}% \temp \donoderef \nobreak } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% {\appendixletter}{\the\secno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% \plainsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% \temp \unnumbnoderef \nobreak } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% {\the\chapno}{\the\secno}{\the\subsecno}}}% \temp \donoderef \nobreak } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% {\appendixletter}{\the\secno}{\the\subsecno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% \plainsubsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% {\the\toks0}}}% \temp \unnumbnoderef \nobreak } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% \temp \donoderef \nobreak } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% \plainsubsubsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% {\the\toks0}}}% \temp \unnumbnoderef \nobreak } % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they should now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} \def\infounnumberedsec{\parsearg\unnumberedseczzz} \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} \def\infoappendix{\parsearg\appendixzzz} \def\infoappendixsec{\parsearg\appendixseczzz} \def\infoappendixsubsec{\parsearg\appendixsubseczzz} \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} \def\infochapter{\parsearg\chapterzzz} \def\infosection{\parsearg\sectionzzz} \def\infosubsection{\parsearg\subsectionzzz} \def\infosubsubsection{\parsearg\subsubsectionzzz} % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% {\advance\chapheadingskip by 10pt \chapbreak }% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. \def\heading{\parsearg\plainsecheading} \def\subheading{\parsearg\plainsubsecheading} \def\subsubheading{\parsearg\plainsubsubsecheading} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon \def\CHAPFplain{ \global\let\chapmacro=\chfplain \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} % Plain chapter opening. % #1 is the text, #2 the chapter number or empty if unnumbered. \def\chfplain#1#2{% \pchapsepmacro {% \chapfonts \rm \def\chapnum{#2}% \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % Plain opening for unnumbered. \def\unnchfplain#1{\chfplain{#1}{}} % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerchfplain#1{{% \def\centerparametersmaybe{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt }% \chfplain{#1}{}% }} \CHAPFplain % The default \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{ \global\let\chapmacro=\chfopen \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} \def\plainsecheading#1{\sectionheading{sec}{}{#1}} % Subsection titles. \newskip \subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} % Subsubsection titles. \let\subsubsecheadingskip = \subsecheadingskip \let\subsubsecheadingbreak = \subsecheadingbreak \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} % Print any size section title. % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% {% \expandafter\advance\csname #1headingskip\endcsname by \parskip \csname #1headingbreak\endcsname }% {% % Switch to the right set of fonts. \csname #1fonts\endcsname \rm % % Only insert the separating space if we have a section number. \def\secnum{#2}% \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% % \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 % zero if no section number \unhbox0 #3}% }% \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. We supply {\folio} at the end of the % argument, which will end up as the last argument to the \...entry macro. % % We open the .toc file here instead of at @setfilename or any other % given time so that @contents can be put in the document anywhere. % \newif\iftocfileopened \def\writetocentry#1{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi \iflinks \write\tocfile{#1{\folio}}\fi } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Finish up the main text and prepare to read what we've written % to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \pdfmakeoutlines \endgroup \lastnegativepageno = \pageno \pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{} \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{} \def\unnumbsubsubsecentry ##1##2{} \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \pageno = \savepageno } \let\shortcontents = \summarycontents \ifpdf \pdfcatalog{/PageMode /UseOutlines}% \fi % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. % \newdimen\shortappendixwidth % \def\shortchaplabel#1{% % Compute width of word "Appendix", may change with language. \setbox0 = \hbox{\shortcontrm \putwordAppendix}% \shortappendixwidth = \wd0 % % We typeset #1 in a box of constant width, regardless of the text of % #1, so the chapter titles will come out aligned. \setbox0 = \hbox{#1}% \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi % % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% } \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is % typeset in cmr, so characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% \endgroup} % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \let\subsecentryfonts = \textfonts \let\subsubsecentryfonts = \textfonts \message{environments,} % @foo ... @end foo. % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % Furthermore, these definitions must come after we define our fonts. \newbox\dblarrowbox \newbox\longdblarrowbox \newbox\pushcharbox \newbox\bullbox \newbox\equivbox \newbox\errorbox %{\tentt %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} % Adapted from the manmac format (p.420 of TeXbook) %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex % depth .1ex\hfil} %} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{ \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % The @error{} command. \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 \catcode 43=12 % plus \catcode`\"=12 \catcode`\==12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\*=\ptexstar \let\t=\ptext % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @endlisp. % @lisp does a \begingroup so it can rebind things, % including the definition of @endlisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. {\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip % \def\aboveenvbreak{{% \ifnum\lastpenalty < 10000 \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip \penalty-50 \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \long\def\cartouche{% \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \hsize=\cartinner \kern3pt \begingroup \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \def\Ecartouche{% \endgroup \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \endgroup }} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \let\exdent=\nofillexdent \let\nonarrowing=\relax \fi } % Define the \E... control sequence only if we are inside the particular % environment, so the error checking in \end will work. % % To end an @example-like environment, we first end the paragraph (via % \afterenvbreak's vertical glue), and then the group. That way we keep % the zero \parskip that the environments set -- \parskip glue will be % inserted at the beginning of the next paragraph in the document, after % the environment. % \def\nonfillfinish{\afterenvbreak\endgroup} % @lisp: indented, narrowed, typewriter font. \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} % @small... is usually equivalent to the non-small (@smallbook % redefines). We must call \example (or whatever) last in the % definition, since it reads the return following the @example (or % whatever) command. % % This actually allows (for example) @end display inside an % @smalldisplay. Too bad, but makeinfo will catch the error anyway. % \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. % Originally contributed by Pavel@xerox. \def\smalllispx{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallfonts \lisp } % @display: same as @lisp except keep current font. % \def\display{\begingroup \nonfillstart \let\Edisplay = \nonfillfinish \gobble } % @smalldisplay (when @smallbook): @display plus smaller fonts. % \def\smalldisplayx{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallfonts \rm \display } % @format: same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t \nonfillstart \let\Eformat = \nonfillfinish \gobble } % @smallformat (when @smallbook): @format plus smaller fonts. % \def\smallformatx{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallfonts \rm \format } % @flushleft (same as @format). % \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} % @flushright. % \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble } % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. % \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \singlespace \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \let\nonarrowing = \relax \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p. 344; only we need to do '@' too \def\dospecials{% \do\ \do\\\do\@\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~} % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=12}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \catcode`\`=\active \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}' % % Inspired by LaTeX's verbatim command set [latex.ltx] %% Include LaTeX hack for completeness -- never know %% \begingroup %% \catcode`|=0 \catcode`[=1 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ %% #1|endgroup|def|Everbatim[]|end[verbatim]] %% |endgroup \begingroup \catcode`\ =\active \gdef\doverbatim#1@end verbatim{#1\end{verbatim}} \endgroup % \def\verbatim{% \def\Everbatim{\nonfillfinish\endgroup}% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim\doverbatim } % @verbatiminclude FILE - insert text of file in verbatim environment. % % Allow normal characters that we make active in the argument (a file name). \def\verbatiminclude{% \begingroup \catcode`\\=12 \catcode`~=12 \catcode`^=12 \catcode`_=12 \catcode`|=12 \catcode`<=12 \catcode`>=12 \catcode`+=12 \parsearg\doverbatiminclude } \def\setupverbatiminclude{% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim } % \def\doverbatiminclude#1{% % Restore active chars for included file. \endgroup \begingroup \def\thisfile{#1}% \expandafter\expandafter\setupverbatiminclude\input\thisfile \endgroup\nonfillfinish\endgroup } \message{defuns,} % @defun etc. % Allow user to change definition object font (\df) internally \def\setdeffont #1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deftypemargin \deftypemargin=12pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount % define \functionparens, which makes ( and ) and & do special things. % \functionparens affects the group it is contained in. \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active} % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} % This is used to turn on special parens % but make & act ordinary (given that it's active). \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. % also in that case restore the outer-level definition of (. \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % \gdef\normalparens{\boldbrax\let&=\ampnr} } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } \let\ampnr = \& \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % Active &'s sneak into the index arguments, so make sure it's defined. { \catcode`& = 13 \global\let& = \ampnr } % First, defname, which formats the header line itself. % #1 should be the function name. % #2 should be the type of definition, such as "Function". \def\defname #1#2{% % Get the values of \leftskip and \rightskip as they were % outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent \noindent \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations \parshape 2 0in \dimen0 \defargsindent \dimen1 % Now output arg 2 ("Function" or some such) % ending at \deftypemargin from the right margin, % but stuck inside a box of width 0 so it does not interfere with linebreaking {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. \advance \hsize by -\dimen2 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% % Make all lines underfull and no complaints: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % Generate function name } % Actually process the body of a definition % #1 should be the terminating control sequence, such as \Edefun. % #2 should be the "another name" control sequence, such as \defunx. % #3 should be the control sequence that actually processes the header, % such as \defunheader. \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % 61 is `=' \obeylines\activeparens\spacesplit#3} % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence for consecutive fns (which we define). % #3 is the control sequence to call to resume processing. % #4, delimited by the space, is the class name. % \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} % Used for @deftypemethod and @deftypeivar. % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence for consecutive fns (which we define). % #3 is the control sequence to call to resume processing. % #4, delimited by a space, is the class name. % #5 is the method's return type. % \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV \medbreak \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} % Used for @deftypeop. The change from \deftypemethparsebody is an % extra argument at the beginning which is the `category', instead of it % being the hardwired string `Method' or `Instance Variable'. We have % to account for this both in the \...x definition and in parsing the % input at hand. Thus also need a control sequence (passed as #5) for % the \E... definition to assign the category name to. % \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV \medbreak \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 ##3 {% \def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % \obeylines\spacesplit#3} % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{#3{#4}}% } % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the % type is just `struct', because we lose the braces in `{struct % termios}' when \spacesplit reads its undelimited argument. Sigh. % \let\deftpparsebody=\defvrparsebody % % So, to get around this, we put \empty in with the type name. That % way, TeX won't find exactly `{...}' as an undelimited argument, and % won't strip off the braces. % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{\parsetpheaderline{#3{#4}}}\empty } % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\spacesplit{#3{#5}}} % Split up #2 at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. {\obeylines \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% \ifx\relax #3% #1{#2}{}\else #1{#2}{#3#4}\fi}} % So much for the things common to all kinds of definitions. % Define @defun. % First, define the processing that is wanted for arguments of \defun % Use this to expand the args and terminate the paragraph they make up \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Set the font temporarily and use \font in case \setfont made \tensl a macro. {\tensl\hyphenchar\font=0}% #1% {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\nobreak\vskip -\parskip\nobreak } \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\nobreak\vskip -\parskip\nobreak } % Do complete processing of one @defun or @defunx line already parsed. % @deffn Command forward-char nchars \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defun == @deffn Function \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} % #1 is the data type. #2 is the name and args. \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} % \defheaderxcond#1\relax$$$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index \begingroup \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working \defname {\defheaderxcond#2\relax$$$#3}{#1}% \deftypefunargs {#4}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... % \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} % \def\defopheader#1#2#3{% \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% \defunargs {#3}\endgroup % } % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... % \def\deftypeop #1 {\def\deftypeopcategory{#1}% \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader \deftypeopcategory} % % #1 is the class name, #2 the data type, #3 the operation name, #4 the args. \def\deftypeopheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$$$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypemethod CLASS TYPE METHOD ARG... % \def\deftypemethod{% \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypeivar CLASS TYPE VARNAME % \def\deftypeivar{% \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} % % #1 is the class name, #2 the data type, #3 the variable name. \def\deftypeivarheader#1#2#3{% \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup \defname{\defheaderxcond#2\relax$$$#3} {\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup } % @defmethod == @defop Method % \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} % % #1 is the class name, #2 the method name, #3 the args. \def\defmethodheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{#2}{\putwordMethodon\ \code{#1}}% \defunargs{#3}% \endgroup } % @defcv {Class Option} foo-class foo-flag \def\defcv #1 {\def\defcvtype{#1}% \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% \defvarargs {#3}\endgroup % } % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME % \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} % \def\defivarheader#1#2#3{% \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% \defvarargs{#3}% \endgroup } % @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak} % @defvr Counter foo-count \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} % @defvar == @defvr Variable \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefvar}% \defvarargs {#2}\endgroup % } % @defopt == @defvr {User Option} \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefopt}% \defvarargs {#2}\endgroup % } % @deftypevar int foobar \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name, perhaps followed by text that % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} % Now define @deftp % Args are printed in bold, a slight difference from @defvar. \def\deftpargs #1{\bf \defvarargs{#1}} % @deftp Class window height width ... \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} % These definitions are used if you use @defunx (etc.) % anywhere other than immediately after a @defun or @defunx. % \def\defcvx#1 {\errmessage{@defcvx in invalid context}} \def\deffnx#1 {\errmessage{@deffnx in invalid context}} \def\defivarx#1 {\errmessage{@defivarx in invalid context}} \def\defmacx#1 {\errmessage{@defmacx in invalid context}} \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} \def\defoptx #1 {\errmessage{@defoptx in invalid context}} \def\defopx#1 {\errmessage{@defopx in invalid context}} \def\defspecx#1 {\errmessage{@defspecx in invalid context}} \def\deftpx#1 {\errmessage{@deftpx in invalid context}} \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} \def\defunx#1 {\errmessage{@defunx in invalid context}} \def\defvarx#1 {\errmessage{@defvarx in invalid context}} \def\defvrx#1 {\errmessage{@defvrx in invalid context}} \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \let\xeatspaces\eatspaces \input \jobname.tmp \endgroup } \else \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? \def\macrolist{} % List of all defined macros in the form % \do\macro1\do\macro2... % Utility routines. % Thisdoes \let #1 = #2, except with \csnames. \def\cslet#1#2{% \expandafter\expandafter \expandafter\let \expandafter\expandafter \csname#1\endcsname \csname#2\endcsname} % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=12\catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% \catcode`\~=12 \catcode`\^=12 \catcode`\_=12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \catcode`\+=12 \catcode`\{=12 \catcode`\}=12 \catcode`\@=12 \catcode`\^^M=12 \usembodybackslash} \def\macroargctxt{% \catcode`\~=12 \catcode`\^=12 \catcode`\_=12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \catcode`\+=12 \catcode`\@=12 \catcode`\\=12} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{The name \the\macname\space is reserved}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% % Add the macroname to \macrolist \toks0 = \expandafter{\macrolist\do}% \xdef\macrolist{\the\toks0 \expandafter\noexpand\csname\the\macname\endcsname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \def\unmacro{\parsearg\unmacroxxx} \def\unmacroxxx#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist \begingroup \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% \def\do##1{% \def\tempb{##1}% \ifx\tempa\tempb % remove this \else \toks0 = \expandafter{\newmacrolist\do}% \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% \fi}% \def\newmacrolist{}% % Execute macro list to define \newmacrolist \macrolist \global\let\macrolist\newmacrolist \endgroup \else \errmessage{Macro #1 not defined}% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % We mant to disable all macros during \shipout so that they are not % expanded by \write. \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% \edef\next{\macrolist}\expandafter\endgroup\next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{\ignoreactivespaces \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% \expandafter\noexpand\csname#2\endcsname}% \expandafter\endgroup\next} \message{cross references,} % @xref etc. \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's job is to define \lastnode. \def\node{\ENVcheck\parsearg\nodezzz} \def\nodezzz#1{\nodexxx [#1,]} \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\relax % The sectioning commands (@chapter, etc.) call these. \def\donoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Ysectionnumberandtype}% \global\let\lastnode=\relax \fi } \def\unnumbnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% \global\let\lastnode=\relax \fi } \def\appendixnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Yappendixletterandtype}% \global\let\lastnode=\relax \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME, namely % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have % to set \indexdummies so commands such as @code in a section title % aren't expanded. It would be nicer not to expand the titles in the % first place, but there's so many layers that that is hard to do. % \def\setref#1#2{{% \indexdummies \pdfmkdest{#1}% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{#2}% }} % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printednodename{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printednodename{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printednodename{\ignorespaces #1}% \fi% \fi \fi \fi % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifpdf \leavevmode \getfilename{#4}% \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1@}% \else \startlink attr{/Border [0 0 0]}% goto name{#1@}% \fi \linkcolor \fi % \ifdim \wd1 > 0pt \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\normalturnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % [mynode], [\printednodename],\space % page 3 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} % \dosetq is the interface for calls from other macros % Use \normalturnoffactive so that punctuation chars such as underscore % and backslash work in node names. (\turnoffactive doesn't do \.) \def\dosetq#1#2{% {\let\folio=0% \normalturnoffactive \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% \iflinks \next \fi }% } % \internalsetq {foo}{page} expands into % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} % When the aux file is read, ' is the escape character \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} % Things to be expanded by \internalsetq \def\Ypagenumber{\folio} \def\Ytitle{\thissection} \def\Ynothing{} \def\Ysectionnumberandtype{% \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \def\Yappendixletterandtype{% \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \gdef\xreftie{'tie} % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Non-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \csname X#1\endcsname \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % \def\xrdef#1{\begingroup % Reenable \ as an escape while reading the second argument. \catcode`\\ = 0 \afterassignment\endgroup \expandafter\gdef\csname X#1\endcsname } % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other \catcode`\@=\other \catcode`\^=\other % It was suggested to define this as 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % Make the characters 128-255 be printing characters {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % The aux file uses ' as the escape (for now). % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\{=1 \catcode`\}=2 \catcode`\%=\other \catcode`\'=0 \catcode`\\=\other % \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue \global\warnedobstrue \fi % Open the new aux file. TeX will close it automatically at exit. \openout\auxfile=\jobname.aux \endgroup} % Footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \footnotezzz }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Hang the footnote text off the number. \hang \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t \else\let\next\f@t\fi \next} \def\f@@t{\bgroup\aftergroup\@foot\let\next} \def\f@t#1{#1\@foot} \def\@foot{\strut\par\egroup} }%end \catcode `\@=11 % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else \closein 1 % Do not bother showing banner with post-v2.7 epsf.tex (available in % doc/epsf.tex until it shows up on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is just the usual extra ignored arg for parsing this stuff. \def\imagexxx#1,#2,#3,#4\finish{% \ifpdf \centerline{\dopdfimage{#1}{#2}{#3}}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \centerline{\epsfbox{#1.eps}}% \bigbreak \else % In the middle of a paragraph, no extra space. \epsfbox{#1.eps}% \fi \endgroup \fi } \message{localization,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \def\documentlanguage{\parsearg\dodocumentlanguage} \def\dodocumentlanguage#1{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \let\temp = \relax \else \def\temp{\input txi-#1.tex }% \fi \temp \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can % set \parskip and call \setleading for \baselineskip. % \def\internalpagesizes#1#2#3#4#5#6{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \parindent = \defaultparindent \setemergencystretch } % Use `small' versions. % \def\smallenvironments{% \let\smalldisplay = \smalldisplayx \let\smallexample = \smalllispx \let\smallformat = \smallformatx \let\smalllisp = \smalllispx } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \setleading{13.2pt}% % % If page is nothing but text, make it come out even. \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \setleading{12pt}% % \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \deftypemargin = 0pt \defbodyindent = .5cm \smallenvironments }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \setleading{12pt}% \parskip = 3pt plus 2pt minus 1pt % \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% % \tolerance = 700 \hfuzz = 1pt }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \setleading{12.5pt}% \parskip = 2pt plus 1pt minus 0.1pt % \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0mm \deftypemargin = 0pt \defbodyindent = 2mm \tableindent = 12mm % \smallenvironments }} % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin % 29mm, hence bottom margin 28mm, nominal side margin 3cm. \def\afourlatex{{\globaldefs = 1 \setleading{13.6pt}% % \afourpaper \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% % \globaldefs = 0 }} % Use @afourwide to print on European A4 paper in wide format. \def\afourwide{% \afourpaper \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% % \globaldefs = 0 } % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \def\pagesizes{\parsearg\pagesizesxxx} \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{13.2pt}% % \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$} % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar} %\catcode 27=\active %\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active \global\def={{\tt \char 61}}} \catcode`+=\active \catcode`\_=\active % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} \catcode`\@=0 % \rawbackslashxx output one backslash character in current font \global\chardef\rawbackslashxx=`\\ %{\catcode`\\=\other %@gdef@rawbackslashxx{\}} % \rawbackslash redefines \ as input to do \rawbackslashxx. {\catcode`\\=\active @gdef@rawbackslash{@let\=@rawbackslashxx }} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} % \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{@let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar} @def@normalturnoffactive{@let"=@normaldoublequote @let\=@normalbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also back turn on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Set initial fonts. @textfonts @rm @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: fftw-2.1.5/doc/fftw.ps0000644000175400001440000203211507637531627010251 %!PS-Adobe-2.0 %%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software %%Title: fftw.dvi %%Pages: 74 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -Z -o fftw.ps fftw.dvi %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2003.03.24:0228 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet %%BeginProcSet: special.pro %! TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N /vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N /rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N /@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ /hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B /@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ /urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known {userdict/md get type/dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup length 20 add dict copy def}if end md begin /letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale }if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState save N userdict maxlength dict begin/magscale true def normalscale currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts /psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict begin/SpecialSave save N gsave normalscale currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR }{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N /@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X /yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (fftw.dvi) @start %DVIPSBitmapFont: Fa cmbxti10 14.4 1 /Fa 1 47 df<13FCEA03FF000F13804813C05AA25AA2B5FCA31480A214006C5A6C5A6C5A EA0FE0121271912B>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb cmtt12 14.4 2 /Fb 2 104 df<913807FFF0023F13FE49B61280010715C04915E04915F0137F903AFFFC 003FF84801E0131F48138091C7FC485A4848EC0FF049EC07E0484891C7FC5B123F5B127F 5BA312FF90CAFCA97F127FA27F123F7F17FC6C6CEC01FE7F6C7E6C6C14036DEC07FC6C01 C0130F6C01F0EB1FF86C01FEEBFFF06DB612E06D15C0010F15806D1500010114FC6D6C13 F0020790C7FC2F3678B43E>99 D103 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc cmsl9 9 5 /Fc 5 117 df<387FFFF8A4B512F015057D921A>45 D97 D108 D<14FF010713C090381F81 F090383E00F80178133C4848133E48487FA248481480120F4848130FED1FC0123F90C7FC A25AA400FEEC3F80A31600007E5C157EA25D003E5C003F495A6C495A6C6C485A6C6C485A 2603F03EC7FC3800FFF8EB3FC022237CA126>111 D<13065BA4131CA25BA2137813F812 011203485A381FFFFEB5FCA23803F000A212075BA5120F5BA5121FEB8018A41438003F13 301300A214706C1360EB80E0380F81C0EBC3803803FF00EA00FC172F7AAD1E>116 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd cmr5 5 2 /Fd 2 51 df<1360EA01E0120F12FF12F11201B3A3387FFF80A2111C7B9B1C>49 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmmi5 5 2 /Fe 2 116 df100 D<137E3801FF80EA0381380703C0380E0780EB0300EA0F80EA07F86CB4FC6C1380 EA000FEA3003127812F8EB0700EAF00EEA7FFCEA1FF012127C911C>115 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmti9 9 7 /Ff 7 117 df<121C127F12FFA412FE12380808778718>46 D101 D104 DI<3903C00FC0390FF03FF0391E78F078391C7DE03C393C3FC0FC00381380EB7F 00007814F8D8707E13701500EAF0FC12E0EA60F812001201A25BA21203A25BA21207A25B A2120FA25BA2121FA290C8FC120E1E227AA020>114 DI<1303EB0F80A3131FA21400A25BA2133EA2137EA2137C387F FFF8A2B5FC3800F800A21201A25BA21203A25BA21207A25BA2120FA25B1460001F13F014 E01300130114C01303001E1380EB07005BEA0F1EEA07F8EA01E015307AAE19>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg cmex10 10 2 /Fg 2 89 df81 D88 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh cmbx12 13.14 52 /Fh 52 125 df<923803FFE092B512FC020714FF021F81027F9038007FC0DAFFF0EB0FE0 010301C0804990C7EA3FF84948147F4A81494814FF495AA2137F5CA2715A715A715AEF07 8094C8FCA8EF07FCB9FCA526007FF0C7123F171FB3B3003FB5D8E00FB512F8A53D4D7ECC 44>12 D45 DI<177817F8EE01FCA21603A2EE07F8A217F0160FA217 E0161FA2EE3FC0A21780167FA217005EA24B5AA25E1503A24B5AA25E150FA25E151FA24B 5AA25E157FA24BC7FCA25D1401A25D1403A24A5AA25D140FA24A5AA25D143FA25D147FA2 4AC8FCA25C1301A25C1303A2495AA25C130FA2495AA25C133FA25C137FA249C9FCA25B12 01A2485AA25B1207A25B120FA2485AA25B123FA25B127FA248CAFCA25AA2127CA22E6D79 D13D>I<15F014011407141F147FEB03FF137FB6FCA313FC1380C7FCB3B3B2007FB712E0 A52B4777C63D>49 DIIIII<903803FFF8013FEBFF8090B612E0000315F8489038007FFCD80FF0EB1F FED81FC0EB07FF48C71480D87FC015C06D7F486C15E07FA66C5A6C484913C06C5A0007C7 481380C8FC4B13004B5AED7FF84B5A16C04A5B4A90C7FC15FC4A5A5D140F5D4A5AA25D4A C8FCA3143EAB143C91C9FCA9147E49B47E497F497FA2497FA66D5BA26D5B6D5BD9007EC8 FC2B4D79CC3A>63 D65 D<93261FFF80EB01C00307B500F81303033F02FE13 074AB7EA800F0207EEE01F021F903AFE007FF83F027F01E0903807FC7F91B5C73801FEFF 010301FCEC007F4901F0814901C0150F4949814990C97E494882495A48498248197F5C48 193F5C48191F5C48190FA2485BA21A075AA391CDFCA2B5FCAD7EA280F207C0A27EA36C7F 1A0F6C1A80806C191F6E18006C61806C197E6C6D177C6D6C17FC6D6C4C5A6D6D4B5A6D6D 4B5A6D01F0ED1FC06D01FC4B5A010001FF03FFC7FC6E01E0EB07FE021F01FEEB3FFC0207 90B612F0020116C0DA003F92C8FC030714F8DB001F13804A4D79CB59>67 DII< BBFCA41A80D8001F01C0C7FC181F18038484197F193F191F1AC0190FA31907A4171FF103 E0A496C7FCA25FA25F5F5E160792B6FCA5EDC0071601828383A283A794C9FCB1B8FCA543 4A7CC94D>I72 DI76 DIIII82 DI<003FBB12C0A5DA80019038FC001FD9FC001601D87FF09438007FE001 C0183F49181F90C7170FA2007E1907A3007C1903A500FC1AF0481901A5C894C7FCB3B3A7 49B812FCA54C4A7CC955>II87 D97 D<91380FFF8091B512F8010314FF010F158090263FFE0013C0D97FF8EB1FE0D9FFE0EB3F F04849EB7FF8484913FF4890C7FC5A5B121F5B003FED7FF0EE3FE0007FED1FC093C7FC5B A212FFAC127F7FA2123FA26D153E121F6D157E6C167C6C6D14FC6C16F86C6D13036C01F0 EB07F0D97FFCEB1FE06DB4EBFFC0010F90B5120001035C010014F0020F13802F337CB137 >99 DIIIII<13FCEA03FF487F487FA2487FA66C5BA26C5B6C90C7FCEA00 FC90C8FCACEB7FC0B5FCA512037EB3B3B61280A5194D7BCC22>II108 D<90287FC001FFE0EC7FF8B5010F01FC0103B5FC033F6D010F80 4B6D6C4814E0DBFE079026C03F817F9126C3F0019138FC007F0003D9C7E0DAE1F8806CDA 8000D9F1E06D7E02CFC7EBF3C002DE91267FF780131F02FC03FFC77FA24A5DA24A5DA34A 5DB3A9B6D8C03FB5D8F00FB512FCA55E317BB067>I<903A7FC001FFC0B5010F13F8033F 13FE4B7F9126C1FE077F9126C3F0037F00039038C7C0016CD9CF8080150002DE7F02FC81 A25CA25CA35CB3A9B6D8C07FEBFFE0A53B317BB044>I<913807FF80027F13F80103B6FC 010F15C090261FFE017F903A7FF0003FF8D9FFC0EB0FFC48496D7E4890C76C7E48178049 80000F17C048486E13E0A2003F17F049157FA2007F17F8A400FF17FCAB007F17F8A36C6C EDFFF0A3001F17E06D5C000F17C06C6C4A13806C17006C6D495A6C01E0EB1FFC6D6C495A 903A3FFE01FFF0010FB612C0010392C7FCD9007F13F80207138036337DB13D>I<90397F C00FFFB5017F13F002C1B512FC02C714FF9126CFF80F7F9126FFC00313E0000391C77F6C 01FC6E7E4A6E7E5C4A6E7E848319808319C0A47113E0AC4D13C0A319805FA219004D5A80 4D5A6E4A5A6E4A5A02FF495BDB80075B9126EFF01F5B02E7B548C7FC02E314F802E014E0 DB0FFEC8FC92CAFCAFB612C0A53B467CB044>I<9039FF803FE0B5EBFFF8028113FE0283 7FDA87E11380EC8F830003D99F0713C06C139E14BCA214F8A24A6C13806F13004A6C5A93 C7FCA45CB3A7B612E0A52A317CB032>114 D<90390FFF8070017FEBF1F048B6FC120738 0FFC01391FE0003F4848130F491307127F90C712035A1501A27FA213E06D90C7FC13FE38 7FFFF0ECFFC015F06C14FC6C14FF6C15806C15C06C15E0C615F0013F14F8010714FCEB00 7F14019138003FFE150F0078140700F81403A26C1401A37E16FC6C14036D14F87F6DEB07 F001F8EB1FE001FFEBFFC091B51280D8FC7F1400D8F81F13FCD8E00313C027337CB130> I<14F8A61301A41303A21307A2130FA2131F133F137F13FF1203000F90B512F0B7FCA426 007FF8C7FCB3A6167CAA013F14F880A290391FFE01F0010F1303903907FF87E06DEBFFC0 6D14806D6C1300EC0FFC26467EC430>IIIII<007F B500C090387FFFE0A5C601F0C73803F8006E5D017F5E6E1407013F5E6E140F011F5E6E14 1FA26D6D91C7FC5F6D153E6F137E6D157C6F13FC6D5DEDF0016D5DEDF803027F5C15FC16 07DA3FFE5B160F021F5CEDFF1F6E91C8FC16BF6E13BE16FE6E5BA36E5BA26E5BA26F5AA2 6F5AA26F5AA393C9FC5D153E157E157CD81F8013FC486C5B387FE001D8FFF05B14035D14 074A5A49485A007F49CAFCEBC07E383F81FC6CB45A6C5B6C13C0C648CBFC3B467EAF41> I<001FB712FCA4DA000113F801F84913F001E04913E05B494913C04B138048C7481300A2 4B5A4B5A003E495B5C5E4A5B4A5BC7485BA24A90C7FC4A5A4A5AA2495B4949137C495BA2 495B495B4990C712F85B5C495A48491301485BA248491303484913074849130F161F4890 C7EA7FF04848EB03FFB8FCA42E307DAF37>I124 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi cmtt9 9 49 /Fi 49 123 df<00101320007C13F838FE01FCAAEAFC00007C13F8A900381370161778AE 27>34 D<007FB512F8B612FCA46C14F81E067C9927>45 D50 DI<1278B612FE15FFA315FE39FC0001FCEC03F8EC07F0007814E0C7120FEC1F C01580143FEC7F00147E14FE5C13015C13035C13075CA2495AA3495AA3133F91C7FCA55B 137EA9133C20307DAE27>55 D65 D<007FB5FCB612C08115F87E3907E0 03FCEC00FE157E157F81A6157EA25D1403EC0FF890B55A15C015F081819038E000FE157F ED3F80151FA2ED0FC0A6151F1680153FED7F004A5A007FB55AB65A5D15E06C1480222E7F AD27>I<903803F80E90381FFE1F90383FFFBF90B6FC5A3803FE0F3807F803497E48487E 485A49137FA248C7123FA25A127E151E150012FE5AAA7E127EA2151E007F143F7EA26C7E 157F6D137E6C6C13FE3907F001FCEBF8033903FE0FF86CB512F06C14E0013F13C06D1300 EB03F820307DAE27>I<387FFFFC14FFB612C06C80813907E00FF81407EC01FC6E7EA215 7E157F811680151FA316C0150FABED1F80A3153F1600A25D15FEA24A5A4A5A140F007FB5 5A5DB65A6C91C7FC14FC222E7FAD27>I<007FB61280B712C0A37E3907E0000FA6ED0780 92C7FCA4EC07804A7EA390B5FCA5EBE00FA36E5A91C8FCA4ED03C0ED07E0A7007FB6FCB7 FCA36C15C0232E7FAD27>I<007FB61280B712C0A37E3907E0000FA6ED078092C7FCA4EC 07804A7EA390B5FCA5EBE00FA36E5A91C8FCAC387FFF80B57EA36C5B222E7EAD27>I<3A 7FFE07FFE0B54813F0A36C486C13E03A07E0007E00AF90B512FEA59038E0007EB03A7FFE 07FFE0B54813F0A36C486C13E0242E7FAD27>72 D<007FB512E0B612F0A36C14E039001F 8000B3B2007FB512E0B612F0A36C14E01C2E7BAD27>I<3A7FFC07FF8016C0486C5A6C48 7E16803A07C001F80014035D4A5A4A5A141F5D4AC7FC147E14FE5CEBC1F8EBC3F013C75C EBCFF0EBDFF813FF8013FEEBFC7E143EEBF83F497E01E07F140F01C07F1407811403816E 7EA26E7E157C157E3A7FFC01FFC016E0486C5A6C487E16C0232E7FAD27>75 D<387FFFC080B5FC7E5CD803F0C8FCB3AAED0780ED0FC0A7007FB6FCA2B7FC7E1680222E 7FAD27>II<3A7FF003FFE0486C48 13F0A213FC007F6D13E000079038003E0013DEA313CFA3148013C714C0A213C314E0A213 C114F0A3EBC0F8A31478147CA2143C143EA2141E141F140FA3EC07BEA3EC03FEEA7FFCEA FFFE1401A26C486C5A242E7FAD27>II<007FB5FCB612E081816C8039 07E003FEEC00FF81ED3F80151F16C0150FA6151F1680153FED7F005DEC03FE90B55A5D5D 5D92C7FC01E0C8FCADEA7FFEB5FCA36C5A222E7FAD27>I<387FFFF0B512FE6E7E816C80 3907E01FF014076E7E1401811400A514015D14034A5A141F90B55A5D5DA281EBE01F6E7E 14076E7EA816F0EDF1F8A4397FFE01FBB5EBFFF08016E06C48EB7FC0C8EA1F00252F7FAD 27>82 D<90387FC0E03901FFF1F0000713FF5A5AEA3FE0EB801F387F000F007E130712FE 5A1403A3EC01E06C90C7FC127E127FEA3FC013F86CB47E6C13F86C13FE6CEBFF80C614C0 010F13E0010013F0140FEC07F81403140115FC1400127812FCA46CEB01F8A26C13039038 8007F09038F01FE090B5FC15C0150000F85B38701FF81E307CAE27>I<007FB61280B712 C0A439FC03F00FA60078EC0780000091C7FCB3AB90B512C04880A36C5C222E7EAD27>I< 3A7FFE01FFF8B54813FCA36C486C13F83A07E0001F80B3AB6D133F00031500A26D5B0001 147E6D13FE6C6C485A90387F87F814FF6D5B010F13C06D5BD901FEC7FC262F80AD27>I< D87FE0EB7FE0486CEBFFF0A36C48EB7FE0001FC7EA0F80A76C6CEB1F00A614F0EB81F839 07C3FC3EA4149CEBC79EA30003143CA301E7137CEBEF9FA2140FA200011478A49038FE07 F8A300005CA2EBFC0390387801E0242F7FAD27>87 D<393FFC1FFE387FFE3F815D383FFC 1F3903F00FE001F85B1201EBFC1F00005CEBFE3F017E90C7FCEB7F7FEB3F7E14FE6D5AA2 6D5AA26D5AA21303130780130F80131F80EB3F7E147F497E017E7F141F01FC7F140FD801 F87F14071203496C7E120701E07F3A7FFC0FFF8000FF15C06D5A497E007F1580222E7EAD 27>I<007FB512F8B612FCA46C14F81E067C7E27>95 D<3803FFC0000F13F04813FC4813 FF811380EC1FC0381F000F000480C71207A2EB0FFF137F0003B5FC120F5A383FFC07EA7F C0130012FE5AA46C130F007F131FEBC0FF6CB612806C15C07E000313F1C69038807F8022 207C9F27>97 DIIIII<153F90391FC0FF80D97FF313C048B612E05A 4814EF390FF07F873A1FC01FC3C0EDC000EB800F48486C7EA66C6C485AEBC01FA2390FF0 7F8090B5C7FC5C485BEB7FF0EB1FC090C9FCA27F6CB5FC15E015F84814FE4880EB800100 7EC7EA3F80007C140F00FC15C0481407A46C140F007C1580007F143F6C6CEB7F009038F8 07FF6CB55A000714F86C5CC614C0D90FFCC7FC23337EA027>II<130F497E497EA46D5A6DC7FC90C8FCA7383FFF 80487FA37EEA000FB3A4007FB512F0B6FC15F815F07E1D2F7BAE27>I107 D<387FFF80B57EA37EEA00 0FB3B2007FB512F8B612FCA36C14F81E2E7CAD27>I<397F07C01F3AFF9FF07FC09039FF F9FFE091B57E7E3A0FFC7FF1F89038F03FC001E0138001C01300A3EB803EB03A7FF0FFC3 FF486C01E3138001F913E701F813E36C4801C313002920819F27>I<387FE07F39FFF1FF C001F713F090B5FC6C80000313C1EC01FCEBFE005B5BA25BB03A7FFF83FFE0B500C713F0 A36C018313E024207F9F27>II<387FE0FFD8FFF313C090B512F0816C800003EB81FE49C67E49EB3F8049131F16C049 130FA216E01507A6150F16C07F151F6DEB3F80157F6DEBFF009038FF83FEECFFFC5D5D01 F313C0D9F0FEC7FC91C8FCAC387FFF80B57EA36C5B23317F9F27>I<397FFC03FC39FFFE 0FFF023F13804A13C0007F90B5FC39007FFE1F14F89138F00F809138E002004AC7FC5CA2 91C8FCA2137EAD007FB57EB67EA36C5C22207E9F27>114 D<9038FFF3800007EBFFC012 1F5A5AEB803F38FC000F5AA2EC07806C90C7FCEA7F8013FC383FFFF06C13FC000713FF00 011480D8000F13C09038003FE014070078EB03F000FC1301A27E14036CEB07E0EBE01F90 B512C01580150000FB13FC38707FF01C207B9F27>I<133C137EA8007FB512F0B612F8A3 6C14F0D8007EC7FCAE1518157EA415FE6D13FC1483ECFFF86D13F06D13E0010313C00100 13001F297EA827>I<397FE01FF8486C487EA3007F131F00031300B21401A21403EBFC0F 6CB612E016F07EEB3FFE90390FF87FE024207F9F27>I<3A7FFE07FFE000FF15F06D5A49 7E007F15E03A0F80001F00A36D5B0007143EA414F0EBC1F83903E3FC7CA4EBE79EA20001 1478A301F713F8A2EBFF0F6C5CA3EBFE0790387C03E024207F9F27>119 D<393FFC1FFF486C5A168016006C487E3901F807E06C6C485A4A5A017E90C7FC6D5AEB1F 7E5C6D5A13076D5A5C80497E130F497E143EEB3E3FEB7E1F90387C0F8001F87F00016D7E 3803F0033A7FFE1FFF80A2B54813C06C486C1380A222207E9F27>I<3A7FFC0FFF80486C 4813C0A36C486C13803A07E000F800000313015D13F00001130301F85B1200A26D485A13 7CA290387E0F80133EA2011F90C7FC5CA2130F149E14BE130714FC1303A25C1301A25CA2 13035CA213075C1208EA3E0F007F5B131FD87E7FC8FCEA7FFE6C5A5B6C5AEA07C022317E 9F27>I<001FB512FE4814FFA490380001FEEC03FCEC07F8EC0FF0001EEB1FE0C7EA3FC0 EC7F80ECFF00495A495A495AEB1FE0495A495A49C7FC485A4848131E4848133F485A485A 485A485AB7FCA46C14FE20207E9F27>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj cmr9 9 63 /Fj 63 125 df<91393FE00FE0903A01FFF83FF8903A07E01EF83C903A1F800FF07E903A 3F001FE0FE017E133F4914C0485A1738484890381F8000ACB812C0A33B03F0001F8000B3 A7486C497EB50083B5FCA32F357FB42D>11 DII I<123C127EB4FCA21380A2127F123D1201A412031300A25A1206120E120C121C5A5A1260 09177AB315>39 D<14C01301EB0380EB0F00130E5B133C5B5BA2485A485AA212075B120F 90C7FC5AA2121E123EA3123C127CA55AB0127CA5123C123EA3121E121FA27E7F12077F12 03A26C7E6C7EA213787F131C7F130FEB0380EB01C01300124A79B71E>I<12C07E127012 3C121C7E120F6C7E6C7EA26C7E6C7EA27F1378137C133C133EA2131E131FA37F1480A5EB 07C0B0EB0F80A514005BA3131E133EA2133C137C137813F85BA2485A485AA2485A48C7FC 120E5A123C12705A5A124A7CB71E>I<123C127EB4FCA21380A2127F123D1201A4120313 00A25A1206120E120C121C5A5A126009177A8715>44 DI<123C 127E12FFA4127E123C08087A8715>I48 D<13075B5B137FEA07FFB5FC13BFEAF83F1200B3B3A2497E007FB51280A3 19327AB126>IIII<000C14C0380FC00F90B5128015005C5C14F014C0D80C18 C7FC90C8FCA9EB0FC0EB7FF8EBF07C380FC03F9038001F80EC0FC0120E000CEB07E0A2C7 13F01403A215F8A41218127E12FEA315F0140712F8006014E01270EC0FC06C131F003C14 806CEB7F00380F80FE3807FFF8000113E038003F801D347CB126>I<14FE903807FF8001 1F13E090383F00F0017C13703901F801F8EBF003EA03E01207EA0FC0EC01F04848C7FCA2 48C8FCA35A127EEB07F0EB1FFC38FE381F9038700F809038E007C039FFC003E0018013F0 EC01F8130015FC1400A24814FEA5127EA4127F6C14FCA26C1301018013F8000F14F0EBC0 030007EB07E03903E00FC03901F81F806CB51200EB3FFCEB0FE01F347DB126>I<123012 3C003FB6FCA34814FEA215FC0070C7123800601430157015E04814C01401EC0380C7EA07 001406140E5C141814385CA25CA2495A1303A3495AA2130FA3131F91C7FCA25BA55BA913 1C20347CB126>III<123C127E12FFA4127E123C1200B0123C127E12FFA4127E123C08207A 9F15>I<15E0A34A7EA24A7EA34A7EA3EC0DFE140CA2EC187FA34A6C7EA202707FEC601F A202E07FECC00FA2D901807F1507A249486C7EA301066D7EA2010E80010FB5FCA2498001 18C77EA24981163FA2496E7EA3496E7EA20001821607487ED81FF04A7ED8FFFE49B512E0 A333367DB53A>65 D67 DIII73 D76 DII80 D82 D<90381FE00390387FFC0748B5FC3907F01FCF390F8003FF48C7FC003E80814880A20078 8000F880A46C80A27E92C7FC127F13C0EA3FF013FF6C13F06C13FF6C14C06C14F0C68001 3F7F01037F9038003FFF140302001380157F153FED1FC0150F12C0A21507A37EA26CEC0F 80A26C15006C5C6C143E6C147E01C05B39F1FC03F800E0B512E0011F138026C003FEC7FC 22377CB42B>I<007FB712FEA390398007F001D87C00EC003E0078161E0070160EA20060 160600E01607A3481603A6C71500B3AB4A7E011FB512FCA330337DB237>II87 D97 DII<153FEC0FFFA3EC007F81AEEB07F0EB3FFCEBFC0F3901F003BF39 07E001FF48487E48487F8148C7FCA25A127E12FEAA127E127FA27E6C6C5BA26C6C5B6C6C 4813803A03F007BFFC3900F81E3FEB3FFCD90FE0130026357DB32B>III<151F90391FC07F809039FFF8E3C03901F07FC73907E03F033A0FC01F8380 9039800F8000001F80EB00074880A66C5CEB800F000F5CEBC01F6C6C48C7FCEBF07C380E FFF8380C1FC0001CC9FCA3121EA2121F380FFFFEECFFC06C14F06C14FC4880381F000100 3EEB007F4880ED1F8048140FA56C141F007C15006C143E6C5C390FC001F83903F007E0C6 B51280D91FFCC7FC22337EA126>IIIIII<2703F01FE013FF00FF90267FF80313C0903BF1E07C0F03E0 903BF3803E1C01F02807F7003F387FD803FE1470496D486C7EA2495CA2495CB3486C496C 487EB53BC7FFFE3FFFF0A33C217EA041>I<3903F01FC000FFEB7FF09038F1E0FC9038F3 807C3907F7007EEA03FE497FA25BA25BB3486CEB7F80B538C7FFFCA326217EA02B>II<3903F03F8000FFEBFFE09038 F3C0F89038F7007ED807FE7F6C48EB1F804914C049130F16E0ED07F0A3ED03F8A9150716 F0A216E0150F16C06D131F6DEB3F80160001FF13FC9038F381F89038F1FFE0D9F07FC7FC 91C8FCAA487EB512C0A325307EA02B>I<903807F00390383FFC07EBFC0F3901F8038F38 07E001000F14DF48486CB4FC497F123F90C77E5AA25A5AA9127FA36C6C5B121F6D5B000F 5B3907E003BF3903F0073F3800F81EEB3FF8EB0FE090C7FCAAED7F8091380FFFFCA32630 7DA029>I<3803E07C38FFE1FF9038E38F809038E71FC0EA07EEEA03ECA29038FC0F8049 C7FCA35BB2487EB512E0A31A217FA01E>II<1330A51370A313F0A21201A212031207381FFFFEB5FCA23803F000AF1403 A814073801F806A23800FC0EEB7E1CEB1FF8EB07E0182F7FAD1E>IIIII<3A7FFF807FF8A33A07F8001FC00003EC0F800001EC070015066C6C5BA26D131C017E 1318A26D5BA2EC8070011F1360ECC0E0010F5BA2903807E180A214F3010390C7FC14FBEB 01FEA26D5AA31478A21430A25CA214E05CA2495A1278D8FC03C8FCA21306130EEA701CEA 7838EA1FF0EA0FC025307F9F29>I<003FB512F0A2EB000F003C14E00038EB1FC00030EB 3F800070137F1500006013FE495A13035CC6485A495AA2495A495A49C7FC153013FE485A 12035B48481370485A001F14604913E0485A387F000348130F90B5FCA21C207E9F22>I< BC12F0A24C0280944D>124 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fk cmsy7 7 3 /Fk 3 113 df0 D<1338A50060130C00F8133E00FC137E00FE13 FE383FBBF83807FFC000011300EA007C48B4FC000713C0383FBBF838FE38FE00FC137E00 F8133E0060130C00001300A517197B9A22>3 D<186018E0170118C0170318801707EF0F 00170E171E171C173C17381778177017F05F16014C5A5F160794C7FC5E160E161E161C16 3C1638486C147800075DD81FC05C003F1401D8F7E05C00C31403D803F05C000114076D91 C8FC00005C6D130E017C131E017E5B013E1338013F13786D1370EC80F0010F5B14C10107 5B14E301035B14F76DB4C9FC5C13005C147C14781438333A7B8237>112 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmmi7 7 13 /Fl 13 116 df<48B61280000715C0481580481500263C0C06C7FC127012C0EB1C0EEA00 18A21338A2EB701EA313F013E01201141F120313C0000780A2380F800FA26C486CC7FC22 1A7D9827>25 D61 D97 DII<15F8141FA2EC01F0A21403 A215E0A21407A215C0A2140FEB1F8F90387FCF80EBF0EF3803C03FEA0780390F001F00A2 001E5B123E003C133E127C147E5A147CA214FC5AECF830A3903801F060A2EA7803010E13 C0393C1CF980381FF07F3907C01E001D297CA723>III<130E131F5BA2133E131C90C7FCA7EA03E0487EEA0C78EA 187C1230A212605B12C0A2EA01F0A3485AA2485AA2EBC180EA0F81A2381F0300A213066C 5A131CEA07F06C5A11287DA617>105 D<1407EC0F80141FA21500140E91C7FCA7EB03E0 EB07F8EB0C3C1318EB303E136013C0A248485AA2C7FCA25CA4495AA4495AA4495AA4495A A21238D87C1FC7FC12FC133E485AEA70F8EA7FE0EA1F80193380A61B>I<133EEA07FEA2 EA007CA213FCA25BA21201A25BA21203EC07809038E01FC0EC38600007EB61E014C3EBC1 87EBC307D80FC613C09038CC038001B8C7FC13E0487E13FEEB3F80EB0FC0486C7E130300 3E1460A2127EECC0C0127CECC18012FC903801E30038F800FE0070137C1B297CA723>I< 3907801FC0390FE07FF03918F0E0F83930F1807CEBFB00D860FE133C5B5B00C1147C5B12 01A248485BA34A5AEA07C01660EC03E0A23A0F8007C0C0A2EDC180913803C300D81F0013 C7EC01FE000EEB00F8231B7D9929>110 D115 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fm cmmi10 10.95 22 /Fm 22 121 df<0120ED01C00178ED07F001F8150F000117F85B485A5B00071607491503 48C9EA01F0A2121E1700121C003C023814E0003814FCA200781601140100704A14C0A217 034B148000F0130317074B14005F5D0207141E6F133E6C010F5C4A7E6C013F5C007E9038 FFF8033B7F87FDFF0FF0D9FFF8EBFFE06C495C4A6C5B6C496C90C7FC00079038001FFCD8 01F8EB03F035297EA739>33 D<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919> 58 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A312011380120313 005A120E5A1218123812300B1C798919>I<183818FC1703EF0FF8EF3FE0EFFF80933803 FE00EE0FF8EE3FE0EEFF80DB03FEC7FCED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0 ECFF80D903FEC9FCEB0FF8EB3FE0EBFF80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2 EA7F80EA3FE0EA0FF8EA03FEC66C7EEB3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC 03FE913800FF80ED3FE0ED0FF8ED03FE923800FF80EE3FE0EE0FF8EE03FE933800FF80EF 3FE0EF0FF8EF03FC17001838363678B147>II<49B9FCA3D9000190C7120718004B 157F193F191E14035DA314075D191CA2140F5D17074D133C021F020E13384B1500A2171E 023F141C4B133C177C17FC027FEB03F892B5FCA39139FF8003F0ED00011600A2495D5CA2 160101035D5CA293C9FC13075CA3130F5CA3131F5CA2133FA25C497EB612F8A3403E7DBD 3A>70 D<49B612C05BA2D90001EB800093C7FC5DA314035DA314075DA3140F5DA3141F5D A3143F5DA3147F5DA314FF92C8FCA35B5CA313035CA313075CA3130F5CA3131F5CA2133F A25CEBFFE0B612E0A32A3E7DBD28>73 D<49B56C49B512F81BF0A290C76D9039000FFE00 4AEE03F0705D735A03DF150302037F038F5E82190791380787FC030793C7FC1503705C14 0F91260E01FF140EA26F151E021E80021C017F141C83193C023C6D7E02381638161F7113 78147802706D6C1370A2040714F002F0804A01035C8318010101EC01FF4A5E8218831303 4A91387FC380A2EF3FC7010716E791C8001F90C8FC18F718FF4981010E5E1707A2131E01 1C6F5AA2013C1501137C01FE6F5AEA03FFB512FC187818704D3E7DBD49>78 DI<48B912FCA25A913A0003FE00 0F01F84A1301D807E0EE00F8491307491778000F5D90C7FC001E140FA2001C4B1470123C 0038141FA200785D1270033F15F000F018E0485DC81600157FA25EA215FFA293C9FCA25C A25DA21403A25DA21407A25DA2140FA25DA2141FA25DA2143FA25DA2147FA214FF497F00 1FB612FCA25E3E3D7FBC35>84 D<027FB5D88007B512C091B6FCA2020101F8C7EBF80091 26007FE0EC7F804C92C7FC033F157C701478616F6C495A4E5A6F6C495A4EC8FC180E6F6C 5B606F6C5B6017016F6C485A4D5A6F018FC9FC179E17BCEE7FF85F705AA3707EA283163F 167FEEF7FCED01E7EEC3FEED0383ED070392380E01FF151E4B6C7F5D5D4A486D7E4A5A4A 486D7E92C7FC140E4A6E7E5C4A6E7E14F0495A49486E7E1307D91F806E7ED97FC0140726 03FFE0EC1FFF007F01FC49B512FEB55CA24A3E7EBD4B>88 DI100 DI<163EEEFFC09238 03E1E0923807C0F0ED0F811687ED1F8F160F153FA217E092387E038093C7FCA45DA51401 5DA30103B512FCA390260003F0C7FCA314075DA4140F5DA5141F5DA4143F92C8FCA45C14 7EA414FE5CA413015CA4495AA35CEA1E07127F5C12FF495AA200FE90C9FCEAF81EEA703E EA7878EA1FF0EA07C02C537CBF2D>I<143C14FEA21301A314FCEB00701400AD137E3801 FF803803C7C0EA0703000F13E0120E121C13071238A2EA780F007013C0A2EAF01F148012 00133F14005B137EA213FE5BA212015B0003130E13F0A20007131EEBE01CA2143CEBC038 1478147014E013C13803E3C03801FF00EA007C173E7EBC1F>105 DI I<01F8EB0FF0D803FEEB3FFC3A078F80F03E3A0F0F83C01F3B0E07C7800F80001CEBCF00 02FE80003C5B00385B495A127800705BA200F049131F011F5D00005BA2163F013F92C7FC 91C7FC5E167E5B017E14FE5EA201FE0101EB03804914F8A203031307000103F013005B17 0E16E000035E49153C17385F0007913801F1E0496DB45AD801C0023FC7FC31297EA737> 110 D114 DI120 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fn cmb10 10.95 11 /Fn 11 117 df51 D58 D73 D97 D99 D<01FFD97FE0EB3FF0B52601FFF8EBFFFC0207D9FC037F4A6D487F91281FC3FF0FE1 7FDA3E03D99F017F0007017C14BE6CD97801EBBC0002F002F88002E05CA202C05CA30280 5CB3A4B5D8FE1FD9FF0FEBFF80A549297EA84C>109 D<01FFEB7FE0B53801FFF802077F 4A7F91381FC3FFDA3E0313800007137C6CEB780102F014C014E0A214C0A31480B3A4B5D8 FE1F13FFA530297EA833>I<49B47E010F13F0013F13FC90B6FC48018113803A03FE007F C04848EB3FE0000F15F049131F001F15F8A24848EB0FFCA2007F15FEA400FF15FFAB007F 15FEA3003F15FC6D131F001F15F8A26C6CEB3FF0000715E06C6CEB7FC03A01FF81FF806C 90B51200013F13FC010F13F001011380282B7EA92D>I<9038FF03FEB5381FFFC0027F13 F091B57E9138FE1FFE9138F007FF0007497E6C01C014804A6C13C017E081A217F0A2167F 17F8ACEEFFF0A317E05D17C0A26E4813806E4813006E485A9138FC1FFC91B55A16E0029F 1380DA87FCC7FC0280C8FCACB512FEA52D3B7EA833>I<3901FE07F800FFEB0FFE91383F FF804A13C0EC7C7F9138F8FFE03807FFF06C5B5CA2ED7FC09138803F80ED1F0092C7FCA2 91C8FCB3A3B6FCA523297FA827>114 D<131FA65BA55BA25BA25A5A5A001FEBFFC0B6FC A4000790C7FCB3EC03E0A97EEC87C0A26CEBCF806C13FF6D1300EB1FFEEB07F81B3B7EB9 23>116 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fo cmr7 7 10 /Fo 10 62 df<1306130C13181330136013E0EA01C0EA0380A2EA07005A120E121EA212 1C123CA35AA512F85AAB7E1278A57EA3121C121EA2120E120F7EEA0380A2EA01C0EA00E0 136013301318130C13060F3B7AAB1A>40 D<12C012607E7E7E120E7EEA0380A2EA01C013 E0120013F0A213701378A3133CA5133E131EAB133E133CA51378A3137013F0A213E01201 13C0EA0380A2EA0700120E120C5A5A5A5A0F3B7DAB1A>I<140EB3A2B812E0A3C7000EC8 FCB3A22B2B7DA333>43 D48 D<13381378EA01F8121F12FE12E01200B3AB48 7EB512F8A215267BA521>I<13FF000313E0380E03F0381800F848137C48137E00787F12 FC6CEB1F80A4127CC7FC15005C143E147E147C5C495A495A5C495A010EC7FC5B5B903870 018013E0EA0180390300030012065A001FB5FC5A485BB5FCA219267DA521>I<13FF0003 13E0380F01F8381C007C0030137E003C133E007E133FA4123CC7123E147E147C5C495AEB 07E03801FF8091C7FC380001E06D7E147C80143F801580A21238127C12FEA21500485B00 78133E00705B6C5B381F01F03807FFC0C690C7FC19277DA521>I<1438A2147814F81301 A2130313071306130C131C131813301370136013C012011380EA03005A120E120C121C5A 12305A12E0B612E0A2C7EAF800A7497E90383FFFE0A21B277EA621>I54 D61 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fp cmtt10 10.95 87 /Fp 87 127 df<121C127FEAFF80B3EA7F00B2123EC7FCA8121C127FA2EAFF80A3EA7F00 A2121C09396DB830>33 D<00101304007C131F00FEEB3F80A26C137FA248133FB2007E14 00007C7F003C131E00101304191C75B830>I<903907C007C0A2496C487EA8011F131FA2 02C05BA3007FB7FCA2B81280A36C16006C5D3A007F807F80A2020090C7FCA9495BA2003F 90B512FE4881B81280A36C1600A22701FC01FCC7FCA300031303A201F85BA76C486C5AA2 29387DB730>I37 DII<141E147F14FF5BEB03FEEB07FCEB0FF0EB1FE0EB3FC0EB7F80EBFF00485A5B 12035B485A120F5BA2485AA2123F5BA2127F90C7FCA412FEAD127FA47F123FA27F121FA2 6C7EA27F12076C7E7F12017F6C7EEB7F80EB3FC0EB1FE0EB0FF0EB07FCEB03FEEB01FF7F 147F141E184771BE30>I<127812FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7EEB7F8013 3F14C0131FEB0FE014F01307A2EB03F8A214FC1301A214FE1300A4147FAD14FEA4130114 FCA2130314F8A2EB07F0A2130F14E0EB1FC0133F1480137FEBFF00485A485A485A485AEA 3FE0485A485A90C7FC5A1278184778BE30>I<14E0497E497EA60038EC0380007EEC0FC0 D8FF83EB3FE001C3137F9038F3F9FF267FFBFB13C06CB61280000FECFE00000314F86C5C 6C6C13C0011F90C7FC017F13C048B512F04880000F14FE003FECFF80267FFBFB13C026FF F3F913E09038C3F87F0183133FD87E03EB0FC00038EC0380000091C7FCA66D5A6D5A2327 7AAE30>I<143EA2147FAF007FB7FCA2B81280A36C1600A2C76CC8FCAF143EA229297DAF 30>II<007FB612F0A2B712 F8A36C15F0A225077B9E30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00 0C0C6E8B30>I<16F01501ED03F8A21507A2ED0FF0A2ED1FE0A2ED3FC0A2ED7F80A2EDFF 00A24A5AA25D1403A24A5AA24A5AA24A5AA24A5AA24A5AA24AC7FCA2495AA25C1303A249 5AA2495AA2495AA2495AA2495AA249C8FCA2485AA25B1203A2485AA2485AA2485AA2485A A2485AA248C9FCA25AA2127CA225477BBE30>I<14FE903807FFC0497F013F13F8497F90 B57E48EB83FF4848C6138049137F4848EB3FC04848EB1FE049130F001F15F0491307A248 48EB03F8A290C712014815FCA400FEEC00FEAD6C14016C15FCA36D1303003F15F8A26D13 07001F15F0A26D130F6C6CEB1FE0A26C6CEB3FC06C6CEB7F806D13FF2601FF8313006CEB FFFE6D5B6D5B010F13E06D5BD900FEC7FC273A7CB830>IIIII<000FB612804815C05AA316800180C8FCAEEB83FF019F13C090B512 F015FC8181D9FE0313809039F0007FC049133F0180EB1FE06CC7120F000E15F0C81207A2 16F81503A31218127EA2B4FC150716F048140F6C15E06C141F6DEB3FC06D137F3A3FE001 FF80261FFC0F13006CB55A6C5C6C5C6C14E06C6C1380D90FFCC7FC25397BB730>II<127CB712FC16FEA416FC48C7EA0FF816F0ED1FE0007CEC3FC0C8EA7F80EDFF00A24A 5A4A5A5D14075D140F5D4A5AA24A5AA24AC7FCA25C5C13015CA213035CA213075CA4495A A6131F5CA96D5A6DC8FC273A7CB830>I<49B4FC011F13F0017F13FC90B57E0003ECFF80 4815C048010113E03A1FF8003FF049131FD83FC0EB07F8A24848EB03FC90C71201A56D13 03003F15F86D13076C6CEB0FF06C6CEB1FE0D807FCEB7FC03A03FF83FF806C90B512006C 6C13FC011F13F0497F90B512FE48802607FE0013C0D80FF8EB3FE0D81FE0EB0FF04848EB 07F8491303007F15FC90C712014815FE481400A66C14016C15FC6D1303003F15F86D1307 D81FF0EB1FF06D133F3A0FFF01FFE06C90B512C06C1580C6ECFE006D5B011F13F0010190 C7FC273A7CB830>I<49B4FC010F13E0013F13F890B57E4880488048010113803A0FFC00 7FC0D81FF0EB3FE04848131F49EB0FF048481307A290C7EA03F85A4815FC1501A416FEA3 7E7E6D1303A26C6C13076C6C130F6D133FD80FFC13FF6CB6FC7E6C14FE6C14F9013FEBE1 FC010F138190380060011400ED03F8A2150716F0150F000F15E0486C131F486CEB3FC015 7FEDFF804A1300EC07FE391FF01FFC90B55A6C5C6C5C6C1480C649C7FCEB3FF0273A7CB8 30>I<120FEA3FC0EA7FE0A2EAFFF0A4EA7FE0A2EA3FC0EA0F00C7FCAF120FEA3FC0EA7F E0A2EAFFF0A4EA7FE0A2EA3FC0EA0F000C276EA630>I I<16F01503ED07F8151F157FEDFFF014034A13C0021F138091383FFE00ECFFF8495B0107 13C0495BD93FFEC7FC495A3801FFF0485B000F13804890C8FCEA7FFC5BEAFFE05B7FEA7F F87FEA1FFF6C7F000313E06C7F38007FFC6D7E90380FFF806D7F010113F06D7FEC3FFE91 381FFF80020713C06E13F01400ED7FF8151F1507ED03F01500252F7BB230>I<007FB7FC A2B81280A36C16006C5DCBFCA7003FB612FE4881B81280A36C1600A229157DA530>I<12 78127EB4FC13C07FEA7FF813FEEA1FFF6C13C000037F6C13F86C6C7EEB1FFF6D7F010313 E06D7F9038007FFC6E7E91380FFF806E13C0020113F080ED3FF8151F153FEDFFF05C0207 13C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC48485A4813E0 000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E1278252F7BB230>I64 D<147F4A7EA2497FA4497F 14F7A401077F14E3A3010F7FA314C1A2011F7FA490383F80FEA590387F007FA449804913 3F90B6FCA34881A39038FC001F00038149130FA4000781491307A2D87FFFEB7FFFB56CB5 1280A46C496C130029397DB830>I<007FB512F0B612FE6F7E82826C813A03F8001FF815 076F7E1501A26F7EA615015EA24B5A1507ED1FF0ED7FE090B65A5E4BC7FC6F7E16E08290 39F8000FF8ED03FC6F7E1500167FA3EE3F80A6167F1700A25E4B5A1503ED1FFC007FB6FC B75A5E16C05E6C02FCC7FC29387EB730>I<91387F803C903903FFF03E49EBFC7E011F13 FE49EBFFFE5B9038FFE07F48EB801F3903FE000F484813075B48481303A2484813015B12 3F491300A2127F90C8FC167C16005A5AAC7E7EA2167C6D14FE123FA27F121F6D13016C6C 14FCA26C6CEB03F86D13076C6CEB0FF03901FF801F6C9038E07FE06DB512C06D14806D14 00010713FC6D13F09038007FC0273A7CB830>I<003FB512E04814FCB67E6F7E6C816C81 3A03F8007FF0ED1FF8150F6F7E6F7E15016F7EA2EE7F80A2163F17C0161FA4EE0FE0AC16 1F17C0A3163F1780A2167F17005E4B5A15034B5A150F4B5AED7FF0003FB65A485DB75A93 C7FC6C14FC6C14E02B387FB730>I<007FB7FCB81280A47ED803F8C7123FA8EE1F0093C7 FCA4157C15FEA490B5FCA6EBF800A4157C92C8FCA5EE07C0EE0FE0A9007FB7FCB8FCA46C 16C02B387EB730>I<003FB712804816C0B8FCA27E7ED801FCC7121FA8EE0F8093C7FCA5 153E157FA490B6FCA69038FC007FA4153E92C8FCAE383FFFF8487FB5FCA27E6C5B2A387E B730>I<02FF13F00103EBC0F8010F13F1013F13FD4913FF90B6FC4813C1EC007F484813 3F4848131F49130F485A491307121F5B123F491303A2127F90C7FC6F5A92C8FC5A5AA892 B5FC4A14805CA26C7F6C6D1400ED03F8A27F003F1407A27F121F6D130F120F7F6C6C131F A2D803FE133F6C6C137FECC1FF6C90B5FC7F6D13FB010F13F30103EBC1F0010090C8FC29 3A7DB830>I<3B3FFF800FFFE0486D4813F0B56C4813F8A26C496C13F06C496C13E0D803 F8C7EAFE00B290B6FCA601F8C7FCB3A23B3FFF800FFFE0486D4813F0B56C4813F8A26C49 6C13F06C496C13E02D387FB730>I<007FB6FCB71280A46C1500260007F0C7FCB3B3A800 7FB6FCB71280A46C1500213879B730>I<49B512F04914F85BA27F6D14F090C7EAFE00B3 B3123C127EB4FCA24A5A1403EB8007397FF01FF86CB55A5D6C5C00075C000149C7FC3800 3FF025397AB730>II<383FFFF8487FB57EA26C5B6C5BD801FCC9FCB3B0EE0F80 EE1FC0A9003FB7FC5AB8FCA27E6C16802A387EB730>III<90383FFFE048B512FC0007 14FF4815804815C04815E0EBF80001E0133FD87F80EB0FF0A290C71207A44815F8481403 B3A96C1407A26C15F0A36D130FA26D131F6C6CEB3FE001F813FF90B6FC6C15C06C15806C 1500000114FCD8003F13E0253A7BB830>I<007FB512F0B612FE6F7E16E0826C813903F8 003FED0FFCED03FE15016F7EA2821780163FA6167F17005EA24B5A1503ED0FFCED3FF890 B6FC5E5E16804BC7FC15F001F8C9FCB0387FFFC0B57EA46C5B29387EB730>I<003FB57E 4814F0B612FC15FF6C816C812603F8017F9138003FF0151F6F7E15071503821501A51503 5E1507150F4B5A153F4AB45A90B65A5E93C7FC5D8182D9F8007FED3FE0151F150F821507 A817F8EEF1FCA53A3FFF8003FB4801C0EBFFF8B56C7E17F06C496C13E06C49EB7FC0C9EA 1F002E397FB730>82 D<90390FF803C0D97FFF13E048B512C74814F74814FF5A381FF80F 383FE001497E4848137F90C7123F5A48141FA2150FA37EED07C06C91C7FC7F7FEA3FF0EA 1FFEEBFFF06C13FF6C14E0000114F86C80011F13FF01031480D9003F13C014019138007F E0151FED0FF0A2ED07F8A2007C140312FEA56C140716F07F6DEB0FE06D131F01F8EB3FC0 01FF13FF91B51280160000FD5CD8FC7F13F8D8F81F5BD878011380253A7BB830>I<003F B712C04816E0B8FCA43AFE003F800FA8007CED07C0C791C7FCB3B1011FB5FC4980A46D91 C7FC2B387EB730>I<3B7FFFC007FFFCB56C4813FEA46C496C13FCD803F8C7EA3F80B3B1 6D147F00011600A36C6C14FE6D13016D5CEC800390393FE00FF890391FF83FF06DB55A6D 5C6D5C6D91C7FC9038007FFCEC1FF02F3980B730>I87 D<3A3FFF01FFF84801837F02C77FA202835B6C0101 5B3A01FC007F806D91C7FC00005C6D5BEB7F01EC81FCEB3F8314C3011F5B14E7010F5B14 FF6D5BA26D5BA26D5BA26D90C8FCA4497FA2497FA2815B81EB0FE781EB1FC381EB3F8181 EB7F0081497F49800001143F49800003141F49800007140FD87FFEEB7FFFB590B5128080 A25C6C486D130029387DB730>II<007FB5FCB61280A4150048C8FCB3B3B3A5B6FC 1580A46C140019476DBE30>91 D<127CA212FEA27EA26C7EA26C7EA26C7EA26C7EA26C7E A26C7EA212017FA26C7EA26D7EA26D7EA26D7EA26D7EA26D7EA26D7EA2130180A26D7EA2 6E7EA26E7EA26E7EA26E7EA26E7EA26E7EA2140181A26E7EA2ED7F80A2ED3FC0A2ED1FE0 A2ED0FF0A2ED07F8A21503A2ED01F0150025477BBE30>I<007FB5FCB61280A47EC7123F B3B3B3A5007FB5FCB6FCA46C140019477DBE30>I<007FB612F0A2B712F8A36C15F0A225 077B7D30>95 D97 DII<913801FFE04A7F5CA28080EC0007AAEB03FE90381FFF874913E7 90B6FC5A5A481303380FFC00D81FF0133F49131F485A150F4848130790C7FCA25AA25AA8 7E6C140FA27F003F141F6D133F6C7E6D137F390FF801FF2607FE07EBFFC06CB712E06C16 F06C14F76D01C713E0011F010313C0D907FCC8FC2C397DB730>I<49B4FC010713E0011F 13F8017F7F90B57E488048018113803A07FC007FC04848133FD81FE0EB1FE0150F484814 F0491307127F90C7FCED03F85A5AB7FCA516F048C9FC7E7EA27F003FEC01F06DEB03F86C 7E6C7E6D1307D807FEEB1FF03A03FFC07FE06C90B5FC6C15C0013F14806DEBFE00010713 F8010013C0252A7CA830>IIII<14E0EB03F8A2497EA36D5AA2EB00E091C8FC A9381FFFF8487F5AA27E7EEA0001B3A9003FB612C04815E0B7FCA27E6C15C023397AB830 >III<387FFFF8B57EA47EEA0001B3 B3A8007FB612F0B712F8A46C15F025387BB730>I<02FC137E3B7FC3FF01FF80D8FFEF01 877F90B500CF7F15DF92B57E6C010F13872607FE07EB03F801FC13FE9039F803FC01A201 F013F8A301E013F0B3A23C7FFE0FFF07FF80B548018F13C0A46C486C01071380322881A7 30>II<49B4FC010F13E0013F13F8497F90B57E0003 ECFF8014013A07FC007FC04848EB3FE0D81FE0EB0FF0A24848EB07F8491303007F15FC90 C71201A300FEEC00FEA86C14016C15FCA26D1303003F15F86D13076D130F6C6CEB1FF06C 6CEB3FE06D137F3A07FF01FFC06C90B512806C15006C6C13FC6D5B010F13E0010190C7FC 272A7CA830>II<49B413F8 010FEBC1FC013F13F14913FD48B6FC5A481381390FFC007F49131F4848130F491307485A 491303127F90C7FC15015A5AA77E7E15037FA26C6C1307150F6C6C131F6C6C133F01FC13 7F3907FF01FF6C90B5FC6C14FD6C14F9013F13F1010F13C1903803FE0190C7FCAD92B512 F84A14FCA46E14F82E3C7DA730>II<90381FFC1E48B5129F000714FF5A5A 5A387FF007EB800100FEC7FC4880A46C143E007F91C7FC13E06CB4FC6C13FC6CEBFF806C 14E0000114F86C6C7F01037F9038000FFF02001380007C147F00FEEC1FC0A2150F7EA27F 151F6DEB3F806D137F9039FC03FF0090B6FC5D5D00FC14F0D8F83F13C026780FFEC7FC22 2A79A830>III<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C 496C13803B01F80003F000A26D130700005DA26D130F017E5CA2017F131F6D5CA2EC803F 011F91C7FCA26E5A010F137EA2ECE0FE01075BA214F101035BA3903801FBF0A314FF6D5B A36E5A6E5A2B277EA630>I<3B3FFFC01FFFE0486D4813F0B515F8A26C16F06C496C13E0 D807E0C7EA3F00A26D5C0003157EA56D14FE00015DEC0F80EC1FC0EC3FE0A33A00FC7FF1 F8A2147DA2ECFDF9017C5C14F8A3017E13FBA290393FF07FE0A3ECE03FA2011F5C90390F 800F802D277FA630>I<3A3FFF81FFFC4801C37FB580A26C5D6C01815BC648C66CC7FC13 7FEC80FE90383F81FC90381FC3F8EB0FE3ECE7F06DB45A6D5B7F6D5B92C8FC147E147F5C 497F81903803F7E0EB07E790380FE3F0ECC1F890381F81FC90383F80FE90387F007E017E 137F01FE6D7E48486D7E267FFF80B5FCB500C1148014E3A214C16C0180140029277DA630 >I<3B3FFFC07FFF80486DB512C0B515E0A26C16C06C496C13803B01FC0003F000A20000 14076D5C137E150F017F5C7F151FD91F805BA214C0010F49C7FCA214E00107137EA2EB03 F0157C15FCEB01F85DA2EB00F9ECFDF0147D147FA26E5AA36E5AA35DA2143F92C8FCA25C 147EA2000F13FE486C5AEA3FC1EBC3F81387EB8FF0EBFFE06C5B5C6C90C9FC6C5AEA01F0 2B3C7EA630>I<001FB612FC4815FE5AA316FC90C7EA0FF8ED1FF0ED3FE0ED7FC0EDFF80 003E491300C7485A4A5A4A5A4A5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A 4948133E4890C7127F485A485A485A485A485A48B7FCB8FCA46C15FE28277DA630>II<127CA212FEB3B3B3AD127CA207476CBE30>I< EA7FE0EAFFFE6D7E8014F07EC66C7E13076D7E1301B3A2806D7E15E091387FFFE06E13F8 801407141F5C4A13E09138FFE00092C7FC495A5CB3A21303495A137F387FFFF0B5FC14C0 5C49C8FCEA7FE025477BBE30>I<017C133848B4137C48EB80FE4813C14813C348EBEFFC 397FEFFFF0D8FF8713E0010713C0486C1380D87C0113003838007C1F0C78B730>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fq cmsl10 10.95 45 /Fq 45 122 df<9339FFC003F8030F9038F01FFE923A3FC07C7E0F923BFE001FF81F80DA 03F890383FF07F4A48D9FFE013C0EC1FE04A4848EBC0FF03804A1380DA7F00157F4A9238 003E004A6D91C7FC8301015D4A5CA4160113034A5CA416030007B812FCA3290007F00003 F8C8FCA21607130F4A5CA4160F131F4A5CA4161F133F4A5CA4163F137F91C75BA4167F5B 4992C9FCA31201486C49487EB5D8F83F13FF5DA242407EBF35>11 D<1530157015E0EC03C0EC0780EC0F00141E5C147C5C5C495A1303495A5C130F49C7FCA2 133E137E137C13FC5B1201A2485AA25B1207A2485AA3485AA448C8FCA45A127EA512FE5A A95AA87EA2127CA5123C123EA2121EA2121F7EA26C7EA26C7EA26C7E120013707FA21318 1C5A74C323>40 D<497E806D7E1470147880A280A280A2EC0780A215C01403A215E0A3EC 01F0A615F8AF140315F0A5140715E0A4140F15C0A3141F1580A3EC3F00A2143E147EA214 7C14FC5C13015C13035C13075C495AA249C7FC131E133E5B13785B485A485A12075B000E C8FC5A5A12F05A1D5A7FC323>I44 D<007FB5FCA2B512FEA418067C961E>I<121EEA3F80EA7FC012FFA41380EA7F00123C0A 0A788919>I<157015F014011407143F903803FFE0137FEBFFCFEBF80F1300141F15C0A5 143F1580A5147F1500A55C5CA513015CA513035CA513075CA5130F5CA3131F497EB612F8 A31D3D78BC2D>49 D56 DI<17E016011603831607A2160FA2161F83163FA2167F 167716F7EEE7FCED01E316C3150316831507EE03FEED0F01150E151E151C153C03387FED 7800157015F05D4A4880177F4A5AA24AC7FCA2020E81173F5C021FB6FC5CA20270C7EA3F E0171F5CA2495AA2494881170F49C8FCA2130EA24982013C1507A2137CD801FE4B7E2607 FF80EC3FFEB500F00107B512FC19F85E3E417DC044>65 D67 D<013FB7FC18E018F8903B007FF0000FFE6E48EB01FF9438007F C04B6E7E180F85727E727E147F4B6E7EA2727EA302FF178092C9FCA54918C05CA41A8013 034A5DA41A0013074A5DA261A24E5A130F4A5E180F61181F61011F4C5A5C4E5A4EC7FC4D 5A4D5A013F4B5A4A4A5AEF3FE0EF7F80017F4A48C8FC01FFEC1FFCB812F0178004FCC9FC 423E7DBD45>I<013FB812E0A3903A007FF000016E48EB003F180F4B14071803A3180114 7F4B15C0A514FF92C71270A395C7FC17F0495D5C160116031607161F49B65AA39138FC00 3F160F160701075D4A1303A5010F4AC8FC5C93C9FCA4131F5CA5133F5CA3137FEBFFF0B6 12F8A33B3E7DBD3B>70 D<4BB46C1370031F01F013F0037F9038FC01E0913A03FF807E03 913A0FF8000F83DA1FE0EB07C7DA7F80EB01EF4AC812FFD903FE16C04948157F4948153F 495A4948151F495A4948168091C9120F5A485AA2485A000F18004982121FA248485EA295 C7FC485AA412FF5BA6043FB512E05BA29339001FFC00715AA2607F127FA2171F123F6D5E A2121F7F000F163F6C7E6C6C4B5A7F6C6C15FF6C6DEB01EFD93FC0EB07C7D91FF0EB1F87 D907FE9038FE03800101B5EAF8016D6C01E0C8FCDA07FEC9FC3C4276BF47>I<011FB512 FC5BA29039003FF8006E5AA25DA5143F5DA5147F5DA514FF92C7FCA55B5CA513035CA513 075CA5130F5CA5131F5CA3133F497E007FB512F0A2B6FC263E7EBD21>73 D<013FB512FEA25E9026007FF8C8FCEC3FE0A25DA5147F5DA514FF92C9FCA55B5CA51303 5CA513075CA21838A21870130F5CA218E0A3011F15014A15C01703A21707EF0F80013F15 1F4A143F177FEFFF00017F140301FF143FB9FC5FA2353E7DBD39>76 D<90263FFFF093381FFFF85013F0629026007FF8EFF000023F4D5AA2023B933801DFC0A2 DA39FCED039FA2F1073F14790271040E5BEC70FE191C19381A7F02F01670DAE07F94C7FC 19E0A2F001C06201016D6C495A02C05FF00700A2180E6F6C14010103161C028003385BA2 18706F7EF0E00313070200DA01C05BA2923907F00380A294380700075B010E902603F80E 5C5FA25F190F011E6D6C5A011C605FA2EEFDC0DB00FF141F013C5D013860013C92C7FC01 7C5C01FE027E143F2607FF80017C4A7EB500FC037FB512E004785E4A1338553E7CBD53> I<90263FFFE0023FB5FC6F16FEA29026003FF8020313C0021F030013004A6C157C023B16 3C6F15381439810238167802787FDA707F157082153F82031F15F002F07FDAE00F5D8215 078203031401010180DAC0015D82811780047F1303010315C04A013F5C17E0161F17F004 0F1307010715F891C7000791C7FC17FC160317FE04015B4915FF010E6E130E188E177F18 CEEF3FDE011E16FE011C6F5AA2170FA21707133C01386F5A133C017C150113FE2607FF80 1400B512FC18705C483E7DBD44>I<013FB612FEEFFFE018F8903B007FF0000FFC6E48EB 01FF7113804BEC7FC0183F19E0F01FF0A2147F5D19F8A402FFED3FF092C8FCA219E0A2F0 7FC05B4AEDFF8019004D5A4D5AEF0FF80103ED3FE04A903801FF8091B648C7FC17F002FC CAFCA213075CA5130F5CA5131F5CA5133F5CA3137F497EB612E0A25D3D3E7DBD3E>80 D<013FB612F017FF18E0903B007FF0003FF86E48EB07FCEF01FE4B6D7EF07F8019C0183F 19E0147F4B15F0A502FFED7FE092C8FCA219C0F0FF80A2494B13004A5D4D5AEF0FF04D5A EF7F800103DA07FEC7FC91B612F017809139FC0007E0EE03F8EE00FC0107814A147F717E A284A2130F5CA484011F157F5CA41902013F17075CA2F0F00F017F170E496C143FB600E0 011F131C94380FF83C4B01071378CA3801FFE09438003F8040407DBD43>82 D<9238FF80070207EBE00F021FEBF81E91387F00FE02FCEB1F3ED903F0EB0FFE49481307 494813034AEB01FC49C7FC491400133E137E177C491578A57F1770A26D1500808080EB7F FEECFFE06D13FEEDFFC06D14F06D14FC010380010080143F02031480DA003F13C0150315 00EE7FE0163F161FA2160F121CA31607160F003C16C0A31780003E151F1700007E5D007F 153E6D5C16FC01E0495AD87DF0495AD8FCFCEB0FC03AF87F803F8027F01FFFFEC7FCD8E0 0713F839C0007FC030427BBF33>I<0007B912F0A33C0FFE000FF8003F01F0160F01C04A 13034848160190C7FC121EF000E048141F5E1238A212781270153F5E5AA3C81600157F5E A515FF93C9FCA55C5DA514035DA514075DA5140F5DA3141FEC7FFC0003B7FCA33C3D76BC 42>I97 DI IIII<177C913907F803FE91393FFE0F8F9139FC0F9C3F903901F007F89039 07E003E0D90FC013F0011F903801F80C02801400133FD97F007FA315035B495CA3017E49 5A5E150F6D5C6D495A90263F803EC7FCECC0FC903871FFF09038E07F8091C9FC485AA47F A27F90B512F8EDFF806C15E016F86D8048B6FC3A07E0000FFED80F801300003FC8127F00 3E815A00FC815AA25E163EA25E6C15FC007C4A5A6C4A5A6CEC0FC0D80FC0013FC7FC3903 F801FCC6B512F0010F90C8FC303D7FA82D>I<147FEB3FFFA313017FA25CA513015CA513 035CA4ED07F80107EB1FFF9139F0781FC09138F1E00F9139F38007E0ECF70002FE14F049 5A5CA25CA24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C71380A4167F5B4915 00A300015D486C491380B5D8F87F13FCA32E3F7DBE33>I<1478EB01FE130314FFA25B14 FE130314FCEB00F01400ACEB03F8EA01FF14F0A2EA001F130FA314E0A5131F14C0A5133F 1480A5137F1400A55B5BA4EA03FF007F13F0A2B5FC183E7DBD1A>II<147F EB3FFFA313017FA25CA513015CA513035CA501070103B5FC02F014FEA26F13F06F1380EE FE00010F14F84A485AED03C04B5A031FC7FC153E011F13784A5AECC3E0ECC7F0ECCFF814 FF497F14F9ECE1FE14C04A7E4A7E4980017E133F82151F82150F01FE8049130782A20001 81486C49B4FCB5D8F03F13F04B13E0A2303F7EBE30>I<143FEB1FFF5BA213017FA214FE A5130114FCA5130314F8A5130714F0A5130F14E0A5131F14C0A5133F1480A5137F1400A5 5B5BA4EA03FF007F13F8A2B5FC183F7DBE1A>I<902707F007F8EB03FCD803FFD91FFF90 380FFF80913CE0781FC03C0FE09126E1E00FEBF0073E001FE38007E1C003F090260FE700 EBE38002EEDAF70013F802FC14FE02D85C14F84A5CA24A5C011F020F14074A4A14F0A501 3F021F140F4A4A14E0A5017F023F141F91C74914C0A549027F143F4992C71380A300014B 147F486C496DEBFFC0B5D8F87FD9FC3F13FEA347287DA74C>I<903907F007F8D803FFEB 1FFF9139E0781FC09138E1E00F3B001FE38007E090380FE70002EE14F014FC14D814F85C A24A130F131F4A14E0A4161F133F4A14C0A4163F137F91C71380A4167F5B491500A30001 5D486C491380B5D8F87F13FCA32E287DA733>II<91387F01FE 903A7FFF0FFFC09139FE3E03F09238F801F8903A03FFE000FE6D49137F4B7F92C713804A 15C04A141FA218E0A20103150F5C18F0A3171F010716E05CA3173F18C0130F4A147F1880 A2EFFF004C5A011F5D16034C5A6E495AEE1FC06E495AD93FDC017EC7FC91388F01F89138 83FFE0028090C8FC92C9FC137FA291CAFCA45BA25BA31201487EB512F8A3343A81A733> I<903907F01F80D803FFEB7FE09138E1E1F09138E387F839001FE707EB0FE614EE02FC13 F002D813E09138F801804AC7FCA25C131FA25CA4133F5CA5137F91C8FCA55B5BA3120148 7EB512FEA325287EA724>114 D<9138FF81C0010713E390381F807F90397C003F804913 1F4848130F5B00031407A248481400A27FA27F6D90C7FCEBFF8014FC6C13FF6C14C015F0 6C6C7F011F7F13079038007FFE1403140100381300157EA2123C153E157E007C147CA200 7E147815F8007F495A4A5A486C485A26F9E01FC7FC38E0FFFC38C01FE0222A7DA824>I< EB0380A4130791C7FCA25BA25BA2133EA2137E13FE12011207001FB512C0B6FCA2D801FC C7FCA312035BA512075BA5120F5BA41407001F130E13C0A4141E141C1380A26D5AA2000F 5B14F03807E1E03801FF80D8007EC7FC1A3978B723>I<01FE147F00FFEC7FFF4914FEA2 0007140300031401A34914FCA4150312074914F8A41507120F4914F0A4150F121F4914E0 A2151FA3153F4914C0157F15FFEC01DF3A0FC003BFE09138073FFF3803F01E3801FFF826 003FE01380282977A733>I119 D<48B539C07FFFC0A33C000FFE003FF8006D48EB1FE001031580010102 3EC7FC6E133C01005C027F5B6F5A91383F81C0EDC380DA1FC7C8FC15EFEC0FFE6E5A5D14 0381A24A7E140FEC1E7F023C7FEC383F02707FECE01F010180903803C00F49486C7ED90F 007F491303017E80D801FE80D807FF497EB5D8803F13F8A332277FA630>I<90B539E007 FFF05E18E0902707FE000313006D48EB01FC705A5F01014A5A5F16036E5C0100140794C7 FC160E805E805E1678ED8070023F13F05EED81C015C191381FC38015C793C8FC15EF15EE EC0FFCA25DA26E5AA25DA26E5A5DA24AC9FC5C140E141E141C5C121C003F5B5A485B495A 130300FE5B4848CAFCEA701EEA783CEA3FF0EA0FC0343A80A630>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fr cmti10 10.95 42 /Fr 42 122 df11 D<933807FF80043F13E09338FE00F8DB01F0133EDB07E0130E4B48131F4C137F031F14FF 4BC7FCA218FE157E1878180015FE5DA31401A25DA414030103B712F0A218E0903A0003F0 00070207140F4B14C0A3171F020F15805DA2173F1800141F5D5F177EA2143F92C712FE5F A34A1301027EECF81CA3160302FEECF03C4A1538A21878187013014A010113F018E09338 00F1C0EF7F804948EC1F0094C7FCA35C1307A2001E5B127F130F00FF5BA249CAFC12FEEA F81EEA703CEA7878EA1FF0EA07C0385383BF33>I<143C14FEEB01FF5BA414FE1307A214 FCA314F8130FA214F0A314E0131FA214C0A31480133FA21400A3133E137EA2137CA31378 13F8A25BA35B1201A26C5A90C7FCA8120FEA3FC0127FA212FFA35B6CC7FC123C184177C0 1C>33 D40 D<14031580A2EC01C0EC00E0A21570A215781538153CA3 151EA4151FA2150FA7151FA9153FA2153EA3157EA2157CA215FCA215F8A21401A215F0A2 140315E0A2140715C0A2EC0F80A2141F15005C143EA25CA25CA2495A5C1303495A5C130F 49C7FC131E5B137C5B5B485A485A485A48C8FC121E5A12705A5A205A7FC325>I44 D<387FFFFCA3B5FCA21605799521>I< 120FEA3FC0127FA212FFA31380EA7F00123C0A0A77891C>I<131EEB3F80137FEBFFC05A A214806C13005B133C90C7FCB3120FEA3FC0127FA212FFA35B6CC7FC123C122777A61C> 58 D<171C173C177CA217FCA216011603A21607A24C7EA2161DA216391679167116E1A2 ED01C1A2ED038115071601150EA2031C7FA24B7EA25D15F05D4A5AA24A5AA24AC7FC5C14 0E5C021FB6FC4A81A20270C7127FA25C13015C495AA249C8FCA2130E131E131C133C5B01 F882487ED807FEEC01FFB500E0017FEBFF80A25C39417BC044>65 D<9339FF8001C0030F13E0033F9038F803809239FF807E07913A03FC001F0FDA0FF0EB07 1FDA1FC0ECBF00DA7F806DB4FC4AC77E495AD903F86E5A495A130F4948157E4948157C49 5A13FF91C9FC4848167812035B1207491670120FA2485A95C7FC485AA3127F5BA312FF5B A490CCFCA2170FA2170EA2171E171C173C173817786C16706D15F04C5A003F5E6D140300 1F4B5A6D4AC8FC000F151E6C6C5C6C6C14F86C6C495A6C6CEB07C090397FC03F8090261F FFFEC9FC010713F0010013803A4272BF41>67 D<49B812F0A390260003FEC7123F180F4B 1403A2F001E014075DA3140F5D19C0A2141F5D1770EFF003023F02E013804B91C7FCA216 01027F5CED8003A2160702FFEB1F8092B5FCA349D9003FC8FC4A7F82A20103140E5CA216 1E0107141C5CA293C9FC130F5CA3131F5CA3133F5CA2137FA25C497EB612E0A33C3E7BBD 3B>70 D<49B6FC5BA2D9000313005D5DA314075DA3140F5DA3141F5DA3143F5DA3147F5D A314FF92C7FCA35B5CA313035CA313075CA3130F5CA3131F5CA3133F5CA2137FA25C497E B67EA3283E7BBD23>73 D<49B612FCEFFF8018F0903B0003FE000FF8EF03FE4BEB00FF84 19800207ED3FC05DA219E0140F5DA3021FED7FC05DA2F0FF80143F4B15004D5A60027F4A 5A4B495A4D5AEF3F8002FF02FEC7FC92380007F892B512E01780499038000FE04A6D7E70 7E707E0103814A130083A213075CA25E130F5C5F1603131F5CA3013F020714404A16E05F 017F160119C04A01031303496C1680B6D8800113079438FE0F009338007E1ECAEA3FFCEF 07F03B407BBD42>82 D<48B9FCA25A903AFE001FF00101F89138E0007FD807E0163E4901 3F141E5B48C75BA2001E147FA2001C4B131C123C003814FFA2007892C7FC12704A153C00 F01738485CC716001403A25DA21407A25DA2140FA25DA2141FA25DA2143FA25DA2147FA2 5DA214FFA292C9FCA25BA25CA21303A25CEB0FFE003FB67E5AA2383D71BC41>84 D<277FFFFE01B500FC90B512E0B5FCA20003902680000790C7380FFC006C90C701FCEC07 F049725A04035EA26350C7FCA20407150EA2040F5D1A3C041F153862163B6216734F5A6D 14E303014B5A6C15C303034BC8FC1683DB0703140E191E030E151C61031C7F61ED380161 157003F04A5A15E002014B5A15C0DA03804AC9FC60DA0700140E60140E605C029C5D14B8 D97FF85D5C715A5C4A5DA24A92CAFC5F91C7FC705A137E5F137C5F137801705D53406EBD 5B>87 D<913801FFF05CA216E0EDC00014075DA3140F92C7FCA35C141EA3143E143CA314 7C1478A314F85CA313015CA313035CA313075CA3130F91C8FCA35B131EA3133E133CA313 7C1378A313F85BA312015BA312035BA312075BA3120F90C9FCA35A121EA3123E123CA312 7C1278EA7FFCA212FFA2245B7CC31C>91 D<913801FFF05CA216E0EC00011503A216C0A2 1507A21680A2150FA21600A25DA2151EA2153EA2153CA2157CA21578A215F8A25DA21401 A25DA21403A25DA21407A25DA2140FA292C7FCA25CA2141EA2143EA2143CA2147CA21478 A214F8A25CA21301A25CA21303A25CA21307A25CA2130FA291C8FCA25BA2131EA2133EA2 EA7FFCA212FFA2245B83C31C>93 D<147E49B47E903907C1C38090391F80EFC090383F00 FF017E137F4914804848133F485AA248481400120F5B001F5C157E485AA215FE007F5C90 C7FCA21401485C5AA21403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13 E0003E137FECF3E1261F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E >97 DIIII<167C4BB4FC923807C78092380F83C0ED1F87161FED3F3FA2157EA21780EE0E 004BC7FCA414015DA414035DA30103B512F8A390260007E0C7FCA3140F5DA5141F5DA414 3F92C8FCA45C147EA414FE5CA413015CA4495AA4495AA4495A121E127F5C12FF49C9FCA2 EAFE1EEAF83C1270EA7878EA3FE0EA0F802A5383BF1C>III<1478EB01FCA21303A314F8EB00E01400AD13 7C48B4FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF03F 140012005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB80 E0A2EB81C01383148038078700EA03FEEA00F8163E79BC1C>I107 DIIII<90 3903E001F890390FF807FE903A1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0 EB783F017001C013F0ED80019038F07F0001E015F8147E1603000113FEA2C75AA2010114 0717F05CA20103140F17E05CA20107EC1FC0A24A1480163F010F15005E167E5E131F4B5A 6E485A4B5A90393FB80F80DA9C1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201 A25BA21203A2387FFFE0B5FCA22D3A80A72E>I<027E1360903901FF81E0903807C1C390 391F80E7C090383F00F7017E137F5B4848EB3F80485AA2485A000F15005B121F5D484813 7EA3007F14FE90C75AA3481301485CA31403485CA314074A5A127C141F007E133F003E49 5A14FF381F01EF380F879F3903FF1F80EA00FC1300143F92C7FCA35C147EA314FE5CA213 01130390B512F05AA2233A77A72A>IIII<137C 48B4141C26038F80137EEA0707000E7F001E15FE121CD83C0F5C12381501EA781F007001 805BA2D8F03F1303140000005D5B017E1307A201FE5C5B150F1201495CA2151F0003EDC1 C0491481A2153F1683EE0380A2ED7F07000102FF13005C01F8EBDF0F00009038079F0E90 397C0F0F1C90391FFC07F8903907F001F02A2979A731>I<017CEB01C048B4EB07F03803 8F80EA0707000E01C013F8121E001C1403EA3C0F0038EC01F0A2D8781F130000705BA2EA F03F91C712E012005B017E130116C013FE5B1503000115805BA2ED07001203495B150EA2 5DA25D1578000114706D5B0000495A6D485AD97E0FC7FCEB1FFEEB03F0252979A72A>I< 017C167048B491387001FC3A038F8001F8EA0707000E01C015FE001E1403001CEDF000EA 3C0F0038177C1507D8781F4A133C00701380A2D8F03F130F020049133812005B017E011F 14784C137013FE5B033F14F0000192C712E05BA2170100034A14C049137E17031880A2EF 070015FE170E00010101141E01F86D131C0000D9039F5BD9FC076D5A903A3E0F07C1E090 3A1FFC03FFC0902703F0007FC7FC372979A73C>I<903903F001F890390FFC07FE90393C 1E0E0F9026780F1C138001F0EBB83FD801E013F89039C007F07FEA0380000714E0D9000F 140048151C000E4AC7FCA2001E131FA2C75BA2143F92C8FCA35C147EA314FE4A131CA301 01143C001E1538003F491378D87F811470018314F000FF5D9039077801C039FE0F7C033A 7C0E3C078027783C1E1EC7FC391FF80FFC3907E003F029297CA72A>I<137C48B4143826 038F8013FCEA0707000E7F001E1401001C15F8EA3C0F12381503D8781F14F000701380A2 D8F03F1307020013E012005B017E130F16C013FE5B151F1201491480A2153F000315005B A25D157EA315FE5D00011301EBF8030000130790387C1FF8EB3FF9EB07E1EB00035DA214 07000E5CEA3F80007F495AA24A5AD8FF0090C7FC143E007C137E00705B387801F0383803 E0381E0FC06CB4C8FCEA03F8263B79A72C>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fs cmbx12 17.28 42 /Fs 42 123 df48 D<16F04B7E1507151F153FEC01FF1407147F010FB5FCB7FC A41487EBF007C7FCB3B3B3B3007FB91280A6395E74DD51>I<913801FFF8021FEBFFC091 B612F8010315FF010F16C0013F8290267FFC0114F89027FFE0003F7F4890C7000F7F4848 6E7FD807F86E148048486E14C048486E14E048486F13F001FC17F8486C816D17FC6E80B5 6C16FE8380A219FFA283A36C5BA26C5B6C90C8FCD807FC5DEA01F0CA14FEA34D13FCA219 F85F19F04D13E0A294B512C019804C14004C5B604C5B4C5B604C13804C90C7FC4C5A4C5A 4B13F05F4B13804B90C8FC4B5AED1FF84B5A4B5A4B48143F4A5B4A48C8FC4A5A4A48157E 4A5A4A5AEC7F8092C9FC02FE16FE495A495A4948ED01FCD90FC0150749B8FC5B5B90B9FC 5A4818F85A5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5FC020F14F8023F14FF49B712 C04916F0010FD9C01F13FC90271FFC00077FD93FE001017F49486D8049C86C7F48488348 6C6F7F14C0486D826E806E82487FA4805CA36C5E4A5E6C5B6C5B6C495E011FC85A90C95C A294B55A614C91C7FC604C5B4C5B4C5B4C5B047F138092260FFFFEC8FC020FB512F817E0 94C9FC17F817FF91C7003F13E0040713F8040113FE707F717F7113E085717FA2717F85A2 85831A80A31AC0EA03FCEA0FFF487F487F487FA2B57EA31A80A34D14005C7E4A5E5F6C49 5E49C8485BD81FF85F000F5ED807FE92B55A6C6C6C4914806C01F0010791C7FC6C9026FF 803F5B6D90B65A011F16F0010716C001014BC8FCD9001F14F0020149C9FC426079DD51> II<01C0EE01 C0D801F8160F01FF167F02F0EC07FFDAFF8090B5FC92B7128019006060606060606095C7 FC17FC5F17E0178004FCC8FC16E09026FC3FFCC9FC91CBFCADED3FFE0203B512F0020F14 FE023F6E7E91B712E001FDD9E00F7F9027FFFE00037F02F801007F02E06EB4FC02806E13 8091C8FC496F13C04917E07113F0EA00F090C914F8A219FC83A219FEA419FFA3EA03F0EA 0FFC487E487E487FA2B57EA319FEA35C4D13FC6C90C8FC5B4917F8EA3FF001804B13F06D 17E0001F5E6C6C17C06D4B1380D807FC92B512006C6C4A5B6C6C6C01075B6C01E0011F5B D97FFE90B55A6DB712C0010F93C7FC6D15FC010115F0D9003F1480020301F0C8FC406078 DD51>III<92383FFF800203B512FC021FECFF80027F15E049B712F849D9F0077F01 0F90C76C7ED91FFCEC1FFFD93FF06E7F494802037F494882717F484980854890C9127FA2 4884183FA25A80A380806E157F6E5E14FE6E7E6F4A5A6C14F003FC495B03FF495B6C1580 DCE0075B6CDBF80F90C7FC9338FE1FFE6C9238FF7FF84D5A6D16C06D5E6D4BC8FC6D6F7E 6D16E00101826D16FC023F814A8149B87E010783498390263FFE3F8190267FFC0F819026 FFF003814849C6FC48496D804849131F4890C7000780160148486E1580003F163F49150F 007F7014C0491501717E8400FF835B8484A384A21A80A27F007F1900607F003F606D160F 001F606D4C5A6C6D153F6C6D4B5A6C01F04B5A6C01FC02035B6C01FF021F5B6D9027F001 FFFEC7FC6D90B65A010F16F001035E010093C8FC020F14F8DA007F90C9FC426079DD51> II65 D<4DB5ED03C0057F02F014070407B600 FE140F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF92B6C738 07FF814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC16074A01F082 91B54882490280824991CB7E49498449498449498449865D49498490B5FC484A84A2484A 84A24891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380A27EA2F5 0FC0A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F4E5A7F6D 6D4E5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC020F01FF EE07FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380030F91B6 48C8FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375>67 D70 D73 D76 D80 D82 D<001FBEFCA64849C79126E0000F148002E0180091C8171F498601F81A0349864986A249 1B7FA2491B3F007F1DC090C9181FA4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3B3A3 021FBAFCA663617AE070>84 D87 D<913803FFFE027FEBFFF00103B612FE010F6F7E4916E0 90273FFE001F7FD97FE001077FD9FFF801017F486D6D7F717E486D6E7F85717FA2717FA3 6C496E7FA26C5B6D5AEB1FC090C9FCA74BB6FC157F0207B7FC147F49B61207010F14C001 3FEBFE004913F048B512C04891C7FC485B4813F85A5C485B5A5CA2B55AA45FA25F806C5E 806C047D7F6EEB01F96C6DD903F1EBFF806C01FED90FE114FF6C9027FFC07FC015800001 91B5487E6C6C4B7E011F02FC130F010302F001011400D9001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF80047F14F00381B612FC038715FF 038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02007F03F8824B6F7E4B6F1380 4B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA44F13F8A31BF0A24F13E0A24F 13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C495B9126F83FE0013F13C09127 F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C7001F91C8FC90C8000313E04F65 7BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E01039039FE001FFF4901F801 0113804901E0010713C04901804913E0017F90C7FC49484A13F0A2485B485B5A5C5A7113 E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE7EA280A27EA2806C18FCA26C 6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC1FC06D01E0EC7F806D6DECFF 00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D020F1580020102FCC7FCDA00 0F13C03E437BC148>II<92380FFFC04AB512FC020FECFF80023F15E091B712F80103D9FE03 7F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F49486E7F48498048844A8048 84485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA41A0002C0CBFCA67EA380A27E A27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17016D6C4B5A6D6D4A5A6D01E0 4A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D6C90B55A021F15F8020715E0 020092C8FC030713F041437CC14A>III<903807FF80B6FCA6C6FC 7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267FE07F7F922781FE001F7FDB83 F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC825DA25DA25DA45DB3B2B7D8 F007B71280A651647BE35A>II<903807FF80B6FCA6C6FC7F7FB3A90503B61280A6DD003FEB8000DE0F FCC7FCF01FF04E5AF0FFC04D5B4D90C8FCEF07FC4D5AEF3FF04D5A4D5A4C90C9FC4C5AEE 0FFC4C5A4C5AEE7FC04C7E03837F03877F158F039F7F03BF7F92B5FC838403FC804B7E03 F0804B6C7F4B6C7F1580707F707F707FA270807080717FA2717F717F717FA2717F717F83 867180727F95B57EB7D8E00FECFFF0A64C647BE355>107 D<903807FF80B6FCA6C6FC7F 7FB3B3B3B3ADB712E0A623647BE32C>I<902607FF80D91FFFEEFFF8B691B500F00207EB FF80040702FC023F14E0041F02FF91B612F84C6F488193267FE07F6D4801037F922781FE 001F9027E00FF0007FC6DA83F86D9026F01FC06D7F6DD987F06D4A487F6DD98FC0DBF87E C7804C6D027C80039FC76E488203BEEEFDF003BC6E4A8003FC04FF834B5FA24B5FA24B94 C8FCA44B5EB3B2B7D8F007B7D8803FB612FCA67E417BC087>I<902607FF80EB1FFFB691 B512F0040714FC041F14FF4C8193267FE07F7F922781FE001F7FC6DA83F86D7F6DD987F0 7F6DD98FC0814C7F039FC78015BE03BC8003FC825DA25DA25DA45DB3B2B7D8F007B71280 A651417BC05A>I<923807FFE092B6FC020715E0021F15F8027F15FE494848C66C6C7E01 0701F0010F13E04901C001037F49496D7F4990C87F49486F7E49486F7E48496F13804819 C04A814819E048496F13F0A24819F8A348496F13FCA34819FEA4B518FFAD6C19FEA46C6D 4B13FCA36C19F8A26C6D4B13F0A26C19E06C6D4B13C0A26C6D4B13806C6D4B13006D6C4B 5A6D6D495B6D6D495B010701F0010F13E06D01FE017F5B010090B7C7FC023F15FC020715 E0020092C8FC030713E048437CC151>I<902607FF80EBFFF8B6010FEBFF80047F14F003 81B612FC038715FF038F010114C09227BFF0003F7FC6DAFFC0010F7F6D91C76C7F6D496E 7F03F86E7F4B6E7F4B17804B6F13C0A27313E0A27313F0A21BF885A21BFCA3851BFEAE4F 13FCA41BF861A21BF0611BE0611BC06F92B512801B006F5C6F4A5B6F4A5B03FF4A5B7049 5B04E0017F13C09226CFFC03B55A03C7B648C7FC03C115F803C015E0041F91C8FC040313 E093CBFCB3A3B712F0A64F5D7BC05A>I114 D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>II<902607FFC0ED3F FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 F0C7FC51427BC05A>I119 D<007FB600C0017FB512F8A6D8001F01 F8C70007EBF0006D040190C7FC6D6D5D6D6D4A5A6D6D4A5A70495A6D4C5A6E7F6E6D495A 6E6D495A7049C8FC6E4A5A6E6D485A6E6D485A6E13FFEF8FF06EEC9FE06FEBFFC06F5C6F 91C9FC5F6F5B816F7F6F7F8481707F8493B57E4B805D4B80DB0FF37FDB1FE17F04C08015 3F4B486C7F4B486C7F4A486D7F4A486D7F4A5A4B6D7F020F6E7F4A486D7F4A486D804A5A 4AC86C7F49486F7F4A6F7F0107707FEB3FFFB600F049B7FCA650407EBF55>II<0007B912E019F0A402FCC714E04801C04914C091C7FC494A1480494A1400494A5B 5B4C5B494A5B4C5B5B93B55A4B5C5D001F5F494991C7FC4B5BA24B5B4B5BC8485BA292B5 5A4A5C4A5CA24A91C8FC4A5B4A5BA24A5B4A49EB03F091B55AA2495C495C4991C7FC1807 494915E0495B5B5D4949140F90B55AA2484A141F485C4891C8123F187F484915FF48495C 48491407051F13C0484949B5FCBAFCA47E3C407CBF48>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ft cmsy10 10.95 9 /Ft 9 104 df<007FB812F8B912FCA26C17F83604789847>0 D<121EEA7F80A2EAFFC0A4 EA7F80A2EA1E000A0A799B19>I<0060166000F816F06C1501007E15036CED07E06C6CEC 0FC06C6CEC1F806C6CEC3F006C6C147E6C6C5C6C6C495A017E495A6D495A6D6C485A6D6C 485A6D6C48C7FC903803F07E6D6C5A903800FDF8EC7FF06E5A6E5AA24A7E4A7EECFDF890 3801F8FC903803F07E49487E49486C7E49486C7E49486C7E017E6D7E496D7E48486D7E48 48147E4848804848EC1F804848EC0FC048C8EA07E0007EED03F048150148150000601660 2C2C73AC47>I13 D15 D<1818187CEF01FCEF07F8EF1FF0EF7FC0933801FF00EE07FCEE1FF0EE7FC04B 48C7FCED07FCED1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB 7FC04848CAFCEA07FCEA1FF0EA7FC048CBFC5AEA7F80EA3FE0EA0FF8EA03FEC66C7EEB3F E0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED3FE0ED0FF8ED03FE92 3800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FE0EF0FF8EF03FC170018381800AE007F B812F8B912FCA26C17F8364878B947>20 D<0207B512E0023F14F049B6FC4915E0D90FFC C8FCEB1FE0017FC9FC13FEEA01F8485A485A5B485A121F90CAFC123EA25AA21278A212F8 A25AA2B812E017F0A217E000F0CAFCA27EA21278A2127CA27EA27E7F120F6C7E7F6C7E6C 7EEA00FE137FEB1FE0EB0FFC0103B612E06D15F0EB003F020714E02C3678B13D>50 D<153FEC03FFEC0FE0EC3F80EC7E00495A5C495AA2495AB3AA130F5C131F495A91C7FC13 FEEA03F8EA7FE048C8FCEA7FE0EA03F8EA00FE133F806D7E130F801307B3AA6D7EA26D7E 80EB007EEC3F80EC0FE0EC03FFEC003F205B7AC32D>102 D<12FCEAFFC0EA07F0EA01FC EA007E6D7E131F6D7EA26D7EB3AA801303806D7E1300147FEC1FC0EC07FEEC00FFEC07FE EC1FC0EC7F0014FC1301495A5C13075CB3AA495AA2495A133F017EC7FC485AEA07F0EAFF C000FCC8FC205B7AC32D>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fu cmbx12 14.4 56 /Fu 56 123 df45 DI<913803FFC0023F13FC91B6FC010315C0010F0181 13F0903A1FFC003FF849486D7E49486D7E49486D7E48496D138048496D13C0A24817E048 90C813F0A34817F8A24817FC49157FA3007F17FEA600FF17FFB3A5007F17FEA6003F17FC A26D15FFA26C17F8A36C17F0A26C6D4913E0A26C6D4913C06C17806E5B6C6D4913006D6C 495AD91FFCEB3FF8903A0FFF81FFF06D90B55A01011580D9003F01FCC7FC020313C0384F 7BCD43>48 D<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13F0EAF800C7FC B3B3B3A6007FB712FEA52F4E76CD43>II<91380FFF C091B512FC0107ECFF80011F15E090263FF8077F9026FF800113FC4848C76C7ED803F86E 7E491680D807FC8048B416C080486D15E0A4805CA36C17C06C5B6C90C75AD801FC1680C9 FC4C13005FA24C5A4B5B4B5B4B13C04B5BDBFFFEC7FC91B512F816E016FCEEFF80DA0007 13E0030113F89238007FFE707E7013807013C018E07013F0A218F8A27013FCA218FEA2EA 03E0EA0FF8487E487E487EB57EA318FCA25E18F891C7FC6C17F0495C6C4816E001F04A13 C06C484A1380D80FF84A13006CB44A5A6CD9F0075BC690B612F06D5D011F1580010302FC C7FCD9001F1380374F7ACD43>I<177C17FEA2160116031607160FA2161F163F167FA216 FF5D5DA25D5DED1FBFED3F3F153E157C15FCEC01F815F0EC03E01407EC0FC01580EC1F00 5C147E147C5C1301495A495A5C495A131F49C7FC133E5B13FC485A5B485A1207485A485A 90C8FC123E127E5ABA12C0A5C96C48C7FCAF020FB712C0A53A4F7CCE43>III<121F7F7FEBFF8091B81280A45A1900606060A2606060485F01 80C86CC7FC007EC95A4C5A007C4B5A5F4C5A160F4C5A484B5A4C5A94C8FC16FEC812014B 5A5E4B5A150F4B5AA24B5AA24B5A15FFA24A90C9FCA25C5D1407A2140FA25D141FA2143F A4147F5DA314FFA55BAC6D5BA2EC3FC06E5A395279D043>I<913807FFC0027F13FC0103 B67E010F15E090261FFC0113F8903A3FE0003FFCD97F80EB0FFE49C76C7E48488048486E 1380000717C04980120F18E0177FA2121F7FA27F7F6E14FF02E015C014F802FE4913806C 7FDBC00313009238F007FE6C02F85B9238FE1FF86C9138FFBFF06CEDFFE017806C4BC7FC 6D806D81010F15E06D81010115FC010781011F81491680EBFFE748018115C048D9007F14 E04848011F14F048487F48481303030014F8484880161F4848020713FC1601824848157F 173FA2171FA2170FA218F8A27F007F17F06D151FA26C6CED3FE0001F17C06D157F6C6CED FF806C6C6C010313006C01E0EB0FFE6C01FCEBFFFC6C6CB612F06D5D010F1580010102FC C7FCD9000F13C0364F7ACD43>I<91380FFF8091B512F8010314FE010F6E7E4901037F90 267FF8007F4948EB3FF048496D7E484980486F7E484980824817805A91C714C05A7013E0 A218F0B5FCA318F8A618FCA46C5DA37EA25E6C7F6C5DA26C5D6C7F6C6D137B6C6D13F390 387FF803011FB512E36D14C30103028313F89039007FFE03EC00401500A218F05EA3D801 F816E0487E486C16C0487E486D491380A218005E5F4C5A91C7FC6C484A5A494A5A49495B 6C48495BD803FC010F5B9027FF807FFEC7FC6C90B55A6C6C14F06D14C0010F49C8FC0100 13F0364F7ACD43>I<171F4D7E4D7EA24D7EA34C7FA24C7FA34C7FA34C7FA24C7FA34C80 83047F80167E8304FE804C7E03018116F8830303814C7E03078116E083030F814C7E031F 81168083033F8293C77E4B82157E8403FE824B800201835D840203834B800207835D844A B87EA24A83A3DA3F80C88092C97E4A84A2027E8202FE844A82010185A24A820103854A82 010785A24A82010F855C011F717FEBFFFCB600F8020FB712E0A55B547BD366>65 DI<932601FFFCEC01C0047F D9FFC013030307B600F81307033F03FE131F92B8EA803F0203DAE003EBC07F020F01FCC7 383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC4901F882494982494982494982 4949824990CA7E494883A2484983485B1B7F485B481A3FA24849181FA3485B1B0FA25AA2 98C7FC5CA2B5FCAE7EA280A2F307C07EA36C7FA21B0F6C6D1980A26C1A1F6C7F1C006C6D 606C6D187EA26D6C606D6D4C5A6D6D16036D6D4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D 6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1FF80203903AFFE001FFF0020091B612C0033F 93C8FC030715FCDB007F14E0040101FCC9FC525479D261>IIII<9326 01FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F92B8EA803F0203DAE003 EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC494848C9FC4901F88249 49824949824949824949824990CA7E494883A2484983485B1B7F485B481A3FA24849181F A3485B1B0FA25AA298C8FC5CA2B5FCAE6C057FB712E0A280A36C94C7003FEBC000A36C7F A36C7FA27E6C7FA26C7F6C7FA26D7E6D7F6D7F6D6D5E6D7F6D01FC93B5FC6D13FF6D6C6D 5C6E01F0EC07FB020F01FEEC1FF10203903AFFF001FFE0020091B6EAC07F033FEE001F03 0703FC1307DB007F02E01301040149CAFC5B5479D26A>III<027FB71280A591C76C90C7FCB3 B3B3EA07F0EA1FFC487E487EA2B57EA44C5AA34A485B7E49495BD83FF8495BD81FE05DD8 0FFC011F5B2707FF807F90C8FC000190B512FC6C6C14F0011F14C0010101F8C9FC39537D D145>I76 DII<93380FFFC00303B6FC031F15E092B712FC02 03D9FC0013FF020F01C0010F13C0023F90C7000313F0DA7FFC02007F494848ED7FFE4901 E0ED1FFF49496F7F49496F7F4990C96C7F49854948707F4948707FA24849717E48864A83 481B804A83481BC0A2481BE04A83A2481BF0A348497113F8A5B51AFCAF6C1BF86E5FA46C 1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B 6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0 011F13F0020F01FC90B512C0020390B7C8FC020016FC031F15E0030392C9FCDB001F13E0 565479D265>II82 D<91260FFF80130791B500F85B010702FF5B011FEDC03F49EDF07F9026FFFC006D5A4801 E0EB0FFD4801800101B5FC4848C87E48488149150F001F824981123F4981007F82A28412 FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15F86CECFF8016FC6CEDFFC017F06C 16FC6C16FF6C17C06C836C836D826D82010F821303010082021F16801400030F15C0ED00 7F040714E01600173F050F13F08383A200788200F882A3187FA27EA219E07EA26CEFFFC0 A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A5A02F8EC7FF0903B1FFFC003FFE0 486C90B65AD8FC0393C7FC48C66C14FC48010F14F048D9007F90C8FC3C5479D24B>I<00 3FBC1280A59126C0003F9038C0007F49C71607D87FF8060113C001E08449197F49193F90 C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6C994C7FCB3B3AC91B912F0A55351 7BD05E>II87 D 97 DI<913801FFF8021FEBFF8091B612F0010315FC010F9038C00FFE903A1FFE 0001FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091C7FC486F130070 5A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E140F6CEE1F806C 6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A01001580023F49 C7FC020113E033387CB63C>I<4DB47E0407B5FCA5EE001F1707B3A4913801FFE0021F13 FC91B6FC010315C7010F9038E03FE74990380007F7D97FFC0101B5FC49487F4849143F48 4980485B83485B5A91C8FC5AA3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D 5C6C6D49B5FC6D6C4914E0D93FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE 0FD9003F13F8020301C049C7FC41547CD24B>I<913803FFC0023F13FC49B6FC010715C0 4901817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E48178048497F18C048 8191C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E06C EE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB 03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D>IIII<137F 497E000313E0487FA2487FA76C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017E B3B3A6B612E0A51B547BD325>I107 DIII<913801FFE0021F13FE91B612C0010315F0010F90 38807FFC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F48834890 C86C7EA24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C5F A26C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF 807FFC6D90B55A010015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B501 0F13FE033FEBFFC092B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC602806D 7F92C76C7F4A824A6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA2615F 616E4A5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E06F 1480031F01FCC8FC030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB59038 0FFF80033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE78014 EF150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537> 114 D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F 4980127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15 F06C816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC00 7F00F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE90 39FFC00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147E A414FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3 A9EE07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B 020313802A4D7ECB34>IIII<007F B500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07F86D6D5C6D6D495A6D4B5A6F495A 6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C485A6EEB8FE06EEBCFC06EEBFF806E 91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5FCDA01FD7F03F87F4A486C7E4A48 6C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A6D7F495A49486D7F01076F7E4948 6E7E49486E7FEBFFF0B500FE49B612C0A542357EB447>II< 001FB8FC1880A3912680007F130001FCC7B5FC01F0495B495D49495B495B4B5B48C75C5D 4B5B5F003E4A90C7FC92B5FC4A5B5E4A5B5CC7485B5E4A5B5C4A5B93C8FC91B5FC495B5D 4949EB0F805B495B5D495B49151F4949140092C7FC495A485E485B5C485E485B4A5C4849 5B4815074849495A91C712FFB8FCA37E31357CB43C>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fv cmr10 10.95 85 /Fv 85 125 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 DIII<121EEA7F80EAFFC0A9EA7F80ACEA3F00AC 121EAB120CC7FCA8121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A4179C019>33 D<001E130F397F803FC000FF137F01C013E0A201E013F0A3007F133F391E600F30000013 00A401E01370491360A3000114E04913C00003130101001380481303000EEB070048130E 0018130C0038131C003013181C1C7DBE2D>I<121EEA7F8012FF13C0A213E0A3127FEA1E 601200A413E013C0A312011380120313005A120E5A1218123812300B1C79BE19>39 D<1430147014E0EB01C0EB03801307EB0F00131E133E133C5B13F85B12015B1203A2485A A2120F5BA2121F90C7FCA25AA3123E127EA6127C12FCB2127C127EA6123E123FA37EA27F 120FA27F1207A26C7EA212017F12007F13787F133E131E7FEB07801303EB01C0EB00E014 701430145A77C323>I<12C07E12707E7E121E7E6C7E7F12036C7E7F12007F1378137CA2 7FA2133F7FA21480130FA214C0A3130714E0A6130314F0B214E01307A614C0130FA31480 A2131F1400A25B133EA25BA2137813F85B12015B485A12075B48C7FC121E121C5A5A5A5A 145A7BC323>I<1506150FB3A9007FB912E0BA12F0A26C18E0C8000FC9FCB3A915063C3C 7BB447>43 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A312011380 120313005A120E5A1218123812300B1C798919>II<121EEA7F80 A2EAFFC0A4EA7F80A2EA1E000A0A798919>II IIII<150E15 1E153EA2157EA215FE1401A21403EC077E1406140E141CA214381470A214E0EB01C0A2EB 0380EB0700A2130E5BA25B5BA25B5B1201485A90C7FC5A120E120C121C5AA25A5AB8FCA3 C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00061403D80780131F01F813FE90B5FC5D5D 5D15C092C7FC14FCEB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E 49137E497F90C713800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090 C7121F12FC007015C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903 F80FE0C6B55A013F90C7FCEB07F8243F7CBC2D>II<1238123C123F90B612FCA316F85A16F016E00078C712010070EC03C0ED 078016005D48141E151C153C5DC8127015F04A5A5D14034A5A92C7FC5C141EA25CA2147C 147814F8A213015C1303A31307A3130F5CA2131FA6133FAA6D5A0107C8FC26407BBD2D> III<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3121E EA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619>I<121EEA7F80A2EAFFC0A4EA7F80A2 EA1E00C7FCB3121E127FEAFF80A213C0A4127F121E1200A412011380A3120313005A1206 120E120C121C5A1230A20A3979A619>I<007FB912E0BA12F0A26C18E0CDFCAE007FB912 E0BA12F0A26C18E03C167BA147>61 D63 D<15074B7EA34B7EA34B7EA34B7EA34B7E 15E7A2913801C7FC15C3A291380381FEA34AC67EA3020E6D7EA34A6D7EA34A6D7EA34A6D 7EA34A6D7EA349486D7E91B6FCA249819138800001A249C87EA24982010E157FA2011E82 011C153FA2013C820138151FA2017882170F13FC00034C7ED80FFF4B7EB500F0010FB512 F8A33D417DC044>65 DIIIIIIII<011FB512FCA3D9000713006E5A 1401B3B3A6123FEA7F80EAFFC0A44A5A1380D87F005B007C130700385C003C495A6C495A 6C495A2603E07EC7FC3800FFF8EB3FC026407CBD2F>IIIIIIII< B712C016FCEEFF800001D9C00013E06C6C48EB1FF0EE07FCEE01FE707E84717EA2717EA2 84A760177F606017FF95C7FCEE01FCEE07F8EE1FE0EEFF8091B500FCC8FC16F091388001 FCED003FEE1FC0707E707E83160383160183A383A484A4F0C004190EA28218E0057F131E 2601FFE0161CB600C0EB3FF094381FF83805071370CA3801FFE09438003F803F407DBD43 >II<003FB91280A3903AF0007FE001 018090393FC0003F48C7ED1FC0007E1707127C00781703A300701701A548EF00E0A5C816 00B3B14B7E4B7E0107B612FEA33B3D7DBC42>IIII<007FB5D8C003 B512E0A3C649C7EBFC00D93FF8EC3FE06D48EC1F806D6C92C7FC171E6D6C141C6D6C143C 5F6D6C14706D6D13F04C5ADA7FC05B023F13036F485ADA1FF090C8FC020F5BEDF81E9138 07FC1C163C6E6C5A913801FF7016F06E5B6F5AA26F7E6F7EA28282153FED3BFEED71FF15 F103E07F913801C07F0203804B6C7EEC07004A6D7E020E6D7E5C023C6D7E02386D7E1478 4A6D7E4A6D7F130149486E7E4A6E7E130749C86C7E496F7E497ED9FFC04A7E00076DEC7F FFB500FC0103B512FEA33F3E7EBD44>II91 D<486C13C00003130101 001380481303000EEB070048130E0018130C0038131C003013180070133800601330A300 E01370481360A400CFEB678039FFC07FE001E013F0A3007F133FA2003F131F01C013E039 0F0007801C1C73BE2D>II96 DII<49B4FC010F13E090383F00F8017C131E4848131F4848137F 0007ECFF80485A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB6C7EA3003FEC01 C07F001F140316806C6C13076C6C14000003140E6C6C131E6C6C137890383F01F090380F FFC0D901FEC7FC222A7DA828>IIII<167C903903F801FF903A1F FF078F8090397E0FDE1F9038F803F83803F001A23B07E000FC0600000F6EC7FC49137E00 1F147FA8000F147E6D13FE00075C6C6C485AA23901F803E03903FE0FC026071FFFC8FCEB 03F80006CAFC120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C810003813A0FC0001F FC48C7EA01FE003E140048157E825A82A46C5D007C153E007E157E6C5D6C6C495A6C6C49 5AD803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>III<1478EB01FEA2EB03FFA4EB01FEA2EB00781400AC147FEB7FFFA313017F147F B3B3A5123E127F38FF807E14FEA214FCEB81F8EA7F01387C03F0381E07C0380FFF803801 FC00185185BD1C>III<2701F8 01FE14FF00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C01F80007903BE001 F87000FC2603F9C06D487F000101805C01FBD900FF147F91C75B13FF4992C7FCA2495CB3 A6486C496CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F801FE00FF903807FF C091381E07E091387803F000079038E001F82603F9C07F0001138001FB6D7E91C7FC13FF 5BA25BB3A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713E090381F81F89038 7E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB01F8A2003F15FC A248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6CEB07E06C 6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7FC282A7EA82D> I<3901FC03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC001FC6C496C7E6C90 C7127F49EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1FE0A2EE3FC06D1580 EE7F007F6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7FCEC07F891C9FCAD 487EB512F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090397F00387C01FC13 1CD803F8130E4848EB0FFC150748481303121F485A1501485AA448C7FCAA6C7EA36C7EA2 001F14036C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F190380FFFC1903801 FE0190C7FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB1FF8EC787CECE1FE 3807F9C100031381EA01FB1401EC00FC01FF1330491300A35BB3A5487EB512FEA31F287E A724>I<90383FC0603901FFF8E03807C03F381F000F003E1307003C1303127C00781301 12F81400A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480000114C0D8003F13 E0010313F0EB001FEC0FF800E01303A214017E1400A27E15F07E14016C14E06CEB03C090 3880078039F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6133CA4137CA213FCA2 120112031207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038FE01C0A2EB7F0301 3F138090381F8700EB07FEEB01F81B397EB723>IIIIII<001FB61280A2EBE0000180140049485A001E495A121C4A5A003C495A141F 00385C4A5A147F5D4AC7FCC6485AA2495A495A130F5C495A90393FC00380A2EB7F80EBFF 005A5B484813071207491400485A48485BA248485B4848137F00FF495A90B6FCA221277E A628>III E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fw cmbx12 20.736 13 /Fw 13 118 df<13FF000313E0487F001F13FC487F805A1580B612C0A315E0A315F0A37E A27EA27E000713F36C13E3C61383EB00031407A215E0A3140FA215C0141FA2EC3F80A214 7F15005C5C1301495A5C1307495A495A133F495A495A4890C7FC485A485A485A5B6C5AEA 01801C3A72F736>39 D70 D77 D<001FC012F8A7481FFC03F0C76C91C7120F92 C8EF007F02F81B1F02E01B0702801B0191C984491D7F491D3F491D1FA2491D0FA2491D07 007F1FFEA2491D03A4491D01A700FF1FFF90CA85A6CB1A00B3B3B3AD4ABC12C0A8787479 F387>84 DI87 D<92383FFFF80207B612E0027F15FC49B87E010717E0011F 83499026F0007F13FC4948C7000F7F90B502036D7E486E6D806F6D80727F486E6E7F8486 727FA28684A26C5C72806C5C6D90C8FC6D5AEB0FF8EB03E090CAFCA70507B6FC041FB7FC 0303B8FC157F0203B9FC021FECFE0391B612800103ECF800010F14C04991C7FC017F13FC 90B512F04814C0485C4891C8FC485B5A485B5C5A5CA2B5FC5CA360A36E5DA26C5F6E5D18 7E6C6D846E4A48806C6D4A4814FC6C6ED90FF0ECFFFC6C02E090263FE07F14FE00019139 FC03FFC06C91B6487E013F4B487E010F4B1307010303F01301D9003F0280D9003F13FC02 0101F8CBFC57507ACE5E>97 D<93387FFF80030FB512FC037FECFF804AB712E0020716F8 021F16FE027FD9F8077F49B5D8C000804991C7003F13E04901FC020F7F49496E7F494980 49496E7F49496E7F90B55A48727E92C914804884485B1BC048841BE0485BA27313F05AA2 5C5AA21BF885A2B5FCA391BAFCA41BF002F8CCFCA67EA3807EA47E806CF103F0F207F86C 7F1A0F6C6E17F06C191F6F17E06C6E163F6D6DEE7FC06D6D16FF6D6D4B13806D6D4B1300 6D6D6CEC0FFE6D02E0EC3FFC6D02F8ECFFF86D9126FFC00F5B023F91B65A020F17800203 4CC7FC020016F8031F15E0030392C8FCDB000F13E04D507BCE58>101 D<903801FFFCB6FCA8C67E131F7FB3B3B3B3B3ABB812C0A82A7879F735>108 D<902601FFF891380FFFE0B692B512FE05036E7E050F15E0053F15F84D81932701FFF01F 7F4CD900077FDC07FC6D80C66CDA0FF06D80011FDA1FC07F6D4A48824CC8FC047E6F7F5E EDF9F85E03FB707F5E15FF5EA25EA293C9FCA45DB3B3A6B8D8E003B81280A8614E79CD6C >110 D<902601FFF8EB07FEB691383FFFC094B512F00403804C14FE4C8093261FFC3F13 8093263FE07F13C0DC7F80B5FCC66C5D011FDAFE0114E06DEBF9FC16F815FB16F016E015 FF16C07114C05E72138095381FFE0093C76C5AF001E095C8FCA25DA65DB3B3A2B812F8A8 434E7ACD4F>114 D<912603FFFCEB0780027F9039FFE00FC00103B6EAF83F010FEDFEFF 013F92B5FC49EB000F2601FFF01300480180143F4890C8120F4848814848814981123F83 485A187FA212FF6D163FA37F7F6DEE1F8002C092C7FC14F014FEECFFF06CECFF8016FEEE FFE06C16FC6C16FF18C06C836C17F86C836C836C83013F17806D17C0010717E0010117F0 EB003F020716F8EC001F030015FC1607EE007F051F13FE1707007E82B482836D167FA218 3F7F181FA27F19FC7FA26D163F6D17F86D167F19F06D16FF6E4A13E002E04A13C06E4A13 8002FE023F1300913AFFC003FFFE01E790B65A01C316F0018016C026FE003F92C7FC4801 0714F80070D9007F90C8FC3F507ACE4C>I117 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 end %%EndSetup %%Page: 1 1 TeXDict begin 1 0 bop 150 2414 a Fw(FFTW)64 b(User's)h(Man)-5 b(ual)p 150 2481 3600 34 v 2449 2577 a Fv(F)d(or)32 b(v)m(ersion)d (2.1.5,)k(16)e(Marc)m(h)g(2003)150 4958 y Fu(Matteo)46 b(F)-11 b(rigo)150 5091 y(Stev)l(en)46 b(G.)e(Johnson)p 150 5141 3600 17 v eop end %%Page: 2 2 TeXDict begin 2 1 bop 150 4371 a Fv(Cop)m(yrigh)m(t)602 4368 y(c)577 4371 y Ft(\015)30 b Fv(1997{1999)35 b(Massac)m(h)m(usetts) d(Institute)e(of)g(T)-8 b(ec)m(hnology)g(.)150 4505 y(P)m(ermission)30 b(is)i(gran)m(ted)h(to)f(mak)m(e)i(and)d(distribute)f(v)m(erbatim)i (copies)g(of)g(this)f(man)m(ual)h(pro)m(vided)f(the)150 4615 y(cop)m(yrigh)m(t)g(notice)f(and)g(this)f(p)s(ermission)f(notice)i (are)h(preserv)m(ed)f(on)h(all)e(copies.)150 4749 y(P)m(ermission)22 b(is)g(gran)m(ted)j(to)f(cop)m(y)g(and)f(distribute)e(mo)s(di\014ed)h (v)m(ersions)h(of)g(this)g(man)m(ual)g(under)f(the)h(con-)150 4859 y(ditions)28 b(for)i(v)m(erbatim)f(cop)m(ying,)i(pro)m(vided)d (that)j(the)f(en)m(tire)g(resulting)e(deriv)m(ed)h(w)m(ork)h(is)f (distributed)150 4969 y(under)g(the)h(terms)h(of)f(a)h(p)s(ermission)c (notice)k(iden)m(tical)e(to)i(this)e(one.)150 5103 y(P)m(ermission)i (is)i(gran)m(ted)g(to)h(cop)m(y)g(and)f(distribute)d(translations)i(of) i(this)e(man)m(ual)g(in)m(to)h(another)g(lan-)150 5213 y(guage,)d(under)e(the)g(ab)s(o)m(v)m(e)i(conditions)d(for)i(mo)s (di\014ed)d(v)m(ersions,)j(except)g(that)h(this)d(p)s(ermission)f (notice)150 5322 y(ma)m(y)31 b(b)s(e)f(stated)h(in)e(a)i(translation)e (appro)m(v)m(ed)i(b)m(y)f(the)h(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation.)p eop end %%Page: 1 3 TeXDict begin 1 2 bop 150 -116 a Fv(Chapter)30 b(1:)41 b(In)m(tro)s(duction)2591 b(1)150 299 y Fs(1)80 b(In)l(tro)t(duction) 275 518 y Fv(This)33 b(man)m(ual)i(do)s(cumen)m(ts)h(v)m(ersion)f (2.1.5)j(of)d(FFTW,)i(the)f Fr(F)-7 b(astest)39 b(F)-7 b(ourier)38 b(T)-7 b(r)i(ansform)40 b(in)e(the)150 628 y(West)p Fv(.)56 b(FFTW)36 b(is)e(a)i(comprehensiv)m(e)f(collection)g (of)h(fast)g(C)f(routines)f(for)h(computing)g(the)g(discrete)150 737 y(F)-8 b(ourier)34 b(transform)g(\(DFT\))i(in)d(one)i(or)g(more)g (dimensions,)e(of)i(b)s(oth)f(real)g(and)g(complex)h(data,)i(and)150 847 y(of)47 b(arbitrary)e(input)f(size.)89 b(FFTW)47 b(also)f(includes)e(parallel)g(transforms)i(for)g(b)s(oth)g(shared-)g (and)150 956 y(distributed-memory)36 b(systems.)66 b(W)-8 b(e)40 b(assume)f(herein)e(that)j(the)f(reader)f(is)g(already)h (familiar)d(with)150 1066 y(the)28 b(prop)s(erties)d(and)i(uses)g(of)g (the)h(DFT)g(that)g(are)f(relev)-5 b(an)m(t)28 b(to)g(her)f (application.)38 b(Otherwise,)27 b(see)h(e.g.)150 1176 y Fq(The)f(F)-8 b(ast)29 b(F)-8 b(ourier)27 b(T)-8 b(ransform)27 b Fv(b)m(y)g(E.)g(O.)h(Brigham)f(\(Pren)m(tice-Hall,)h(Englew)m(o)s(o)s (d)f(Cli\013s,)f(NJ,)i(1974\).)150 1285 y(Our)h(w)m(eb)h(page)i(\()p Fp(http://www.fftw.org)p Fv(\))25 b(also)31 b(has)f(links)e(to)j (FFT-related)g(information)e(online.)275 1417 y(FFTW)46 b(is)e(usually)f(faster)j(\(and)f(sometimes)h(m)m(uc)m(h)f(faster\))i (than)e(all)f(other)i(freely-a)m(v)-5 b(ailable)150 1526 y(F)d(ourier)40 b(transform)f(programs)h(found)f(on)h(the)g(Net.)71 b(F)-8 b(or)41 b(transforms)f(whose)g(size)g(is)f(a)i(p)s(o)m(w)m(er)f (of)150 1636 y(t)m(w)m(o,)f(it)c(compares)h(fa)m(v)m(orably)g(with)e (the)i(FFT)g(co)s(des)g(in)e(Sun's)g(P)m(erformance)i(Library)e(and)h (IBM's)150 1745 y(ESSL)k(library)-8 b(,)41 b(whic)m(h)f(are)h(targeted) h(at)f(sp)s(eci\014c)e(mac)m(hines.)71 b(Moreo)m(v)m(er,)45 b(FFTW's)d(p)s(erformance)150 1855 y(is)e Fr(p)-5 b(ortable)p Fv(.)73 b(Indeed,)43 b(FFTW)e(is)f(unique)e(in)i(that)h(it)f (automatically)g(adapts)h(itself)f(to)h(y)m(our)f(ma-)150 1965 y(c)m(hine,)47 b(y)m(our)c(cac)m(he,)49 b(the)43 b(size)h(of)f(y)m(our)h(memory)-8 b(,)47 b(the)d(n)m(um)m(b)s(er)e(of)i (registers,)j(and)c(all)f(the)i(other)150 2074 y(factors)27 b(that)f(normally)e(mak)m(e)j(it)f(imp)s(ossible)c(to)27 b(optimize)e(a)i(program)e(for)h(more)g(than)g(one)g(mac)m(hine.)150 2184 y(An)43 b(extensiv)m(e)g(comparison)f(of)h(FFTW's)h(p)s (erformance)e(with)g(that)h(of)g(other)g(F)-8 b(ourier)43 b(transform)150 2293 y(co)s(des)35 b(has)f(b)s(een)g(made.)53 b(The)34 b(results)f(are)i(a)m(v)-5 b(ailable)34 b(on)g(the)h(W)-8 b(eb)35 b(at)g(the)g(b)s(enc)m(hFFT)f(home)g(page)150 2403 y(\()p Fp(http://theory.lcs.mit.edu/)o(~be)o(nchf)o(ft)p Fv(\).)275 2534 y(In)27 b(order)g(to)i(use)e(FFTW)i(e\013ectiv)m(ely)-8 b(,)30 b(y)m(ou)e(need)f(to)i(understand)d(one)i(basic)f(concept)i(of)f (FFTW's)150 2644 y(in)m(ternal)35 b(structure.)60 b(FFTW)37 b(do)s(es)f(not)h(used)f(a)h(\014xed)f(algorithm)g(for)h(computing)e (the)i(transform,)150 2754 y(but)42 b(it)h(can)g(adapt)g(the)g(DFT)h (algorithm)e(to)h(details)f(of)h(the)h(underlying)c(hardw)m(are)i(in)g (order)g(to)150 2863 y(ac)m(hiev)m(e)27 b(b)s(est)e(p)s(erformance.)38 b(Hence,)27 b(the)f(computation)f(of)h(the)f(transform)g(is)g(split)e (in)m(to)i(t)m(w)m(o)i(phases.)150 2973 y(First,)k(FFTW's)h Fq(planner)j Fv(is)c(called,)f(whic)m(h)g(\\learns")h(the)g(fastest)h (w)m(a)m(y)g(to)g(compute)f(the)h(transform)150 3082 y(on)j(y)m(our)f(mac)m(hine.)54 b(The)34 b(planner)f(pro)s(duces)g(a)i (data)g(structure)g(called)e(a)j Fq(plan)d Fv(that)i(con)m(tains)g (this)150 3192 y(information.)61 b(Subsequen)m(tly)-8 b(,)38 b(the)g(plan)f(is)g(passed)g(to)h(FFTW's)h Fq(executor)p Fv(,)i(along)c(with)g(an)g(arra)m(y)150 3302 y(of)c(input)d(data.)48 b(The)32 b(executor)i(computes)f(the)f(actual)h(transform,)g(as)g (dictated)f(b)m(y)h(the)g(plan.)45 b(The)150 3411 y(plan)39 b(can)h(b)s(e)g(reused)f(as)i(man)m(y)f(times)g(as)g(needed.)70 b(In)39 b(t)m(ypical)h(high-p)s(erformance)e(applications,)150 3521 y(man)m(y)f(transforms)f(of)i(the)f(same)h(size)f(are)g(computed,) i(and)d(consequen)m(tly)h(a)h(relativ)m(ely-exp)s(ensiv)m(e)150 3630 y(initialization)30 b(of)k(this)e(sort)i(is)f(acceptable.)51 b(On)32 b(the)i(other)g(hand,)f(if)g(y)m(ou)g(need)h(a)f(single)g (transform)150 3740 y(of)e(a)h(giv)m(en)f(size,)h(the)f(one-time)h (cost)g(of)f(the)h(planner)d(b)s(ecomes)i(signi\014can)m(t.)42 b(F)-8 b(or)32 b(this)f(case,)h(FFTW)150 3850 y(pro)m(vides)d(fast)i (planners)d(based)j(on)f(heuristics)e(or)i(on)h(previously)d(computed)i (plans.)275 3981 y(The)24 b(pattern)h(of)g(planning/execution)e (applies)g(to)i(all)f(four)g(op)s(eration)g(mo)s(des)g(of)h(FFTW,)h (that)g(is,)150 4091 y(I\))k(one-dimensional)23 b(complex)i(transforms) f(\(FFTW\),)i(I)s(I\))k(m)m(ulti-dimensional)21 b(complex)k(transforms) 150 4200 y(\(FFTWND\),)e(I)s(I)s(I\))29 b(one-dimensional)19 b(transforms)h(of)h(real)f(data)i(\(RFFTW\),)g(IV\))31 b(m)m(ulti-dimensional)150 4310 y(transforms)23 b(of)i(real)f(data)h (\(RFFTWND\).)h(Eac)m(h)f(mo)s(de)f(comes)h(with)e(its)h(o)m(wn)g (planner)f(and)h(executor.)275 4441 y(Besides)k(the)i(automatic)g(p)s (erformance)e(adaptation)i(p)s(erformed)d(b)m(y)i(the)h(planner,)d(it)i (is)f(also)h(p)s(os-)150 4551 y(sible)c(for)h(adv)-5 b(anced)26 b(users)f(to)j(customize)e(FFTW)h(for)f(their)g(sp)s(ecial)f (needs.)39 b(As)26 b(distributed,)e(FFTW)150 4661 y(w)m(orks)31 b(most)h(e\016cien)m(tly)f(for)g(arra)m(ys)g(whose)g(size)g(can)h(b)s (e)e(factored)j(in)m(to)e(small)e(primes)h(\(2,)i(3,)g(5,)h(and)150 4770 y(7\),)42 b(and)c(uses)h(a)g(slo)m(w)m(er)g(general-purp)s(ose)e (routine)h(for)h(other)g(factors.)67 b(FFTW,)40 b(ho)m(w)m(ev)m(er,)i (comes)150 4880 y(with)32 b(a)h(co)s(de)h(generator)g(that)f(can)h(pro) s(duce)e(fast)h(C)g(programs)f(for)h(an)m(y)h(particular)d(arra)m(y)j (size)f(y)m(ou)150 4989 y(ma)m(y)25 b(care)g(ab)s(out.)38 b(F)-8 b(or)25 b(example,)g(if)e(y)m(ou)i(need)f(transforms)f(of)h (size)g(513)j(=)e(19)8 b Ft(\001)g Fv(3)2946 4956 y Fo(3)2984 4989 y Fv(,)26 b(y)m(ou)e(can)h(customize)150 5099 y(FFTW)31 b(to)g(supp)s(ort)e(the)h(factor)i(19)f(e\016cien)m(tly)-8 b(.)275 5230 y(FFTW)33 b(can)f(exploit)g(m)m(ultiple)e(pro)s(cessors)i (if)f(y)m(ou)i(ha)m(v)m(e)g(them.)47 b(FFTW)33 b(comes)g(with)f(a)g (shared-)150 5340 y(memory)i(implemen)m(tation)f(on)h(top)g(of)g(POSIX) g(\(and)f(similar\))f(threads,)j(as)g(w)m(ell)e(as)h(a)h(distributed-)p eop end %%Page: 2 4 TeXDict begin 2 3 bop 150 -116 a Fv(2)3277 b(FFTW)150 299 y(memory)23 b(implemen)m(tation)e(based)i(on)g(MPI.)g(W)-8 b(e)24 b(also)e(pro)m(vide)g(an)h(exp)s(erimen)m(tal)f(parallel)f (implemen-)150 408 y(tation)34 b(written)f(in)g(Cilk,)g Fr(the)j(sup)-5 b(erior)37 b(pr)-5 b(o)g(gr)g(amming)40 b(to)-5 b(ol)37 b(of)f(choic)-5 b(e)37 b(for)f(discriminating)h (hackers)150 518 y Fv(\(Olin)28 b(Shiv)m(ers\).)40 b(\(See)31 b(the)g(Cilk)d(home)i(page)h(\()p Fp(http://supertech.lcs.mit.ed)o (u/ci)o(lk)p Fv(\).\))275 653 y(F)-8 b(or)31 b(more)g(information)e (regarding)g(FFTW,)j(see)f(the)g(pap)s(er,)f(\\The)g(F)-8 b(astest)33 b(F)-8 b(ourier)30 b(T)-8 b(ransform)150 762 y(in)29 b(the)i(W)-8 b(est,")33 b(b)m(y)e(M.)g(F)-8 b(rigo)32 b(and)e(S.)g(G.)i(Johnson,)e(whic)m(h)f(is)h(the)h(tec)m (hnical)g(rep)s(ort)f(MIT-LCS-TR-)150 872 y(728)f(\(Sep.)40 b('97\).)i(See)28 b(also,)h(\\FFTW:)g(An)f(Adaptiv)m(e)g(Soft)m(w)m (are)h(Arc)m(hitecture)g(for)f(the)g(FFT,")h(b)m(y)f(M.)150 981 y(F)-8 b(rigo)24 b(and)f(S.)g(G.)h(Johnson,)g(whic)m(h)e(app)s (eared)h(in)f(the)i(23rd)g(In)m(ternational)e(Conference)i(on)f (Acoustics,)150 1091 y(Sp)s(eec)m(h,)40 b(and)d(Signal)f(Pro)s(cessing) h(\()p Fq(Pro)s(c.)63 b(ICASSP)36 b(1998)47 b Fn(3)p Fv(,)40 b(p.)63 b(1381\).)i(The)37 b(co)s(de)h(generator)h(is)150 1200 y(describ)s(ed)d(in)g(the)i(pap)s(er)e(\\A)i(F)-8 b(ast)39 b(F)-8 b(ourier)37 b(T)-8 b(ransform)37 b(Compiler",)h(b)m(y)g (M.)g(F)-8 b(rigo,)40 b(to)e(app)s(ear)f(in)150 1310 y(the)25 b Fq(Pro)s(ceedings)f(of)h(the)g(1999)h(A)m(CM)g(SIGPLAN)e (Conference)h(on)f(Programming)g(Language)i(Design)150 1420 y(and)36 b(Implemen)m(tation)h(\(PLDI\),)h(A)m(tlan)m(ta,)i (Georgia,)g(Ma)m(y)e(1999)p Fv(.)62 b(These)37 b(pap)s(ers,)h(along)f (with)f(the)150 1529 y(latest)28 b(v)m(ersion)e(of)h(FFTW,)h(the)f(F) -10 b(A)m(Q,)28 b(b)s(enc)m(hmarks,)f(and)g(other)g(links,)e(are)j(a)m (v)-5 b(ailable)26 b(at)i(the)f(FFTW)150 1639 y(home)22 b(page)h(\()p Fp(http://www.fftw.org)p Fv(\).)33 b(The)21 b(curren)m(t)h(v)m(ersion)f(of)h(FFTW)h(incorp)s(orates)e(man)m(y)h(go) s(o)s(d)150 1748 y(ideas)30 b(from)f(the)i(past)f(thirt)m(y)g(y)m(ears) h(of)f(FFT)g(literature.)40 b(In)30 b(one)g(w)m(a)m(y)h(or)f(another,)h (FFTW)g(uses)f(the)150 1858 y(Co)s(oley-T)-8 b(uk)m(ey)39 b(algorithm,)i(the)e(Prime)f(F)-8 b(actor)41 b(algorithm,)f(Rader's)f (algorithm)f(for)h(prime)e(sizes,)150 1968 y(and)29 b(the)g (split-radix)e(algorithm)h(\(with)g(a)i(v)-5 b(ariation)28 b(due)h(to)h(Dan)f(Bernstein\).)40 b(Our)28 b(co)s(de)i(generator)150 2077 y(also)39 b(pro)s(duces)f(new)h(algorithms)f(that)i(w)m(e)g(do)f (not)h(y)m(et)g(completely)f(understand.)66 b(The)39 b(reader)g(is)150 2187 y(referred)30 b(to)h(the)f(cited)h(pap)s(ers)e (for)h(the)g(appropriate)g(references.)275 2321 y(The)38 b(rest)g(of)h(this)f(man)m(ual)f(is)h(organized)h(as)f(follo)m(ws.)65 b(W)-8 b(e)40 b(\014rst)e(discuss)e(the)j(sequen)m(tial)f(\(one-)150 2431 y(pro)s(cessor\))d(implemen)m(tation.)53 b(W)-8 b(e)37 b(start)e(b)m(y)g(describing)e(the)i(basic)g(features)g(of)g (FFTW)h(in)e(Chap-)150 2540 y(ter)h(2)f([T)-8 b(utorial],)35 b(page)g(3.)53 b(This)32 b(discussion)g(includes)f(the)k(storage)h(sc)m (heme)f(of)f(m)m(ulti-dimensional)150 2650 y(arra)m(ys)g(\(Section)f (2.5)i([Multi-dimensional)30 b(Arra)m(y)k(F)-8 b(ormat],)36 b(page)e(11\))h(and)d(FFTW's)j(mec)m(hanisms)150 2760 y(for)23 b(storing)g(plans)e(on)i(disk)f(\(Section)h(2.6)h([W)-8 b(ords)24 b(of)f(Wisdom],)i(page)f(13\).)39 b(Next,)26 b(Chapter)c(3)i([FFTW)150 2869 y(Reference],)i(page)e(17)h(pro)m(vides) d(comprehensiv)m(e)h(do)s(cumen)m(tation)h(of)f(all)g(FFTW's)h (features.)39 b(P)m(arallel)150 2979 y(transforms)25 b(are)i(discussed)d(in)g(their)h(o)m(wn)h(c)m(hapter)h(Chapter)f(4)g ([P)m(arallel)f(FFTW],)i(page)g(37.)40 b(F)-8 b(ortran)150 3088 y(programmers)26 b(can)g(also)h(use)f(FFTW,)h(as)g(describ)s(ed)d (in)h(Chapter)h(5)g([Calling)f(FFTW)i(from)f(F)-8 b(ortran],)150 3198 y(page)25 b(51.)39 b(Chapter)24 b(6)g([Installation)f(and)g (Customization],)i(page)g(55)g(explains)d(ho)m(w)i(to)h(install)d(FFTW) 150 3308 y(in)33 b(y)m(our)i(computer)f(system)h(and)f(ho)m(w)h(to)g (adapt)g(FFTW)g(to)h(y)m(our)e(needs.)53 b(License)35 b(and)f(cop)m(yrigh)m(t)150 3417 y(information)e(is)h(giv)m(en)h(in)f (Chapter)g(8)h([License)g(and)f(Cop)m(yrigh)m(t],)i(page)g(63.)52 b(Finally)-8 b(,)33 b(w)m(e)h(thank)g(all)150 3527 y(the)d(p)s(eople)e (who)h(help)s(ed)e(us)i(in)f(Chapter)h(7)h([Ac)m(kno)m(wledgmen)m(ts],) h(page)f(61.)p eop end %%Page: 3 5 TeXDict begin 3 4 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2768 b(3)150 299 y Fs(2)80 b(T)-13 b(utorial)275 535 y Fv(This)24 b(c)m(hapter)i(describ)s(es)f(the)h(basic)f(usage)i (of)f(FFTW,)h(i.e.,)g(ho)m(w)f(to)h(compute)f(the)g(F)-8 b(ourier)26 b(trans-)150 645 y(form)33 b(of)h(a)h(single)d(arra)m(y)-8 b(.)52 b(This)32 b(c)m(hapter)i(tells)f(the)h(truth,)g(but)g(not)g(the) g Fr(whole)42 b Fv(truth.)50 b(Sp)s(eci\014cally)-8 b(,)150 754 y(FFTW)26 b(implemen)m(ts)f(additional)e(routines)i(and)g(\015ags,) i(pro)m(viding)d(extra)i(functionalit)m(y)-8 b(,)26 b(that)h(are)f(not) 150 864 y(do)s(cumen)m(ted)32 b(here.)45 b(See)33 b(Chapter)e(3)h ([FFTW)h(Reference],)h(page)f(17,)g(for)f(more)g(complete)h(informa-) 150 974 y(tion.)39 b(\(Note)28 b(that)g(y)m(ou)f(need)f(to)h(compile)f (and)g(install)e(FFTW)k(b)s(efore)e(y)m(ou)h(can)g(use)f(it)h(in)e(a)i (program.)150 1083 y(See)g(Chapter)g(6)g([Installation)f(and)h (Customization],)g(page)h(55,)h(for)e(the)g(details)f(of)h(the)g (installation.\))275 1218 y(Here,)h(w)m(e)e(assume)h(a)g(default)e (installation)f(of)j(FFTW.)h(In)d(some)i(installations)d(\(particulary) h(from)150 1328 y(binary)e(pac)m(k)-5 b(ages\),)28 b(the)d(FFTW)g (header)g(\014les)e(and)i(libraries)c(are)k(pre\014xed)f(with)f(`)p Fp(d)p Fv(')i(or)g(`)p Fp(s)p Fv(')f(to)i(indicate)150 1438 y(v)m(ersions)k(in)f(double)g(or)i(single)e(precision,)g(resp)s (ectiv)m(ely)-8 b(.)42 b(The)30 b(usage)h(of)g(FFTW)g(in)e(that)i(case) h(is)e(the)150 1547 y(same,)e(except)h(that)e Fp(#include)e Fv(directiv)m(es)i(and)f(link)g(commands)g(m)m(ust)h(use)g(the)h (appropriate)e(pre\014x.)150 1657 y(See)35 b(Section)g(6.3)i ([Installing)c(FFTW)j(in)e(b)s(oth)g(single)g(and)h(double)e (precision],)i(page)h(57,)i(for)d(more)150 1766 y(information.)275 1902 y(This)i(tutorial)h(c)m(hapter)h(is)f(structured)g(as)h(follo)m (ws.)66 b(Section)39 b(2.1)h([Complex)e(One-dimensional)150 2011 y(T)-8 b(ransforms)29 b(T)-8 b(utorial],)29 b(page)i(3)g(describ)s (es)d(the)i(basic)g(usage)g(of)g(the)h(one-dimensional)c(transform)j (of)150 2121 y(complex)38 b(data.)64 b(Section)37 b(2.2)j([Complex)d (Multi-dimensional)d(T)-8 b(ransforms)37 b(T)-8 b(utorial],)39 b(page)f(4)h(de-)150 2230 y(scrib)s(es)e(the)i(basic)f(usage)h(of)g (the)g(m)m(ulti-dimensional)c(transform)j(of)h(complex)f(data.)66 b(Section)39 b(2.3)150 2340 y([Real)e(One-dimensional)e(T)-8 b(ransforms)36 b(T)-8 b(utorial],)38 b(page)g(6)g(describ)s(es)d(the)j (one-dimensional)d(trans-)150 2449 y(form)d(of)h(real)g(data)h(and)e (its)g(in)m(v)m(erse.)48 b(Finally)-8 b(,)32 b(Section)h(2.4)h([Real)f (Multi-dimensional)c(T)-8 b(ransforms)150 2559 y(T)g(utorial],)27 b(page)g(7)g(describ)s(es)e(the)i(m)m(ulti-dimensional)22 b(transform)k(of)h(real)f(data)h(and)f(its)g(in)m(v)m(erse.)40 b(W)-8 b(e)150 2669 y(recommend)39 b(that)h(y)m(ou)f(read)h(these)f (sections)h(in)d(the)j(order)f(that)g(they)h(are)g(presen)m(ted.)67 b(W)-8 b(e)40 b(then)150 2778 y(discuss)30 b(t)m(w)m(o)j(topics)e(in)g (detail.)43 b(In)31 b(Section)h(2.5)g([Multi-dimensional)c(Arra)m(y)k (F)-8 b(ormat],)34 b(page)e(11,)h(w)m(e)150 2888 y(discuss)25 b(the)h(v)-5 b(arious)26 b(alternativ)m(es)h(for)f(storing)g(m)m (ulti-dimensional)d(arra)m(ys)k(in)e(memory)-8 b(.)39 b(Section)27 b(2.6)150 2997 y([W)-8 b(ords)31 b(of)f(Wisdom],)g(page)i (13)f(sho)m(ws)f(ho)m(w)g(y)m(ou)h(can)g(sa)m(v)m(e)h(FFTW's)f(plans)e (for)h(future)f(use.)150 3257 y Fu(2.1)68 b(Complex)46 b(One-dimensional)g(T)-11 b(ransforms)45 b(T)-11 b(utorial)275 3450 y Fv(The)29 b(basic)h(usage)h(of)g(FFTW)g(is)e(simple.)39 b(A)30 b(t)m(ypical)g(call)g(to)h(FFTW)g(lo)s(oks)f(lik)m(e:)390 3579 y Fp(#include)46 b()390 3683 y(...)390 3787 y({)629 3891 y(fftw_complex)e(in[N],)i(out[N];)629 3994 y(fftw_plan)f(p;)629 4098 y(...)629 4202 y(p)i(=)h (fftw_create_plan\(N,)42 b(FFTW_FORWARD,)i(FFTW_ESTIMATE\);)629 4306 y(...)629 4410 y(fftw_one\(p,)g(in,)j(out\);)629 4513 y(...)629 4617 y(fftw_destroy_plan\(p\);)390 4721 y(})275 4856 y Fv(The)33 b(\014rst)g(thing)g(w)m(e)h(do)g(is)f(to)i (create)g(a)f Fq(plan)p Fv(,)g(whic)m(h)e(is)h(an)h(ob)5 b(ject)35 b(that)f(con)m(tains)g(all)f(the)h(data)150 4966 y(that)d(FFTW)g(needs)f(to)h(compute)g(the)f(FFT,)h(using)e(the)i (follo)m(wing)e(function:)390 5095 y Fp(fftw_plan)45 b(fftw_create_plan\(int)e(n,)k(fftw_direction)d(dir,)i(int)h(flags\);) 275 5230 y Fv(The)26 b(\014rst)h(argumen)m(t,)i Fp(n)p Fv(,)e(is)g(the)g(size)h(of)f(the)h(transform)e(y)m(ou)i(are)g(trying)e (to)i(compute.)40 b(The)27 b(size)g Fp(n)150 5340 y Fv(can)c(b)s(e)f (an)m(y)h(p)s(ositiv)m(e)e(in)m(teger,)k(but)d(sizes)g(that)h(are)g (pro)s(ducts)f(of)g(small)f(factors)j(are)f(transformed)f(most)p eop end %%Page: 4 6 TeXDict begin 4 5 bop 150 -116 a Fv(4)3277 b(FFTW)150 299 y(e\016cien)m(tly)-8 b(.)40 b(The)26 b(second)h(argumen)m(t,)i Fp(dir)p Fv(,)e(can)g(b)s(e)f(either)h Fp(FFTW_FORWARD)c Fv(or)k Fp(FFTW_BACKWARD)p Fv(,)e(and)150 408 y(indicates)35 b(the)i(direction)e(of)h(the)h(transform)f(y)m(ou)g(are)h(in)m (terested)g(in.)57 b(Alternativ)m(ely)-8 b(,)38 b(y)m(ou)f(can)f(use) 150 518 y(the)c(sign)g(of)g(the)g(exp)s(onen)m(t)h(in)d(the)j (transform,)f Ft(\000)p Fv(1)g(or)h(+)o(1,)h(whic)m(h)d(corresp)s(onds) f(to)j Fp(FFTW_FORWARD)150 628 y Fv(or)43 b Fp(FFTW_BACKWARD)c Fv(resp)s(ectiv)m(ely)-8 b(.)78 b(The)42 b Fp(flags)g Fv(argumen)m(t)h(is)f(either)g Fp(FFTW_MEASURE)e Fv(or)i Fp(FFTW_)150 737 y(ESTIMATE)p Fv(.)68 b Fp(FFTW_MEASURE)37 b Fv(means)j(that)h(FFTW)f(actually)g(runs)f(and)g(measures)h(the)h (execution)150 847 y(time)f(of)g(sev)m(eral)g(FFTs)h(in)d(order)i(to)h (\014nd)d(the)i(b)s(est)g(w)m(a)m(y)h(to)g(compute)f(the)h(transform)e (of)h(size)g Fp(n)p Fv(.)150 956 y(This)27 b(ma)m(y)j(tak)m(e)h(some)e (time,)g(dep)s(ending)e(on)i(y)m(our)g(installation)e(and)i(on)g(the)g (precision)e(of)i(the)h(timer)150 1066 y(in)39 b(y)m(our)h(mac)m(hine.) 71 b Fp(FFTW_ESTIMATE)p Fv(,)39 b(on)h(the)h(con)m(trary)-8 b(,)44 b(do)s(es)c(not)h(run)e(an)m(y)i(computation,)i(and)150 1176 y(just)31 b(builds)e(a)j(reasonable)g(plan,)f(whic)m(h)g(ma)m(y)h (b)s(e)g(sub-optimal.)43 b(In)31 b(other)h(w)m(ords,)g(if)f(y)m(our)h (program)150 1285 y(p)s(erforms)37 b(man)m(y)i(transforms)f(of)h(the)g (same)g(size)f(and)g(initialization)e(time)i(is)g(not)h(imp)s(ortan)m (t,)h(use)150 1395 y Fp(FFTW_MEASURE)p Fv(;)h(otherwise)d(use)h(the)h (estimate.)68 b(\(A)40 b(compromise)f(b)s(et)m(w)m(een)h(these)g(t)m(w) m(o)g(extremes)150 1504 y(exists.)g(See)31 b(Section)f(2.6)i([W)-8 b(ords)30 b(of)h(Wisdom],)f(page)h(13.\))275 1639 y(Once)d(the)g(plan)f (has)h(b)s(een)f(created,)j(y)m(ou)f(can)f(use)g(it)g(as)g(man)m(y)h (times)e(as)i(y)m(ou)f(lik)m(e)g(for)g(transforms)150 1749 y(on)k(arra)m(ys)h(of)f(the)g(same)h(size.)46 b(When)32 b(y)m(ou)g(are)h(done)f(with)f(the)h(plan,)g(y)m(ou)g(deallo)s(cate)h (it)e(b)m(y)h(calling)150 1858 y Fp(fftw_destroy_plan\(plan\))p Fv(.)275 1993 y(The)g(transform)h(itself)g(is)f(computed)h(b)m(y)h (passing)e(the)i(plan)e(along)h(with)f(the)i(input)d(and)i(output)150 2102 y(arra)m(ys)e(to)g Fp(fftw_one)p Fv(:)390 2231 y Fp(void)47 b(fftw_one\(fftw_plan)42 b(plan,)47 b(fftw_complex)d(*in,)j (fftw_complex)d(*out\);)275 2366 y Fv(Note)h(that)f(the)g(transform)f (is)f(out)i(of)g(place:)68 b Fp(in)43 b Fv(and)g Fp(out)g Fv(m)m(ust)g(p)s(oin)m(t)g(to)h(distinct)e(arra)m(ys.)150 2475 y(It)i(op)s(erates)h(on)f(data)h(of)g(t)m(yp)s(e)f Fp(fftw_complex)p Fv(,)h(a)f(data)h(structure)f(with)f(real)h(\()p Fp(in[i].re)p Fv(\))f(and)150 2585 y(imaginary)31 b(\()p Fp(in[i].im)p Fv(\))g(\015oating-p)s(oin)m(t)h(comp)s(onen)m(ts.)47 b(The)32 b Fp(in)g Fv(and)g Fp(out)g Fv(arra)m(ys)g(should)f(ha)m(v)m (e)j(the)150 2694 y(length)h(sp)s(eci\014ed)e(when)i(the)g(plan)f(w)m (as)i(created.)56 b(An)35 b(alternativ)m(e)h(function,)f Fp(fftw)p Fv(,)h(allo)m(ws)f(y)m(ou)g(to)150 2804 y(e\016cien)m(tly)g (p)s(erform)f(m)m(ultiple)g(and/or)h(strided)f(transforms)h(\(see)h (Chapter)f(3)h([FFTW)h(Reference],)150 2914 y(page)31 b(17\).)275 3048 y(The)39 b(DFT)i(results)e(are)i(stored)g(in-order)e (in)g(the)h(arra)m(y)h Fp(out)p Fv(,)h(with)e(the)g(zero-frequency)h (\(DC\))150 3158 y(comp)s(onen)m(t)46 b(in)e Fp(out[0])p Fv(.)84 b(The)45 b(arra)m(y)h Fp(in)f Fv(is)f(not)i(mo)s(di\014ed.)83 b(Users)46 b(should)d(note)j(that)g(FFTW)150 3267 y(computes)27 b(an)h(unnormalized)c(DFT,)k(the)g(sign)e(of)h(whose)h(exp)s(onen)m(t)f (is)f(giv)m(en)h(b)m(y)h(the)f Fp(dir)f Fv(parameter)150 3377 y(of)35 b Fp(fftw_create_plan)p Fv(.)50 b(Th)m(us,)35 b(computing)f(a)h(forw)m(ard)f(follo)m(w)m(ed)g(b)m(y)h(a)g(bac)m(kw)m (ard)g(transform)g(\(or)150 3486 y(vice)29 b(v)m(ersa\))i(results)d(in) g(the)h(original)f(arra)m(y)h(scaled)h(b)m(y)f Fp(n)p Fv(.)40 b(See)29 b(Section)g(3.2.5)j([What)e(FFTW)g(Really)150 3596 y(Computes],)g(page)h(21,)h(for)e(the)h(de\014nition)d(of)i(DFT.) 275 3731 y(A)37 b(program)g(using)f(FFTW)h(should)f(b)s(e)g(link)m(ed)g (with)g Fp(-lfftw)28 b(-lm)37 b Fv(on)g(Unix)f(systems,)j(or)e(with)150 3840 y(the)31 b(FFTW)g(and)e(standard)h(math)g(libraries)e(in)h (general.)150 4098 y Fu(2.2)68 b(Complex)46 b(Multi-dimensional)g(T)-11 b(ransforms)45 b(T)-11 b(utorial)275 4290 y Fv(FFTW)34 b(can)h(also)f(compute)g(transforms)f(of)i(an)m(y)f(n)m(um)m(b)s(er)f (of)h(dimensions)d(\()p Fq(rank)6 b Fv(\).)52 b(The)33 b(syn)m(tax)150 4400 y(is)i(similar)e(to)j(that)g(for)f(the)h (one-dimensional)e(transforms,)i(with)e(`)p Fp(fftw_)p Fv(')h(replaced)g(b)m(y)g(`)p Fp(fftwnd_)p Fv(')150 4510 y(\(whic)m(h)29 b(stands)h(for)g(\\)p Fp(fftw)g Fv(in)f Fp(N)h Fv(dimensions"\).)275 4644 y(As)24 b(b)s(efore,)i(w)m(e)g Fp(#include)i()22 b Fv(and)j(create)h(a)f(plan)f(for)h(the)g (transforms,)g(this)f(time)h(of)g(t)m(yp)s(e)150 4754 y Fp(fftwnd_plan)p Fv(:)390 4882 y Fp(fftwnd_plan)45 b(fftwnd_create_plan\(int)c(rank,)47 b(const)f(int)h(*n,)1870 4986 y(fftw_direction)c(dir,)k(int)g(flags\);)275 5121 y(rank)30 b Fv(is)g(the)h(dimensionalit)m(y)d(of)k(the)f(arra)m(y)-8 b(,)33 b(and)d(can)i(b)s(e)e(an)m(y)i(non-negativ)m(e)g(in)m(teger.)43 b(The)31 b(next)150 5230 y(argumen)m(t,)i Fp(n)p Fv(,)f(is)f(a)h(p)s (oin)m(ter)f(to)h(an)g(in)m(teger)g(arra)m(y)h(of)f(length)f Fp(rank)f Fv(con)m(taining)i(the)g(\(p)s(ositiv)m(e\))f(sizes)150 5340 y(of)e(eac)m(h)g(dimension)d(of)i(the)h(arra)m(y)-8 b(.)41 b(\(Note)30 b(that)f(the)f(arra)m(y)h(will)d(b)s(e)i(stored)g (in)f(ro)m(w-ma)5 b(jor)29 b(order.)40 b(See)p eop end %%Page: 5 7 TeXDict begin 5 6 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2768 b(5)150 299 y(Section)21 b(2.5)i ([Multi-dimensional)17 b(Arra)m(y)22 b(F)-8 b(ormat],)25 b(page)d(11,)i(for)d(information)f(on)h(ro)m(w-ma)5 b(jor)22 b(order.\))150 408 y(The)27 b(last)h(t)m(w)m(o)h(parameters)f(are)g (the)f(same)h(as)g(in)f Fp(fftw_create_plan)p Fv(.)35 b(W)-8 b(e)29 b(no)m(w,)f(ho)m(w)m(ev)m(er,)i(ha)m(v)m(e)f(an)150 518 y(additional)35 b(p)s(ossible)g(\015ag,)k Fp(FFTW_IN_PLACE)p Fv(,)d(since)g Fp(fftwnd)g Fv(supp)s(orts)f(true)i(in-place)g (transforms.)150 628 y(Multiple)25 b(\015ags)j(are)f(com)m(bined)g (using)f(a)h(bit)m(wise)f Fq(or)34 b Fv(\(`)p Fp(|)p Fv('\).)41 b(\(An)27 b Fq(in-place)32 b Fv(transform)26 b(is)h(one)g(in)f(whic)m(h)150 737 y(the)i(output)g(data)g(o)m(v)m (erwrite)h(the)f(input)e(data.)40 b(It)29 b(th)m(us)e(requires)g(half)f (as)j(m)m(uc)m(h)f(memory)f(as|and)h(is)150 847 y(often)j(faster)g (than|its)e(opp)s(osite,)h(an)g Fq(out-of-place)37 b Fv(transform.\))275 1005 y(F)-8 b(or)25 b(t)m(w)m(o-)g(and)f (three-dimensional)e(transforms,)j(FFTWND)g(pro)m(vides)f(alternativ)m (e)g(routines)f(that)150 1114 y(accept)37 b(the)e(sizes)h(of)f(eac)m(h) i(dimension)c(directly)-8 b(,)36 b(rather)f(than)g(indirectly)e (through)i(a)g(rank)g(and)g(an)150 1224 y(arra)m(y)h(of)f(sizes.)55 b(These)35 b(are)h(otherwise)f(iden)m(tical)f(to)i Fp (fftwnd_create_plan)p Fv(,)c(and)i(are)i(sometimes)150 1333 y(more)31 b(con)m(v)m(enien)m(t:)390 1485 y Fp(fftwnd_plan)45 b(fftw2d_create_plan\(int)c(nx,)47 b(int)g(ny,)1870 1589 y(fftw_direction)c(dir,)k(int)g(flags\);)390 1693 y(fftwnd_plan)e (fftw3d_create_plan\(int)c(nx,)47 b(int)g(ny,)g(int)g(nz,)1870 1797 y(fftw_direction)c(dir,)k(int)g(flags\);)275 1954 y Fv(Once)24 b(the)h(plan)f(has)g(b)s(een)g(created,)j(y)m(ou)f(can)f (use)f(it)g(an)m(y)i(n)m(um)m(b)s(er)d(of)i(times)f(for)h(transforms)f (of)h(the)150 2064 y(same)33 b(size.)49 b(When)33 b(y)m(ou)g(do)g(not)g (need)g(a)g(plan)f(an)m(ymore,)j(y)m(ou)e(can)g(deallo)s(cate)h(the)f (plan)f(b)m(y)g(calling)150 2174 y Fp(fftwnd_destroy_plan\(plan)o(\))p Fv(.)275 2331 y(Giv)m(en)e(a)h(plan,)e(y)m(ou)i(can)f(compute)h(the)f (transform)g(of)h(an)f(arra)m(y)h(of)f(data)h(b)m(y)g(calling:)390 2483 y Fp(void)47 b(fftwnd_one\(fftwnd_plan)41 b(plan,)47 b(fftw_complex)d(*in,)j(fftw_complex)d(*out\);)275 2641 y Fv(Here,)k Fp(in)43 b Fv(and)h Fp(out)f Fv(p)s(oin)m(t)g(to)i(m)m (ulti-dimensional)40 b(arra)m(ys)45 b(in)e(ro)m(w-ma)5 b(jor)44 b(order,)j(of)e(the)f(size)150 2751 y(sp)s(eci\014ed)22 b(when)g(the)h(plan)f(w)m(as)i(created.)40 b(In)22 b(the)i(case)g(of)g (an)f(in-place)f(transform,)i(the)g Fp(out)e Fv(parameter)150 2860 y(is)31 b(ignored)g(and)g(the)h(output)g(data)g(are)h(stored)f(in) e(the)i Fp(in)g Fv(arra)m(y)-8 b(.)46 b(The)31 b(results)g(are)h (stored)g(in-order,)150 2970 y(unnormalized,)44 b(with)d(the)i (zero-frequency)g(comp)s(onen)m(t)g(in)f Fp(out[0])p Fv(.)76 b(A)42 b(forw)m(ard)h(follo)m(w)m(ed)f(b)m(y)h(a)150 3079 y(bac)m(kw)m(ard)c(transform)g(\(or)g(vice-v)m(ersa\))h(yields)d (the)j(original)d(data)i(m)m(ultiplied)d(b)m(y)j(the)g(size)g(of)g(the) 150 3189 y(arra)m(y)k(\(i.e.)79 b(the)43 b(pro)s(duct)f(of)h(the)h (dimensions\).)76 b(See)43 b(Section)g(3.3.4)i([What)e(FFTWND)i(Really) 150 3298 y(Computes],)30 b(page)h(25,)h(for)e(a)h(discussion)d(of)i (what)g(FFTWND)i(computes.)275 3456 y(F)-8 b(or)31 b(example,)h(co)s (de)f(to)h(p)s(erform)e(an)h(in-place)f(FFT)h(of)g(a)h (three-dimensional)d(arra)m(y)i(migh)m(t)g(lo)s(ok)150 3566 y(lik)m(e:)390 3718 y Fp(#include)46 b()390 3822 y(...)390 3925 y({)629 4029 y(fftw_complex)e(in[L][M][N];)629 4133 y(fftwnd_plan)g(p;)629 4237 y(...)629 4340 y(p)j(=)h (fftw3d_create_plan\(L,)42 b(M,)47 b(N,)g(FFTW_FORWARD,)1726 4444 y(FFTW_MEASURE)e(|)i(FFTW_IN_PLACE\);)629 4548 y(...)629 4652 y(fftwnd_one\(p,)d(&in[0][0][0],)g(NULL\);)629 4755 y(...)629 4859 y(fftwnd_destroy_plan\(p\);)390 4963 y(})275 5121 y Fv(Note)36 b(that)f Fp(in)g Fv(is)f(a)h(statically-declared)f (arra)m(y)-8 b(,)38 b(whic)m(h)33 b(is)h(automatically)h(in)f(ro)m (w-ma)5 b(jor)35 b(order,)150 5230 y(but)42 b(w)m(e)h(m)m(ust)f(tak)m (e)i(the)f(address)e(of)i(the)g(\014rst)e(elemen)m(t)i(in)e(order)h(to) i(\014t)e(the)h(t)m(yp)s(e)f(exp)s(ected)h(b)m(y)150 5340 y Fp(fftwnd_one)p Fv(.)38 b(\(See)31 b(Section)f(2.5)i ([Multi-dimensional)26 b(Arra)m(y)31 b(F)-8 b(ormat],)32 b(page)f(11.\))p eop end %%Page: 6 8 TeXDict begin 6 7 bop 150 -116 a Fv(6)3277 b(FFTW)150 299 y Fu(2.3)68 b(Real)46 b(One-dimensional)g(T)-11 b(ransforms)45 b(T)-11 b(utorial)275 498 y Fv(If)29 b(the)h(input)e(data)j(are)g (purely)d(real,)i(y)m(ou)g(can)g(sa)m(v)m(e)i(roughly)d(a)h(factor)h (of)f(t)m(w)m(o)i(in)d(b)s(oth)g(time)h(and)150 607 y(storage)d(b)m(y)e (using)f(the)h Fq(r\013t)m(w)33 b Fv(transforms,)26 b(whic)m(h)e(are)i (FFTs)f(sp)s(ecialized)f(for)h(real)g(data.)40 b(The)24 b(output)150 717 y(of)h(a)f(suc)m(h)h(a)f(transform)g(is)g(a)g Fq(halfcomplex)30 b Fv(arra)m(y)-8 b(,)27 b(whic)m(h)c(consists)h(of)g (only)g(half)f(of)i(the)f(complex)h(DFT)150 827 y(amplitudes)20 b(\(since)j(the)g(negativ)m(e-frequency)h(amplitudes)c(for)j(real)f (data)h(are)g(the)g(complex)g(conjugate)150 936 y(of)31 b(the)f(p)s(ositiv)m(e-frequency)f(amplitudes\).)275 1077 y(In)k(exc)m(hange)j(for)e(these)h(sp)s(eed)e(and)h(space)h(adv)-5 b(an)m(tages,)37 b(the)e(user)e(sacri\014ces)h(some)h(of)f(the)h(sim-) 150 1187 y(plicit)m(y)g(of)h(FFTW's)h(complex)f(transforms.)58 b(First)35 b(of)i(all,)g(to)g(allo)m(w)e(maxim)m(um)g(p)s(erformance,)j (the)150 1296 y(output)i(format)g(of)g(the)h(one-dimensional)d(real)h (transforms)h(is)f(di\013eren)m(t)g(from)h(that)g(used)g(b)m(y)g(the) 150 1406 y(m)m(ulti-dimensional)27 b(transforms.)42 b(Second,)32 b(the)f(in)m(v)m(erse)g(transform)g(\(halfcomplex)f(to)i(real\))f(has)g (the)150 1515 y(side-e\013ect)22 b(of)g(destro)m(ying)f(its)g(input)e (arra)m(y)-8 b(.)39 b(Neither)21 b(of)h(these)g(incon)m(v)m(eniences)f (should)e(p)s(ose)i(a)h(serious)150 1625 y(problem)29 b(for)h(users,)g(but)f(it)h(is)g(imp)s(ortan)m(t)f(to)i(b)s(e)f(a)m(w)m (are)i(of)e(them.)41 b(\(Both)32 b(the)e(incon)m(v)m(enien)m(t)g (output)150 1735 y(format)h(and)g(the)g(side-e\013ect)h(of)f(the)g(in)m (v)m(erse)g(transform)g(can)g(b)s(e)f(ameliorated)h(for)g (one-dimensional)150 1844 y(transforms,)40 b(at)f(the)g(exp)s(ense)f (of)g(some)h(p)s(erformance,)h(b)m(y)f(using)e(instead)g(the)i(m)m (ulti-dimensional)150 1954 y(transform)30 b(routines)f(with)g(a)i(rank) f(of)g(one.\))275 2095 y(The)k(computation)g(of)h(the)g(plan)e(is)h (similar)e(to)j(that)g(for)g(the)f(complex)h(transforms.)52 b(First,)36 b(y)m(ou)150 2204 y Fp(#include)28 b()p Fv(.)38 b(Then,)30 b(y)m(ou)h(create)h(a)e(plan)f(\(of)i(t)m(yp)s(e)g Fp(rfftw_plan)p Fv(\))d(b)m(y)i(calling:)390 2339 y Fp(rfftw_plan)45 b(rfftw_create_plan\(int)d(n,)47 b(fftw_direction)d(dir,)j(int)g (flags\);)275 2480 y(n)37 b Fv(is)g(the)h(length)f(of)h(the)h Fr(r)-5 b(e)g(al)48 b Fv(arra)m(y)39 b(in)d(the)i(transform)g(\(ev)m (en)h(for)e(halfcomplex-to-real)h(trans-)150 2590 y(forms\),)32 b(and)f(can)i(b)s(e)e(an)m(y)h(p)s(ositiv)m(e)f(in)m(teger)h (\(although)f(sizes)h(with)f(small)f(factors)j(are)f(transformed)150 2699 y(more)39 b(e\016cien)m(tly\).)65 b Fp(dir)37 b Fv(is)h(either)g Fp(FFTW_REAL_TO_COMPLEX)33 b Fv(or)38 b Fp(FFTW_COMPLEX_TO_REAL)p Fv(.)59 b(The)150 2809 y Fp(flags)29 b Fv(parameter)i(is)e(the)i(same)g(as)f(in)f Fp(fftw_create_plan)p Fv(.)275 2950 y(Once)d(created,)j(a)e(plan)f(can) h(b)s(e)f(used)g(for)g(an)m(y)h(n)m(um)m(b)s(er)f(of)g(transforms,)h (and)g(is)e(deallo)s(cated)i(when)150 3060 y(y)m(ou)k(are)f(done)h (with)e(it)h(b)m(y)g(calling)f Fp(rfftw_destroy_plan\(plan)o(\))p Fv(.)275 3200 y(Giv)m(en)h(a)h(plan,)e(a)i(real-to-complex)g(or)f (complex-to-real)h(transform)f(is)f(computed)i(b)m(y)f(calling:)390 3335 y Fp(void)47 b(rfftw_one\(rfftw_plan)42 b(plan,)k(fftw_real)g (*in,)g(fftw_real)f(*out\);)275 3476 y Fv(\(Note)31 b(that)g Fp(fftw_real)d Fv(is)h(an)i(alias)e(for)h(the)g(\015oating-p)s(oin)m(t) g(t)m(yp)s(e)g(for)g(whic)m(h)f(FFTW)i(w)m(as)g(com-)150 3586 y(piled.\))52 b(Dep)s(ending)34 b(up)s(on)f(the)i(direction)e(of)i (the)g(plan,)g(either)f(the)h(input)e(or)i(the)g(output)g(arra)m(y)g (is)150 3696 y(halfcomplex,)29 b(and)h(is)f(stored)i(in)e(the)i(follo)m (wing)d(format:)1222 3956 y Fm(r)1263 3970 y Fo(0)1301 3956 y Fm(;)15 b(r)1382 3970 y Fo(1)1419 3956 y Fm(;)g(r)1500 3970 y Fo(2)1538 3956 y Fm(;)g(:)g(:)g(:)h(;)f(r)1780 3970 y Fl(n=)p Fo(2)1893 3956 y Fm(;)g(i)1964 3970 y Fo(\()p Fl(n)p Fo(+1\))p Fl(=)p Fo(2)p Fk(\000)p Fo(1)2298 3956 y Fm(;)g(:)g(:)g(:)i(;)e(i)2531 3970 y Fo(2)2569 3956 y Fm(;)g(i)2640 3970 y Fo(1)275 4164 y Fv(Here,)28 b Fm(r)553 4178 y Fl(k)621 4164 y Fv(is)e(the)h(real)g(part)g(of)g(the) g Fm(k)s Fv(th)g(output,)g(and)g Fm(i)2171 4178 y Fl(k)2239 4164 y Fv(is)f(the)h(imaginary)f(part.)39 b(\(W)-8 b(e)29 b(follo)m(w)d(here)150 4274 y(the)33 b(C)g(con)m(v)m(en)m(tion)h(that)g (in)m(teger)f(division)d(is)i(rounded)f(do)m(wn,)j(e.g.)49 b(7)p Fm(=)p Fv(2)31 b(=)f(3.\))49 b(F)-8 b(or)34 b(a)f(halfcomplex)150 4383 y(arra)m(y)f Fp(hc[])p Fv(,)f(the)g Fm(k)s Fv(th)h(comp)s(onen)m (t)g(has)f(its)g(real)g(part)g(in)f Fp(hc[k])g Fv(and)h(its)g (imaginary)f(part)h(in)f Fp(hc[n-)150 4493 y(k])p Fv(,)35 b(with)e(the)i(exception)f(of)h Fp(k)f(==)g(0)g Fv(or)g Fp(n/2)f Fv(\(the)i(latter)g(only)f(if)f(n)h(is)f(ev)m(en\)|in)h(these) h(t)m(w)m(o)h(cases,)150 4603 y(the)k(imaginary)f(part)h(is)f(zero)i (due)e(to)i(symmetries)f(of)g(the)g(real-complex)g(transform,)i(and)e (is)f(not)150 4712 y(stored.)58 b(Th)m(us,)37 b(the)f(transform)g(of)g Fp(n)g Fv(real)g(v)-5 b(alues)35 b(is)g(a)i(halfcomplex)d(arra)m(y)j (of)f(length)g Fp(n)p Fv(,)h(and)f(vice)150 4822 y(v)m(ersa.)377 4789 y Fo(1)475 4822 y Fv(This)f(is)g(actually)i(only)f(half)f(of)i (the)g(DFT)g(sp)s(ectrum)f(of)h(the)f(data.)61 b(Although)36 b(the)h(other)150 4931 y(half)29 b(can)i(b)s(e)f(obtained)g(b)m(y)g (complex)h(conjugation,)f(it)h(is)e(not)i(required)e(b)m(y)h(man)m(y)h (applications)d(suc)m(h)150 5041 y(as)j(con)m(v)m(olution)f(and)g (\014ltering.)p 150 5149 1200 4 v 199 5217 a Fo(1)275 5249 y Fj(The)22 b(output)f(for)h(the)g(m)n(ulti-dimensional)e(r\013t)n (w)i(is)h(a)f(more-con)n(v)n(en)n(tional)f(arra)n(y)h(of)h Fi(fftw_complex)h Fj(v)l(alues,)f(but)e(the)275 5340 y(format)k(here)h(p)r(ermitted)e(us)i(greater)h(e\016ciency)e(in)h(one) g(dimension.)p eop end %%Page: 7 9 TeXDict begin 7 8 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2768 b(7)275 299 y(Lik)m(e)36 b(the)g(complex)g (transforms,)h(the)f(RFFTW)h(transforms)e(are)i(unnormalized,)e(so)i(a) f(forw)m(ard)150 408 y(follo)m(w)m(ed)42 b(b)m(y)g(a)h(bac)m(kw)m(ard)f (transform)g(\(or)h(vice-v)m(ersa\))g(yields)e(the)h(original)f(data)i (scaled)f(b)m(y)g(the)150 518 y(length)30 b(of)g(the)h(arra)m(y)-8 b(,)31 b Fp(n)p Fv(.)275 646 y(Let)41 b(us)f(reiterate)h(here)f(our)g (w)m(arning)g(that)h(an)f Fp(FFTW_COMPLEX_TO_REAL)c Fv(transform)j(has) i(the)150 756 y(side-e\013ect)d(of)g(destro)m(ying)f(its)f (\(halfcomplex\))h(input.)60 b(The)37 b Fp(FFTW_REAL_TO_COMPLEX)31 b Fv(transform,)150 865 y(ho)m(w)m(ev)m(er,)h(lea)m(v)m(es)g(its)d (\(real\))i(input)e(un)m(touc)m(hed,)h(just)g(as)h(y)m(ou)f(w)m(ould)f (hop)s(e.)275 994 y(As)g(an)h(example,)f(here)h(is)e(an)i(outline)e(of) i(ho)m(w)f(y)m(ou)h(migh)m(t)f(use)h(RFFTW)g(to)g(compute)g(the)g(p)s (o)m(w)m(er)150 1103 y(sp)s(ectrum)f(of)i(a)g(real)f(arra)m(y)g(\(i.e.) 41 b(the)31 b(squares)f(of)g(the)h(absolute)f(v)-5 b(alues)30 b(of)g(the)h(DFT)g(amplitudes\):)390 1225 y Fp(#include)46 b()390 1329 y(...)390 1433 y({)629 1537 y(fftw_real)f(in[N],)h (out[N],)g(power_spectrum[N/2+1];)629 1641 y(rfftw_plan)f(p;)629 1744 y(int)i(k;)629 1848 y(...)629 1952 y(p)g(=)h (rfftw_create_plan\(N,)42 b(FFTW_REAL_TO_COMPLEX,)g(FFTW_ESTIMATE\);) 629 2056 y(...)629 2159 y(rfftw_one\(p,)i(in,)j(out\);)629 2263 y(power_spectrum[0])c(=)k(out[0]*out[0];)92 b(/*)47 b(DC)g(component)e(*/)629 2367 y(for)i(\(k)g(=)g(1;)g(k)h(<)f (\(N+1\)/2;)f(++k\))94 b(/*)47 b(\(k)h(<)f(N/2)g(rounded)f(up\))h(*/) 867 2471 y(power_spectrum[k])c(=)48 b(out[k]*out[k])c(+)j (out[N-k]*out[N-k];)629 2575 y(if)g(\(N)g(\045)g(2)h(==)f(0\))g(/*)g(N) h(is)f(even)g(*/)867 2678 y(power_spectrum[N/2])c(=)k (out[N/2]*out[N/2];)91 b(/*)47 b(Nyquist)f(freq.)g(*/)629 2782 y(...)629 2886 y(rfftw_destroy_plan\(p\);)390 2990 y(})275 3118 y Fv(Programs)39 b(using)f(RFFTW)i(should)e(link)f(with)i Fp(-lrfftw)28 b(-lfftw)h(-lm)38 b Fv(on)i(Unix,)h(or)e(with)g(the)150 3227 y(FFTW,)31 b(RFFTW,)h(and)d(math)i(libraries)c(in)i(general.)150 3466 y Fu(2.4)68 b(Real)46 b(Multi-dimensional)h(T)-11 b(ransforms)44 b(T)-11 b(utorial)275 3652 y Fv(FFTW)39 b(includes)d(m)m(ulti-dimensional)e(transforms)k(for)g(real)g(data)h (of)g(an)m(y)g(rank.)64 b(As)39 b(with)e(the)150 3762 y(one-dimensional)j(real)j(transforms,)i(they)d(sa)m(v)m(e)j(roughly)c (a)i(factor)g(of)g(t)m(w)m(o)h(in)d(time)h(and)g(storage)150 3871 y(o)m(v)m(er)36 b(complex)f(transforms)f(of)h(the)g(same)g(size.) 54 b(Also)34 b(as)i(in)d(one)i(dimension,)f(these)h(gains)f(come)i(at) 150 3981 y(the)f(exp)s(ense)g(of)g(some)h(increase)f(in)e(complexit)m (y|the)i(output)g(format)h(is)e(di\013eren)m(t)g(from)h(the)g(one-)150 4090 y(dimensional)29 b(RFFTW)k(\(and)e(is)h(more)g(similar)d(to)k (that)f(of)h(the)f(complex)f(FFTW\))i(and)f(the)g(in)m(v)m(erse)150 4200 y(\(complex)e(to)i(real\))e(transforms)f(ha)m(v)m(e)j(the)f (side-e\013ect)g(of)f(o)m(v)m(erwriting)g(their)g(input)e(data.)275 4328 y(T)-8 b(o)35 b(use)g(the)g(real)f(m)m(ulti-dimensional)d (transforms,)36 b(y)m(ou)f(\014rst)f Fp(#include)28 b()33 b Fv(and)h(then)150 4438 y(create)e(a)f(plan)e(for)h(the)g(size)h(and)e (direction)g(of)i(transform)f(that)h(y)m(ou)f(are)h(in)m(terested)g (in:)390 4560 y Fp(rfftwnd_plan)44 b(rfftwnd_create_plan\(int)e(rank,)k (const)h(int)g(*n,)1965 4664 y(fftw_direction)d(dir,)j(int)f(flags\);) 275 4792 y Fv(The)35 b(\014rst)f(t)m(w)m(o)j(parameters)f(describ)s(e)e (the)i(size)g(of)f(the)h(real)f(data)i(\(not)f(the)g(halfcomplex)e (data,)150 4902 y(whic)m(h)f(will)f(ha)m(v)m(e)k(di\013eren)m(t)e (dimensions\).)51 b(The)34 b(last)h(t)m(w)m(o)h(parameters)e(are)h(the) g(same)g(as)g(those)g(for)150 5011 y Fp(rfftw_create_plan)p Fv(.)55 b(Just)36 b(as)h(for)g(\013t)m(wnd,)h(there)f(are)g(t)m(w)m(o)h (alternate)g(v)m(ersions)e(of)h(this)f(routine,)150 5121 y Fp(rfftw2d_create_plan)19 b Fv(and)k Fp(rfftw3d_create_plan)p Fv(,)d(that)k(are)g(sometimes)g(more)g(con)m(v)m(enien)m(t)h(for)150 5230 y(t)m(w)m(o-)38 b(and)d(three-dimensional)f(transforms.)58 b(Also)36 b(as)g(in)f(\013t)m(wnd,)i(r\013t)m(wnd)f(supp)s(orts)e(true) i(in-place)150 5340 y(transforms,)30 b(sp)s(eci\014ed)e(b)m(y)j (including)c Fp(FFTW_IN_PLACE)f Fv(in)j(the)i(\015ags.)p eop end %%Page: 8 10 TeXDict begin 8 9 bop 150 -116 a Fv(8)3277 b(FFTW)275 299 y(Once)34 b(created,)i(a)e(plan)f(can)i(b)s(e)e(used)g(for)h(an)m (y)h(n)m(um)m(b)s(er)e(of)h(transforms,)g(and)g(is)f(deallo)s(cated)h (b)m(y)150 408 y(calling)29 b Fp(rfftwnd_destroy_plan\(pla)o(n\))p Fv(.)275 545 y(Giv)m(en)h(a)h(plan,)e(the)h(transform)g(is)f(computed)i (b)m(y)f(calling)f(one)h(of)h(the)g(follo)m(wing)d(t)m(w)m(o)k (routines:)390 676 y Fp(void)47 b(rfftwnd_one_real_to_com)o(plex)o (\(rf)o(ftwn)o(d_pl)o(an)41 b(plan,)1965 779 y(fftw_real)k(*in,)i (fftw_complex)d(*out\);)390 883 y(void)j(rfftwnd_one_complex_to_)o (real)o(\(rf)o(ftwn)o(d_pl)o(an)41 b(plan,)1965 987 y(fftw_complex)j (*in,)j(fftw_real)e(*out\);)275 1124 y Fv(As)25 b(is)g(clear)g(from)g (their)g(names)g(and)g(parameter)h(t)m(yp)s(es,)h(the)f(former)f (function)f(is)g(for)i Fp(FFTW_REAL_)150 1233 y(TO_COMPLEX)c Fv(transforms)i(and)h(the)g(latter)g(is)f(for)h Fp (FFTW_COMPLEX_TO_REAL)19 b Fv(transforms.)38 b(\(W)-8 b(e)27 b(could)150 1343 y(ha)m(v)m(e)j(used)e(only)g(a)i(single)d (routine,)i(since)f(the)h(direction)f(of)h(the)g(transform)g(is)f(enco) s(ded)g(in)g(the)h(plan,)150 1452 y(but)34 b(w)m(e)h(w)m(an)m(ted)g(to) h(correctly)f(express)f(the)h(datat)m(yp)s(es)g(of)g(the)g (parameters.\))54 b(The)34 b(latter)h(routine,)150 1562 y(as)e(w)m(e)g(discuss)e(elsewhere,)i(has)g(the)g(side-e\013ect)g(of)g (o)m(v)m(erwriting)g(its)f(input)f(\(except)j(when)d(the)i(rank)150 1672 y(of)e(the)f(arra)m(y)h(is)e(one\).)42 b(In)29 b(b)s(oth)h(cases,) i(the)e Fp(out)g Fv(parameter)g(is)g(ignored)f(for)i(in-place)e (transforms.)275 1808 y(The)d(format)i(of)f(the)h(complex)f(arra)m(ys)g (deserv)m(es)h(careful)f(atten)m(tion.)40 b(Supp)s(ose)26 b(that)i(the)f(real)g(data)150 1918 y(has)41 b(dimensions)e Fm(n)855 1932 y Fo(1)919 1918 y Ft(\002)28 b Fm(n)1073 1932 y Fo(2)1137 1918 y Ft(\002)f(\001)15 b(\001)g(\001)29 b(\002)e Fm(n)1522 1932 y Fl(d)1602 1918 y Fv(\(in)40 b(ro)m(w-ma)5 b(jor)42 b(order\).)74 b(Then,)43 b(after)f(a)g (real-to-complex)150 2027 y(transform,)28 b(the)f(output)h(is)e(an)i Fm(n)1307 2041 y Fo(1)1358 2027 y Ft(\002)15 b Fm(n)1499 2041 y Fo(2)1550 2027 y Ft(\002)g(\001)g(\001)g(\001)f(\002)h Fv(\()p Fm(n)1931 2041 y Fl(d)1969 2027 y Fm(=)p Fv(2)g(+)g(1\))28 b(arra)m(y)g(of)g Fp(fftw_complex)c Fv(v)-5 b(alues)27 b(in)g(ro)m(w-)150 2137 y(ma)5 b(jor)27 b(order,)g(corresp)s(onding)e (to)j(sligh)m(tly)d(o)m(v)m(er)j(half)e(of)h(the)g(output)f(of)h(the)g (corresp)s(onding)e(complex)150 2246 y(transform.)39 b(\(Note)30 b(that)e(the)g(division)d(is)i(rounded)f(do)m(wn.\))40 b(The)27 b(ordering)f(of)i(the)g(data)h(is)e(otherwise)150 2356 y(exactly)38 b(the)f(same)g(as)g(in)f(the)h(complex)g(case.)61 b(\(In)37 b(principle,)e(the)i(output)g(could)f(b)s(e)g(exactly)i(half) 150 2466 y(the)28 b(size)f(of)h(the)f(complex)h(transform)e(output,)i (but)f(in)f(more)i(than)f(one)h(dimension)d(this)h(requires)g(to)s(o) 150 2575 y(complicated)j(a)g(format)g(to)h(b)s(e)e(practical.\))40 b(Note)31 b(that,)f(unlik)m(e)d(the)i(one-dimensional)e(RFFTW,)j(the) 150 2685 y(real)37 b(and)h(imaginary)e(parts)i(of)g(the)g(DFT)g (amplitudes)d(are)k(here)e(stored)h(together)h(in)e(the)h(natural)150 2794 y(w)m(a)m(y)-8 b(.)275 2931 y(Since)25 b(the)i(complex)g(data)h (is)d(sligh)m(tly)h(larger)g(than)h(the)g(real)f(data,)j(some)e (complications)f(arise)g(for)150 3040 y(in-place)j(transforms.)39 b(In)29 b(this)f(case,)j(the)f(\014nal)e(dimension)f(of)j(the)f(real)g (data)i(m)m(ust)e(b)s(e)g(padded)f(with)150 3150 y(extra)c(v)-5 b(alues)22 b(to)h(accommo)s(date)i(the)e(size)g(of)g(the)g(complex)g (data|t)m(w)m(o)h(extra)g(if)e(the)h(last)g(dimension)d(is)150 3260 y(ev)m(en)k(and)f(one)h(if)f(it)g(is)g(o)s(dd.)37 b(That)24 b(is,)g(the)g(last)f(dimension)e(of)j(the)g(real)f(data)i(m)m (ust)e(ph)m(ysically)f(con)m(tain)150 3369 y(2\()p Fm(n)285 3383 y Fl(d)324 3369 y Fm(=)p Fv(2)j(+)g(1\))37 b Fp(fftw_real)d Fv(v)-5 b(alues)36 b(\(exactly)i(enough)f(to)g(hold)e(the)i(complex)g (data\).)60 b(This)35 b(ph)m(ysical)150 3479 y(arra)m(y)42 b(size)g(do)s(es)f(not,)k(ho)m(w)m(ev)m(er,)i(c)m(hange)c(the)e Fr(lo)-5 b(gic)g(al)53 b Fv(arra)m(y)42 b(size|only)f Fm(n)2909 3493 y Fl(d)2989 3479 y Fv(v)-5 b(alues)41 b(are)h(actually)150 3588 y(stored)27 b(in)e(the)i(last)g(dimension,)e (and)h Fm(n)1524 3602 y Fl(d)1589 3588 y Fv(is)g(the)h(last)g (dimension)d(passed)i(to)i Fp(rfftwnd_create_plan)p Fv(.)275 3725 y(F)-8 b(or)37 b(example,)h(consider)d(the)i(transform)f(of)g(a)h (t)m(w)m(o-dimensional)f(real)g(arra)m(y)h(of)g(size)f Fp(nx)g Fv(b)m(y)g Fp(ny)p Fv(.)150 3835 y(The)k(output)g(of)h(the)g Fp(rfftwnd)d Fv(transform)i(is)g(a)g(t)m(w)m(o-dimensional)g(complex)g (arra)m(y)h(of)g(size)f Fp(nx)g Fv(b)m(y)150 3944 y Fp(ny/2+1)p Fv(,)30 b(where)h(the)h Fp(y)f Fv(dimension)e(has)j(b)s(een)f(cut)g (nearly)g(in)f(half)h(b)s(ecause)g(of)h(redundancies)d(in)i(the)150 4054 y(output.)40 b(Because)32 b Fp(fftw_complex)27 b Fv(is)j(t)m(wice)g(the)h(size)f(of)h Fp(fftw_real)p Fv(,)d(the)i (output)g(arra)m(y)h(is)f(sligh)m(tly)150 4163 y(bigger)g(than)h(the)g (input)e(arra)m(y)-8 b(.)43 b(Th)m(us,)30 b(if)g(w)m(e)h(w)m(an)m(t)h (to)g(compute)f(the)g(transform)f(in)g(place,)h(w)m(e)g(m)m(ust)150 4273 y Fr(p)-5 b(ad)39 b Fv(the)28 b(input)e(arra)m(y)j(so)f(that)g(it) g(is)f(of)h(size)g Fp(nx)f Fv(b)m(y)h Fp(2*\(ny/2+1\))p Fv(.)37 b(If)28 b Fp(ny)f Fv(is)g(ev)m(en,)i(then)f(there)g(are)h(t)m (w)m(o)150 4382 y(padding)34 b(elemen)m(ts)h(at)i(the)e(end)g(of)h(eac) m(h)h(ro)m(w)e(\(whic)m(h)g(need)g(not)h(b)s(e)f(initialized,)e(as)j (they)g(are)g(only)150 4492 y(used)30 b(for)g(output\).)275 4629 y(Figure)35 b(1)h(depicts)f(the)h(input)e(and)h(output)g(arra)m (ys)i(just)e(describ)s(ed,)g(for)h(b)s(oth)f(the)h(out-of-place)150 4738 y(and)30 b(in-place)f(transforms)h(\(with)f(the)i(arro)m(ws)f (indicating)e(consecutiv)m(e)k(memory)e(lo)s(cations\).)275 4875 y(The)41 b(RFFTWND)i(transforms)e(are)h(unnormalized,)h(so)f(a)g (forw)m(ard)f(follo)m(w)m(ed)h(b)m(y)f(a)h(bac)m(kw)m(ard)150 4984 y(transform)29 b(will)e(result)i(in)f(the)i(original)e(data)i (scaled)g(b)m(y)f(the)h(n)m(um)m(b)s(er)e(of)i(real)g(data)g(elemen)m (ts|that)150 5094 y(is,)g(the)g(pro)s(duct)f(of)i(the)f(\(logical\))h (dimensions)d(of)i(the)h(real)f(data.)275 5230 y(Belo)m(w,)e(w)m(e)e (illustrate)f(the)i(use)f(of)g(RFFTWND)i(b)m(y)e(sho)m(wing)g(ho)m(w)g (y)m(ou)h(migh)m(t)f(use)g(it)g(to)i(compute)150 5340 y(the)35 b(\(cyclic\))h(con)m(v)m(olution)f(of)h(t)m(w)m(o-dimensional) e(real)h(arra)m(ys)g Fp(a)g Fv(and)g Fp(b)g Fv(\(using)f(the)h(iden)m (tit)m(y)g(that)h(a)p eop end %%Page: 9 11 TeXDict begin 9 10 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2768 b(9)607 4188 y @beginspecial @setspecial %%BeginDocument: rfftwnd.eps %!PS-Adobe-2.0 EPSF-2.0 %%Title: rfftwnd.fig %%Creator: fig2dev Version 3.2 Patchlevel 1 %%CreationDate: Wed Jul 28 13:17:30 1999 %%For: stevenj@superjdj (Steven G. Johnson) %%Orientation: Portrait %%BoundingBox: 0 0 268 405 %%Pages: 0 %%BeginSetup %%EndSetup %%Magnification: 0.7000 %%EndComments /$F2psDict 200 dict def $F2psDict begin $F2psDict /mtrx matrix put /col-1 {0 setgray} bind def /col0 {0.000 0.000 0.000 srgb} bind def /col1 {0.000 0.000 1.000 srgb} bind def /col2 {0.000 1.000 0.000 srgb} bind def /col3 {0.000 1.000 1.000 srgb} bind def /col4 {1.000 0.000 0.000 srgb} bind def /col5 {1.000 0.000 1.000 srgb} bind def /col6 {1.000 1.000 0.000 srgb} bind def /col7 {1.000 1.000 1.000 srgb} bind def /col8 {0.000 0.000 0.560 srgb} bind def /col9 {0.000 0.000 0.690 srgb} bind def /col10 {0.000 0.000 0.820 srgb} bind def /col11 {0.530 0.810 1.000 srgb} bind def /col12 {0.000 0.560 0.000 srgb} bind def /col13 {0.000 0.690 0.000 srgb} bind def /col14 {0.000 0.820 0.000 srgb} bind def /col15 {0.000 0.560 0.560 srgb} bind def /col16 {0.000 0.690 0.690 srgb} bind def /col17 {0.000 0.820 0.820 srgb} bind def /col18 {0.560 0.000 0.000 srgb} bind def /col19 {0.690 0.000 0.000 srgb} bind def /col20 {0.820 0.000 0.000 srgb} bind def /col21 {0.560 0.000 0.560 srgb} bind def /col22 {0.690 0.000 0.690 srgb} bind def /col23 {0.820 0.000 0.820 srgb} bind def /col24 {0.500 0.190 0.000 srgb} bind def /col25 {0.630 0.250 0.000 srgb} bind def /col26 {0.750 0.380 0.000 srgb} bind def /col27 {1.000 0.500 0.500 srgb} bind def /col28 {1.000 0.630 0.630 srgb} bind def /col29 {1.000 0.750 0.750 srgb} bind def /col30 {1.000 0.880 0.880 srgb} bind def /col31 {1.000 0.840 0.000 srgb} bind def /col32 {0.475 0.490 0.475 srgb} bind def /col33 {0.937 0.922 0.937 srgb} bind def /col34 {0.906 0.188 0.125 srgb} bind def /col35 {0.969 0.557 0.525 srgb} bind def /col36 {0.412 0.588 0.780 srgb} bind def /col37 {0.525 0.667 0.843 srgb} bind def /col38 {0.875 0.859 0.000 srgb} bind def end save -3.0 408.0 translate 1 -1 scale /cp {closepath} bind def /ef {eofill} bind def /gr {grestore} bind def /gs {gsave} bind def /sa {save} bind def /rs {restore} bind def /l {lineto} bind def /m {moveto} bind def /rm {rmoveto} bind def /n {newpath} bind def /s {stroke} bind def /sh {show} bind def /slc {setlinecap} bind def /slj {setlinejoin} bind def /slw {setlinewidth} bind def /srgb {setrgbcolor} bind def /rot {rotate} bind def /sc {scale} bind def /sd {setdash} bind def /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def /sw {stringwidth} bind def /tr {translate} bind def /tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def /shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def /reencdict 12 dict def /ReEncode { reencdict begin /newcodesandnames exch def /newfontname exch def /basefontname exch def /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def basefontdict { exch dup /FID ne { dup /Encoding eq { exch dup length array copy newfont 3 1 roll put } { exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall newfont /FontName newfontname put newcodesandnames aload pop 128 1 255 { newfont /Encoding get exch /.notdef put } for newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat newfontname newfont definefont pop end } def /isovec [ 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde 8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis 8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron 8#220 /dotlessi 8#230 /oe 8#231 /OE 8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling 8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis 8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot 8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus 8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph 8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine 8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf 8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute 8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring 8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute 8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute 8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve 8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply 8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex 8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave 8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring 8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute 8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute 8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve 8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide 8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex 8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def /Helvetica /Helvetica-iso isovec ReEncode /Helvetica-Bold /Helvetica-Bold-iso isovec ReEncode /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def /$F2psEnd {$F2psEnteredState restore end} def %%EndProlog $F2psBegin 10 setmiterlimit n -1000 10695 m -1000 -1000 l 7452 -1000 l 7452 10695 l cp clip 0.04200 0.04200 sc % Polyline n 1221 7280 m 6435 7280 l 6435 9676 l 1221 9676 l 1221 7280 l cp gs col7 1.00 shd ef gr % Polyline 7.500 slw n 1221 7280 m 6435 7280 l 6435 9676 l 1221 9676 l 1221 7280 l cp gs col32 s gr % Polyline 0.000 slw n 1221 7280 m 1620 7280 l 1620 7656 l 1221 7656 l 1221 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 7280 m 1620 7280 l 1620 7656 l 1221 7656 l 1221 7280 l cp gs col32 s gr % Polyline 0.000 slw n 1620 7280 m 2019 7280 l 2019 7656 l 1620 7656 l 1620 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 7280 m 2019 7280 l 2019 7656 l 1620 7656 l 1620 7280 l cp gs col32 s gr % Polyline 0.000 slw n 2019 7280 m 2418 7280 l 2418 7656 l 2019 7656 l 2019 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 7280 m 2418 7280 l 2418 7656 l 2019 7656 l 2019 7280 l cp gs col32 s gr % Polyline 0.000 slw n 2418 7280 m 2817 7280 l 2817 7656 l 2418 7656 l 2418 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 7280 m 2817 7280 l 2817 7656 l 2418 7656 l 2418 7280 l cp gs col32 s gr % Polyline 0.000 slw n 4038 7280 m 4438 7280 l 4438 7656 l 4038 7656 l 4038 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 7280 m 4438 7280 l 4438 7656 l 4038 7656 l 4038 7280 l cp gs col32 s gr % Polyline 0.000 slw n 4438 7280 m 4837 7280 l 4837 7656 l 4438 7656 l 4438 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 7280 m 4837 7280 l 4837 7656 l 4438 7656 l 4438 7280 l cp gs col32 s gr % Polyline 0.000 slw n 4837 7280 m 5236 7280 l 5236 7656 l 4837 7656 l 4837 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 7280 m 5236 7280 l 5236 7656 l 4837 7656 l 4837 7280 l cp gs col32 s gr % Polyline 0.000 slw n 5236 7280 m 5635 7280 l 5635 7656 l 5236 7656 l 5236 7280 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 7280 m 5635 7280 l 5635 7656 l 5236 7656 l 5236 7280 l cp gs col32 s gr % Polyline 0.000 slw n 1221 7656 m 1620 7656 l 1620 8032 l 1221 8032 l 1221 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 7656 m 1620 7656 l 1620 8032 l 1221 8032 l 1221 7656 l cp gs col32 s gr % Polyline 0.000 slw n 1620 7656 m 2019 7656 l 2019 8032 l 1620 8032 l 1620 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 7656 m 2019 7656 l 2019 8032 l 1620 8032 l 1620 7656 l cp gs col32 s gr % Polyline 0.000 slw n 2019 7656 m 2418 7656 l 2418 8032 l 2019 8032 l 2019 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 7656 m 2418 7656 l 2418 8032 l 2019 8032 l 2019 7656 l cp gs col32 s gr % Polyline 0.000 slw n 2418 7656 m 2817 7656 l 2817 8032 l 2418 8032 l 2418 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 7656 m 2817 7656 l 2817 8032 l 2418 8032 l 2418 7656 l cp gs col32 s gr % Polyline 0.000 slw n 4038 7656 m 4438 7656 l 4438 8032 l 4038 8032 l 4038 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 7656 m 4438 7656 l 4438 8032 l 4038 8032 l 4038 7656 l cp gs col32 s gr % Polyline 0.000 slw n 4438 7656 m 4837 7656 l 4837 8032 l 4438 8032 l 4438 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 7656 m 4837 7656 l 4837 8032 l 4438 8032 l 4438 7656 l cp gs col32 s gr % Polyline 0.000 slw n 4837 7656 m 5236 7656 l 5236 8032 l 4837 8032 l 4837 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 7656 m 5236 7656 l 5236 8032 l 4837 8032 l 4837 7656 l cp gs col32 s gr % Polyline 0.000 slw n 5236 7656 m 5635 7656 l 5635 8032 l 5236 8032 l 5236 7656 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 7656 m 5635 7656 l 5635 8032 l 5236 8032 l 5236 7656 l cp gs col32 s gr % Polyline 0.000 slw n 1221 8924 m 1620 8924 l 1620 9300 l 1221 9300 l 1221 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 8924 m 1620 8924 l 1620 9300 l 1221 9300 l 1221 8924 l cp gs col32 s gr % Polyline 0.000 slw n 1620 8924 m 2019 8924 l 2019 9300 l 1620 9300 l 1620 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 8924 m 2019 8924 l 2019 9300 l 1620 9300 l 1620 8924 l cp gs col32 s gr % Polyline 0.000 slw n 2019 8924 m 2418 8924 l 2418 9300 l 2019 9300 l 2019 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 8924 m 2418 8924 l 2418 9300 l 2019 9300 l 2019 8924 l cp gs col32 s gr % Polyline 0.000 slw n 2418 8924 m 2817 8924 l 2817 9300 l 2418 9300 l 2418 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 8924 m 2817 8924 l 2817 9300 l 2418 9300 l 2418 8924 l cp gs col32 s gr % Polyline 0.000 slw n 4038 8924 m 4438 8924 l 4438 9300 l 4038 9300 l 4038 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 8924 m 4438 8924 l 4438 9300 l 4038 9300 l 4038 8924 l cp gs col32 s gr % Polyline 0.000 slw n 4438 8924 m 4837 8924 l 4837 9300 l 4438 9300 l 4438 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 8924 m 4837 8924 l 4837 9300 l 4438 9300 l 4438 8924 l cp gs col32 s gr % Polyline 0.000 slw n 4837 8924 m 5236 8924 l 5236 9300 l 4837 9300 l 4837 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 8924 m 5236 8924 l 5236 9300 l 4837 9300 l 4837 8924 l cp gs col32 s gr % Polyline 0.000 slw n 5236 8924 m 5635 8924 l 5635 9300 l 5236 9300 l 5236 8924 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 8924 m 5635 8924 l 5635 9300 l 5236 9300 l 5236 8924 l cp gs col32 s gr % Polyline 0.000 slw n 1221 9300 m 1620 9300 l 1620 9676 l 1221 9676 l 1221 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 9300 m 1620 9300 l 1620 9676 l 1221 9676 l 1221 9300 l cp gs col32 s gr % Polyline 0.000 slw n 1620 9300 m 2019 9300 l 2019 9676 l 1620 9676 l 1620 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 9300 m 2019 9300 l 2019 9676 l 1620 9676 l 1620 9300 l cp gs col32 s gr % Polyline 0.000 slw n 2019 9300 m 2418 9300 l 2418 9676 l 2019 9676 l 2019 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 9300 m 2418 9300 l 2418 9676 l 2019 9676 l 2019 9300 l cp gs col32 s gr % Polyline 0.000 slw n 2418 9300 m 2817 9300 l 2817 9676 l 2418 9676 l 2418 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 9300 m 2817 9300 l 2817 9676 l 2418 9676 l 2418 9300 l cp gs col32 s gr % Polyline 0.000 slw n 4038 9300 m 4438 9300 l 4438 9676 l 4038 9676 l 4038 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 9300 m 4438 9300 l 4438 9676 l 4038 9676 l 4038 9300 l cp gs col32 s gr % Polyline 0.000 slw n 4438 9300 m 4837 9300 l 4837 9676 l 4438 9676 l 4438 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 9300 m 4837 9300 l 4837 9676 l 4438 9676 l 4438 9300 l cp gs col32 s gr % Polyline 0.000 slw n 4837 9300 m 5236 9300 l 5236 9676 l 4837 9676 l 4837 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 9300 m 5236 9300 l 5236 9676 l 4837 9676 l 4837 9300 l cp gs col32 s gr % Polyline 0.000 slw n 5236 9300 m 5635 9300 l 5635 9676 l 5236 9676 l 5236 9300 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 9300 m 5635 9300 l 5635 9676 l 5236 9676 l 5236 9300 l cp gs col32 s gr /Helvetica-iso ff 225.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 225.00 scf sf 2064 7726 m gs 1 -1 sc (...) col0 sh gr % Polyline n 2819 7658 m 2869 7658 l gs col32 s gr % Polyline n 2952 7658 m 3002 7658 l gs col32 s gr % Polyline n 3085 7658 m 3135 7658 l gs col32 s gr % Polyline n 3219 7658 m 3252 7658 l gs col32 s gr % Polyline n 2819 8033 m 2869 8033 l gs col32 s gr % Polyline n 2952 8033 m 3002 8033 l gs col32 s gr % Polyline n 3085 8033 m 3135 8033 l gs col32 s gr % Polyline n 3219 8033 m 3252 8033 l gs col32 s gr % Polyline n 2819 8025 m 2819 8075 l gs col32 s gr % Polyline n 2819 8158 m 2819 8208 l gs col32 s gr % Polyline n 2819 8291 m 2819 8341 l gs col32 s gr % Polyline n 2419 8025 m 2419 8075 l gs col32 s gr % Polyline n 2419 8158 m 2419 8208 l gs col32 s gr % Polyline n 2419 8291 m 2419 8341 l gs col32 s gr % Polyline n 2019 8025 m 2019 8075 l gs col32 s gr % Polyline n 2019 8158 m 2019 8208 l gs col32 s gr % Polyline n 2019 8291 m 2019 8341 l gs col32 s gr % Polyline n 1619 8025 m 1619 8075 l gs col32 s gr % Polyline n 1619 8158 m 1619 8208 l gs col32 s gr % Polyline n 1619 8291 m 1619 8341 l gs col32 s gr % Polyline n 4036 7658 m 3986 7658 l gs col32 s gr % Polyline n 3902 7658 m 3852 7658 l gs col32 s gr % Polyline n 3769 7658 m 3719 7658 l gs col32 s gr % Polyline n 3636 7658 m 3602 7658 l gs col32 s gr % Polyline n 4036 8033 m 3986 8033 l gs col32 s gr % Polyline n 3902 8033 m 3852 8033 l gs col32 s gr % Polyline n 3769 8033 m 3719 8033 l gs col32 s gr % Polyline n 3636 8033 m 3602 8033 l gs col32 s gr % Polyline n 4035 8025 m 4035 8075 l gs col32 s gr % Polyline n 4035 8158 m 4035 8208 l gs col32 s gr % Polyline n 4035 8291 m 4035 8341 l gs col32 s gr % Polyline n 4435 8025 m 4435 8075 l gs col32 s gr % Polyline n 4435 8158 m 4435 8208 l gs col32 s gr % Polyline n 4435 8291 m 4435 8341 l gs col32 s gr % Polyline n 4835 8025 m 4835 8075 l gs col32 s gr % Polyline n 4835 8158 m 4835 8208 l gs col32 s gr % Polyline n 4835 8291 m 4835 8341 l gs col32 s gr % Polyline n 5235 8025 m 5235 8075 l gs col32 s gr % Polyline n 5235 8158 m 5235 8208 l gs col32 s gr % Polyline n 5235 8291 m 5235 8341 l gs col32 s gr % Polyline n 4036 9300 m 3986 9300 l gs col32 s gr % Polyline n 3902 9300 m 3852 9300 l gs col32 s gr % Polyline n 3769 9300 m 3719 9300 l gs col32 s gr % Polyline n 3636 9300 m 3602 9300 l gs col32 s gr % Polyline n 4036 8925 m 3986 8925 l gs col32 s gr % Polyline n 3902 8925 m 3852 8925 l gs col32 s gr % Polyline n 3769 8925 m 3719 8925 l gs col32 s gr % Polyline n 3636 8925 m 3602 8925 l gs col32 s gr % Polyline n 4035 8933 m 4035 8883 l gs col32 s gr % Polyline n 4035 8800 m 4035 8750 l gs col32 s gr % Polyline n 4035 8666 m 4035 8616 l gs col32 s gr % Polyline n 4435 8933 m 4435 8883 l gs col32 s gr % Polyline n 4435 8800 m 4435 8750 l gs col32 s gr % Polyline n 4435 8666 m 4435 8616 l gs col32 s gr % Polyline n 4835 8933 m 4835 8883 l gs col32 s gr % Polyline n 4835 8800 m 4835 8750 l gs col32 s gr % Polyline n 4835 8666 m 4835 8616 l gs col32 s gr % Polyline n 5235 8933 m 5235 8883 l gs col32 s gr % Polyline n 5235 8800 m 5235 8750 l gs col32 s gr % Polyline n 5235 8666 m 5235 8616 l gs col32 s gr % Polyline n 2819 9300 m 2869 9300 l gs col32 s gr % Polyline n 2952 9300 m 3002 9300 l gs col32 s gr % Polyline n 3085 9300 m 3135 9300 l gs col32 s gr % Polyline n 3219 9300 m 3252 9300 l gs col32 s gr % Polyline n 2819 8925 m 2869 8925 l gs col32 s gr % Polyline n 2952 8925 m 3002 8925 l gs col32 s gr % Polyline n 3085 8925 m 3135 8925 l gs col32 s gr % Polyline n 3219 8925 m 3252 8925 l gs col32 s gr % Polyline n 2819 8933 m 2819 8883 l gs col32 s gr % Polyline n 2819 8800 m 2819 8750 l gs col32 s gr % Polyline n 2819 8666 m 2819 8616 l gs col32 s gr % Polyline n 2419 8933 m 2419 8883 l gs col32 s gr % Polyline n 2419 8800 m 2419 8750 l gs col32 s gr % Polyline n 2419 8666 m 2419 8616 l gs col32 s gr % Polyline n 2019 8933 m 2019 8883 l gs col32 s gr % Polyline n 2019 8800 m 2019 8750 l gs col32 s gr % Polyline n 2019 8666 m 2019 8616 l gs col32 s gr % Polyline n 1619 8933 m 1619 8883 l gs col32 s gr % Polyline n 1619 8800 m 1619 8750 l gs col32 s gr % Polyline n 1619 8666 m 1619 8616 l gs col32 s gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 2338 7001 m gs 1 -1 sc (ny ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 2605 7001 m gs 1 -1 sc (+ 2-ny%2) col34 sh gr /Helvetica-iso ff 195.00 scf sf 3500 7001 m gs 1 -1 sc ( = 2*\(ny/2+1\)) col0 sh gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 681 8451 m gs 1 -1 sc (nx) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1364 7179 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 6097 7179 m gs 1 -1 sc (ny+1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1064 7479 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 864 9479 m gs 1 -1 sc (nx-1) col0 sh gr % Polyline 0.000 slw n 5636 7280 m 6035 7280 l 6035 7656 l 5636 7656 l 5636 7280 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 5636 7280 m 6035 7280 l 6035 7656 l 5636 7656 l 5636 7280 l cp gs col32 s gr % Polyline 0.000 slw n 5636 7656 m 6035 7656 l 6035 8032 l 5636 8032 l 5636 7656 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 5636 7656 m 6035 7656 l 6035 8032 l 5636 8032 l 5636 7656 l cp gs col32 s gr % Polyline 0.000 slw n 5636 8924 m 6035 8924 l 6035 9300 l 5636 9300 l 5636 8924 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 5636 8924 m 6035 8924 l 6035 9300 l 5636 9300 l 5636 8924 l cp gs col32 s gr % Polyline 0.000 slw n 5636 9300 m 6035 9300 l 6035 9676 l 5636 9676 l 5636 9300 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 5636 9300 m 6035 9300 l 6035 9676 l 5636 9676 l 5636 9300 l cp gs col32 s gr % Polyline 0.000 slw n 6036 7280 m 6435 7280 l 6435 7656 l 6036 7656 l 6036 7280 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 6036 7280 m 6435 7280 l 6435 7656 l 6036 7656 l 6036 7280 l cp gs col32 s gr % Polyline 0.000 slw n 6036 7656 m 6435 7656 l 6435 8032 l 6036 8032 l 6036 7656 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 6036 7656 m 6435 7656 l 6435 8032 l 6036 8032 l 6036 7656 l cp gs col32 s gr % Polyline 0.000 slw n 6036 8924 m 6435 8924 l 6435 9300 l 6036 9300 l 6036 8924 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 6036 8924 m 6435 8924 l 6435 9300 l 6036 9300 l 6036 8924 l cp gs col32 s gr % Polyline 0.000 slw n 6036 9300 m 6435 9300 l 6435 9676 l 6036 9676 l 6036 9300 l cp gs col35 1.00 shd ef gr % Polyline 7.500 slw n 6036 9300 m 6435 9300 l 6435 9676 l 6036 9676 l 6036 9300 l cp gs col32 s gr % Polyline n 5635 7283 m 5635 9683 l gs col0 s gr % Polyline n 1420 7515 m 6312 7515 l gs col0 s gr % Polyline 0.000 slw n 6348 7518 m 6117 7462 l 6117 7515 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 7518 m 6117 7462 l 6117 7515 l gs col0 s gr % Polyline 0.000 slw n 6348 7512 m 6117 7568 l 6117 7515 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 7512 m 6117 7568 l 6117 7515 l gs col0 s gr % Polyline n 1420 7891 m 5863 7891 l gs col0 s gr % Polyline 0.000 slw n 5895 7894 m 5685 7838 l 5685 7891 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 7894 m 5685 7838 l 5685 7891 l gs col0 s gr % Polyline 0.000 slw n 5895 7888 m 5685 7944 l 5685 7891 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 7888 m 5685 7944 l 5685 7891 l gs col0 s gr % Polyline n 1420 9112 m 5863 9112 l gs col0 s gr % Polyline 0.000 slw n 5895 9115 m 5685 9059 l 5685 9112 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 9115 m 5685 9059 l 5685 9112 l gs col0 s gr % Polyline 0.000 slw n 5895 9109 m 5685 9165 l 5685 9112 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 9109 m 5685 9165 l 5685 9112 l gs col0 s gr % Polyline n 1420 9488 m 5863 9488 l gs col0 s gr % Polyline 0.000 slw n 5895 9491 m 5685 9435 l 5685 9488 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 9491 m 5685 9435 l 5685 9488 l gs col0 s gr % Polyline 0.000 slw n 5895 9485 m 5685 9541 l 5685 9488 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5895 9485 m 5685 9541 l 5685 9488 l gs col0 s gr /Helvetica-iso ff 375.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 375.00 scf sf 6250 9461 m gs 1 -1 sc 90.0 rot (\(padding\)) col0 sh gr /Helvetica-Bold-iso ff 240.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-Bold-iso ff 240.00 scf sf 428 9283 m gs 1 -1 sc 90.0 rot (input, in-place) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 7429 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1681 7429 m gs 1 -1 sc (1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 2081 7429 m gs 1 -1 sc (2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 2481 7429 m gs 1 -1 sc (3) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4081 7429 m gs 1 -1 sc (ny-4) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4897 7429 m gs 1 -1 sc (ny-2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5297 7429 m gs 1 -1 sc (ny-1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4497 7429 m gs 1 -1 sc (ny-3) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 7795 m gs 1 -1 sc (ny+2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1664 7795 m gs 1 -1 sc (ny+3) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5681 7429 m gs 1 -1 sc (ny) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 6081 7429 m gs 1 -1 sc (ny+1) col0 sh gr % Polyline 0.000 slw n 5226 5196 m 5623 5196 l 5623 5572 l 5226 5572 l 5226 5196 l cp gs col36 1.00 shd ef gr % Polyline n 4827 5196 m 5226 5196 l 5226 5572 l 4827 5572 l 4827 5196 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4835 5194 m 5631 5194 l 5631 5569 l 4835 5569 l 4835 5194 l cp gs col38 s gr % Polyline 0.000 slw n 4434 5196 m 4832 5196 l 4832 5572 l 4434 5572 l 4434 5196 l cp gs col36 1.00 shd ef gr % Polyline n 4035 5196 m 4434 5196 l 4434 5572 l 4035 5572 l 4035 5196 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4044 5194 m 4840 5194 l 4840 5569 l 4044 5569 l 4044 5194 l cp gs col38 s gr % Polyline 0.000 slw n 6026 5196 m 6440 5196 l 6440 5572 l 6026 5572 l 6026 5196 l cp gs col36 1.00 shd ef gr % Polyline n 5627 5196 m 6026 5196 l 6026 5572 l 5627 5572 l 5627 5196 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 5635 5194 m 6440 5194 l 6440 5569 l 5635 5569 l 5635 5194 l cp gs col38 s gr % Polyline 0.000 slw n 5226 5571 m 5623 5571 l 5623 5947 l 5226 5947 l 5226 5571 l cp gs col36 1.00 shd ef gr % Polyline n 4827 5571 m 5226 5571 l 5226 5947 l 4827 5947 l 4827 5571 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4835 5569 m 5631 5569 l 5631 5944 l 4835 5944 l 4835 5569 l cp gs col38 s gr % Polyline 0.000 slw n 4434 5571 m 4832 5571 l 4832 5947 l 4434 5947 l 4434 5571 l cp gs col36 1.00 shd ef gr % Polyline n 4035 5571 m 4434 5571 l 4434 5947 l 4035 5947 l 4035 5571 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4044 5569 m 4840 5569 l 4840 5944 l 4044 5944 l 4044 5569 l cp gs col38 s gr % Polyline 0.000 slw n 6026 5571 m 6440 5571 l 6440 5947 l 6026 5947 l 6026 5571 l cp gs col36 1.00 shd ef gr % Polyline n 5627 5571 m 6026 5571 l 6026 5947 l 5627 5947 l 5627 5571 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 5635 5569 m 6440 5569 l 6440 5944 l 5635 5944 l 5635 5569 l cp gs col38 s gr % Polyline 0.000 slw n 2409 5571 m 2807 5571 l 2807 5947 l 2409 5947 l 2409 5571 l cp gs col36 1.00 shd ef gr % Polyline n 2010 5571 m 2409 5571 l 2409 5947 l 2010 5947 l 2010 5571 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 2019 5561 m 2815 5561 l 2815 5936 l 2019 5936 l 2019 5561 l cp gs col38 s gr % Polyline 0.000 slw n 1618 5571 m 2015 5571 l 2015 5947 l 1618 5947 l 1618 5571 l cp gs col36 1.00 shd ef gr % Polyline n 1219 5571 m 1618 5571 l 1618 5947 l 1219 5947 l 1219 5571 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 1227 5561 m 2023 5561 l 2023 5939 l 1227 5939 l 1227 5561 l cp gs col38 s gr % Polyline 0.000 slw n 2409 5196 m 2807 5196 l 2807 5572 l 2409 5572 l 2409 5196 l cp gs col36 1.00 shd ef gr % Polyline n 2010 5196 m 2409 5196 l 2409 5572 l 2010 5572 l 2010 5196 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 2019 5186 m 2815 5186 l 2815 5561 l 2019 5561 l 2019 5186 l cp gs col38 s gr % Polyline 0.000 slw n 1618 5196 m 2015 5196 l 2015 5572 l 1618 5572 l 1618 5196 l cp gs col36 1.00 shd ef gr % Polyline n 1219 5196 m 1618 5196 l 1618 5572 l 1219 5572 l 1219 5196 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 1227 5186 m 2023 5186 l 2023 5561 l 1227 5561 l 1227 5186 l cp gs col38 s gr % Polyline 0.000 slw n 5226 3546 m 5623 3546 l 5623 3922 l 5226 3922 l 5226 3546 l cp gs col36 1.00 shd ef gr % Polyline n 4827 3546 m 5226 3546 l 5226 3922 l 4827 3922 l 4827 3546 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4835 3544 m 5631 3544 l 5631 3919 l 4835 3919 l 4835 3544 l cp gs col32 s gr % Polyline 0.000 slw n 4434 3546 m 4832 3546 l 4832 3922 l 4434 3922 l 4434 3546 l cp gs col36 1.00 shd ef gr % Polyline n 4035 3546 m 4434 3546 l 4434 3922 l 4035 3922 l 4035 3546 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4044 3544 m 4840 3544 l 4840 3919 l 4044 3919 l 4044 3544 l cp gs col38 s gr % Polyline 0.000 slw n 5990 3546 m 6432 3546 l 6432 3955 l 5990 3955 l 5990 3546 l cp gs col36 1.00 shd ef gr % Polyline n 5627 3546 m 6026 3546 l 6026 3922 l 5627 3922 l 5627 3546 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 5635 3544 m 6440 3544 l 6440 3919 l 5635 3919 l 5635 3544 l cp gs col38 s gr % Polyline 0.000 slw n 5226 3921 m 5623 3921 l 5623 4297 l 5226 4297 l 5226 3921 l cp gs col36 1.00 shd ef gr % Polyline n 4827 3921 m 5226 3921 l 5226 4297 l 4827 4297 l 4827 3921 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4835 3919 m 5631 3919 l 5631 4294 l 4835 4294 l 4835 3919 l cp gs col38 s gr % Polyline 0.000 slw n 4434 3921 m 4832 3921 l 4832 4297 l 4434 4297 l 4434 3921 l cp gs col36 1.00 shd ef gr % Polyline n 4035 3921 m 4434 3921 l 4434 4297 l 4035 4297 l 4035 3921 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 4044 3919 m 4840 3919 l 4840 4294 l 4044 4294 l 4044 3919 l cp gs col38 s gr % Polyline 0.000 slw n 6026 3921 m 6432 3921 l 6432 4297 l 6026 4297 l 6026 3921 l cp gs col36 1.00 shd ef gr % Polyline n 5627 3921 m 6026 3921 l 6026 4297 l 5627 4297 l 5627 3921 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 5635 3919 m 6440 3919 l 6440 4294 l 5635 4294 l 5635 3919 l cp gs col38 s gr % Polyline 0.000 slw n 2409 3921 m 2807 3921 l 2807 4297 l 2409 4297 l 2409 3921 l cp gs col36 1.00 shd ef gr % Polyline n 2010 3921 m 2409 3921 l 2409 4297 l 2010 4297 l 2010 3921 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 2019 3919 m 2815 3919 l 2815 4294 l 2019 4294 l 2019 3919 l cp gs col38 s gr % Polyline 0.000 slw n 1618 3921 m 2015 3921 l 2015 4297 l 1618 4297 l 1618 3921 l cp gs col36 1.00 shd ef gr % Polyline n 1219 3921 m 1618 3921 l 1618 4297 l 1219 4297 l 1219 3921 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 1227 3919 m 2023 3919 l 2023 4294 l 1227 4294 l 1227 3919 l cp gs col38 s gr % Polyline 0.000 slw n 2409 3546 m 2815 3546 l 2815 3922 l 2409 3922 l 2409 3546 l cp gs col36 1.00 shd ef gr % Polyline n 2010 3546 m 2409 3546 l 2409 3922 l 2010 3922 l 2010 3546 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 2019 3544 m 2815 3544 l 2815 3919 l 2019 3919 l 2019 3544 l cp gs col38 s gr % Polyline 0.000 slw n 1618 3546 m 2015 3546 l 2015 3922 l 1618 3922 l 1618 3546 l cp gs col36 1.00 shd ef gr % Polyline n 1219 3546 m 1618 3546 l 1618 3922 l 1219 3922 l 1219 3546 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 1227 3544 m 2023 3544 l 2023 3919 l 1227 3919 l 1227 3544 l cp gs col38 s gr % Polyline n 1221 3546 m 6440 3546 l 6440 5941 l 1221 5941 l 1221 3546 l cp gs col32 s gr /Helvetica-iso ff 225.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 225.00 scf sf 2064 3993 m gs 1 -1 sc (...) col0 sh gr % Polyline n 2819 3915 m 2869 3915 l gs col32 s gr % Polyline n 2952 3915 m 3002 3915 l gs col32 s gr % Polyline n 3085 3915 m 3135 3915 l gs col32 s gr % Polyline n 3219 3915 m 3252 3915 l gs col32 s gr % Polyline n 2819 4290 m 2869 4290 l gs col32 s gr % Polyline n 2952 4290 m 3002 4290 l gs col32 s gr % Polyline n 3085 4290 m 3135 4290 l gs col32 s gr % Polyline n 3219 4290 m 3252 4290 l gs col32 s gr % Polyline n 2819 4282 m 2819 4332 l gs col32 s gr % Polyline n 2819 4415 m 2819 4465 l gs col32 s gr % Polyline n 2819 4548 m 2819 4598 l gs col32 s gr % Polyline n 2019 4282 m 2019 4332 l gs col32 s gr % Polyline n 2019 4415 m 2019 4465 l gs col32 s gr % Polyline n 2019 4548 m 2019 4598 l gs col32 s gr % Polyline n 4036 3915 m 3986 3915 l gs col32 s gr % Polyline n 3902 3915 m 3852 3915 l gs col32 s gr % Polyline n 3769 3915 m 3719 3915 l gs col32 s gr % Polyline n 3636 3915 m 3602 3915 l gs col32 s gr % Polyline n 4036 4290 m 3986 4290 l gs col32 s gr % Polyline n 3902 4290 m 3852 4290 l gs col32 s gr % Polyline n 3769 4290 m 3719 4290 l gs col32 s gr % Polyline n 3636 4290 m 3602 4290 l gs col32 s gr % Polyline n 4035 4282 m 4035 4332 l gs col32 s gr % Polyline n 4035 4415 m 4035 4465 l gs col32 s gr % Polyline n 4035 4548 m 4035 4598 l gs col32 s gr % Polyline n 4835 4282 m 4835 4332 l gs col32 s gr % Polyline n 4835 4415 m 4835 4465 l gs col32 s gr % Polyline n 4835 4548 m 4835 4598 l gs col32 s gr % Polyline n 4036 5565 m 3986 5565 l gs col32 s gr % Polyline n 3902 5565 m 3852 5565 l gs col32 s gr % Polyline n 3769 5565 m 3719 5565 l gs col32 s gr % Polyline n 3636 5565 m 3602 5565 l gs col32 s gr % Polyline n 4036 5190 m 3986 5190 l gs col32 s gr % Polyline n 3902 5190 m 3852 5190 l gs col32 s gr % Polyline n 3769 5190 m 3719 5190 l gs col32 s gr % Polyline n 3636 5190 m 3602 5190 l gs col32 s gr % Polyline n 4035 5198 m 4035 5148 l gs col32 s gr % Polyline n 4035 5065 m 4035 5015 l gs col32 s gr % Polyline n 4035 4932 m 4035 4882 l gs col32 s gr % Polyline n 4835 5198 m 4835 5148 l gs col32 s gr % Polyline n 4835 5065 m 4835 5015 l gs col32 s gr % Polyline n 4835 4932 m 4835 4882 l gs col32 s gr % Polyline n 2819 5565 m 2869 5565 l gs col32 s gr % Polyline n 2952 5565 m 3002 5565 l gs col32 s gr % Polyline n 3085 5565 m 3135 5565 l gs col32 s gr % Polyline n 3219 5565 m 3252 5565 l gs col32 s gr % Polyline n 2819 5190 m 2869 5190 l gs col32 s gr % Polyline n 2952 5190 m 3002 5190 l gs col32 s gr % Polyline n 3085 5190 m 3135 5190 l gs col32 s gr % Polyline n 3219 5190 m 3252 5190 l gs col32 s gr % Polyline n 2819 5198 m 2819 5148 l gs col32 s gr % Polyline n 2819 5065 m 2819 5015 l gs col32 s gr % Polyline n 2819 4932 m 2819 4882 l gs col32 s gr % Polyline n 2019 5198 m 2019 5148 l gs col32 s gr % Polyline n 2019 5065 m 2019 5015 l gs col32 s gr % Polyline n 2019 4932 m 2019 4882 l gs col32 s gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 3181 3267 m gs 1 -1 sc (ny/2+1) col0 sh gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 681 4717 m gs 1 -1 sc (nx) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1564 3445 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5831 3445 m gs 1 -1 sc (ny/2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1064 3745 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 864 5745 m gs 1 -1 sc (nx-1) col0 sh gr % Polyline n 5635 4282 m 5635 4332 l gs col32 s gr % Polyline n 5635 4415 m 5635 4465 l gs col32 s gr % Polyline n 5635 4548 m 5635 4598 l gs col32 s gr % Polyline n 5635 5198 m 5635 5148 l gs col32 s gr % Polyline n 5635 5065 m 5635 5015 l gs col32 s gr % Polyline n 5635 4932 m 5635 4882 l gs col32 s gr % Polyline n 1420 3781 m 6312 3781 l gs col0 s gr % Polyline 0.000 slw n 6348 3784 m 6117 3728 l 6117 3781 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 3784 m 6117 3728 l 6117 3781 l gs col0 s gr % Polyline 0.000 slw n 6348 3778 m 6117 3834 l 6117 3781 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 3778 m 6117 3834 l 6117 3781 l gs col0 s gr % Polyline n 1420 4169 m 6312 4169 l gs col0 s gr % Polyline 0.000 slw n 6348 4172 m 6117 4116 l 6117 4169 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 4172 m 6117 4116 l 6117 4169 l gs col0 s gr % Polyline 0.000 slw n 6348 4166 m 6117 4222 l 6117 4169 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 4166 m 6117 4222 l 6117 4169 l gs col0 s gr % Polyline n 1420 5390 m 6312 5390 l gs col0 s gr % Polyline 0.000 slw n 6348 5393 m 6117 5337 l 6117 5390 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 5393 m 6117 5337 l 6117 5390 l gs col0 s gr % Polyline 0.000 slw n 6348 5387 m 6117 5443 l 6117 5390 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 5387 m 6117 5443 l 6117 5390 l gs col0 s gr % Polyline n 1420 5766 m 6312 5766 l gs col0 s gr % Polyline 0.000 slw n 6348 5769 m 6117 5713 l 6117 5766 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 5769 m 6117 5713 l 6117 5766 l gs col0 s gr % Polyline 0.000 slw n 6348 5763 m 6117 5819 l 6117 5766 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 6348 5763 m 6117 5819 l 6117 5766 l gs col0 s gr % Polyline 0.000 slw n 1469 6215 m 1868 6215 l 1868 6591 l 1469 6591 l 1469 6215 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1469 6215 m 1868 6215 l 1868 6591 l 1469 6591 l 1469 6215 l cp gs col32 s gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 1981 6463 m gs 1 -1 sc (= fftw_real) col0 sh gr % Polyline 0.000 slw n 4026 6217 m 4432 6217 l 4432 6593 l 4026 6593 l 4026 6217 l cp gs col36 1.00 shd ef gr % Polyline n 3627 6217 m 4026 6217 l 4026 6593 l 3627 6593 l 3627 6217 l cp gs col37 1.00 shd ef gr % Polyline 7.500 slw n 3635 6215 m 4440 6215 l 4440 6590 l 3635 6590 l 3635 6215 l cp gs col38 s gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 4547 6463 m gs 1 -1 sc (= fftw_complex) col0 sh gr /Helvetica-Bold-iso ff 240.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-Bold-iso ff 240.00 scf sf 428 5128 m gs 1 -1 sc 90.0 rot (output) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 3679 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 2081 3679 m gs 1 -1 sc (1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4097 3679 m gs 1 -1 sc (ny/2-2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4914 3679 m gs 1 -1 sc (ny/2-1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 4062 m gs 1 -1 sc (ny/2+1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5697 3679 m gs 1 -1 sc (ny/2) col0 sh gr % Polyline 0.000 slw n 1221 495 m 5635 495 l 5635 2890 l 1221 2890 l 1221 495 l cp gs col7 1.00 shd ef gr % Polyline 7.500 slw n 1221 495 m 5635 495 l 5635 2890 l 1221 2890 l 1221 495 l cp gs col32 s gr % Polyline 0.000 slw n 1221 495 m 1620 495 l 1620 871 l 1221 871 l 1221 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 495 m 1620 495 l 1620 871 l 1221 871 l 1221 495 l cp gs col32 s gr % Polyline 0.000 slw n 1620 495 m 2019 495 l 2019 871 l 1620 871 l 1620 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 495 m 2019 495 l 2019 871 l 1620 871 l 1620 495 l cp gs col32 s gr % Polyline 0.000 slw n 2019 495 m 2418 495 l 2418 871 l 2019 871 l 2019 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 495 m 2418 495 l 2418 871 l 2019 871 l 2019 495 l cp gs col32 s gr % Polyline 0.000 slw n 2418 495 m 2817 495 l 2817 871 l 2418 871 l 2418 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 495 m 2817 495 l 2817 871 l 2418 871 l 2418 495 l cp gs col32 s gr % Polyline 0.000 slw n 4038 495 m 4438 495 l 4438 871 l 4038 871 l 4038 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 495 m 4438 495 l 4438 871 l 4038 871 l 4038 495 l cp gs col32 s gr % Polyline 0.000 slw n 4438 495 m 4837 495 l 4837 871 l 4438 871 l 4438 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 495 m 4837 495 l 4837 871 l 4438 871 l 4438 495 l cp gs col32 s gr % Polyline 0.000 slw n 4837 495 m 5236 495 l 5236 871 l 4837 871 l 4837 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 495 m 5236 495 l 5236 871 l 4837 871 l 4837 495 l cp gs col32 s gr % Polyline 0.000 slw n 5236 495 m 5635 495 l 5635 871 l 5236 871 l 5236 495 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 495 m 5635 495 l 5635 871 l 5236 871 l 5236 495 l cp gs col32 s gr % Polyline 0.000 slw n 1221 871 m 1620 871 l 1620 1247 l 1221 1247 l 1221 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 871 m 1620 871 l 1620 1247 l 1221 1247 l 1221 871 l cp gs col32 s gr % Polyline 0.000 slw n 1620 871 m 2019 871 l 2019 1247 l 1620 1247 l 1620 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 871 m 2019 871 l 2019 1247 l 1620 1247 l 1620 871 l cp gs col32 s gr % Polyline 0.000 slw n 2019 871 m 2418 871 l 2418 1247 l 2019 1247 l 2019 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 871 m 2418 871 l 2418 1247 l 2019 1247 l 2019 871 l cp gs col32 s gr % Polyline 0.000 slw n 2418 871 m 2817 871 l 2817 1247 l 2418 1247 l 2418 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 871 m 2817 871 l 2817 1247 l 2418 1247 l 2418 871 l cp gs col32 s gr % Polyline 0.000 slw n 4038 871 m 4438 871 l 4438 1247 l 4038 1247 l 4038 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 871 m 4438 871 l 4438 1247 l 4038 1247 l 4038 871 l cp gs col32 s gr % Polyline 0.000 slw n 4438 871 m 4837 871 l 4837 1247 l 4438 1247 l 4438 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 871 m 4837 871 l 4837 1247 l 4438 1247 l 4438 871 l cp gs col32 s gr % Polyline 0.000 slw n 4837 871 m 5236 871 l 5236 1247 l 4837 1247 l 4837 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 871 m 5236 871 l 5236 1247 l 4837 1247 l 4837 871 l cp gs col32 s gr % Polyline 0.000 slw n 5236 871 m 5635 871 l 5635 1247 l 5236 1247 l 5236 871 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 871 m 5635 871 l 5635 1247 l 5236 1247 l 5236 871 l cp gs col32 s gr % Polyline 0.000 slw n 1221 2139 m 1620 2139 l 1620 2515 l 1221 2515 l 1221 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 2139 m 1620 2139 l 1620 2515 l 1221 2515 l 1221 2139 l cp gs col32 s gr % Polyline 0.000 slw n 1620 2139 m 2019 2139 l 2019 2515 l 1620 2515 l 1620 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 2139 m 2019 2139 l 2019 2515 l 1620 2515 l 1620 2139 l cp gs col32 s gr % Polyline 0.000 slw n 2019 2139 m 2418 2139 l 2418 2515 l 2019 2515 l 2019 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 2139 m 2418 2139 l 2418 2515 l 2019 2515 l 2019 2139 l cp gs col32 s gr % Polyline 0.000 slw n 2418 2139 m 2817 2139 l 2817 2515 l 2418 2515 l 2418 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 2139 m 2817 2139 l 2817 2515 l 2418 2515 l 2418 2139 l cp gs col32 s gr % Polyline 0.000 slw n 4038 2139 m 4438 2139 l 4438 2515 l 4038 2515 l 4038 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 2139 m 4438 2139 l 4438 2515 l 4038 2515 l 4038 2139 l cp gs col32 s gr % Polyline 0.000 slw n 4438 2139 m 4837 2139 l 4837 2515 l 4438 2515 l 4438 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 2139 m 4837 2139 l 4837 2515 l 4438 2515 l 4438 2139 l cp gs col32 s gr % Polyline 0.000 slw n 4837 2139 m 5236 2139 l 5236 2515 l 4837 2515 l 4837 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 2139 m 5236 2139 l 5236 2515 l 4837 2515 l 4837 2139 l cp gs col32 s gr % Polyline 0.000 slw n 5236 2139 m 5635 2139 l 5635 2515 l 5236 2515 l 5236 2139 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 2139 m 5635 2139 l 5635 2515 l 5236 2515 l 5236 2139 l cp gs col32 s gr % Polyline 0.000 slw n 1221 2515 m 1620 2515 l 1620 2890 l 1221 2890 l 1221 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1221 2515 m 1620 2515 l 1620 2890 l 1221 2890 l 1221 2515 l cp gs col32 s gr % Polyline 0.000 slw n 1620 2515 m 2019 2515 l 2019 2890 l 1620 2890 l 1620 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 1620 2515 m 2019 2515 l 2019 2890 l 1620 2890 l 1620 2515 l cp gs col32 s gr % Polyline 0.000 slw n 2019 2515 m 2418 2515 l 2418 2890 l 2019 2890 l 2019 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2019 2515 m 2418 2515 l 2418 2890 l 2019 2890 l 2019 2515 l cp gs col32 s gr % Polyline 0.000 slw n 2418 2515 m 2817 2515 l 2817 2890 l 2418 2890 l 2418 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 2418 2515 m 2817 2515 l 2817 2890 l 2418 2890 l 2418 2515 l cp gs col32 s gr % Polyline 0.000 slw n 4038 2515 m 4438 2515 l 4438 2890 l 4038 2890 l 4038 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4038 2515 m 4438 2515 l 4438 2890 l 4038 2890 l 4038 2515 l cp gs col32 s gr % Polyline 0.000 slw n 4438 2515 m 4837 2515 l 4837 2890 l 4438 2890 l 4438 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4438 2515 m 4837 2515 l 4837 2890 l 4438 2890 l 4438 2515 l cp gs col32 s gr % Polyline 0.000 slw n 4837 2515 m 5236 2515 l 5236 2890 l 4837 2890 l 4837 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 4837 2515 m 5236 2515 l 5236 2890 l 4837 2890 l 4837 2515 l cp gs col32 s gr % Polyline 0.000 slw n 5236 2515 m 5635 2515 l 5635 2890 l 5236 2890 l 5236 2515 l cp gs col33 1.00 shd ef gr % Polyline 7.500 slw n 5236 2515 m 5635 2515 l 5635 2890 l 5236 2890 l 5236 2515 l cp gs col32 s gr % Polyline n 1420 730 m 5459 730 l gs col0 s gr % Polyline 0.000 slw n 5488 733 m 5298 677 l 5298 730 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 733 m 5298 677 l 5298 730 l gs col0 s gr % Polyline 0.000 slw n 5488 727 m 5298 783 l 5298 730 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 727 m 5298 783 l 5298 730 l gs col0 s gr /Helvetica-iso ff 225.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 225.00 scf sf 2064 943 m gs 1 -1 sc (...) col0 sh gr % Polyline n 2819 873 m 2869 873 l gs col32 s gr % Polyline n 2952 873 m 3002 873 l gs col32 s gr % Polyline n 3085 873 m 3135 873 l gs col32 s gr % Polyline n 3219 873 m 3252 873 l gs col32 s gr % Polyline n 2819 1248 m 2869 1248 l gs col32 s gr % Polyline n 2952 1248 m 3002 1248 l gs col32 s gr % Polyline n 3085 1248 m 3135 1248 l gs col32 s gr % Polyline n 3219 1248 m 3252 1248 l gs col32 s gr % Polyline n 2819 1240 m 2819 1290 l gs col32 s gr % Polyline n 2819 1373 m 2819 1423 l gs col32 s gr % Polyline n 2819 1506 m 2819 1556 l gs col32 s gr % Polyline n 2419 1240 m 2419 1290 l gs col32 s gr % Polyline n 2419 1373 m 2419 1423 l gs col32 s gr % Polyline n 2419 1506 m 2419 1556 l gs col32 s gr % Polyline n 2019 1240 m 2019 1290 l gs col32 s gr % Polyline n 2019 1373 m 2019 1423 l gs col32 s gr % Polyline n 2019 1506 m 2019 1556 l gs col32 s gr % Polyline n 1619 1240 m 1619 1290 l gs col32 s gr % Polyline n 1619 1373 m 1619 1423 l gs col32 s gr % Polyline n 1619 1506 m 1619 1556 l gs col32 s gr % Polyline n 4036 873 m 3986 873 l gs col32 s gr % Polyline n 3902 873 m 3852 873 l gs col32 s gr % Polyline n 3769 873 m 3719 873 l gs col32 s gr % Polyline n 3636 873 m 3602 873 l gs col32 s gr % Polyline n 4036 1248 m 3986 1248 l gs col32 s gr % Polyline n 3902 1248 m 3852 1248 l gs col32 s gr % Polyline n 3769 1248 m 3719 1248 l gs col32 s gr % Polyline n 3636 1248 m 3602 1248 l gs col32 s gr % Polyline n 4035 1240 m 4035 1290 l gs col32 s gr % Polyline n 4035 1373 m 4035 1423 l gs col32 s gr % Polyline n 4035 1506 m 4035 1556 l gs col32 s gr % Polyline n 4435 1240 m 4435 1290 l gs col32 s gr % Polyline n 4435 1373 m 4435 1423 l gs col32 s gr % Polyline n 4435 1506 m 4435 1556 l gs col32 s gr % Polyline n 4835 1240 m 4835 1290 l gs col32 s gr % Polyline n 4835 1373 m 4835 1423 l gs col32 s gr % Polyline n 4835 1506 m 4835 1556 l gs col32 s gr % Polyline n 5235 1240 m 5235 1290 l gs col32 s gr % Polyline n 5235 1373 m 5235 1423 l gs col32 s gr % Polyline n 5235 1506 m 5235 1556 l gs col32 s gr % Polyline n 4036 2515 m 3986 2515 l gs col32 s gr % Polyline n 3902 2515 m 3852 2515 l gs col32 s gr % Polyline n 3769 2515 m 3719 2515 l gs col32 s gr % Polyline n 3636 2515 m 3602 2515 l gs col32 s gr % Polyline n 4036 2140 m 3986 2140 l gs col32 s gr % Polyline n 3902 2140 m 3852 2140 l gs col32 s gr % Polyline n 3769 2140 m 3719 2140 l gs col32 s gr % Polyline n 3636 2140 m 3602 2140 l gs col32 s gr % Polyline n 4035 2148 m 4035 2098 l gs col32 s gr % Polyline n 4035 2015 m 4035 1965 l gs col32 s gr % Polyline n 4035 1881 m 4035 1831 l gs col32 s gr % Polyline n 4435 2148 m 4435 2098 l gs col32 s gr % Polyline n 4435 2015 m 4435 1965 l gs col32 s gr % Polyline n 4435 1881 m 4435 1831 l gs col32 s gr % Polyline n 4835 2148 m 4835 2098 l gs col32 s gr % Polyline n 4835 2015 m 4835 1965 l gs col32 s gr % Polyline n 4835 1881 m 4835 1831 l gs col32 s gr % Polyline n 5235 2148 m 5235 2098 l gs col32 s gr % Polyline n 5235 2015 m 5235 1965 l gs col32 s gr % Polyline n 5235 1881 m 5235 1831 l gs col32 s gr % Polyline n 2819 2515 m 2869 2515 l gs col32 s gr % Polyline n 2952 2515 m 3002 2515 l gs col32 s gr % Polyline n 3085 2515 m 3135 2515 l gs col32 s gr % Polyline n 3219 2515 m 3252 2515 l gs col32 s gr % Polyline n 2819 2140 m 2869 2140 l gs col32 s gr % Polyline n 2952 2140 m 3002 2140 l gs col32 s gr % Polyline n 3085 2140 m 3135 2140 l gs col32 s gr % Polyline n 3219 2140 m 3252 2140 l gs col32 s gr % Polyline n 2819 2148 m 2819 2098 l gs col32 s gr % Polyline n 2819 2015 m 2819 1965 l gs col32 s gr % Polyline n 2819 1881 m 2819 1831 l gs col32 s gr % Polyline n 2419 2148 m 2419 2098 l gs col32 s gr % Polyline n 2419 2015 m 2419 1965 l gs col32 s gr % Polyline n 2419 1881 m 2419 1831 l gs col32 s gr % Polyline n 2019 2148 m 2019 2098 l gs col32 s gr % Polyline n 2019 2015 m 2019 1965 l gs col32 s gr % Polyline n 2019 1881 m 2019 1831 l gs col32 s gr % Polyline n 1619 2148 m 1619 2098 l gs col32 s gr % Polyline n 1619 2015 m 1619 1965 l gs col32 s gr % Polyline n 1619 1881 m 1619 1831 l gs col32 s gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 3381 217 m gs 1 -1 sc (ny) col0 sh gr /Helvetica-iso ff 195.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 195.00 scf sf 681 1667 m gs 1 -1 sc (nx) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1364 395 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5281 395 m gs 1 -1 sc (ny-1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1064 695 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 864 2695 m gs 1 -1 sc (nx-1) col0 sh gr % Polyline n 1420 1106 m 5459 1106 l gs col0 s gr % Polyline 0.000 slw n 5488 1109 m 5298 1053 l 5298 1106 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 1109 m 5298 1053 l 5298 1106 l gs col0 s gr % Polyline 0.000 slw n 5488 1103 m 5298 1159 l 5298 1106 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 1103 m 5298 1159 l 5298 1106 l gs col0 s gr % Polyline n 1420 2327 m 5459 2327 l gs col0 s gr % Polyline 0.000 slw n 5488 2330 m 5298 2274 l 5298 2327 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 2330 m 5298 2274 l 5298 2327 l gs col0 s gr % Polyline 0.000 slw n 5488 2324 m 5298 2380 l 5298 2327 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 2324 m 5298 2380 l 5298 2327 l gs col0 s gr % Polyline n 1420 2703 m 5459 2703 l gs col0 s gr % Polyline 0.000 slw n 5488 2706 m 5298 2650 l 5298 2703 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 2706 m 5298 2650 l 5298 2703 l gs col0 s gr % Polyline 0.000 slw n 5488 2700 m 5298 2755 l 5298 2703 l gs 0.00 setgray ef gr % Polyline 7.500 slw n 5488 2700 m 5298 2755 l 5298 2703 l gs col0 s gr /Helvetica-Bold-iso ff 240.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-Bold-iso ff 240.00 scf sf 428 2734 m gs 1 -1 sc 90.0 rot (input, out-of-place) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 629 m gs 1 -1 sc (0) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1681 629 m gs 1 -1 sc (1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 2081 629 m gs 1 -1 sc (2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 2481 629 m gs 1 -1 sc (3) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4081 629 m gs 1 -1 sc (ny-4) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4897 629 m gs 1 -1 sc (ny-2) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 5297 629 m gs 1 -1 sc (ny-1) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 4497 629 m gs 1 -1 sc (ny-3) col0 sh gr /Helvetica-iso ff 150.00 scf sf 74 89 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1264 1012 m gs 1 -1 sc (ny) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1425 4800 m gs 1 -1 sc ( ) col0 sh gr /Helvetica-iso ff 150.00 scf sf 1664 1012 m gs 1 -1 sc (ny+1) col0 sh gr % Polyline n 273 3662 m 273 3039 l gs col0 s gr % Polyline n 382 3920 m 156 3662 l gs col0 s gr % Polyline n 273 3662 m 148 3662 l gs col0 s gr % Polyline n 487 3662 m 487 3039 l gs col0 s gr % Polyline n 378 3920 m 604 3662 l gs col0 s gr % Polyline n 487 3662 m 612 3662 l gs col0 s gr % Polyline n 273 6130 m 273 6753 l gs col0 s gr % Polyline n 382 5872 m 156 6130 l gs col0 s gr % Polyline n 273 6130 m 148 6130 l gs col0 s gr % Polyline n 487 6129 m 487 6753 l gs col0 s gr % Polyline n 378 5872 m 604 6129 l gs col0 s gr % Polyline n 487 6129 m 612 6129 l gs col0 s gr $F2psEnd rs %%EndDocument @endspecial 275 4522 a(Figure)29 b(1:)42 b(Illustration)27 b(of)k(the)g(data)g(la)m(y)m(out)g(for)f(real)g(to)h(complex)f (transforms.)p eop end %%Page: 10 12 TeXDict begin 10 11 bop 150 -116 a Fv(10)3232 b(FFTW)150 299 y(con)m(v)m(olution)41 b(corresp)s(onds)e(to)i(a)g(p)s(oin)m(t)m (wise)e(pro)s(duct)h(of)h(the)f(F)-8 b(ourier)41 b(transforms\).)71 b(F)-8 b(or)41 b(v)-5 b(ariet)m(y)d(,)150 408 y(in-place)25 b(transforms)h(are)g(used)g(for)g(the)g(forw)m(ard)g(FFTs)h(and)e(an)h (out-of-place)i(transform)d(is)h(used)f(for)150 518 y(the)31 b(in)m(v)m(erse)f(transform.)390 692 y Fp(#include)46 b()390 796 y(...)390 900 y({)629 1003 y(fftw_real)f (a[M][2*\(N/2+1\)],)e(b[M][2*\(N/2+1\)],)h(c[M][N];)629 1107 y(fftw_complex)g(*A,)j(*B,)g(C[M][N/2+1];)629 1211 y(rfftwnd_plan)d(p,)j(pinv;)629 1315 y(fftw_real)e(scale)h(=)i(1.0)f(/) g(\(M)g(*)h(N\);)629 1418 y(int)f(i,)g(j;)629 1522 y(...)629 1626 y(p)190 b(=)48 b(rfftw2d_create_plan\(M,)41 b(N,)48 b(FFTW_REAL_TO_COMPLEX,)1917 1730 y(FFTW_ESTIMATE)c(|)k (FFTW_IN_PLACE\);)629 1834 y(pinv)e(=)i(rfftw2d_create_plan\(M,)41 b(N,)48 b(FFTW_COMPLEX_TO_REAL,)1917 1937 y(FFTW_ESTIMATE\);)629 2145 y(/*)f(aliases)f(for)h(accessing)e(complex)h(transform)f(outputs:) g(*/)629 2249 y(A)i(=)h(\(fftw_complex*\))43 b(&a[0][0];)629 2352 y(B)k(=)h(\(fftw_complex*\))43 b(&b[0][0];)629 2456 y(...)629 2560 y(for)k(\(i)g(=)g(0;)g(i)h(<)f(M;)g(++i\))867 2664 y(for)g(\(j)g(=)h(0;)f(j)g(<)h(N;)f(++j\))g({)1106 2768 y(a[i][j])f(=)h(...)g(;)1106 2871 y(b[i][j])f(=)h(...)g(;)867 2975 y(})629 3079 y(...)629 3183 y(rfftwnd_one_real_to_com)o(plex)o (\(p,)41 b(&a[0][0],)k(NULL\);)629 3286 y(rfftwnd_one_real_to_com)o (plex)o(\(p,)c(&b[0][0],)k(NULL\);)629 3494 y(for)i(\(i)g(=)g(0;)g(i)h (<)f(M;)g(++i\))867 3598 y(for)g(\(j)g(=)h(0;)f(j)g(<)h(N/2+1;)e(++j\)) h({)1106 3702 y(int)g(ij)g(=)g(i*\(N/2+1\))f(+)h(j;)1106 3805 y(C[i][j].re)e(=)i(\(A[ij].re)f(*)h(B[ij].re)1774 3909 y(-)h(A[ij].im)d(*)j(B[ij].im\))d(*)i(scale;)1106 4013 y(C[i][j].im)e(=)i(\(A[ij].re)f(*)h(B[ij].im)1774 4117 y(+)h(A[ij].im)d(*)j(B[ij].re\))d(*)i(scale;)867 4220 y(})629 4428 y(/*)g(inverse)f(transform)f(to)i(get)g(c,)g(the)g (convolution)e(of)i(a)g(and)g(b;)772 4532 y(this)f(has)h(the)g(side)g (effect)f(of)h(overwriting)e(C)i(*/)629 4636 y(rfftwnd_one_complex_to_) o(real)o(\(pi)o(nv,)41 b(&C[0][0],)46 b(&c[0][0]\);)629 4739 y(...)629 4843 y(rfftwnd_destroy_plan\(p\))o(;)629 4947 y(rfftwnd_destroy_plan\(pi)o(nv\);)390 5051 y(})275 5230 y Fv(W)-8 b(e)27 b(access)h(the)f(complex)f(outputs)g(of)g(the)h (in-place)e(transforms)h(b)m(y)g(casting)h(eac)m(h)g(real)f(arra)m(y)h (to)h(a)150 5340 y Fp(fftw_complex)d Fv(p)s(oin)m(ter.)39 b(Because)30 b(this)d(is)g(a)i(\\\015at")h(p)s(oin)m(ter,)e(w)m(e)h(ha) m(v)m(e)g(to)g(compute)g(the)f(ro)m(w-ma)5 b(jor)p eop end %%Page: 11 13 TeXDict begin 11 12 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2722 b(11)150 299 y(index)28 b Fp(ij)i Fv(explicitly)d(in)i(the)h(con)m(v)m(olution)f(pro)s(duct)g(lo)s(op.)40 b(In)29 b(order)g(to)i(normalize)e(the)h(con)m(v)m(olution,)150 408 y(w)m(e)23 b(m)m(ust)f(m)m(ultiply)d(b)m(y)k(a)f(scale)h(factor|w)m (e)h(can)e(do)g(so)h(either)f(b)s(efore)g(or)g(after)h(the)f(in)m(v)m (erse)g(transform,)150 518 y(and)34 b(c)m(ho)s(ose)h(the)g(former)f(b)s (ecause)g(it)g(ob)m(viates)h(the)g(necessit)m(y)f(of)h(an)f(additional) e(lo)s(op.)52 b(Notice)36 b(the)150 628 y(limits)28 b(of)j(the)f(lo)s (ops)f(and)h(the)h(dimensions)c(of)k(the)g(v)-5 b(arious)29 b(arra)m(ys.)275 765 y(As)38 b(with)g(the)h(one-dimensional)e(RFFTW,)j (an)f(out-of-place)h Fp(FFTW_COMPLEX_TO_REAL)33 b Fv(trans-)150 875 y(form)e(has)h(the)g(side-e\013ect)h(of)f(o)m(v)m(erwriting)g(its)f (input)f(arra)m(y)-8 b(.)47 b(\(The)31 b(real-to-complex)i(transform,)f (on)150 984 y(the)k(other)f(hand,)h(lea)m(v)m(es)h(its)e(input)e(arra)m (y)j(un)m(touc)m(hed.\))56 b(If)35 b(y)m(ou)h(use)f(RFFTWND)i(for)e(a)h (rank-one)150 1094 y(transform,)g(ho)m(w)m(ev)m(er,)h(this)d (side-e\013ect)i(do)s(es)f(not)g(o)s(ccur.)54 b(Because)37 b(of)e(this)f(fact)h(\(and)g(the)g(simpler)150 1204 y(output)h (format\),)j(users)c(ma)m(y)i(\014nd)e(the)h(RFFTWND)i(in)m(terface)e (more)h(con)m(v)m(enien)m(t)g(than)f(RFFTW)150 1313 y(for)e (one-dimensional)e(transforms.)50 b(Ho)m(w)m(ev)m(er,)38 b(RFFTWND)d(in)e(one)h(dimension)d(is)i(sligh)m(tly)g(slo)m(w)m(er)150 1423 y(than)d(RFFTW)h(b)s(ecause)f(RFFTWND)i(uses)e(an)g(extra)h (bu\013er)f(arra)m(y)h(in)m(ternally)-8 b(.)150 1688 y Fu(2.5)68 b(Multi-dimensional)46 b(Arra)l(y)f(F)-11 b(ormat)275 1883 y Fv(This)28 b(section)i(describ)s(es)f(the)h(format)h (in)e(whic)m(h)g(m)m(ulti-dimensional)d(arra)m(ys)k(are)h(stored.)41 b(W)-8 b(e)31 b(felt)150 1993 y(that)f(a)h(detailed)d(discussion)f(of)j (this)f(topic)h(w)m(as)g(necessary)-8 b(,)31 b(since)e(it)g(is)g(often) h(a)g(source)g(of)g(confusion)150 2103 y(among)c(users)e(and)g(sev)m (eral)h(di\013eren)m(t)g(formats)g(are)h(common.)39 b(Although)24 b(the)h(commen)m(ts)h(b)s(elo)m(w)e(refer)150 2212 y(to)31 b Fp(fftwnd)p Fv(,)e(they)i(are)f(also)h(applicable)d(to)j(the)g Fp(rfftwnd)d Fv(routines.)150 2443 y Fh(2.5.1)63 b(Ro)m(w-ma)7 b(jor)38 b(F)-10 b(ormat)275 2638 y Fv(The)38 b(m)m(ulti-dimensional)d (arra)m(ys)k(passed)f(to)h Fp(fftwnd)e Fv(are)j(exp)s(ected)f(to)g(b)s (e)f(stored)h(as)g(a)g(single)150 2748 y(con)m(tiguous)c(blo)s(c)m(k)f (in)g Fq(ro)m(w-ma)5 b(jor)42 b Fv(order)34 b(\(sometimes)i(called)e (\\C)h(order"\).)54 b(Basically)-8 b(,)36 b(this)e(means)150 2857 y(that)26 b(as)f(y)m(ou)h(step)f(through)f(adjacen)m(t)j(memory)e (lo)s(cations,)h(the)f(\014rst)g(dimension's)d(index)i(v)-5 b(aries)25 b(most)150 2967 y(slo)m(wly)k(and)h(the)h(last)f (dimension's)e(index)h(v)-5 b(aries)29 b(most)i(quic)m(kly)-8 b(.)275 3105 y(T)g(o)31 b(b)s(e)g(more)g(explicit,)f(let)i(us)e (consider)g(an)i(arra)m(y)f(of)h(rank)f Fm(d)g Fv(whose)g(dimensions)e (are)j Fm(n)3418 3119 y Fo(1)3475 3105 y Ft(\002)21 b Fm(n)3622 3119 y Fo(2)3679 3105 y Ft(\002)150 3214 y Fm(n)205 3228 y Fo(3)256 3214 y Ft(\002)15 b(\001)g(\001)g(\001)g(\002) g Fm(n)603 3228 y Fl(d)641 3214 y Fv(.)39 b(No)m(w,)29 b(w)m(e)f(sp)s(ecify)f(a)g(lo)s(cation)h(in)e(the)i(arra)m(y)g(b)m(y)f (a)h(sequence)g(of)f(\(zero-based\))j(indices,)150 3324 y(one)36 b(for)g(eac)m(h)i(dimension:)49 b(\()p Fm(i)1220 3338 y Fo(1)1258 3324 y Fm(;)15 b(i)1329 3338 y Fo(2)1367 3324 y Fm(;)g(i)1438 3338 y Fo(3)1476 3324 y Fm(;)g(:)g(:)g(:)i(;)e(i) 1709 3338 y Fl(d)1748 3324 y Fv(\).)58 b(If)36 b(the)g(arra)m(y)h(is)e (stored)h(in)f(ro)m(w-ma)5 b(jor)37 b(order,)g(then)150 3433 y(this)29 b(elemen)m(t)i(is)f(lo)s(cated)g(at)h(the)g(p)s(osition) d Fm(i)1715 3447 y Fl(d)1775 3433 y Fv(+)19 b Fm(n)1920 3447 y Fl(d)1959 3433 y Fv(\()p Fm(i)2025 3447 y Fl(d)p Fk(\000)p Fo(1)2169 3433 y Fv(+)h Fm(n)2315 3447 y Fl(d)p Fk(\000)p Fo(1)2439 3433 y Fv(\()p Fm(:)15 b(:)g(:)21 b Fv(+)f Fm(n)2746 3447 y Fo(2)2783 3433 y Fm(i)2814 3447 y Fo(1)2851 3433 y Fv(\)\).)275 3571 y(Note)32 b(that)g(eac)m(h)h (elemen)m(t)f(of)f(the)h(arra)m(y)g(m)m(ust)f(b)s(e)g(of)g(t)m(yp)s(e)h Fp(fftw_complex)p Fv(;)c(i.e.)44 b(a)32 b(\(real,)g(imagi-)150 3681 y(nary\))g(pair)f(of)h(\(double-precision\))e(n)m(um)m(b)s(ers.)44 b(Note)34 b(also)e(that,)h(in)e Fp(fftwnd)p Fv(,)g(the)h(expression)f (ab)s(o)m(v)m(e)150 3790 y(is)g(m)m(ultiplied)d(b)m(y)k(the)g(stride)f (to)h(get)h(the)f(actual)h(arra)m(y)f(index|this)d(is)i(useful)f(in)h (situations)f(where)150 3900 y(eac)m(h)35 b(elemen)m(t)f(of)f(the)h(m)m (ulti-dimensional)c(arra)m(y)k(is)e(actually)h(a)h(data)g(structure)g (or)f(another)h(arra)m(y)-8 b(,)150 4009 y(and)28 b(y)m(ou)g(just)g(w)m (an)m(t)h(to)g(transform)e(a)i(single)e(\014eld.)39 b(In)27 b(most)i(cases,)g(ho)m(w)m(ev)m(er,)i(y)m(ou)d(use)g(a)h(stride)e(of)h (1.)150 4349 y Fh(2.5.2)63 b(Column-ma)7 b(jor)39 b(F)-10 b(ormat)275 4545 y Fv(Readers)27 b(from)g(the)h(F)-8 b(ortran)28 b(w)m(orld)f(are)h(used)e(to)j(arra)m(ys)f(stored)f(in)g Fq(column-ma)5 b(jor)33 b Fv(order)27 b(\(some-)150 4654 y(times)k(called)g(\\F)-8 b(ortran)33 b(order"\).)45 b(This)30 b(is)h(essen)m(tially)g(the)h(exact)h(opp)s(osite)e(of)h(ro)m (w-ma)5 b(jor)32 b(order)f(in)150 4764 y(that,)g(here,)g(the)f Fr(\014rst)40 b Fv(dimension's)28 b(index)h(v)-5 b(aries)30 b(most)g(quic)m(kly)-8 b(.)275 4902 y(If)22 b(y)m(ou)h(ha)m(v)m(e)h(an) e(arra)m(y)h(stored)g(in)f(column-ma)5 b(jor)21 b(order)i(and)f(wish)f (to)i(transform)f(it)g(using)f Fp(fftwnd)p Fv(,)150 5011 y(it)31 b(is)g(quite)g(easy)i(to)f(do.)45 b(When)32 b(creating)g(the)g (plan,)f(simply)e(pass)j(the)g(dimensions)d(of)j(the)g(arra)m(y)g(to) 150 5121 y Fp(fftwnd_create_plan)d Fv(in)k Fr(r)-5 b(everse)37 b(or)-5 b(der)p Fv(.)54 b(F)-8 b(or)35 b(example,)g(if)e(y)m(our)h (arra)m(y)h(is)e(a)i(rank)f(three)g Fp(N)c(x)g(M)g(x)150 5230 y(L)i Fv(matrix)f(in)g(column-ma)5 b(jor)32 b(order,)g(y)m(ou)h (should)d(pass)i(the)g(dimensions)e(of)i(the)g(arra)m(y)h(as)g(if)e(it) g(w)m(ere)150 5340 y(an)39 b Fp(L)30 b(x)g(M)g(x)g(N)39 b Fv(matrix)f(\(whic)m(h)g(it)h(is,)i(from)d(the)h(p)s(ersp)s(ectiv)m (e)g(of)g Fp(fftwnd)p Fv(\).)65 b(This)38 b(is)g(done)h(for)g(y)m(ou)p eop end %%Page: 12 14 TeXDict begin 12 13 bop 150 -116 a Fv(12)3232 b(FFTW)150 299 y(automatically)27 b(b)m(y)f(the)h(FFTW)h(F)-8 b(ortran)27 b(wrapp)s(er)e(routines)h(\(see)i(Chapter)e(5)h([Calling)e(FFTW)i(from) 150 408 y(F)-8 b(ortran],)32 b(page)f(51\).)150 635 y Fh(2.5.3)63 b(Static)39 b(Arra)m(ys)i(in)g(C)275 829 y Fv(Multi-dimensional)35 b(arra)m(ys)k(declared)f(statically)h(\(that) h(is,)g(at)g(compile)e(time,)j(not)e(necessarily)150 938 y(with)29 b(the)h Fp(static)e Fv(k)m(eyw)m(ord\))j(in)d(C)i(are)g Fr(alr)-5 b(e)g(ady)41 b Fv(in)29 b(ro)m(w-ma)5 b(jor)30 b(order.)40 b(Y)-8 b(ou)31 b(don't)f(ha)m(v)m(e)h(to)f(do)g(an)m(y-)150 1048 y(thing)g(sp)s(ecial)f(to)j(transform)e(them.)42 b(\(See)31 b(Section)g(2.2)h([Complex)e(Multi-dimensional)d(T)-8 b(ransforms)150 1157 y(T)g(utorial],)30 b(page)h(4,)g(for)f(an)g (example)g(of)h(this)e(sort)i(of)f(co)s(de.\))150 1384 y Fh(2.5.4)63 b(Dynamic)39 b(Arra)m(ys)h(in)i(C)275 1578 y Fv(Often,)49 b(esp)s(ecially)43 b(for)j(large)f(arra)m(ys,)50 b(it)45 b(is)f(desirable)g(to)i(allo)s(cate)g(the)g(arra)m(ys)g (dynamically)-8 b(,)150 1687 y(at)44 b(run)m(time.)76 b(This)41 b(isn't)h(to)s(o)i(hard)e(to)h(do,)j(although)d(it)f(is)g (not)h(as)g(straigh)m(tforw)m(ard)g(for)f(m)m(ulti-)150 1797 y(dimensional)28 b(arra)m(ys)i(as)h(it)f(is)f(for)h (one-dimensional)e(arra)m(ys.)275 1932 y(Creating)35 b(the)i(arra)m(y)g(is)e(simple:)51 b(using)35 b(a)h(dynamic-allo)s (cation)f(routine)g(lik)m(e)h Fp(malloc)p Fv(,)g(allo)s(cate)150 2042 y(an)27 b(arra)m(y)h(big)e(enough)h(to)h(store)g(N)g Fp(fftw_complex)23 b Fv(v)-5 b(alues,)28 b(where)f(N)g(is)f(the)i(pro)s (duct)e(of)h(the)h(sizes)f(of)150 2152 y(the)32 b(arra)m(y)h (dimensions)c(\(i.e.)45 b(the)32 b(total)h(n)m(um)m(b)s(er)e(of)h (complex)f(v)-5 b(alues)31 b(in)g(the)h(arra)m(y\).)46 b(F)-8 b(or)33 b(example,)150 2261 y(here)d(is)g(co)s(de)g(to)h(allo)s (cate)g(a)g(5x12x27)h(rank)e(3)h(arra)m(y:)390 2391 y Fp(fftw_complex)44 b(*an_array;)390 2598 y(an_array)i(=)h (\(fftw_complex)d(*\))j(malloc\(5)f(*)h(12)h(*)f(27)g(*)h (sizeof\(fftw_complex\)\);)275 2734 y Fv(Accessing)38 b(the)f(arra)m(y)i(elemen)m(ts,)h(ho)m(w)m(ev)m(er,)h(is)c(more)h(tric) m(ky|y)m(ou)g(can't)h(simply)c(use)i(m)m(ultiple)150 2844 y(applications)k(of)i(the)h(`)p Fp([])p Fv(')f(op)s(erator)g(lik)m (e)f(y)m(ou)i(could)e(for)h(static)g(arra)m(ys.)79 b(Instead,)47 b(y)m(ou)c(ha)m(v)m(e)h(to)150 2953 y(explicitly)33 b(compute)j(the)g (o\013set)h(in)m(to)f(the)f(arra)m(y)i(using)d(the)i(form)m(ula)f(giv)m (en)g(earlier)g(for)g(ro)m(w-ma)5 b(jor)150 3063 y(arra)m(ys.)48 b(F)-8 b(or)33 b(example,)h(to)f(reference)g(the)g(\()p Fm(i;)15 b(j;)g(k)s Fv(\)-th)35 b(elemen)m(t)e(of)g(the)g(arra)m(y)g (allo)s(cated)g(ab)s(o)m(v)m(e,)i(y)m(ou)150 3172 y(w)m(ould)29 b(use)h(the)h(expression)e Fp(an_array[k)e(+)k(27)e(*)h(\(j)g(+)g(12)g (*)g(i\)])p Fv(.)275 3308 y(This)h(pain)h(can)h(b)s(e)g(alleviated)f (somewhat)i(b)m(y)f(de\014ning)e(appropriate)h(macros,)j(or,)f(in)e(C)p Fp(++)p Fv(,)h(cre-)150 3418 y(ating)d(a)h(class)f(and)g(o)m(v)m (erloading)h(the)f(`)p Fp(\(\))p Fv(')g(op)s(erator.)150 3644 y Fh(2.5.5)63 b(Dynamic)39 b(Arra)m(ys)h(in)i(C|The)e(W)-10 b(rong)42 b(W)-10 b(a)m(y)275 3838 y Fv(A)31 b(di\013eren)m(t)h(metho)s (d)f(for)h(allo)s(cating)f(m)m(ulti-dimensional)d(arra)m(ys)k(in)e(C)i (is)f(often)h(suggested)g(that)150 3947 y(is)e(incompatible)g(with)g Fp(fftwnd)p Fv(:)41 b Fr(using)33 b(it)g(wil)5 b(l)34 b(c)-5 b(ause)34 b(FFTW)g(to)g(die)g(a)f(p)-5 b(ainful)35 b(de)-5 b(ath)p Fv(.)45 b(W)-8 b(e)33 b(discuss)150 4057 y(the)h(tec)m(hnique)g(here,)i(ho)m(w)m(ev)m(er,)g(b)s(ecause)f(it)e (is)h(so)g(commonly)g(kno)m(wn)g(and)f(used.)52 b(This)32 b(metho)s(d)i(is)150 4167 y(to)d(create)g(arra)m(ys)g(of)f(p)s(oin)m (ters)f(of)h(arra)m(ys)h(of)f(p)s(oin)m(ters)f(of)36 b(.)22 b(.)g(.)11 b(etcetera.)43 b(F)-8 b(or)31 b(example,)f(the)h (analogue)150 4276 y(in)e(this)g(metho)s(d)h(to)h(the)g(example)f(ab)s (o)m(v)m(e)h(is:)390 4406 y Fp(int)47 b(i,j;)390 4510 y(fftw_complex)d(***a_bad_array;)92 b(/*)47 b(another)f(way)h(to)g (make)g(a)g(5x12x27)f(array)g(*/)390 4717 y(a_bad_array)f(=)i (\(fftw_complex)d(***\))j(malloc\(5)f(*)h(sizeof\(fftw_complex)c (**\)\);)390 4821 y(for)k(\(i)g(=)h(0;)f(i)g(<)h(5;)f(++i\))f({)629 4925 y(a_bad_array[i])e(=)772 5029 y(\(fftw_complex)g(**\))j (malloc\(12)e(*)j(sizeof\(fftw_complex)42 b(*\)\);)629 5132 y(for)47 b(\(j)g(=)g(0;)g(j)h(<)f(12;)g(++j\))867 5236 y(a_bad_array[i][j])c(=)1154 5340 y(\(fftw_complex)h(*\))j (malloc\(27)e(*)j(sizeof\(fftw_complex\)\);)p eop end %%Page: 13 15 TeXDict begin 13 14 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2722 b(13)390 299 y Fp(})275 443 y Fv(As)34 b(y)m(ou)i(can)f(see,)i(this)d(sort)h(of)g(arra)m(y)g(is)f(incon)m(v)m (enien)m(t)h(to)h(allo)s(cate)f(\(and)g(deallo)s(cate\).)55 b(On)34 b(the)150 552 y(other)g(hand,)h(it)f(has)g(the)g(adv)-5 b(an)m(tage)36 b(that)f(the)f(\()p Fm(i;)15 b(j;)g(k)s Fv(\)-th)37 b(elemen)m(t)e(can)g(b)s(e)e(referenced)h(simply)e(b)m(y) 150 662 y Fp(a_bad_array[i][j][k])p Fv(.)275 806 y(If)e(y)m(ou)g(lik)m (e)g(this)f(tec)m(hnique)i(and)e(w)m(an)m(t)j(to)f(maximize)f(con)m(v)m (enience)h(in)e(accessing)i(the)g(arra)m(y)-8 b(,)32 b(but)150 915 y(still)39 b(w)m(an)m(t)k(to)f(pass)f(the)h(arra)m(y)g (to)g(FFTW,)h(y)m(ou)e(can)h(use)f(a)h(h)m(ybrid)e(metho)s(d.)73 b(Allo)s(cate)42 b(the)g(ar-)150 1025 y(ra)m(y)36 b(as)f(one)h(con)m (tiguous)f(blo)s(c)m(k,)i(but)d(also)i(declare)f(an)g(arra)m(y)h(of)g (arra)m(ys)f(of)h(p)s(oin)m(ters)e(that)i(p)s(oin)m(t)e(to)150 1134 y(appropriate)h(places)i(in)e(the)h(blo)s(c)m(k.)58 b(That)37 b(sort)f(of)h(tric)m(k)f(is)f(b)s(ey)m(ond)h(the)g(scop)s(e)h (of)f(this)g(do)s(cumen-)150 1244 y(tation;)f(for)e(more)h(information) d(on)i(m)m(ulti-dimensional)c(arra)m(ys)34 b(in)e(C,)h(see)h(the)f Fp(comp.lang.c)d Fv(F)-10 b(A)m(Q)150 1354 y(\()p Fp (http://www.eskimo.com/~scs)o(/C-)o(faq/)o(s6.h)o(tml)o Fv(\).)150 1634 y Fu(2.6)68 b(W)-11 b(ords)45 b(of)g(Wisdom)275 1836 y Fv(FFTW)29 b(implemen)m(ts)f(a)h(metho)s(d)g(for)f(sa)m(ving)h (plans)f(to)i(disk)d(and)i(restoring)f(them.)40 b(In)29 b(fact,)h(what)150 1946 y(FFTW)k(do)s(es)e(is)h(more)g(general)g(than)g (just)f(sa)m(ving)h(and)g(loading)e(plans.)48 b(The)32 b(mec)m(hanism)h(is)f(called)150 2055 y Fp(wisdom)p Fv(.)47 b(Here,)35 b(w)m(e)e(describ)s(e)f(this)g(feature)h(at)h(a)g(high)e (lev)m(el.)48 b(See)34 b(Chapter)e(3)i([FFTW)g(Reference],)150 2165 y(page)d(17,)h(for)e(a)g(less)g(casual)g(\(but)g(more)h (complete\))g(discussion)d(of)i(ho)m(w)h(to)g(use)f Fp(wisdom)f Fv(in)g(FFTW.)275 2309 y(Plans)34 b(created)i(with)f(the)g Fp(FFTW_MEASURE)e Fv(option)h(pro)s(duce)h(near-optimal)g(FFT)g(p)s (erformance,)150 2418 y(but)d(it)h(can)h(tak)m(e)h(a)e(long)g(time)g (to)h(compute)f(a)h(plan)e(b)s(ecause)h(FFTW)h(m)m(ust)f(actually)g (measure)g(the)150 2528 y(run)m(time)c(of)i(man)m(y)f(p)s(ossible)e (plans)h(and)h(select)h(the)g(b)s(est)f(one.)41 b(This)29 b(is)g(designed)g(for)i(the)f(situations)150 2637 y(where)38 b(so)h(man)m(y)g(transforms)f(of)h(the)g(same)g(size)f(m)m(ust)h(b)s(e) f(computed)h(that)g(the)g(start-up)f(time)h(is)150 2747 y(irrelev)-5 b(an)m(t.)55 b(F)-8 b(or)36 b(short)f(initialization)d (times)j(but)g(sligh)m(tly)e(slo)m(w)m(er)j(transforms,)g(w)m(e)g(ha)m (v)m(e)g(pro)m(vided)150 2857 y Fp(FFTW_ESTIMATE)p Fv(.)f(The)25 b Fp(wisdom)e Fv(mec)m(hanism)i(is)f(a)h(w)m(a)m(y)h(to)g(get)g(the)g (b)s(est)e(of)i(b)s(oth)e(w)m(orlds.)38 b(There)24 b(are,)150 2966 y(ho)m(w)m(ev)m(er,)35 b(certain)d(ca)m(v)m(eats)j(that)e(the)g (user)e(m)m(ust)i(b)s(e)e(a)m(w)m(are)j(of)f(in)e(using)g Fp(wisdom)p Fv(.)45 b(F)-8 b(or)33 b(this)e(reason,)150 3076 y Fp(wisdom)e Fv(is)g(an)h(optional)g(feature)h(whic)m(h)e(is)g (not)i(enabled)e(b)m(y)h(default.)275 3220 y(A)m(t)c(its)g(simplest,)f Fp(wisdom)f Fv(pro)m(vides)h(a)h(w)m(a)m(y)h(of)f(sa)m(ving)g(plans)e (to)i(disk)f(so)h(that)g(they)g(can)h(b)s(e)e(reused)150 3329 y(in)38 b(other)i(program)g(runs.)67 b(Y)-8 b(ou)41 b(create)g(a)f(plan)e(with)h(the)h(\015ags)g Fp(FFTW_MEASURE)c Fv(and)j Fp(FFTW_USE_)150 3439 y(WISDOM)p Fv(,)29 b(and)h(then)g(sa)m (v)m(e)i(the)e Fp(wisdom)f Fv(using)g Fp(fftw_export_wisdom)p Fv(:)629 3577 y Fp(plan)46 b(=)i(fftw_create_plan\(...,)42 b(...)47 b(|)g(FFTW_MEASURE)e(|)i(FFTW_USE_WISDOM\);)629 3681 y(fftw_export_wisdom\(...\))o(;)275 3824 y Fv(The)37 b(next)h(time)g(y)m(ou)h(run)d(the)i(program,)i(y)m(ou)f(can)f(restore) h(the)f Fp(wisdom)f Fv(with)f Fp(fftw_import_)150 3934 y(wisdom)p Fv(,)28 b(and)g(then)h(recreate)i(the)e(plan)f(using)f(the)i (same)h(\015ags)f(as)g(b)s(efore.)40 b(This)28 b(time,)h(ho)m(w)m(ev)m (er,)i(the)150 4044 y(same)g(optimal)f(plan)g(will)e(b)s(e)j(created)h (v)m(ery)f(quic)m(kly)f(without)g(measuremen)m(ts.)42 b(\(FFTW)32 b(still)d(needs)150 4153 y(some)i(time)f(to)h(compute)g (trigonometric)f(tables,)g(ho)m(w)m(ev)m(er.\))43 b(The)30 b(basic)f(outline)g(is:)629 4291 y Fp(fftw_import_wisdom\(...\))o(;)629 4395 y(plan)46 b(=)i(fftw_create_plan\(...,)42 b(...)47 b(|)g(FFTW_USE_WISDOM\);)275 4539 y Fv(Wisdom)30 b(is)h(more)h(than)f (mere)h(rote)g(memorization,)g(ho)m(w)m(ev)m(er.)46 b(FFTW's)33 b Fp(wisdom)d Fv(encompasses)150 4648 y(all)i(of)g(the)h(kno)m(wledge)g (and)f(measuremen)m(ts)h(that)g(w)m(ere)g(used)f(to)h(create)i(the)d (plan)g(for)g(a)h(giv)m(en)g(size.)150 4758 y(Therefore,)d(existing)g Fp(wisdom)e Fv(is)i(also)g(applied)e(to)j(the)g(creation)g(of)f(other)h (plans)e(of)h(di\013eren)m(t)g(sizes.)275 4902 y(Whenev)m(er)c(a)g (plan)f(is)g(created)i(with)e(the)h Fp(FFTW_MEASURE)c Fv(and)k Fp(FFTW_USE_WISDOM)21 b Fv(\015ags,)28 b Fp(wisdom)150 5011 y Fv(is)j(generated.)46 b(Thereafter,)33 b(plans)d(for)i(an)m(y)g (transform)f(with)g(a)h(similar)d(factorization)k(will)c(b)s(e)i(com-) 150 5121 y(puted)f(more)i(quic)m(kly)-8 b(,)30 b(so)i(long)e(as)i(they) f(use)g(the)g Fp(FFTW_USE_WISDOM)c Fv(\015ag.)43 b(In)30 b(fact,)j(for)e(transforms)150 5230 y(with)g(the)h(same)g(factors)h (and)e(of)h(equal)g(or)g(lesser)f(size,)i(no)e(measuremen)m(ts)i(at)f (all)f(need)h(to)h(b)s(e)e(made)150 5340 y(and)f(an)g(optimal)f(plan)g (can)i(b)s(e)f(created)h(with)e(negligible)f(dela)m(y!)p eop end %%Page: 14 16 TeXDict begin 14 15 bop 150 -116 a Fv(14)3232 b(FFTW)275 299 y(F)-8 b(or)26 b(example,)h(supp)s(ose)e(that)i(y)m(ou)f(create)i (a)f(plan)e(for)h Fm(N)35 b Fv(=)25 b(2)2427 266 y Fo(16)2498 299 y Fv(.)39 b(Then,)26 b(for)g(an)m(y)h(equal)e(or)h(smaller)150 408 y(p)s(o)m(w)m(er)e(of)f(t)m(w)m(o,)k(FFTW)d(can)g(create)h(a)f (plan)e(\(with)h(the)g(same)h(direction)e(and)h(\015ags\))h(quic)m(kly) -8 b(,)25 b(using)d(the)150 518 y(precomputed)28 b Fp(wisdom)p Fv(.)39 b(Ev)m(en)29 b(for)f(larger)h(p)s(o)m(w)m(ers)g(of)g(t)m(w)m (o,)i(or)e(sizes)f(that)i(are)f(a)g(p)s(o)m(w)m(er)g(of)g(t)m(w)m(o)h (times)150 628 y(some)h(other)g(prime)f(factors,)i(plans)d(will)f(b)s (e)i(computed)h(more)g(quic)m(kly)e(than)i(they)g(w)m(ould)f(otherwise) 150 737 y(\(although)g(some)h(measuremen)m(ts)g(still)d(ha)m(v)m(e)j (to)h(b)s(e)d(made\).)275 879 y(The)38 b Fp(wisdom)g Fv(is)g(cum)m(ulativ)m(e,)k(and)c(is)h(stored)g(in)f(a)i(global,)h (priv)-5 b(ate)39 b(data)h(structure)e(managed)150 989 y(in)m(ternally)27 b(b)m(y)i(FFTW.)h(The)f(storage)i(space)e(required)f (is)g(minimal,)f(prop)s(ortional)g(to)j(the)f(logarithm)150 1099 y(of)23 b(the)g(sizes)g(the)g Fp(wisdom)e Fv(w)m(as)i(generated)h (from.)38 b(The)22 b Fp(wisdom)f Fv(can)i(b)s(e)f(forgotten)j(\(and)d (its)g(asso)s(ciated)150 1208 y(memory)33 b(freed\))f(b)m(y)h(a)g(call) f(to)h Fp(fftw_forget_wisdom\(\))p Fv(;)c(otherwise,)k(it)f(is)g(remem) m(b)s(ered)g(un)m(til)f(the)150 1318 y(program)f(terminates.)42 b(It)31 b(can)g(also)f(b)s(e)g(exp)s(orted)h(to)g(a)g(\014le,)f(a)h (string,)f(or)h(an)m(y)g(other)g(medium)d(using)150 1427 y Fp(fftw_export_wisdom)37 b Fv(and)42 b(restored)h(during)d(a)i (subsequen)m(t)g(execution)h(of)f(the)h(program)f(\(or)h(a)150 1537 y(di\013eren)m(t)30 b(program\))g(using)f Fp(fftw_import_wisdom)d Fv(\(these)31 b(functions)e(are)h(describ)s(ed)f(b)s(elo)m(w\).)275 1679 y(Because)f Fp(wisdom)d Fv(is)h(incorp)s(orated)g(in)m(to)h(FFTW)h (at)f(a)h(v)m(ery)f(lo)m(w)g(lev)m(el,)g(the)h(same)f Fp(wisdom)e Fv(can)j(b)s(e)150 1789 y(used)35 b(for)h(one-dimensional)e (transforms,)j(m)m(ulti-dimensional)32 b(transforms,)37 b(and)f(ev)m(en)h(the)f(parallel)150 1898 y(extensions)h(to)h(FFTW.)g (Just)e(include)f Fp(FFTW_USE_WISDOM)e Fv(in)j(the)i(\015ags)f(for)g (whatev)m(er)h(plans)e(y)m(ou)150 2008 y(create)c(\(i.e.,)f(alw)m(a)m (ys)g(plan)e(wisely\).)275 2150 y(Plans)22 b(created)i(with)e(the)i Fp(FFTW_ESTIMATE)19 b Fv(plan)j(can)i(use)f Fp(wisdom)p Fv(,)g(but)g(cannot)h(generate)g(it;)i(only)150 2260 y Fp(FFTW_MEASURE)j Fv(plans)h(actually)i(pro)s(duce)f Fp(wisdom)p Fv(.)44 b(Also,)33 b(plans)d(can)j(only)e(use)h Fp(wisdom)e Fv(generated)150 2369 y(from)22 b(plans)g(created)h(with)f (the)h(same)g(direction)e(and)i(\015ags.)38 b(F)-8 b(or)23 b(example,)i(a)e(size)f Fp(42)h(FFTW_BACKWARD)150 2479 y Fv(transform)34 b(will)e(not)j(use)g Fp(wisdom)e Fv(pro)s(duced)g(b)m (y)i(a)g(size)g Fp(42)f(FFTW_FORWARD)d Fv(transform.)54 b(The)34 b(only)150 2588 y(exception)40 b(to)h(this)e(rule)g(is)h(that) g Fp(FFTW_ESTIMATE)d Fv(plans)i(can)h(use)g Fp(wisdom)f Fv(from)g Fp(FFTW_MEASURE)150 2698 y Fv(plans.)150 2937 y Fh(2.6.1)63 b(Ca)m(v)m(eats)39 b(in)i(Using)h(Wisdom)390 3132 y Fv(F)-8 b(or)27 b(in)e(m)m(uc)m(h)h(wisdom)f(is)g(m)m(uc)m(h)i (grief,)f(and)g(he)g(that)h(increaseth)f(kno)m(wledge)g(increaseth)390 3236 y(sorro)m(w.)41 b([Ecclesiastes)31 b(1:18])275 3378 y(There)37 b(are)i(pitfalls)d(to)i(using)f Fp(wisdom)p Fv(,)i(in)e(that)h(it)g(can)h(negate)g(FFTW's)g(abilit)m(y)e(to)i (adapt)f(to)150 3487 y(c)m(hanging)g(hardw)m(are)g(and)g(other)h (conditions.)63 b(F)-8 b(or)39 b(example,)h(it)e(w)m(ould)f(b)s(e)h(p)s (erfectly)f(p)s(ossible)f(to)150 3597 y(exp)s(ort)41 b Fp(wisdom)e Fv(from)i(a)g(program)g(running)d(on)j(one)g(pro)s (cessor)g(and)f(imp)s(ort)f(it)i(in)m(to)g(a)g(program)150 3706 y(running)35 b(on)i(another)h(pro)s(cessor.)61 b(Doing)38 b(so,)h(ho)m(w)m(ev)m(er,)i(w)m(ould)36 b(mean)i(that)g(the)g(second)f (program)150 3816 y(w)m(ould)29 b(use)h(plans)f(optimized)g(for)h(the)h (\014rst)f(pro)s(cessor,)g(instead)f(of)i(the)g(one)f(it)g(is)g (running)d(on.)275 3958 y(It)j(should)e(b)s(e)i(safe)g(to)h(reuse)f Fp(wisdom)f Fv(as)h(long)g(as)g(the)h(hardw)m(are)e(and)h(program)g (binaries)e(remain)150 4068 y(unc)m(hanged.)40 b(\(Actually)-8 b(,)31 b(the)f(optimal)f(plan)g(ma)m(y)i(c)m(hange)g(ev)m(en)g(b)s(et)m (w)m(een)g(runs)d(of)j(the)f(same)h(binary)150 4177 y(on)22 b(iden)m(tical)e(hardw)m(are,)k(due)d(to)i(di\013erences)e(in)f(the)i (virtual)f(memory)g(en)m(vironmen)m(t,)j(etcetera.)40 b(Users)150 4287 y(seriously)26 b(in)m(terested)i(in)e(p)s(erformance)h (should)f(w)m(orry)i(ab)s(out)f(this)g(problem,)g(to)s(o.\))41 b(It)28 b(is)f(lik)m(ely)f(that,)150 4397 y(if)35 b(the)i(same)g Fp(wisdom)e Fv(is)g(used)h(for)g(t)m(w)m(o)i(di\013eren)m(t)e(program)g (binaries,)g(ev)m(en)h(running)d(on)i(the)h(same)150 4506 y(mac)m(hine,)28 b(the)f(plans)f(ma)m(y)i(b)s(e)f(sub-optimal)e(b) s(ecause)j(of)f(di\013ering)e(co)s(de)j(alignmen)m(ts.)39 b(It)27 b(is)f(therefore)150 4616 y(wise)k(to)i(recreate)g Fp(wisdom)d Fv(ev)m(ery)j(time)f(an)f(application)g(is)g(recompiled.)40 b(The)31 b(more)g(the)g(underlying)150 4725 y(hardw)m(are)40 b(and)g(soft)m(w)m(are)i(c)m(hanges)g(b)s(et)m(w)m(een)f(the)g (creation)g(of)g Fp(wisdom)e Fv(and)h(its)g(use,)j(the)e(greater)150 4835 y(gro)m(ws)31 b(the)f(risk)f(of)i(sub-optimal)d(plans.)150 5074 y Fh(2.6.2)63 b(Imp)s(orting)41 b(and)g(Exp)s(orting)h(Wisdom)390 5236 y Fp(void)47 b(fftw_export_wisdom_to_f)o(ile\()o(FIL)o(E)42 b(*output_file\);)390 5340 y(fftw_status)j(fftw_import_wisdom_from)o (_fil)o(e\(FI)o(LE)c(*input_file\);)p eop end %%Page: 15 17 TeXDict begin 15 16 bop 150 -116 a Fv(Chapter)30 b(2:)41 b(T)-8 b(utorial)2722 b(15)275 299 y Fp(fftw_export_wisdom_to_f)o(ile) 21 b Fv(writes)26 b(the)i Fp(wisdom)d Fv(to)j Fp(output_file)p Fv(,)d(whic)m(h)h(m)m(ust)h(b)s(e)g(a)h(\014le)150 408 y(op)s(en)39 b(for)h(writing.)68 b Fp(fftw_import_wisdom_from_f)o(ile) 33 b Fv(reads)40 b(the)h Fp(wisdom)d Fv(from)h Fp(input_file)p Fv(,)150 518 y(whic)m(h)33 b(m)m(ust)h(b)s(e)g(a)g(\014le)g(op)s(en)f (for)h(reading,)h(and)f(returns)f Fp(FFTW_SUCCESS)d Fv(if)k(successful) f(and)g Fp(FFTW_)150 628 y(FAILURE)c Fv(otherwise.)43 b(In)30 b(b)s(oth)h(cases,)h(the)g(\014le)e(is)g(left)h(op)s(en)g(and)f (m)m(ust)h(b)s(e)g(closed)g(b)m(y)g(the)g(caller.)43 b(It)150 737 y(is)30 b(p)s(erfectly)h(\014ne)g(if)f(other)i(data)g(lie) e(b)s(efore)h(or)g(after)h(the)g Fp(wisdom)d Fv(in)h(the)i(\014le,)f (as)g(long)g(as)h(the)f(\014le)g(is)150 847 y(p)s(ositioned)d(at)j(the) g(b)s(eginning)d(of)i(the)h Fp(wisdom)d Fv(data)k(b)s(efore)e(imp)s (ort.)390 975 y Fp(char)47 b(*fftw_export_wisdom_to_)o(stri)o(ng\()o (void)o(\);)390 1079 y(fftw_status)e(fftw_import_wisdom_from)o(_str)o (ing\()o(con)o(st)d(char)k(*input_string\))275 1212 y (fftw_export_wisdom_to_s)o(tri)o(ng)29 b Fv(allo)s(cates)36 b(a)g(string,)f(exp)s(orts)g(the)h Fp(wisdom)e Fv(to)i(it)f(in)f Fp(NULL)p Fv(-)150 1322 y(terminated)j(format,)i(and)e(returns)e(a)j(p) s(oin)m(ter)e(to)i(the)f(string.)60 b(If)37 b(there)g(is)f(an)h(error)g (in)f(allo)s(cating)150 1432 y(or)h(writing)e(the)i(data,)i(it)d (returns)g Fp(NULL)p Fv(.)58 b(The)37 b(caller)f(is)g(resp)s(onsible)d (for)k(deallo)s(cating)f(the)h(string)150 1541 y(\(with)e Fp(fftw_free)p Fv(\))e(when)i(she)g(is)g(done)g(with)f(it.)56 b Fp(fftw_import_wisdom_from_st)o(rin)o(g)30 b Fv(imp)s(orts)150 1651 y(the)k Fp(wisdom)f Fv(from)h Fp(input_string)p Fv(,)e(returning)g Fp(FFTW_SUCCESS)f Fv(if)i(successful)g(and)g Fp(FFTW_FAILURE)150 1760 y Fv(otherwise.)275 1894 y(Exp)s(orting)h Fp(wisdom)h Fv(do)s(es)h(not)g(a\013ect)i(the)f(store)g(of)f Fp(wisdom)p Fv(.)57 b(Imp)s(orted)35 b Fp(wisdom)g Fv(supplemen)m(ts) 150 2004 y(the)26 b(curren)m(t)g(store)h(rather)e(than)h(replacing)f (it)g(\(except)j(when)d(there)h(is)f(con\015icting)g Fp(wisdom)p Fv(,)h(in)e(whic)m(h)150 2113 y(case)30 b(the)e(older)g Fp(wisdom)f Fv(is)h(discarded\).)39 b(The)28 b(format)h(of)g(the)f(exp) s(orted)h Fp(wisdom)e Fv(is)g(\\nerd-readable")150 2223 y(LISP-lik)m(e)k(ASCI)s(I)f(text;)35 b(w)m(e)d(will)e(not)i(do)s(cumen) m(t)g(it)g(here)g(except)h(to)g(note)g(that)g(it)f(is)f(insensitiv)m(e) f(to)150 2333 y(white)f(space)i(\(in)m(terested)g(users)f(can)g(con)m (tact)j(us)d(for)g(more)g(details\).)275 2466 y(See)h(Chapter)g(3)h ([FFTW)h(Reference],)g(page)g(17,)g(for)e(more)h(information,)e(and)h (for)h(a)g(description)150 2576 y(of)e(ho)m(w)g(y)m(ou)h(can)f (implemen)m(t)f Fp(wisdom)f Fv(imp)s(ort/exp)s(ort)h(for)h(other)g (media)g(b)s(esides)e(\014les)h(and)h(strings.)275 2710 y(The)25 b(follo)m(wing)f(is)h(a)h(brief)e(example)i(in)e(whic)m(h)h (the)h Fp(wisdom)e Fv(is)h(read)h(from)f(a)h(\014le,)g(a)h(plan)d(is)h (created)150 2819 y(\(p)s(ossibly)e(generating)i(more)h Fp(wisdom)p Fv(\),)f(and)g(then)g(the)h Fp(wisdom)d Fv(is)i(exp)s (orted)g(to)h(a)f(string)g(and)f(prin)m(ted)150 2929 y(to)31 b Fp(stdout)p Fv(.)390 3057 y Fp({)629 3161 y(fftw_plan)45 b(plan;)629 3264 y(char)h(*wisdom_string;)629 3368 y(FILE)g (*input_file;)629 3576 y(/*)h(open)f(file)h(to)g(read)g(wisdom)f(from)h (*/)629 3680 y(input_file)e(=)i(fopen\("sample.wisdom",)42 b("r"\);)629 3783 y(if)47 b(\(FFTW_FAILURE)d(==)j (fftw_import_wisdom_from_f)o(ile\()o(inp)o(ut_f)o(ile\))o(\))867 3887 y(printf\("Error)d(reading)i(wisdom!\\n"\);)629 3991 y(fclose\(input_file\);)c(/*)47 b(be)h(sure)e(to)h(close)g(the)g (file!)f(*/)629 4198 y(/*)h(create)f(a)h(plan)g(for)g(N=64,)f(possibly) g(creating)f(and/or)h(using)h(wisdom)f(*/)629 4302 y(plan)g(=)i (fftw_create_plan\(64,FFT)o(W_FO)o(RWAR)o(D,)1774 4406 y(FFTW_MEASURE)d(|)i(FFTW_USE_WISDOM\);)629 4614 y(/*)g(...)g(do)g (some)g(computations)d(with)j(the)g(plan)f(...)h(*/)629 4821 y(/*)g(always)f(destroy)g(plans)g(when)h(you)g(are)g(done)f(*/)629 4925 y(fftw_destroy_plan\(plan\))o(;)629 5132 y(/*)h(write)f(the)h (wisdom)f(to)h(a)h(string)e(*/)629 5236 y(wisdom_string)e(=)j (fftw_export_wisdom_to_str)o(ing\()o(\);)629 5340 y(if)g (\(wisdom_string)d(!=)j(NULL\))f({)p eop end %%Page: 16 18 TeXDict begin 16 17 bop 150 -116 a Fv(16)3232 b(FFTW)867 299 y Fp(printf\("Accumulated)43 b(wisdom:)j (\045s\\n",wisdom_string\);)867 506 y(/*)h(Just)g(for)g(fun,)g(destroy) e(and)i(restore)f(the)h(wisdom)f(*/)867 610 y(fftw_forget_wisdom\(\);)c (/*)47 b(all)g(gone!)g(*/)867 714 y(fftw_import_wisdom_from_s)o(trin)o (g\(wi)o(sdo)o(m_st)o(ring)o(\);)867 818 y(/*)g(wisdom)g(is)g(back!)f (*/)867 1025 y(fftw_free\(wisdom_string\);)41 b(/*)47 b(deallocate)e(it)j(since)e(we're)g(done)h(*/)629 1129 y(})390 1233 y(})p eop end %%Page: 17 19 TeXDict begin 17 18 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(17)150 299 y Fs(3)80 b(FFTW)55 b(Reference)275 526 y Fv(This)25 b(c)m(hapter)j(pro)m(vides)e(a)i (complete)f(reference)h(for)f(all)f(sequen)m(tial)h(\(i.e.,)h(one-pro)s (cessor\))g(FFTW)150 636 y(functions.)52 b(W)-8 b(e)35 b(\014rst)f(de\014ne)g(the)g(data)i(t)m(yp)s(es)e(up)s(on)f(whic)m(h)g (FFTW)i(op)s(erates,)i(that)e(is,)g(real,)g(com-)150 746 y(plex,)24 b(and)f(\\halfcomplex")g(n)m(um)m(b)s(ers)f(\(see)i (Section)g(3.1)g([Data)i(T)m(yp)s(es],)e(page)g(17\).)40 b(Then,)24 b(in)e(four)h(sec-)150 855 y(tions,)i(w)m(e)g(explain)e(the) i(FFTW)g(program)f(in)m(terface)h(for)g(complex)f(one-dimensional)e (transforms)i(\(see)150 965 y(Section)32 b(3.2)i([One-dimensional)c(T) -8 b(ransforms)31 b(Reference],)j(page)f(18\),)i(complex)d(m)m (ulti-dimensional)150 1074 y(transforms)k(\(see)i(Section)e(3.3)i ([Multi-dimensional)33 b(T)-8 b(ransforms)35 b(Reference],)40 b(page)d(22\),)j(and)c(real)150 1184 y(one-dimensional)28 b(transforms)h(\(see)i(Section)f(3.4)h([Real)f(One-dimensional)d(T)-8 b(ransforms)29 b(Reference],)150 1293 y(page)d(26\),)h(real)e(m)m (ulti-dimensional)c(transforms)k(\(see)h(Section)e(3.5)j([Real)e (Multi-dimensional)c(T)-8 b(rans-)150 1403 y(forms)30 b(Reference],)j(page)e(29\).)44 b(Section)30 b(3.6)i([Wisdom)f (Reference],)h(page)g(34)f(describ)s(es)f(the)h Fp(wisdom)150 1513 y Fv(mec)m(hanism)c(for)g(exp)s(orting)g(and)g(imp)s(orting)e (plans.)38 b(Finally)-8 b(,)27 b(Section)g(3.7)i([Memory)f(Allo)s (cator)g(Ref-)150 1622 y(erence],)36 b(page)f(35)g(describ)s(es)e(ho)m (w)h(to)h(c)m(hange)h(FFTW's)f(default)e(memory)h(allo)s(cator.)53 b(F)-8 b(or)35 b(parallel)150 1732 y(transforms,)30 b(See)g(Chapter)g (4)h([P)m(arallel)f(FFTW],)h(page)g(37.)150 1985 y Fu(3.1)68 b(Data)46 b(T)l(yp)t(es)275 2177 y Fv(The)e(routines)f(in)g(the)i(FFTW) h(pac)m(k)-5 b(age)46 b(use)f(three)f(main)g(kinds)f(of)h(data)i(t)m (yp)s(es.)83 b Fq(Real)49 b Fv(and)150 2286 y Fq(complex)31 b Fv(n)m(um)m(b)s(ers)23 b(should)f(b)s(e)j(already)f(kno)m(wn)g(to)h (the)g(reader.)39 b(W)-8 b(e)26 b(also)e(use)h(the)g(term)f Fq(halfcomplex)150 2396 y Fv(to)41 b(describ)s(e)e(complex)h(arra)m(ys) g(in)f(a)i(sp)s(ecial)e(pac)m(k)m(ed)i(format)g(used)f(b)m(y)g(the)g (one-dimensional)e(real)150 2505 y(transforms)30 b(\(taking)g(adv)-5 b(an)m(tage)32 b(of)f(the)g Fq(hermitian)d Fv(symmetry)i(that)h(arises) f(in)f(those)i(cases\).)275 2638 y(By)f(including)d Fp()h Fv(or)j Fp()p Fv(,)d(y)m(ou)i(will)e(ha)m(v)m(e)k(access)f(to) h(the)e(follo)m(wing)f(de\014nitions:)390 2766 y Fp(typedef)46 b(double)g(fftw_real;)390 2973 y(typedef)g(struct)g({)629 3077 y(fftw_real)f(re,)i(im;)390 3181 y(})g(fftw_complex;)390 3388 y(#define)f(c_re\(c\))93 b(\(\(c\).re\))390 3492 y(#define)46 b(c_im\(c\))93 b(\(\(c\).im\))275 3625 y Fv(All)31 b(FFTW)i(op)s(erations)f(are)h(p)s(erformed)e(on)h(the)h Fp(fftw_real)d Fv(and)i Fp(fftw_complex)d Fv(data)34 b(t)m(yp)s(es.)150 3735 y(F)-8 b(or)32 b Fp(fftw_complex)c Fv(n)m(um)m(b)s(ers,)j(the)h(t)m(w)m(o)h(macros)f Fp(c_re)e Fv(and)h Fp(c_im)f Fv(retriev)m(e,)j(resp)s(ectiv)m(ely)-8 b(,)32 b(the)f(real)150 3845 y(and)f(imaginary)f(parts)h(of)g(the)h(n)m (um)m(b)s(er.)275 3978 y(A)43 b Fq(real)g(arra)m(y)51 b Fv(is)42 b(an)h(arra)m(y)h(of)g(real)e(n)m(um)m(b)s(ers.)78 b(A)43 b Fq(complex)g(arra)m(y)52 b Fv(is)42 b(an)h(arra)m(y)h(of)f (complex)150 4087 y(n)m(um)m(b)s(ers.)53 b(A)36 b(one-dimensional)d (arra)m(y)i Fm(X)43 b Fv(of)35 b Fm(n)f Fv(complex)h(n)m(um)m(b)s(ers)f (is)g Fq(hermitian)f Fv(if)h(the)h(follo)m(wing)150 4197 y(prop)s(ert)m(y)40 b(holds:)60 b(for)41 b(all)f(0)j Ft(\024)g Fm(i)g(<)f(n)p Fv(,)h(w)m(e)f(ha)m(v)m(e)g Fm(X)2065 4211 y Fl(i)2136 4197 y Fv(=)g Fm(X)2331 4164 y Fk(\003)2324 4219 y Fl(n)p Fk(\000)p Fl(i)2445 4197 y Fv(,)i(where)c Fm(x)2839 4164 y Fk(\003)2918 4197 y Fv(denotes)h(the)g(complex)150 4307 y(conjugate)30 b(of)e Fm(x)p Fv(.)40 b(Hermitian)27 b(arra)m(ys)i(are)f(relev)-5 b(an)m(t)29 b(to)g(FFTW)g(b)s(ecause)f(the)h(F)-8 b(ourier)27 b(transform)h(of)h(a)150 4416 y(real)h(arra)m(y)h(is)e(hermitian.)275 4549 y(Because)h(of)e(its)g(symmetry)-8 b(,)30 b(a)f(hermitian)d(arra)m (y)k(can)f(b)s(e)f(stored)g(in)g(half)f(the)i(space)g(of)g(a)g(complex) 150 4659 y(arra)m(y)i(of)g(the)h(same)f(size.)42 b(FFTW's)32 b(one-dimensional)c(real)j(transforms)f(store)i(hermitian)c(arra)m(ys)k (as)150 4768 y Fq(halfcomplex)40 b Fv(arra)m(ys.)56 b(A)35 b(halfcomplex)f(arra)m(y)i(of)g(size)f Fm(n)f Fv(is)h(a)g (one-dimensional)e(arra)m(y)j(of)g Fm(n)e Fp(fftw_)150 4878 y(real)e Fv(n)m(um)m(b)s(ers.)47 b(A)33 b(hermitian)e(arra)m(y)i Fm(X)41 b Fv(in)31 b(stored)i(in)m(to)g(a)h(halfcomplex)d(arra)m(y)j Fm(Y)52 b Fv(as)34 b(follo)m(ws.)47 b(F)-8 b(or)150 4988 y(all)36 b(in)m(tegers)h Fm(i)h Fv(suc)m(h)f(that)g(0)g Ft(\024)f Fm(i)h Ft(\024)f Fm(n=)p Fv(2,)k(w)m(e)d(ha)m(v)m(e)i Fm(Y)2094 5002 y Fl(i)2158 4988 y Fv(:=)d(Re\()p Fm(X)2507 5002 y Fl(i)2536 4988 y Fv(\).)61 b(F)-8 b(or)38 b(all)e(in)m(tegers)h Fm(i)h Fv(suc)m(h)e(that)150 5097 y(0)26 b Fm(<)f(i)g(<)g(n=)p Fv(2,)31 b(w)m(e)g(ha)m(v)m(e)h Fm(Y)1067 5111 y Fl(n)p Fk(\000)p Fl(i)1212 5097 y Fv(:=)25 b(Im\()p Fm(X)1552 5111 y Fl(i)1580 5097 y Fv(\).)275 5230 y(W)-8 b(e)27 b(no)m(w)f(illustrate)e(halfcomplex)h(storage)i(for)f Fm(n)f Fv(=)g(4)h(and)f Fm(n)g Fv(=)g(5,)j(since)d(the)h(sc)m(heme)h (dep)s(ends)d(on)150 5340 y(the)g(parit)m(y)g(of)h Fm(n)p Fv(.)38 b(Let)25 b Fm(n)f Fv(=)h(4.)39 b(In)24 b(this)f(case,)k(w)m(e)e (ha)m(v)m(e)g Fm(Y)2095 5354 y Fo(0)2157 5340 y Fv(:=)h(Re\()p Fm(X)2496 5354 y Fo(0)2534 5340 y Fv(\),)g Fm(Y)2673 5354 y Fo(1)2735 5340 y Fv(:=)f(Re)q(\()p Fm(X)3074 5354 y Fo(1)3112 5340 y Fv(\),)h Fm(Y)3251 5354 y Fo(2)3313 5340 y Fv(:=)f(Re\()p Fm(X)3651 5354 y Fo(2)3689 5340 y Fv(\),)p eop end %%Page: 18 20 TeXDict begin 18 19 bop 150 -116 a Fv(18)3232 b(FFTW)150 299 y(and)37 b Fm(Y)387 313 y Fo(3)461 299 y Fv(:=)g(Im)o(\()p Fm(X)812 313 y Fo(1)850 299 y Fv(\).)62 b(Let)38 b(no)m(w)g Fm(n)e Fv(=)h(5.)62 b(In)37 b(this)f(case,)41 b(w)m(e)d(ha)m(v)m(e)g Fm(Y)2612 313 y Fo(0)2686 299 y Fv(:=)f(Re)q(\()p Fm(X)3037 313 y Fo(0)3074 299 y Fv(\),)j Fm(Y)3227 313 y Fo(1)3301 299 y Fv(:=)d(Re\()p Fm(X)3651 313 y Fo(1)3689 299 y Fv(\),)150 408 y Fm(Y)203 422 y Fo(2)265 408 y Fv(:=)25 b(Re)q(\()p Fm(X)604 422 y Fo(2)642 408 y Fv(\),)31 b Fm(Y)786 422 y Fo(3)848 408 y Fv(:=)25 b(Im\()p Fm(X)1188 422 y Fo(2)1226 408 y Fv(\),)31 b(and)e Fm(Y)1546 422 y Fo(4)1609 408 y Fv(:=)c(Im)o(\()p Fm(X)1948 422 y Fo(1)1986 408 y Fv(\).)275 542 y(By)32 b(default,)g(the)h(t)m(yp)s(e)f Fp(fftw_real)e Fv(equals)i(the)g(C)g(t)m(yp)s(e)h Fp(double)p Fv(.)45 b(T)-8 b(o)32 b(w)m(ork)h(in)e(single)g(precision)150 652 y(rather)c(than)g(double)f(precision,)g Fp(#define)g Fv(the)h(sym)m(b)s(ol)f Fp(FFTW_ENABLE_FLOAT)d Fv(in)j Fp(fftw.h)g Fv(and)g(then)150 761 y(recompile)32 b(the)i(library)-8 b(.)48 b(On)32 b(Unix)g(systems,)j(y)m(ou)f(can)f(instead)g(use)g Fp(configure)28 b(--enable-float)150 871 y Fv(at)j(installation)d(time) i(\(see)i(Chapter)e(6)g([Installation)f(and)h(Customization],)g(page)h (55\).)275 1004 y(In)j(v)m(ersion)g(1)h(of)g(FFTW,)h(the)f(data)h(t)m (yp)s(es)f(w)m(ere)g(called)f Fp(FFTW_REAL)f Fv(and)h Fp(FFTW_COMPLEX)p Fv(.)51 b(W)-8 b(e)150 1114 y(c)m(hanged)35 b(the)g(capitalization)f(for)h(consistency)g(with)e(the)i(rest)g(of)g (FFTW's)h(con)m(v)m(en)m(tions.)55 b(The)34 b(old)150 1223 y(names)c(are)h(still)d(supp)s(orted,)h(but)h(their)f(use)h(is)g (deprecated.)150 1478 y Fu(3.2)68 b(One-dimensional)46 b(T)-11 b(ransforms)45 b(Reference)275 1669 y Fv(The)d(one-dimensional) f(complex)i(routines)e(are)j(generally)e(pre\014xed)g(with)g Fp(fftw_)p Fv(.)77 b(Programs)150 1779 y(using)31 b(FFTW)j(should)d(b)s (e)h(link)m(ed)g(with)f Fp(-lfftw)e(-lm)j Fv(on)h(Unix)e(systems,)j(or) f(with)f(the)h(FFTW)h(and)150 1889 y(standard)c(math)g(libraries)d(in)i (general.)150 2110 y Fh(3.2.1)63 b(Plan)40 b(Creation)h(for)g (One-dimensional)h(T)-10 b(ransforms)390 2272 y Fp(#include)46 b()390 2479 y(fftw_plan)f(fftw_create_plan\(int)e(n,)k (fftw_direction)d(dir,)1679 2583 y(int)j(flags\);)390 2791 y(fftw_plan)e(fftw_create_plan_specific)o(\(int)c(n,)47 b(fftw_direction)d(dir,)2108 2894 y(int)j(flags,)2108 2998 y(fftw_complex)e(*in,)h(int)h(istride,)2108 3102 y(fftw_complex)e(*out,)h(int)h(ostride\);)275 3235 y Fv(The)27 b(function)f Fp(fftw_create_plan)e Fv(creates)29 b(a)f(plan,)f(whic)m(h)g(is)g(a)h(data)g(structure)g(con)m(taining)f (all)150 3345 y(the)35 b(information)e(that)i Fp(fftw)e Fv(needs)i(in)e(order)h(to)h(compute)g(the)g(1D)h(F)-8 b(ourier)34 b(transform.)53 b(Y)-8 b(ou)35 b(can)150 3455 y(create)i(as)e(man)m(y)h(plans)d(as)j(y)m(ou)f(need,)i(but)d (only)h(one)g(plan)f(for)h(a)h(giv)m(en)f(arra)m(y)g(size)h(is)e (required)f(\(a)150 3564 y(plan)c(can)i(b)s(e)e(reused)h(man)m(y)g (times\).)275 3698 y Fp(fftw_create_plan)f Fv(returns)j(a)i(v)-5 b(alid)32 b(plan,)i(or)f Fp(NULL)g Fv(if,)g(for)h(some)g(reason,)h(the) f(plan)e(can't)j(b)s(e)150 3807 y(created.)78 b(In)42 b(the)h(default)e(installation,)j(this)d(cannot)i(happ)s(en,)i(but)c (it)h(is)g(p)s(ossible)e(to)j(con\014gure)150 3917 y(FFTW)27 b(in)e(suc)m(h)h(a)h(w)m(a)m(y)h(that)f(some)g(input)d(sizes)i(are)h (forbidden,)e(and)h(FFTW)h(cannot)g(create)h(a)f(plan.)275 4050 y(The)44 b Fp(fftw_create_plan_specific)38 b Fv(v)-5 b(arian)m(t)46 b(tak)m(es)g(as)f(additional)f(argumen)m(ts)h(sp)s (eci\014c)f(in-)150 4160 y(put/output)f(arra)m(ys)g(and)f(their)h (strides.)77 b(F)-8 b(or)44 b(the)f(last)g(four)g(argumen)m(ts,)k(y)m (ou)c(should)e(pass)i(the)150 4270 y(arra)m(ys)31 b(and)g(strides)f (that)h(y)m(ou)g(will)e(ev)m(en)m(tually)i(b)s(e)f(passing)g(to)i Fp(fftw)p Fv(.)41 b(The)31 b(resulting)e(plans)g(will)g(b)s(e)150 4379 y(optimized)g(for)h(those)h(arra)m(ys)g(and)e(strides,)h(although) f(they)i(ma)m(y)g(b)s(e)e(used)h(on)g(other)h(arra)m(ys)f(as)h(w)m (ell.)150 4489 y(Note:)40 b(the)27 b(con)m(ten)m(ts)i(of)e(the)g(in)e (and)h(out)h(arra)m(ys)g(are)h Fr(destr)-5 b(oye)g(d)38 b Fv(b)m(y)27 b(the)g(sp)s(eci\014c)e(planner)g(\(the)j(initial)150 4598 y(con)m(ten)m(ts)k(are)f(ignored,)f(so)g(the)h(arra)m(ys)g(need)f (not)g(ha)m(v)m(e)i(b)s(een)d(initialized\).)150 4820 y Fh(Argumen)m(ts)225 4987 y Ft(\017)60 b Fp(n)30 b Fv(is)f(the)i(size) f(of)h(the)f(transform.)40 b(It)31 b(can)g(b)s(e)e(an)m(y)i(p)s(ositiv) m(e)e(in)m(teger.)379 5121 y Ft(\000)60 b Fv(FFTW)22 b(is)f(b)s(est)g(at)h(handling)c(sizes)k(of)f(the)h(form)f(2)2237 5088 y Fl(a)2277 5121 y Fv(3)2322 5088 y Fl(b)2356 5121 y Fv(5)2401 5088 y Fl(c)2435 5121 y Fv(7)2480 5088 y Fl(d)2519 5121 y Fv(11)2609 5088 y Fl(e)2646 5121 y Fv(13)2736 5088 y Fl(f)2780 5121 y Fv(,)i(where)e Fm(e)p Fv(+)p Fm(f)31 b Fv(is)20 b(either)h(0)h(or)510 5230 y(1,)30 b(and)e(the)h(other)g(exp)s(onen)m(ts)f(are)i(arbitrary)-8 b(.)39 b(Other)28 b(sizes)h(are)g(computed)f(b)m(y)h(means)g(of)g(a)510 5340 y(slo)m(w,)h(general-purp)s(ose)f(routine)h(\(whic)m(h)f(nev)m (ertheless)i(retains)f Fm(O)s Fv(\()p Fm(n)15 b Fv(log)h Fm(n)p Fv(\))30 b(p)s(erformance,)p eop end %%Page: 19 21 TeXDict begin 19 20 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(19)510 299 y(ev)m(en)32 b(for)f(prime)e(sizes\).)44 b(\(It)31 b(is)g(p)s(ossible)d(to)k (customize)g(FFTW)g(for)f(di\013eren)m(t)f(arra)m(y)i(sizes.)510 408 y(See)k(Chapter)g(6)g([Installation)f(and)g(Customization],)i(page) g(55,)h(for)e(more)g(information.\))510 518 y(T)-8 b(ransforms)29 b(whose)h(sizes)h(are)f(p)s(o)m(w)m(ers)h(of)f(2)h(are)g(esp)s(ecially) d(fast.)225 646 y Ft(\017)60 b Fp(dir)34 b Fv(is)g(the)h(sign)f(of)h (the)g(exp)s(onen)m(t)f(in)g(the)h(form)m(ula)f(that)h(de\014nes)f(the) h(F)-8 b(ourier)34 b(transform.)54 b(It)330 755 y(can)31 b(b)s(e)f Ft(\000)p Fv(1)h(or)g(+)o(1.)43 b(The)30 b(aliases)g Fp(FFTW_FORWARD)d Fv(and)j Fp(FFTW_BACKWARD)e Fv(are)j(pro)m(vided,)e (where)330 865 y Fp(FFTW_FORWARD)e Fv(stands)j(for)g Ft(\000)p Fv(1.)225 992 y Ft(\017)60 b Fp(flags)29 b Fv(is)g(a)i(b)s(o)s(olean)e(OR)h(\(`)p Fp(|)p Fv('\))i(of)e(zero)h(or)g (more)f(of)h(the)f(follo)m(wing:)379 1120 y Ft(\000)60 b Fp(FFTW_MEASURE)p Fv(:)33 b(this)19 b(\015ag)j(tells)e(FFTW)h(to)h (\014nd)d(the)i(optimal)f(plan)g(b)m(y)g(actually)h Fr(c)-5 b(omputing)510 1230 y Fv(sev)m(eral)31 b(FFTs)g(and)f(measuring)f (their)h(execution)h(time.)41 b(Dep)s(ending)29 b(on)i(the)g (installation,)510 1339 y(this)e(can)i(tak)m(e)h(some)f(time.)1481 1306 y Fo(1)379 1467 y Ft(\000)60 b Fp(FFTW_ESTIMATE)p Fv(:)34 b(do)25 b(not)g(run)f(an)m(y)h(FFT)h(and)e(pro)m(vide)g(a)h (\\reasonable")h(plan)e(\(for)h(a)g(RISC)510 1576 y(pro)s(cessor)37 b(with)g(man)m(y)h(registers\).)62 b(If)38 b(neither)e Fp(FFTW_ESTIMATE)e Fv(nor)k Fp(FFTW_MEASURE)c Fv(is)510 1686 y(pro)m(vided,)29 b(the)i(default)e(is)h Fp(FFTW_ESTIMATE)p Fv(.)379 1813 y Ft(\000)60 b Fp(FFTW_OUT_OF_PLACE)p Fv(:)41 b(pro)s(duce)32 b(a)i(plan)e(assuming)f(that)j(the)f(input)e(and)i (output)g(arra)m(ys)510 1923 y(will)28 b(b)s(e)h(distinct)g(\(this)h (is)f(the)i(default\).)379 2051 y Ft(\000)60 b Fp(FFTW_IN_PLACE)p Fv(:)39 b(pro)s(duce)31 b(a)h(plan)e(assuming)g(that)i(y)m(ou)g(w)m(an) m(t)g(the)g(output)f(in)f(the)i(input)510 2160 y(arra)m(y)-8 b(.)50 b(The)33 b(algorithm)f(used)g(is)g(not)i(necessarily)e(in)g (place:)46 b(FFTW)34 b(is)e(able)h(to)h(compute)510 2270 y(true)23 b(in-place)f(transforms)h(only)f(for)h(small)f(v)-5 b(alues)23 b(of)g Fp(n)p Fv(.)38 b(If)23 b(FFTW)h(is)e(not)i(able)f(to) h(compute)510 2379 y(the)31 b(transform)g(in-place,)f(it)h(will)e(allo) s(cate)i(a)h(temp)s(orary)e(arra)m(y)i(\(unless)e(y)m(ou)h(pro)m(vide)g (one)510 2489 y(y)m(ourself)7 b(\),)27 b(compute)e(the)h(transform)f (out)h(of)g(place,)h(and)e(cop)m(y)h(the)g(result)f(bac)m(k.)40 b Fr(Warning:)510 2599 y(This)f(option)i(changes)e(the)h(me)-5 b(aning)40 b(of)f(some)g(p)-5 b(ar)g(ameters)42 b(of)e Fp(fftw)c Fv(\(see)i(Section)f(3.2.3)510 2708 y([Computing)29 b(the)i(One-dimensional)c(T)-8 b(ransform],)30 b(page)h(20\).)510 2836 y(The)d(in-place)f(option)h(is)f(mainly)g(pro)m(vided)f(for)j(p)s (eople)e(who)h(w)m(an)m(t)h(to)g(write)e(their)h(o)m(wn)g(in-)510 2945 y(place)k(m)m(ulti-dimensional)d(F)-8 b(ourier)32 b(transform,)g(using)f(FFTW)i(as)f(a)h(base.)47 b(F)-8 b(or)33 b(example,)510 3055 y(consider)f(a)i(three-dimensional)e Fp(n)e(*)g(n)g(*)g(n)j Fv(transform.)49 b(An)33 b(out-of-place)i (algorithm)e(will)510 3164 y(need)45 b(another)g(arra)m(y)g(\(whic)m(h) f(ma)m(y)i(b)s(e)e(h)m(uge\).)86 b(Ho)m(w)m(ev)m(er,)50 b(FFTW)c(can)f(compute)h(the)510 3274 y(in-place)35 b(transform)f (along)i(eac)m(h)h(dimension)c(using)h(only)h(a)h(temp)s(orary)f(arra)m (y)h(of)g(size)f Fp(n)p Fv(.)510 3384 y(Moreo)m(v)m(er,)h(if)31 b(FFTW)j(happ)s(ens)c(to)k(b)s(e)e(able)g(to)i(compute)f(the)f (transform)g(truly)g(in-place,)510 3493 y(no)k(temp)s(orary)g(arra)m(y) h(and)e(no)i(cop)m(ying)f(are)g(needed.)58 b(As)37 b(distributed,)e (FFTW)i(`kno)m(ws')510 3603 y(ho)m(w)32 b(to)h(compute)f(in-place)g (transforms)f(of)h(size)g(1,)h(2,)h(3,)f(4,)g(5,)g(6,)g(7,)g(8,)h(9,)f (10,)h(11,)f(12,)h(13,)510 3712 y(14,)d(15,)h(16,)f(32)h(and)d(64.)510 3840 y(The)h(default)f(mo)s(de)h(of)h(op)s(eration)f(is)f Fp(FFTW_OUT_OF_PLACE)p Fv(.)379 3968 y Ft(\000)60 b Fp(FFTW_USE_WISDOM) p Fv(:)37 b(use)30 b(an)m(y)h Fp(wisdom)e Fv(that)i(is)e(a)m(v)-5 b(ailable)30 b(to)h(help)e(in)h(the)g(creation)h(of)g(the)510 4077 y(plan.)50 b(\(See)34 b(Section)g(2.6)h([W)-8 b(ords)34 b(of)h(Wisdom],)f(page)h(13.\))52 b(This)32 b(can)i(greatly)h(sp)s(eed) e(the)510 4187 y(creation)27 b(of)g(plans,)g(esp)s(ecially)e(with)g (the)j Fp(FFTW_MEASURE)23 b Fv(option.)39 b Fp(FFTW_ESTIMATE)23 b Fv(plans)510 4296 y(can)28 b(also)g(tak)m(e)i(adv)-5 b(an)m(tage)30 b(of)e Fp(wisdom)e Fv(to)j(pro)s(duce)e(a)h(more)g (optimal)f(plan)g(\(based)h(on)g(past)510 4406 y(measuremen)m(ts\))i (than)g(the)g(estimation)f(heuristic)f(w)m(ould)g(normally)g(generate.) 42 b(When)30 b(the)510 4515 y Fp(FFTW_MEASURE)36 b Fv(option)j(is)f (used,)j(new)d Fp(wisdom)g Fv(will)f(also)i(b)s(e)f(generated)j(if)d (the)h(curren)m(t)510 4625 y(transform)30 b(size)g(is)f(not)i (completely)f(understo)s(o)s(d)f(b)m(y)h(existing)f Fp(wisdom)p Fv(.)225 4753 y Ft(\017)60 b Fp(in)p Fv(,)35 b Fp(out)p Fv(,)f Fp(istride)p Fv(,)g Fp(ostride)e Fv(\(only)i(for)g Fp(fftw_create_plan_specifi)o(c)p Fv(\):)43 b(see)35 b(corresp)s(ond-)330 4862 y(ing)41 b(argumen)m(ts)h(in)e(the)i (description)d(of)j Fp(fftw)p Fv(.)73 b(\(See)42 b(Section)g(3.2.3)h ([Computing)d(the)i(One-)330 4972 y(dimensional)e(T)-8 b(ransform],)45 b(page)f(20.\))79 b(In)42 b(particular,)i(the)f Fp(out)f Fv(and)g Fp(ostride)f Fv(parameters)330 5081 y(ha)m(v)m(e)32 b(the)e(same)h(sp)s(ecial)e(meaning)h(for)g Fp(FFTW_IN_PLACE)c Fv(transforms)k(as)h(they)f(ha)m(v)m(e)i(for)e Fp(fftw)p Fv(.)p 150 5149 1200 4 v 199 5217 a Fo(1)275 5249 y Fj(The)25 b(basic)h(problem)e(is)i(the)e(resolution)j(of)e(the)g (clo)r(c)n(k:)35 b(FFTW)26 b(needs)e(to)i(run)e(for)i(a)g(certain)f (time)g(for)g(the)g(clo)r(c)n(k)h(to)275 5340 y(b)r(e)f(reliable.)p eop end %%Page: 20 22 TeXDict begin 20 21 bop 150 -116 a Fv(20)3232 b(FFTW)150 299 y Fh(3.2.2)63 b(Discussion)42 b(on)g(Sp)s(eci\014c)f(Plans)275 499 y Fv(W)-8 b(e)22 b(recommend)f(the)g(use)g(of)h(the)f(sp)s (eci\014c)f(planners,)i(ev)m(en)g(in)e(cases)i(where)e(y)m(ou)i(will)d (b)s(e)h(transform-)150 608 y(ing)30 b(arra)m(ys)h(di\013eren)m(t)f (from)g(those)h(passed)f(to)i(the)f(sp)s(eci\014c)e(planners,)g(as)i (they)g(confer)g(the)f(follo)m(wing)150 718 y(adv)-5 b(an)m(tages:)225 860 y Ft(\017)60 b Fv(The)36 b(resulting)f(plans)g (will)f(b)s(e)i(optimized)g(for)g(y)m(our)h(sp)s(eci\014c)e(arra)m(ys)i (and)f(strides.)58 b(This)35 b(ma)m(y)330 969 y(or)d(ma)m(y)h(not)g (mak)m(e)g(a)f(signi\014can)m(t)g(di\013erence,)g(but)g(it)f(certainly) h(do)s(esn't)g(h)m(urt.)46 b(\(The)32 b(ordinary)330 1079 y(planner)d(do)s(es)h(its)f(planning)f(based)i(up)s(on)f(a)i (stride-one)f(temp)s(orary)g(arra)m(y)g(that)h(it)f(allo)s(cates.\))225 1217 y Ft(\017)60 b Fv(Less)27 b(in)m(termediate)g(storage)i(is)e (required)e(during)g(the)j(planning)d(pro)s(cess.)39 b(\(The)27 b(ordinary)f(plan-)330 1327 y(ner)32 b(uses)g(O\()p Fp(N)p Fv(\))h(temp)s(orary)f(storage,)j(where)d Fp(N)g Fv(is)g(the)h(maxim)m(um)e(dimension,)g(while)g(it)h(is)f(cre-)330 1436 y(ating)f(the)h(plan.\))225 1574 y Ft(\017)60 b Fv(F)-8 b(or)32 b(m)m(ulti-dimensional)27 b(transforms,)j(new)h (parameters)g(b)s(ecome)h(accessible)e(for)h(optimization)330 1684 y(b)m(y)36 b(the)h(planner.)58 b(\(Since)36 b(m)m (ulti-dimensional)c(arra)m(ys)37 b(can)g(b)s(e)f(v)m(ery)h(large,)h(w)m (e)f(don't)g(dare)f(to)330 1794 y(allo)s(cate)30 b(one)g(in)f(the)g (ordinary)f(planner)g(for)i(exp)s(erimen)m(tation.)39 b(This)28 b(prev)m(en)m(ts)j(us)e(from)g(doing)330 1903 y(certain)h(optimizations)f(that)i(can)g(yield)e(dramatic)h(impro)m(v)m (emen)m(ts)g(in)f(some)i(cases.\))275 2073 y(On)36 b(the)h(other)g (hand,)h(note)g(that)f Fr(the)i(sp)-5 b(e)g(ci\014c)40 b(planner)g(destr)-5 b(oys)41 b(the)e(c)-5 b(ontents)40 b(of)f(the)g Fp(in)f Fr(and)150 2183 y Fp(out)32 b Fr(arr)-5 b(ays)p Fv(.)150 2422 y Fh(3.2.3)63 b(Computing)41 b(the)f (One-dimensional)i(T)-10 b(ransform)390 2584 y Fp(#include)46 b()390 2791 y(void)h(fftw\(fftw_plan)d(plan,)i(int)h(howmany,) 867 2895 y(fftw_complex)e(*in,)h(int)h(istride,)f(int)h(idist,)867 2999 y(fftw_complex)e(*out,)h(int)h(ostride,)f(int)g(odist\);)390 3206 y(void)h(fftw_one\(fftw_plan)42 b(plan,)47 b(fftw_complex)d(*in,) 867 3310 y(fftw_complex)h(*out\);)275 3452 y Fv(The)22 b(function)g Fp(fftw)g Fv(computes)h(the)g(one-dimensional)e(F)-8 b(ourier)23 b(transform,)h(using)e(a)h(plan)f(created)150 3561 y(b)m(y)31 b Fp(fftw_create_plan)c Fv(\(See)k(Section)g(3.2.1)i ([Plan)e(Creation)f(for)h(One-dimensional)e(T)-8 b(ransforms],)150 3671 y(page)38 b(18.\))62 b(The)37 b(function)f Fp(fftw_one)f Fv(pro)m(vides)h(a)i(simpli\014ed)33 b(in)m(terface)38 b(for)f(the)g(common)h(case)g(of)150 3781 y(single)29 b(input)f(arra)m(y)j(of)g(stride)e(1.)150 4019 y Fh(Argumen)m(ts)225 4187 y Ft(\017)60 b Fp(plan)35 b Fv(is)g(the)i(plan)e(created)i(b)m(y)f Fp(fftw_create_plan)c Fv(\(see)38 b(Section)e(3.2.1)i([Plan)d(Creation) h(for)330 4297 y(One-dimensional)27 b(T)-8 b(ransforms],)30 b(page)h(18\).)225 4435 y Ft(\017)60 b Fp(howmany)30 b Fv(is)h(the)h(n)m(um)m(b)s(er)e(of)i(transforms)f Fp(fftw)g Fv(will)e(compute.)46 b(It)32 b(is)f(faster)h(to)h(tell)e(FFTW)h(to)330 4544 y(compute)f(man)m(y)f(transforms,)g(instead)g(of)g(simply)e (calling)h Fp(fftw)g Fv(man)m(y)i(times.)225 4682 y Ft(\017)60 b Fp(in)p Fv(,)33 b Fp(istride)e Fv(and)i Fp(idist)e Fv(describ)s(e)h(the)h(input)e(arra)m(y\(s\).)50 b(There)33 b(are)g Fp(howmany)e Fv(input)g(arra)m(ys;)330 4792 y(the)26 b(\014rst)f(one)h(is)f(p)s(oin)m(ted)g(to)h(b)m(y)g Fp(in)p Fv(,)g(the)g(second)g(one)g(is)f(p)s(oin)m(ted)g(to)h(b)m(y)g Fp(in)k(+)g(idist)p Fv(,)c(and)f(so)h(on,)330 4902 y(up)f(to)h Fp(in)k(+)g(\(howmany)e(-)i(1\))g(*)g(idist)p Fv(.)37 b(Eac)m(h)27 b(input)c(arra)m(y)k(consists)e(of)g(complex)h(n)m(um)m(b) s(ers)e(\(see)330 5011 y(Section)35 b(3.1)i([Data)g(T)m(yp)s(es],)g (page)g(17\),)h(whic)m(h)c(are)i(not)g(necessarily)e(con)m(tiguous)i (in)e(memory)-8 b(.)330 5121 y(Sp)s(eci\014cally)g(,)39 b Fp(in[0])f Fv(is)g(the)h(\014rst)g(elemen)m(t)g(of)g(the)h(\014rst)e (arra)m(y)-8 b(,)42 b Fp(in[istride])36 b Fv(is)j(the)g(second)330 5230 y(elemen)m(t)f(of)f(the)g(\014rst)g(arra)m(y)-8 b(,)40 b(and)c(so)i(on.)61 b(In)36 b(general,)j(the)f Fp(i)p Fv(-th)f(elemen)m(t)g(of)h(the)f Fp(j)p Fv(-th)g(input)330 5340 y(arra)m(y)31 b(will)d(b)s(e)h(in)g(p)s(osition)g Fp(in[i)g(*)h(istride)e(+)j(j)f(*)g(idist])p Fv(.)p eop end %%Page: 21 23 TeXDict begin 21 22 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(21)225 299 y Ft(\017)60 b Fp(out)p Fv(,)33 b Fp(ostride)f Fv(and)g Fp(odist)g Fv(describ)s(e)g(the)h(output)g(arra)m(y\(s\).)50 b(The)33 b(format)g(is)g(the)g(same)h(as)f(for)330 408 y(the)e(input)d(arra)m(y) -8 b(.)379 540 y Ft(\000)60 b Fr(In-plac)-5 b(e)46 b(tr)-5 b(ansforms)7 b Fv(:)73 b(If)44 b(the)h Fp(plan)e Fv(sp)s(eci\014es)g (an)i(in-place)e(transform,)48 b Fp(ostride)43 b Fv(and)510 649 y Fp(odist)33 b Fv(are)h(alw)m(a)m(ys)h(ignored.)51 b(If)33 b Fp(out)g Fv(is)h Fp(NULL)p Fv(,)g Fp(out)f Fv(is)g(ignored,)h(to)s(o.)53 b(Otherwise,)34 b Fp(out)f Fv(is)510 759 y(in)m(terpreted)h(as)h(a)g(p)s(oin)m(ter)f(to)i(an)e (arra)m(y)i(of)f Fp(n)f Fv(complex)h(n)m(um)m(b)s(ers,)f(that)i(FFTW)f (will)d(use)510 868 y(as)j(temp)s(orary)f(space)h(to)h(p)s(erform)d (the)i(in-place)e(computation.)54 b Fp(out)34 b Fv(is)f(used)h(as)h (scratc)m(h)510 978 y(space)41 b(and)g(its)f(con)m(ten)m(ts)j(destro)m (y)m(ed.)73 b(In)40 b(this)g(case,)k Fp(out)c Fv(m)m(ust)h(b)s(e)f(an)h (ordinary)e(arra)m(y)510 1088 y(whose)30 b(elemen)m(ts)h(are)g(con)m (tiguous)f(in)f(memory)i(\(no)f(striding\).)275 1240 y(The)45 b(function)f Fp(fftw_one)f Fv(transforms)i(a)h(single,)i(con)m (tiguous)e(input)d(arra)m(y)k(to)f(a)g(con)m(tiguous)150 1350 y(output)30 b(arra)m(y)-8 b(.)42 b(By)30 b(de\014nition,)f(the)h (call)390 1475 y Fp(fftw_one\(plan,)44 b(in,)j(out\))275 1607 y Fv(is)29 b(equiv)-5 b(alen)m(t)30 b(to)390 1732 y Fp(fftw\(plan,)45 b(1,)i(in,)g(1,)g(0,)g(out,)g(1,)g(0\))150 1946 y Fh(3.2.4)63 b(Destro)m(ying)41 b(a)g(One-dimensional)g(Plan)390 2108 y Fp(#include)46 b()390 2316 y(void)h (fftw_destroy_plan\(fftw_)o(plan)41 b(plan\);)275 2447 y Fv(The)27 b(function)f Fp(fftw_destroy_plan)d Fv(frees)28 b(the)f(plan)g Fp(plan)f Fv(and)h(releases)h(all)f(the)h(memory)f (asso-)150 2557 y(ciated)k(with)e(it.)40 b(After)31 b(destruction,)e(a) i(plan)e(is)h(no)g(longer)g(v)-5 b(alid.)150 2771 y Fh(3.2.5)63 b(What)40 b(FFTW)h(Really)f(Computes)275 2960 y Fv(In)26 b(this)g(section,)i(w)m(e)g(de\014ne)e(precisely)g(what)h(FFTW)h (computes.)40 b(Please)27 b(b)s(e)f(w)m(arned)h(that)h(di\013er-)150 3070 y(en)m(t)j(authors)f(and)g(soft)m(w)m(are)i(pac)m(k)-5 b(ages)32 b(migh)m(t)e(emplo)m(y)g(di\013eren)m(t)g(con)m(v)m(en)m (tions)h(than)g(FFTW)g(do)s(es.)275 3201 y(The)e(forw)m(ard)h (transform)g(of)g(a)h(complex)f(arra)m(y)h Fm(X)38 b Fv(of)30 b(size)h Fm(n)f Fv(computes)g(an)g(arra)m(y)h Fm(Y)20 b Fv(,)31 b(where)1475 3449 y Fm(Y)1528 3463 y Fl(i)1581 3449 y Fv(=)1677 3344 y Fl(n)p Fk(\000)p Fo(1)1680 3369 y Fg(X)1682 3545 y Fl(j)s Fo(=0)1818 3449 y Fm(X)1893 3463 y Fl(j)1928 3449 y Fm(e)1970 3412 y Fk(\000)p Fo(2)p Fl(\031)r(ij)2149 3367 y Fk(p)p 2205 3367 85 3 v 2205 3412 a(\000)p Fo(1)p Fl(=n)2400 3449 y Fm(:)275 3729 y Fv(The)e(bac)m(kw)m(ard)i(transform)f(computes)1501 3977 y Fm(Y)1554 3991 y Fl(i)1607 3977 y Fv(=)1703 3872 y Fl(n)p Fk(\000)p Fo(1)1706 3897 y Fg(X)1708 4073 y Fl(j)s Fo(=0)1844 3977 y Fm(X)1919 3991 y Fl(j)1954 3977 y Fm(e)1996 3940 y Fo(2)p Fl(\031)r(ij)2123 3895 y Fk(p)p 2179 3895 V 2179 3940 a(\000)p Fo(1)p Fl(=n)2374 3977 y Fm(:)275 4332 y Fv(FFTW)h(computes)g(an)f(unnormalized)f(transform,)h (that)h(is,)f(the)h(equation)g Fm(I)7 b(F)13 b(F)g(T)g Fv(\()p Fm(F)g(F)g(T)g Fv(\()p Fm(X)7 b Fv(\)\))27 b(=)150 4442 y Fm(nX)47 b Fv(holds.)70 b(In)40 b(other)g(w)m(ords,)j(applying)c (the)h(forw)m(ard)g(and)g(then)g(the)h(bac)m(kw)m(ard)g(transform)f (will)150 4551 y(m)m(ultiply)28 b(the)i(input)f(b)m(y)h Fm(n)p Fv(.)275 4682 y(An)j Fp(FFTW_FORWARD)e Fv(transform)i(corresp)s (onds)f(to)j(a)f(sign)f(of)h Ft(\000)p Fv(1)g(in)e(the)i(exp)s(onen)m (t)g(of)g(the)g(DFT.)150 4792 y(Note)23 b(also)g(that)f(w)m(e)h(use)f (the)g(standard)g(\\in-order")f(output)h(ordering|the)f Fm(k)s Fv(-th)i(output)e(corresp)s(onds)150 4902 y(to)26 b(the)g(frequency)f Fm(k)s(=n)h Fv(\(or)g Fm(k)s(=T)13 b Fv(,)27 b(where)e Fm(T)38 b Fv(is)25 b(y)m(our)h(total)g(sampling)e (p)s(erio)s(d\).)37 b(F)-8 b(or)26 b(those)g(who)f(lik)m(e)g(to)150 5011 y(think)g(in)h(terms)h(of)f(p)s(ositiv)m(e)g(and)g(negativ)m(e)i (frequencies,)f(this)f(means)h(that)g(the)g(p)s(ositiv)m(e)f (frequencies)150 5121 y(are)e(stored)f(in)f(the)h(\014rst)g(half)f(of)i (the)f(output)g(and)f(the)i(negativ)m(e)g(frequencies)f(are)g(stored)h (in)e(bac)m(kw)m(ards)150 5230 y(order)31 b(in)f(the)i(second)g(half)e (of)i(the)g(output.)44 b(\(The)32 b(frequency)f Ft(\000)p Fm(k)s(=n)g Fv(is)g(the)h(same)g(as)g(the)f(frequency)150 5340 y(\()p Fm(n)20 b Ft(\000)g Fm(k)s Fv(\))p Fm(=n)p Fv(.\))p eop end %%Page: 22 24 TeXDict begin 22 23 bop 150 -116 a Fv(22)3232 b(FFTW)150 299 y Fu(3.3)68 b(Multi-dimensional)46 b(T)-11 b(ransforms)45 b(Reference)275 499 y Fv(The)26 b(m)m(ulti-dimensional)d(complex)j (routines)g(are)h(generally)f(pre\014xed)g(with)f Fp(fftwnd_)p Fv(.)38 b(Programs)150 609 y(using)d(FFTWND)i(should)d(b)s(e)h(link)m (ed)g(with)g Fp(-lfftw)28 b(-lm)35 b Fv(on)h(Unix)f(systems,)j(or)e (with)f(the)h(FFTW)150 718 y(and)30 b(standard)f(math)i(libraries)c(in) i(general.)150 958 y Fh(3.3.1)63 b(Plan)40 b(Creation)h(for)g (Multi-dimensional)h(T)-10 b(ransforms)390 1120 y Fp(#include)46 b()390 1327 y(fftwnd_plan)f(fftwnd_create_plan\(int)c(rank,)47 b(const)f(int)h(*n,)1870 1431 y(fftw_direction)c(dir,)k(int)g(flags\);) 390 1638 y(fftwnd_plan)e(fftw2d_create_plan\(int)c(nx,)47 b(int)g(ny,)1870 1742 y(fftw_direction)c(dir,)k(int)g(flags\);)390 1950 y(fftwnd_plan)e(fftw3d_create_plan\(int)c(nx,)47 b(int)g(ny,)g(int)g(nz,)1870 2054 y(fftw_direction)c(dir,)k(int)g (flags\);)390 2261 y(fftwnd_plan)e(fftwnd_create_plan_spec)o(ific)o (\(int)c(rank,)46 b(const)h(int)g(*n,)2299 2365 y(fftw_direction)d (dir,)2299 2469 y(int)j(flags,)2299 2572 y(fftw_complex)e(*in,)h(int)h (istride,)2299 2676 y(fftw_complex)e(*out,)h(int)h(ostride\);)390 2884 y(fftwnd_plan)e(fftw2d_create_plan_spec)o(ific)o(\(int)c(nx,)47 b(int)g(ny,)2299 2988 y(fftw_direction)d(dir,)2299 3091 y(int)j(flags,)2299 3195 y(fftw_complex)e(*in,)h(int)h(istride,)2299 3299 y(fftw_complex)e(*out,)h(int)h(ostride\);)390 3506 y(fftwnd_plan)e(fftw3d_create_plan_spec)o(ific)o(\(int)c(nx,)47 b(int)g(ny,)g(int)g(nz,)2299 3610 y(fftw_direction)d(dir,)j(int)g (flags,)2299 3714 y(fftw_complex)e(*in,)h(int)h(istride,)2299 3818 y(fftw_complex)e(*out,)h(int)h(ostride\);)275 3960 y Fv(The)29 b(function)h Fp(fftwnd_create_plan)25 b Fv(creates)32 b(a)f(plan,)e(whic)m(h)g(is)h(a)g(data)h(structure)f(con)m(taining)150 4069 y(all)41 b(the)h(information)e(that)j Fp(fftwnd)d Fv(needs)h(in)g(order)g(to)i(compute)f(a)g(m)m(ulti-dimensional)c(F)-8 b(ourier)150 4179 y(transform.)42 b(Y)-8 b(ou)32 b(can)f(create)i(as)e (man)m(y)g(plans)f(as)h(y)m(ou)g(need,)h(but)e(only)g(one)h(plan)f(for) h(a)g(giv)m(en)g(arra)m(y)150 4289 y(size)37 b(is)f(required)f(\(a)j (plan)e(can)h(b)s(e)g(reused)f(man)m(y)h(times\).)61 b(The)36 b(functions)g Fp(fftw2d_create_plan)150 4398 y Fv(and)e Fp(fftw3d_create_plan)29 b Fv(are)35 b(optional,)g (alternativ)m(e)g(in)m(terfaces)g(to)h Fp(fftwnd_create_plan)29 b Fv(for)150 4508 y(t)m(w)m(o)j(and)d(three)i(dimensions,)d(resp)s (ectiv)m(ely)-8 b(.)275 4650 y Fp(fftwnd_create_plan)21 b Fv(returns)26 b(a)h(v)-5 b(alid)25 b(plan,)i(or)g Fp(NULL)f Fv(if,)g(for)h(some)g(reason,)h(the)f(plan)f(can't)i(b)s(e)150 4760 y(created.)46 b(This)30 b(can)i(happ)s(en)e(if)h(memory)h(runs)e (out)i(or)g(if)f(the)h(argumen)m(ts)g(are)g(in)m(v)-5 b(alid)29 b(in)i(some)h(w)m(a)m(y)150 4869 y(\(e.g.)42 b(if)29 b Fp(rank)h(<)g Fv(0\).)275 5011 y(The)22 b Fp (create_plan_specific)17 b Fv(v)-5 b(arian)m(ts)22 b(tak)m(e)i(as)f (additional)e(argumen)m(ts)h(sp)s(eci\014c)g(input/output)150 5121 y(arra)m(ys)k(and)f(their)g(strides.)38 b(F)-8 b(or)26 b(the)g(last)g(four)f(argumen)m(ts,)i(y)m(ou)f(should)e(pass)h(the)h (arra)m(ys)g(and)f(strides)150 5230 y(that)37 b(y)m(ou)g(will)c(ev)m (en)m(tually)k(b)s(e)f(passing)f(to)i Fp(fftwnd)p Fv(.)57 b(The)36 b(resulting)f(plans)f(will)g(b)s(e)i(optimized)f(for)150 5340 y(those)j(arra)m(ys)g(and)g(strides,)g(although)g(they)f(ma)m(y)i (b)s(e)e(used)g(on)h(other)g(arra)m(ys)g(as)g(w)m(ell.)62 b(Note:)57 b(the)p eop end %%Page: 23 25 TeXDict begin 23 24 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(23)150 299 y(con)m(ten)m(ts)32 b(of)e(the)h(in)d(and)i(out)g(arra)m(ys)h(are)f Fr(destr)-5 b(oye)g(d)42 b Fv(b)m(y)30 b(the)h(sp)s(eci\014c)e(planner)f(\(the)j (initial)c(con)m(ten)m(ts)150 408 y(are)k(ignored,)f(so)h(the)g(arra)m (ys)h(need)e(not)h(ha)m(v)m(e)h(b)s(een)e(initialized\).)39 b(See)31 b(Section)g(3.2.2)i([Discussion)c(on)150 518 y(Sp)s(eci\014c)g(Plans],)h(page)h(20,)g(for)f(a)h(discussion)d(on)i (sp)s(eci\014c)f(plans.)150 736 y Fh(Argumen)m(ts)225 903 y Ft(\017)60 b Fp(rank)27 b Fv(is)g(the)h(dimensionalit)m(y)d(of)j (the)g(arra)m(ys)g(to)g(b)s(e)f(transformed.)40 b(It)27 b(can)i(b)s(e)e(an)m(y)h(non-negativ)m(e)330 1013 y(in)m(teger.)225 1145 y Ft(\017)60 b Fp(n)38 b Fv(is)f(a)h(p)s(oin)m(ter)f(to)i(an)f (arra)m(y)h(of)f Fp(rank)f Fv(in)m(tegers,)j(giving)d(the)i(size)f(of)g (eac)m(h)h(dimension)c(of)k(the)330 1255 y(arra)m(ys)h(to)h(b)s(e)f (transformed.)69 b(These)40 b(sizes,)i(whic)m(h)d(m)m(ust)h(b)s(e)f(p)s (ositiv)m(e)g(in)m(tegers,)k(corresp)s(ond)330 1365 y(to)37 b(the)f(dimensions)d(of)j(ro)m(w-ma)5 b(jor)36 b(arra)m(ys|i.e.)58 b Fp(n[0])35 b Fv(is)g(the)h(size)g(of)g(the)g(dimension)d(whose)330 1474 y(indices)21 b(v)-5 b(ary)23 b(most)g(slo)m(wly)-8 b(,)24 b(and)f(so)g(on.)38 b(\(See)24 b(Section)e(2.5)j ([Multi-dimensional)19 b(Arra)m(y)k(F)-8 b(ormat],)330 1584 y(page)29 b(11,)g(for)f(more)g(information)e(on)i(ro)m(w-ma)5 b(jor)28 b(storage.\))42 b(See)28 b(Section)g(3.2.1)h([Plan)e(Creation) 330 1693 y(for)44 b(One-dimensional)e(T)-8 b(ransforms],)48 b(page)d(18,)50 b(for)44 b(more)h(information)e(regarding)h(optimal)330 1803 y(arra)m(y)31 b(sizes.)225 1935 y Ft(\017)60 b Fp(nx)35 b Fv(and)f Fp(ny)h Fv(in)f Fp(fftw2d_create_plan)c Fv(are)36 b(p)s(ositiv)m(e)e(in)m(tegers)i(sp)s(ecifying)d(the)i(dimensions)e(of) 330 2045 y(the)h(rank)f(2)h(arra)m(y)g(to)h(b)s(e)e(transformed.)50 b(i.e.)h(they)34 b(sp)s(ecify)e(that)i(the)g(transform)f(will)e(op)s (erate)330 2154 y(on)k Fp(nx)30 b(x)g(ny)35 b Fv(arra)m(ys)g(in)f(ro)m (w-ma)5 b(jor)36 b(order,)g(where)f Fp(nx)g Fv(is)f(the)h(n)m(um)m(b)s (er)f(of)i(ro)m(ws)f(and)g Fp(ny)f Fv(is)h(the)330 2264 y(n)m(um)m(b)s(er)29 b(of)i(columns.)225 2396 y Ft(\017)60 b Fp(nx)p Fv(,)31 b Fp(ny)f Fv(and)g Fp(nz)h Fv(in)e Fp(fftw3d_create_plan)d Fv(are)32 b(p)s(ositiv)m(e)e(in)m(tegers)h(sp)s (ecifying)e(the)i(dimensions)330 2506 y(of)c(the)h(rank)e(3)i(arra)m(y) g(to)g(b)s(e)e(transformed.)39 b(i.e.)h(they)27 b(sp)s(ecify)f(that)i (the)f(transform)g(will)d(op)s(erate)330 2616 y(on)30 b Fp(nx)g(x)g(ny)g(x)g(nz)g Fv(arra)m(ys)g(in)f(ro)m(w-ma)5 b(jor)31 b(order.)225 2748 y Ft(\017)60 b Fp(dir)34 b Fv(is)g(the)h(sign)f(of)h(the)g(exp)s(onen)m(t)f(in)g(the)h(form)m(ula) f(that)h(de\014nes)f(the)h(F)-8 b(ourier)34 b(transform.)54 b(It)330 2857 y(can)31 b(b)s(e)f Ft(\000)p Fv(1)h(or)g(+)o(1.)43 b(The)30 b(aliases)g Fp(FFTW_FORWARD)d Fv(and)j Fp(FFTW_BACKWARD)e Fv(are)j(pro)m(vided,)e(where)330 2967 y Fp(FFTW_FORWARD)e Fv(stands)j(for)g Ft(\000)p Fv(1.)225 3099 y Ft(\017)60 b Fp(flags)29 b Fv(is)g(a)i(b)s(o)s(olean)e(OR)h(\(`)p Fp(|)p Fv('\))i(of)e(zero)h(or)g(more)f(of)h(the)f(follo)m(wing:)379 3232 y Ft(\000)60 b Fp(FFTW_MEASURE)p Fv(:)33 b(this)19 b(\015ag)j(tells)e(FFTW)h(to)h(\014nd)d(the)i(optimal)f(plan)g(b)m(y)g (actually)h Fr(c)-5 b(omputing)510 3341 y Fv(sev)m(eral)31 b(FFTs)f(and)g(measuring)f(their)h(execution)g(time.)379 3474 y Ft(\000)60 b Fp(FFTW_ESTIMATE)p Fv(:)34 b(do)25 b(not)g(run)f(an)m(y)h(FFT)h(and)e(pro)m(vide)g(a)h(\\reasonable")h (plan)e(\(for)h(a)g(RISC)510 3583 y(pro)s(cessor)37 b(with)g(man)m(y)h (registers\).)62 b(If)38 b(neither)e Fp(FFTW_ESTIMATE)e Fv(nor)k Fp(FFTW_MEASURE)c Fv(is)510 3693 y(pro)m(vided,)29 b(the)i(default)e(is)h Fp(FFTW_ESTIMATE)p Fv(.)379 3825 y Ft(\000)60 b Fp(FFTW_OUT_OF_PLACE)p Fv(:)41 b(pro)s(duce)32 b(a)i(plan)e(assuming)f(that)j(the)f(input)e(and)i(output)g(arra)m(ys) 510 3935 y(will)28 b(b)s(e)h(distinct)g(\(this)h(is)f(the)i(default\).) 379 4067 y Ft(\000)60 b Fp(FFTW_IN_PLACE)p Fv(:)54 b(pro)s(duce)37 b(a)i(plan)e(assuming)h(that)h(y)m(ou)g(w)m(an)m(t)g(to)h(p)s(erform)d (the)i(trans-)510 4177 y(form)30 b(in-place.)40 b(\(Unlik)m(e)30 b(the)h(one-dimensional)d(transform,)j(this)e(\\really")3176 4144 y Fo(2)3244 4177 y Fv(p)s(erforms)g(the)510 4286 y(transform)36 b(in-place.\))58 b(Note)37 b(that,)i(if)c(y)m(ou)i(w)m (an)m(t)g(to)g(p)s(erform)e(in-place)g(transforms,)j(y)m(ou)510 4396 y Fr(must)h Fv(use)31 b(a)f(plan)f(created)j(with)d(this)g (option.)510 4528 y(The)h(default)f(mo)s(de)h(of)h(op)s(eration)f(is)f Fp(FFTW_OUT_OF_PLACE)p Fv(.)379 4661 y Ft(\000)60 b Fp(FFTW_USE_WISDOM) p Fv(:)h(use)42 b(an)m(y)h Fp(wisdom)e Fv(that)i(is)f(a)m(v)-5 b(ailable)41 b(to)j(help)d(in)g(the)i(creation)g(of)510 4770 y(the)34 b(plan.)50 b(\(See)35 b(Section)e(2.6)i([W)-8 b(ords)35 b(of)f(Wisdom],)g(page)h(13.\))52 b(This)32 b(can)i(greatly)h(sp)s(eed)510 4880 y(the)g(creation)h(of)f(plans,)g (esp)s(ecially)e(with)h(the)h Fp(FFTW_MEASURE)d Fv(option.)55 b Fp(FFTW_ESTIMATE)p 150 4967 1200 4 v 199 5034 a Fo(2)275 5066 y Fi(fftwnd)32 b Fj(actually)f(ma)n(y)f(use)g(some)h(temp)r(orary) f(storage)i(\(hidden)e(in)h(the)f(plan\),)i(but)e(this)h(storage)h (space)g(is)f(only)275 5157 y(the)26 b(size)j(of)f(the)f(largest)h (dimension)f(of)h(the)f(arra)n(y)-6 b(,)28 b(rather)f(than)g(b)r(eing)g (as)h(big)g(as)g(the)f(en)n(tire)g(arra)n(y)-6 b(.)39 b(\(Unless)28 b(y)n(ou)275 5249 y(use)k Fi(fftwnd)i Fj(to)f(p)r(erform) f(one-dimensional)h(transforms,)i(in)d(whic)n(h)h(case)g(the)f(temp)r (orary)g(storage)i(required)e(for)275 5340 y(in-place)25 b(transforms)h Ff(is)32 b Fj(as)26 b(big)g(as)h(the)e(en)n(tire)h(arra) n(y)-6 b(.\))p eop end %%Page: 24 26 TeXDict begin 24 25 bop 150 -116 a Fv(24)3232 b(FFTW)510 299 y(plans)33 b(can)i(also)f(tak)m(e)i(adv)-5 b(an)m(tage)36 b(of)f Fp(wisdom)e Fv(to)i(pro)s(duce)e(a)i(more)f(optimal)g(plan)f (\(based)510 408 y(on)42 b(past)g(measuremen)m(ts\))g(than)f(the)h (estimation)g(heuristic)e(w)m(ould)g(normally)g(generate.)510 518 y(When)30 b(the)h Fp(FFTW_MEASURE)c Fv(option)j(is)g(used,)g(new)g Fp(wisdom)f Fv(will)f(also)j(b)s(e)f(generated)h(if)f(the)510 628 y(curren)m(t)42 b(transform)g(size)g(is)g(not)g(completely)g (understo)s(o)s(d)f(b)m(y)h(existing)g Fp(wisdom)p Fv(.)75 b(Note)510 737 y(that)37 b(the)g(same)g Fp(wisdom)e Fv(is)h(shared)g(b) s(et)m(w)m(een)h(one-dimensional)e(and)h(m)m(ulti-dimensional)510 847 y(transforms.)225 982 y Ft(\017)60 b Fp(in)p Fv(,)34 b Fp(out)p Fv(,)g Fp(istride)p Fv(,)f Fp(ostride)f Fv(\(only)h(for)g (the)h Fp(_create_plan_specific)28 b Fv(v)-5 b(arian)m(ts\):)48 b(see)34 b(cor-)330 1092 y(resp)s(onding)25 b(argumen)m(ts)j(in)f(the)g (description)f(of)i Fp(fftwnd)p Fv(.)38 b(\(See)28 b(Section)g(3.3.2)h ([Computing)e(the)330 1202 y(Multi-dimensional)g(T)-8 b(ransform],)29 b(page)j(24.\))150 1430 y Fh(3.3.2)63 b(Computing)41 b(the)f(Multi-dimensional)i(T)-10 b(ransform)390 1592 y Fp(#include)46 b()390 1799 y(void)h(fftwnd\(fftwnd_plan) 42 b(plan,)47 b(int)g(howmany,)963 1903 y(fftw_complex)d(*in,)j(int)g (istride,)e(int)i(idist,)963 2007 y(fftw_complex)d(*out,)j(int)f (ostride,)g(int)h(odist\);)390 2215 y(void)g(fftwnd_one\(fftwnd_plan)41 b(p,)48 b(fftw_complex)c(*in,)1154 2318 y(fftw_complex)g(*out\);)275 2455 y Fv(The)33 b(function)f Fp(fftwnd)g Fv(computes)h(one)h(or)g (more)f(m)m(ulti-dimensional)d(F)-8 b(ourier)33 b(T)-8 b(ransforms,)33 b(us-)150 2565 y(ing)39 b(a)i(plan)e(created)i(b)m(y)f Fp(fftwnd_create_plan)35 b Fv(\(see)41 b(Section)f(3.3.1)i([Plan)d (Creation)h(for)g(Multi-)150 2674 y(dimensional)20 b(T)-8 b(ransforms],)24 b(page)g(22\).)40 b(\(Note)24 b(that)g(the)f(plan)f (determines)g(the)i(rank)e(and)h(dimensions)150 2784 y(of)34 b(the)h(arra)m(y)g(to)g(b)s(e)e(transformed.\))52 b(The)34 b(function)f Fp(fftwnd_one)e Fv(pro)m(vides)i(a)i (simpli\014ed)30 b(in)m(terface)150 2893 y(for)g(the)h(common)f(case)i (of)e(single)f(input)g(arra)m(y)i(of)f(stride)f(1.)150 3122 y Fh(Argumen)m(ts)225 3289 y Ft(\017)60 b Fp(plan)67 b Fv(is)g(the)i(plan)d(created)k(b)m(y)e Fp(fftwnd_create_plan)p Fv(.)149 b(\(see)69 b(Section)f(3.3.1)i([Plan)330 3399 y(Creation)56 b(for)g(Multi-dimensional)c(T)-8 b(ransforms],)62 b(page)57 b(22\).)119 b(In)55 b(the)i(case)g(of)f(t)m(w)m(o)i(and)330 3509 y(three-dimensional)24 b(transforms,)j(it)e(could)h(also)g(ha)m(v) m(e)i(b)s(een)d(created)j(b)m(y)e Fp(fftw2d_create_plan)330 3618 y Fv(or)k Fp(fftw3d_create_plan)p Fv(,)c(resp)s(ectiv)m(ely)-8 b(.)225 3754 y Ft(\017)60 b Fp(howmany)28 b Fv(is)i(the)g(n)m(um)m(b)s (er)f(of)i(m)m(ulti-dimensional)26 b(transforms)k Fp(fftwnd)f Fv(will)e(compute.)225 3889 y Ft(\017)60 b Fp(in)p Fv(,)f Fp(istride)52 b Fv(and)h Fp(idist)f Fv(describ)s(e)g(the)i(input)e (arra)m(y\(s\).)112 b(There)53 b(are)h Fp(howmany)e Fv(m)m(ulti-)330 3999 y(dimensional)24 b(input)g(arra)m(ys;)29 b(the)e(\014rst)f(one)h (is)e(p)s(oin)m(ted)h(to)h(b)m(y)g Fp(in)p Fv(,)g(the)f(second)h(one)g (is)f(p)s(oin)m(ted)f(to)330 4109 y(b)m(y)i Fp(in)j(+)g(idist)p Fv(,)d(and)f(so)i(on,)g(up)e(to)i Fp(in)i(+)g(\(howmany)e(-)i(1\))g(*)g (idist)p Fv(.)38 b(Eac)m(h)28 b(m)m(ulti-dimensional)330 4218 y(input)44 b(arra)m(y)j(consists)f(of)g(complex)g(n)m(um)m(b)s (ers)f(\(see)j(Section)e(3.1)h([Data)h(T)m(yp)s(es],)i(page)d(17\),)330 4328 y(stored)62 b(in)e(ro)m(w-ma)5 b(jor)62 b(format)g(\(see)h (Section)e(2.5)i([Multi-dimensional)58 b(Arra)m(y)k(F)-8 b(ormat],)330 4437 y(page)49 b(11\),)54 b(whic)m(h)47 b(are)h(not)g(necessarily)f(con)m(tiguous)i(in)d(memory)-8 b(.)95 b(Sp)s(eci\014cally)-8 b(,)50 b Fp(in[0])d Fv(is)330 4547 y(the)d(\014rst)e(elemen)m(t)i(of)g(the)g(\014rst)e(arra)m(y)-8 b(,)48 b Fp(in[istride])41 b Fv(is)h(the)i(second)f(elemen)m(t)h(of)g (the)g(\014rst)330 4656 y(arra)m(y)-8 b(,)50 b(and)44 b(so)h(on.)85 b(In)44 b(general,)49 b(the)c Fp(i)p Fv(-th)g(elemen)m(t) g(of)g(the)g Fp(j)p Fv(-th)g(input)e(arra)m(y)j(will)c(b)s(e)i(in)330 4766 y(p)s(osition)g Fp(in[i)30 b(*)g(istride)e(+)i(j)g(*)g(idist])p Fv(.)87 b(Note)48 b(that,)j(here,)f Fp(i)c Fv(refers)g(to)h(an)f(index) f(in)m(to)330 4876 y(the)c(ro)m(w-ma)5 b(jor)42 b(format)g(for)e(the)i (m)m(ulti-dimensional)37 b(arra)m(y)-8 b(,)45 b(rather)c(than)g(an)g (index)f(in)g(an)m(y)330 4985 y(particular)29 b(dimension.)379 5121 y Ft(\000)60 b Fr(In-plac)-5 b(e)30 b(tr)-5 b(ansforms)7 b Fv(:)42 b(F)-8 b(or)28 b(plans)d(created)j(with)d(the)i Fp(FFTW_IN_PLACE)c Fv(option,)k(the)g(trans-)510 5230 y(form)g(is)g(computed)g(in-place|the)g(output)g(is)g(returned)f(in)h (the)g Fp(in)g Fv(arra)m(y)-8 b(,)30 b(using)c(the)i(same)510 5340 y(strides,)h(etcetera,)k(as)e(w)m(ere)g(used)e(in)g(the)i(input.)p eop end %%Page: 25 27 TeXDict begin 25 26 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(25)225 299 y Ft(\017)60 b Fp(out)p Fv(,)33 b Fp(ostride)f Fv(and)g Fp(odist)g Fv(describ)s(e)g(the)h(output)g(arra)m(y\(s\).)50 b(The)33 b(format)g(is)g(the)g(same)h(as)f(for)330 408 y(the)e(input)d(arra)m(y) -8 b(.)379 551 y Ft(\000)60 b Fr(In-plac)-5 b(e)47 b(tr)-5 b(ansforms)7 b Fv(:)73 b(These)45 b(parameters)g(are)h(ignored)e(for)g (plans)g(created)i(with)e(the)510 661 y Fp(FFTW_IN_PLACE)27 b Fv(option.)275 844 y(The)36 b(function)g Fp(fftwnd_one)e Fv(transforms)i(a)i(single,)g(con)m(tiguous)f(input)e(arra)m(y)i(to)h (a)g(con)m(tiguous)150 954 y(output)30 b(arra)m(y)-8 b(.)42 b(By)30 b(de\014nition,)f(the)h(call)390 1099 y Fp(fftwnd_one\(plan,)43 b(in,)k(out\))275 1250 y Fv(is)29 b(equiv)-5 b(alen)m(t)30 b(to)390 1395 y Fp(fftwnd\(plan,)44 b(1,)k(in,)f(1,)g(0,)g(out,)g(1,)g(0\))150 1651 y Fh(3.3.3)63 b(Destro)m(ying)41 b(a)g(Multi-dimensional)h(Plan)390 1813 y Fp(#include)k()390 2021 y(void)h (fftwnd_destroy_plan\(fft)o(wnd_)o(pla)o(n)42 b(plan\);)275 2172 y Fv(The)c(function)g Fp(fftwnd_destroy_plan)c Fv(frees)39 b(the)g(plan)e Fp(plan)h Fv(and)h(releases)g(all)f(the)h(memory)150 2281 y(asso)s(ciated)31 b(with)e(it.)40 b(After)31 b(destruction,)f(a)g (plan)f(is)h(no)g(longer)g(v)-5 b(alid.)150 2538 y Fh(3.3.4)63 b(What)40 b(FFTWND)h(Really)f(Computes)275 2747 y Fv(The)e(con)m(v)m (en)m(tions)j(that)f(w)m(e)g(follo)m(w)e(for)h(the)h(m)m (ulti-dimensional)35 b(transform)k(are)h(analogous)f(to)150 2856 y(those)23 b(for)f(the)h(one-dimensional)e(transform.)37 b(In)22 b(particular,)h(the)f(forw)m(ard)h(transform)e(has)i(a)g (negativ)m(e)150 2966 y(sign)j(in)f(the)i(exp)s(onen)m(t)f(and)g (neither)g(the)h(forw)m(ard)f(nor)g(the)h(bac)m(kw)m(ard)g(transforms)e (will)f(p)s(erform)i(an)m(y)150 3075 y(normalization.)43 b(Computing)30 b(the)i(bac)m(kw)m(ard)h(transform)e(of)g(the)h(forw)m (ard)g(transform)f(will)e(m)m(ultiply)150 3185 y(the)h(arra)m(y)g(b)m (y)f(the)h(pro)s(duct)e(of)i(its)f(dimensions.)37 b(The)29 b(output)h(is)e(in-order,)h(and)g(the)g(zeroth)h(elemen)m(t)150 3295 y(of)h(the)f(output)g(is)f(the)i(amplitude)d(of)j(the)f(zero)i (frequency)d(comp)s(onen)m(t.)275 3445 y(The)35 b(exact)j(mathematical) f(de\014nition)d(of)i(our)g(m)m(ulti-dimensional)c(transform)k(follo)m (ws.)58 b(Let)37 b Fm(X)150 3555 y Fv(b)s(e)d(a)g Fm(d)p Fv(-dimensional)e(complex)i(arra)m(y)h(whose)f(elemen)m(ts)h(are)g Fm(X)7 b Fv([)p Fm(j)2489 3569 y Fo(1)2527 3555 y Fm(;)15 b(j)2604 3569 y Fo(2)2642 3555 y Fm(;)g(:)g(:)g(:)i(;)e(j)2881 3569 y Fl(d)2920 3555 y Fv(],)36 b(where)e(0)e Ft(\024)g Fm(j)3490 3569 y Fl(s)3557 3555 y Fm(<)g(n)3715 3569 y Fl(s)150 3665 y Fv(for)e(all)f Fm(s)c Ft(2)g(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)k(;)c(d)p Ft(g)p Fv(.)41 b(Let)31 b(also)g Fm(!)1509 3679 y Fl(s)1569 3665 y Fv(=)25 b Fm(e)1707 3632 y Fo(2)p Fl(\031)1781 3587 y Fk(p)p 1836 3587 85 3 v 45 x(\000)p Fo(1)p Fl(=n)1996 3640 y Fe(s)2032 3665 y Fv(,)30 b(for)h(all)59 b Fm(s)25 b Ft(2)g(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)j(;)d(d)p Ft(g)p Fv(.)275 3815 y(The)24 b(forw)m(ard)g(transform)g(computes)h(a)g (complex)f(arra)m(y)i Fm(Y)20 b Fv(,)26 b(whose)e(structure)h(is)e(the) i(same)g(as)g(that)150 3925 y(of)31 b Fm(X)7 b Fv(,)31 b(de\014ned)e(b)m(y)534 4262 y Fm(Y)20 b Fv([)p Fm(i)663 4276 y Fo(1)701 4262 y Fm(;)15 b(i)772 4276 y Fo(2)810 4262 y Fm(;)g(:)g(:)g(:)i(;)e(i)1043 4276 y Fl(d)1082 4262 y Fv(])26 b(=)1229 4155 y Fl(n)1270 4163 y Fd(1)1302 4155 y Fk(\000)p Fo(1)1248 4181 y Fg(X)1236 4358 y Fl(j)1263 4366 y Fd(1)1296 4358 y Fo(=0)1402 4155 y Fl(n)1443 4163 y Fd(2)1476 4155 y Fk(\000)p Fo(1)1421 4181 y Fg(X)1409 4358 y Fl(j)1436 4366 y Fd(2)1469 4358 y Fo(=0)1576 4262 y Ft(\001)15 b(\001)g(\001)1697 4155 y Fl(n)1738 4164 y Fe(d)1773 4155 y Fk(\000)p Fo(1)1717 4181 y Fg(X)1704 4358 y Fl(j)1731 4367 y Fe(d)1767 4358 y Fo(=0)1873 4262 y Fm(X)7 b Fv([)p Fm(j)2017 4276 y Fo(1)2055 4262 y Fm(;)15 b(j)2132 4276 y Fo(2)2170 4262 y Fm(;)g(:)g(:)g(:)i(;)e(j)2409 4276 y Fl(d)2449 4262 y Fv(])p Fm(!)2534 4219 y Fk(\000)p Fl(i)2609 4227 y Fd(1)2642 4219 y Fl(j)2669 4227 y Fd(1)2531 4282 y Fo(1)2706 4262 y Fm(!)2766 4219 y Fk(\000)p Fl(i)2841 4227 y Fd(2)2873 4219 y Fl(j)2900 4227 y Fd(2)2763 4282 y Fo(2)2952 4262 y Ft(\001)g(\001)g(\001)i Fm(!)3134 4219 y Fk(\000)p Fl(i)3209 4228 y Fe(d)3244 4219 y Fl(j)3271 4228 y Fe(d)3131 4284 y Fl(d)3340 4262 y Fm(:)275 4574 y Fv(The)29 b(bac)m(kw)m(ard)i(transform)f(computes)612 4877 y Fm(Y)20 b Fv([)p Fm(i)741 4891 y Fo(1)779 4877 y Fm(;)15 b(i)850 4891 y Fo(2)888 4877 y Fm(;)g(:)g(:)g(:)i(;)e(i)1121 4891 y Fl(d)1160 4877 y Fv(])25 b(=)1306 4771 y Fl(n)1347 4779 y Fd(1)1380 4771 y Fk(\000)p Fo(1)1326 4797 y Fg(X)1314 4973 y Fl(j)1341 4981 y Fd(1)1374 4973 y Fo(=0)1480 4771 y Fl(n)1521 4779 y Fd(2)1553 4771 y Fk(\000)p Fo(1)1499 4797 y Fg(X)1487 4973 y Fl(j)1514 4981 y Fd(2)1547 4973 y Fo(=0)1654 4877 y Ft(\001)15 b(\001)g(\001)1775 4770 y Fl(n)1816 4779 y Fe(d)1851 4770 y Fk(\000)p Fo(1)1795 4797 y Fg(X)1782 4973 y Fl(j)1809 4982 y Fe(d)1844 4973 y Fo(=0)1951 4877 y Fm(X)7 b Fv([)p Fm(j)2095 4891 y Fo(1)2133 4877 y Fm(;)15 b(j)2210 4891 y Fo(2)2248 4877 y Fm(;)g(:)g(:)g(:)i(;)e(j)2487 4891 y Fl(d)2526 4877 y Fv(])p Fm(!)2611 4835 y Fl(i)2634 4843 y Fd(1)2667 4835 y Fl(j)2694 4843 y Fd(1)2608 4897 y Fo(1)2731 4877 y Fm(!)2791 4835 y Fl(i)2814 4843 y Fd(2)2847 4835 y Fl(j)2874 4843 y Fd(2)2788 4897 y Fo(2)2926 4877 y Ft(\001)g(\001)g (\001)i Fm(!)3108 4835 y Fl(i)3131 4844 y Fe(d)3166 4835 y Fl(j)3193 4844 y Fe(d)3105 4900 y Fl(d)3263 4877 y Fm(:)275 5230 y Fv(Computing)26 b(the)i(forw)m(ard)f(transform)g(follo) m(w)m(ed)h(b)m(y)g(the)g(bac)m(kw)m(ard)g(transform)f(will)f(m)m (ultiply)f(the)150 5340 y(arra)m(y)31 b(b)m(y)514 5276 y Fg(Q)593 5296 y Fl(d)593 5363 y(s)p Fo(=1)727 5340 y Fm(n)782 5354 y Fl(d)821 5340 y Fv(.)p eop end %%Page: 26 28 TeXDict begin 26 27 bop 150 -116 a Fv(26)3232 b(FFTW)150 299 y Fu(3.4)68 b(Real)46 b(One-dimensional)g(T)-11 b(ransforms)45 b(Reference)275 489 y Fv(The)29 b(one-dimensional)f(real)h(routines)g (are)h(generally)f(pre\014xed)g(with)f Fp(rfftw_)p Fv(.)3055 457 y Fo(3)3132 489 y Fv(Programs)h(using)150 599 y(RFFTW)c(should)d(b) s(e)i(link)m(ed)e(with)h Fp(-lrfftw)29 b(-lfftw)f(-lm)c Fv(on)g(Unix)f(systems,)i(or)g(with)e(the)h(RFFTW,)150 709 y(the)31 b(FFTW,)g(and)f(the)g(standard)g(math)g(libraries)e(in)h (general.)150 927 y Fh(3.4.1)63 b(Plan)40 b(Creation)h(for)g(Real)f (One-dimensional)i(T)-10 b(ransforms)390 1089 y Fp(#include)46 b()390 1296 y(rfftw_plan)f(rfftw_create_plan\(int)d(n,)47 b(fftw_direction)d(dir,)j(int)g(flags\);)390 1504 y(rfftw_plan)e (rfftw_create_plan_specif)o(ic\(i)o(nt)d(n,)47 b(fftw_direction)d(dir,) 581 1608 y(int)j(flags,)f(fftw_real)f(*in,)i(int)g(istride,)581 1711 y(fftw_real)e(*out,)i(int)f(ostride\);)275 1844 y Fv(The)23 b(function)f Fp(rfftw_create_plan)d Fv(creates)25 b(a)g(plan,)f(whic)m(h)e(is)h(a)h(data)g(structure)g(con)m(taining)f (all)150 1953 y(the)31 b(information)e(that)j Fp(rfftw)e Fv(needs)g(in)g(order)g(to)i(compute)f(the)h(1D)f(real)g(F)-8 b(ourier)31 b(transform.)41 b(Y)-8 b(ou)150 2063 y(can)32 b(create)i(as)f(man)m(y)f(plans)f(as)h(y)m(ou)g(need,)h(but)f(only)f (one)h(plan)f(for)h(a)h(giv)m(en)f(arra)m(y)h(size)f(is)f(required)150 2173 y(\(a)g(plan)e(can)i(b)s(e)f(reused)f(man)m(y)i(times\).)275 2305 y Fp(rfftw_create_plan)j Fv(returns)k(a)i(v)-5 b(alid)38 b(plan,)j(or)e Fp(NULL)f Fv(if,)j(for)e(some)h(reason,)i(the)e(plan)e (can't)150 2415 y(b)s(e)c(created.)53 b(In)34 b(the)g(default)f (installation,)h(this)f(cannot)i(happ)s(en,)f(but)f(it)h(is)f(p)s (ossible)f(to)j(con\014gure)150 2524 y(RFFTW)e(in)e(suc)m(h)h(a)h(w)m (a)m(y)h(that)f(some)f(input)f(sizes)h(are)h(forbidden,)e(and)g(RFFTW)i (cannot)h(create)g(a)150 2634 y(plan.)275 2766 y(The)k Fp(rfftw_create_plan_specifi)o(c)33 b Fv(v)-5 b(arian)m(t)39 b(tak)m(es)i(as)e(additional)e(argumen)m(ts)j(sp)s(eci\014c)e(in-)150 2876 y(put/output)43 b(arra)m(ys)g(and)f(their)h(strides.)77 b(F)-8 b(or)44 b(the)f(last)g(four)g(argumen)m(ts,)k(y)m(ou)c(should)e (pass)i(the)150 2986 y(arra)m(ys)36 b(and)f(strides)g(that)h(y)m(ou)g (will)e(ev)m(en)m(tually)h(b)s(e)g(passing)g(to)i Fp(rfftw)p Fv(.)55 b(The)35 b(resulting)f(plans)h(will)150 3095 y(b)s(e)g(optimized)g(for)h(those)g(arra)m(ys)g(and)g(strides,)g (although)f(they)h(ma)m(y)h(b)s(e)e(used)g(on)h(other)g(arra)m(ys)h(as) 150 3205 y(w)m(ell.)i(Note:)j(the)30 b(con)m(ten)m(ts)h(of)f(the)f(in)g (and)f(out)i(arra)m(ys)g(are)g Fr(destr)-5 b(oye)g(d)41 b Fv(b)m(y)30 b(the)f(sp)s(eci\014c)g(planner)e(\(the)150 3314 y(initial)f(con)m(ten)m(ts)31 b(are)e(ignored,)g(so)g(the)g(arra)m (ys)g(need)g(not)g(ha)m(v)m(e)i(b)s(een)d(initialized\).)37 b(See)29 b(Section)g(3.2.2)150 3424 y([Discussion)g(on)h(Sp)s(eci\014c) f(Plans],)h(page)h(20,)g(for)f(a)h(discussion)d(on)i(sp)s(eci\014c)f (plans.)150 3642 y Fh(Argumen)m(ts)225 3810 y Ft(\017)60 b Fp(n)30 b Fv(is)f(the)i(size)f(of)h(the)f(transform.)40 b(It)31 b(can)g(b)s(e)e(an)m(y)i(p)s(ositiv)m(e)e(in)m(teger.)379 3942 y Ft(\000)60 b Fv(RFFTW)30 b(is)e(b)s(est)h(at)i(handling)26 b(sizes)j(of)h(the)f(form)g(2)2375 3909 y Fl(a)2416 3942 y Fv(3)2461 3909 y Fl(b)2495 3942 y Fv(5)2540 3909 y Fl(c)2574 3942 y Fv(7)2619 3909 y Fl(d)2658 3942 y Fv(11)2748 3909 y Fl(e)2785 3942 y Fv(13)2875 3909 y Fl(f)2919 3942 y Fv(,)h(where)e Fm(e)p Fv(+)p Fm(f)39 b Fv(is)28 b(either)510 4052 y(0)h(or)f(1,)h(and)e(the)i(other)f(exp)s(onen)m(ts)g(are)h (arbitrary)-8 b(.)39 b(Other)28 b(sizes)f(are)i(computed)f(b)m(y)g (means)510 4162 y(of)c(a)g(slo)m(w,)i(general-purp)s(ose)c(routine)h (\(reducing)g(to)i Fm(O)s Fv(\()p Fm(n)2517 4129 y Fo(2)2554 4162 y Fv(\))f(p)s(erformance)f(for)h(prime)f(sizes\).)510 4271 y(\(It)35 b(is)e(p)s(ossible)f(to)j(customize)f(RFFTW)h(for)f (di\013eren)m(t)g(arra)m(y)g(sizes.)52 b(See)35 b(Chapter)f(6)g([In-) 510 4381 y(stallation)c(and)g(Customization],)g(page)i(55,)g(for)e (more)h(information.\))41 b(T)-8 b(ransforms)29 b(whose)510 4490 y(sizes)36 b(are)g(p)s(o)m(w)m(ers)g(of)g(2)g(are)h(esp)s(ecially) d(fast.)58 b(If)35 b(y)m(ou)i(ha)m(v)m(e)g(large)f(prime)e(factors,)39 b(it)c(ma)m(y)510 4600 y(b)s(e)j(faster)h(to)h(switc)m(h)e(o)m(v)m(er)i (to)g(the)f(complex)f(FFTW)i(routines,)g(whic)m(h)e(ha)m(v)m(e)i Fm(O)s Fv(\()p Fm(n)15 b Fv(log)h Fm(n)p Fv(\))510 4709 y(p)s(erformance)25 b(ev)m(en)i(for)f(prime)f(sizes)g(\(w)m(e)i(don't)f (kno)m(w)g(of)h(a)f(similar)e(algorithm)h(sp)s(ecialized)510 4819 y(for)30 b(real)g(data,)h(unfortunately\).)225 4952 y Ft(\017)60 b Fp(dir)31 b Fv(is)g(the)g(direction)g(of)h(the)g (desired)e(transform,)h(either)h Fp(FFTW_REAL_TO_COMPLEX)26 b Fv(or)31 b Fp(FFTW_)330 5061 y(COMPLEX_TO_REAL)p Fv(,)h(corresp)s (onding)g(to)j Fp(FFTW_FORWARD)c Fv(or)k Fp(FFTW_BACKWARD)p Fv(,)d(resp)s(ectiv)m(ely)-8 b(.)p 150 5241 1200 4 v 199 5308 a Fo(3)275 5340 y Fj(The)25 b(et)n(ymologically-correct)i(sp)r (elling)g(w)n(ould)f(b)r(e)g Fi(frftw_)p Fj(,)h(but)e(it)h(is)g(hard)f (to)h(remem)n(b)r(er.)p eop end %%Page: 27 29 TeXDict begin 27 28 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(27)225 299 y Ft(\017)60 b Fp(flags)29 b Fv(is)g(a)i(b)s(o)s(olean)e(OR)h(\(`)p Fp(|)p Fv('\))i(of)e(zero)h(or)g(more)f(of)h(the)f(follo)m(wing:)379 439 y Ft(\000)60 b Fp(FFTW_MEASURE)p Fv(:)43 b(this)32 b(\015ag)i(tells)e(RFFTW)i(to)g(\014nd)e(the)h(optimal)g(plan)e(b)m(y)j (actually)e Fr(c)-5 b(om-)510 548 y(puting)45 b Fv(sev)m(eral)37 b(FFTs)g(and)f(measuring)g(their)g(execution)g(time.)60 b(Dep)s(ending)35 b(on)i(the)g(in-)510 658 y(stallation,)30 b(this)f(can)i(tak)m(e)h(some)e(time.)379 798 y Ft(\000)60 b Fp(FFTW_ESTIMATE)p Fv(:)34 b(do)25 b(not)g(run)f(an)m(y)h(FFT)h(and)e (pro)m(vide)g(a)h(\\reasonable")h(plan)e(\(for)h(a)g(RISC)510 908 y(pro)s(cessor)37 b(with)g(man)m(y)h(registers\).)62 b(If)38 b(neither)e Fp(FFTW_ESTIMATE)e Fv(nor)k Fp(FFTW_MEASURE)c Fv(is)510 1017 y(pro)m(vided,)29 b(the)i(default)e(is)h Fp(FFTW_ESTIMATE)p Fv(.)379 1157 y Ft(\000)60 b Fp(FFTW_OUT_OF_PLACE)p Fv(:)41 b(pro)s(duce)32 b(a)i(plan)e(assuming)f(that)j(the)f(input)e (and)i(output)g(arra)m(ys)510 1267 y(will)28 b(b)s(e)h(distinct)g (\(this)h(is)f(the)i(default\).)379 1407 y Ft(\000)60 b Fp(FFTW_IN_PLACE)p Fv(:)39 b(pro)s(duce)31 b(a)h(plan)e(assuming)g (that)i(y)m(ou)g(w)m(an)m(t)g(the)g(output)f(in)f(the)i(input)510 1516 y(arra)m(y)-8 b(.)41 b(The)28 b(algorithm)g(used)f(is)h(not)g (necessarily)g(in)f(place:)40 b(RFFTW)29 b(is)e(able)h(to)i(compute)510 1626 y(true)43 b(in-place)f(transforms)g(only)g(for)g(small)g(v)-5 b(alues)42 b(of)h Fp(n)p Fv(.)78 b(If)42 b(RFFTW)i(is)e(not)h(able)f (to)510 1735 y(compute)g(the)h(transform)e(in-place,)j(it)e(will)d (allo)s(cate)j(a)h(temp)s(orary)e(arra)m(y)i(\(unless)e(y)m(ou)510 1845 y(pro)m(vide)d(one)i(y)m(ourself)7 b(\),)41 b(compute)f(the)g (transform)e(out)i(of)f(place,)j(and)c(cop)m(y)j(the)e(result)510 1955 y(bac)m(k.)60 b Fr(Warning:)54 b(This)39 b(option)h(changes)f(the) g(me)-5 b(aning)39 b(of)g(some)g(p)-5 b(ar)g(ameters)42 b(of)c Fp(rfftw)510 2064 y Fv(\(see)31 b(Section)g(3.4.2)h([Computing)d (the)h(Real)h(One-dimensional)c(T)-8 b(ransform],)30 b(page)h(27\).)510 2204 y(The)f(default)f(mo)s(de)h(of)h(op)s(eration)f (is)f Fp(FFTW_OUT_OF_PLACE)p Fv(.)379 2344 y Ft(\000)60 b Fp(FFTW_USE_WISDOM)p Fv(:)37 b(use)30 b(an)m(y)h Fp(wisdom)e Fv(that)i(is)e(a)m(v)-5 b(ailable)30 b(to)h(help)e(in)h(the)g(creation) h(of)g(the)510 2454 y(plan.)50 b(\(See)34 b(Section)g(2.6)h([W)-8 b(ords)34 b(of)h(Wisdom],)f(page)h(13.\))52 b(This)32 b(can)i(greatly)h(sp)s(eed)e(the)510 2563 y(creation)27 b(of)g(plans,)g(esp)s(ecially)e(with)g(the)j Fp(FFTW_MEASURE)23 b Fv(option.)39 b Fp(FFTW_ESTIMATE)23 b Fv(plans)510 2673 y(can)28 b(also)g(tak)m(e)i(adv)-5 b(an)m(tage)30 b(of)e Fp(wisdom)e Fv(to)j(pro)s(duce)e(a)h(more)g(optimal)f(plan)g (\(based)h(on)g(past)510 2783 y(measuremen)m(ts\))i(than)g(the)g (estimation)f(heuristic)f(w)m(ould)g(normally)g(generate.)42 b(When)30 b(the)510 2892 y Fp(FFTW_MEASURE)36 b Fv(option)j(is)f(used,) j(new)d Fp(wisdom)g Fv(will)f(also)i(b)s(e)f(generated)j(if)d(the)h (curren)m(t)510 3002 y(transform)30 b(size)g(is)f(not)i(completely)f (understo)s(o)s(d)f(b)m(y)h(existing)f Fp(wisdom)p Fv(.)225 3142 y Ft(\017)60 b Fp(in)p Fv(,)29 b Fp(out)p Fv(,)f Fp(istride)p Fv(,)g Fp(ostride)f Fv(\(only)h(for)h Fp (rfftw_create_plan_specifi)o(c)p Fv(\):)34 b(see)c(corresp)s(ond-)330 3251 y(ing)38 b(argumen)m(ts)i(in)e(the)h(description)e(of)i Fp(rfftw)p Fv(.)66 b(\(See)40 b(Section)f(3.4.2)i([Computing)d(the)h (Real)330 3361 y(One-dimensional)23 b(T)-8 b(ransform],)27 b(page)g(27.\))40 b(In)26 b(particular,)f(the)i Fp(out)e Fv(and)g Fp(ostride)g Fv(parameters)330 3470 y(ha)m(v)m(e)31 b(the)f(same)h(sp)s(ecial)d(meaning)h(for)h Fp(FFTW_IN_PLACE)c Fv(transforms)j(as)h(they)g(ha)m(v)m(e)h(for)f Fp(rfftw)p Fv(.)150 3717 y Fh(3.4.2)63 b(Computing)41 b(the)f(Real)h (One-dimensional)g(T)-10 b(ransform)390 3878 y Fp(#include)46 b()390 4086 y(void)h(rfftw\(rfftw_plan)c(plan,)j(int)h (howmany,)915 4190 y(fftw_real)e(*in,)i(int)g(istride,)e(int)i(idist,) 915 4294 y(fftw_real)e(*out,)i(int)g(ostride,)e(int)i(odist\);)390 4501 y(void)g(rfftw_one\(rfftw_plan)42 b(plan,)k(fftw_real)g(*in,)g (fftw_real)f(*out\);)275 4647 y Fv(The)23 b(function)h Fp(rfftw)f Fv(computes)h(the)h(Real)f(One-dimensional)e(F)-8 b(ourier)24 b(T)-8 b(ransform,)25 b(using)d(a)j(plan)150 4756 y(created)k(b)m(y)e Fp(rfftw_create_plan)c Fv(\(see)29 b(Section)f(3.4.1)h([Plan)e(Creation)h(for)f(Real)h(One-dimensional)150 4866 y(T)-8 b(ransforms],)47 b(page)f(26\).)84 b(The)44 b(function)f Fp(rfftw_one)f Fv(pro)m(vides)i(a)h(simpli\014ed)40 b(in)m(terface)45 b(for)g(the)150 4975 y(common)31 b(case)g(of)g (single)e(input)f(arra)m(y)j(of)f(stride)g(1.)275 5121 y Fr(Imp)-5 b(ortant:)63 b Fv(When)37 b(in)m(v)m(ok)m(ed)h(for)g(an)g (out-of-place,)i Fp(FFTW_COMPLEX_TO_REAL)33 b Fv(transform,)39 b(the)150 5230 y(input)d(arra)m(y)j(is)e(o)m(v)m(erwritten)h(with)f (scratc)m(h)i(v)-5 b(alues)37 b(b)m(y)h(these)h(routines.)62 b(The)38 b(input)e(arra)m(y)j(is)e(not)150 5340 y(mo)s(di\014ed)28 b(for)i Fp(FFTW_REAL_TO_COMPLEX)25 b Fv(transforms.)p eop end %%Page: 28 30 TeXDict begin 28 29 bop 150 -116 a Fv(28)3232 b(FFTW)150 299 y Fh(Argumen)m(ts)225 467 y Ft(\017)60 b Fp(plan)31 b Fv(is)h(the)g(plan)f(created)i(b)m(y)g Fp(rfftw_create_plan)27 b Fv(\(see)33 b(Section)g(3.4.1)h([Plan)d(Creation)h(for)330 576 y(Real)e(One-dimensional)e(T)-8 b(ransforms],)30 b(page)h(26\).)225 713 y Ft(\017)60 b Fp(howmany)30 b Fv(is)h(the)g(n)m(um)m(b)s(er)g(of)h(transforms)f Fp(rfftw)f Fv(will)f(compute.)45 b(It)32 b(is)f(faster)h(to)g(tell)f(RFFTW)330 822 y(to)g(compute)g(man)m(y)f(transforms,)g(instead)g(of)g(simply)e (calling)h Fp(rfftw)g Fv(man)m(y)h(times.)225 959 y Ft(\017)60 b Fp(in)p Fv(,)49 b Fp(istride)43 b Fv(and)i Fp(idist)f Fv(describ)s(e)g(the)i(input)e(arra)m(y\(s\).)87 b(There)45 b(are)h(t)m(w)m(o)h(cases.)87 b(If)45 b(the)330 1069 y Fp(plan)36 b Fv(de\014nes)h(a)h Fp(FFTW_REAL_TO_COMPLEX)32 b Fv(transform,)39 b Fp(in)e Fv(is)g(a)g(real)h(arra)m(y)-8 b(.)63 b(Otherwise,)38 b(for)330 1178 y Fp(FFTW_COMPLEX_TO_REAL)30 b Fv(transforms,)35 b Fp(in)g Fv(is)f(a)h(halfcomplex)f(arra)m(y)i Fr(whose)i(c)-5 b(ontents)38 b(wil)5 b(l)37 b(b)-5 b(e)330 1288 y(destr)g(oye)g(d)p Fv(.)225 1424 y Ft(\017)60 b Fp(out)p Fv(,)32 b Fp(ostride)d Fv(and)j Fp(odist)e Fv(describ)s(e)g (the)i(output)g(arra)m(y\(s\),)h(and)e(ha)m(v)m(e)i(the)f(same)h (meaning)e(as)330 1534 y(the)g(corresp)s(onding)d(parameters)j(for)f (the)g(input)f(arra)m(y)-8 b(.)379 1671 y Ft(\000)60 b Fr(In-plac)-5 b(e)46 b(tr)-5 b(ansforms)7 b Fv(:)73 b(If)44 b(the)h Fp(plan)e Fv(sp)s(eci\014es)g(an)i(in-place)e (transform,)48 b Fp(ostride)43 b Fv(and)510 1780 y Fp(odist)33 b Fv(are)h(alw)m(a)m(ys)h(ignored.)51 b(If)33 b Fp(out)g Fv(is)h Fp(NULL)p Fv(,)g Fp(out)f Fv(is)g(ignored,)h(to)s(o.)53 b(Otherwise,)34 b Fp(out)f Fv(is)510 1890 y(in)m(terpreted)h(as)h(a)g (p)s(oin)m(ter)f(to)i(an)e(arra)m(y)i(of)f Fp(n)f Fv(complex)h(n)m(um)m (b)s(ers,)f(that)i(FFTW)f(will)d(use)510 2000 y(as)j(temp)s(orary)f (space)h(to)h(p)s(erform)d(the)i(in-place)e(computation.)54 b Fp(out)34 b Fv(is)f(used)h(as)h(scratc)m(h)510 2109 y(space)41 b(and)g(its)f(con)m(ten)m(ts)j(destro)m(y)m(ed.)73 b(In)40 b(this)g(case,)k Fp(out)c Fv(m)m(ust)h(b)s(e)f(an)h(ordinary)e (arra)m(y)510 2219 y(whose)30 b(elemen)m(ts)h(are)g(con)m(tiguous)f(in) f(memory)i(\(no)f(striding\).)275 2385 y(The)40 b(function)g Fp(rfftw_one)f Fv(transforms)i(a)g(single,)i(con)m(tiguous)f(input)d (arra)m(y)j(to)g(a)g(con)m(tiguous)150 2494 y(output)30 b(arra)m(y)-8 b(.)42 b(By)30 b(de\014nition,)f(the)h(call)390 2627 y Fp(rfftw_one\(plan,)44 b(in,)j(out\))275 2766 y Fv(is)29 b(equiv)-5 b(alen)m(t)30 b(to)390 2899 y Fp(rfftw\(plan,)45 b(1,)i(in,)g(1,)g(0,)g(out,)g(1,)g(0\))150 3132 y Fh(3.4.3)63 b(Destro)m(ying)41 b(a)g(Real)f(One-dimensional)i(Plan)390 3294 y Fp(#include)k()390 3501 y(void)h (rfftw_destroy_plan\(rfft)o(w_pl)o(an)41 b(plan\);)275 3640 y Fv(The)h(function)g Fp(rfftw_destroy_plan)d Fv(frees)k(the)h (plan)e Fp(plan)g Fv(and)h(releases)g(all)f(the)i(memory)150 3750 y(asso)s(ciated)31 b(with)e(it.)40 b(After)31 b(destruction,)f(a)g (plan)f(is)h(no)g(longer)g(v)-5 b(alid.)150 3982 y Fh(3.4.4)63 b(What)40 b(RFFTW)h(Really)f(Computes)275 4179 y Fv(In)29 b(this)g(section,)i(w)m(e)g(de\014ne)f(precisely)f(what)h(RFFTW)h (computes.)275 4318 y(The)40 b(real)g(to)h(complex)g(\()p Fp(FFTW_REAL_TO_COMPLEX)p Fv(\))36 b(transform)k(of)g(a)i(real)e(arra)m (y)h Fm(X)48 b Fv(of)41 b(size)f Fm(n)150 4428 y Fv(computes)31 b(an)f(hermitian)e(arra)m(y)j Fm(Y)20 b Fv(,)31 b(where)1503 4712 y Fm(Y)1556 4726 y Fl(i)1608 4712 y Fv(=)1704 4606 y Fl(n)p Fk(\000)p Fo(1)1707 4631 y Fg(X)1710 4808 y Fl(j)s Fo(=0)1846 4712 y Fm(X)1921 4726 y Fl(j)1956 4712 y Fm(e)1998 4675 y Fk(\000)p Fo(2)p Fl(\031)r(ij)2177 4630 y Fk(p)p 2233 4630 85 3 v 2233 4675 a(\000)p Fo(1)p Fl(=n)150 5011 y Fv(\(That)26 b Fm(Y)45 b Fv(is)24 b(a)i(hermitian)d (arra)m(y)j(is)e(not)h(in)m(tended)g(to)h(b)s(e)e(ob)m(vious,)i (although)f(the)g(pro)s(of)g(is)f(easy)-8 b(.\))40 b(The)150 5121 y(hermitian)32 b(arra)m(y)i Fm(Y)54 b Fv(is)32 b(stored)i(in)f (halfcomplex)f(order)h(\(see)i(Section)e(3.1)i([Data)h(T)m(yp)s(es],)e (page)g(17\).)150 5230 y(Curren)m(tly)-8 b(,)24 b(RFFTW)h(pro)m(vides)f (no)g(w)m(a)m(y)h(to)g(compute)g(a)g(real)f(to)h(complex)f(transform)f (with)g(a)i(p)s(ositiv)m(e)150 5340 y(sign)k(in)g(the)i(exp)s(onen)m (t.)p eop end %%Page: 29 31 TeXDict begin 29 30 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(29)275 299 y(The)28 b(complex)g(to)i(real) e(\()p Fp(FFTW_COMPLEX_TO_REAL)p Fv(\))c(transform)29 b(of)g(a)g(hermitian)e(arra)m(y)i Fm(X)36 b Fv(of)29 b(size)150 408 y Fm(n)h Fv(computes)g(a)h(real)f(arra)m(y)h Fm(Y)20 b Fv(,)31 b(where)1529 688 y Fm(Y)1582 702 y Fl(i)1634 688 y Fv(=)1730 583 y Fl(n)p Fk(\000)p Fo(1)1733 607 y Fg(X)1736 784 y Fl(j)s Fo(=0)1872 688 y Fm(X)1947 702 y Fl(j)1982 688 y Fm(e)2024 651 y Fo(2)p Fl(\031)r(ij)2151 606 y Fk(p)p 2207 606 85 3 v 2207 651 a(\000)p Fo(1)p Fl(=n)150 983 y Fv(\(That)39 b Fm(Y)58 b Fv(is)37 b(a)i(real)f(arra)m (y)h(is)f(not)g(in)m(tended)g(to)h(b)s(e)f(ob)m(vious,)i(although)d (the)i(pro)s(of)f(is)f(easy)-8 b(.\))66 b(The)150 1092 y(hermitian)43 b(input)g(arra)m(y)i Fm(X)53 b Fv(is)44 b(stored)h(in)e(halfcomplex)h(order)h(\(see)g(Section)g(3.1)h([Data)h (T)m(yp)s(es],)150 1202 y(page)40 b(17\).)68 b(Curren)m(tly)-8 b(,)40 b(RFFTW)f(pro)m(vides)f(no)h(w)m(a)m(y)h(to)g(compute)f(a)h (complex)e(to)i(real)f(transform)150 1311 y(with)29 b(a)i(negativ)m(e)g (sign)f(in)f(the)h(exp)s(onen)m(t.)275 1447 y(Lik)m(e)j(FFTW,)i(RFFTW)f (computes)g(an)g(unnormalized)d(transform.)50 b(In)33 b(other)h(w)m(ords,)g(applying)150 1557 y(the)44 b(real)f(to)i(complex) e(\(forw)m(ard\))h(and)f(then)h(the)f(complex)h(to)g(real)g(\(bac)m(kw) m(ard\))h(transform)e(will)150 1666 y(m)m(ultiply)28 b(the)i(input)f(b)m(y)h Fm(n)p Fv(.)150 1927 y Fu(3.5)68 b(Real)46 b(Multi-dimensional)h(T)-11 b(ransforms)44 b(Reference)275 2121 y Fv(The)39 b(m)m(ulti-dimensional)c(real)40 b(routines)e(are)i(generally)f(pre\014xed)f(with)h Fp(rfftwnd_)p Fv(.)66 b(Programs)150 2230 y(using)25 b(RFFTWND)i(should)e(b)s(e)g (link)m(ed)g(with)g Fp(-lrfftw)j(-lfftw)h(-lm)d Fv(on)g(Unix)f (systems,)i(or)g(with)e(the)150 2340 y(FFTW,)31 b(RFFTW,)h(and)d (standard)h(math)g(libraries)e(in)h(general.)150 2566 y Fh(3.5.1)63 b(Plan)40 b(Creation)h(for)g(Real)f(Multi-dimensional)i (T)-10 b(ransforms)390 2728 y Fp(#include)46 b()390 2936 y(rfftwnd_plan)e(rfftwnd_create_plan\(int)e(rank,)k(const)h(int)g (*n,)1965 3040 y(fftw_direction)d(dir,)j(int)f(flags\);)390 3247 y(rfftwnd_plan)e(rfftw2d_create_plan\(int)e(nx,)47 b(int)g(ny,)1965 3351 y(fftw_direction)d(dir,)j(int)f(flags\);)390 3559 y(rfftwnd_plan)e(rfftw3d_create_plan\(int)e(nx,)47 b(int)g(ny,)g(int)g(nz,)1965 3662 y(fftw_direction)d(dir,)j(int)f (flags\);)275 3798 y Fv(The)25 b(function)g Fp(rfftwnd_create_plan)20 b Fv(creates)28 b(a)e(plan,)g(whic)m(h)f(is)g(a)h(data)h(structure)e (con)m(taining)150 3908 y(all)e(the)h(information)e(that)i Fp(rfftwnd)e Fv(needs)h(in)f(order)i(to)g(compute)g(a)g(m)m (ulti-dimensional)c(real)j(F)-8 b(ourier)150 4017 y(transform.)42 b(Y)-8 b(ou)32 b(can)f(create)i(as)e(man)m(y)g(plans)f(as)h(y)m(ou)g (need,)h(but)e(only)g(one)h(plan)f(for)h(a)g(giv)m(en)g(arra)m(y)150 4127 y(size)j(is)e(required)g(\(a)i(plan)f(can)h(b)s(e)f(reused)g(man)m (y)g(times\).)51 b(The)33 b(functions)f Fp(rfftw2d_create_plan)150 4236 y Fv(and)41 b Fp(rfftw3d_create_plan)35 b Fv(are)42 b(optional,)h(alternativ)m(e)f(in)m(terfaces)f(to)h Fp (rfftwnd_create_plan)150 4346 y Fv(for)30 b(t)m(w)m(o)i(and)e(three)g (dimensions,)e(resp)s(ectiv)m(ely)-8 b(.)275 4482 y Fp (rfftwnd_create_plan)27 b Fv(returns)k(a)i(v)-5 b(alid)31 b(plan,)h(or)g Fp(NULL)f Fv(if,)i(for)f(some)h(reason,)g(the)g(plan)e (can't)150 4591 y(b)s(e)f(created.)42 b(This)28 b(can)j(happ)s(en)d(if) i(the)g(argumen)m(ts)h(are)g(in)m(v)-5 b(alid)28 b(in)h(some)i(w)m(a)m (y)g(\(e.g.)42 b(if)29 b Fp(rank)h(<)g Fv(0\).)150 4818 y Fh(Argumen)m(ts)225 4986 y Ft(\017)60 b Fp(rank)27 b Fv(is)g(the)h(dimensionalit)m(y)d(of)j(the)g(arra)m(ys)g(to)g(b)s(e)f (transformed.)40 b(It)27 b(can)i(b)s(e)e(an)m(y)h(non-negativ)m(e)330 5095 y(in)m(teger.)225 5230 y Ft(\017)60 b Fp(n)22 b Fv(is)g(a)g(p)s(oin)m(ter)g(to)h(an)f(arra)m(y)h(of)g Fp(rank)e Fv(in)m(tegers,)k(giving)c(the)i(size)f(of)h(eac)m(h)g (dimension)d(of)j(the)g(arra)m(ys)330 5340 y(to)35 b(b)s(e)e (transformed.)51 b(Note)36 b(that)e(these)h(are)f(alw)m(a)m(ys)h(the)f (dimensions)e(of)i(the)g Fr(r)-5 b(e)g(al)45 b Fv(arra)m(ys;)37 b(the)p eop end %%Page: 30 32 TeXDict begin 30 31 bop 150 -116 a Fv(30)3232 b(FFTW)330 299 y(complex)26 b(arra)m(ys)g(ha)m(v)m(e)h(di\013eren)m(t)e (dimensions)f(\(see)i(Section)g(3.5.3)i([Arra)m(y)e(Dimensions)e(for)i (Real)330 408 y(Multi-dimensional)d(T)-8 b(ransforms],)26 b(page)h(32\).)41 b(These)26 b(sizes,)i(whic)m(h)d(m)m(ust)h(b)s(e)g(p) s(ositiv)m(e)f(in)m(tegers,)330 518 y(corresp)s(ond)20 b(to)i(the)g(dimensions)c(of)k(ro)m(w-ma)5 b(jor)22 b(arra)m(ys|i.e.)37 b Fp(n[0])21 b Fv(is)f(the)h(size)h(of)f(the)h(dimension)330 628 y(whose)32 b(indices)d(v)-5 b(ary)32 b(most)g(slo)m(wly)-8 b(,)32 b(and)f(so)h(on.)45 b(\(See)32 b(Section)g(2.5)h ([Multi-dimensional)28 b(Arra)m(y)330 737 y(F)-8 b(ormat],)32 b(page)f(11,)h(for)e(more)g(information.\))379 872 y Ft(\000)60 b Fv(See)34 b(Section)g(3.4.1)h([Plan)e(Creation)h(for)f (Real)h(One-dimensional)d(T)-8 b(ransforms],)34 b(page)h(26,)510 982 y(for)30 b(more)h(information)d(regarding)i(optimal)f(arra)m(y)i (sizes.)225 1116 y Ft(\017)60 b Fp(nx)30 b Fv(and)h Fp(ny)f Fv(in)g Fp(rfftw2d_create_plan)25 b Fv(are)32 b(p)s(ositiv)m(e)d(in)m (tegers)j(sp)s(ecifying)c(the)k(dimensions)c(of)330 1226 y(the)34 b(rank)f(2)h(arra)m(y)g(to)h(b)s(e)e(transformed.)50 b(i.e.)h(they)34 b(sp)s(ecify)e(that)i(the)g(transform)f(will)e(op)s (erate)330 1335 y(on)k Fp(nx)30 b(x)g(ny)35 b Fv(arra)m(ys)g(in)f(ro)m (w-ma)5 b(jor)36 b(order,)g(where)f Fp(nx)g Fv(is)f(the)h(n)m(um)m(b)s (er)f(of)i(ro)m(ws)f(and)g Fp(ny)f Fv(is)h(the)330 1445 y(n)m(um)m(b)s(er)29 b(of)i(columns.)225 1580 y Ft(\017)60 b Fp(nx)p Fv(,)27 b Fp(ny)f Fv(and)g Fp(nz)g Fv(in)f Fp(rfftw3d_create_plan)c Fv(are)27 b(p)s(ositiv)m(e)f(in)m(tegers)h(sp) s(ecifying)d(the)j(dimensions)330 1689 y(of)g(the)h(rank)e(3)i(arra)m (y)g(to)g(b)s(e)e(transformed.)39 b(i.e.)h(they)27 b(sp)s(ecify)f(that) i(the)f(transform)g(will)d(op)s(erate)330 1799 y(on)30 b Fp(nx)g(x)g(ny)g(x)g(nz)g Fv(arra)m(ys)g(in)f(ro)m(w-ma)5 b(jor)31 b(order.)225 1934 y Ft(\017)60 b Fp(dir)31 b Fv(is)g(the)g(direction)g(of)h(the)g(desired)e(transform,)h(either)h Fp(FFTW_REAL_TO_COMPLEX)26 b Fv(or)31 b Fp(FFTW_)330 2043 y(COMPLEX_TO_REAL)p Fv(,)26 b(corresp)s(onding)j(to)i Fp(FFTW_FORWARD)c Fv(or)j Fp(FFTW_BACKWARD)p Fv(,)d(resp)s(ectiv)m(ely) -8 b(.)225 2178 y Ft(\017)60 b Fp(flags)29 b Fv(is)g(a)i(b)s(o)s(olean) e(OR)h(\(`)p Fp(|)p Fv('\))i(of)e(zero)h(or)g(more)f(of)h(the)f(follo)m (wing:)379 2313 y Ft(\000)60 b Fp(FFTW_MEASURE)p Fv(:)33 b(this)19 b(\015ag)j(tells)e(FFTW)h(to)h(\014nd)d(the)i(optimal)f(plan) g(b)m(y)g(actually)h Fr(c)-5 b(omputing)510 2422 y Fv(sev)m(eral)31 b(FFTs)f(and)g(measuring)f(their)h(execution)g(time.)379 2557 y Ft(\000)60 b Fp(FFTW_ESTIMATE)p Fv(:)34 b(do)25 b(not)g(run)f(an)m(y)h(FFT)h(and)e(pro)m(vide)g(a)h(\\reasonable")h (plan)e(\(for)h(a)g(RISC)510 2667 y(pro)s(cessor)37 b(with)g(man)m(y)h (registers\).)62 b(If)38 b(neither)e Fp(FFTW_ESTIMATE)e Fv(nor)k Fp(FFTW_MEASURE)c Fv(is)510 2776 y(pro)m(vided,)29 b(the)i(default)e(is)h Fp(FFTW_ESTIMATE)p Fv(.)379 2911 y Ft(\000)60 b Fp(FFTW_OUT_OF_PLACE)p Fv(:)41 b(pro)s(duce)32 b(a)i(plan)e(assuming)f(that)j(the)f(input)e(and)i(output)g(arra)m(ys) 510 3020 y(will)28 b(b)s(e)h(distinct)g(\(this)h(is)f(the)i(default\).) 379 3155 y Ft(\000)60 b Fp(FFTW_IN_PLACE)p Fv(:)54 b(pro)s(duce)37 b(a)i(plan)e(assuming)h(that)h(y)m(ou)g(w)m(an)m(t)g(to)h(p)s(erform)d (the)i(trans-)510 3265 y(form)33 b(in-place.)51 b(\(Unlik)m(e)33 b(the)h(one-dimensional)e(transform,)i(this)f(\\really")g(p)s(erforms)g (the)510 3374 y(transform)j(in-place.\))58 b(Note)37 b(that,)i(if)c(y)m(ou)i(w)m(an)m(t)g(to)g(p)s(erform)e(in-place)g (transforms,)j(y)m(ou)510 3484 y Fr(must)45 b Fv(use)35 b(a)h(plan)f(created)i(with)d(this)h(option.)56 b(The)35 b(use)h(of)f(this)g(option)g(has)h(imp)s(ortan)m(t)510 3594 y(implications)29 b(for)j(the)h(size)f(of)g(the)h(input/output)d (arra)m(y)j(\(see)g(Section)f(3.5.2)i([Computing)510 3703 y(the)d(Real)f(Multi-dimensional)c(T)-8 b(ransform],)30 b(page)h(30\).)510 3838 y(The)f(default)f(mo)s(de)h(of)h(op)s(eration)f (is)f Fp(FFTW_OUT_OF_PLACE)p Fv(.)379 3973 y Ft(\000)60 b Fp(FFTW_USE_WISDOM)p Fv(:)h(use)42 b(an)m(y)h Fp(wisdom)e Fv(that)i(is)f(a)m(v)-5 b(ailable)41 b(to)j(help)d(in)g(the)i(creation) g(of)510 4082 y(the)34 b(plan.)50 b(\(See)35 b(Section)e(2.6)i([W)-8 b(ords)35 b(of)f(Wisdom],)g(page)h(13.\))52 b(This)32 b(can)i(greatly)h(sp)s(eed)510 4192 y(the)g(creation)h(of)f(plans,)g (esp)s(ecially)e(with)h(the)h Fp(FFTW_MEASURE)d Fv(option.)55 b Fp(FFTW_ESTIMATE)510 4301 y Fv(plans)33 b(can)i(also)f(tak)m(e)i(adv) -5 b(an)m(tage)36 b(of)f Fp(wisdom)e Fv(to)i(pro)s(duce)e(a)i(more)f (optimal)g(plan)f(\(based)510 4411 y(on)42 b(past)g(measuremen)m(ts\))g (than)f(the)h(estimation)g(heuristic)e(w)m(ould)g(normally)g(generate.) 510 4520 y(When)30 b(the)h Fp(FFTW_MEASURE)c Fv(option)j(is)g(used,)g (new)g Fp(wisdom)f Fv(will)f(also)j(b)s(e)f(generated)h(if)f(the)510 4630 y(curren)m(t)42 b(transform)g(size)g(is)g(not)g(completely)g (understo)s(o)s(d)f(b)m(y)h(existing)g Fp(wisdom)p Fv(.)75 b(Note)510 4740 y(that)37 b(the)g(same)g Fp(wisdom)e Fv(is)h(shared)g(b)s(et)m(w)m(een)h(one-dimensional)e(and)h(m)m (ulti-dimensional)510 4849 y(transforms.)150 5074 y Fh(3.5.2)63 b(Computing)41 b(the)f(Real)h(Multi-dimensional)g(T)-10 b(ransform)390 5236 y Fp(#include)46 b()p eop end %%Page: 31 33 TeXDict begin 31 32 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(31)390 299 y Fp(void)47 b(rfftwnd_real_to_complex)o(\(rff)o(twn)o(d_pl)o(an)42 b(plan,)k(int)h(howmany,)1774 403 y(fftw_real)e(*in,)i(int)g(istride,)e (int)i(idist,)1774 506 y(fftw_complex)e(*out,)h(int)h(ostride,)e(int)i (odist\);)390 610 y(void)g(rfftwnd_complex_to_real)o(\(rff)o(twn)o (d_pl)o(an)42 b(plan,)k(int)h(howmany,)1774 714 y(fftw_complex)e(*in,)h (int)h(istride,)f(int)h(idist,)1774 818 y(fftw_real)e(*out,)i(int)g (ostride,)e(int)i(odist\);)390 1025 y(void)g(rfftwnd_one_real_to_com)o (plex)o(\(rf)o(ftwn)o(d_pl)o(an)41 b(p,)48 b(fftw_real)d(*in,)1965 1129 y(fftw_complex)f(*out\);)390 1233 y(void)j (rfftwnd_one_complex_to_)o(real)o(\(rf)o(ftwn)o(d_pl)o(an)41 b(p,)48 b(fftw_complex)c(*in,)1965 1337 y(fftw_real)h(*out\);)275 1464 y Fv(These)24 b(functions)f(compute)h(the)h(real)f(m)m (ulti-dimensional)c(F)-8 b(ourier)24 b(T)-8 b(ransform,)25 b(using)e(a)h(plan)f(cre-)150 1574 y(ated)i(b)m(y)f Fp (rfftwnd_create_plan)18 b Fv(\(see)25 b(Section)f(3.5.1)i([Plan)d (Creation)h(for)g(Real)g(Multi-dimensional)150 1683 y(T)-8 b(ransforms],)31 b(page)h(29\).)46 b(\(Note)33 b(that)f(the)f(plan)g (determines)f(the)i(rank)f(and)g(dimensions)d(of)k(the)g(ar-)150 1793 y(ra)m(y)27 b(to)g(b)s(e)e(transformed.\))39 b(The)26 b(`)p Fp(rfftwnd_one_)p Fv(')d(functions)i(pro)m(vide)h(a)g (simpli\014ed)d(in)m(terface)k(for)f(the)150 1903 y(common)33 b(case)h(of)f(single)f(input)f(arra)m(y)i(of)g(stride)f(1.)48 b(Unlik)m(e)32 b(other)h(transform)g(routines)e(in)h(FFTW,)150 2012 y(w)m(e)f(here)f(use)g(separate)h(functions)e(for)h(the)h(t)m(w)m (o)g(directions)e(of)i(the)f(transform)g(in)f(order)g(to)j(correctly) 150 2122 y(express)e(the)g(datat)m(yp)s(es)i(of)e(the)h(parameters.)275 2249 y Fr(Imp)-5 b(ortant:)58 b Fv(When)35 b(in)m(v)m(ok)m(ed)g(for)g (an)g(out-of-place,)j Fp(FFTW_COMPLEX_TO_REAL)30 b Fv(transform)k(with) 150 2359 y Fp(rank)29 b(>)h(1)p Fv(,)35 b(the)f(input)e(arra)m(y)j(is)e (o)m(v)m(erwritten)h(with)f(scratc)m(h)i(v)-5 b(alues)33 b(b)m(y)h(these)g(routines.)50 b(The)34 b(input)150 2468 y(arra)m(y)26 b(is)e(not)i(mo)s(di\014ed)d(for)i Fp (FFTW_REAL_TO_COMPLEX)20 b Fv(transforms)25 b(or)g(for)g Fp(FFTW_COMPLEX_TO_REAL)150 2578 y Fv(with)k Fp(rank)g(==)h(1)p Fv(.)150 2781 y Fh(Argumen)m(ts)225 2949 y Ft(\017)60 b Fp(plan)20 b Fv(is)g(the)h(plan)e(created)j(b)m(y)f Fp(rfftwnd_create_plan)p Fv(.)32 b(\(see)22 b(Section)f(3.5.1)i([Plan)d (Creation)g(for)330 3059 y(Real)i(Multi-dimensional)c(T)-8 b(ransforms],)23 b(page)f(29\).)39 b(In)21 b(the)h(case)h(of)f(t)m(w)m (o)h(and)e(three-dimensional)330 3168 y(transforms,)45 b(it)d(could)g(also)h(ha)m(v)m(e)h(b)s(een)e(created)h(b)m(y)g Fp(rfftw2d_create_plan)37 b Fv(or)43 b Fp(rfftw3d_)330 3278 y(create_plan)p Fv(,)28 b(resp)s(ectiv)m(ely)-8 b(.)330 3405 y Fp(FFTW_REAL_TO_COMPLEX)15 b Fv(plans)20 b(m)m(ust)h(b)s(e)f(used)g(with)g(the)h(`)p Fp(real_to_complex)p Fv(')c(functions,)22 b(and)330 3515 y Fp(FFTW_COMPLEX_TO_REAL)h Fv(plans)k(m)m(ust)i(b)s(e)e(used)h(with)f(the)i(`)p Fp(complex_to_real)p Fv(')c(functions.)39 b(It)330 3624 y(is)29 b(an)i(error)f(to)h(mismatc)m(h)f(the)g(plan)f(direction)h(and) f(the)i(transform)f(function.)225 3752 y Ft(\017)60 b Fp(howmany)28 b Fv(is)i(the)g(n)m(um)m(b)s(er)f(of)i(transforms)f(to)h (b)s(e)e(computed.)225 3879 y Ft(\017)60 b Fp(in)p Fv(,)33 b Fp(istride)e Fv(and)i Fp(idist)e Fv(describ)s(e)h(the)h(input)e(arra) m(y\(s\).)50 b(There)33 b(are)g Fp(howmany)e Fv(input)g(arra)m(ys;)330 3989 y(the)42 b(\014rst)e(one)i(is)f(p)s(oin)m(ted)f(to)i(b)m(y)g Fp(in)p Fv(,)h(the)f(second)g(one)f(is)g(p)s(oin)m(ted)f(to)i(b)m(y)g Fp(in)29 b(+)h(idist)p Fv(,)44 b(and)330 4099 y(so)c(on,)i(up)d(to)i Fp(in)30 b(+)g(\(howmany)e(-)i(1\))g(*)g(idist)p Fv(.)67 b(Eac)m(h)41 b(input)d(arra)m(y)i(is)f(stored)h(in)e(ro)m(w-ma)5 b(jor)330 4208 y(format)31 b(\(see)h(Section)f(2.5)i ([Multi-dimensional)27 b(Arra)m(y)k(F)-8 b(ormat],)34 b(page)d(11\),)i(and)e(is)f(not)h(neces-)330 4318 y(sarily)g(con)m (tiguous)h(in)f(memory)-8 b(.)47 b(Sp)s(eci\014cally)-8 b(,)31 b Fp(in[0])g Fv(is)h(the)g(\014rst)g(elemen)m(t)h(of)g(the)f (\014rst)g(arra)m(y)-8 b(,)330 4427 y Fp(in[istride])31 b Fv(is)i(the)h(second)g(elemen)m(t)g(of)g(the)g(\014rst)f(arra)m(y)-8 b(,)36 b(and)e(so)g(on.)51 b(In)33 b(general,)i(the)f Fp(i)p Fv(-th)330 4537 y(elemen)m(t)27 b(of)g(the)g Fp(j)p Fv(-th)g(input)d(arra)m(y)k(will)c(b)s(e)i(in)f(p)s(osition)g Fp(in[i)k(*)h(istride)f(+)h(j)g(*)g(idist])p Fv(.)38 b(Note)330 4647 y(that,)h(here,)g Fp(i)d Fv(refers)h(to)g(an)g(index)e (in)m(to)i(the)g(ro)m(w-ma)5 b(jor)37 b(format)g(for)g(the)g(m)m (ulti-dimensional)330 4756 y(arra)m(y)-8 b(,)32 b(rather)e(than)g(an)g (index)f(in)g(an)m(y)i(particular)e(dimension.)330 4884 y(The)d(dimensions)e(of)j(the)g(arra)m(ys)g(are)g(di\013eren)m(t)f(for) g(real)g(and)g(complex)h(data,)h(and)e(are)h(discussed)330 4993 y(in)k(more)h(detail)g(b)s(elo)m(w)f(\(see)i(Section)f(3.5.3)i ([Arra)m(y)f(Dimensions)e(for)h(Real)g(Multi-dimensional)330 5103 y(T)-8 b(ransforms],)30 b(page)h(32\).)379 5230 y Ft(\000)60 b Fr(In-plac)-5 b(e)30 b(tr)-5 b(ansforms)7 b Fv(:)42 b(F)-8 b(or)28 b(plans)d(created)j(with)d(the)i Fp(FFTW_IN_PLACE)c Fv(option,)k(the)g(trans-)510 5340 y(form)32 b(is)f(computed)h(in-place|the)g(output)f(is)h(returned)f(in) g(the)h Fp(in)g Fv(arra)m(y)-8 b(.)47 b(The)32 b(meaning)p eop end %%Page: 32 34 TeXDict begin 32 33 bop 150 -116 a Fv(32)3232 b(FFTW)510 299 y(of)35 b(the)h Fp(stride)d Fv(and)i Fp(dist)f Fv(parameters)i(in)e (this)g(case)i(is)e(subtle)g(and)h(is)f(discussed)g(b)s(elo)m(w)510 408 y(\(see)d(Section)g(3.5.4)h([Strides)d(in)g(In-place)h(RFFTWND],)i (page)f(32\).)225 545 y Ft(\017)60 b Fp(out)p Fv(,)29 b Fp(ostride)f Fv(and)g Fp(odist)g Fv(describ)s(e)g(the)i(output)f (arra)m(y\(s\).)42 b(The)29 b(format)g(is)g(the)h(same)g(as)f(that)330 654 y(for)34 b(the)g(input)f(arra)m(y)-8 b(.)53 b(See)34 b(b)s(elo)m(w)g(for)g(a)g(discussion)e(of)i(the)g(dimensions)e(of)i (the)h(output)e(arra)m(y)330 764 y(for)d(real)g(and)g(complex)g(data.) 379 900 y Ft(\000)60 b Fr(In-plac)-5 b(e)47 b(tr)-5 b(ansforms)7 b Fv(:)73 b(These)45 b(parameters)g(are)h(ignored)e(for)g(plans)g (created)i(with)e(the)510 1010 y Fp(FFTW_IN_PLACE)27 b Fv(option.)275 1175 y(The)32 b(function)f Fp(rfftwnd_one)f Fv(transforms)i(a)h(single,)g(con)m(tiguous)g(input)e(arra)m(y)i(to)h (a)f(con)m(tiguous)150 1284 y(output)d(arra)m(y)-8 b(.)42 b(By)30 b(de\014nition,)f(the)h(call)390 1417 y Fp (rfftwnd_one_...\(plan,)42 b(in,)47 b(out\))275 1555 y Fv(is)29 b(equiv)-5 b(alen)m(t)30 b(to)390 1687 y Fp (rfftwnd_...\(plan,)43 b(1,)k(in,)g(1,)g(0,)h(out,)e(1,)h(0\))150 1919 y Fh(3.5.3)63 b(Arra)m(y)39 b(Dimensions)j(for)f(Real)g (Multi-dimensional)g(T)-10 b(ransforms)275 2115 y Fv(The)32 b(output)h(of)g(a)g(m)m(ulti-dimensional)c(transform)k(of)g(real)g (data)g(con)m(tains)h(symmetries)e(that,)i(in)150 2225 y(principle,)27 b(mak)m(e)j(half)f(of)h(the)f(outputs)h(redundan)m(t)e (\(see)i(Section)g(3.5.6)h([What)g(RFFTWND)g(Really)150 2334 y(Computes],)36 b(page)f(33\).)55 b(In)34 b(practice,)i(it)f(is)e (not)i(p)s(ossible)d(to)k(en)m(tirely)e(realize)g(these)h(sa)m(vings)g (in)e(an)150 2444 y(e\016cien)m(t)24 b(and)e(understandable)f(format.) 39 b(Instead,)25 b(the)e(output)g(of)g(the)h(r\013t)m(wnd)e(transforms) h(is)f Fr(slightly)150 2554 y Fv(o)m(v)m(er)27 b(half)e(of)h(the)g (output)f(of)h(the)g(corresp)s(onding)d(complex)j(transform.)38 b(W)-8 b(e)27 b(do)f(not)g(\\pac)m(k")h(the)f(data)150 2663 y(in)k(an)m(y)i(w)m(a)m(y)-8 b(,)33 b(but)e(store)h(it)f(as)h(an)f (ordinary)f(arra)m(y)i(of)f Fp(fftw_complex)e Fv(v)-5 b(alues.)43 b(In)31 b(fact,)h(this)f(data)h(is)150 2773 y(simply)c(a)j(subsection)e(of)i(what)f(w)m(ould)f(b)s(e)h(the)g(arra)m (y)h(in)e(the)i(corresp)s(onding)d(complex)i(transform.)275 2911 y(Sp)s(eci\014cally)-8 b(,)32 b(for)i(a)g(real)f(transform)g(of)h (dimensions)d Fm(n)2225 2925 y Fo(1)2284 2911 y Ft(\002)22 b Fm(n)2432 2925 y Fo(2)2491 2911 y Ft(\002)h(\001)15 b(\001)g(\001)23 b(\002)f Fm(n)2861 2925 y Fl(d)2899 2911 y Fv(,)35 b(the)f(complex)f(data)i(is)150 3021 y(an)e Fm(n)334 3035 y Fo(1)393 3021 y Ft(\002)21 b Fm(n)540 3035 y Fo(2)599 3021 y Ft(\002)h(\001)15 b(\001)g(\001)23 b(\002)f Fv(\()p Fm(n)1003 3035 y Fl(d)1041 3021 y Fm(=)p Fv(2)h(+)f(1\))34 b(arra)m(y)f(of)h Fp(fftw_complex)29 b Fv(v)-5 b(alues)33 b(in)e(ro)m(w-ma)5 b(jor)34 b(order)f(\(with)f (the)150 3130 y(division)j(rounded)h(do)m(wn\).)63 b(That)38 b(is,)h(w)m(e)g(only)e(store)h(the)g(lo)m(w)m(er)h(half)d(\(plus)h(one) h(elemen)m(t\))h(of)f(the)150 3240 y(last)c(dimension)e(of)i(the)g (data)h(from)f(the)g(ordinary)e(complex)i(transform.)51 b(\(W)-8 b(e)36 b(could)d(ha)m(v)m(e)j(instead)150 3349 y(tak)m(en)d(half)f(of)g(an)m(y)h(other)f(dimension,)f(but)g(implemen)m (tation)g(turns)g(out)i(to)g(b)s(e)e(simpler)f(if)h(the)i(last,)150 3459 y(con)m(tiguous,)e(dimension)d(is)h(used.\))275 3597 y(Since)c(the)i(complex)g(data)h(is)d(sligh)m(tly)h(larger)g(than) h(the)g(real)f(data,)j(some)e(complications)f(arise)g(for)150 3707 y(in-place)j(transforms.)39 b(In)29 b(this)f(case,)j(the)f (\014nal)e(dimension)f(of)j(the)f(real)g(data)i(m)m(ust)e(b)s(e)g (padded)f(with)150 3816 y(extra)c(v)-5 b(alues)22 b(to)h(accommo)s (date)i(the)e(size)g(of)g(the)g(complex)g(data|t)m(w)m(o)h(extra)g(if)e (the)h(last)g(dimension)d(is)150 3926 y(ev)m(en)k(and)f(one)h(if)f(it)g (is)g(o)s(dd.)37 b(That)24 b(is,)g(the)g(last)f(dimension)e(of)j(the)g (real)f(data)i(m)m(ust)e(ph)m(ysically)f(con)m(tain)150 4035 y(2\()p Fm(n)285 4049 y Fl(d)324 4035 y Fm(=)p Fv(2)j(+)g(1\))37 b Fp(fftw_real)d Fv(v)-5 b(alues)36 b(\(exactly)i(enough)f(to)g(hold)e (the)i(complex)g(data\).)60 b(This)35 b(ph)m(ysical)150 4145 y(arra)m(y)42 b(size)g(do)s(es)f(not,)k(ho)m(w)m(ev)m(er,)i(c)m (hange)c(the)e Fr(lo)-5 b(gic)g(al)53 b Fv(arra)m(y)42 b(size|only)f Fm(n)2909 4159 y Fl(d)2989 4145 y Fv(v)-5 b(alues)41 b(are)h(actually)150 4255 y(stored)27 b(in)e(the)i(last)g (dimension,)e(and)h Fm(n)1524 4269 y Fl(d)1589 4255 y Fv(is)g(the)h(last)g(dimension)d(passed)i(to)i Fp(rfftwnd_create_plan)p Fv(.)150 4486 y Fh(3.5.4)63 b(Strides)41 b(in)g(In-place)g(RFFTWND)275 4682 y Fv(The)32 b(fact)i(that)g(the)f(input)f(and)g(output)h(datat)m (yp)s(es)h(are)g(di\013eren)m(t)e(for)h(r\013t)m(wnd)g(complicates)g (the)150 4792 y(meaning)i(of)h(the)g Fp(stride)e Fv(and)i Fp(dist)e Fv(parameters)j(of)f(in-place)e(transforms|are)i(they)g(in)e (units)h(of)150 4902 y Fp(fftw_real)g Fv(or)i Fp(fftw_complex)c Fv(elemen)m(ts?)61 b(When)37 b(reading)f(the)h(input,)g(they)g(are)h (in)m(terpreted)e(in)150 5011 y(units)28 b(of)i(the)g(datat)m(yp)s(e)h (of)f(the)g(input)d(data.)42 b(When)29 b(writing)f(the)i(output,)g(the) f Fp(istride)f Fv(and)h Fp(idist)150 5121 y Fv(are)36 b(translated)g(to)g(the)g(output)f(datat)m(yp)s(e's)i(\\units")e(in)f (one)i(of)g(t)m(w)m(o)h(w)m(a)m(ys,)i(corresp)s(onding)33 b(to)k(the)150 5230 y(t)m(w)m(o)d(most)e(common)h(situations)e(in)g (whic)m(h)g Fp(stride)g Fv(and)g Fp(dist)h Fv(parameters)g(are)h (useful.)45 b(Belo)m(w,)33 b(w)m(e)150 5340 y(refer)k(to)h(these)g (\\translated")h(parameters)e(as)h Fp(ostride_t)d Fv(and)i Fp(odist_t)p Fv(.)60 b(\(Note)39 b(that)g(these)f(are)p eop end %%Page: 33 35 TeXDict begin 33 34 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(33)150 299 y(computed)31 b(in)m(ternally)e(b)m(y)i(r\013t)m(wnd;)f(the)h(actual)h Fp(ostride)d Fv(and)h Fp(odist)f Fv(parameters)j(are)f(ignored)f(for) 150 408 y(in-place)f(transforms.\))275 548 y(First,)24 b(there)g(is)f(the)h(case)h(where)e(y)m(ou)h(are)g(transforming)e(a)i (n)m(um)m(b)s(er)f(of)h(con)m(tiguous)g(arra)m(ys)g(lo)s(cated)150 658 y(one)34 b(after)g(another)g(in)f(memory)-8 b(.)51 b(In)33 b(this)g(situation,)h Fp(istride)e Fv(is)g Fp(1)i Fv(and)f Fp(idist)f Fv(is)h(the)h(pro)s(duct)f(of)150 768 y(the)f(ph)m(ysical)e(dimensions)e(of)k(the)g(arra)m(y)-8 b(.)45 b Fp(ostride_t)29 b Fv(and)h Fp(odist_t)g Fv(are)i(then)f(c)m (hosen)h(so)g(that)g(the)150 877 y(output)38 b(arra)m(ys)g(are)h(con)m (tiguous)f(and)f(lie)g(on)h(top)h(of)f(the)g(input)e(arra)m(ys.)65 b Fp(ostride_t)35 b Fv(is)i(therefore)150 987 y Fp(1)p Fv(.)50 b(F)-8 b(or)34 b(a)g(real-to-complex)g(transform,)g Fp(odist_t)e Fv(is)g Fp(idist/2)p Fv(;)i(for)f(a)h(complex-to-real)g (transform,)150 1096 y Fp(odist_t)28 b Fv(is)i Fp(idist*2)p Fv(.)275 1236 y(The)k(second)g(case)i(is)e(when)f(y)m(ou)i(ha)m(v)m(e)h (an)f(arra)m(y)g(in)e(whic)m(h)g(eac)m(h)j(elemen)m(t)f(has)g Fp(nc)f Fv(comp)s(onen)m(ts)150 1346 y(\(e.g.)42 b(a)30 b(structure)g(with)e Fp(nc)i Fv(n)m(umeric)e(\014elds\),)i(and)f(y)m (ou)h(w)m(an)m(t)h(to)g(transform)e(all)g(of)h(the)g(comp)s(onen)m(ts) 150 1456 y(at)f(once.)40 b(Here,)29 b Fp(istride)d Fv(is)h Fp(nc)h Fv(and)f Fp(idist)g Fv(is)g Fp(1)p Fv(.)39 b(F)-8 b(or)29 b(this)e(case,)i(it)f(is)f(natural)g(to)h(w)m(an)m(t)h(the)f (output)150 1565 y(to)j(also)g(ha)m(v)m(e)g Fp(nc)f Fv(consecutiv)m(e)i (comp)s(onen)m(ts,)f(no)m(w)f(of)h(the)g(output)f(data)h(t)m(yp)s(e;)g (this)e(is)h(exactly)h(what)150 1675 y(r\013t)m(wnd)k(do)s(es.)58 b(Sp)s(eci\014cally)-8 b(,)35 b(it)h(uses)f(an)h Fp(ostride_t)e Fv(equal)i(to)g Fp(istride)p Fv(,)g(and)g(an)g Fp(odist_t)e Fv(of)i Fp(1)p Fv(.)150 1784 y(\(Astute)26 b(readers)e(will)e(realize)j (that)g(some)g(extra)g(bu\013er)f(space)h(is)f(required)f(in)g(order)i (to)g(p)s(erform)e(suc)m(h)150 1894 y(a)31 b(transform;)f(this)f(is)g (handled)g(automatically)h(b)m(y)g(r\013t)m(wnd.\))275 2034 y(The)k(general)h(rule)e(is)h(as)h(follo)m(ws.)53 b Fp(ostride_t)33 b Fv(equals)h Fp(istride)p Fv(.)52 b(If)34 b Fp(idist)g Fv(is)g Fp(1)g Fv(and)g Fp(idist)g Fv(is)150 2144 y(less)29 b(than)g Fp(istride)p Fv(,)e(then)i Fp(odist_t)f Fv(is)g Fp(1)p Fv(.)40 b(Otherwise,)28 b(for)i(a)f (real-to-complex)h(transform)f Fp(odist_t)150 2253 y Fv(is)g Fp(idist/2)g Fv(and)h(for)g(a)g(complex-to-real)i(transform)d Fp(odist_t)g Fv(is)g Fp(idist*2)p Fv(.)150 2488 y Fh(3.5.5)63 b(Destro)m(ying)41 b(a)g(Multi-dimensional)h(Plan)390 2650 y Fp(#include)k()390 2858 y(void)h (rfftwnd_destroy_plan\(rf)o(ftwn)o(d_p)o(lan)41 b(plan\);)275 2998 y Fv(The)34 b(function)f Fp(rfftwnd_destroy_plan)c Fv(frees)35 b(the)g(plan)e Fp(plan)h Fv(and)g(releases)h(all)e(the)i (memory)150 3107 y(asso)s(ciated)c(with)e(it.)40 b(After)31 b(destruction,)f(a)g(plan)f(is)h(no)g(longer)g(v)-5 b(alid.)150 3343 y Fh(3.5.6)63 b(What)40 b(RFFTWND)h(Really)f(Computes)275 3541 y Fv(The)23 b(con)m(v)m(en)m(tions)i(that)f(w)m(e)h(follo)m(w)e (for)g(the)h(real)g(m)m(ulti-dimensional)c(transform)j(are)h(analogous) g(to)150 3650 y(those)f(for)f(the)g(complex)g(m)m(ulti-dimensional)d (transform.)37 b(In)22 b(particular,)g(the)h(forw)m(ard)f(transform)f (has)150 3760 y(a)33 b(negativ)m(e)g(sign)f(in)f(the)i(exp)s(onen)m(t)f (and)g(neither)f(the)i(forw)m(ard)f(nor)g(the)g(bac)m(kw)m(ard)h (transforms)f(will)150 3870 y(p)s(erform)g(an)m(y)i(normalization.)48 b(Computing)32 b(the)h(bac)m(kw)m(ard)h(transform)f(of)g(the)h(forw)m (ard)f(transform)150 3979 y(will)c(m)m(ultiply)g(the)j(arra)m(y)h(b)m (y)f(the)g(pro)s(duct)e(of)i(its)g(dimensions)d(\(that)k(is,)e(the)h (logical)g(dimensions)d(of)150 4089 y(the)37 b(real)g(data\).)63 b(The)36 b(forw)m(ard)h(transform)f(is)h(real-to-complex)h(and)e(the)i (bac)m(kw)m(ard)f(transform)g(is)150 4198 y(complex-to-real.)275 4338 y(The)29 b(exact)j(mathematical)f(de\014nition)d(of)j(our)e(real)h (m)m(ulti-dimensional)d(transform)j(follo)m(ws.)150 4478 y Fr(R)-5 b(e)g(al)35 b(to)e(c)-5 b(omplex)35 b(\(forwar)-5 b(d\))36 b(tr)-5 b(ansform.)44 b Fv(Let)32 b Fm(X)38 b Fv(b)s(e)30 b(a)h Fm(d)p Fv(-dimensional)e(real)i(arra)m(y)g(whose)g (elemen)m(ts)150 4588 y(are)g Fm(X)7 b Fv([)p Fm(j)446 4602 y Fo(1)484 4588 y Fm(;)15 b(j)561 4602 y Fo(2)599 4588 y Fm(;)g(:)g(:)g(:)i(;)e(j)838 4602 y Fl(d)877 4588 y Fv(],)31 b(where)f(0)c Ft(\024)f Fm(j)1425 4602 y Fl(s)1486 4588 y Fm(<)g(n)1637 4602 y Fl(s)1703 4588 y Fv(for)30 b(all)f Fm(s)c Ft(2)g(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)k(;) c(d)p Ft(g)p Fv(.)42 b(Let)31 b(also)f Fm(!)3062 4602 y Fl(s)3122 4588 y Fv(=)c Fm(e)3261 4555 y Fo(2)p Fl(\031)3335 4510 y Fk(p)p 3389 4510 85 3 v 3389 4555 a(\000)p Fo(1)p Fl(=n)3549 4563 y Fe(s)3586 4588 y Fv(,)k(for)150 4698 y(all)60 b Fm(s)24 b Ft(2)h(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)k(;)c(d)p Ft(g)p Fv(.)275 4838 y(The)24 b(real)g(to)h(complex)g(transform)e(computes)i(a)g(complex)f(arra)m(y)i Fm(Y)20 b Fv(,)26 b(whose)e(structure)g(is)g(the)h(same)150 4947 y(as)31 b(that)g(of)f Fm(X)7 b Fv(,)31 b(de\014ned)e(b)m(y)534 5258 y Fm(Y)20 b Fv([)p Fm(i)663 5272 y Fo(1)701 5258 y Fm(;)15 b(i)772 5272 y Fo(2)810 5258 y Fm(;)g(:)g(:)g(:)i(;)e(i)1043 5272 y Fl(d)1082 5258 y Fv(])26 b(=)1229 5151 y Fl(n)1270 5159 y Fd(1)1302 5151 y Fk(\000)p Fo(1)1248 5177 y Fg(X)1236 5354 y Fl(j)1263 5362 y Fd(1)1296 5354 y Fo(=0)1402 5151 y Fl(n)1443 5159 y Fd(2)1476 5151 y Fk(\000)p Fo(1)1421 5177 y Fg(X)1409 5354 y Fl(j)1436 5362 y Fd(2)1469 5354 y Fo(=0)1576 5258 y Ft(\001)15 b(\001)g(\001)1697 5150 y Fl(n)1738 5159 y Fe(d)1773 5150 y Fk(\000)p Fo(1)1717 5177 y Fg(X)1704 5354 y Fl(j)1731 5363 y Fe(d)1767 5354 y Fo(=0)1873 5258 y Fm(X)7 b Fv([)p Fm(j)2017 5272 y Fo(1)2055 5258 y Fm(;)15 b(j)2132 5272 y Fo(2)2170 5258 y Fm(;)g(:)g(:)g(:)i(;)e(j)2409 5272 y Fl(d)2449 5258 y Fv(])p Fm(!)2534 5215 y Fk(\000)p Fl(i)2609 5223 y Fd(1)2642 5215 y Fl(j)2669 5223 y Fd(1)2531 5277 y Fo(1)2706 5258 y Fm(!)2766 5215 y Fk(\000)p Fl(i)2841 5223 y Fd(2)2873 5215 y Fl(j)2900 5223 y Fd(2)2763 5277 y Fo(2)2952 5258 y Ft(\001)g(\001)g(\001)i Fm(!)3134 5215 y Fk(\000)p Fl(i)3209 5224 y Fe(d)3244 5215 y Fl(j)3271 5224 y Fe(d)3131 5280 y Fl(d)3340 5258 y Fm(:)p eop end %%Page: 34 36 TeXDict begin 34 35 bop 150 -116 a Fv(34)3232 b(FFTW)275 299 y(The)26 b(output)g(arra)m(y)h Fm(Y)46 b Fv(enjo)m(ys)27 b(a)g(m)m(ultidimensional)22 b(hermitian)j(symmetry)-8 b(,)27 b(that)g(is,)g(the)f(iden)m(tit)m(y)150 408 y Fm(Y)20 b Fv([)p Fm(i)279 422 y Fo(1)317 408 y Fm(;)15 b(i)388 422 y Fo(2)426 408 y Fm(;)g(:)g(:)g(:)h(;)f(i)658 422 y Fl(d)698 408 y Fv(])28 b(=)g Fm(Y)20 b Fv([)p Fm(n)1003 422 y Fo(1)1062 408 y Ft(\000)h Fm(i)1185 422 y Fo(1)1223 408 y Fm(;)15 b(n)1318 422 y Fo(2)1376 408 y Ft(\000)21 b Fm(i)1499 422 y Fo(2)1537 408 y Fm(;)15 b(:)g(:)g(:)h(;)f(n)1793 422 y Fl(d)1854 408 y Ft(\000)21 b Fm(i)1977 422 y Fl(d)2016 408 y Fv(])2041 375 y Fk(\003)2111 408 y Fv(holds)31 b(for)h(all)f(0)e Ft(\024)f Fm(i)2824 422 y Fl(s)2888 408 y Fm(<)g(n)3042 422 y Fl(s)3077 408 y Fv(.)46 b(Because)34 b(of)e(this)150 518 y(symmetry)-8 b(,)29 b Fm(Y)48 b Fv(is)28 b(stored)g(in)g(the)g(p)s(eculiar)e(w)m(a)m(y)k(describ)s(ed)c (in)h(Section)h(3.5.3)j([Arra)m(y)e(Dimensions)d(for)150 628 y(Real)k(Multi-dimensional)d(T)-8 b(ransforms],)30 b(page)h(32.)150 761 y Fr(Complex)44 b(to)f(r)-5 b(e)g(al)44 b(\(b)-5 b(ackwar)g(d\))45 b(tr)-5 b(ansform.)74 b Fv(Let)42 b Fm(X)48 b Fv(b)s(e)41 b(a)g Fm(d)p Fv(-dimensional)e(complex)i(arra)m (y)g(whose)150 870 y(elemen)m(ts)f(are)h Fm(X)7 b Fv([)p Fm(j)837 884 y Fo(1)875 870 y Fm(;)15 b(j)952 884 y Fo(2)990 870 y Fm(;)g(:)g(:)g(:)i(;)e(j)1229 884 y Fl(d)1268 870 y Fv(],)43 b(where)c(0)j Ft(\024)f Fm(j)1869 884 y Fl(s)1946 870 y Fm(<)g(n)2113 884 y Fl(s)2188 870 y Fv(for)e(all)g Fm(s)i Ft(2)g(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)j(;)d(d)p Ft(g)p Fv(.)71 b(The)39 b(arra)m(y)i Fm(X)150 980 y Fv(m)m(ust)33 b(b)s(e)f(hermitian,)f(that)i(is,)g(the)g(iden)m(tit)m(y)f Fm(X)7 b Fv([)p Fm(j)1906 994 y Fo(1)1944 980 y Fm(;)15 b(j)2021 994 y Fo(2)2059 980 y Fm(;)g(:)g(:)g(:)i(;)e(j)2298 994 y Fl(d)2337 980 y Fv(])30 b(=)f Fm(X)7 b Fv([)p Fm(n)2654 994 y Fo(1)2713 980 y Ft(\000)21 b Fm(j)2842 994 y Fo(1)2880 980 y Fm(;)15 b(n)2975 994 y Fo(2)3034 980 y Ft(\000)21 b Fm(j)3163 994 y Fo(2)3201 980 y Fm(;)15 b(:)g(:)g(:)i(;)e(n)3458 994 y Fl(d)3518 980 y Ft(\000)21 b Fm(j)3647 994 y Fl(d)3687 980 y Fv(])3712 947 y Fk(\003)150 1090 y Fv(m)m(ust)39 b(hold)e(for)i(all)f(0)i Ft(\024)f Fm(j)1109 1104 y Fl(s)1184 1090 y Fm(<)g(n)1349 1104 y Fl(s)1384 1090 y Fv(.)66 b(Moreo)m(v)m(er,)44 b Fm(X)i Fv(m)m(ust)39 b(b)s(e)f(stored)h(in)f (memory)g(in)g(the)h(p)s(eculiar)150 1199 y(w)m(a)m(y)32 b(describ)s(ed)d(in)h(Section)h(3.5.3)i([Arra)m(y)e(Dimensions)e(for)i (Real)g(Multi-dimensional)d(T)-8 b(ransforms],)150 1309 y(page)31 b(32.)275 1442 y(Let)f Fm(!)494 1456 y Fl(s)554 1442 y Fv(=)25 b Fm(e)692 1409 y Fo(2)p Fl(\031)766 1364 y Fk(p)p 821 1364 85 3 v 45 x(\000)p Fo(1)p Fl(=n)981 1417 y Fe(s)1017 1442 y Fv(,)30 b(for)f(all)58 b Fm(s)25 b Ft(2)g(f)p Fv(1)p Fm(;)15 b Fv(2)p Fm(;)g(:)g(:)g(:)j(;)d(d)p Ft(g)p Fv(.)42 b(The)29 b(complex)g(to)i(real)e(transform)g(computes)h (a)150 1552 y(real)g(arra)m(y)h Fm(Y)20 b Fv(,)30 b(whose)h(structure)f (is)f(the)h(same)h(as)g(that)g(of)f Fm(X)7 b Fv(,)31 b(de\014ned)f(b)m(y)612 1847 y Fm(Y)20 b Fv([)p Fm(i)741 1861 y Fo(1)779 1847 y Fm(;)15 b(i)850 1861 y Fo(2)888 1847 y Fm(;)g(:)g(:)g(:)i(;)e(i)1121 1861 y Fl(d)1160 1847 y Fv(])25 b(=)1306 1740 y Fl(n)1347 1748 y Fd(1)1380 1740 y Fk(\000)p Fo(1)1326 1766 y Fg(X)1314 1943 y Fl(j)1341 1951 y Fd(1)1374 1943 y Fo(=0)1480 1740 y Fl(n)1521 1748 y Fd(2)1553 1740 y Fk(\000)p Fo(1)1499 1766 y Fg(X)1487 1943 y Fl(j)1514 1951 y Fd(2)1547 1943 y Fo(=0)1654 1847 y Ft(\001)15 b(\001)g(\001)1775 1740 y Fl(n)1816 1749 y Fe(d)1851 1740 y Fk(\000)p Fo(1)1795 1766 y Fg(X)1782 1943 y Fl(j)1809 1952 y Fe(d)1844 1943 y Fo(=0)1951 1847 y Fm(X)7 b Fv([)p Fm(j)2095 1861 y Fo(1)2133 1847 y Fm(;)15 b(j)2210 1861 y Fo(2)2248 1847 y Fm(;)g(:)g(:)g(:)i(;)e(j)2487 1861 y Fl(d)2526 1847 y Fv(])p Fm(!)2611 1804 y Fl(i)2634 1812 y Fd(1)2667 1804 y Fl(j)2694 1812 y Fd(1)2608 1866 y Fo(1)2731 1847 y Fm(!)2791 1804 y Fl(i)2814 1812 y Fd(2)2847 1804 y Fl(j)2874 1812 y Fd(2)2788 1866 y Fo(2)2926 1847 y Ft(\001)g(\001)g(\001)i Fm(!)3108 1804 y Fl(i)3131 1813 y Fe(d)3166 1804 y Fl(j)3193 1813 y Fe(d)3105 1869 y Fl(d)3263 1847 y Fm(:)275 2117 y Fv(\(That)30 b Fm(Y)50 b Fv(is)30 b(real)g(is)f(not)i(mean)m(t)g(to)g(b)s(e)f(ob)m(vious,)g (although)g(the)g(pro)s(of)g(is)f(easy)-8 b(.\))275 2250 y(Computing)26 b(the)i(forw)m(ard)f(transform)g(follo)m(w)m(ed)h(b)m(y) g(the)g(bac)m(kw)m(ard)g(transform)f(will)f(m)m(ultiply)f(the)150 2359 y(arra)m(y)31 b(b)m(y)514 2295 y Fg(Q)593 2316 y Fl(d)593 2382 y(s)p Fo(=1)727 2359 y Fm(n)782 2373 y Fl(d)821 2359 y Fv(.)150 2613 y Fu(3.6)68 b(Wisdom)45 b(Reference)150 2891 y Fh(3.6.1)63 b(Exp)s(orting)41 b(Wisdom)390 3053 y Fp(#include)46 b()390 3261 y(void)h(fftw_export_wisdom\(void)41 b(\(*emitter\)\(char)j(c,)j(void)g (*\),)f(void)h(*data\);)390 3365 y(void)g(fftw_export_wisdom_to_f)o (ile\()o(FIL)o(E)42 b(*output_file\);)390 3468 y(char)47 b(*fftw_export_wisdom_to_)o(stri)o(ng\()o(void)o(\);)275 3602 y Fv(These)35 b(functions)g(allo)m(w)g(y)m(ou)i(to)f(exp)s(ort)g (all)f(curren)m(tly)g(accum)m(ulated)i Fp(wisdom)d Fv(in)g(a)j(form)e (from)150 3711 y(whic)m(h)g(it)g(can)i(b)s(e)e(later)h(imp)s(orted)f (and)g(restored,)j(ev)m(en)f(during)c(a)k(separate)g(run)d(of)j(the)f (program.)150 3821 y(\(See)c(Section)e(2.6)i([W)-8 b(ords)32 b(of)f(Wisdom],)g(page)g(13.\))44 b(The)31 b(curren)m(t)f(store)i(of)f Fp(wisdom)e Fv(is)h(not)h(a\013ected)150 3930 y(b)m(y)f(calling)f(an)m (y)i(of)f(these)h(routines.)275 4064 y Fp(fftw_export_wisdom)j Fv(exp)s(orts)39 b(the)h Fp(wisdom)e Fv(to)i(an)m(y)g(output)f(medium,) i(as)e(sp)s(eci\014ed)f(b)m(y)i(the)150 4173 y(callbac)m(k)33 b(function)f Fp(emitter)p Fv(.)47 b Fp(emitter)32 b Fv(is)g(a)h Fp(putc)p Fv(-lik)m(e)f(function)g(that)i(writes)e(the)i(c)m(haracter)g Fp(c)f Fv(to)150 4283 y(some)27 b(output;)g(its)f(second)g(parameter)g (is)g(the)g Fp(data)f Fv(p)s(oin)m(ter)g(passed)h(to)h Fp(fftw_export_wisdom)p Fv(.)34 b(F)-8 b(or)150 4392 y(con)m(v)m(enience,)32 b(the)e(follo)m(wing)f(t)m(w)m(o)j(\\wrapp)s (er")d(routines)h(are)g(pro)m(vided:)275 4526 y Fp (fftw_export_wisdom_to_f)o(ile)k Fv(writes)40 b(the)g Fp(wisdom)f Fv(to)j(the)f(curren)m(t)f(p)s(osition)f(in)g Fp(output_)150 4635 y(file)p Fv(,)28 b(whic)m(h)g(should)f(b)s(e)i(op)s (en)f(with)g(write)g(p)s(ermission.)37 b(Up)s(on)28 b(exit,)i(the)f (\014le)f(remains)g(op)s(en)g(and)h(is)150 4745 y(p)s(ositioned)f(at)j (the)g(end)f(of)g(the)h Fp(wisdom)e Fv(data.)275 4878 y Fp(fftw_export_wisdom_to_s)o(tri)o(ng)22 b Fv(returns)27 b(a)h(p)s(oin)m(ter)f(to)i(a)f Fp(NULL)p Fv(-terminated)f(string)g (holding)150 4988 y(the)37 b Fp(wisdom)e Fv(data.)60 b(This)34 b(string)i(is)f(dynamically)g(allo)s(cated,)j(and)e(it)g(is)g (the)g(resp)s(onsibilit)m(y)d(of)k(the)150 5097 y(caller)30 b(to)h(deallo)s(cate)g(it)e(with)h Fp(fftw_free)d Fv(when)j(it)g(is)f (no)h(longer)g(needed.)275 5230 y(All)24 b(of)j(these)g(routines)e(exp) s(ort)h(the)g(wisdom)f(in)g(the)i(same)f(format,)i(whic)m(h)d(w)m(e)i (will)d(not)i(do)s(cumen)m(t)150 5340 y(here)k(except)i(to)f(sa)m(y)g (that)g(it)f(is)f(LISP-lik)m(e)g(ASCI)s(I)g(text)i(that)g(is)f (insensitiv)m(e)e(to)j(white)f(space.)p eop end %%Page: 35 37 TeXDict begin 35 36 bop 150 -116 a Fv(Chapter)30 b(3:)41 b(FFTW)31 b(Reference)2354 b(35)150 299 y Fh(3.6.2)63 b(Imp)s(orting)41 b(Wisdom)390 461 y Fp(#include)46 b()390 668 y(fftw_status)f(fftw_import_wisdom\(int)c(\(*get_input\)\(void)j (*\),)i(void)h(*data\);)390 772 y(fftw_status)e (fftw_import_wisdom_from)o(_fil)o(e\(FI)o(LE)c(*input_file\);)390 876 y(fftw_status)k(fftw_import_wisdom_from)o(_str)o(ing\()o(con)o(st)d (char)k(*input_string\);)275 1011 y Fv(These)32 b(functions)f(imp)s (ort)g Fp(wisdom)g Fv(in)m(to)i(a)g(program)f(from)h(data)g(stored)g(b) m(y)f(the)h Fp(fftw_export_)150 1121 y(wisdom)39 b Fv(functions)g(ab)s (o)m(v)m(e.)72 b(\(See)41 b(Section)g(2.6)g([W)-8 b(ords)41 b(of)g(Wisdom],)i(page)e(13.\))73 b(The)40 b(imp)s(orted)150 1230 y Fp(wisdom)29 b Fv(supplemen)m(ts)h(rather)g(than)h(replaces)g (an)m(y)g Fp(wisdom)f Fv(already)g(accum)m(ulated)i(b)m(y)e(the)i (running)150 1340 y(program)40 b(\(except)i(when)d(there)h(is)g (con\015icting)f Fp(wisdom)p Fv(,)i(in)e(whic)m(h)g(case)i(the)g (existing)e(wisdom)g(is)150 1449 y(replaced\).)275 1584 y Fp(fftw_import_wisdom)25 b Fv(imp)s(orts)k Fp(wisdom)g Fv(from)h(an)m(y)h(input)d(medium,)h(as)i(sp)s(eci\014ed)e(b)m(y)i(the) f(call-)150 1694 y(bac)m(k)25 b(function)d Fp(get_input)p Fv(.)36 b Fp(get_input)22 b Fv(is)h(a)h Fp(getc)p Fv(-lik)m(e)e (function)h(that)h(returns)f(the)h(next)g(c)m(haracter)150 1804 y(in)30 b(the)h(input;)f(its)g(parameter)i(is)e(the)h Fp(data)f Fv(p)s(oin)m(ter)g(passed)h(to)h Fp(fftw_import_wisdom)p Fv(.)38 b(If)30 b(the)i(end)150 1913 y(of)41 b(the)g(input)e(data)i(is) f(reac)m(hed)h(\(whic)m(h)f(should)f(nev)m(er)i(happ)s(en)e(for)i(v)-5 b(alid)39 b(data\),)44 b(it)d(ma)m(y)g(return)150 2023 y(either)25 b Fp(NULL)g Fv(\(ASCI)s(I)g(0\))i(or)f Fp(EOF)f Fv(\(as)h(de\014ned)f(in)g Fp()p Fv(\).)37 b(F)-8 b(or)27 b(con)m(v)m(enience,)h(the)e(follo)m(wing)f(t)m(w)m(o)150 2132 y(\\wrapp)s(er")k(routines)h(are)g(pro)m(vided:)275 2267 y Fp(fftw_import_wisdom_from)o(_fi)o(le)40 b Fv(reads)46 b Fp(wisdom)f Fv(from)h(the)g(curren)m(t)g(p)s(osition)f(in)g Fp(input_)150 2377 y(file)p Fv(,)30 b(whic)m(h)g(should)f(b)s(e)i(op)s (en)f(with)g(read)h(p)s(ermission.)39 b(Up)s(on)30 b(exit,)i(the)f (\014le)f(remains)g(op)s(en)g(and)h(is)150 2487 y(p)s(ositioned)d(at)j (the)g(end)f(of)g(the)h Fp(wisdom)e Fv(data.)275 2622 y Fp(fftw_import_wisdom_from)o(_st)o(ring)52 b Fv(reads)59 b Fp(wisdom)f Fv(from)h(the)g Fp(NULL)p Fv(-terminated)f(string)150 2731 y Fp(input_string)p Fv(.)275 2866 y(The)28 b(return)f(v)-5 b(alue)28 b(of)h(these)g(routines)e(is)h Fp(FFTW_SUCCESS)d Fv(if)i(the)i(wisdom)e(w)m(as)i(read)f(successfully)-8 b(,)150 2976 y(and)36 b Fp(FFTW_FAILURE)d Fv(otherwise.)58 b(Note)38 b(that,)g(in)d(all)h(of)g(these)h(functions,)g(an)m(y)f(data) h(in)e(the)i(input)150 3085 y(stream)29 b(past)g(the)g(end)f(of)h(the)g Fp(wisdom)e Fv(data)i(is)f(simply)f(ignored)g(\(it)i(is)f(not)h(ev)m (en)g(read)g(if)f(the)h Fp(wisdom)150 3195 y Fv(data)i(is)e(w)m (ell-formed\).)150 3420 y Fh(3.6.3)63 b(F)-10 b(orgetting)41 b(Wisdom)390 3582 y Fp(#include)46 b()390 3790 y(void)h(fftw_forget_wisdom\(void)o(\);)275 3925 y Fv(Calling)39 b Fp(fftw_forget_wisdom)d Fv(causes)42 b(all)e(accum)m(ulated)i Fp(wisdom)e Fv(to)i(b)s(e)f(discarded)f(and)h(its)150 4035 y(asso)s(ciated)30 b(memory)f(to)h(b)s(e)e(freed.)40 b(\(New)30 b Fp(wisdom)d Fv(can)j(still)d(b)s(e)i(gathered)g(subsequen) m(tly)-8 b(,)29 b(ho)m(w)m(ev)m(er.\))150 4293 y Fu(3.7)68 b(Memory)45 b(Allo)t(cator)h(Reference)390 4455 y Fp(#include)g ()390 4663 y(void)h(*\(*fftw_malloc_hook\))42 b(\(size_t)k(n\);)390 4767 y(void)h(\(*fftw_free_hook\))c(\(void)j (*p\);)275 4902 y Fv(Whenev)m(er)21 b(it)e(has)i(to)g(allo)s(cate)f (and)g(release)h(memory)-8 b(,)23 b(FFTW)e(ordinarily)c(calls)i Fp(malloc)g Fv(and)h Fp(free)p Fv(.)150 5011 y(If)25 b Fp(malloc)e Fv(fails,)i(FFTW)h(prin)m(ts)e(an)h(error)g(message)h (and)f(exits.)39 b(This)23 b(b)s(eha)m(vior)h(ma)m(y)i(b)s(e)f (undesirable)150 5121 y(in)i(some)i(applications.)38 b(Also,)29 b(sp)s(ecial)e(memory-handling)f(functions)h(ma)m(y)i(b)s(e) e(necessary)i(in)e(certain)150 5230 y(en)m(vironmen)m(ts.)66 b(Consequen)m(tly)-8 b(,)41 b(FFTW)f(pro)m(vides)e(means)h(b)m(y)g (whic)m(h)e(y)m(ou)j(can)f(install)e(y)m(our)i(o)m(wn)150 5340 y(memory)k(allo)s(cator)g(and)g(tak)m(e)i(whatev)m(er)e (error-correcting)h(action)f(y)m(ou)h(\014nd)d(appropriate.)78 b(The)p eop end %%Page: 36 38 TeXDict begin 36 37 bop 150 -116 a Fv(36)3232 b(FFTW)150 299 y(v)-5 b(ariables)31 b Fp(fftw_malloc_hook)d Fv(and)k Fp(fftw_free_hook)d Fv(are)k(p)s(oin)m(ters)e(to)i(functions,)f(and)g (they)h(are)150 408 y(normally)c Fp(NULL)p Fv(.)42 b(If)31 b(y)m(ou)h(set)g(those)f(v)-5 b(ariables)30 b(to)i(p)s(oin)m(t)e(to)i (other)g(functions,)e(then)h(FFTW)h(will)c(use)150 518 y(y)m(our)h(routines)e(instead)h(of)h Fp(malloc)d Fv(and)i Fp(free)p Fv(.)39 b Fp(fftw_malloc_hook)25 b Fv(m)m(ust)j(p)s(oin)m(t)g (to)h(a)g Fp(malloc)p Fv(-lik)m(e)150 628 y(function,)g(and)h Fp(fftw_free_hook)d Fv(m)m(ust)j(p)s(oin)m(t)f(to)i(a)g Fp(free)p Fv(-lik)m(e)e(function.)150 885 y Fu(3.8)68 b(Thread)45 b(safet)l(y)275 1078 y Fv(Users)30 b(writing)e(m)m (ulti-threaded)h(programs)h(m)m(ust)h(concern)f(themselv)m(es)h(with)e (the)i Fq(thread)f(safet)m(y)150 1187 y Fv(of)d(the)g(libraries)d(they) k(use|that)f(is,)g(whether)f(it)h(is)f(safe)h(to)h(call)e(routines)g (in)g(parallel)f(from)h(m)m(ultiple)150 1297 y(threads.)39 b(FFTW)29 b(can)e(b)s(e)g(used)g(in)f(suc)m(h)i(an)f(en)m(vironmen)m (t,)h(but)f(some)h(care)g(m)m(ust)f(b)s(e)g(tak)m(en)i(b)s(ecause)150 1406 y(certain)21 b(parts)f(of)h(FFTW)g(use)g(priv)-5 b(ate)20 b(global)g(v)-5 b(ariables)19 b(to)j(share)e(data)h(b)s(et)m (w)m(een)h(calls.)36 b(In)20 b(particular,)150 1516 y(the)42 b(plan-creation)f(functions)f(share)i(trigonometric)g(tables)f(and)g (accum)m(ulated)h Fp(wisdom)p Fv(.)74 b(\(Users)150 1626 y(should)37 b(note)j(that)f(these)h(commen)m(ts)g(only)e(apply)g(to)h (programs)g(using)f(shared-memory)g(threads.)150 1735 y(P)m(arallelism)k(using)g(MPI)h(or)h(fork)m(ed)g(pro)s(cesses)f(in)m (v)m(olv)m(es)h(a)g(separate)h(address-space)f(and)f(global)150 1845 y(v)-5 b(ariables)29 b(for)h(eac)m(h)i(pro)s(cess,)e(and)g(is)f (not)i(susceptible)d(to)j(problems)e(of)i(this)e(sort.\))275 1979 y(The)c(cen)m(tral)i(restriction)e(of)h(FFTW)h(is)e(that)h(it)g (is)f(not)h(safe)h(to)g(create)g(m)m(ultiple)d(plans)h(in)g(parallel.) 150 2089 y(Y)-8 b(ou)33 b(m)m(ust)e(either)h(create)i(all)c(of)j(y)m (our)f(plans)e(from)i(a)g(single)f(thread,)h(or)g(instead)g(use)f(a)i (semaphore,)150 2198 y(m)m(utex,)h(or)f(other)g(mec)m(hanism)f(to)i (ensure)e(that)i(di\013eren)m(t)e(threads)g(don't)h(attempt)h(to)g (create)g(plans)150 2308 y(at)41 b(the)f(same)h(time.)70 b(The)40 b(same)h(restriction)e(also)h(holds)f(for)h(destruction)f(of)i (plans)e(and)g(imp)s(ort-)150 2418 y(ing/forgetting)31 b Fp(wisdom)p Fv(.)39 b(Once)30 b(created,)i(a)e(plan)f(ma)m(y)i (safely)f(b)s(e)g(used)g(in)f(an)m(y)h(thread.)275 2552 y(The)24 b(actual)h(transform)g(routines)e(in)h(FFTW)i(\()p Fp(fftw_one)p Fv(,)e(etcetera\))k(are)d(re-en)m(tran)m(t)i(and)d (thread-)150 2662 y(safe,)i(so)d(it)g(is)g(\014ne)g(to)h(call)f(them)g (sim)m(ultaneously)f(from)h(m)m(ultiple)e(threads.)38 b(Another)24 b(question)e(arises,)150 2771 y(ho)m(w)m(ev)m(er|is)33 b(it)g(safe)g(to)h(use)e(the)i Fr(same)h(plan)41 b Fv(for)33 b(m)m(ultiple)e(transforms)h(in)f(parallel?)46 b(\(It)34 b(w)m(ould)e(b)s(e)150 2881 y(unsafe)e(if,)h(for)f(example,)i(the)f (plan)e(w)m(ere)j(mo)s(di\014ed)d(in)g(some)j(w)m(a)m(y)f(b)m(y)g(the)g (transform.\))43 b(W)-8 b(e)32 b(address)150 2990 y(this)40 b(question)g(b)m(y)h(de\014ning)e(an)i(additional)e(planner)g(\015ag,) 44 b Fp(FFTW_THREADSAFE)p Fv(.)69 b(When)41 b(included)150 3100 y(in)d(the)i(\015ags)f(for)h(an)m(y)g(of)f(the)h(plan-creation)f (routines,)i Fp(FFTW_THREADSAFE)35 b Fv(guaran)m(tees)41 b(that)f(the)150 3210 y(resulting)28 b(plan)i(will)d(b)s(e)j(read-only) g(and)g(safe)g(to)h(use)f(in)g(parallel)e(b)m(y)i(m)m(ultiple)e (threads.)p eop end %%Page: 37 39 TeXDict begin 37 38 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(37)150 299 y Fs(4)80 b(P)l(arallel)57 b(FFTW)275 569 y Fv(In)46 b(this)g(c)m(hapter)i(w)m(e)f(discuss)f(the)h (use)g(of)g(FFTW)h(in)e(a)h(parallel)f(en)m(vironmen)m(t,)51 b(do)s(cumen)m(t-)150 679 y(ing)41 b(the)h(di\013eren)m(t)f(parallel)f (libraries)f(that)k(w)m(e)f(ha)m(v)m(e)h(pro)m(vided.)74 b(\(Users)42 b(calling)f(FFTW)h(from)g(a)150 789 y(m)m(ulti-threaded)e (program)i(should)e(also)i(consult)f(Section)h(3.8)h([Thread)e(safet)m (y],)46 b(page)d(36.\))76 b(The)150 898 y(FFTW)35 b(pac)m(k)-5 b(age)36 b(curren)m(tly)d(con)m(tains)h(three)h(parallel)d(transform)h (implemen)m(tations)g(that)i(lev)m(erage)150 1008 y(the)c(unipro)s (cessor)d(FFTW)j(co)s(de:)225 1154 y Ft(\017)60 b Fv(The)38 b(\014rst)h(set)g(of)g(routines)f(utilizes)f(shared-memory)h(threads)h (for)f(parallel)f(one-)j(and)e(m)m(ulti-)330 1264 y(dimensional)24 b(transforms)h(of)i(b)s(oth)e(real)h(and)g(complex)g(data.)40 b(An)m(y)27 b(program)f(using)f(FFTW)i(can)330 1374 y(b)s(e)33 b(trivially)e(mo)s(di\014ed)g(to)k(use)e(the)h(m)m(ulti-threaded)e (routines.)49 b(This)32 b(co)s(de)i(can)g(use)f(an)m(y)h(com-)330 1483 y(mon)28 b(threads)g(implemen)m(tation,)f(including)e(POSIX)j (threads.)39 b(\(POSIX)28 b(threads)g(are)h(a)m(v)-5 b(ailable)330 1593 y(on)36 b(most)g(Unix)f(v)-5 b(arian)m(ts,)37 b(including)c(Lin)m(ux.\))56 b(These)36 b(routines)f(are)h(lo)s(cated)g (in)f(the)h Fp(threads)330 1702 y Fv(directory)-8 b(,)31 b(and)e(are)i(do)s(cumen)m(ted)f(in)f(Section)h(4.1)i([Multi-threaded)d (FFTW],)j(page)f(37.)225 1843 y Ft(\017)60 b Fv(The)43 b Fp(mpi)g Fv(directory)g(con)m(tains)h(m)m(ulti-dimensional)39 b(transforms)k(of)h(real)f(and)g(complex)g(data)330 1952 y(for)32 b(parallel)f(mac)m(hines)h(supp)s(orting)e(MPI.)i(It)h(also)f (includes)e(parallel)h(one-dimensional)f(trans-)330 2062 y(forms)g(for)g(complex)h(data.)42 b(The)30 b(main)g(feature)h(of)f (this)g(co)s(de)h(is)e(that)j(it)e(supp)s(orts)f(distributed-)330 2172 y(memory)35 b(transforms,)h(so)f(it)f(runs)g(on)h(ev)m(erything)g (from)f(w)m(orkstation)h(clusters)g(to)g(massiv)m(ely-)330 2281 y(parallel)h(sup)s(ercomputers.)63 b(More)39 b(information)d(on)i (MPI)g(can)h(b)s(e)e(found)g(at)i(the)g(MPI)f(home)330 2391 y(page)d(\()p Fp(http://www.mcs.anl.gov/mpi)o Fv(\).)48 b(The)33 b(FFTW)j(MPI)e(routines)f(are)i(do)s(cumen)m(ted)f(in)330 2500 y(Section)c(4.2)i([MPI)e(FFTW],)i(page)f(40.)225 2641 y Ft(\017)60 b Fv(W)-8 b(e)28 b(also)e(ha)m(v)m(e)i(an)e(exp)s (erimen)m(tal)f(parallel)g(implemen)m(tation)g(written)h(in)f(Cilk,)g (a)i(C-lik)m(e)f(parallel)330 2751 y(language)21 b(dev)m(elop)s(ed)f (at)h(MIT)g(and)f(curren)m(tly)f(a)m(v)-5 b(ailable)20 b(for)h(sev)m(eral)g(SMP)f(platforms.)36 b(F)-8 b(or)22 b(more)330 2860 y(information)27 b(on)h(Cilk)e(see)j(the)f(Cilk)f(home) h(page)h(\()p Fp(http://supertech.lcs.mit.e)o(du/)o(cilk)o Fv(\).)330 2970 y(The)34 b(FFTW)h(Cilk)d(co)s(de)j(can)g(b)s(e)e(found) g(in)g(the)i Fp(cilk)e Fv(directory)-8 b(,)36 b(with)d(parallelized)f (one-)j(and)330 3079 y(m)m(ulti-dimensional)h(transforms)j(of)h (complex)g(data.)69 b(The)40 b(Cilk)e(FFTW)i(routines)f(are)h(do)s(cu-) 330 3189 y(men)m(ted)31 b(in)e Fp(cilk/README)p Fv(.)150 3477 y Fu(4.1)68 b(Multi-threaded)46 b(FFTW)275 3681 y Fv(In)28 b(this)h(section)h(w)m(e)g(do)s(cumen)m(t)g(the)f(parallel)f (FFTW)j(routines)d(for)i(shared-memory)f(threads)g(on)150 3791 y(SMP)k(hardw)m(are.)49 b(These)33 b(routines,)h(whic)m(h)e(supp)s (ort)f(parallel)h(one-)i(and)f(m)m(ulti-dimensional)c(trans-)150 3901 y(forms)39 b(of)h(b)s(oth)f(real)g(and)g(complex)g(data,)k(are)d (the)g(easiest)g(w)m(a)m(y)g(to)h(tak)m(e)g(adv)-5 b(an)m(tage)41 b(of)f(m)m(ultiple)150 4010 y(pro)s(cessors)28 b(with)f(FFTW.)i(They)f (w)m(ork)g(just)g(lik)m(e)g(the)g(corresp)s(onding)e(unipro)s(cessor)h (transform)g(rou-)150 4120 y(tines,)35 b(except)h(that)f(they)g(tak)m (e)h(the)e(n)m(um)m(b)s(er)g(of)g(parallel)f(threads)h(to)h(use)g(as)f (an)h(extra)g(parameter.)150 4229 y(An)m(y)30 b(program)g(that)g(uses)f (the)h(unipro)s(cessor)e(FFTW)j(can)f(b)s(e)f(trivially)e(mo)s (di\014ed)h(to)j(use)e(the)h(m)m(ulti-)150 4339 y(threaded)g(FFTW.)150 4587 y Fh(4.1.1)63 b(Installation)40 b(and)h(Supp)s(orted)i(Hardw)m (are/Soft)m(w)m(are)275 4792 y Fv(All)38 b(of)h(the)h(FFTW)g(threads)f (co)s(de)g(is)g(lo)s(cated)h(in)e(the)h Fp(threads)f Fv(sub)s(directory)f(of)j(the)f(FFTW)150 4902 y(pac)m(k)-5 b(age.)82 b(On)43 b(Unix)g(systems,)k(the)d(FFTW)g(threads)f(libraries) e(and)i(header)g(\014les)g(can)h(b)s(e)f(auto-)150 5011 y(matically)32 b(con\014gured,)i(compiled,)f(and)g(installed)e(along)i (with)f(the)i(unipro)s(cessor)d(FFTW)j(libraries)150 5121 y(simply)22 b(b)m(y)j(including)c Fp(--enable-threads)g Fv(in)i(the)i(\015ags)g(to)h(the)f Fp(configure)d Fv(script)i(\(see)h (Section)g(6.1)150 5230 y([Installation)34 b(on)i(Unix],)g(page)g (55\).)58 b(\(Note)37 b(also)f(that)g(the)g(threads)f(routines,)h(when) e(enabled,)j(are)150 5340 y(automatically)30 b(tested)h(b)m(y)g(the)f (`)p Fp(make)47 b(check)p Fv(')29 b(self-tests.\))p eop end %%Page: 38 40 TeXDict begin 38 39 bop 150 -116 a Fv(38)3232 b(FFTW)275 299 y(The)25 b(threads)h(routines)f(require)g(y)m(our)h(op)s(erating)g (system)g(to)h(ha)m(v)m(e)g(some)g(sort)f(of)g(shared-memory)150 408 y(threads)d(supp)s(ort.)37 b(Sp)s(eci\014cally)-8 b(,)23 b(the)h(FFTW)h(threads)e(pac)m(k)-5 b(age)26 b(w)m(orks)e(with)e (POSIX)h(threads)h(\(a)m(v)-5 b(ail-)150 518 y(able)27 b(on)g(most)h(Unix)f(v)-5 b(arian)m(ts,)28 b(including)c(Lin)m(ux\),)j (Solaris)f(threads,)i(BeOS)f(\()p Fp(http://www.be.com)p Fv(\))150 628 y(threads)i(\(tested)i(on)f(BeOS)g(DR8.2\),)h(Mac)m(h)g (C)f(threads)f(\(rep)s(orted)g(to)i(w)m(ork)f(b)m(y)f(users\),)h(and)f (Win32)150 737 y(threads)45 b(\(rep)s(orted)f(to)i(w)m(ork)f(b)m(y)g (users\).)83 b(\(There)45 b(is)f(also)h(un)m(tested)g(co)s(de)g(to)h (use)f(MacOS)g(MP)150 847 y(threads.\))40 b(W)-8 b(e)31 b(also)e(supp)s(ort)e(using)h(Op)s(enMP)f(\()p Fp (http://www.openmp.org)p Fv(\))d(or)29 b(SGI)g(MP)g(compiler)150 956 y(directiv)m(es)c(to)h(launc)m(h)f(threads,)h(enabled)f(b)m(y)g (using)f Fp(--with-openmp)e Fv(or)j Fp(--with-sgimp)e Fv(in)h(addition)150 1066 y(to)33 b Fp(--enable-threads)p Fv(.)42 b(This)30 b(is)h(esp)s(ecially)g(useful)f(if)h(y)m(ou)i(are)g (emplo)m(ying)e(that)i(sort)f(of)g(directiv)m(e)150 1176 y(in)k(y)m(our)i(o)m(wn)f(co)s(de,)j(in)c(order)h(to)h(minimize)d (con\015icts.)62 b(If)37 b(y)m(ou)h(ha)m(v)m(e)g(a)g(shared-memory)f (mac)m(hine)150 1285 y(that)32 b(uses)f(a)g(di\013eren)m(t)g(threads)g (API,)h(it)e(should)g(b)s(e)g(a)i(simple)d(matter)k(of)e(programming)f (to)i(include)150 1395 y(supp)s(ort)d(for)h(it;)g(see)h(the)f(\014le)g Fp(fftw_threads-int.h)25 b Fv(for)30 b(more)h(detail.)275 1535 y(SMP)i(hardw)m(are)h(is)f(not)i(required,)e(although)h(of)g (course)h(y)m(ou)f(need)g(m)m(ultiple)e(pro)s(cessors)i(to)h(get)150 1645 y(an)m(y)c(b)s(ene\014t)e(from)h(the)h(m)m(ultithreaded)d (transforms.)150 1881 y Fh(4.1.2)63 b(Usage)41 b(of)g(Multi-threaded)g (FFTW)275 2080 y Fv(Here,)28 b(it)e(is)f(assumed)h(that)h(the)g(reader) f(is)g(already)g(familiar)e(with)h(the)i(usage)g(of)f(the)h(unipro)s (cessor)150 2190 y(FFTW)39 b(routines,)h(describ)s(ed)d(elsewhere)h(in) f(this)h(man)m(ual.)65 b(W)-8 b(e)39 b(only)f(describ)s(e)f(what)i(one) g(has)f(to)150 2299 y(c)m(hange)32 b(in)d(order)g(to)j(use)e(the)g(m)m (ulti-threaded)f(routines.)275 2440 y(First,)i(instead)f(of)h (including)d Fp()h Fv(or)i Fp()p Fv(,)e(y)m(ou)j (should)d(include)g(the)i(\014les)g Fp()d Fv(or)i Fp()p Fv(,)c(resp)s(ectiv)m (ely)-8 b(.)275 2690 y(Second,)30 b(b)s(efore)g(calling)f(an)m(y)h (FFTW)i(routines,)d(y)m(ou)i(should)d(call)i(the)g(function:)390 2825 y Fp(int)47 b(fftw_threads_init\(void\);)275 2966 y Fv(This)38 b(function,)j(whic)m(h)e(should)e(only)i(b)s(e)h(called)f (once)i(\(probably)d(in)h(y)m(our)g Fp(main\(\))g Fv(function\),)150 3075 y(p)s(erforms)g(an)m(y)i(one-time)g(initialization)c(required)i (to)i(use)g(threads)f(on)g(y)m(our)h(system.)71 b(It)41 b(returns)150 3185 y(zero)36 b(if)e(successful,)h(and)f(a)h(non-zero)h (v)-5 b(alue)34 b(if)g(there)h(w)m(as)g(an)g(error)g(\(in)f(whic)m(h)f (case,)38 b(something)c(is)150 3294 y(seriously)28 b(wrong)i(and)g(y)m (ou)h(should)d(probably)h(exit)h(the)h(program\).)275 3435 y(Third,)38 b(when)g(y)m(ou)h(w)m(an)m(t)h(to)f(actually)g (compute)g(the)g(transform,)h(y)m(ou)f(should)e(use)i(one)g(of)g(the) 150 3545 y(follo)m(wing)29 b(transform)h(routines)f(instead)g(of)i(the) f(ordinary)f(FFTW)i(functions:)390 3680 y Fp(fftw_threads\(nthreads,)42 b(plan,)k(howmany,)g(in,)h(istride,)1010 3783 y(idist,)g(out,)f (ostride,)g(odist\);)390 3991 y(fftw_threads_one\(nthread)o(s,)c(plan,) k(in,)h(out\);)390 4198 y(fftwnd_threads\(nthreads,)41 b(plan,)47 b(howmany,)e(in,)i(istride,)1106 4302 y(idist,)f(out,)h (ostride,)e(odist\);)390 4510 y(fftwnd_threads_one\(nthre)o(ads,)c (plan,)46 b(in,)h(out\);)390 4717 y(rfftw_threads\(nthreads,)41 b(plan,)47 b(howmany,)e(in,)i(istride,)1058 4821 y(idist,)f(out,)h (ostride,)e(odist\);)390 5029 y(rfftw_threads_one\(nthrea)o(ds,)c (plan,)47 b(in,)g(out\);)390 5236 y(rfftwnd_threads_real_to_)o(comp)o (lex\()o(nth)o(read)o(s,)42 b(plan,)k(howmany,)f(in,)1917 5340 y(istride,)h(idist,)g(out,)h(ostride,)e(odist\);)p eop end %%Page: 39 41 TeXDict begin 39 40 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(39)390 403 y Fp (rfftwnd_threads_one_real)o(_to_)o(comp)o(lex)o(\(nth)o(read)o(s,)41 b(plan,)47 b(in,)g(out\);)390 610 y(rfftwnd_threads_complex_)o(to_r)o (eal\()o(nth)o(read)o(s,)42 b(plan,)k(howmany,)f(in,)1917 714 y(istride,)h(idist,)g(out,)h(ostride,)e(odist\);)390 922 y(rfftwnd_threads_one_real)o(_to_)o(comp)o(lex)o(\(nth)o(read)o(s,) c(plan,)47 b(in,)g(out\);)390 1129 y(rfftwnd_threads_one_comp)o(lex_)o (to_r)o(eal)o(\(nth)o(read)o(s,)41 b(plan,)47 b(in,)g(out\);)275 1263 y Fv(All)27 b(of)h(these)h(routines)f(tak)m(e)i(exactly)f(the)g (same)g(argumen)m(ts)g(and)f(ha)m(v)m(e)i(exactly)f(the)g(same)g (e\013ects)150 1373 y(as)j(their)f(unipro)s(cessor)e(coun)m(terparts)k (\(i.e.)45 b(without)31 b(the)h(`)p Fp(_threads)p Fv('\))e Fr(exc)-5 b(ept)41 b Fv(that)32 b(they)g(tak)m(e)i(one)150 1482 y(extra)i(parameter,)h Fp(nthreads)c Fv(\(of)j(t)m(yp)s(e)f Fp(int)p Fv(\),)h(b)s(efore)f(the)g(normal)g(parameters.)3084 1449 y Fo(1)3176 1482 y Fv(The)g Fp(nthreads)150 1592 y Fv(parameter)21 b(sp)s(eci\014es)e(the)i(n)m(um)m(b)s(er)e(of)i (threads)g(of)f(execution)h(to)g(use)g(when)e(p)s(erforming)g(the)i (transform)150 1701 y(\(actually)-8 b(,)31 b(the)g(maxim)m(um)e(n)m(um) m(b)s(er)g(of)h(threads\).)275 1835 y(F)-8 b(or)31 b(example,)f(to)i (parallelize)c(a)j(single)e(one-dimensional)g(transform)g(of)i(complex) f(data,)i(instead)150 1945 y(of)53 b(calling)e(the)i(unipro)s(cessor)e Fp(fftw_one\(plan,)27 b(in,)i(out\))p Fv(,)58 b(y)m(ou)53 b(w)m(ould)e(call)i Fp(fftw_threads_)150 2055 y(one\(nthreads,)27 b(plan,)i(in,)g(out\))p Fv(.)47 b(P)m(assing)33 b(an)f Fp(nthreads)f Fv(of)i Fp(1)f Fv(means)h(to)h(use)e(only)g(one)h(thread) 150 2164 y(\(the)51 b(main)d(thread\),)56 b(and)49 b(is)g(equiv)-5 b(alen)m(t)50 b(to)g(calling)f(the)h(unipro)s(cessor)e(routine.)98 b(P)m(assing)50 b(an)150 2274 y Fp(nthreads)32 b Fv(of)j Fp(2)g Fv(means)f(that)h(the)g(transform)f(is)g(p)s(oten)m(tially)f (parallelized)g(o)m(v)m(er)j(t)m(w)m(o)g(threads)e(\(and)150 2383 y(t)m(w)m(o)e(pro)s(cessors,)e(if)f(y)m(ou)i(ha)m(v)m(e)g(them\),) g(and)f(so)h(on.)275 2517 y(These)36 b(are)i(the)f(only)f(c)m(hanges)j (y)m(ou)e(need)g(to)h(mak)m(e)g(to)g(y)m(our)f(source)g(co)s(de.)61 b(Calls)36 b(to)i(all)e(other)150 2627 y(FFTW)46 b(routines)e(\(plan)g (creation,)49 b(destruction,)f(wisdom,)f(etcetera\))h(are)e(not)f (parallelized)e(and)150 2736 y(remain)32 b(the)h(same.)49 b(\(The)33 b(same)h(plans)d(and)h(wisdom)g(are)h(used)g(b)m(y)f(b)s (oth)h(unipro)s(cessor)e(and)h(m)m(ulti-)150 2846 y(threaded)37 b(transforms.\))63 b(Y)-8 b(our)38 b(arra)m(ys)g(are)g(allo)s(cated)g (and)f(formatted)i(in)d(the)i(same)g(w)m(a)m(y)-8 b(,)42 b(and)37 b(so)150 2956 y(on.)275 3090 y(Programs)28 b(using)f(the)i (parallel)d(complex)j(transforms)e(should)g(b)s(e)h(link)m(ed)f(with)g Fp(-lfftw_threads)150 3199 y(-lfftw)i(-lm)37 b Fv(on)h(Unix.)63 b(Programs)38 b(using)f(the)h(parallel)f(real)h(transforms)f(should)f (b)s(e)i(link)m(ed)e(with)150 3309 y Fp(-lrfftw_threads)26 b(-lfftw_threads)h(-lrfftw)h(-lfftw)h(-lm)p Fv(.)55 b(Y)-8 b(ou)36 b(will)c(also)k(need)f(to)h(link)d(with)150 3418 y(whatev)m(er)e(library)d(is)i(resp)s(onsible)d(for)j(threads)g(on)g(y) m(our)h(system)f(\(e.g.)42 b Fp(-lpthread)28 b Fv(on)i(Lin)m(ux\).)150 3641 y Fh(4.1.3)63 b(Ho)m(w)40 b(Man)m(y)h(Threads)g(to)g(Use?)275 3833 y Fv(There)31 b(is)h(a)h(fair)e(amoun)m(t)i(of)g(o)m(v)m(erhead)g (in)m(v)m(olv)m(ed)f(in)g(spa)m(wning)f(and)g(sync)m(hronizing)g (threads,)i(so)150 3943 y(the)d(optimal)f(n)m(um)m(b)s(er)g(of)h (threads)f(to)i(use)e(dep)s(ends)f(up)s(on)h(the)h(size)g(of)g(the)g (transform)f(as)h(w)m(ell)f(as)h(on)150 4052 y(the)h(n)m(um)m(b)s(er)e (of)h(pro)s(cessors)g(y)m(ou)h(ha)m(v)m(e.)275 4186 y(As)d(a)g(general) h(rule,)e(y)m(ou)i(don't)f(w)m(an)m(t)h(to)g(use)f(more)h(threads)f (than)g(y)m(ou)g(ha)m(v)m(e)i(pro)s(cessors.)39 b(\(Using)150 4296 y(more)c(threads)g(will)d(w)m(ork,)37 b(but)d(there)h(will)d(b)s (e)j(extra)g(o)m(v)m(erhead)i(with)c(no)i(b)s(ene\014t.\))54 b(In)34 b(fact,)k(if)c(the)150 4405 y(problem)29 b(size)h(is)f(to)s(o)j (small,)d(y)m(ou)h(ma)m(y)h(w)m(an)m(t)h(to)f(use)f(few)m(er)g(threads) g(than)g(y)m(ou)h(ha)m(v)m(e)h(pro)s(cessors.)275 4539 y(Y)-8 b(ou)42 b(will)d(ha)m(v)m(e)k(to)f(exp)s(erimen)m(t)f(with)g(y)m (our)g(system)h(to)h(see)f(what)g(lev)m(el)f(of)h(parallelization)e(is) 150 4649 y(b)s(est)31 b(for)f(y)m(our)h(problem)f(size.)42 b(Useful)30 b(to)s(ols)h(to)g(help)f(y)m(ou)h(do)g(this)f(are)h(the)g (test)h(programs)f(that)h(are)150 4759 y(automatically)i(compiled)e (along)i(with)f(the)h(threads)g(libraries,)e Fp(fftw_threads_test)d Fv(and)34 b Fp(rfftw_)150 4868 y(threads_test)25 b Fv(\(in)i(the)h Fp(threads)f Fv(sub)s(directory\).)38 b(These)28 b(tak)m(e)h(the)g (same)f(argumen)m(ts)h(as)f(the)h(other)p 150 4967 1200 4 v 199 5034 a Fo(1)275 5066 y Fj(There)35 b(is)g(one)g(exception:)52 b(when)35 b(p)r(erforming)g(one-dimensional)g(in-place)g(transforms,)i (the)e Fi(out)g Fj(parameter)f(is)275 5157 y(alw)n(a)n(ys)26 b(ignored)g(b)n(y)e(the)h(m)n(ulti-threaded)e(routines,)j(instead)g(of) g(b)r(eing)f(used)g(as)h(a)g(w)n(orkspace)g(if)g(it)f(is)h(non-)p Fi(NULL)f Fj(as)275 5249 y(in)f(the)g(unipro)r(cessor)i(routines.)35 b(The)25 b(m)n(ulti-threaded)d(routines)j(alw)n(a)n(ys)h(allo)r(cate)h (their)d(o)n(wn)h(w)n(orkspace)h(\(the)e(size)275 5340 y(of)i(whic)n(h)g(dep)r(ends)f(up)r(on)g(the)g(n)n(um)n(b)r(er)f(of)i (threads\).)p eop end %%Page: 40 42 TeXDict begin 40 41 bop 150 -116 a Fv(40)3232 b(FFTW)150 299 y(FFTW)25 b(test)f(programs)g(\(see)h Fp(tests/README)p Fv(\),)d(except)j(that)g(they)f(also)g(tak)m(e)h(the)g(n)m(um)m(b)s(er) d(of)i(threads)150 408 y(to)31 b(use)f(as)h(a)g(\014rst)e(argumen)m(t,) i(and)f(rep)s(ort)g(the)g(parallel)f(sp)s(eedup)f(in)h(sp)s(eed)h (tests.)41 b(F)-8 b(or)32 b(example,)390 542 y Fp(fftw_threads_test)43 b(2)48 b(-s)f(128x128)275 681 y Fv(will)28 b(b)s(enc)m(hmark)j(complex) g(128x128)j(transforms)d(using)f(t)m(w)m(o)i(threads)f(and)g(rep)s(ort) g(the)h(sp)s(eedup)150 790 y(relativ)m(e)e(to)i(the)e(unipro)s(cessor)e (transform.)275 929 y(F)-8 b(or)40 b(instance,)i(on)d(a)h(4-pro)s (cessor)g(200MHz)i(P)m(en)m(tium)d(Pro)h(system)g(running)c(Lin)m(ux)i (2.2.0,)44 b(w)m(e)150 1039 y(found)32 b(that)j(the)f Fp(")p Fv(crosso)m(v)m(er)p Fp(")h Fv(p)s(oin)m(t)d(at)j(whic)m(h)d(2)i (threads)g(b)s(ecame)g(b)s(ene\014cial)e(for)h(complex)h(trans-)150 1148 y(forms)c(w)m(as)h(ab)s(out)f(4k)g(p)s(oin)m(ts,)g(while)e(4)j (threads)f(b)s(ecame)h(b)s(ene\014cial)d(at)j(8k)g(p)s(oin)m(ts.)150 1381 y Fh(4.1.4)63 b(Using)42 b(Multi-threaded)f(FFTW)h(in)f(a)f (Multi-threaded)i(Program)275 1578 y Fv(It)29 b(is)f(p)s(erfectly)h(p)s (ossible)d(to)k(use)f(the)h(m)m(ulti-threaded)e(FFTW)i(routines)e(from) h(a)g(m)m(ulti-threaded)150 1688 y(program)c(\(e.g.)41 b(ha)m(v)m(e)27 b(m)m(ultiple)c(threads)i(computing)g(m)m (ulti-threaded)f(transforms)h(sim)m(ultaneously\).)150 1798 y(If)k(y)m(ou)g(ha)m(v)m(e)i(the)e(pro)s(cessors,)g(more)g(p)s(o)m (w)m(er)h(to)g(y)m(ou!)40 b(Ho)m(w)m(ev)m(er,)32 b(the)d(same)h (restrictions)e(apply)g(as)h(for)150 1907 y(the)k(unipro)s(cessor)d (FFTW)j(routines)e(\(see)i(Section)f(3.8)i([Thread)d(safet)m(y],)k (page)e(36\).)48 b(In)31 b(particular,)150 2017 y(y)m(ou)g(should)d (recall)i(that)h(y)m(ou)f(ma)m(y)h(not)g(create)h(or)e(destro)m(y)h (plans)e(in)g(parallel.)150 2250 y Fh(4.1.5)63 b(Tips)42 b(for)e(Optimal)h(Threading)275 2447 y Fv(Not)34 b(all)f(transforms)g (are)h(equally)e(w)m(ell-parallelized)f(b)m(y)i(the)h(m)m (ulti-threaded)e(FFTW)j(routines.)150 2556 y(\(This)20 b(is)h(merely)g(a)h(consequence)h(of)e(laziness)g(on)h(the)g(part)f(of) h(the)g(implemen)m(tors,)g(and)f(is)g(not)h(inheren)m(t)150 2666 y(to)38 b(the)g(algorithms)f(emplo)m(y)m(ed.\))63 b(Mainly)-8 b(,)39 b(the)f(limitations)e(are)i(in)e(the)i(parallel)e (one-dimensional)150 2776 y(transforms.)k(The)30 b(things)f(to)i(a)m(v) m(oid)g(if)e(y)m(ou)i(w)m(an)m(t)g(optimal)f(parallelization)e(are)j (as)f(follo)m(ws:)150 3009 y Fh(4.1.6)63 b(P)m(arallelization)39 b(de\014ciencies)i(in)h(one-dimensional)g(transforms)225 3176 y Ft(\017)60 b Fv(Large)24 b(prime)f(factors)h(can)g(sometimes)g (parallelize)e(p)s(o)s(orly)-8 b(.)37 b(Of)24 b(course,)h(y)m(ou)f (should)e(a)m(v)m(oid)i(these)330 3286 y(an)m(yw)m(a)m(y)32 b(if)d(y)m(ou)i(w)m(an)m(t)g(high)e(p)s(erformance.)225 3423 y Ft(\017)60 b Fv(Single)31 b(in-place)g(transforms)h(don't)g (parallelize)f(completely)-8 b(.)47 b(\(Multiple)30 b(in-place)i (transforms,)330 3532 y(i.e.)40 b Fp(howmany)28 b(>)j(1)p Fv(,)e(are)g(\014ne.\))40 b(Again,)29 b(y)m(ou)h(should)c(a)m(v)m(oid)k (these)f(in)f(an)m(y)h(case)h(if)e(y)m(ou)h(w)m(an)m(t)h(high)330 3642 y(p)s(erformance,)g(as)h(they)f(require)f(transforming)g(to)i(a)g (scratc)m(h)g(arra)m(y)g(and)f(cop)m(ying)g(bac)m(k.)225 3779 y Ft(\017)60 b Fv(Single)33 b(real-complex)i(\()p Fp(rfftw)p Fv(\))f(transforms)g(don't)h(parallelize)e(completely)-8 b(.)54 b(This)33 b(is)h(unfortu-)330 3888 y(nate,)41 b(but)d(parallelizing)d(this)i(correctly)i(w)m(ould)e(ha)m(v)m(e)j(in)m (v)m(olv)m(ed)e(a)g(lot)g(of)h(extra)g(co)s(de)f(\(and)h(a)330 3998 y(m)m(uc)m(h)31 b(larger)g(library\).)42 b(Y)-8 b(ou)32 b(still)d(get)j(some)g(b)s(ene\014t)e(from)h(additional)e(pro)s (cessors,)j(but)e(if)h(y)m(ou)330 4107 y(ha)m(v)m(e)25 b(a)g(v)m(ery)g(large)f(n)m(um)m(b)s(er)f(of)i(pro)s(cessors)e(y)m(ou)i (will)c(probably)i(b)s(e)h(b)s(etter)g(o\013)h(using)d(the)j(parallel) 330 4217 y(complex)35 b(\()p Fp(fftw)p Fv(\))h(transforms.)55 b(Note)37 b(that)g(m)m(ulti-dimensional)31 b(real)36 b(transforms)f(or)g(m)m(ultiple)330 4326 y(one-dimensional)28 b(real)i(transforms)g(are)g(\014ne.)150 4595 y Fu(4.2)68 b(MPI)44 b(FFTW)275 4792 y Fv(This)38 b(section)i(describ)s(es)f(the)h (MPI)g(FFTW)h(routines)e(for)h(distributed-memory)d(\(and)j(shared-)150 4902 y(memory\))h(mac)m(hines)f(supp)s(orting)e(MPI)i(\(Message)j(P)m (assing)d(In)m(terface\).)73 b(The)40 b(MPI)g(routines)g(are)150 5011 y(signi\014can)m(tly)35 b(di\013eren)m(t)i(from)f(the)h(ordinary)e (FFTW)j(b)s(ecause)f(the)g(transform)f(data)i(here)f(are)g Fr(dis-)150 5121 y(tribute)-5 b(d)49 b Fv(o)m(v)m(er)41 b(m)m(ultiple)c(pro)s(cesses,)k(so)e(that)h(eac)m(h)g(pro)s(cess)f (gets)h(only)e(a)i(p)s(ortion)e(of)h(the)g(arra)m(y)-8 b(.)150 5230 y(Curren)m(tly)g(,)43 b(m)m(ulti-dimensional)38 b(transforms)i(of)i(b)s(oth)f(real)g(and)g(complex)g(data,)k(as)d(w)m (ell)f(as)g(one-)150 5340 y(dimensional)28 b(transforms)h(of)i(complex) f(data,)h(are)g(supp)s(orted.)p eop end %%Page: 41 43 TeXDict begin 41 42 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(41)150 299 y Fh(4.2.1)63 b(MPI)41 b(FFTW)g(Installation)275 494 y Fv(The)25 b(FFTW)i(MPI)e (library)f(co)s(de)i(is)f(all)g(lo)s(cated)h(in)e(the)j Fp(mpi)e Fv(sub)s(directo)m(y)f(of)i(the)g(FFTW)h(pac)m(k)-5 b(age)150 604 y(\(along)26 b(with)e(source)h(co)s(de)h(for)f(test)i (programs\).)39 b(On)24 b(Unix)g(systems,)j(the)f(FFTW)g(MPI)f (libraries)e(and)150 713 y(header)j(\014les)f(can)i(b)s(e)e (automatically)h(con\014gured,)h(compiled,)f(and)f(installed)f(along)j (with)d(the)j(unipro-)150 823 y(cessor)39 b(FFTW)g(libraries)d(simply)g (b)m(y)i(including)d Fp(--enable-mpi)g Fv(in)i(the)i(\015ags)g(to)g (the)f Fp(configure)150 932 y Fv(script)29 b(\(see)j(Section)e(6.1)h ([Installation)e(on)i(Unix],)e(page)i(55\).)275 1069 y(The)j(only)g(requiremen)m(t)g(of)h(the)g(FFTW)g(MPI)g(co)s(de)g(is)f (that)i(y)m(ou)f(ha)m(v)m(e)h(the)f(standard)f(MPI)h(1.1)150 1179 y(\(or)28 b(later\))g(libraries)d(and)i(header)h(\014les)f (installed)e(on)j(y)m(our)g(system.)40 b(A)28 b(free)g(implemen)m (tation)e(of)i(MPI)150 1288 y(is)h(a)m(v)-5 b(ailable)30 b(from)g(the)h(MPICH)f(home)g(page)h(\()p Fp (http://www-unix.mcs.anl.gov)o(/mp)o(i/mp)o(ich/)o Fv(\).)275 1425 y(Previous)42 b(v)m(ersions)g(of)i(the)f(FFTW)h(MPI)f(routines)f (ha)m(v)m(e)j(had)d(an)h(unfortunate)g(tendency)g(to)150 1535 y(exp)s(ose)i(bugs)f(in)f(MPI)i(implemen)m(tations.)82 b(The)44 b(curren)m(t)g(v)m(ersion)g(has)h(b)s(een)f(largely)g (rewritten,)150 1645 y(and)c(hop)s(efully)e(a)m(v)m(oids)j(some)g(of)g (the)g(problems.)71 b(If)40 b(y)m(ou)h(run)f(in)m(to)g(di\016culties,)h (try)g(passing)f(the)150 1754 y(optional)d(w)m(orkspace)i(to)f Fp(\(r\)fftwnd_mpi)c Fv(\(see)39 b(b)s(elo)m(w\),)h(as)e(this)e(allo)m (ws)i(us)f(to)h(use)g(the)g(standard)150 1864 y(\(and)23 b(hop)s(efully)d(w)m(ell-tested\))k Fp(MPI_Alltoall)c Fv(primitiv)m(e)h(for)h(comm)m(unications.)38 b(Please)23 b(let)g(us)g(kno)m(w)150 1973 y(\()p Fp(fftw@fftw.org)p Fv(\))k(ho)m(w)k(things)e(w)m(ork)i(out.)275 2110 y(Sev)m(eral)36 b(test)h(programs)f(are)g(included)e(in)h(the)h Fp(mpi)f Fv(directory)-8 b(.)59 b(The)35 b(ones)i(most)f(useful)f(to)i(y)m(ou) 150 2220 y(are)25 b(probably)f(the)h Fp(fftw_mpi_test)d Fv(and)i Fp(rfftw_mpi_test)d Fv(programs,)26 b(whic)m(h)e(are)i(run)d (just)i(lik)m(e)f(an)150 2330 y(ordinary)k(MPI)h(program)g(and)f (accept)j(the)f(same)f(parameters)h(as)f(the)h(other)f(FFTW)h(test)g (programs)150 2439 y(\(c.f.)48 b Fp(tests/README)p Fv(\).)c(F)-8 b(or)33 b(example,)g Fp(mpirun)28 b Fr(...p)-5 b(ar)g(ams...)33 b Fp(fftw_mpi_test)27 b(-r)i(0)j Fv(will)e(run)h(non-)150 2549 y(terminating)h(complex-transform)h(correctness)h(tests)g(of)f (random)f(dimensions.)47 b(They)32 b(can)i(also)f(do)150 2658 y(p)s(erformance)d(b)s(enc)m(hmarks.)150 2867 y Fh(4.2.2)63 b(Usage)41 b(of)g(MPI)g(FFTW)g(for)g(Complex)f (Multi-dimensional)464 2991 y(T)-10 b(ransforms)275 3186 y Fv(Usage)41 b(of)g(the)g(MPI)f(FFTW)h(routines)f(is)f(similar)f(to)j (that)h(of)e(the)h(unipro)s(cessor)d(FFTW.)k(W)-8 b(e)150 3296 y(assume)29 b(that)g(the)g(reader)f(already)h(understands)e(the)i (usage)g(of)g(the)g(unipro)s(cessor)d(FFTW)k(routines,)150 3406 y(describ)s(ed)e(elsewhere)i(in)f(this)g(man)m(ual.)40 b(Some)31 b(familiarit)m(y)d(with)h(MPI)h(is)g(also)g(helpful.)275 3543 y(A)39 b(t)m(ypical)h(program)f(p)s(erforming)e(a)j(complex)g(t)m (w)m(o-dimensional)e(MPI)i(transform)f(migh)m(t)g(lo)s(ok)150 3652 y(something)30 b(lik)m(e:)390 3783 y Fp(#include)46 b()390 3991 y(int)h(main\(int)e(argc,)i(char)f(**argv\))390 4095 y({)676 4198 y(const)h(int)g(NX)g(=)g(...,)g(NY)g(=)h(...;)676 4302 y(fftwnd_mpi_plan)c(plan;)676 4406 y(fftw_complex)h(*data;)676 4614 y(MPI_Init\(&argc,&argv\);)676 4821 y(plan)i(=)g (fftw2d_mpi_create_plan\(MPI)o(_COM)o(M_W)o(ORLD)o(,)2108 4925 y(NX,)g(NY,)2108 5029 y(FFTW_FORWARD,)d(FFTW_ESTIMATE\);)676 5236 y(...allocate)h(and)i(initialize)e(data...)p eop end %%Page: 42 44 TeXDict begin 42 43 bop 150 -116 a Fv(42)3232 b(FFTW)676 299 y Fp(fftwnd_mpi\(p,)45 b(1,)i(data,)f(NULL,)g(FFTW_NORMAL_ORDER\);) 676 506 y(...)676 714 y(fftwnd_mpi_destroy_plan\(pl)o(an\))o(;)676 818 y(MPI_Finalize\(\);)390 922 y(})275 1056 y Fv(The)39 b(calls)h(to)h Fp(MPI_Init)d Fv(and)i Fp(MPI_Finalize)d Fv(are)k(required)e(in)g(all)g(MPI)h(programs;)46 b(see)41 b(the)150 1165 y(MPI)33 b(home)h(page)g(\()p Fp (http://www.mcs.anl.gov/mpi)o(/)p Fv(\))28 b(for)33 b(more)g (information.)49 b(Note)34 b(that)g(all)f(of)150 1275 y(y)m(our)39 b(pro)s(cesses)f(run)f(the)i(program)g(in)e(parallel,)i (as)g(a)g(group;)k(there)c(is)e(no)i(explicit)e(launc)m(hing)g(of)150 1384 y(threads/pro)s(cesses)30 b(in)f(an)i(MPI)f(program.)275 1519 y(As)36 b(in)g(the)h(ordinary)e(FFTW,)j(the)f(\014rst)f(thing)g(w) m(e)i(do)f(is)e(to)j(create)h(a)e(plan)e(\(of)j(t)m(yp)s(e)f Fp(fftwnd_)150 1628 y(mpi_plan)p Fv(\),)29 b(using:)390 1757 y Fp(fftwnd_mpi_plan)44 b(fftw2d_mpi_create_plan\()o(MPI_)o(Com)o (m)e(comm,)2251 1860 y(int)47 b(nx,)g(int)g(ny,)2251 1964 y(fftw_direction)d(dir,)j(int)g(flags\);)275 2098 y Fv(Except)29 b(for)g(the)h(\014rst)e(argumen)m(t,)j(the)e(parameters) h(are)f(iden)m(tical)g(to)h(those)f(of)h Fp(fftw2d_create_)150 2208 y(plan)p Fv(.)39 b(\(There)28 b(are)g(also)g(analogous)g Fp(fftwnd_mpi_create_plan)22 b Fv(and)27 b Fp(fftw3d_mpi_create_plan) 150 2317 y Fv(functions.)45 b(T)-8 b(ransforms)31 b(of)h(an)m(y)h(rank) f(greater)h(than)f(one)h(are)f(supp)s(orted.\))45 b(The)32 b(\014rst)f(argumen)m(t)i(is)150 2427 y(an)27 b(MPI)g Fq(comm)m(unicator)p Fv(,)h(whic)m(h)e(sp)s(eci\014es)g(the)h(group)g (of)g(pro)s(cesses)g(that)g(are)h(to)g(b)s(e)e(in)m(v)m(olv)m(ed)h(in)f (the)150 2537 y(transform;)k(the)g(standard)g(constan)m(t)i Fp(MPI_COMM_WORLD)26 b Fv(indicates)j(all)h(a)m(v)-5 b(ailable)29 b(pro)s(cesses.)275 2671 y(Next,)34 b(one)g(has)e(to)i (allo)s(cate)g(and)e(initialize)e(the)j(data.)50 b(This)31 b(is)h(somewhat)h(tric)m(ky)-8 b(,)35 b(b)s(ecause)e(the)150 2780 y(transform)27 b(data)i(is)f(distributed)d(across)k(the)f(pro)s (cesses)g(in)m(v)m(olv)m(ed)g(in)f(the)h(transform.)39 b(It)29 b(is)e(discussed)150 2890 y(in)i(detail)h(b)m(y)g(the)g(next)h (section)f(\(see)i(Section)e(4.2.3)i([MPI)f(Data)h(La)m(y)m(out],)g (page)f(43\).)275 3024 y(The)42 b(actual)i(computation)f(of)g(the)g (transform)g(is)f(p)s(erformed)f(b)m(y)i(the)h(function)d Fp(fftwnd_mpi)p Fv(,)150 3134 y(whic)m(h)29 b(di\013ers)g(somewhat)i (from)f(its)f(unipro)s(cessor)g(equiv)-5 b(alen)m(t)30 b(and)f(is)h(describ)s(ed)e(b)m(y:)390 3262 y Fp(void)47 b(fftwnd_mpi\(fftwnd_mpi_p)o(lan)41 b(p,)1154 3366 y(int)47 b(n_fields,)1154 3470 y(fftw_complex)d(*local_data,)h(fftw_complex)f (*work,)1154 3573 y(fftwnd_mpi_output_order)d(output_order\);)275 3707 y Fv(There)29 b(are)i(sev)m(eral)g(things)e(to)i(notice)g(here:) 225 3842 y Ft(\017)60 b Fv(First)40 b(of)g(all,)i(all)d Fp(fftw_mpi)f Fv(transforms)h(are)i(in-place:)59 b(the)40 b(output)g(is)f(in)g(the)i Fp(local_data)330 3951 y Fv(parameter,)31 b(and)f(there)g(is)g(no)g(need)g(to)h(sp)s(ecify)e Fp(FFTW_IN_PLACE)e Fv(in)i(the)i(plan)e(\015ags.)225 4085 y Ft(\017)60 b Fv(The)32 b(MPI)h(transforms)f(also)h(only)f(supp)s(ort)f(a)j(limited)c (subset)j(of)g(the)g Fp(howmany)p Fv(/)p Fp(stride)p Fv(/)p Fp(dist)330 4195 y Fv(functionalit)m(y)39 b(of)h(the)h(unipro)s (cessor)d(routines:)60 b(the)41 b Fp(n_fields)d Fv(parameter)j(is)e (equiv)-5 b(alen)m(t)40 b(to)330 4305 y Fp(howmany=n_fields)p Fv(,)26 b Fp(stride=n_fields)p Fv(,)h(and)i Fp(dist=1)p Fv(.)39 b(\(Conceptually)-8 b(,)30 b(the)h Fp(n_fields)d Fv(pa-)330 4414 y(rameter)36 b(allo)m(ws)f(y)m(ou)h(to)h(transform)e (an)g(arra)m(y)i(of)f(con)m(tiguous)f(v)m(ectors,)k(eac)m(h)e(with)d (length)i Fp(n_)330 4524 y(fields)p Fv(.\))j Fp(n_fields)28 b Fv(is)i Fp(1)g Fv(if)f(y)m(ou)i(are)g(only)e(transforming)g(a)i (single,)e(ordinary)g(arra)m(y)-8 b(.)225 4658 y Ft(\017)60 b Fv(The)24 b Fp(work)f Fv(parameter)i(is)f(an)g(optional)g(w)m (orkspace.)40 b(If)24 b(it)g(is)f(not)i Fp(NULL)p Fv(,)g(it)f(should)f (b)s(e)g(exactly)j(the)330 4767 y(same)31 b(size)f(as)g(the)g Fp(local_data)e Fv(arra)m(y)-8 b(.)41 b(If)30 b(it)g(is)f(pro)m(vided,) g(FFTW)i(is)e(able)h(to)h(use)f(the)g(built-in)330 4877 y Fp(MPI_Alltoall)i Fv(primitiv)m(e)i(for)i(\(often\))g(greater)h (e\016ciency)f(at)h(the)f(exp)s(ense)f(of)h(extra)g(storage)330 4987 y(space.)225 5121 y Ft(\017)60 b Fv(Finally)-8 b(,)28 b(the)h(last)f(parameter)i(sp)s(eci\014es)d(whether)h(the)h(output)g (data)g(has)g(the)g(same)g(ordering)f(as)330 5230 y(the)c(input)e(data) j(\()p Fp(FFTW_NORMAL_ORDER)p Fv(\),)c(or)j(if)f(it)g(is)g(transp)s (osed)g(\()p Fp(FFTW_TRANSPOSED_ORDER)p Fv(\).)330 5340 y(Lea)m(ving)31 b(the)f(data)h(transp)s(osed)f(results)f(in)g (signi\014can)m(t)g(p)s(erformance)h(impro)m(v)m(emen)m(ts)h(due)e(to)j (a)p eop end %%Page: 43 45 TeXDict begin 43 44 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(43)330 299 y(sa)m(v)m(ed)41 b(comm)m(unication)f(step)g(\(needed)g(to)h(un-transp)s(ose)e(the)h (data\).)71 b(Sp)s(eci\014cally)-8 b(,)40 b(the)h(\014rst)330 408 y(t)m(w)m(o)32 b(dimensions)27 b(of)k(the)g(arra)m(y)g(are)f (transp)s(osed,)g(as)h(is)e(describ)s(ed)g(in)g(more)h(detail)g(b)m(y)g (the)h(next)330 518 y(section.)275 694 y(The)f(output)h(of)h Fp(fftwnd_mpi)d Fv(is)h(iden)m(tical)g(to)i(that)g(of)g(the)f(corresp)s (onding)f(unipro)s(cessor)f(trans-)150 803 y(form.)40 b(In)27 b(particular,)g(y)m(ou)i(should)d(recall)h(our)h(con)m(v)m(en)m (tions)h(for)f(normalization)e(and)i(the)g(sign)f(of)i(the)150 913 y(transform)h(exp)s(onen)m(t.)275 1045 y(The)c(same)i(plan)e(can)i (b)s(e)f(used)f(to)i(compute)g(man)m(y)f(transforms)g(of)g(the)h(same)g (size.)39 b(After)28 b(y)m(ou)g(are)150 1154 y(done)i(with)f(it,)h(y)m (ou)h(should)e(deallo)s(cate)h(it)g(b)m(y)g(calling)f Fp(fftwnd_mpi_destroy_plan)p Fv(.)275 1286 y Fn(Imp)s(ortan)m(t:)40 b Fv(The)30 b(FFTW)h(MPI)e(routines)g(m)m(ust)h(b)s(e)g(called)f(in)f (the)j(same)f(order)f(b)m(y)h(all)f(pro)s(cesses)150 1396 y(in)m(v)m(olv)m(ed)22 b(in)g(the)h(transform.)37 b(Y)-8 b(ou)24 b(should)c(assume)j(that)g(they)g(all)f(are)h(blo)s(c)m (king,)g(as)g(if)f(eac)m(h)i(con)m(tained)150 1505 y(a)31 b(call)e(to)j Fp(MPI_Barrier)p Fv(.)275 1637 y(Programs)25 b(using)f(the)h(FFTW)h(MPI)g(routines)e(should)f(b)s(e)i(link)m(ed)f (with)g Fp(-lfftw_mpi)j(-lfftw)i(-lm)150 1746 y Fv(on)h(Unix,)g(in)f (addition)f(to)j(whatev)m(er)h(libraries)27 b(are)k(required)d(for)j (MPI.)150 1962 y Fh(4.2.3)63 b(MPI)41 b(Data)f(La)m(y)m(out)275 2152 y Fv(The)31 b(transform)f(data)j(used)e(b)m(y)g(the)h(MPI)f(FFTW)i (routines)d(is)h Fq(distributed)t Fv(:)39 b(a)32 b(distinct)e(p)s (ortion)150 2261 y(of)k(it)f(resides)f(with)g(eac)m(h)j(pro)s(cess)e (in)m(v)m(olv)m(ed)g(in)g(the)g(transform.)50 b(This)32 b(allo)m(ws)h(the)g(transform)g(to)i(b)s(e)150 2371 y(parallelized,)23 b(for)h(example,)i(o)m(v)m(er)f(a)g(cluster)f(of)g(w)m(orkstations,)i (eac)m(h)f(with)e(its)h(o)m(wn)g(separate)h(memory)-8 b(,)150 2481 y(so)23 b(that)g(y)m(ou)g(can)g(tak)m(e)h(adv)-5 b(an)m(tage)24 b(of)f(the)g(total)g(memory)f(of)h(all)e(the)i(pro)s (cessors)f(y)m(ou)h(are)g(parallelizing)150 2590 y(o)m(v)m(er.)275 2722 y(In)34 b(particular,)i(the)f(arra)m(y)h(is)f(divided)e(according) i(to)h(the)g(ro)m(ws)f(\(\014rst)g(dimension\))f(of)h(the)h(data:)150 2831 y(eac)m(h)28 b(pro)s(cess)e(gets)i(a)f(subset)f(of)h(the)g(ro)m (ws)f(of)h(the)g(data.)40 b(\(This)26 b(is)f(sometimes)i(called)f(a)h (\\slab)f(decom-)150 2941 y(p)s(osition."\))60 b(One)37 b(consequence)h(of)g(this)e(is)g(that)i(y)m(ou)f(can't)i(tak)m(e)f(adv) -5 b(an)m(tage)40 b(of)d(more)g(pro)s(cessors)150 3051 y(than)23 b(y)m(ou)h(ha)m(v)m(e)g(ro)m(ws)f(\(e.g.)40 b Fp(64x64x64)21 b Fv(matrix)h(can)i(at)g(most)f(use)g(64)h(pro)s (cessors\).)38 b(This)22 b(isn't)g(usually)150 3160 y(m)m(uc)m(h)34 b(of)h(a)f(limitation,)f(ho)m(w)m(ev)m(er,)k(as)e(eac)m(h)g(pro)s (cessor)f(needs)g(a)g(fair)g(amoun)m(t)g(of)h(data)g(in)d(order)i(for) 150 3270 y(the)d(parallel-computation)d(b)s(ene\014ts)i(to)h(out)m(w)m (eigh)m(t)g(the)g(comm)m(unications)f(costs.)275 3401 y(Belo)m(w,)d(the)f(\014rst)g(dimension)d(of)j(the)g(data)h(will)c(b)s (e)j(referred)f(to)i(as)f(`)p Fp(x)p Fv(')g(and)f(the)h(second)h (dimension)150 3511 y(as)k(`)p Fp(y)p Fv('.)275 3643 y(FFTW)43 b(supplies)e(a)i(routine)f(to)i(tell)f(y)m(ou)g(exactly)h(ho) m(w)g(m)m(uc)m(h)f(data)h(resides)e(on)h(the)g(curren)m(t)150 3752 y(pro)s(cess:)390 3878 y Fp(void)k(fftwnd_mpi_local_sizes\()o (fftw)o(nd_)o(mpi_)o(plan)41 b(p,)1726 3982 y(int)47 b(*local_nx,)1726 4086 y(int)g(*local_x_start,)1726 4189 y(int)g(*local_ny_after_transpose)o(,)1726 4293 y(int)g (*local_y_start_after_tran)o(spos)o(e,)1726 4397 y(int)g (*total_local_size\);)275 4529 y Fv(Giv)m(en)39 b(a)h(plan)e Fp(p)p Fv(,)k(the)e(other)g(parameters)f(of)h(this)f(routine)f(are)i (set)g(to)h(v)-5 b(alues)38 b(describing)g(the)150 4638 y(required)29 b(data)i(la)m(y)m(out,)g(describ)s(ed)d(b)s(elo)m(w.)275 4770 y Fp(total_local_size)c Fv(is)k(the)i(n)m(um)m(b)s(er)d(of)i Fp(fftw_complex)d Fv(elemen)m(ts)k(that)f(y)m(ou)h(m)m(ust)f(allo)s (cate)g(for)150 4880 y(y)m(our)e(lo)s(cal)g(data)h(\(and)f(w)m (orkspace,)i(if)d(y)m(ou)h(c)m(ho)s(ose\).)41 b(\(This)26 b(v)-5 b(alue)27 b(should,)f(of)i(course,)g(b)s(e)e(m)m(ultiplied)150 4989 y(b)m(y)k Fp(n_fields)e Fv(if)i(that)h(parameter)g(to)g Fp(fftwnd_mpi)c Fv(is)j(not)g Fp(1)p Fv(.\))275 5121 y(The)e(data)i(on)f(the)g(curren)m(t)g(pro)s(cess)g(has)f Fp(local_nx)f Fv(ro)m(ws,)j(starting)f(at)h(ro)m(w)f Fp(local_x_start)p Fv(.)36 b(If)150 5230 y Fp(fftwnd_mpi)26 b Fv(is)i(called)g(with)g Fp(FFTW_TRANSPOSED_ORDER)23 b Fv(output,)29 b(then)g Fp(y)f Fv(will)f(b)s(e)h(the)h(\014rst)f (dimen-)150 5340 y(sion)d(of)i(the)f(output,)h(and)f(the)h(lo)s(cal)e Fp(y)h Fv(exten)m(t)i(will)c(b)s(e)h(giv)m(en)i(b)m(y)f Fp(local_ny_after_transpose)20 b Fv(and)p eop end %%Page: 44 46 TeXDict begin 44 45 bop 150 -116 a Fv(44)3232 b(FFTW)150 299 y Fp(local_y_start_after_tran)o(spos)o(e)p Fv(.)59 b(Otherwise,)39 b(the)g(output)e(has)i(the)f(same)h(dimensions)d(and) 150 408 y(la)m(y)m(out)31 b(as)g(the)f(input.)275 542 y(F)-8 b(or)24 b(instance,)g(supp)s(ose)e(y)m(ou)i(w)m(an)m(t)g(to)g (transform)f(three-dimensional)e(data)j(of)g(size)f Fp(nx)29 b(x)i(ny)e(x)h(nz)p Fv(.)150 651 y(Then,)c(the)f(curren)m(t)g(pro)s (cess)g(will)e(store)j(a)f(subset)g(of)g(this)g(data,)i(of)e(size)h Fp(local_nx)i(x)i(ny)f(x)h(nz)p Fv(,)c(where)150 761 y(the)d Fp(x)g Fv(indices)e(corresp)s(ond)h(to)h(the)g(range)h Fp(local_x_start)19 b Fv(to)24 b Fp(local_x_start+local_nx-)o(1)17 b Fv(in)22 b(the)150 870 y(\\real")34 b(\(i.e.)50 b(logical\))33 b(arra)m(y)-8 b(.)51 b(If)33 b Fp(fftwnd_mpi)d Fv(is)j(called)f(with)g Fp(FFTW_TRANSPOSED_ORDER)c Fv(output,)150 980 y(then)33 b(the)h(result)e(will)f(b)s(e)i(a)g Fp(ny)d(x)g(nx)g(x)g(nz)j Fv(arra)m(y)-8 b(,)35 b(of)f(whic)m(h)e(a)i Fp(local_ny_after_transpos) o(e)25 b(x)30 b(nx)150 1090 y(x)g(nz)h Fv(subset)g(is)g(stored)h(on)g (the)g(curren)m(t)g(pro)s(cess)f(\(corresp)s(onding)f(to)j Fp(y)e Fv(v)-5 b(alues)31 b(starting)h(at)h Fp(local_)150 1199 y(y_start_after_transpose)p Fv(\).)275 1332 y(The)c(follo)m(wing)g (is)h(an)g(example)g(of)g(allo)s(cating)g(suc)m(h)g(a)h (three-dimensional)d(arra)m(y)i(arra)m(y)h(\()p Fp(local_)150 1442 y(data)p Fv(\))f(b)s(efore)g(the)g(transform)g(and)g(initializing) c(it)k(to)h(some)g(function)e Fp(f\(x,y,z\))p Fv(:)772 1569 y Fp(fftwnd_mpi_local_sizes\(p)o(lan)o(,)42 b(&local_nx,)j (&local_x_start,)1870 1673 y(&local_ny_after_transpo)o(se,)1870 1777 y(&local_y_start_after_tr)o(ans)o(pose)o(,)1870 1881 y(&total_local_size\);)772 2088 y(local_data)g(=)i (\(fftw_complex*\))d(malloc\(sizeof\(fftw_compl)o(ex\))d(*)2490 2192 y(total_local_size\);)772 2399 y(for)47 b(\(x)g(=)g(0;)h(x)f(<)g (local_nx;)f(++x\))1154 2503 y(for)h(\(y)g(=)g(0;)g(y)h(<)f(ny;)g (++y\))1535 2607 y(for)g(\(z)h(=)f(0;)g(z)h(<)f(nz;)g(++z\))1917 2711 y(local_data[\(x*ny)d(+)j(y\)*nz)f(+)i(z])2299 2815 y(=)g(f\(x)e(+)i(local_x_start,)c(y,)j(z\);)275 2948 y Fv(Some)30 b(imp)s(ortan)m(t)g(things)f(to)i(remem)m(b)s(er:)225 3081 y Ft(\017)60 b Fv(Although)26 b(the)i(lo)s(cal)e(data)i(is)e(of)i (dimensions)c Fp(local_nx)k(x)i(ny)g(x)g(nz)d Fv(in)f(the)h(ab)s(o)m(v) m(e)h(example,)g(do)330 3190 y Fr(not)40 b Fv(allo)s(cate)31 b(the)f(arra)m(y)h(to)g(b)s(e)f(of)g(size)h Fp(local_nx*ny*nz)p Fv(.)36 b(Use)31 b Fp(total_local_size)26 b Fv(instead.)225 3324 y Ft(\017)60 b Fv(The)32 b(amoun)m(t)g(of)g(data)h(on)f(eac)m(h)h (pro)s(cess)f(will)d(not)k(necessarily)e(b)s(e)g(the)i(same;)g(in)e (fact,)j Fp(local_)330 3433 y(nx)g Fv(ma)m(y)h(ev)m(en)f(b)s(e)g(zero)h (for)f(some)h(pro)s(cesses.)52 b(\(F)-8 b(or)36 b(example,)f(supp)s (ose)e(y)m(ou)h(are)h(doing)e(a)i Fp(6x6)330 3543 y Fv(transform)f(on)g (four)g(pro)s(cessors.)52 b(There)34 b(is)f(no)h(w)m(a)m(y)i(to)f (e\013ectiv)m(ely)g(use)f(the)h(fourth)e(pro)s(cessor)330 3652 y(in)27 b(a)i(slab)f(decomp)s(osition,)g(so)g(w)m(e)i(lea)m(v)m(e) g(it)e(empt)m(y)-8 b(.)41 b(Pro)s(of)28 b(left)g(as)h(an)f(exercise)h (for)g(the)f(reader.\))225 3786 y Ft(\017)60 b Fv(All)27 b(arra)m(ys)i(are,)g(of)f(course,)i(in)d(ro)m(w-ma)5 b(jor)28 b(order)g(\(see)h(Section)g(2.5)g([Multi-dimensional)c(Arra)m (y)330 3895 y(F)-8 b(ormat],)32 b(page)f(11\).)225 4028 y Ft(\017)60 b Fv(If)27 b(y)m(ou)g(w)m(an)m(t)h(to)g(compute)g(the)f (in)m(v)m(erse)g(transform)g(of)g(the)g(output)g(of)h Fp(fftwnd_mpi)p Fv(,)d(the)i(dimen-)330 4138 y(sions)f(of)i(the)g(in)m (v)m(erse)f(transform)g(are)h(giv)m(en)g(b)m(y)f(the)h(dimensions)d(of) j(the)g(output)f(of)h(the)f(forw)m(ard)330 4247 y(transform.)39 b(F)-8 b(or)27 b(example,)g(if)e(y)m(ou)h(are)h(using)d Fp(FFTW_TRANSPOSED_ORDER)d Fv(output)26 b(in)e(the)j(ab)s(o)m(v)m(e)330 4357 y(example,)j(then)g(the)h(in)m(v)m(erse)f(plan)f(should)g(b)s(e)g (created)j(with)d(dimensions)f Fp(ny)h(x)h(nx)g(x)g(nz)p Fv(.)225 4490 y Ft(\017)60 b Fv(The)35 b(data)h(la)m(y)m(out)h(only)d (dep)s(ends)g(up)s(on)g(the)h(dimensions)e(of)j(the)f(arra)m(y)-8 b(,)38 b(not)e(on)f(the)h(plan,)g(so)330 4600 y(y)m(ou)28 b(are)h(guaran)m(teed)g(that)f(di\013eren)m(t)g(plans)e(for)i(the)g (same)g(size)g(\(or)g(in)m(v)m(erse)g(plans\))f(will)e(use)j(the)330 4709 y(same)j(\(consisten)m(t\))g(data)g(la)m(y)m(outs.)150 4930 y Fh(4.2.4)63 b(Usage)41 b(of)g(MPI)g(FFTW)g(for)g(Real)f (Multi-dimensional)i(T)-10 b(ransforms)275 5121 y Fv(MPI)31 b(transforms)h(sp)s(ecialized)e(for)h(real)h(data)h(are)f(also)g(a)m(v) -5 b(ailable,)32 b(similiar)c(to)33 b(the)f(unipro)s(cessor)150 5230 y Fp(rfftwnd)37 b Fv(transforms.)66 b(Just)39 b(as)g(in)f(the)h (unipro)s(cessor)e(case,)43 b(the)c(real-data)h(MPI)f(functions)e(gain) 150 5340 y(roughly)29 b(a)h(factor)h(of)f(t)m(w)m(o)h(in)e(sp)s(eed)g (\(and)g(sa)m(v)m(e)j(a)e(factor)h(of)f(t)m(w)m(o)h(in)e(space\))i(at)f (the)g(exp)s(ense)g(of)g(more)p eop end %%Page: 45 47 TeXDict begin 45 46 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(45)150 299 y(complicated)34 b(data)i(formats)f(in)e(the)i(calling)f(program.)53 b(Before)36 b(reading)e(this)g(section,)i(y)m(ou)f(should)150 408 y(de\014nitely)27 b(understand)g(ho)m(w)i(to)h(call)e(the)h(unipro)s (cessor)e Fp(rfftwnd)g Fv(functions)g(and)h(also)h(the)g(complex)150 518 y(MPI)h(FFTW)h(functions.)275 689 y(The)26 b(follo)m(wing)f(is)h (an)h(example)g(of)g(a)g(program)g(using)e Fp(rfftwnd_mpi)p Fv(.)37 b(It)27 b(computes)g(the)g(size)g Fp(nx)i(x)150 799 y(ny)h(x)g(nz)g Fv(transform)g(of)h(a)h(real)e(function)g Fp(f\(x,y,z\))p Fv(,)f(m)m(ultiplies)f(the)j(imaginary)e(part)i(b)m(y)g Fp(2)f Fv(for)h(fun,)150 908 y(then)i(computes)g(the)g(in)m(v)m(erse)g (transform.)48 b(\(W)-8 b(e'll)33 b(also)g(use)f Fp (FFTW_TRANSPOSED_ORDER)c Fv(output)k(for)150 1018 y(the)d(transform,)g (and)g(additionally)d(supply)h(the)j(optional)e(w)m(orkspace)i (parameter)g(to)g Fp(rfftwnd_mpi)p Fv(,)150 1127 y(just)g(to)h(add)f(a) g(little)g(spice.\))390 1293 y Fp(#include)46 b()390 1500 y(int)h(main\(int)e(argc,)i(char)f(**argv\))390 1604 y({)629 1708 y(const)g(int)h(nx)g(=)h(...,)e(ny)h(=)h(...,)e(nz)i (=)f(...;)629 1812 y(int)g(local_nx,)e(local_x_start,)f (local_ny_after_transpos)o(e,)820 1915 y(local_y_start_after_tra)o(nsp) o(ose,)d(total_local_size;)629 2019 y(int)47 b(x,)g(y,)g(z;)629 2123 y(rfftwnd_mpi_plan)c(plan,)j(iplan;)629 2227 y(fftw_real)f(*data,) h(*work;)629 2330 y(fftw_complex)e(*cdata;)629 2538 y (MPI_Init\(&argc,&argv\);)629 2746 y(/*)j(create)f(the)h(forward)f(and) h(backward)e(plans:)h(*/)629 2849 y(plan)g(=)i(rfftw3d_mpi_create_plan) o(\(MPI)o(_COM)o(M_W)o(ORLD)o(,)2108 2953 y(nx,)f(ny,)g(nz,)2108 3057 y(FFTW_REAL_TO_COMPLEX,)2108 3161 y(FFTW_ESTIMATE\);)629 3264 y(iplan)f(=)h(rfftw3d_mpi_create_plan\(MP)o(I_CO)o(MM_)o(WORL)o (D,)676 3368 y(/*)h(dim.'s)e(of)h(REAL)f(data)h(-->)g(*/)95 b(nx,)47 b(ny,)g(nz,)2156 3472 y(FFTW_COMPLEX_TO_REAL,)2156 3576 y(FFTW_ESTIMATE\);)629 3783 y(rfftwnd_mpi_local_sizes)o(\(pla)o (n,)41 b(&local_nx,)k(&local_x_start,)1726 3887 y (&local_ny_after_transpose,)1726 3991 y(&local_y_start_after_trans)o (pos)o(e,)1726 4095 y(&total_local_size\);)629 4302 y(data)h(=)i (\(fftw_real*\))c(malloc\(sizeof\(fftw_real\))d(*)48 b(total_local_size\);)629 4510 y(/*)f(workspace)e(is)i(the)g(same)g (size)f(as)i(the)f(data:)f(*/)629 4614 y(work)g(=)i(\(fftw_real*\))c (malloc\(sizeof\(fftw_real\))d(*)48 b(total_local_size\);)629 4821 y(/*)f(initialize)e(data)h(to)i(f\(x,y,z\):)d(*/)629 4925 y(for)i(\(x)g(=)g(0;)g(x)h(<)f(local_nx;)f(++x\))1010 5029 y(for)h(\(y)h(=)f(0;)g(y)h(<)f(ny;)g(++y\))1392 5132 y(for)g(\(z)g(=)h(0;)f(z)g(<)h(nz;)f(++z\))1774 5236 y(data[\(x*ny)e(+)j(y\))f(*)g(\(2*\(nz/2+1\)\))e(+)i(z])2156 5340 y(=)g(f\(x)g(+)h(local_x_start,)c(y,)j(z\);)p eop end %%Page: 46 48 TeXDict begin 46 47 bop 150 -116 a Fv(46)3232 b(FFTW)629 403 y Fp(/*)47 b(Now,)f(compute)g(the)h(forward)f(transform:)f(*/)629 506 y(rfftwnd_mpi\(plan,)e(1,)k(data,)f(work,)h (FFTW_TRANSPOSED_ORDER\);)629 714 y(/*)g(the)g(data)f(is)i(now)e (complex,)g(so)h(typecast)f(a)h(pointer:)f(*/)629 818 y(cdata)g(=)h(\(fftw_complex*\))d(data;)629 1025 y(/*)j(multiply)e (imaginary)h(part)g(by)h(2,)h(for)f(fun:)772 1129 y(\(note)f(that)h (the)g(data)f(is)i(transposed\))c(*/)629 1233 y(for)j(\(y)g(=)g(0;)g(y) h(<)f(local_ny_after_transpose;)41 b(++y\))1010 1337 y(for)47 b(\(x)h(=)f(0;)g(x)h(<)f(nx;)g(++x\))1392 1440 y(for)g(\(z)g(=)h(0;)f(z)g(<)h(\(nz/2+1\);)d(++z\))1774 1544 y(cdata[\(y*nx)g(+)i(x\))g(*)h(\(nz/2+1\))d(+)j(z].im)2156 1648 y(*=)f(2.0;)629 1856 y(/*)g(Finally,)e(compute)h(the)h(inverse)f (transform;)f(the)i(result)772 1959 y(is)g(transposed)e(back)i(to)g (the)g(original)e(data)i(layout:)f(*/)629 2063 y(rfftwnd_mpi\(iplan,)c (1,)48 b(data,)e(work,)g(FFTW_TRANSPOSED_ORDER\);)629 2271 y(free\(data\);)629 2374 y(free\(work\);)629 2478 y(rfftwnd_mpi_destroy_pla)o(n\(pl)o(an\))o(;)629 2582 y(rfftwnd_mpi_destroy_pla)o(n\(ip)o(lan)o(\);)629 2686 y(MPI_Finalize\(\);)390 2790 y(})275 2946 y Fv(There's)22 b(a)i(lot)f(of)g(stu\013)g(in)f(this)g(example,)j(but)d(it's)h(all)f (just)h(what)g(y)m(ou)g(w)m(ould)f(ha)m(v)m(e)j(guessed,)f(righ)m(t?) 150 3056 y(W)-8 b(e)25 b(replaced)f(all)f(the)h Fp(fftwnd_mpi*)d Fv(functions)h(b)m(y)i Fp(rfftwnd_mpi*)p Fv(,)f(but)g(otherwise)g(the)i (parameters)150 3165 y(w)m(ere)32 b(prett)m(y)h(m)m(uc)m(h)e(the)h (same.)46 b(The)31 b(data)i(la)m(y)m(out)f(distributed)d(among)j(the)g (pro)s(cesses)g(just)f(lik)m(e)g(for)150 3275 y(the)38 b(complex)g(transforms)f(\(see)i(Section)f(4.2.3)i([MPI)e(Data)i(La)m (y)m(out],)i(page)d(43\),)j(but)37 b(in)g(addition)150 3385 y(the)i(\014nal)e(dimension)f(is)i(padded)f(just)h(lik)m(e)g(it)g (is)f(for)i(the)g(unipro)s(cessor)d(in-place)i(real)g(transforms)150 3494 y(\(see)31 b(Section)f(3.5.3)j([Arra)m(y)d(Dimensions)f(for)h (Real)g(Multi-dimensional)d(T)-8 b(ransforms],)30 b(page)h(32\).)42 b(In)150 3604 y(particular,)26 b(the)h Fp(z)f Fv(dimension)e(of)j(the)g (real)f(input)e(data)k(is)d(padded)h(to)h(a)g(size)g Fp(2*\(nz/2+1\))p Fv(,)d(and)i(after)150 3713 y(the)31 b(transform)e(it)h(con)m(tains)h Fp(nz/2+1)d Fv(complex)i(v)-5 b(alues.)275 3870 y(Some)30 b(other)h(imp)s(ortan)m(t)e(things)g(to)i (kno)m(w)g(ab)s(out)f(the)h(real)f(MPI)g(transforms:)225 4027 y Ft(\017)60 b Fv(As)36 b(for)g(the)g(unipro)s(cessor)e Fp(rfftwnd_create_plan)p Fv(,)e(the)37 b(dimensions)c(passed)i(for)h (the)g Fp(FFTW_)330 4136 y(COMPLEX_TO_REAL)h Fv(plan)j(are)i(those)g (of)g(the)f Fr(r)-5 b(e)g(al)53 b Fv(data.)74 b(In)41 b(particular,)i(ev)m(en)f(when)e Fp(FFTW_)330 4246 y(TRANSPOSED_ORDER) 32 b Fv(is)j(used)g(as)h(in)f(this)g(case,)k(the)d(dimensions)e(are)i (those)h(of)f(the)g(\(un)m(trans-)330 4355 y(p)s(osed\))29 b(real)h(output,)g(not)g(the)g(\(transp)s(osed\))g(complex)g(input.)38 b(\(F)-8 b(or)31 b(the)f(complex)g(MPI)g(trans-)330 4465 y(forms,)g(on)g(the)h(other)f(hand,)g(the)h(dimensions)c(are)k(alw)m(a) m(ys)g(those)g(of)f(the)h(input)d(arra)m(y)-8 b(.\))225 4610 y Ft(\017)60 b Fv(The)24 b(output)h(ordering)e(of)i(the)g (transform)f(\()p Fp(FFTW_TRANSPOSED_ORDER)c Fv(or)k Fp(FFTW_TRANSPOSED_)330 4720 y(ORDER)p Fv(\))39 b Fr(must)50 b Fv(b)s(e)40 b(the)h(same)g(for)f(b)s(oth)g(forw)m(ard)g(and)g(bac)m (kw)m(ard)h(transforms.)70 b(\(This)39 b(is)h(not)330 4830 y(required)29 b(in)g(the)h(complex)g(case.\))225 4975 y Ft(\017)60 b Fp(total_local_size)24 b Fv(is)k(the)h(required)d (size)j(in)e Fp(fftw_real)f Fv(v)-5 b(alues,)29 b(not)f Fp(fftw_complex)e Fv(v)-5 b(alues)330 5085 y(as)31 b(it)f(is)f(for)h (the)h(complex)f(transforms.)225 5230 y Ft(\017)60 b Fp(local_ny_after_transpose)20 b Fv(and)26 b Fp (local_y_start_after_tra)o(nspo)o(se)20 b Fv(describ)s(e)25 b(the)i(p)s(or-)330 5340 y(tion)21 b(of)h(the)h(arra)m(y)f(after)g(the) h(transform;)h(that)e(is,)h(they)f(are)h(indices)d(in)g(the)i(complex)g (arra)m(y)g(for)g(an)p eop end %%Page: 47 49 TeXDict begin 47 48 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(47)330 299 y Fp(FFTW_REAL_TO_COMPLEX)19 b Fv(transform)k(and)g(in)g(the)h(real)g(arra)m(y)h(for)f(an)f Fp(FFTW_COMPLEX_TO_REAL)330 408 y Fv(transform.)225 541 y Ft(\017)60 b Fp(rfftwnd_mpi)21 b Fv(alw)m(a)m(ys)j(exp)s(ects)g Fp(fftw_real*)d Fv(arra)m(y)k(argumen)m(ts,)h(but)d(of)h(course)g (these)g(p)s(oin)m(ters)330 651 y(can)29 b(refer)f(to)h(either)f(real)g (or)h(complex)f(arra)m(ys,)i(dep)s(ending)c(up)s(on)h(whic)m(h)g(side)g (of)i(the)g(transform)330 760 y(y)m(ou)i(are)h(on.)42 b(Just)30 b(as)i(for)e(in-place)g(unipro)s(cessor)f(real)i(transforms)f (\(and)h(also)f(in)g(the)h(example)330 870 y(ab)s(o)m(v)m(e\),)f(this)d (is)g(most)i(easily)e(handled)f(b)m(y)i(t)m(yp)s(ecasting)g(to)h(a)g (complex)e(p)s(oin)m(ter)h(when)f(handling)330 979 y(the)k(complex)f (data.)225 1112 y Ft(\017)60 b Fv(As)33 b(with)e(the)i(complex)g (transforms,)g(there)g(are)g(also)f Fp(rfftwnd_create_plan)c Fv(and)k Fp(rfftw2d_)330 1221 y(create_plan)27 b Fv(functions,)i(and)h (an)m(y)h(rank)f(greater)h(than)g(one)f(is)g(supp)s(orted.)275 1377 y(Programs)c(using)e(the)j(MPI)f(FFTW)h(real)f(transforms)f (should)g(link)f(with)h Fp(-lrfftw_mpi)i(-lfftw_)150 1487 y(mpi)i(-lrfftw)g(-lfftw)g(-lm)g Fv(on)h(Unix.)150 1687 y Fh(4.2.5)63 b(Usage)41 b(of)g(MPI)g(FFTW)g(for)g(Complex)f (One-dimensional)464 1811 y(T)-10 b(ransforms)275 2002 y Fv(The)67 b(MPI)h(FFTW)h(also)f(includes)d(routines)i(for)h(parallel) e(one-dimensional)g(transforms)150 2111 y(of)51 b(complex)g(data)g (\(only\).)103 b(Although)50 b(the)h(sp)s(eedup)e(is)h(generally)g(w)m (orse)i(than)e(it)h(is)f(for)h(the)150 2221 y(m)m(ulti-dimensional)g (routines,)1260 2188 y Fo(2)1358 2221 y Fv(these)56 b (distributed-memory)d(one-dimensional)g(transforms)i(are)150 2331 y(esp)s(ecially)28 b(useful)g(for)h(p)s(erforming)f (one-dimensional)f(transforms)i(that)h(don't)g(\014t)g(in)m(to)f(the)h (memory)150 2440 y(of)h(a)f(single)f(mac)m(hine.)275 2573 y(The)45 b(usage)i(of)f(these)g(routines)f(is)g(straigh)m(tforw)m (ard,)50 b(and)c(is)f(similar)e(to)k(that)g(of)f(the)g(m)m(ulti-)150 2682 y(dimensional)41 b(MPI)i(transform)g(functions.)79 b(Y)-8 b(ou)45 b(\014rst)e(include)e(the)j(header)f Fp()e Fv(and)150 2792 y(then)30 b(create)i(a)f(plan)e(b)m(y)h(calling:)390 2919 y Fp(fftw_mpi_plan)44 b(fftw_mpi_create_plan\(MPI_)o(Comm)d(comm,) 46 b(int)h(n,)2060 3022 y(fftw_direction)d(dir,)j(int)g(flags\);)275 3155 y Fv(The)32 b(last)i(three)f(argumen)m(ts)h(are)f(the)h(same)g(as) f(for)g Fp(fftw_create_plan)c Fv(\(except)35 b(that)f(all)e(MPI)150 3265 y(transforms)k(are)h(automatically)g Fp(FFTW_IN_PLACE)p Fv(\).)58 b(The)36 b(\014rst)g(argumen)m(t)i(sp)s(eci\014es)d(the)i (group)g(of)150 3374 y(pro)s(cesses)26 b(y)m(ou)h(are)g(using,)f(and)g (is)f(usually)g Fp(MPI_COMM_WORLD)d Fv(\(all)k(pro)s(cesses\).)39 b(A)27 b(plan)e(can)i(b)s(e)f(used)150 3484 y(for)h(man)m(y)f (transforms)g(of)h(the)g(same)g(size,)h(and)e(is)g(destro)m(y)m(ed)i (when)d(y)m(ou)i(are)h(done)e(with)f(it)i(b)m(y)f(calling)150 3593 y Fp(fftw_mpi_destroy_plan\(pl)o(an\))p Fv(.)275 3726 y(If)32 b(y)m(ou)i(don't)f(care)h(ab)s(out)e(the)i(ordering)d(of)j (the)f(input)e(or)i(output)g(data)h(of)f(the)g(transform,)h(y)m(ou)150 3835 y(can)d(include)d Fp(FFTW_SCRAMBLED_INPUT)d Fv(and/or)30 b Fp(FFTW_SCRAMBLED_OUTPUT)24 b Fv(in)29 b(the)i Fp(flags)p Fv(.)39 b(These)150 3945 y(sa)m(v)m(e)34 b(some)e(comm)m(unications)g (at)h(the)f(exp)s(ense)g(of)g(ha)m(ving)g(the)g(input)f(and/or)h (output)g(reordered)f(in)150 4055 y(an)e(undo)s(cumen)m(ted)f(w)m(a)m (y)-8 b(.)42 b(F)-8 b(or)29 b(example,)h(if)e(y)m(ou)h(are)h(p)s (erforming)d(an)i(FFT-based)g(con)m(v)m(olution,)h(y)m(ou)150 4164 y(migh)m(t)d(use)f Fp(FFTW_SCRAMBLED_OUTPUT)21 b Fv(for)27 b(the)g(forw)m(ard)f(transform)g(and)g Fp (FFTW_SCRAMBLED_INPUT)150 4274 y Fv(for)k(the)h(in)m(v)m(erse)f (transform.)275 4406 y(The)f(transform)h(itself)f(is)h(computed)g(b)m (y:)390 4533 y Fp(void)47 b(fftw_mpi\(fftw_mpi_plan)41 b(p,)48 b(int)e(n_fields,)1058 4637 y(fftw_complex)f(*local_data,)f (fftw_complex)h(*work\);)275 4769 y(n_fields)p Fv(,)c(as)g(in)f Fp(fftwnd_mpi)p Fv(,)h(is)f(equiv)-5 b(alen)m(t)41 b(to)g Fp(howmany=n_fields)p Fv(,)f Fp(stride=n_fields)p Fv(,)150 4879 y(and)h Fp(dist=1)p Fv(,)i(and)e(should)f(b)s(e)h Fp(1)g Fv(when)g(y)m(ou)h(are)g(computing)f(the)h(transform)f(of)g(a)h (single)f(arra)m(y)-8 b(.)p 150 4967 1200 4 v 199 5034 a Fo(2)275 5066 y Fj(The)33 b(1D)h(transforms)g(require)g(m)n(uc)n(h)e (more)h(comm)n(unication.)57 b(All)34 b(the)f(comm)n(unication)g(in)h (our)f(FFT)i(routines)275 5157 y(tak)n(es)c(the)g(form)g(of)h(an)f (all-to-all)i(comm)n(unication:)44 b(the)31 b(m)n(ulti-dimensional)f (transforms)i(require)f(t)n(w)n(o)g(all-to-all)275 5249 y(comm)n(unications)36 b(\(or)h(one,)k(if)d(y)n(ou)e(use)i Fi(FFTW_TRANSPOSED_ORDER)p Fj(\),)44 b(while)39 b(the)d (one-dimensional)i(transforms)275 5340 y(require)25 b Ff(thr)l(e)l(e)33 b Fj(\(or)26 b(t)n(w)n(o,)g(if)h(y)n(ou)e(use)h (scram)n(bled)f(input)f(or)i(output\).)p eop end %%Page: 48 50 TeXDict begin 48 49 bop 150 -116 a Fv(48)3232 b(FFTW)150 299 y Fp(local_data)25 b Fv(con)m(tains)j(the)f(p)s(ortion)g(of)g(the)h (arra)m(y)g(lo)s(cal)f(to)i(the)f(curren)m(t)f(pro)s(cess,)h(describ)s (ed)d(b)s(elo)m(w.)150 408 y Fp(work)37 b Fv(is)f(either)h Fp(NULL)g Fv(or)h(an)f(arra)m(y)h(exactly)h(the)f(same)g(size)g(as)f Fp(local_data)p Fv(;)i(in)e(the)h(latter)g(case,)150 518 y(FFTW)h(can)f(use)g(the)g Fp(MPI_Alltoall)d Fv(comm)m(unications)i (primitiv)m(e)f(whic)m(h)h(is)g(\(usually\))g(faster)h(at)150 628 y(the)30 b(exp)s(ense)g(of)g(extra)h(storage.)42 b(Up)s(on)29 b(return,)g Fp(local_data)f Fv(con)m(tains)i(the)g(p)s (ortion)f(of)h(the)g(output)150 737 y(lo)s(cal)g(to)h(the)f(curren)m(t) g(pro)s(cess)g(\(see)i(b)s(elo)m(w\).)275 870 y(T)-8 b(o)29 b(\014nd)f(out)i(what)f(p)s(ortion)f(of)h(the)h(arra)m(y)f(is)g (stored)g(lo)s(cal)g(to)h(the)f(curren)m(t)g(pro)s(cess,)h(y)m(ou)f (call)g(the)150 980 y(follo)m(wing)g(routine:)390 1107 y Fp(void)47 b(fftw_mpi_local_sizes\(ff)o(tw_m)o(pi_)o(plan)41 b(p,)1631 1211 y(int)47 b(*local_n,)e(int)i(*local_start,)1631 1314 y(int)g(*local_n_after_transform)o(,)1631 1418 y(int)g (*local_start_after_trans)o(for)o(m,)1631 1522 y(int)g (*total_local_size\);)275 1655 y(total_local_size)17 b Fv(is)j(the)i(n)m(um)m(b)s(er)f(of)g Fp(fftw_complex)e Fv(elemen)m(ts)j(y)m(ou)g(should)d(actually)i(allo)s(cate)150 1765 y(for)34 b Fp(local_data)e Fv(\(and)i Fp(work)p Fv(\).)52 b Fp(local_n)33 b Fv(and)h Fp(local_start)d Fv(indicate)i(that)i(the)g(curren)m(t)f(pro)s(cess)150 1874 y(stores)23 b Fp(local_n)d Fv(elemen)m(ts)j(corresp)s(onding)e(to) i(the)g(indices)d Fp(local_start)g Fv(to)j Fp(local_start+local_)150 1984 y(n-1)35 b Fv(in)f(the)i(\\real")g(arra)m(y)-8 b(.)58 b Fr(After)37 b(the)h(tr)-5 b(ansform,)41 b(the)d(pr)-5 b(o)g(c)g(ess)40 b(may)e(stor)-5 b(e)39 b(a)f(di\013er)-5 b(ent)38 b(p)-5 b(ortion)40 b(of)150 2093 y(the)f(arr)-5 b(ay.)60 b Fv(The)36 b(p)s(ortion)f(of)i(the)g(data)g(stored)f(on)h (the)g(pro)s(cess)f(after)h(the)f(transform)g(is)g(giv)m(en)g(b)m(y)150 2203 y Fp(local_n_after_transform)23 b Fv(and)29 b Fp (local_start_after_transfor)o(m)p Fv(.)34 b(This)28 b(data)j(is)d (exactly)j(the)150 2312 y(same)g(as)h(a)f(con)m(tiguous)g(segmen)m(t)h (of)f(the)h(corresp)s(onding)d(unipro)s(cessor)f(transform)j(output)f (\(i.e.)43 b(an)150 2422 y(in-order)29 b(sequence)i(of)f(sequen)m(tial) g(frequency)g(bins\).)275 2555 y(Note)35 b(that,)g(if)e(y)m(ou)h (compute)h(b)s(oth)e(a)h(forw)m(ard)f(and)h(a)g(bac)m(kw)m(ard)g (transform)f(of)h(the)h(same)f(size,)150 2665 y(the)39 b(lo)s(cal)f(sizes)h(are)g(guaran)m(teed)h(to)f(b)s(e)g(consisten)m(t.) 66 b(That)39 b(is,)h(the)f(lo)s(cal)f(size)h(after)g(the)g(forw)m(ard) 150 2774 y(transform)28 b(will)f(b)s(e)h(the)h(same)g(as)h(the)f(lo)s (cal)f(size)h(b)s(efore)f(the)h(bac)m(kw)m(ard)h(transform,)f(and)f (vice)h(v)m(ersa.)275 2907 y(Programs)c(using)f(the)h(FFTW)h(MPI)g (routines)e(should)f(b)s(e)i(link)m(ed)f(with)g Fp(-lfftw_mpi)j(-lfftw) i(-lm)150 3017 y Fv(on)h(Unix,)g(in)f(addition)f(to)j(whatev)m(er)h (libraries)27 b(are)k(required)d(for)j(MPI.)150 3236 y Fh(4.2.6)63 b(MPI)41 b(Tips)275 3427 y Fv(There)27 b(are)h(sev)m(eral)g(things)f(y)m(ou)h(should)e(consider)g(in)h(order)g (to)h(get)h(the)f(b)s(est)g(p)s(erformance)f(out)h(of)150 3537 y(the)j(MPI)f(FFTW)h(routines.)275 3670 y(First,)39 b(if)f(p)s(ossible,)g(the)g(\014rst)g(and)g(second)g(dimensions)e(of)i (y)m(our)g(data)h(should)e(b)s(e)h(divisible)c(b)m(y)150 3779 y(the)43 b(n)m(um)m(b)s(er)f(of)h(pro)s(cesses)g(y)m(ou)g(are)g (using.)77 b(\(If)43 b(only)f(one)i(can)f(b)s(e)f(divisible,)h(then)g (y)m(ou)g(should)150 3889 y(c)m(ho)s(ose)29 b(the)f(\014rst)f (dimension.\))37 b(This)26 b(allo)m(ws)h(the)h(computational)g(load)f (to)i(b)s(e)e(spread)g(ev)m(enly)g(among)150 3999 y(the)32 b(pro)s(cesses,)h(and)e(also)h(reduces)g(the)g(comm)m(unications)f (complexit)m(y)h(and)f(o)m(v)m(erhead.)47 b(In)31 b(the)h(one-)150 4108 y(dimensional)39 b(transform)h(case,)46 b(the)41 b(size)g(of)h(the)g(transform)e(should)g(ideally)f(b)s(e)i(divisible)c (b)m(y)42 b(the)150 4218 y Fr(squar)-5 b(e)38 b Fv(of)30 b(the)h(n)m(um)m(b)s(er)e(of)i(pro)s(cessors.)275 4351 y(Second,)38 b(y)m(ou)f(should)e(consider)g(using)h(the)h Fp(FFTW_TRANSPOSED_ORDER)30 b Fv(output)37 b(format)g(if)f(it)g(is)150 4460 y(not)26 b(to)s(o)g(burdensome.)37 b(The)25 b(sp)s(eed)g(gains)f (from)h(comm)m(unications)g(sa)m(vings)g(are)h(usually)d(substan)m (tial.)275 4593 y(Third,)40 b(y)m(ou)h(should)d(consider)h(allo)s (cating)h(a)h(w)m(orkspace)g(for)f Fp(\(r\)fftw\(nd\)_mpi)p Fv(,)f(as)h(this)g(can)150 4703 y(often)31 b(\(but)f(not)g(alw)m(a)m (ys\))i(impro)m(v)m(e)e(p)s(erformance)g(\(at)h(the)g(cost)g(of)g (extra)g(storage\).)275 4836 y(F)-8 b(ourth,)50 b(y)m(ou)c(should)e (exp)s(erimen)m(t)h(with)g(the)h(b)s(est)g(n)m(um)m(b)s(er)e(of)i(pro)s (cessors)g(to)h(use)e(for)h(y)m(our)150 4945 y(problem.)71 b(\(There)41 b(comes)h(a)f(p)s(oin)m(t)f(of)i(diminishing)36 b(returns,)42 b(when)e(the)i(comm)m(unications)e(costs)150 5055 y(out)m(w)m(eigh)e(the)g(computational)f(b)s(ene\014ts.)1645 5022 y Fo(3)1681 5055 y Fv(\))62 b(The)37 b Fp(fftw_mpi_test)d Fv(program)j(can)h(output)f(helpful)p 150 5149 1200 4 v 199 5217 a Fo(3)275 5249 y Fj(An)c(FFT)h(is)h(particularly)f(hard)g (on)g(comm)n(unications)e(systems,)k(as)f(it)f(requires)g(an)g Fc(all-to-all)k Fj(comm)n(unication,)275 5340 y(whic)n(h)25 b(is)h(more)g(or)g(less)g(the)g(w)n(orst)g(p)r(ossible)h(case.)p eop end %%Page: 49 51 TeXDict begin 49 50 bop 150 -116 a Fv(Chapter)30 b(4:)41 b(P)m(arallel)29 b(FFTW)2435 b(49)150 299 y(p)s(erformance)23 b(b)s(enc)m(hmarks.)37 b(It)24 b(accepts)h(the)e(same)h(parameters)g (as)g(the)g(unipro)s(cessor)d(test)j(programs)150 408 y(\(c.f.)53 b Fp(tests/README)p Fv(\))31 b(and)i(is)g(run)g(lik)m(e)g (an)h(ordinary)f(MPI)h(program.)51 b(F)-8 b(or)35 b(example,)g Fp(mpirun)29 b(-np)150 518 y(4)h(fftw_mpi_test)d(-s)j(128x128x128)g Fv(will)h(b)s(enc)m(hmark)h(a)i Fp(128x128x128)c Fv(transform)j(on)g (four)g(pro-)150 628 y(cessors,)28 b(rep)s(orting)d(timings)g(and)g (parallel)g(sp)s(eedups)f(for)j(all)e(v)-5 b(arian)m(ts)26 b(of)h Fp(fftwnd_mpi)c Fv(\(transp)s(osed,)150 737 y(with)34 b(w)m(orkspace,)k(etcetera\).)60 b(\(Note)37 b(also)e(that)i(there)f (is)e(the)i Fp(rfftw_mpi_test)c Fv(program)j(for)h(the)150 847 y(real)30 b(transforms.\))p eop end %%Page: 50 52 TeXDict begin 50 51 bop 150 -116 a Fv(50)3232 b(FFTW)p eop end %%Page: 51 53 TeXDict begin 51 52 bop 150 -116 a Fv(Chapter)30 b(5:)41 b(Calling)28 b(FFTW)j(from)f(F)-8 b(ortran)1909 b(51)150 299 y Fs(5)80 b(Calling)56 b(FFTW)f(from)e(F)-13 b(ortran)275 503 y Fv(The)27 b(standard)g(FFTW)h(libraries)d(include)g(sp)s(ecial)h (wrapp)s(er)g(functions)g(that)j(allo)m(w)e(F)-8 b(ortran)28 b(pro-)150 612 y(grams)44 b(to)h(call)f(FFTW)h(subroutines.)79 b(This)43 b(c)m(hapter)i(describ)s(es)d(ho)m(w)i(those)h(functions)e (ma)m(y)i(b)s(e)150 722 y(emplo)m(y)m(ed)32 b(to)h(use)e(FFTW)i(from)e (F)-8 b(ortran.)46 b(W)-8 b(e)33 b(assume)f(here)g(that)g(the)g(reader) g(is)f(already)g(familiar)150 832 y(with)e(the)i(usage)g(of)f(FFTW)h (in)e(C,)i(as)f(describ)s(ed)e(elsewhere)i(in)f(this)h(man)m(ual.)275 960 y(In)h(general,)i(it)e(is)g(not)i(p)s(ossible)c(to)k(call)f(C)f (functions)g(directly)g(from)g(F)-8 b(ortran,)34 b(due)d(to)i(F)-8 b(ortran's)150 1070 y(inabilit)m(y)33 b(to)k(pass)f(argumen)m(ts)h(b)m (y)f(v)-5 b(alue)35 b(and)h(also)g(b)s(ecause)g(F)-8 b(ortran)37 b(compilers)d(t)m(ypically)h(exp)s(ect)150 1179 y(iden)m(ti\014ers)i(to)i(b)s(e)g(mangled)f(someho)m(w)h(for)g (linking.)63 b(Ho)m(w)m(ev)m(er,)43 b(if)38 b(C)g(functions)g(are)h (written)f(in)g(a)150 1289 y(sp)s(ecial)28 b(w)m(a)m(y)-8 b(,)31 b(they)e Fr(ar)-5 b(e)37 b Fv(callable)28 b(from)h(F)-8 b(ortran,)30 b(and)e(w)m(e)i(ha)m(v)m(e)g(emplo)m(y)m(ed)g(this)e(tec)m (hnique)h(to)g(create)150 1398 y(F)-8 b(ortran-callable)42 b(\\wrapp)s(er")f(functions)g(around)g(the)h(main)f(FFTW)h(routines.)75 b(These)42 b(wrapp)s(er)150 1508 y(functions)36 b(are)j(included)c(in)h (the)j(FFTW)f(libraries)d(b)m(y)j(default,)h(unless)d(a)j(F)-8 b(ortran)38 b(compiler)f(isn't)150 1618 y(found)29 b(on)h(y)m(our)h (system)f(or)h Fp(--disable-fortran)25 b Fv(is)30 b(included)d(in)i (the)i Fp(configure)d Fv(\015ags.)275 1746 y(As)34 b(a)h(result,)f (calling)f(FFTW)i(from)f(F)-8 b(ortran)35 b(requires)e(little)g(more)h (than)h(app)s(ending)c(`)p Fp(_f77)p Fv(')j(to)150 1856 y(the)g(function)f(names)i(and)e(then)h(linking)e(normally)g(with)h (the)i(FFTW)g(libraries.)49 b(There)34 b(are)h(a)f(few)150 1965 y(wrinkles,)28 b(ho)m(w)m(ev)m(er,)k(as)f(w)m(e)g(shall)d(discuss) h(b)s(elo)m(w.)150 2205 y Fu(5.1)68 b(W)-11 b(rapp)t(er)44 b(Routines)275 2391 y Fv(All)g(of)j(the)f(unipro)s(cessor)e(and)h(m)m (ulti-threaded)g(transform)h(routines)f(ha)m(v)m(e)i(F)-8 b(ortran-callable)150 2501 y(wrapp)s(ers,)38 b(except)h(for)f(the)h (wisdom)d(imp)s(ort/exp)s(ort)h(functions)g(\(since)h(it)f(is)g(not)i (p)s(ossible)c(to)k(ex-)150 2610 y(c)m(hange)c(string)d(and)h(\014le)f (argumen)m(ts)i(p)s(ortably)e(with)g(F)-8 b(ortran\))35 b(and)e(the)g(sp)s(eci\014c)f(planner)g(routines)150 2720 y(\(see)25 b(Section)g(3.2.2)h([Discussion)d(on)h(Sp)s(eci\014c)f (Plans],)i(page)h(20\).)39 b(The)24 b(name)h(of)g(the)f(wrapp)s(er)f (routine)150 2829 y(is)k(the)h(same)g(as)g(that)h(of)e(the)h(corresp)s (onding)e(C)i(routine,)f(but)g(with)g Fp(fftw/fftwnd/rfftw/rfftwn)o(d) 150 2939 y Fv(replaced)g(b)m(y)g Fp(fftw_f77/fftwnd_f77/rff)o(tw_)o (f77/)o(rfft)o(wnd)o(_f77)o Fv(.)34 b(F)-8 b(or)28 b(example,)f(in)f(F) -8 b(ortran,)29 b(in-)150 3049 y(stead)41 b(of)f(calling)f Fp(fftw_one)e Fv(y)m(ou)k(w)m(ould)e(call)g Fp(fftw_f77_one)p Fv(.)2464 3016 y Fo(1)2568 3049 y Fv(F)-8 b(or)41 b(the)f(most)h(part,) h(all)d(of)i(the)150 3158 y(argumen)m(ts)31 b(to)g(the)f(functions)f (are)i(the)g(same,)g(with)e(the)h(follo)m(wing)f(exceptions:)225 3287 y Ft(\017)60 b Fp(plan)22 b Fv(v)-5 b(ariables)23 b(\(what)g(w)m(ould)g(b)s(e)g(of)g(t)m(yp)s(e)h Fp(fftw_plan)p Fv(,)f Fp(rfftwnd_plan)p Fv(,)f(etcetera,)27 b(in)22 b(C\),)i(m)m(ust)330 3396 y(b)s(e)37 b(declared)h(as)g(a)g(t)m(yp)s(e)g (that)g(is)f(the)h(same)h(size)e(as)i(a)f(p)s(oin)m(ter)f(\(address\))g (on)h(y)m(our)g(mac)m(hine.)330 3506 y(\(F)-8 b(ortran)33 b(has)f(no)g(generic)g(p)s(oin)m(ter)f(t)m(yp)s(e.\))47 b(The)32 b(F)-8 b(ortran)33 b Fp(integer)d Fv(t)m(yp)s(e)i(is)f (usually)f(the)j(same)330 3615 y(size)c(as)g(a)h(p)s(oin)m(ter,)f(but)f (y)m(ou)i(need)f(to)h(b)s(e)e(w)m(ary)h(\(esp)s(ecially)f(on)h(64-bit)h (mac)m(hines\).)40 b(\(Y)-8 b(ou)30 b(could)330 3725 y(also)36 b(use)f Fp(integer*4)f Fv(on)i(a)g(32-bit)g(mac)m(hine)g(and) f Fp(integer*8)e Fv(on)j(a)g(64-bit)g(mac)m(hine.\))58 b(Ugh.)330 3835 y(\()p Fp(g77)38 b Fv(has)g(a)h(sp)s(ecial)e(t)m(yp)s (e,)k Fp(integer\(kind=7\))p Fv(,)c(that)i(is)e(de\014ned)h(to)h(b)s(e) f(the)h(same)f(size)h(as)g(a)330 3944 y(p)s(oin)m(ter.\))225 4073 y Ft(\017)60 b Fv(An)m(y)26 b(function)e(that)i(returns)e(a)i(v)-5 b(alue)25 b(\(e.g.)40 b Fp(fftw_create_plan)p Fv(\))22 b(is)i(con)m(v)m(erted)j(in)m(to)e(a)h(subrou-)330 4182 y(tine.)40 b(The)28 b(return)g(v)-5 b(alue)28 b(is)g(con)m(v)m(erted)i (in)m(to)f(an)f(additional)f(\(\014rst\))i(parameter)g(of)g(the)g (wrapp)s(er)330 4292 y(subroutine.)53 b(\(The)35 b(reason)h(for)f(this) f(is)g(that)i(some)g(F)-8 b(ortran)35 b(implemen)m(tations)f(seem)i(to) g(ha)m(v)m(e)330 4401 y(trouble)29 b(with)g(C)h(function)f(return)h(v) -5 b(alues.\))225 4530 y Ft(\017)60 b Fv(When)29 b(p)s(erforming)e (one-dimensional)h Fp(FFTW_IN_PLACE)d Fv(transforms,)k(y)m(ou)h(don't)g (ha)m(v)m(e)g(the)g(op-)330 4639 y(tion)36 b(of)i(passing)d Fp(NULL)h Fv(for)h(the)g Fp(out)f Fv(argumen)m(t)i(\(since)e(there)h (is)f(no)h(w)m(a)m(y)h(to)g(pass)f Fp(NULL)e Fv(from)330 4749 y(F)-8 b(ortran\).)69 b(Therefore,)42 b(when)c(p)s(erforming)g (suc)m(h)h(transforms,)i(y)m(ou)f Fr(must)48 b Fv(allo)s(cate)40 b(and)f(pass)330 4859 y(a)e(con)m(tiguous)f(scratc)m(h)i(arra)m(y)f(of) f(the)h(same)g(size)f(as)h(the)g(transform.)58 b(Note)38 b(that)f(for)f(in-place)330 4968 y(m)m(ulti-dimensional)d(\()p Fp(\(r\)fftwnd)p Fv(\))j(transforms,)j(the)e Fp(out)g Fv(argumen)m(t)g(is)g(ignored,)h(so)g(y)m(ou)g(can)330 5078 y(pass)30 b(an)m(ything)g(for)g(that)h(parameter.)p 150 5149 1200 4 v 199 5217 a Fo(1)275 5249 y Fj(T)-6 b(ec)n(hnically)g(,)24 b(F)-6 b(ortran)24 b(77)h(iden)n(ti\014ers)e (are)i(not)e(allo)n(w)n(ed)j(to)e(ha)n(v)n(e)f(more)g(than)h(6)g(c)n (haracters,)h(nor)f(ma)n(y)f(they)g(con)n(tain)275 5340 y(underscores.)34 b(An)n(y)25 b(compiler)g(that)h(enforces)h(this)e (limitation)i(do)r(esn't)f(deserv)n(e)f(to)h(link)f(to)h(FFTW.)p eop end %%Page: 52 54 TeXDict begin 52 53 bop 150 -116 a Fv(52)3232 b(FFTW)225 299 y Ft(\017)60 b Fv(The)37 b(wrapp)s(er)e(routines)h(exp)s(ect)i(m)m (ulti-dimensional)33 b(arra)m(ys)k(to)h(b)s(e)f(in)f(column-ma)5 b(jor)36 b(order,)330 408 y(whic)m(h)c(is)g(the)i(ordinary)d(format)j (of)f(F)-8 b(ortran)34 b(arra)m(ys.)50 b(They)32 b(do)h(this)g (transparen)m(tly)f(and)h(cost-)330 518 y(lessly)f(simply)g(b)m(y)h (rev)m(ersing)h(the)g(order)f(of)h(the)g(dimensions)d(passed)i(to)i (FFTW,)f(but)f(this)g(has)330 628 y(one)38 b(imp)s(ortan)m(t)f (consequence)i(for)e(m)m(ulti-dimensional)d(real-complex)k(transforms,) h(discussed)330 737 y(b)s(elo)m(w.)275 923 y(In)32 b(general,)h(y)m(ou) h(should)d(tak)m(e)j(care)g(to)g(use)e(F)-8 b(ortran)34 b(data)f(t)m(yp)s(es)g(that)h(corresp)s(ond)d(to)j(\(i.e.)49 b(are)150 1033 y(the)27 b(same)h(size)f(as\))g(the)h(C)e(t)m(yp)s(es)h (used)g(b)m(y)g(FFTW.)h(If)e(y)m(our)h(C)g(and)f(F)-8 b(ortran)28 b(compilers)d(are)j(made)f(b)m(y)150 1142 y(the)33 b(same)h(v)m(endor,)g(the)f(corresp)s(ondence)f(is)h(usually)d (straigh)m(tforw)m(ard)j(\(i.e.)49 b Fp(integer)31 b Fv(corresp)s(onds)150 1252 y(to)38 b Fp(int)p Fv(,)g Fp(real)e Fv(corresp)s(onds)g(to)h Fp(float)p Fv(,)h(etcetera\).)63 b(Suc)m(h)37 b(simple)e(corresp)s(ondences)h(are)i(assumed)150 1362 y(in)h(the)h(examples)g(b)s(elo)m(w.)68 b(The)40 b(examples)g(also)g(assume)f(that)i(FFTW)g(w)m(as)f(compiled)f(in)f (double)150 1471 y(precision)29 b(\(the)h(default\).)150 1731 y Fu(5.2)68 b(FFTW)43 b(Constan)l(ts)j(in)f(F)-11 b(ortran)275 1924 y Fv(When)44 b(creating)h(plans)e(in)h(FFTW,)h(a)g(n) m(um)m(b)s(er)f(of)h(constan)m(ts)h(are)f(used)f(to)h(sp)s(ecify)e (options,)150 2034 y(suc)m(h)36 b(as)g Fp(FFTW_FORWARD)d Fv(or)j Fp(FFTW_USE_WISDOM)p Fv(.)54 b(The)35 b(same)i(constan)m(ts)g (m)m(ust)f(b)s(e)g(used)f(with)g(the)150 2143 y(wrapp)s(er)28 b(routines,)g(but)h(of)g(course)h(the)f(C)g(header)g(\014les)g(where)g (the)g(constan)m(ts)i(are)e(de\014ned)f(can't)j(b)s(e)150 2253 y(incorp)s(orated)e(directly)g(in)m(to)i(F)-8 b(ortran)31 b(co)s(de.)275 2388 y(Instead,)c(w)m(e)g(ha)m(v)m(e)h(placed)e(F)-8 b(ortran)27 b(equiv)-5 b(alen)m(ts)26 b(of)h(the)g(FFTW)g(constan)m(t)h (de\014nitions)c(in)h(the)i(\014le)150 2498 y Fp(fortran/fftw_f77.i)h Fv(of)33 b(the)h(FFTW)f(pac)m(k)-5 b(age.)51 b(If)33 b(y)m(our)g(F)-8 b(ortran)33 b(compiler)f(supp)s(orts)f(a)j(prepro-)150 2607 y(cessor,)i(y)m(ou)f(can)g(use)g(that)g(to)g(incorp)s(orate)f (this)g(\014le)f(in)m(to)i(y)m(our)g(co)s(de)f(whenev)m(er)h(y)m(ou)g (need)f(to)i(call)150 2717 y(FFTW.)31 b(Otherwise,)f(y)m(ou)g(will)e (ha)m(v)m(e)k(to)f(paste)g(the)f(constan)m(t)i(de\014nitions)c(in)h (directly)-8 b(.)40 b(They)30 b(are:)676 2846 y Fp(integer)46 b(FFTW_FORWARD,FFTW_BACKWAR)o(D)676 2950 y(parameter)g (\(FFTW_FORWARD=-1,FFTW_B)o(ACKW)o(ARD)o(=1\))676 3158 y(integer)g(FFTW_REAL_TO_COMPLEX,FFTW)o(_COM)o(PLE)o(X_TO)o(_REA)o(L) 676 3262 y(parameter)g(\(FFTW_REAL_TO_COMPLEX=-)o(1,FF)o(TW_)o(COMP)o (LEX_)o(TO_)o(REAL)o(=1\))676 3469 y(integer)g (FFTW_ESTIMATE,FFTW_MEASUR)o(E)676 3573 y(parameter)g (\(FFTW_ESTIMATE=0,FFTW_M)o(EASU)o(RE=)o(1\))676 3780 y(integer)g(FFTW_OUT_OF_PLACE,FFTW_IN)o(_PLA)o(CE,)o(FFTW)o(_USE)o(_WI) o(SDOM)676 3884 y(parameter)g(\(FFTW_OUT_OF_PLACE=0\))676 3988 y(parameter)g(\(FFTW_IN_PLACE=8,FFTW_U)o(SE_W)o(ISD)o(OM=1)o(6\)) 676 4196 y(integer)g(FFTW_THREADSAFE)676 4299 y(parameter)g (\(FFTW_THREADSAFE=128\))275 4435 y Fv(In)31 b(C,)h(y)m(ou)g(com)m (bine)g(di\013eren)m(t)g(\015ags)g(\(lik)m(e)g Fp(FFTW_USE_WISDOM)c Fv(and)j Fp(FFTW_MEASURE)p Fv(\))e(using)i(the)150 4544 y(`)p Fp(|)p Fv(')g(op)s(erator;)f(in)g(F)-8 b(ortran)31 b(y)m(ou)f(should)f(just)g(use)i(`)p Fp(+)p Fv('.)150 4804 y Fu(5.3)68 b(F)-11 b(ortran)45 b(Examples)275 4997 y Fv(In)20 b(C)h(y)m(ou)h(migh)m(t)g(ha)m(v)m(e)g(something)f(lik)m(e)g (the)h(follo)m(wing)e(to)i(transform)f(a)h(one-dimensional)d(complex) 150 5107 y(arra)m(y:)772 5236 y Fp(fftw_complex)44 b(in[N],)i(*out[N];) 772 5340 y(fftw_plan)f(plan;)p eop end %%Page: 53 55 TeXDict begin 53 54 bop 150 -116 a Fv(Chapter)30 b(5:)41 b(Calling)28 b(FFTW)j(from)f(F)-8 b(ortran)1909 b(53)772 403 y Fp(plan)46 b(=)i(fftw_create_plan\(N,FFTW_)o(FORW)o(ARD)o(,FFT)o (W_ES)o(TIM)o(ATE\))o(;)772 506 y(fftw_one\(plan,in,out\);)772 610 y(fftw_destroy_plan\(plan\);)275 749 y Fv(In)29 b(F)-8 b(ortran,)31 b(y)m(ou)g(use)f(the)h(follo)m(wing)e(to)i(accomplish)e (the)h(same)h(thing:)772 883 y Fp(double)46 b(complex)g(in,)h(out)772 986 y(dimension)e(in\(N\),)h(out\(N\))772 1090 y(integer)g(plan)772 1298 y(call)g(fftw_f77_create_plan\(plan,)o(N,FF)o(TW_)o(FORW)o(ARD,)o (FFT)o(W_ES)o(TIMA)o(TE\))772 1402 y(call)g (fftw_f77_one\(plan,in,out\))772 1505 y(call)g (fftw_f77_destroy_plan\(plan)o(\))275 1644 y Fv(Notice)34 b(ho)m(w)g(all)f(routines)f(are)i(called)f(as)h(F)-8 b(ortran)35 b(subroutines,)d(and)i(the)g(plan)e(is)h(returned)f(via)150 1754 y(the)43 b(\014rst)e(argumen)m(t)i(to)g Fp(fftw_f77_create_plan)p Fv(.)72 b Fr(Imp)-5 b(ortant:)72 b Fv(these)43 b(examples)f(assume)g (that)150 1864 y Fp(integer)26 b Fv(is)h(the)i(same)f(size)g(as)g(a)h (p)s(oin)m(ter,)f(and)f(ma)m(y)i(need)f(mo)s(di\014cation)e(on)i(a)h (64-bit)f(mac)m(hine.)40 b(See)150 1973 y(Section)28 b(5.1)h([W)-8 b(rapp)s(er)28 b(Routines],)g(page)h(51,)h(ab)s(o)m(v)m (e.)41 b(T)-8 b(o)29 b(do)f(the)g(same)h(thing,)f(but)f(using)g(8)h (threads)150 2083 y(in)d(parallel)g(\(see)j(Section)f(4.1)h ([Multi-threaded)d(FFTW],)j(page)g(37\),)h(y)m(ou)e(w)m(ould)f(simply)e (replace)j(the)150 2192 y(call)j(to)h Fp(fftw_f77_one)c Fv(with:)772 2326 y Fp(call)46 b(fftw_f77_threads_one\(8,pla)o(n,in)o (,ou)o(t\))275 2465 y Fv(T)-8 b(o)30 b(transform)g(a)h (three-dimensional)d(arra)m(y)j(in-place)e(with)g(C,)h(y)m(ou)h(migh)m (t)f(do:)772 2598 y Fp(fftw_complex)44 b(arr[L][M][N];)772 2702 y(fftwnd_plan)h(plan;)772 2806 y(int)i(n[3])f(=)i({L,M,N};)772 3013 y(plan)e(=)i(fftwnd_create_plan\(3,n,F)o(FTW_)o(FOR)o(WARD)o(,) 2013 3117 y(FFTW_ESTIMATE)c(|)j(FFTW_IN_PLACE\);)772 3221 y(fftwnd_one\(plan,)c(arr,)k(0\);)772 3325 y (fftwnd_destroy_plan\(plan)o(\);)275 3464 y Fv(In)29 b(F)-8 b(ortran,)31 b(y)m(ou)g(w)m(ould)e(use)h(this)g(instead:)772 3597 y Fp(double)46 b(complex)g(arr)772 3701 y(dimension)f (arr\(L,M,N\))772 3805 y(integer)h(n)772 3909 y(dimension)f(n\(3\))772 4012 y(integer)h(plan)772 4220 y(n\(1\))g(=)i(L)772 4324 y(n\(2\))e(=)i(M)772 4427 y(n\(3\))e(=)i(N)772 4531 y(call)e (fftwnd_f77_create_plan\(pla)o(n,3,)o(n,F)o(FTW_)o(FORW)o(ARD)o(,)724 4635 y(+)1336 b(FFTW_ESTIMATE)44 b(+)k(FFTW_IN_PLACE\))772 4739 y(call)e(fftwnd_f77_one\(plan,)d(arr,)j(0\))772 4843 y(call)g(fftwnd_f77_destroy_plan\(pl)o(an\))275 4982 y Fv(Instead)29 b(of)h(calling)e Fp(fftwnd_f77_create_plan\()o (plan)o(,3,n)o(,..)o(.\))p Fv(,)c(w)m(e)30 b(could)e(also)i(ha)m(v)m(e) h(called)150 5091 y Fp(fftw3d_f77_create_plan\(p)o(lan,)o(L,M,)o(N,.)o (..\))p Fv(.)275 5230 y(Note)j(that)g(w)m(e)g(pass)f(the)h(arra)m(y)g (dimensions)d(in)h(the)h Fp(")p Fv(natural)p Fp(")f Fv(order;)j(also)e (note)h(that)g(the)g(last)150 5340 y(argumen)m(t)d(to)g Fp(fftwnd_f77)d Fv(is)h(ignored)g(since)h(the)h(transform)e(is)h Fp(FFTW_IN_PLACE)p Fv(.)p eop end %%Page: 54 56 TeXDict begin 54 55 bop 150 -116 a Fv(54)3232 b(FFTW)275 299 y(T)-8 b(o)30 b(transform)g(a)h(one-dimensional)d(real)i(arra)m(y)h (in)e(F)-8 b(ortran,)31 b(y)m(ou)g(migh)m(t)f(do:)772 428 y Fp(double)46 b(precision)f(in,)i(out)772 531 y(dimension)e (in\(N\),)h(out\(N\))772 635 y(integer)g(plan)772 843 y(call)g(rfftw_f77_create_plan\(plan)o(,N,F)o(FTW)o(_REA)o(L_TO)o(_CO)o (MPLE)o(X,)724 946 y(+)1288 b(FFTW_ESTIMATE\))772 1050 y(call)46 b(rfftw_f77_one\(plan,in,out\))772 1154 y(call)g (rfftw_f77_destroy_plan\(pla)o(n\))275 1289 y Fv(T)-8 b(o)30 b(transform)g(a)h(t)m(w)m(o-dimensional)e(real)h(arra)m(y)-8 b(,)32 b(out)e(of)h(place,)f(y)m(ou)h(migh)m(t)f(use)g(the)h(follo)m (wing:)772 1417 y Fp(double)46 b(precision)f(in)772 1521 y(double)h(complex)g(out)772 1625 y(dimension)f(in\(M,N\),)h(out\(M/2)f (+)j(1,)f(N\))772 1729 y(integer)f(plan)772 1936 y(call)g (rfftw2d_f77_create_plan\(pl)o(an,M)o(,N,)o(FFTW)o(_REA)o(L_T)o(O_CO)o (MPLE)o(X,)724 2040 y(+)1384 b(FFTW_ESTIMATE\))772 2144 y(call)46 b(rfftwnd_f77_one_real_to_co)o(mple)o(x\(p)o(lan,)41 b(in,)47 b(out\))772 2247 y(call)f(rfftwnd_f77_destroy_plan\(p)o(lan\)) 275 2382 y Fn(Imp)s(ortan)m(t:)40 b Fv(Notice)30 b(that)g(it)f(is)f (the)i Fr(\014rst)38 b Fv(dimension)27 b(of)i(the)h(complex)f(output)g (arra)m(y)h(that)f(is)g(cut)150 2491 y(in)38 b(half)g(in)g(F)-8 b(ortran,)42 b(rather)d(than)g(the)h(last)f(dimension)e(as)i(in)f(C.)h (This)e(is)i(a)g(consequence)h(of)g(the)150 2601 y(wrapp)s(er)29 b(routines)h(rev)m(ersing)g(the)i(order)e(of)h(the)g(arra)m(y)h (dimensions)c(passed)j(to)g(FFTW)h(so)f(that)h(the)150 2711 y(F)-8 b(ortran)31 b(program)f(can)h(use)f(its)g(ordinary)e (column-ma)5 b(jor)30 b(order.)p eop end %%Page: 55 57 TeXDict begin 55 56 bop 150 -116 a Fv(Chapter)30 b(6:)41 b(Installation)29 b(and)g(Customization)1808 b(55)150 299 y Fs(6)80 b(Installation)56 b(and)d(Customization)275 520 y Fv(This)32 b(c)m(hapter)j(describ)s(es)e(the)h(installation)f (and)h(customization)g(of)g(FFTW,)i(the)e(latest)h(v)m(ersion)150 629 y(of)c(whic)m(h)e(ma)m(y)i(b)s(e)e(do)m(wnloaded)h(from)g(the)g (FFTW)h(home)g(page)g(\()p Fp(http://www.fftw.org)p Fv(\).)275 761 y(As)e(distributed,)e(FFTW)j(mak)m(es)h(v)m(ery)f(few)f (assumptions)f(ab)s(out)h(y)m(our)h(system.)40 b(All)29 b(y)m(ou)h(need)f(is)150 871 y(an)i(ANSI)g(C)g(compiler)e(\()p Fp(gcc)i Fv(is)f(\014ne,)h(although)f(v)m(endor-pro)m(vided)g (compilers)g(often)i(pro)s(duce)e(faster)150 980 y(co)s(de\).)50 b(Ho)m(w)m(ev)m(er,)36 b(installation)31 b(of)i(FFTW)h(is)e(somewhat)i (simpler)d(if)h(y)m(ou)i(ha)m(v)m(e)g(a)f(Unix)g(or)g(a)g(GNU)150 1090 y(system,)46 b(suc)m(h)d(as)g(Lin)m(ux.)77 b(In)42 b(this)g(c)m(hapter,)47 b(w)m(e)d(\014rst)e(describ)s(e)f(the)i (installation)e(of)i(FFTW)h(on)150 1200 y(Unix)33 b(and)h(non-Unix)f (systems.)53 b(W)-8 b(e)36 b(then)e(describ)s(e)f(ho)m(w)i(y)m(ou)g (can)f(customize)h(FFTW)g(to)h(ac)m(hiev)m(e)150 1309 y(b)s(etter)41 b(p)s(erformance.)71 b(Sp)s(eci\014cally)-8 b(,)41 b(y)m(ou)g(can)g(I\))g(enable)f Fp(gcc)p Fv(/x86-sp)s(eci\014c)g (hac)m(ks)i(that)f(impro)m(v)m(e)150 1419 y(p)s(erformance)26 b(on)g(P)m(en)m(tia)h(and)e(P)m(en)m(tiumPro's;)j(I)s(I\))e(adapt)g (FFTW)h(to)g(use)f(the)h(high-resolution)d(clo)s(c)m(k)150 1528 y(of)i(y)m(our)h(mac)m(hine,)g(if)e(an)m(y;)j(I)s(I)s(I\))d(pro)s (duce)g(co)s(de)i(\()p Fr(c)-5 b(o)g(delets)7 b Fv(\))29 b(to)e(supp)s(ort)d(fast)j(transforms)e(of)h(sizes)g(that)150 1638 y(are)31 b(not)f(supp)s(orted)f(e\016cien)m(tly)h(b)m(y)g(the)h (standard)e(FFTW)i(distribution.)150 1887 y Fu(6.1)68 b(Installation)47 b(on)e(Unix)275 2077 y Fv(FFTW)24 b(comes)g(with)e(a) h Fp(configure)e Fv(program)i(in)f(the)i(GNU)g(st)m(yle.)38 b(Installation)22 b(can)i(b)s(e)e(as)i(simple)150 2187 y(as:)390 2313 y Fp(./configure)390 2417 y(make)390 2521 y(make)47 b(install)275 2652 y Fv(This)24 b(will)h(build)e(the)k (unipro)s(cessor)e(complex)h(and)g(real)h(transform)f(libraries)e (along)j(with)e(the)i(test)150 2762 y(programs.)37 b(W)-8 b(e)22 b(strongly)d(recommend)i(that)g(y)m(ou)f(use)g(GNU)h Fp(make)f Fv(if)f(it)h(is)f(a)m(v)-5 b(ailable;)24 b(on)c(some)h (systems)150 2872 y(it)37 b(is)g(called)g Fp(gmake)p Fv(.)62 b(The)37 b(\\)p Fp(make)30 b(install)p Fv(")36 b(command)i(installs)d(the)j(\013t)m(w)g(and)f(r\013t)m(w)h(libraries)d (in)150 2981 y(standard)28 b(places,)i(and)e(t)m(ypically)g(requires)g (ro)s(ot)i(privileges)d(\(unless)h(y)m(ou)h(sp)s(ecify)f(a)h (di\013eren)m(t)g(install)150 3091 y(directory)34 b(with)e(the)j Fp(--prefix)c Fv(\015ag)k(to)f Fp(configure)p Fv(\).)50 b(Y)-8 b(ou)35 b(can)f(also)g(t)m(yp)s(e)g(\\)p Fp(make)c(check)p Fv(")j(to)i(put)150 3200 y(the)f(FFTW)h(test)f(programs)g(through)f (their)g(paces.)51 b(If)34 b(y)m(ou)g(ha)m(v)m(e)h(problems)d(during)g (con\014guration)150 3310 y(or)i(compilation,)g(y)m(ou)h(ma)m(y)g(w)m (an)m(t)g(to)g(run)e(\\)p Fp(make)d(distclean)p Fv(")i(b)s(efore)i (trying)f(again;)k(this)c(ensures)150 3419 y(that)e(y)m(ou)g(don't)f (ha)m(v)m(e)i(an)m(y)e(stale)h(\014les)e(left)h(o)m(v)m(er)i(from)e (previous)f(compilation)g(attempts.)275 3551 y(The)g Fp(configure)f Fv(script)i(kno)m(ws)g(go)s(o)s(d)g Fp(CFLAGS)f Fv(\(C)h(compiler)f(\015ags\))i(for)f(a)h(few)f(systems.)41 b(If)30 b(y)m(our)150 3661 y(system)g(is)f(not)h(kno)m(wn,)g(the)g Fp(configure)d Fv(script)i(will)e(prin)m(t)i(out)h(a)g(w)m(arning.)2858 3628 y Fo(1)2935 3661 y Fv(In)f(this)g(case,)i(y)m(ou)g(can)150 3771 y(compile)e(FFTW)i(with)e(the)i(command)390 3897 y Fp(make)47 b(CFLAGS="")275 4028 y Fv(If)24 b(y)m(ou)h(do)g(\014nd)e(an)i(optimal)f(set)i(of)f Fp(CFLAGS)e Fv(for)i(y)m(our)f(system,)j(please)e(let)f(us)h(kno)m(w)g (what)f(they)i(are)150 4138 y(\(along)31 b(with)e(the)h(output)g(of)h Fp(config.guess)p Fv(\))c(so)k(that)g(w)m(e)g(can)f(include)f(them)h (in)f(future)g(releases.)275 4270 y(The)95 b Fp(configure)f Fv(program)h(supp)s(orts)f(all)h(the)i(standard)e(\015ags)h(de\014ned)f (b)m(y)h(the)150 4379 y(GNU)67 b(Co)s(ding)e(Standards;)84 b(see)67 b(the)g Fp(INSTALL)e Fv(\014le)h(in)f(FFTW)j(or)e(the)h(GNU)h (w)m(eb)e(page)150 4489 y(\()p Fp(http://www.gnu.org/prep/st)o(and)o (ards)o(_toc)o(.ht)o(ml)p Fv(\).)93 b(Note)51 b(esp)s(ecially)c Fp(--help)h Fv(to)j(list)d(all)150 4599 y(\015ags)32 b(and)f Fp(--enable-shared)d Fv(to)33 b(create)g(shared,)f(rather)g (than)g(static,)h(libraries.)43 b Fp(configure)29 b Fv(also)150 4708 y(accepts)j(a)e(few)h(FFTW-sp)s(eci\014c)f(\015ags,)h (particularly:)225 4840 y Ft(\017)60 b Fp(--enable-float)28 b Fv(Pro)s(duces)j(a)i(single-precision)c(v)m(ersion)i(of)h(FFTW)h(\()p Fp(float)p Fv(\))e(instead)h(of)g(the)330 4950 y(default)24 b(double-precision)d(\()p Fp(double)p Fv(\).)38 b(See)24 b(Section)g(6.3)i([Installing)c(FFTW)j(in)e(b)s(oth)h(single)f(and)330 5059 y(double)29 b(precision],)g(page)i(57.)p 150 5149 1200 4 v 199 5217 a Fo(1)275 5249 y Fj(Eac)n(h)18 b(v)n(ersion)h(of)g Fi(cc)f Fj(seems)g(to)h(ha)n(v)n(e)f(its)g(o)n(wn)h(magic)f(incan)n (tation)h(to)g(get)f(the)g(fastest)i(co)r(de)f(most)e(of)i(the)f (time|y)n(ou'd)275 5340 y(think)24 b(that)i(p)r(eople)g(w)n(ould)g(ha)n (v)n(e)f(agreed)h(up)r(on)f(some)h(con)n(v)n(en)n(tion,)f(e.g.)35 b Fi("-Omax")p Fj(,)28 b(b)n(y)d(no)n(w.)p eop end %%Page: 56 58 TeXDict begin 56 57 bop 150 -116 a Fv(56)3232 b(FFTW)225 299 y Ft(\017)60 b Fp(--enable-type-prefix)34 b Fv(Adds)k(a)i(`)p Fp(d)p Fv(')g(or)g(`)p Fp(s)p Fv(')f(pre\014x)g(to)h(all)e(installed)g (libraries)e(and)j(header)330 408 y(\014les)29 b(to)h(indicate)f(the)h (\015oating-p)s(oin)m(t)f(precision.)39 b(See)30 b(Section)g(6.3)h ([Installing)d(FFTW)i(in)f(b)s(oth)330 518 y(single)c(and)g(double)f (precision],)i(page)g(57.)40 b(\()p Fp(--enable-type-prefix=)20 b Fv(lets)25 b(y)m(ou)i(add)330 628 y(an)j(arbitrary)f (pre\014x.\))40 b(By)31 b(default,)f(no)g(pre\014x)f(is)h(used.)225 758 y Ft(\017)60 b Fp(--enable-threads)24 b Fv(Enables)j(compilation)g (and)g(installation)g(of)h(the)g(FFTW)h(threads)f(library)330 867 y(\(see)36 b(Section)e(4.1)i([Multi-threaded)e(FFTW],)i(page)f (37\),)i(whic)m(h)d(pro)m(vides)g(a)h(simple)d(in)m(terface)330 977 y(to)43 b(parallel)e(transforms)g(for)i(SMP)f(systems.)77 b(\(By)43 b(default,)i(the)d(threads)g(routines)g(are)h(not)330 1086 y(compiled.\))225 1217 y Ft(\017)60 b Fp(--with-openmp)p Fv(,)44 b Fp(--with-sgimp)d Fv(In)j(conjunction)f(with)g Fp(--enable-threads)p Fv(,)g(causes)i(the)330 1326 y(m)m(ulti-threaded) 27 b(FFTW)j(library)c(to)j(use)g(Op)s(enMP)e(or)i(SGI)f(MP)h(compiler)e (directiv)m(es)h(in)f(order)330 1436 y(to)g(induce)e(parallelism,)g (rather)h(than)h(spa)m(wning)e(its)h(o)m(wn)g(threads)g(directly)-8 b(.)39 b(\(Useful)26 b(esp)s(ecially)330 1545 y(for)i(programs)f (already)g(emplo)m(ying)g(suc)m(h)g(directiv)m(es,)h(in)f(order)g(to)i (minimize)c(con\015icts)i(b)s(et)m(w)m(een)330 1655 y(di\013eren)m(t)j (parallelization)e(mec)m(hanisms.\))225 1785 y Ft(\017)60 b Fp(--enable-mpi)38 b Fv(Enables)h(compilation)h(and)g(installation)f (of)i(the)g(FFTW)h(MPI)e(library)f(\(see)330 1895 y(Section)27 b(4.2)i([MPI)e(FFTW],)i(page)f(40\),)i(whic)m(h)c(pro)m(vides)g (parallel)g(transforms)g(for)i(distributed-)330 2004 y(memory)i(systems)h(with)e(MPI.)h(\(By)h(default,)f(the)h(MPI)f (routines)f(are)i(not)g(compiled.\))225 2134 y Ft(\017)60 b Fp(--disable-fortran)19 b Fv(Disables)k(inclusion)e(of)j(F)-8 b(ortran-callable)24 b(wrapp)s(er)e(routines)h(\(see)i(Chap-)330 2244 y(ter)32 b(5)h([Calling)d(FFTW)i(from)g(F)-8 b(ortran],)33 b(page)g(51\))g(in)e(the)h(standard)f(FFTW)i(libraries.)42 b(These)330 2353 y(wrapp)s(er)e(routines)g(increase)h(the)h(library)d (size)i(b)m(y)g(only)g(a)g(negligible)e(amoun)m(t,)45 b(so)d(they)g(are)330 2463 y(included)30 b(b)m(y)j(default)g(as)g(long) g(as)g(the)h Fp(configure)c Fv(script)i(\014nds)g(a)h(F)-8 b(ortran)34 b(compiler)e(on)h(y)m(our)330 2573 y(system.)225 2703 y Ft(\017)60 b Fp(--with-gcc)32 b Fv(Enables)h(the)i(use)g(of)g Fp(gcc)p Fv(.)53 b(By)35 b(default,)g(FFTW)h(uses)e(the)h(v)m (endor-supplied)d Fp(cc)330 2812 y Fv(compiler)22 b(if)h(presen)m(t.)39 b(Unfortunately)-8 b(,)25 b Fp(gcc)e Fv(pro)s(duces)f(slo)m(w)m(er)i (co)s(de)g(than)g Fp(cc)f Fv(on)h(man)m(y)g(systems.)225 2942 y Ft(\017)60 b Fp(--enable-i386-hacks)25 b Fv(See)31 b(Section)f(6.4)h([gcc)h(and)e(P)m(en)m(tium)g(hac)m(ks],)h(page)g(57,) h(b)s(elo)m(w.)225 3072 y Ft(\017)60 b Fp(--enable-pentium-timer)24 b Fv(See)31 b(Section)f(6.4)i([gcc)f(and)f(P)m(en)m(tium)g(hac)m(ks],)i (page)f(57,)g(b)s(elo)m(w.)275 3223 y(T)-8 b(o)22 b(force)h Fp(configure)d Fv(to)k(use)e(a)h(particular)d(C)i(compiler)f(\(instead) h(of)h(the)g(default,)g(usually)d Fp(cc)p Fv(\),)k(set)150 3333 y(the)i(en)m(vironmen)m(t)f(v)-5 b(ariable)25 b Fp(CC)g Fv(to)h(the)g(name)g(of)g(the)g(desired)e(compiler)g(b)s(efore) h(running)e Fp(configure)p Fv(;)150 3442 y(y)m(ou)31 b(ma)m(y)g(also)f(need)g(to)h(set)g(the)g(\015ags)f(via)g(the)h(v)-5 b(ariable)29 b Fp(CFLAGS)p Fv(.)150 3686 y Fu(6.2)68 b(Installation)47 b(on)e(non-Unix)g(Systems)275 3874 y Fv(It)22 b(is)f(quite)h(straigh)m(tforw)m(ard)g(to)h(install)d(FFTW)j (ev)m(en)h(on)e(non-Unix)f(systems)h(lac)m(king)g(the)h(niceties)150 3984 y(of)33 b(the)g Fp(configure)e Fv(script.)47 b(The)32 b(FFTW)i(Home)g(P)m(age)g(ma)m(y)g(include)c(some)k(FFTW)f(pac)m(k)-5 b(ages)35 b(pre-)150 4094 y(con\014gured)29 b(for)h(particular)f (systems/compilers,)g(and)h(also)g(con)m(tains)h(installation)d(notes)i (sen)m(t)h(in)e(b)m(y)150 4203 y(users.)40 b(All)30 b(y)m(ou)h(really)e (need)h(to)i(do,)e(though,)h(is)f(to)h(compile)e(all)h(of)h(the)f Fp(.c)g Fv(\014les)g(in)f(the)i(appropriate)150 4313 y(directories)39 b(of)i(the)g(FFTW)g(pac)m(k)-5 b(age.)72 b(\(Y)-8 b(ou)42 b(needn't)e(w)m(orry)g(ab)s(out)g(the)h(man)m(y)f (extraneous)h(\014les)150 4422 y(lying)29 b(around.\))275 4552 y(F)-8 b(or)37 b(the)g(complex)f(transforms,)i(compile)e(all)f(of) i(the)g Fp(.c)f Fv(\014les)g(in)f(the)i Fp(fftw)f Fv(directory)g(and)g (link)150 4662 y(them)j(in)m(to)h(a)g(library)-8 b(.)66 b(Similarly)-8 b(,)38 b(for)h(the)h(real)f(transforms,)i(compile)e(all) f(of)i(the)f Fp(.c)g Fv(\014les)g(in)f(the)150 4772 y Fp(rfftw)31 b Fv(directory)h(in)m(to)h(a)g(library)-8 b(.)46 b(Note)34 b(that)f(these)g(sources)g Fp(#include)d Fv(v)-5 b(arious)32 b(\014les)g(in)f(the)i Fp(fftw)150 4881 y Fv(and)k Fp(rfftw)f Fv(directories,)j(so)f(y)m(ou)g(ma)m(y)g (need)f(to)h(set)h(up)d(the)i Fp(#include)d Fv(paths)i(for)h(y)m(our)f (compiler)150 4991 y(appropriately)-8 b(.)38 b(Be)27 b(sure)f(to)i(enable)e(the)g(highest-p)s(ossible)e(lev)m(el)i(of)h (optimization)e(in)h(y)m(our)g(compiler.)275 5121 y(By)i(default,)h (FFTW)g(is)f(compiled)f(for)h(double-precision)e(transforms.)39 b(T)-8 b(o)29 b(w)m(ork)g(in)e(single)h(preci-)150 5230 y(sion)j(rather)i(than)f(double)e(precision,)i Fp(#define)e Fv(the)j(sym)m(b)s(ol)e Fp(FFTW_ENABLE_FLOAT)c Fv(in)k Fp(fftw.h)g Fv(\(in)150 5340 y(the)g Fp(fftw)e Fv(directory\))h(and)g (\(re\)compile)g(FFTW.)p eop end %%Page: 57 59 TeXDict begin 57 58 bop 150 -116 a Fv(Chapter)30 b(6:)41 b(Installation)29 b(and)g(Customization)1808 b(57)275 299 y(These)36 b(libraries)e(should)h(b)s(e)h(link)m(ed)f(with)g(an)m (y)i(program)g(that)g(uses)f(the)h(corresp)s(onding)e(trans-)150 408 y(forms.)44 b(The)31 b(required)f(header)h(\014les,)g Fp(fftw.h)f Fv(and)h Fp(rfftw.h)p Fv(,)f(are)i(lo)s(cated)g(in)e(the)i Fp(fftw)e Fv(and)h Fp(rfftw)150 518 y Fv(directories)h(resp)s(ectiv)m (ely;)j(y)m(ou)e(ma)m(y)h(w)m(an)m(t)h(to)f(put)e(them)i(with)e(the)h (libraries,)f(or)h(wherev)m(er)g(header)150 628 y(\014les)c(normally)g (go)i(on)f(y)m(our)h(system.)275 771 y(FFTW)44 b(includes)d(test)k (programs,)i Fp(fftw_test)41 b Fv(and)i Fp(rfftw_test)p Fv(,)i(in)d(the)i Fp(tests)f Fv(directory)-8 b(.)150 881 y(These)33 b(are)g(compiled)f(and)g(link)m(ed)f(lik)m(e)i(an)m(y)g (program)g(using)e(FFTW,)j(except)g(that)g(they)f(use)g(addi-)150 991 y(tional)g(header)h(\014les)f(lo)s(cated)h(in)f(the)h Fp(fftw)f Fv(and)g Fp(rfftw)g Fv(directories,)h(so)g(y)m(ou)h(will)c (need)j(to)g(set)h(y)m(our)150 1100 y(compiler)41 b Fp(#include)e Fv(paths)j(appropriately)-8 b(.)74 b Fp(fftw_test)40 b Fv(is)h(compiled)f(from)i Fp(fftw_test.c)d Fv(and)150 1210 y Fp(test_main.c)p Fv(,)25 b(while)h Fp(rfftw_test)f Fv(is)i(compiled)f(from)i Fp(rfftw_test.c)c Fv(and)j Fp(test_main.c)p Fv(.)37 b(When)150 1319 y(y)m(ou)i(run)f(these)h (programs,)j(y)m(ou)d(will)d(b)s(e)j(prompted)f(in)m(teractiv)m(ely)h (for)g(v)-5 b(arious)38 b(p)s(ossible)e(tests)k(to)150 1429 y(p)s(erform;)29 b(see)i(also)f Fp(tests/README)e Fv(for)i(more)g(information.)150 1710 y Fu(6.3)68 b(Installing)47 b(FFTW)c(in)i(b)t(oth)f(single)i(and)f(double)g(precision)275 1912 y Fv(It)f(is)f(often)i(useful)e(to)i(install)d(b)s(oth)h(single-)h (and)f(double-precision)f(v)m(ersions)h(of)i(the)f(FFTW)150 2021 y(libraries)31 b(on)j(the)g(same)g(mac)m(hine,)h(and)e(w)m(e)h (pro)m(vide)f(a)i(con)m(v)m(enien)m(t)g(mec)m(hanism)e(for)h(ac)m (hieving)f(this)150 2131 y(on)d(Unix)f(systems.)275 2275 y(When)h(the)i Fp(--enable-type-prefix)25 b Fv(option)31 b(of)g(con\014gure)g(is)f(used,)h(the)g(FFTW)h(libraries)d(and)150 2384 y(header)j(\014les)g(are)h(installed)d(with)h(a)i(pre\014x)e(of)i (`)p Fp(d)p Fv(')g(or)f(`)p Fp(s)p Fv(',)i(dep)s(ending)c(up)s(on)h (whether)h(y)m(ou)g(compiled)150 2494 y(in)c(double)g(or)h(single)f (precision.)38 b(Then,)29 b(instead)f(of)i(linking)c(y)m(our)j(program) g(with)f Fp(-lrfftw)g(-lfftw)p Fv(,)150 2603 y(for)39 b(example,)j(y)m(ou)e(w)m(ould)f(link)e(with)h Fp(-ldrfftw)29 b(-ldfftw)37 b Fv(to)k(use)e(the)h(double-precision)c(v)m(ersion)150 2713 y(or)e(with)g Fp(-lsrfftw)28 b(-lsfftw)k Fv(to)k(use)e(the)g (single-precision)e(v)m(ersion.)53 b(Also,)35 b(y)m(ou)g(w)m(ould)e Fp(#include)150 2823 y()28 b Fv(or)i Fp()e Fv(instead)h(of)i Fp()p Fv(,)d(and)i(so)g(on.)275 2966 y Fr(The)j(names)g(of)g(FFTW)h(functions,)f(data)h(typ)-5 b(es,)34 b(and)g(c)-5 b(onstants)34 b(r)-5 b(emain)34 b(unchange)-5 b(d!)54 b Fv(Y)-8 b(ou)31 b(still)150 3076 y(call,)24 b(for)f(instance,)i Fp(fftw_one)c Fv(and)i(not)h Fp(dfftw_one)p Fv(.)35 b(Only)22 b(the)i(names)f(of)h(header)f(\014les) f(and)h(libraries)150 3186 y(are)34 b(mo)s(di\014ed.)47 b(One)32 b(consequence)i(of)g(this)e(is)g(that)i Fr(you)h Fn(cannot)h Fr(use)f(b)-5 b(oth)36 b(the)g(single-)f(and)h(double-)150 3295 y(pr)-5 b(e)g(cision)27 b(FFTW)f(libr)-5 b(aries)27 b(in)e(the)h(same)g(pr)-5 b(o)g(gr)g(am,)30 b(simultane)-5 b(ously,)26 b Fv(as)d(the)g(function)f(names)g(w)m(ould)150 3405 y(con\015ict.)275 3549 y(So,)35 b(to)g(install)d(b)s(oth)i(the)g (single-)f(and)h(double-precision)e(libraries)f(on)j(the)h(same)f(mac)m (hine,)i(y)m(ou)150 3658 y(w)m(ould)29 b(do:)390 3796 y Fp(./configure)45 b(--enable-type-prefix)d Fr([)32 b(other)i(options)g(])390 3900 y Fp(make)390 4004 y(make)47 b(install)390 4108 y(make)g(clean)390 4211 y(./configure)e (--enable-float)f(--enable-type-prefix)e Fr([)32 b(other)i(options)g(]) 390 4315 y Fp(make)390 4419 y(make)47 b(install)150 4700 y Fu(6.4)68 b Fb(gcc)43 b Fu(and)i(P)l(en)l(tium)h(hac)l(ks)275 4902 y Fv(The)22 b Fp(configure)e Fv(option)i Fp(--enable-i386-hacks)c Fv(enables)k(sp)s(eci\014c)f(optimizations)h(for)g(the)h(P)m(en-)150 5011 y(tium)g(and)i(later)f(x86)i(CPUs)e(under)f(gcc,)k(whic)m(h)d(can) h(signi\014can)m(tly)e(impro)m(v)m(e)h(p)s(erformance)g(of)h(double-) 150 5121 y(precision)f(transforms.)39 b(Sp)s(eci\014cally)-8 b(,)24 b(w)m(e)j(ha)m(v)m(e)g(tested)g(these)f(hac)m(ks)h(on)f(Lin)m (ux)e(with)h Fp(gcc)g Fv(2.[789])k(and)150 5230 y(v)m(ersions)j(of)i Fp(egcs)d Fv(since)i(1.0.3.)50 b(These)33 b(optimizations)f(a\013ect)i (only)f(the)g(p)s(erformance)f(and)g(not)i(the)150 5340 y(correctness)d(of)g(FFTW)g(\(i.e.)41 b(it)30 b(is)f(alw)m(a)m(ys)i (safe)g(to)g(try)f(them)g(out\).)p eop end %%Page: 58 60 TeXDict begin 58 59 bop 150 -116 a Fv(58)3232 b(FFTW)275 299 y(These)31 b(hac)m(ks)i(pro)m(vide)e(a)h(w)m(ork)-5 b(around)31 b(to)i(the)f(incorrect)g(alignmen)m(t)g(of)g(lo)s(cal)f Fp(double)f Fv(v)-5 b(ariables)150 408 y(in)31 b Fp(gcc)p Fv(.)47 b(The)32 b(compiler)f(aligns)h(these)h(v)-5 b(ariables)31 b(to)i(m)m(ultiples)e(of)h(4)h(b)m(ytes,)h(but)e(execution)h(is)f(m)m (uc)m(h)150 518 y(faster)k(\(on)g(P)m(en)m(tium)g(and)f(P)m(en)m (tiumPro\))h(if)f Fp(double)p Fv(s)f(are)i(aligned)f(to)h(a)h(m)m (ultiple)c(of)j(8)h(b)m(ytes.)58 b(By)150 628 y(carefully)25 b(coun)m(ting)h(the)g(n)m(um)m(b)s(er)f(of)h(v)-5 b(ariables)25 b(allo)s(cated)h(b)m(y)g(the)h(compiler)d(in)h(p)s(erformance-critical) 150 737 y(regions)i(of)g(the)h(co)s(de,)g(w)m(e)g(ha)m(v)m(e)h(b)s(een) d(able)h(to)h(in)m(tro)s(duce)e(dumm)m(y)h(allo)s(cations)f(\(using)g Fp(alloca)p Fv(\))g(that)150 847 y(align)34 b(the)g(stac)m(k)j(prop)s (erly)-8 b(.)51 b(The)35 b(hac)m(k)g(dep)s(ends)e(crucially)g(on)h(the) h(compiler)e(\015ags)i(that)g(are)g(used.)150 956 y(F)-8 b(or)31 b(example,)f(it)g(w)m(on't)h(w)m(ork)g(without)e Fp(-fomit-frame-pointer)p Fv(.)275 1086 y(In)86 b(principle,)98 b(these)87 b(hac)m(ks)h(are)f(no)g(longer)f(required)g(under)f Fp(gcc)h Fv(v)m(ersions)g(2.95)150 1195 y(and)96 b(later,)112 b(whic)m(h)95 b(automatically)h(align)g(the)g(stac)m(k)i(correctly)e (\(see)h Fp(-mpreferred-)150 1305 y(stack-boundary)76 b Fv(in)j(the)h Fp(gcc)f Fv(man)m(ual\).)190 b(Ho)m(w)m(ev)m(er,)95 b(w)m(e)80 b(ha)m(v)m(e)i(encoun)m(tered)e(a)h(bug)150 1415 y(\()p Fp(http://egcs.cygnus.com/ml/)o(gcc)o(-bug)o(s/19)o(99-)o (11/m)o(sg00)o(259)o(.htm)o(l)p Fv(\))145 b(in)150 b(the)g(stac)m(k)150 1524 y(alignmen)m(t)39 b(of)g(v)m(ersions)g(2.95.[012])k(that)d(causes) g(FFTW's)g(stac)m(k)h(to)f(b)s(e)f(misaligned)e(under)h(some)150 1634 y(circumstances.)72 b(The)40 b Fp(configure)f Fv(script)h (automatically)g(detects)i(this)e(bug)h(and)f(disables)f Fp(gcc)p Fv('s)150 1743 y(stac)m(k)32 b(alignmen)m(t)e(in)f(fa)m(v)m (or)i(of)g(our)f(o)m(wn)g(hac)m(ks)h(when)e Fp(--enable-i386-hacks)c Fv(is)30 b(used.)275 1873 y(The)k Fp(fftw_test)e Fv(program)i(outputs)g (sp)s(eed)g(measuremen)m(ts)g(that)i(y)m(ou)e(can)h(use)g(to)g(see)g (if)e(these)150 1982 y(hac)m(ks)e(are)g(b)s(ene\014cial.)275 2112 y(The)36 b Fp(configure)e Fv(option)i Fp(--enable-pentium-timer)30 b Fv(enables)36 b(the)h(use)f(of)h(the)f(P)m(en)m(tium)h(and)150 2221 y(P)m(en)m(tiumPro)g(cycle)g(coun)m(ter)h(for)f(timing)e(purp)s (oses.)59 b(In)37 b(order)f(to)i(get)h(correct)f(results,)g(y)m(ou)f(m) m(ust)150 2331 y(de\014ne)f Fp(FFTW_CYCLES_PER_SEC)31 b Fv(in)k Fp(fftw/config.h)e Fv(to)38 b(b)s(e)d(the)i(clo)s(c)m(k)g(sp) s(eed)f(of)h(y)m(our)f(pro)s(cessor;)150 2440 y(the)31 b(resulting)e(FFTW)j(library)d(will)f(b)s(e)i(nonp)s(ortable.)41 b(The)31 b(use)f(of)h(this)f(option)h(is)f(deprecated.)43 b(On)150 2550 y(serious)25 b(op)s(erating)h(systems)g(\(suc)m(h)g(as)g (Lin)m(ux\),)g(FFTW)h(uses)f Fp(gettimeofday\(\))p Fv(,)d(whic)m(h)i (has)h(enough)150 2660 y(resolution)34 b(and)g(is)g(p)s(ortable.)54 b(\(Note)37 b(that)e(Win32)g(has)g(its)g(o)m(wn)g(high-resolution)d (timing)i(routines)150 2769 y(as)d(w)m(ell.)39 b(FFTW)31 b(con)m(tains)g(unsupp)s(orted)c(co)s(de)k(to)g(use)f(these)h (routines.\))150 3011 y Fu(6.5)68 b(Customizing)46 b(the)f(timer)275 3199 y Fv(FFTW)32 b(needs)g(a)h(reasonably-precise)e(clo)s(c)m(k)i(in)e (order)h(to)h(\014nd)d(the)j(optimal)e(w)m(a)m(y)i(to)g(compute)g(a)150 3308 y(transform.)39 b(On)27 b(Unix)f(systems,)i Fp(configure)d Fv(lo)s(oks)i(for)h Fp(gettimeofday)c Fv(and)j(other)h(system-sp)s (eci\014c)150 3418 y(timers.)81 b(If)43 b(it)h(do)s(es)g(not)g(\014nd)e (an)m(y)j(high)d(resolution)h(clo)s(c)m(k,)48 b(it)43 b(defaults)g(to)i(using)e(the)h Fp(clock\(\))150 3527 y Fv(function,)35 b(whic)m(h)e(is)h(v)m(ery)h(p)s(ortable,)g(but)f (forces)i(FFTW)f(to)h(run)d(for)i(a)g(long)f(time)h(in)e(order)h(to)i (get)150 3637 y(reliable)28 b(measuremen)m(ts.)275 3766 y(If)23 b(y)m(our)i(mac)m(hine)f(supp)s(orts)e(a)j(high-resolution)d (clo)s(c)m(k)j(not)f(recognized)h(b)m(y)f(FFTW,)h(it)f(is)f(therefore) 150 3876 y(advisable)35 b(to)i(use)e(it.)58 b(Y)-8 b(ou)36 b(m)m(ust)g(edit)g Fp(fftw/fftw-int.h)p Fv(.)54 b(There)35 b(are)i(a)f(few)g(macros)h(y)m(ou)f(m)m(ust)150 3985 y(rede\014ne.)46 b(The)32 b(co)s(de)h(is)e(do)s(cumen)m(ted)h(and)g (should)e(b)s(e)i(self-explanatory)-8 b(.)47 b(\(By)33 b(the)g(w)m(a)m(y)-8 b(,)34 b Fp(fftw-int)150 4095 y Fv(stands)28 b(for)g Fp(fftw-internal)p Fv(,)d(but)j(for)g(some)g (inexplicable)e(reason)i(p)s(eople)g(are)g(still)e(using)h(primitiv)m (e)150 4205 y(systems)j(with)f(8.3)j(\014lenames.\))275 4334 y(Ev)m(en)e(if)g(y)m(ou)h(don't)g(install)e(high-resolution)f (timing)h(co)s(de,)j(w)m(e)f(still)d(recommend)j(that)g(y)m(ou)g(lo)s (ok)150 4444 y(at)38 b(the)f Fp(FFTW_TIME_MIN)d Fv(constan)m(t)39 b(in)c Fp(fftw/fftw-int.h)p Fv(.)58 b(This)35 b(constan)m(t)k(holds)c (the)j(minim)m(um)150 4553 y(time)h(in)m(terv)-5 b(al)39 b(\(in)g(seconds\))h(required)e(to)i(get)h(accurate)g(timing)d (measuremen)m(ts,)43 b(and)c(should)f(b)s(e)150 4663 y(\(at)j(least\))f(sev)m(eral)g(h)m(undred)d(times)j(the)f(resolution)g (of)g(y)m(our)h(clo)s(c)m(k.)69 b(The)39 b(default)g(constan)m(ts)i (are)150 4772 y(on)c(the)g(conserv)-5 b(ativ)m(e)39 b(side,)f(and)e(ma) m(y)i(cause)g(FFTW)g(to)f(tak)m(e)i(longer)e(than)g(necessary)g(when)g (y)m(ou)150 4882 y(create)f(a)e(plan.)51 b(Set)35 b Fp(FFTW_TIME_MIN)30 b Fv(to)35 b(whatev)m(er)g(is)f(appropriate)f(on)h(y)m(our)g(system)h (\(b)s(e)f(sure)f(to)150 4991 y(set)e(the)h Fr(right)40 b Fp(FFTW_TIME_MIN)6 b Fv(.)18 b(.)k(.)12 b(there)31 b(are)g(sev)m(eral)g(de\014nitions)e(in)g Fp(fftw-int.h)p Fv(,)g(corresp)s(onding)150 5101 y(to)i(di\013eren)m(t)f(platforms)f (and)h(timers\).)275 5230 y(As)36 b(an)f(aid)h(in)e(c)m(hec)m(king)j (the)f(resolution)f(of)h(y)m(our)g(clo)s(c)m(k,)i(y)m(ou)f(can)f(use)g (the)g Fp(tests/fftw_test)150 5340 y Fv(program)41 b(with)g(the)g Fp(-t)g Fv(option)g(\(c.f.)75 b Fp(tests/README)p Fv(\).)d(Remem)m(b)s (er,)44 b(the)e(mere)f(fact)i(that)f(y)m(our)p eop end %%Page: 59 61 TeXDict begin 59 60 bop 150 -116 a Fv(Chapter)30 b(6:)41 b(Installation)29 b(and)g(Customization)1808 b(59)150 299 y(clo)s(c)m(k)32 b(rep)s(orts)f(times)g(in,)f(sa)m(y)-8 b(,)34 b(picoseconds,)d(do)s(es)g(not)h(mean)g(that)g(it)f(is)f (actually)h Fr(ac)-5 b(cur)g(ate)40 b Fv(to)32 b(that)150 408 y(resolution.)150 666 y Fu(6.6)68 b(Generating)46 b(y)l(our)f(o)l(wn)g(co)t(de)275 858 y Fv(If)22 b(y)m(ou)i(kno)m(w)g (that)g(y)m(ou)f(will)e(only)h(use)i(transforms)e(of)i(a)f(certain)h (size)f(\(sa)m(y)-8 b(,)26 b(p)s(o)m(w)m(ers)e(of)f(2\))h(and)f(w)m(an) m(t)150 968 y(to)28 b(reduce)f(the)h(size)f(of)g(the)h(library)-8 b(,)26 b(y)m(ou)i(can)f(recon\014gure)h(FFTW)g(to)g(supp)s(ort)d(only)i (those)h(sizes)f(y)m(ou)150 1078 y(are)34 b(in)m(terested)g(in.)50 b(Y)-8 b(ou)34 b(ma)m(y)h(ev)m(en)f(generate)i(co)s(de)e(to)g(enable)f (e\016cien)m(t)i(transforms)e(of)h(a)g(size)g(not)150 1187 y(supp)s(orted)28 b(b)m(y)i(the)g(default)f(distribution.)36 b(The)30 b(default)f(distribution)d(supp)s(orts)i(transforms)h(of)h(an) m(y)150 1297 y(size,)e(but)e(not)h(all)e(sizes)i(are)g(equally)e(fast.) 40 b(The)26 b(default)g(installation)f(of)i(FFTW)g(is)f(b)s(est)g(at)i (handling)150 1406 y(sizes)33 b(of)h(the)g(form)g(2)892 1373 y Fl(a)932 1406 y Fv(3)977 1373 y Fl(b)1011 1406 y Fv(5)1056 1373 y Fl(c)1090 1406 y Fv(7)1135 1373 y Fl(d)1174 1406 y Fv(11)1264 1373 y Fl(e)1301 1406 y Fv(13)1391 1373 y Fl(f)1435 1406 y Fv(,)h(where)e Fm(e)p Fv(+)p Fm(f)43 b Fv(is)33 b(either)g(0)h(or)g(1,)h(and)e(the)h(other)g(exp)s (onen)m(ts)g(are)150 1516 y(arbitrary)-8 b(.)39 b(Other)27 b(sizes)g(are)h(computed)f(b)m(y)g(means)h(of)f(a)h(slo)m(w,)g (general-purp)s(ose)e(routine.)39 b(Ho)m(w)m(ev)m(er,)150 1626 y(if)34 b(y)m(ou)h(ha)m(v)m(e)h(an)f(application)e(that)j (requires)d(fast)j(transforms)e(of)h(size,)h(sa)m(y)-8 b(,)37 b Fp(17)p Fv(,)f(there)f(is)f(a)h(w)m(a)m(y)h(to)150 1735 y(generate)c(sp)s(ecialized)c(co)s(de)j(to)g(handle)e(that.)275 1870 y(The)i(directory)g Fp(gensrc)g Fv(con)m(tains)h(all)f(the)h (programs)f(and)h(scripts)f(that)h(w)m(ere)h(used)e(to)h(generate)150 1979 y(FFTW.)g(In)e(particular,)f(the)i(program)f Fp(gensrc/genfft.ml)c Fv(w)m(as)31 b(used)f(to)h(generate)i(the)d(co)s(de)h(that)150 2089 y(FFTW)j(uses)f(to)h(compute)g(the)g(transforms.)49 b(W)-8 b(e)35 b(do)e(not)h(exp)s(ect)g(casual)f(users)g(to)h(use)f(it.) 50 b Fp(genfft)150 2198 y Fv(is)27 b(a)i(rather)f(sophisticated)g (program)g(that)h(generates)h(directed)e(acyclic)g(graphs)g(of)g(FFT)h (algorithms)150 2308 y(and)38 b(p)s(erforms)e(algebraic)i (simpli\014cations)d(on)j(them.)64 b Fp(genfft)36 b Fv(is)i(written)f (in)g(Ob)5 b(jectiv)m(e)38 b(Caml,)i(a)150 2418 y(dialect)g(of)h(ML.)g (Ob)5 b(jectiv)m(e)41 b(Caml)f(is)f(describ)s(ed)g(at)i Fp(http://pauillac.inria.fr/o)o(cam)o(l/)35 b Fv(and)150 2527 y(can)c(b)s(e)e(do)m(wnloaded)h(from)g(from)g Fp (ftp://ftp.inria.fr/lang)o(/cam)o(l-l)o(ight)o Fv(.)275 2662 y(If)37 b(y)m(ou)g(ha)m(v)m(e)i(Ob)5 b(jectiv)m(e)38 b(Caml)e(installed,)i(y)m(ou)f(can)h(t)m(yp)s(e)g Fp(sh)30 b(bootstrap.sh)k Fv(in)i(the)i(top-lev)m(el)150 2771 y(directory)32 b(to)i(re-generate)h(the)e(\014les.)47 b(If)33 b(y)m(ou)g(c)m(hange)h(the)f Fp(gensrc/config)c Fv(\014le,)k(y)m(ou)g(can)h(optimize)150 2881 y(FFTW)d(for)f(sizes)g (that)h(are)g(not)g(curren)m(tly)e(supp)s(orted)g(e\016cien)m(tly)h (\(sa)m(y)-8 b(,)32 b(17)f(or)f(19\).)275 3015 y(W)-8 b(e)44 b(do)e(not)h(pro)m(vide)f(more)h(details)f(ab)s(out)g(the)h(co)s (de-generation)h(pro)s(cess,)i(since)c(w)m(e)h(do)g(not)150 3125 y(exp)s(ect)32 b(that)g(users)e(will)f(need)i(to)h(generate)h (their)d(o)m(wn)h(co)s(de.)44 b(Ho)m(w)m(ev)m(er,)34 b(feel)d(free)g(to)h(con)m(tact)i(us)c(at)150 3235 y Fp(fftw@fftw.org)d Fv(if)i(y)m(ou)i(are)g(in)m(terested)f(in)f(the)i (sub)5 b(ject.)275 3369 y(Y)-8 b(ou)21 b(migh)m(t)g(\014nd)f(it)g(in)m (teresting)h(to)h(learn)e(Caml)g(and/or)h(some)h(mo)s(dern)d (programming)h(tec)m(hniques)150 3479 y(that)39 b(w)m(e)f(used)f(in)g (the)h(generator)h(\(including)c(monadic)i(programming\),)i(esp)s (ecially)d(if)h(y)m(ou)i(heard)150 3588 y(the)d(rumor)f(that)h(Ja)m(v) -5 b(a)37 b(and)f(ob)5 b(ject-orien)m(ted)37 b(programming)d(are)j(the) f(latest)g(adv)-5 b(ancemen)m(t)37 b(in)e(the)150 3698 y(\014eld.)60 b(The)37 b(in)m(ternal)f(op)s(eration)h(of)h(the)f(co)s (delet)h(generator)g(is)f(describ)s(ed)e(in)h(the)h(pap)s(er,)i(\\A)f (F)-8 b(ast)150 3807 y(F)g(ourier)32 b(T)-8 b(ransform)31 b(Compiler,")h(b)m(y)g(M.)h(F)-8 b(rigo,)33 b(whic)m(h)e(is)h(a)m(v)-5 b(ailable)31 b(from)h(the)h(FFTW)g(home)f(page)150 3917 y(\()p Fp(http://www.fftw.org)p Fv(\))e(and)k(will)f(app)s(ear)h(in)f (the)i Fq(Pro)s(ceedings)f(of)h(the)g(1999)i(A)m(CM)e(SIGPLAN)150 4027 y(Conference)30 b(on)h(Programming)e(Language)j(Design)e(and)g (Implemen)m(tation)f(\(PLDI\))p Fv(.)p eop end %%Page: 60 62 TeXDict begin 60 61 bop 150 -116 a Fv(60)3232 b(FFTW)p eop end %%Page: 61 63 TeXDict begin 61 62 bop 150 -116 a Fv(Chapter)30 b(7:)41 b(Ac)m(kno)m(wledgmen)m(ts)2335 b(61)150 299 y Fs(7)80 b(Ac)l(kno)l(wledgmen)l(ts)275 533 y Fv(Matteo)28 b(F)-8 b(rigo)27 b(w)m(as)f(supp)s(orted)e(in)h(part)h(b)m(y)g(the)g(Defense)h (Adv)-5 b(anced)26 b(Researc)m(h)h(Pro)5 b(jects)27 b(Agency)150 643 y(\(D)m(ARP)-8 b(A\))33 b(under)c(Gran)m(ts)j(N00014-94-1-0985)37 b(and)30 b(F30602-97-1-0270)q(,)37 b(and)30 b(b)m(y)h(a)g(Digital)g (Equip-)150 752 y(men)m(t)d(Corp)s(oration)d(F)-8 b(ello)m(wship.)38 b(Stev)m(en)28 b(G.)g(Johnson)e(w)m(as)h(supp)s(orted)e(in)h(part)h(b)m (y)g(a)g(DoD)i(NDSEG)150 862 y(F)-8 b(ello)m(wship,)33 b(an)g(MIT)h(Karl)e(T)-8 b(a)m(ylor)34 b(Compton)f(F)-8 b(ello)m(wship,)33 b(and)g(b)m(y)h(the)g(Materials)f(Researc)m(h)i (Sci-)150 971 y(ence)43 b(and)f(Engineering)f(Cen)m(ter)i(program)f(of) h(the)f(National)h(Science)f(F)-8 b(oundation)42 b(under)f(a)m(w)m(ard) 150 1081 y(DMR-9400334.)275 1215 y(Both)34 b(authors)g(w)m(ere)g(also)g (supp)s(orted)e(in)h(part)g(b)m(y)h(their)f(resp)s(ectiv)m(e)h (girlfriends,)e(b)m(y)i(the)g(letters)150 1325 y(\\Q")d(and)f(\\R",)h (and)f(b)m(y)g(the)h(n)m(um)m(b)s(er)e(12.)275 1460 y(W)-8 b(e)32 b(are)g(grateful)f(to)h(SUN)f(Microsystems)h(Inc.)f(for)g(its)g (donation)g(of)h(a)f(cluster)g(of)h(9)g(8-pro)s(cessor)150 1569 y(Ultra)h(HPC)g(5000)i(SMPs)d(\(24)j(G\015ops)d(p)s(eak\).)50 b(These)33 b(mac)m(hines)f(serv)m(ed)i(as)f(the)h(primary)d(platform) 150 1679 y(for)f(the)h(dev)m(elopmen)m(t)f(of)h(earlier)e(v)m(ersions)h (of)h(FFTW.)275 1813 y(W)-8 b(e)39 b(thank)e(In)m(tel)h(Corp)s(oration) e(for)i(donating)f(a)h(four-pro)s(cessor)f(P)m(en)m(tium)g(Pro)h(mac)m (hine.)63 b(W)-8 b(e)150 1923 y(thank)30 b(the)h(Lin)m(ux)e(comm)m (unit)m(y)h(for)g(giving)f(us)h(a)g(decen)m(t)i(OS)d(to)i(run)e(on)i (that)g(mac)m(hine.)275 2057 y(The)22 b Fp(genfft)f Fv(program)i(w)m (as)h(written)e(using)f(Ob)5 b(jectiv)m(e)23 b(Caml,)h(a)g(dialect)e (of)h(ML.)h(Ob)5 b(jectiv)m(e)23 b(Caml)150 2167 y(is)h(a)i(small)e (and)h(elegan)m(t)h(language)g(dev)m(elop)s(ed)f(b)m(y)g(Xa)m(vier)g (Lero)m(y)-8 b(.)40 b(The)25 b(implemen)m(tation)f(is)h(a)m(v)-5 b(ailable)150 2276 y(from)30 b Fp(ftp.inria.fr)e Fv(in)i(the)h (directory)f Fp(lang/caml-light)p Fv(.)39 b(W)-8 b(e)32 b(used)e(v)m(ersions)g(1.07)j(and)d(2.00)j(of)150 2386 y(the)39 b(soft)m(w)m(are.)66 b(In)38 b(previous)f(releases)i(of)f (FFTW,)i Fp(genfft)d Fv(w)m(as)h(written)g(in)f(Caml)h(Ligh)m(t,)i(b)m (y)f(the)150 2496 y(same)29 b(authors.)39 b(An)28 b(ev)m(en)h(earlier)f (implemen)m(tation)f(of)h Fp(genfft)f Fv(w)m(as)h(written)g(in)f(Sc)m (heme,)i(but)f(Caml)150 2605 y(is)h(de\014nitely)g(b)s(etter)h(for)g (this)g(kind)e(of)j(application.)275 2740 y(FFTW)47 b(uses)g(man)m(y)f (to)s(ols)h(from)g(the)g(GNU)g(pro)5 b(ject,)52 b(including)43 b Fp(automake)p Fv(,)49 b Fp(texinfo)p Fv(,)h(and)150 2849 y Fp(libtool)p Fv(.)275 2984 y(Prof.)21 b(Charles)g(E.)h (Leiserson)e(of)i(MIT)g(pro)m(vided)e(con)m(tin)m(uous)i(supp)s(ort)e (and)h(encouragemen)m(t.)40 b(This)150 3093 y(program)33 b(w)m(ould)e(not)j(exist)e(without)g(him.)47 b(Charles)32 b(also)g(prop)s(osed)g(the)h(name)g(\\co)s(delets")h(for)f(the)150 3203 y(basic)d(FFT)g(blo)s(c)m(ks.)275 3337 y(Prof.)48 b(John)g(D.)h(Joannop)s(oulos)e(of)i(MIT)g(demonstrated)f(con)m(tin)m (uing)g(tolerance)h(of)g(Stev)m(en's)150 3447 y(\\extra-curricular")32 b(computer-science)h(activities.)47 b(Stev)m(en's)33 b(c)m(hances)h(at)f(a)g(ph)m(ysics)f(degree)h(w)m(ould)150 3557 y(not)e(exist)f(without)f(him.)275 3691 y(Andrew)g(Sterian)g(con)m (tributed)h(the)g(Windo)m(ws)g(timing)f(co)s(de.)275 3826 y(Didier)34 b(Miras)i(rep)s(orted)g(a)h(bug)f(in)f(the)i(test)g (pro)s(cedure)e(used)h(in)f(FFTW)i(1.2.)60 b(W)-8 b(e)38 b(no)m(w)e(use)h(a)150 3935 y(completely)32 b(di\013eren)m(t)g(test)h (algorithm)e(b)m(y)h(F)-8 b(unda)32 b(Ergun)f(that)i(do)s(es)f(not)g (require)f(a)h(separate)i(FFT)150 4045 y(program)c(to)h(compare)g (against.)275 4179 y(W)-8 b(olfgang)26 b(Reimer)f(con)m(tributed)g(the) h(P)m(en)m(tium)f(cycle)h(coun)m(ter)g(and)g(a)g(few)f(\014xes)g(that)i (help)d(p)s(orta-)150 4289 y(bilit)m(y)-8 b(.)275 4423 y(Ming-Chang)32 b(Liu)f(unco)m(v)m(ered)i(a)g(w)m(ell-hidden)d(bug)i (in)f(the)i(complex)g(transforms)f(of)g(FFTW)i(2.0)150 4533 y(and)c(supplied)d(a)k(patc)m(h)g(to)g(correct)g(it.)275 4667 y(The)h(FFTW)h(F)-10 b(A)m(Q)33 b(w)m(as)g(written)f(in)f Fp(bfnn)g Fv(\(Bizarre)i(F)-8 b(ormat)34 b(With)e(No)i(Name\))f(and)f (formatted)150 4777 y(using)d(the)h(to)s(ols)h(dev)m(elop)s(ed)e(b)m(y) i(Ian)f(Jac)m(kson)h(for)f(the)h(Lin)m(ux)d(F)-10 b(A)m(Q.)275 4912 y Fr(We)30 b(ar)-5 b(e)32 b(esp)-5 b(e)g(cial)5 b(ly)32 b(thankful)g(to)g(al)5 b(l)32 b(of)f(our)g(users)h(for)f(their) h(c)-5 b(ontinuing)31 b(supp)-5 b(ort,)34 b(fe)-5 b(e)g(db)g(ack,)32 b(and)150 5021 y(inter)-5 b(est)33 b(during)g(our)g(development)i(of)d (FFTW.)p eop end %%Page: 62 64 TeXDict begin 62 63 bop 150 -116 a Fv(62)3232 b(FFTW)p eop end %%Page: 63 65 TeXDict begin 63 64 bop 150 -116 a Fv(Chapter)30 b(8:)41 b(License)30 b(and)g(Cop)m(yrigh)m(t)2150 b(63)150 299 y Fs(8)80 b(License)53 b(and)h(Cop)l(yrigh)l(t)275 533 y Fv(FFTW)31 b(is)e(cop)m(yrigh)m(t)1101 530 y(c)1076 533 y Ft(\015)h Fv(1997{1999)k(Massac)m(h)m(usetts)f(Institute)d(of)g (T)-8 b(ec)m(hnology)g(.)275 667 y(FFTW)31 b(is)e(free)i(soft)m(w)m (are;)h(y)m(ou)f(can)g(redistribute)d(it)i(and/or)g(mo)s(dify)f(it)h (under)f(the)i(terms)f(of)h(the)150 777 y(GNU)g(General)g(Public)d (License)i(as)h(published)26 b(b)m(y)31 b(the)g(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation;)30 b(either)g(v)m(ersion) 150 887 y(2)h(of)f(the)h(License,)f(or)g(\(at)i(y)m(our)e(option\))g (an)m(y)h(later)f(v)m(ersion.)275 1021 y(This)37 b(program)i(is)g (distributed)d(in)i(the)i(hop)s(e)f(that)h(it)f(will)e(b)s(e)i(useful,) h(but)e(WITHOUT)h(ANY)150 1131 y(W)-10 b(ARRANTY;)33 b(without)f(ev)m(en)h(the)f(implied)e(w)m(arran)m(t)m(y)j(of)g(MER)m (CHANT)-8 b(ABILITY)33 b(or)f(FITNESS)150 1240 y(F)m(OR)e(A)g(P)-8 b(AR)g(TICULAR)30 b(PURPOSE.)f(See)h(the)g(GNU)g(General)g(Public)e (License)h(for)h(more)g(details.)275 1375 y(Y)-8 b(ou)39 b(should)d(ha)m(v)m(e)k(receiv)m(ed)f(a)g(cop)m(y)h(of)f(the)f(GNU)i (General)e(Public)f(License)h(along)h(with)e(this)150 1484 y(program;)56 b(if)46 b(not,)52 b(write)47 b(to)h(the)g(F)-8 b(ree)48 b(Soft)m(w)m(are)h(F)-8 b(oundation,)51 b(Inc.,)h(59)c(T)-8 b(emple)47 b(Place,)52 b(Suite)150 1594 y(330,)g(Boston,)f(MA)c (02111-1307)j(USA.)c(Y)-8 b(ou)47 b(can)g(also)f(\014nd)e(the)j(GPL)f (on)g(the)g(GNU)h(w)m(eb)f(site)150 1704 y(\()p Fp (http://www.gnu.org/copylef)o(t/g)o(pl.h)o(tml)p Fv(\).)275 1838 y(In)33 b(addition,)g(w)m(e)h(kindly)d(ask)j(y)m(ou)g(to)h(ac)m (kno)m(wledge)g(FFTW)g(and)e(its)g(authors)h(in)e(an)m(y)i(program)150 1948 y(or)j(publication)e(in)h(whic)m(h)g(y)m(ou)h(use)g(FFTW.)i(\(Y)-8 b(ou)38 b(are)f(not)h Fr(r)-5 b(e)g(quir)g(e)g(d)48 b Fv(to)38 b(do)f(so;)42 b(it)36 b(is)h(up)f(to)i(y)m(our)150 2057 y(common)31 b(sense)f(to)h(decide)f(whether)g(y)m(ou)g(w)m(an)m(t) i(to)f(comply)e(with)g(this)h(request)g(or)g(not.\))275 2192 y(Non-free)g(v)m(ersions)f(of)h(FFTW)g(are)h(a)m(v)-5 b(ailable)29 b(under)f(terms)i(di\013eren)m(t)f(than)h(the)g(General)f (Public)150 2301 y(License.)57 b(\(e.g.)j(they)36 b(do)g(not)g(require) f(y)m(ou)h(to)h(accompan)m(y)g(an)m(y)g(ob)5 b(ject)37 b(co)s(de)f(using)e(FFTW)j(with)150 2411 y(the)26 b(corresp)s(onding)e (source)i(co)s(de.\))40 b(F)-8 b(or)26 b(these)h(alternate)f(terms)g(y) m(ou)g(m)m(ust)g(purc)m(hase)f(a)i(license)d(from)150 2521 y(MIT's)39 b(T)-8 b(ec)m(hnology)40 b(Licensing)d(O\016ce.)67 b(Users)39 b(in)m(terested)g(in)f(suc)m(h)h(a)g(license)f(should)f(con) m(tact)42 b(us)150 2630 y(\()p Fp(fftw@fftw.org)p Fv(\))27 b(for)k(more)f(information.)p eop end %%Page: 64 66 TeXDict begin 64 65 bop 150 -116 a Fv(64)3232 b(FFTW)p eop end %%Page: 65 67 TeXDict begin 65 66 bop 150 -116 a Fv(Chapter)30 b(9:)41 b(Concept)30 b(Index)2463 b(65)150 299 y Fs(9)80 b(Concept)52 b(Index)150 642 y Fu(A)150 777 y Fj(algorithm)21 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) 47 b Fj(2)150 1069 y Fu(B)150 1204 y Fi(benchfft)8 b Ff(.)14 b(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)34 b Fj(1)150 1301 y(b)r(enc)n(hmark)12 b Ff(.)f(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fj(1,)26 b(40,)h(49,)f(58)150 1399 y(blo)r(c)n(king)e Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fj(43)150 1691 y Fu(C)150 1826 y Fj(C)26 b(m)n(ulti-dimensional)f(arra)n(ys)16 b Ff(.)d(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)42 b Fj(12)150 1923 y(Caml)12 b Ff(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fj(59,)26 b(61)150 2021 y(Cilk)15 b Ff(.)e(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fj(2,)26 b(37)150 2119 y Fi(clock)11 b Ff(.)j(.)e(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)37 b Fj(58)150 2217 y(co)r(de)26 b(generator)21 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)45 b Fj(1,)26 b(59)150 2314 y(column-ma)t(jor)e Ff(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)50 b Fj(11,)27 b(52,)f(54)150 2412 y(compiler)10 b Ff(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)36 b Fj(2,)26 b(51,)h(55,)g(56,)f(58)150 2510 y(compiler)g(\015ags)16 b Ff(.)d(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)43 b Fj(55,)26 b(56)150 2607 y(complex)f(m)n(ulti-dimensional)f(transform)d Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)47 b Fj(4,)26 b(22)150 2705 y(complex)f(n)n(um)n(b)r(er)13 b Ff(.)e(.)h(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)39 b Fj(17)150 2803 y(complex)25 b(one-dimensional)g (transform)e Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fj(3)150 2901 y(complex)25 b(to)h(real)g(transform)12 b Ff(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)38 b Fj(6,)26 b(26)150 2998 y(complex)f(transform)14 b Ff(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)40 b Fj(3)150 3096 y Fi(configure)12 b Ff(.)i(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fj(18,)26 b(37,)h(41,)g(55,)f(57)150 3194 y(con)n(v)n(olution)7 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 32 b Fj(10)150 3291 y(cyclic)26 b(con)n(v)n(olution)10 b Ff(.)j(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fj(10)150 3583 y Fu(D)150 3718 y Fj(Discrete)26 b(F)-6 b(ourier)26 b(T)-6 b(ransform)13 b Ff(.)g(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fj(21,)27 b(25,)g(28,)f(33)150 3816 y(distributed)f(arra)n(y)h (format)12 b Ff(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)38 b Fj(43,)27 b(46,)f(48)150 3913 y(distributed)f(memory)17 b Ff(.)10 b(.)i(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)42 b Fj(37,)27 b(40,)f(43)150 4205 y Fu(E)150 4340 y Fj(Ecclesiastes)f Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)48 b Fj(14)150 4438 y(executor)23 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)49 b Fj(1)150 4717 y Fu(F)150 4851 y Fj(FFTW)11 b Ff(.)i(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)37 b Fj(1)150 4949 y(FFTWND)6 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)32 b Fj(22)150 5047 y(\015ags)22 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47 b Fj(4,)26 b(5,)h(19,)g(23,)f(27,)h(30,)g(47,)f(52)150 5145 y(\015oating-p)r(oin)n (t)g(precision)21 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)46 b Fj(18,)26 b(52,)h(55,)g(56,)f(57)150 5242 y(F)-6 b(ortran-callable)27 b(wrapp)r(ers)8 b Ff(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)34 b Fj(12,)27 b(51,)f(56)150 5340 y(frequency)8 b Ff(.)k(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)34 b Fj(4,)26 b(5,)g(21)2025 642 y Fu(G)2025 765 y Fi(gettimeofday)c Ff(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fj(58)2025 857 y(girlfriends)14 b Ff(.)g(.)e(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40 b Fj(61)2025 1116 y Fu(H)2025 1238 y Fj(halfcomplex)25 b(arra)n(y)20 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b Fj(6,)26 b(17)2025 1330 y(hermitian)f(arra)n(y)13 b Ff(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fj(17,)26 b(33,)h(34)2025 1590 y Fu(I)2025 1712 y Fj(in-place)c (transform)8 b Ff(.)13 b(.)32 b Fj(5,)24 b(19,)h(21,)g(24,)g(30,)g(32,) g(40,)g(42,)g(51)2025 1804 y(installation)12 b Ff(.)i(.)e(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fj(55)2025 2050 y Fu(L)2025 2173 y Fj(linking)26 b(on)f(Unix)13 b Ff(.)e(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fj(4,)27 b(7,)f(39,)h(43,)f(47,)h(48)2025 2265 y(LISP)16 b Ff(.)c(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)42 b Fj(15,)27 b(61)2025 2356 y(load-balancing)11 b Ff(.)j(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)37 b Fj(48)2025 2616 y Fu(M)2025 2738 y Fi(malloc)22 b Ff(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b Fj(12,)27 b(35)2025 2830 y(ML)14 b Ff(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fj(59)2025 2922 y(monadic)25 b(programming)c Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)48 b Fj(59)2025 3014 y(MPI)13 b Ff(.)f(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fj(2,)27 b(37,)f(40,)h(56)2025 3106 y Fi(MPI_Alltoall)e Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)49 b Fj(41,)26 b(42,)h(48)2025 3197 y Fi(MPI_Barrier)c Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fj(43)2025 3289 y Fi(MPI_COMM_WORLD)9 b Ff(.)15 b(.)d(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)34 b Fj(42,)27 b(47)2025 3381 y Fi(MPI_Finalize)22 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fj(42)2025 3473 y Fi(MPI_Init)7 b Ff(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fj(42)2025 3565 y(m)n(ulti-dimensional)24 b(transform)19 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)44 b Fj(4,)26 b(22,)h(29)2025 3824 y Fu(N)2025 3946 y Fj(n)p 2073 3946 24 4 v 27 w(\014elds)17 b Ff(.)c(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)43 b Fj(42,)27 b(47)2025 4038 y(nerd-readable)e(text)18 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 44 b Fj(15)2025 4130 y(normalization)13 b Ff(.)g(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)39 b Fj(4,)26 b(5,)g(7,)h(8,)f(11,)h(21,)f(29,)h (43)2025 4222 y(n)n(um)n(b)r(er)c(of)k(threads)19 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)45 b Fj(39)2025 4468 y Fu(O)2025 4591 y Fj(out-of-place)26 b(transform)9 b Ff(.)j(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)35 b Fj(5)2025 4850 y Fu(P)2025 4973 y Fj(padding)16 b Ff(.)11 b(.)i(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)41 b Fj(8,)26 b(32,)h(46)2025 5065 y(parallel)g(transform)21 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47 b Fj(2,)26 b(37)2025 5156 y(P)n(en)n(tium)e(hac)n(k)f Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)49 b Fj(57)2025 5248 y(plan)24 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)50 b Fj(1,)26 b(3,)g(42)2025 5340 y(planner)20 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47 b Fj(1)p eop end %%Page: 66 68 TeXDict begin 66 67 bop 150 -116 a Fv(66)3232 b(FFTW)150 299 y Fj(p)r(o)n(w)n(er)26 b(sp)r(ectrum)7 b Ff(.)k(.)h(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)33 b Fj(7)150 556 y Fu(R)150 678 y Fj(rank)16 b Ff(.)c(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fj(4)150 769 y(real)27 b(m)n(ulti-dimensional)d(transform)g Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)50 b Fj(7,)26 b(29)150 860 y(real)h(n)n(um)n(b)r(er)16 b Ff(.)10 b(.)j(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fj(17)150 952 y(real)27 b(transform)10 b Ff(.)i(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)36 b Fj(6,)26 b(26)150 1043 y(RFFTW)12 b Ff(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)38 b Fj(6,)26 b(26)150 1135 y(RFFTWND)14 b Ff(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)40 b Fj(29)150 1226 y(r\013t)n(wnd)25 b(arra)n(y)h(format)13 b Ff(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)40 b Fj(8,)26 b(32,)h(46,)f(54)150 1318 y(ro)n(w-ma)t(jor)12 b Ff(.)h(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) 38 b Fj(11,)27 b(23,)f(44)150 1575 y Fu(S)150 1696 y Fj(sa)n(ving)g(plans)g(to)g(disk)13 b Ff(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)38 b Fj(13)2025 299 y(slab)26 b(decomp)r(osition)8 b Ff(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fj(43)2025 391 y(sp)r(eci\014c)26 b(planner)13 b Ff(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)39 b Fj(20)2025 483 y(stride)7 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)33 b Fj(11,)27 b(20,)f(24,)h(27,)g(31,)f(32,)h(42)2025 743 y Fu(T)2025 866 y Fj(thread)e(safet)n(y)10 b Ff(.)j(.)f(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)35 b Fj(36,)27 b(40)2025 958 y(threads)18 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)44 b Fj(2,)27 b(36,)f(37,)h(56)2025 1050 y(timer,)e(customization)h(of)10 b Ff(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)36 b Fj(58)2025 1142 y(T)-6 b(utorial)11 b Ff(.)i(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)37 b Fj(3)2025 1389 y Fu(W)2025 1512 y Fj(wisdom)8 b Ff(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)34 b Fj(13,)27 b(19,)g(23,)f(30,)h(34)2025 1604 y(wisdom,)f(imp)r(ort)f(and)g(exp)r (ort)12 b Ff(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)38 b Fj(14)2025 1696 y(wisdom,)26 b(problems)f(with)11 b Ff(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)37 b Fj(14)p eop end %%Page: 67 69 TeXDict begin 67 68 bop 150 -116 a Fv(Chapter)30 b(10:)41 b(Library)29 b(Index)2448 b(67)150 299 y Fs(10)80 b(Library)55 b(Index)150 642 y Fu(F)150 764 y Fi(fftw)13 b Ff(.)g(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)38 b Fj(20)150 856 y Fi(fftw_threads)22 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)45 b Fj(38)150 947 y Fi(fftw_threads_one)13 b Ff(.)j(.)d(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fj(38)150 1039 y Fi(FFTW_BACKWARD)22 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)45 b Fj(4)150 1130 y Fi(fftw_complex)13 b Ff(.)i(.)d(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)39 b Fj(4,)26 b(17)150 1222 y Fi(FFTW_COMPLEX)c Ff(.)12 b(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)45 b Fj(18)150 1313 y Fi(FFTW_COMPLEX_TO_REAL)12 b Ff(.)17 b(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(6,)27 b(26,)f(46)150 1405 y Fi(fftw_create_plan)7 b Ff(.)16 b(.)c(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)33 b Fj(3,)26 b(18)150 1496 y Fi(fftw_create_plan_specific)18 b Ff(.)g(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)44 b Fj(18)150 1588 y Fi(fftw_destroy_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)49 b Fj(4,)26 b(21)150 1679 y Fi(fftw_direction)c Ff(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fj(3,)26 b(4,)h(6,)f(18,)h(22,)f(29)150 1771 y Fi(FFTW_ENABLE_FLOAT) 12 b Ff(.)k(.)c(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(18)150 1862 y Fi(FFTW_ESTIMATE)22 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)45 b Fj(4)150 1954 y Fi(fftw_export_wisdom)25 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)47 b Fj(13,)26 b(34)150 2045 y Fi (fftw_export_wisdom_to_file)10 b Ff(.)18 b(.)12 b(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)36 b Fj(14,)26 b(34)150 2137 y Fi(fftw_export_wisdom_to_string)7 b Ff(.)18 b(.)13 b(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)33 b Fj(15,)26 b(34)150 2228 y Fi(fftw_f77_create_plan) 7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fj(53)150 2320 y Fi(fftw_f77_destroy_plan)c Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)50 b Fj(53)150 2411 y Fi(fftw_f77_one)12 b Ff(.)j(.)d(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) 38 b Fj(51,)26 b(53)150 2503 y Fi(fftw_f77_threads_one)7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fj(53)150 2594 y Fi(fftw_forget_wisdom) 10 b Ff(.)17 b(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fj(35)150 2686 y Fi(FFTW_FORWARD)23 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)46 b Fj(4)150 2777 y Fi(fftw_free_hook)16 b Ff(.)g(.)c(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fj(35)150 2869 y Fi(fftw_import_wisdom)25 b Ff(.)13 b(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fj(13,)26 b(35)150 2961 y Fi(fftw_import_wisdom_from_file)7 b Ff(.)18 b(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)33 b Fj(14,)26 b(35)150 3052 y Fi(fftw_import_wisdom_from_strin)q(g)i Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)48 b Fj(15,)26 b(35)150 3144 y Fi(FFTW_IN_PLACE)c Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)45 b Fj(5)150 3235 y Fi(fftw_malloc)23 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)46 b Fj(35)150 3327 y Fi(fftw_malloc_hook)13 b Ff(.)j(.)d(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)39 b Fj(35)150 3418 y Fi(FFTW_MEASURE)23 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)46 b Fj(4)150 3510 y Fi(fftw_mpi)7 b Ff(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)32 b Fj(47)150 3601 y Fi(fftw_mpi_create_plan)7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fj(47)150 3693 y Fi(fftw_mpi_destroy_plan)c Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)50 b Fj(47)150 3784 y Fi(fftw_mpi_local_sizes)7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fj(48)150 3876 y Fi(fftw_mpi_plan)18 b Ff(.)d(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fj(47)150 3967 y Fi(fftw_mpi_test)10 b Ff(.)16 b(.)c(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)36 b Fj(41,)26 b(49)150 4059 y Fi(FFTW_NORMAL_ORDER)12 b Ff(.)k(.)c(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(42)150 4150 y Fi(fftw_one)20 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)44 b Fj(4,)26 b(20)150 4242 y Fi(FFTW_OUT_OF_PLACE)12 b Ff(.)k(.)c(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(19)150 4333 y Fi(fftw_plan)17 b Ff(.)d(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)43 b Fj(3,)26 b(18)150 4425 y Fi(fftw_real)f Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) 49 b Fj(17)150 4516 y Fi(FFTW_REAL)25 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fj(18)150 4608 y Fi(FFTW_REAL_TO_COMPLEX)24 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)45 b Fj(6,)26 b(26)150 4699 y Fi(FFTW_SCRAMBLED_INPUT)7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fj(47)150 4791 y Fi (FFTW_SCRAMBLED_OUTPUT)c Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)50 b Fj(47)150 4882 y Fi(fftw_test)16 b Ff(.)e(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)42 b Fj(57,)26 b(58)150 4974 y Fi(fftw_threads_init)12 b Ff(.)k(.)c(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(38)150 5065 y Fi(fftw_threads_test)12 b Ff(.)k(.)c(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fj(39)150 5157 y Fi(FFTW_THREADSAFE)15 b Ff(.)g(.)e(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)40 b Fj(36)150 5248 y Fi(FFTW_TIME_MIN)18 b Ff(.)d(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fj(58)150 5340 y Fi(FFTW_TRANSPOSED_ORDER)25 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b Fj(42,)27 b(44,)g(46,)f(48)2025 642 y Fi(FFTW_USE_WISDOM)15 b Ff(.)g(.)e(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)40 b Fj(13)2025 734 y Fi(fftw2d_create_plan)26 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)48 b Fj(5,)26 b(22)2025 825 y Fi(fftw2d_create_plan_specific)16 b Ff(.)i(.)12 b(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fj(22)2025 917 y Fi(fftw2d_mpi_create_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fj(42)2025 1008 y Fi(fftw3d_create_plan)26 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)48 b Fj(5,)26 b(22)2025 1100 y Fi(fftw3d_create_plan_specific)16 b Ff(.)i(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fj(22)2025 1191 y Fi(fftw3d_f77_create_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)48 b Fj(53)2025 1283 y Fi(fftw3d_mpi_create_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)48 b Fj(42)2025 1374 y Fi(fftwnd)23 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)47 b Fj(5,)26 b(24)2025 1466 y Fi(fftwnd_threads)16 b Ff(.)f(.)e(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)42 b Fj(38)2025 1557 y Fi(fftwnd_threads_one)10 b Ff(.)17 b(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)36 b Fj(38)2025 1649 y Fi (fftwnd_create_plan)26 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)48 b Fj(4,)26 b(22)2025 1740 y Fi(fftwnd_create_plan_specific)16 b Ff(.)i(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fj(22)2025 1832 y Fi(fftwnd_destroy_plan)25 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)47 b Fj(5,)26 b(25)2025 1923 y Fi(fftwnd_f77_create_plan)h Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)48 b Fj(53)2025 2015 y Fi(fftwnd_f77_destroy_plan)26 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)47 b Fj(53)2025 2106 y Fi(fftwnd_f77_one)16 b Ff(.)f(.)e(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)42 b Fj(53)2025 2198 y Fi(fftwnd_mpi)24 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)48 b Fj(42)2025 2289 y Fi(fftwnd_mpi_create_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fj(42)2025 2381 y Fi(fftwnd_mpi_destroy_plan)26 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fj(43)2025 2472 y Fi(fftwnd_mpi_local_sizes)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)48 b Fj(43)2025 2564 y Fi(fftwnd_mpi_plan)15 b Ff(.)g(.)e(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)40 b Fj(42)2025 2655 y Fi(fftwnd_one)16 b Ff(.)e(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)42 b Fj(5,)26 b(24)2025 2747 y Fi(fftwnd_plan)14 b Ff(.)h(.)d(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)40 b Fj(4,)26 b(22)2025 3007 y Fu(G)2025 3128 y Fi(genfft)c Ff(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) 46 b Fj(59,)27 b(61)2025 3388 y Fu(R)2025 3510 y Fi(rfftw)11 b Ff(.)i(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)37 b Fj(27)2025 3601 y Fi(rfftw_threads)18 b Ff(.)d(.)d(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)43 b Fj(38)2025 3693 y Fi(rfftw_threads_one)12 b Ff(.)k(.)c(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)38 b Fj(38)2025 3784 y Fi(rfftw_create_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)50 b Fj(6,)26 b(26)2025 3876 y Fi(rfftw_create_plan_specific)17 b Ff(.)h(.)12 b(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fj(26)2025 3967 y Fi(rfftw_destroy_plan)26 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)48 b Fj(6,)26 b(28)2025 4059 y Fi(rfftw_f77_create_plan)j Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)50 b Fj(54)2025 4150 y Fi(rfftw_f77_destroy_plan)27 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)48 b Fj(54)2025 4242 y Fi(rfftw_f77_one)18 b Ff(.)d(.)d(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)43 b Fj(54)2025 4333 y Fi(rfftw_mpi_test)9 b Ff(.)15 b(.)d(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)34 b Fj(41,)27 b(49)2025 4425 y Fi(rfftw_one)17 b Ff(.)d(.)f(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fj(6,)26 b(27)2025 4516 y Fi(rfftw_plan)16 b Ff(.)e(.)e(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fj(6,)26 b(26)2025 4608 y Fi(rfftw_test)e Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)48 b Fj(57)2025 4699 y Fi(rfftw_threads_test)10 b Ff(.)17 b(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)36 b Fj(39)2025 4791 y Fi(rfftw2d_create_plan)13 b Ff(.)k(.)12 b(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)39 b Fj(7,)26 b(29,)h(47)2025 4882 y Fi(rfftw2d_f77_create_plan)f Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)47 b Fj(54)2025 4974 y Fi(rfftw3d_mpi_create_plan)26 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)47 b Fj(45)2025 5065 y Fi(rfftw3d_create_plan)25 b Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)47 b Fj(7,)26 b(29)2025 5157 y Fi(rfftwnd_mpi)d Ff(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fj(46)2025 5248 y Fi(rfftwnd_mpi_destroy_plan)25 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)46 b Fj(46)2025 5340 y Fi(rfftwnd_mpi_local_sizes)26 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)47 b Fj(45)p eop end %%Page: 68 70 TeXDict begin 68 69 bop 150 -116 a Fv(68)3232 b(FFTW)150 299 y Fi(rfftwnd_threads_complex_to_re)q(al)10 b Ff(.)18 b(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fj(39)150 391 y Fi(rfftwnd_threads_one_complex_t)q(o_re)q(al)28 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)47 b Fj(39)150 483 y Fi (rfftwnd_threads_one_real_to_c)q(ompl)q(ex)28 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)47 b Fj(39)150 575 y Fi (rfftwnd_threads_real_to_compl)q(ex)10 b Ff(.)18 b(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fj(38)150 667 y Fi(rfftwnd_complex_to_real)26 b Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47 b Fj(31)150 759 y Fi(rfftwnd_create_plan)13 b Ff(.)k(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)39 b Fj(7,)27 b(29,)f(47)150 851 y Fi(rfftwnd_destroy_plan)7 b Ff(.)17 b(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)33 b Fj(33)2025 299 y Fi(rfftwnd_f77_destroy_plan)25 b Ff(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)46 b Fj(54)2025 409 y Fi(rfftwnd_f77_one_real_to_comple)q(x)10 b Ff(.)18 b(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fj(54)2025 520 y Fi(rfftwnd_one_complex_to_real)9 b Ff(.)18 b(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fj(8,)26 b(31)2025 630 y Fi(rfftwnd_one_real_to_complex)9 b Ff(.)18 b(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fj(8,)26 b(31)2025 741 y Fi(rfftwnd_plan)13 b Ff(.)i(.)d(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)39 b Fj(7,)26 b(29)2025 851 y Fi(rfftwnd_real_to_complex)g Ff(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fj(31)p eop end %%Page: -1 71 TeXDict begin -1 70 bop 3725 -116 a Fv(i)150 299 y Fs(T)-13 b(able)54 b(of)g(Con)l(ten)l(ts)150 641 y Fu(1)135 b(In)l(tro)t (duction)15 b Fa(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h (.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) 60 b Fu(1)150 911 y(2)135 b(T)-11 b(utorial)25 b Fa(.)20 b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h (.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)69 b Fu(3)449 1048 y Fv(2.1)92 b(Complex)29 b(One-dimensional)f(T)-8 b(ransforms)29 b(T)-8 b(utorial)22 b Fr(.)15 b(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)g(.)53 b Fv(3)449 1157 y(2.2)92 b(Complex)29 b(Multi-dimensional)e(T)-8 b(ransforms)29 b(T)-8 b(utorial)16 b Fr(.)e(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b Fv(4)449 1267 y(2.3)92 b(Real)30 b(One-dimensional)e(T)-8 b(ransforms)29 b(T)-8 b(utorial)23 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)54 b Fv(6)449 1377 y(2.4)92 b(Real)30 b(Multi-dimensional)d(T)-8 b(ransforms)29 b(T)-8 b(utorial)16 b Fr(.)e(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b Fv(7)449 1486 y(2.5)92 b(Multi-dimensional)26 b(Arra)m(y)31 b(F)-8 b(ormat)29 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fv(11)748 1596 y(2.5.1)93 b(Ro)m(w-ma)5 b(jor)31 b(F)-8 b(ormat)28 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)56 b Fv(11)748 1705 y(2.5.2)93 b(Column-ma)5 b(jor)28 b(F)-8 b(ormat)23 b Fr(.)16 b(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)52 b Fv(11)748 1815 y(2.5.3)93 b(Static)30 b(Arra)m(ys)h(in)e(C)20 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b Fv(12)748 1924 y(2.5.4)93 b(Dynamic)30 b(Arra)m(ys)g(in)f(C)23 b Fr(.)15 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)53 b Fv(12)748 2034 y(2.5.5)93 b(Dynamic)30 b(Arra)m(ys)g(in)f(C|The)h(W)-8 b(rong)31 b(W)-8 b(a)m(y)15 b Fr(.)i(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)45 b Fv(12)449 2144 y(2.6)92 b(W)-8 b(ords)31 b(of)f(Wisdom)20 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)49 b Fv(13)748 2253 y(2.6.1)93 b(Ca)m(v)m(eats)32 b(in)d(Using)h(Wisdom)22 b Fr(.)14 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)51 b Fv(14)748 2363 y(2.6.2)93 b(Imp)s(orting)28 b(and)i(Exp)s(orting)f (Wisdom)d Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) 56 b Fv(14)150 2605 y Fu(3)135 b(FFTW)43 b(Reference)28 b Fa(.)21 b(.)e(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f (.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)72 b Fu(17)449 2742 y Fv(3.1)92 b(Data)32 b(T)m(yp)s(es)15 b Fr(.)f(.)h(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)44 b Fv(17)449 2852 y(3.2)92 b(One-dimensional)27 b(T)-8 b(ransforms)30 b(Reference)10 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)39 b Fv(18)748 2961 y(3.2.1)93 b(Plan)29 b(Creation)h(for)g(One-dimensional) d(T)-8 b(ransforms)13 b Fr(.)h(.)h(.)42 b Fv(18)748 3071 y(3.2.2)93 b(Discussion)28 b(on)i(Sp)s(eci\014c)f(Plans)19 b Fr(.)14 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)48 b Fv(20)748 3181 y(3.2.3)93 b(Computing)28 b(the)j(One-dimensional)c(T)-8 b(ransform)14 b Fr(.)g(.)h(.)g(.)g(.)g (.)43 b Fv(20)748 3290 y(3.2.4)93 b(Destro)m(ying)31 b(a)f(One-dimensional)e(Plan)c Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)54 b Fv(21)748 3400 y(3.2.5)93 b(What)31 b(FFTW)g(Really)e(Computes)22 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)51 b Fv(21)449 3509 y(3.3)92 b(Multi-dimensional)26 b(T)-8 b(ransforms)30 b(Reference)24 b Fr(.)15 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)53 b Fv(22)748 3619 y(3.3.1)93 b(Plan)27 b(Creation)h(for)g(Multi-dimensional)c(T)-8 b(ransforms)10 b Fr(.)k(.)38 b Fv(22)748 3729 y(3.3.2)93 b(Computing)28 b(the)j(Multi-dimensional)26 b(T)-8 b(ransform)27 b Fr(.)15 b(.)g(.)g(.)57 b Fv(24)748 3838 y(3.3.3)93 b(Destro)m(ying)31 b(a)f(Multi-dimensional)d(Plan)17 b Fr(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)h(.)46 b Fv(25)748 3948 y(3.3.4)93 b(What)31 b(FFTWND)g(Really)f(Computes)18 b Fr(.)c(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)47 b Fv(25)449 4057 y(3.4)92 b(Real)30 b(One-dimensional)e(T)-8 b(ransforms)29 b(Reference)13 b Fr(.)j(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)43 b Fv(26)748 4167 y(3.4.1)93 b(Plan)29 b(Creation)h(for)g(Real)g (One-dimensional)e(T)-8 b(ransforms)954 4276 y Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fv(26)748 4386 y(3.4.2)93 b(Computing)28 b(the)j(Real)f (One-dimensional)e(T)-8 b(ransform)954 4496 y Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fv(27)748 4605 y(3.4.3)93 b(Destro)m(ying)31 b(a)f(Real)h (One-dimensional)c(Plan)g Fr(.)15 b(.)g(.)g(.)h(.)f(.)g(.)g(.)57 b Fv(28)748 4715 y(3.4.4)93 b(What)31 b(RFFTW)g(Really)e(Computes)10 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) 39 b Fv(28)449 4824 y(3.5)92 b(Real)30 b(Multi-dimensional)d(T)-8 b(ransforms)29 b(Reference)f Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)57 b Fv(29)748 4934 y(3.5.1)93 b(Plan)28 b(Creation)g(for)h (Real)g(Multi-dimensional)c(T)-8 b(ransforms)954 5044 y Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fv(29)748 5153 y(3.5.2)93 b(Computing)28 b(the)j(Real)f (Multi-dimensional)d(T)-8 b(ransform)954 5263 y Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fv(30)p eop end %%Page: -2 72 TeXDict begin -2 71 bop 150 -116 a Fv(ii)3270 b(FFTW)748 83 y(3.5.3)93 b(Arra)m(y)30 b(Dimensions)f(for)h(Real)g (Multi-dimensional)930 193 y(T)-8 b(ransforms)17 b Fr(.)d(.)h(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)46 b Fv(32)748 302 y(3.5.4)93 b(Strides)28 b(in)h(In-place)h(RFFTWND)c Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)54 b Fv(32)748 412 y(3.5.5)93 b(Destro)m(ying)31 b(a)f (Multi-dimensional)d(Plan)17 b Fr(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)h(.)46 b Fv(33)748 521 y(3.5.6)93 b(What)31 b(RFFTWND)g(Really)f (Computes)c Fr(.)15 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)56 b Fv(33)449 631 y(3.6)92 b(Wisdom)30 b(Reference)f Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)58 b Fv(34)748 741 y(3.6.1)93 b(Exp)s(orting)28 b(Wisdom)g Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)58 b Fv(34)748 850 y(3.6.2)93 b(Imp)s(orting)28 b(Wisdom)h Fr(.)15 b(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)59 b Fv(35)748 960 y(3.6.3)93 b(F)-8 b(orgetting)31 b(Wisdom)23 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)53 b Fv(35)449 1069 y(3.7)92 b(Memory)31 b(Allo)s(cator)f (Reference)22 b Fr(.)15 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)51 b Fv(35)449 1179 y(3.8)92 b(Thread)29 b(safet)m(y)16 b Fr(.)h(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46 b Fv(36)150 1419 y Fu(4)135 b(P)l(arallel)47 b(FFTW)30 b Fa(.)18 b(.)h(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) f(.)g(.)75 b Fu(37)449 1556 y Fv(4.1)92 b(Multi-threaded)29 b(FFTW)10 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)39 b Fv(37)748 1665 y(4.1.1)93 b(Installation)28 b(and)i(Supp)s(orted)e(Hardw)m(are/Soft)m(w)m(are)9 b Fr(.)17 b(.)e(.)38 b Fv(37)748 1775 y(4.1.2)93 b(Usage)31 b(of)g(Multi-threaded)e(FFTW)f Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fv(38)748 1885 y(4.1.3)93 b(Ho)m(w)31 b(Man)m(y)g(Threads)e(to)i(Use?)22 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)51 b Fv(39)748 1994 y(4.1.4)93 b(Using)29 b(Multi-threaded)g (FFTW)i(in)e(a)i(Multi-threaded)930 2104 y(Program)24 b Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)54 b Fv(40)748 2213 y(4.1.5)93 b(Tips)28 b(for)i(Optimal)f(Threading)22 b Fr(.)13 b(.)i(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)51 b Fv(40)748 2323 y(4.1.6)93 b(P)m(arallelization)29 b(de\014ciencies)g (in)g(one-dimensional)930 2433 y(transforms)e Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)58 b Fv(40)449 2542 y(4.2)92 b(MPI)30 b(FFTW)d Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)55 b Fv(40)748 2652 y(4.2.1)93 b(MPI)30 b(FFTW)h(Installation)9 b Fr(.)k(.)i(.)g(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)38 b Fv(41)748 2761 y(4.2.2)93 b(Usage)31 b(of)f(MPI)g(FFTW)h(for)f (Complex)f(Multi-dimensional)930 2871 y(T)-8 b(ransforms)17 b Fr(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)46 b Fv(41)748 2980 y(4.2.3)93 b(MPI)30 b(Data)i(La)m(y)m(out)9 b Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)38 b Fv(43)748 3090 y(4.2.4)93 b(Usage)31 b(of)g(MPI)f(FFTW)h (for)f(Real)h(Multi-dimensional)930 3200 y(T)-8 b(ransforms)17 b Fr(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)46 b Fv(44)748 3309 y(4.2.5)93 b(Usage)31 b(of)g(MPI)f(FFTW)h(for)f(Complex)g(One-dimensional)930 3419 y(T)-8 b(ransforms)17 b Fr(.)d(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)46 b Fv(47)748 3528 y(4.2.6)93 b(MPI)30 b(Tips)21 b Fr(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b Fv(48)150 3768 y Fu(5)135 b(Calling)46 b(FFTW)e(from)h(F)-11 b(ortran)16 b Fa(.)j(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.) g(.)61 b Fu(51)449 3905 y Fv(5.1)92 b(W)-8 b(rapp)s(er)30 b(Routines)13 b Fr(.)h(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)43 b Fv(51)449 4015 y(5.2)92 b(FFTW)31 b(Constan)m(ts)g(in)e(F)-8 b(ortran)21 b Fr(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)50 b Fv(52)449 4125 y(5.3)92 b(F)-8 b(ortran)31 b(Examples)20 b Fr(.)14 b(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)50 b Fv(52)150 4364 y Fu(6)135 b(Installation)47 b(and)e(Customization)35 b Fa(.)19 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.) f(.)h(.)78 b Fu(55)449 4501 y Fv(6.1)92 b(Installation)29 b(on)h(Unix)19 b Fr(.)14 b(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)49 b Fv(55)449 4611 y(6.2)92 b(Installation)29 b(on)h(non-Unix)f(Systems)13 b Fr(.)i(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)42 b Fv(56)449 4721 y(6.3)92 b(Installing)28 b(FFTW)j(in)e(b)s(oth) h(single)f(and)h(double)e(precision)14 b Fr(.)g(.)h(.)g(.)g(.)g(.)43 b Fv(57)449 4830 y(6.4)92 b Fp(gcc)29 b Fv(and)h(P)m(en)m(tium)g(hac)m (ks)18 b Fr(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) 47 b Fv(57)449 4940 y(6.5)92 b(Customizing)29 b(the)h(timer)16 b Fr(.)e(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)45 b Fv(58)449 5049 y(6.6)92 b(Generating)31 b(y)m(our)f(o)m(wn)g(co)s(de) c Fr(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)55 b Fv(59)150 5289 y Fu(7)135 b(Ac)l(kno)l(wledgmen)l(ts)12 b Fa(.)20 b(.)g(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)57 b Fu(61)p eop end %%Page: -3 73 TeXDict begin -3 72 bop 3674 -116 a Fv(iii)150 83 y Fu(8)135 b(License)45 b(and)g(Cop)l(yrigh)l(t)35 b Fa(.)19 b(.)h(.)f(.)h(.)f(.)h (.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)79 b Fu(63)150 353 y(9)135 b(Concept)45 b(Index)13 b Fa(.)20 b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)58 b Fu(65)150 623 y(10)135 b(Library)45 b(Index)35 b Fa(.)19 b(.)h(.)f(.)h(.)f(.)h(.) f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)80 b Fu(67)p eop end %%Page: -4 74 TeXDict begin -4 73 bop 150 -116 a Fv(iv)3248 b(FFTW)p eop end %%Trailer end userdict /end-hook known{end-hook}if %%EOF fftw-2.1.5/doc/equation-1.gif0000644000175400001440000004523307635206026011402 GIF89aÝ?òEEEuuuºººÿÿÿÿÿÿ!þ Imported from MIFF image: !ù,Ý?@þXUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P …B¡P( …B¡P( …B¡P( …B¡P( …B¡P(  (P @ (P @ (P @(Pþ@€€ (P @ (P @ P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @(P @þP@P@0€P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@PÀP@P@P@P€P@P€P@P@P@P@P@P@P@þP@P@P@P@P@P@P@P@P@P@P@P@@ @P@P@P@P@P@P@P@P@P@P@PÀP€@P@0@P@P@P€P@P@P@P@P@P@ €P@ @P@ @@P@@P@P@P@P@þP@ € € € @P@P@P@P@@P@P@P@P@P@P@PÀP@ÀP@P@P@PP@P@P@P@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ À P€ (@ P€ (@ P€(@ P€ (@ P€ (@ P€ (@ P (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ € (@ P€ (@ P ( P€ (@ P€ (@ P€ (@ P€ (þ@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ €`€ P€ (@ P€ (@þ P (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPP0  0PP  0PPPPPPPPPPPPPPPPPPPPPPPPPPPP0PPPPP   PP  PPPPPPPPPPPPPPPPP0P0PP   Pþ0PPP PPPPPP0PPPPPPPPP PPPP0PP00 PPP PPPPPPPPP        PPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPP PPPPPPPPPPPPPPPPPPP PPPP PPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0P PPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP P PPP PPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (€ (P @ (P @   @ (P @ (P @ (P @ (P @ (P @ (P @þ (P @(`@ (P @ (  @ 0 @P@P@@P@P@P@0€P@P@@P@P@P@ P@PÀP@P@P@P@P@P@P@P@P@P@PÀÀP@P@P@P@P@P@P@P P@0ÀP@P@P@P@þP@P@P@P@P@P@P@ P@P@ @ P@ 0@P@ 0@P@P@P@P@P@P@ @P@ @P€0@ @P@ @ 0@P@P@P@P@P@P@P@P@P@P@P@PÀÀP@P@P@P@P@P@P@@Pþ@P@P@P@P@ € P@P@P@P@€P@ €P@0@P@P@P@P€P@P@P@P@P@@ P@P@P@P@ €P@ P@P@0@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ (@ P€ þ(@ P€ (@ P€ @  (@ P€ @ P€@€ € (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ @ P€ (@ P€ (@ P€(@ P€ € P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€`(@ P€ (@ P€ (@ P€ (€P€ (À€ (@ €`(@ 0 (ÀP€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (þ@ P€ (@ P€ @(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (€P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ @ P€ (@ P€ (@ P€ (@ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ þP€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPP P PPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPP  PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP00 PPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0P PPPPPPPPP PPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPP P0PPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0 PPPPPPPP 0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ þ(P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ ÀP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@PÀþP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@@P@P@P@P@ P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@0€P@P@P@P@0@P@P@P@þP@P€P@P@P@P@ 0@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@00@P@P@P@P@@P@P@P@P@P@P@P@P@P@P@P@P@(@ P€ (P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@0€ (@ P€ (@ P€@(@ P€@(@ P€ (@ P€@@ P€ (@P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€(@ P€ (@ P€ (@ P€ (@ P€ P€ € P€ (@ P€ (þ@ P€ (@ P€ (@ P€ (@€ €   €P€ (@P€ (@ P€ (@ P€ (@ P€ (@ € (@ € (€ €@(@ P€@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ (@ P€ (@ P€ (@þ P€ (@ P€(@ 0€ (@ P€ (@ P€ (@ P€@(@ P€@(@ P€ (@ P€(@ P€(@0 (@0€ € P€ @ P€ (@ P€ (@  (@€ @ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ ( (@ P€ (@ P€ (@ P€ (@ `(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (€ P€ (@ P (@0 (@ € (@P€ (@ P€ (@ P€ (@ P (@  (@  @P€  þ0€ (@ P€ (@ P€@€ @€  (@ P€ (@ P€ P€ (@ P€ (@ P€ (@ P€ (0€ (@ P€ (@ P€ @ P (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ @P€ (@ P€ (@ Pþ€ (@ P€ @ P€ (@ P€ (@ P€(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ PPPPPPPPPPPPPPPPPPPPP0PPPPPPPP0 P PPPPPPPPPPPPPþPPPPPP0 PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP þPPPPP0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPP0PPPPPP       PþPPPPPPPP PPPPPPPPPPPPPP0PP PPPP0PP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPP  PP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0PP PP0PPPP0  PPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 0PPPPPPPPPPPPPPPPPPPPPPPPPPPPP0PPPPPPPPPPPPPP þPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPP 0þPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0PPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (þP @ (P @ (P @ P @€ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@Pþ@P@P@0@P@P@P@PP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@þP@P@P@P@P@P@P@ PP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@þP@P@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€@(@ P€ (@ P€ @ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ € (@ P€ (@ P€@€ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ @ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ ŠP€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ ;fftw-2.1.5/doc/fftw_1.html0000644000175400001440000001662707637531661011021 FFTW - Introduction Go to the first, previous, next, last section, table of contents.


Introduction

This manual documents version 2.1.5 of FFTW, the Fastest Fourier Transform in the West. FFTW is a comprehensive collection of fast C routines for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. FFTW also includes parallel transforms for both shared- and distributed-memory systems. We assume herein that the reader is already familiar with the properties and uses of the DFT that are relevant to her application. Otherwise, see e.g. The Fast Fourier Transform by E. O. Brigham (Prentice-Hall, Englewood Cliffs, NJ, 1974). Our web page also has links to FFT-related information online.

FFTW is usually faster (and sometimes much faster) than all other freely-available Fourier transform programs found on the Net. For transforms whose size is a power of two, it compares favorably with the FFT codes in Sun's Performance Library and IBM's ESSL library, which are targeted at specific machines. Moreover, FFTW's performance is portable. Indeed, FFTW is unique in that it automatically adapts itself to your machine, your cache, the size of your memory, the number of registers, and all the other factors that normally make it impossible to optimize a program for more than one machine. An extensive comparison of FFTW's performance with that of other Fourier transform codes has been made. The results are available on the Web at the benchFFT home page.

In order to use FFTW effectively, you need to understand one basic concept of FFTW's internal structure. FFTW does not used a fixed algorithm for computing the transform, but it can adapt the DFT algorithm to details of the underlying hardware in order to achieve best performance. Hence, the computation of the transform is split into two phases. First, FFTW's planner is called, which "learns" the fastest way to compute the transform on your machine. The planner produces a data structure called a plan that contains this information. Subsequently, the plan is passed to FFTW's executor, along with an array of input data. The executor computes the actual transform, as dictated by the plan. The plan can be reused as many times as needed. In typical high-performance applications, many transforms of the same size are computed, and consequently a relatively-expensive initialization of this sort is acceptable. On the other hand, if you need a single transform of a given size, the one-time cost of the planner becomes significant. For this case, FFTW provides fast planners based on heuristics or on previously computed plans.

The pattern of planning/execution applies to all four operation modes of FFTW, that is, I) one-dimensional complex transforms (FFTW), II) multi-dimensional complex transforms (FFTWND), III) one-dimensional transforms of real data (RFFTW), IV) multi-dimensional transforms of real data (RFFTWND). Each mode comes with its own planner and executor.

Besides the automatic performance adaptation performed by the planner, it is also possible for advanced users to customize FFTW for their special needs. As distributed, FFTW works most efficiently for arrays whose size can be factored into small primes (2, 3, 5, and 7), and uses a slower general-purpose routine for other factors. FFTW, however, comes with a code generator that can produce fast C programs for any particular array size you may care about. For example, if you need transforms of size 513 = 19*33, you can customize FFTW to support the factor 19 efficiently.

FFTW can exploit multiple processors if you have them. FFTW comes with a shared-memory implementation on top of POSIX (and similar) threads, as well as a distributed-memory implementation based on MPI. We also provide an experimental parallel implementation written in Cilk, the superior programming tool of choice for discriminating hackers (Olin Shivers). (See the Cilk home page.)

For more information regarding FFTW, see the paper, "The Fastest Fourier Transform in the West," by M. Frigo and S. G. Johnson, which is the technical report MIT-LCS-TR-728 (Sep. '97). See also, "FFTW: An Adaptive Software Architecture for the FFT," by M. Frigo and S. G. Johnson, which appeared in the 23rd International Conference on Acoustics, Speech, and Signal Processing (Proc. ICASSP 1998 3, p. 1381). The code generator is described in the paper "A Fast Fourier Transform Compiler", by M. Frigo, to appear in the Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Atlanta, Georgia, May 1999. These papers, along with the latest version of FFTW, the FAQ, benchmarks, and other links, are available at the FFTW home page. The current version of FFTW incorporates many good ideas from the past thirty years of FFT literature. In one way or another, FFTW uses the Cooley-Tukey algorithm, the Prime Factor algorithm, Rader's algorithm for prime sizes, and the split-radix algorithm (with a variation due to Dan Bernstein). Our code generator also produces new algorithms that we do not yet completely understand. The reader is referred to the cited papers for the appropriate references.

The rest of this manual is organized as follows. We first discuss the sequential (one-processor) implementation. We start by describing the basic features of FFTW in Section Tutorial. This discussion includes the storage scheme of multi-dimensional arrays (Section Multi-dimensional Array Format) and FFTW's mechanisms for storing plans on disk (Section Words of Wisdom). Next, Section FFTW Reference provides comprehensive documentation of all FFTW's features. Parallel transforms are discussed in their own chapter Section Parallel FFTW. Fortran programmers can also use FFTW, as described in Section Calling FFTW from Fortran. Section Installation and Customization explains how to install FFTW in your computer system and how to adapt FFTW to your needs. License and copyright information is given in Section License and Copyright. Finally, we thank all the people who helped us in Section Acknowledgments.


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_4.html0000644000175400001440000011625007637531661011015 FFTW - Parallel FFTW Go to the first, previous, next, last section, table of contents.


Parallel FFTW

In this chapter we discuss the use of FFTW in a parallel environment, documenting the different parallel libraries that we have provided. (Users calling FFTW from a multi-threaded program should also consult Section Thread safety.) The FFTW package currently contains three parallel transform implementations that leverage the uniprocessor FFTW code:

  • The first set of routines utilizes shared-memory threads for parallel one- and multi-dimensional transforms of both real and complex data. Any program using FFTW can be trivially modified to use the multi-threaded routines. This code can use any common threads implementation, including POSIX threads. (POSIX threads are available on most Unix variants, including Linux.) These routines are located in the threads directory, and are documented in Section Multi-threaded FFTW.
  • The mpi directory contains multi-dimensional transforms of real and complex data for parallel machines supporting MPI. It also includes parallel one-dimensional transforms for complex data. The main feature of this code is that it supports distributed-memory transforms, so it runs on everything from workstation clusters to massively-parallel supercomputers. More information on MPI can be found at the MPI home page. The FFTW MPI routines are documented in Section MPI FFTW.
  • We also have an experimental parallel implementation written in Cilk, a C-like parallel language developed at MIT and currently available for several SMP platforms. For more information on Cilk see the Cilk home page. The FFTW Cilk code can be found in the cilk directory, with parallelized one- and multi-dimensional transforms of complex data. The Cilk FFTW routines are documented in cilk/README.

Multi-threaded FFTW

In this section we document the parallel FFTW routines for shared-memory threads on SMP hardware. These routines, which support parallel one- and multi-dimensional transforms of both real and complex data, are the easiest way to take advantage of multiple processors with FFTW. They work just like the corresponding uniprocessor transform routines, except that they take the number of parallel threads to use as an extra parameter. Any program that uses the uniprocessor FFTW can be trivially modified to use the multi-threaded FFTW.

Installation and Supported Hardware/Software

All of the FFTW threads code is located in the threads subdirectory of the FFTW package. On Unix systems, the FFTW threads libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including --enable-threads in the flags to the configure script (see Section Installation on Unix). (Note also that the threads routines, when enabled, are automatically tested by the `make check' self-tests.)

The threads routines require your operating system to have some sort of shared-memory threads support. Specifically, the FFTW threads package works with POSIX threads (available on most Unix variants, including Linux), Solaris threads, BeOS threads (tested on BeOS DR8.2), Mach C threads (reported to work by users), and Win32 threads (reported to work by users). (There is also untested code to use MacOS MP threads.) We also support using OpenMP or SGI MP compiler directives to launch threads, enabled by using --with-openmp or --with-sgimp in addition to --enable-threads. This is especially useful if you are employing that sort of directive in your own code, in order to minimize conflicts. If you have a shared-memory machine that uses a different threads API, it should be a simple matter of programming to include support for it; see the file fftw_threads-int.h for more detail.

SMP hardware is not required, although of course you need multiple processors to get any benefit from the multithreaded transforms.

Usage of Multi-threaded FFTW

Here, it is assumed that the reader is already familiar with the usage of the uniprocessor FFTW routines, described elsewhere in this manual. We only describe what one has to change in order to use the multi-threaded routines.

First, instead of including <fftw.h> or <rfftw.h>, you should include the files <fftw_threads.h> or <rfftw_threads.h>, respectively.

Second, before calling any FFTW routines, you should call the function:

int fftw_threads_init(void);

This function, which should only be called once (probably in your main() function), performs any one-time initialization required to use threads on your system. It returns zero if successful, and a non-zero value if there was an error (in which case, something is seriously wrong and you should probably exit the program).

Third, when you want to actually compute the transform, you should use one of the following transform routines instead of the ordinary FFTW functions:

fftw_threads(nthreads, plan, howmany, in, istride, 
             idist, out, ostride, odist);

fftw_threads_one(nthreads, plan, in, out);

fftwnd_threads(nthreads, plan, howmany, in, istride,
               idist, out, ostride, odist);

fftwnd_threads_one(nthreads, plan, in, out);

rfftw_threads(nthreads, plan, howmany, in, istride, 
              idist, out, ostride, odist);

rfftw_threads_one(nthreads, plan, in, out);

rfftwnd_threads_real_to_complex(nthreads, plan, howmany, in, 
                                istride, idist, out, ostride, odist);

rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out);

rfftwnd_threads_complex_to_real(nthreads, plan, howmany, in,
                                istride, idist, out, ostride, odist);

rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out);

rfftwnd_threads_one_complex_to_real(nthreads, plan, in, out);

All of these routines take exactly the same arguments and have exactly the same effects as their uniprocessor counterparts (i.e. without the `_threads') except that they take one extra parameter, nthreads (of type int), before the normal parameters.(5) The nthreads parameter specifies the number of threads of execution to use when performing the transform (actually, the maximum number of threads).

For example, to parallelize a single one-dimensional transform of complex data, instead of calling the uniprocessor fftw_one(plan, in, out), you would call fftw_threads_one(nthreads, plan, in, out). Passing an nthreads of 1 means to use only one thread (the main thread), and is equivalent to calling the uniprocessor routine. Passing an nthreads of 2 means that the transform is potentially parallelized over two threads (and two processors, if you have them), and so on.

These are the only changes you need to make to your source code. Calls to all other FFTW routines (plan creation, destruction, wisdom, etcetera) are not parallelized and remain the same. (The same plans and wisdom are used by both uniprocessor and multi-threaded transforms.) Your arrays are allocated and formatted in the same way, and so on.

Programs using the parallel complex transforms should be linked with -lfftw_threads -lfftw -lm on Unix. Programs using the parallel real transforms should be linked with -lrfftw_threads -lfftw_threads -lrfftw -lfftw -lm. You will also need to link with whatever library is responsible for threads on your system (e.g. -lpthread on Linux).

How Many Threads to Use?

There is a fair amount of overhead involved in spawning and synchronizing threads, so the optimal number of threads to use depends upon the size of the transform as well as on the number of processors you have.

As a general rule, you don't want to use more threads than you have processors. (Using more threads will work, but there will be extra overhead with no benefit.) In fact, if the problem size is too small, you may want to use fewer threads than you have processors.

You will have to experiment with your system to see what level of parallelization is best for your problem size. Useful tools to help you do this are the test programs that are automatically compiled along with the threads libraries, fftw_threads_test and rfftw_threads_test (in the threads subdirectory). These take the same arguments as the other FFTW test programs (see tests/README), except that they also take the number of threads to use as a first argument, and report the parallel speedup in speed tests. For example,

fftw_threads_test 2 -s 128x128

will benchmark complex 128x128 transforms using two threads and report the speedup relative to the uniprocessor transform.

For instance, on a 4-processor 200MHz Pentium Pro system running Linux 2.2.0, we found that the "crossover" point at which 2 threads became beneficial for complex transforms was about 4k points, while 4 threads became beneficial at 8k points.

Using Multi-threaded FFTW in a Multi-threaded Program

It is perfectly possible to use the multi-threaded FFTW routines from a multi-threaded program (e.g. have multiple threads computing multi-threaded transforms simultaneously). If you have the processors, more power to you! However, the same restrictions apply as for the uniprocessor FFTW routines (see Section Thread safety). In particular, you should recall that you may not create or destroy plans in parallel.

Tips for Optimal Threading

Not all transforms are equally well-parallelized by the multi-threaded FFTW routines. (This is merely a consequence of laziness on the part of the implementors, and is not inherent to the algorithms employed.) Mainly, the limitations are in the parallel one-dimensional transforms. The things to avoid if you want optimal parallelization are as follows:

Parallelization deficiencies in one-dimensional transforms

  • Large prime factors can sometimes parallelize poorly. Of course, you should avoid these anyway if you want high performance.
  • Single in-place transforms don't parallelize completely. (Multiple in-place transforms, i.e. howmany > 1, are fine.) Again, you should avoid these in any case if you want high performance, as they require transforming to a scratch array and copying back.
  • Single real-complex (rfftw) transforms don't parallelize completely. This is unfortunate, but parallelizing this correctly would have involved a lot of extra code (and a much larger library). You still get some benefit from additional processors, but if you have a very large number of processors you will probably be better off using the parallel complex (fftw) transforms. Note that multi-dimensional real transforms or multiple one-dimensional real transforms are fine.

MPI FFTW

This section describes the MPI FFTW routines for distributed-memory (and shared-memory) machines supporting MPI (Message Passing Interface). The MPI routines are significantly different from the ordinary FFTW because the transform data here are distributed over multiple processes, so that each process gets only a portion of the array. Currently, multi-dimensional transforms of both real and complex data, as well as one-dimensional transforms of complex data, are supported.

MPI FFTW Installation

The FFTW MPI library code is all located in the mpi subdirectoy of the FFTW package (along with source code for test programs). On Unix systems, the FFTW MPI libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including --enable-mpi in the flags to the configure script (see Section Installation on Unix).

The only requirement of the FFTW MPI code is that you have the standard MPI 1.1 (or later) libraries and header files installed on your system. A free implementation of MPI is available from the MPICH home page.

Previous versions of the FFTW MPI routines have had an unfortunate tendency to expose bugs in MPI implementations. The current version has been largely rewritten, and hopefully avoids some of the problems. If you run into difficulties, try passing the optional workspace to (r)fftwnd_mpi (see below), as this allows us to use the standard (and hopefully well-tested) MPI_Alltoall primitive for communications. Please let us know (fftw@fftw.org) how things work out.

Several test programs are included in the mpi directory. The ones most useful to you are probably the fftw_mpi_test and rfftw_mpi_test programs, which are run just like an ordinary MPI program and accept the same parameters as the other FFTW test programs (c.f. tests/README). For example, mpirun ...params... fftw_mpi_test -r 0 will run non-terminating complex-transform correctness tests of random dimensions. They can also do performance benchmarks.

Usage of MPI FFTW for Complex Multi-dimensional Transforms

Usage of the MPI FFTW routines is similar to that of the uniprocessor FFTW. We assume that the reader already understands the usage of the uniprocessor FFTW routines, described elsewhere in this manual. Some familiarity with MPI is also helpful.

A typical program performing a complex two-dimensional MPI transform might look something like:

#include <fftw_mpi.h>

int main(int argc, char **argv)
{
      const int NX = ..., NY = ...;
      fftwnd_mpi_plan plan;
      fftw_complex *data;

      MPI_Init(&argc,&argv);

      plan = fftw2d_mpi_create_plan(MPI_COMM_WORLD,
                                    NX, NY,
                                    FFTW_FORWARD, FFTW_ESTIMATE);

      ...allocate and initialize data...

      fftwnd_mpi(p, 1, data, NULL, FFTW_NORMAL_ORDER);

      ...

      fftwnd_mpi_destroy_plan(plan);
      MPI_Finalize();
}

The calls to MPI_Init and MPI_Finalize are required in all MPI programs; see the MPI home page for more information. Note that all of your processes run the program in parallel, as a group; there is no explicit launching of threads/processes in an MPI program.

As in the ordinary FFTW, the first thing we do is to create a plan (of type fftwnd_mpi_plan), using:

fftwnd_mpi_plan fftw2d_mpi_create_plan(MPI_Comm comm,
                                       int nx, int ny,
                                       fftw_direction dir, int flags);

Except for the first argument, the parameters are identical to those of fftw2d_create_plan. (There are also analogous fftwnd_mpi_create_plan and fftw3d_mpi_create_plan functions. Transforms of any rank greater than one are supported.) The first argument is an MPI communicator, which specifies the group of processes that are to be involved in the transform; the standard constant MPI_COMM_WORLD indicates all available processes.

Next, one has to allocate and initialize the data. This is somewhat tricky, because the transform data is distributed across the processes involved in the transform. It is discussed in detail by the next section (see Section MPI Data Layout).

The actual computation of the transform is performed by the function fftwnd_mpi, which differs somewhat from its uniprocessor equivalent and is described by:

void fftwnd_mpi(fftwnd_mpi_plan p,
                int n_fields,
                fftw_complex *local_data, fftw_complex *work,
                fftwnd_mpi_output_order output_order);

There are several things to notice here:

  • First of all, all fftw_mpi transforms are in-place: the output is in the local_data parameter, and there is no need to specify FFTW_IN_PLACE in the plan flags.
  • The MPI transforms also only support a limited subset of the howmany/stride/dist functionality of the uniprocessor routines: the n_fields parameter is equivalent to howmany=n_fields, stride=n_fields, and dist=1. (Conceptually, the n_fields parameter allows you to transform an array of contiguous vectors, each with length n_fields.) n_fields is 1 if you are only transforming a single, ordinary array.
  • The work parameter is an optional workspace. If it is not NULL, it should be exactly the same size as the local_data array. If it is provided, FFTW is able to use the built-in MPI_Alltoall primitive for (often) greater efficiency at the expense of extra storage space.
  • Finally, the last parameter specifies whether the output data has the same ordering as the input data (FFTW_NORMAL_ORDER), or if it is transposed (FFTW_TRANSPOSED_ORDER). Leaving the data transposed results in significant performance improvements due to a saved communication step (needed to un-transpose the data). Specifically, the first two dimensions of the array are transposed, as is described in more detail by the next section.

The output of fftwnd_mpi is identical to that of the corresponding uniprocessor transform. In particular, you should recall our conventions for normalization and the sign of the transform exponent.

The same plan can be used to compute many transforms of the same size. After you are done with it, you should deallocate it by calling fftwnd_mpi_destroy_plan.

Important: The FFTW MPI routines must be called in the same order by all processes involved in the transform. You should assume that they all are blocking, as if each contained a call to MPI_Barrier.

Programs using the FFTW MPI routines should be linked with -lfftw_mpi -lfftw -lm on Unix, in addition to whatever libraries are required for MPI.

MPI Data Layout

The transform data used by the MPI FFTW routines is distributed: a distinct portion of it resides with each process involved in the transform. This allows the transform to be parallelized, for example, over a cluster of workstations, each with its own separate memory, so that you can take advantage of the total memory of all the processors you are parallelizing over.

In particular, the array is divided according to the rows (first dimension) of the data: each process gets a subset of the rows of the data. (This is sometimes called a "slab decomposition.") One consequence of this is that you can't take advantage of more processors than you have rows (e.g. 64x64x64 matrix can at most use 64 processors). This isn't usually much of a limitation, however, as each processor needs a fair amount of data in order for the parallel-computation benefits to outweight the communications costs.

Below, the first dimension of the data will be referred to as `x' and the second dimension as `y'.

FFTW supplies a routine to tell you exactly how much data resides on the current process:

void fftwnd_mpi_local_sizes(fftwnd_mpi_plan p,
                            int *local_nx,
                            int *local_x_start,
                            int *local_ny_after_transpose,
                            int *local_y_start_after_transpose,
                            int *total_local_size);

Given a plan p, the other parameters of this routine are set to values describing the required data layout, described below.

total_local_size is the number of fftw_complex elements that you must allocate for your local data (and workspace, if you choose). (This value should, of course, be multiplied by n_fields if that parameter to fftwnd_mpi is not 1.)

The data on the current process has local_nx rows, starting at row local_x_start. If fftwnd_mpi is called with FFTW_TRANSPOSED_ORDER output, then y will be the first dimension of the output, and the local y extent will be given by local_ny_after_transpose and local_y_start_after_transpose. Otherwise, the output has the same dimensions and layout as the input.

For instance, suppose you want to transform three-dimensional data of size nx x ny x nz. Then, the current process will store a subset of this data, of size local_nx x ny x nz, where the x indices correspond to the range local_x_start to local_x_start+local_nx-1 in the "real" (i.e. logical) array. If fftwnd_mpi is called with FFTW_TRANSPOSED_ORDER output, then the result will be a ny x nx x nz array, of which a local_ny_after_transpose x nx x nz subset is stored on the current process (corresponding to y values starting at local_y_start_after_transpose).

The following is an example of allocating such a three-dimensional array array (local_data) before the transform and initializing it to some function f(x,y,z):

        fftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start,
                               &local_ny_after_transpose,
                               &local_y_start_after_transpose,
                               &total_local_size);

        local_data = (fftw_complex*) malloc(sizeof(fftw_complex) *
                                            total_local_size);

        for (x = 0; x < local_nx; ++x)
                for (y = 0; y < ny; ++y)
                        for (z = 0; z < nz; ++z)
                                local_data[(x*ny + y)*nz + z]
                                        = f(x + local_x_start, y, z);

Some important things to remember:

  • Although the local data is of dimensions local_nx x ny x nz in the above example, do not allocate the array to be of size local_nx*ny*nz. Use total_local_size instead.
  • The amount of data on each process will not necessarily be the same; in fact, local_nx may even be zero for some processes. (For example, suppose you are doing a 6x6 transform on four processors. There is no way to effectively use the fourth processor in a slab decomposition, so we leave it empty. Proof left as an exercise for the reader.)
  • All arrays are, of course, in row-major order (see Section Multi-dimensional Array Format).
  • If you want to compute the inverse transform of the output of fftwnd_mpi, the dimensions of the inverse transform are given by the dimensions of the output of the forward transform. For example, if you are using FFTW_TRANSPOSED_ORDER output in the above example, then the inverse plan should be created with dimensions ny x nx x nz.
  • The data layout only depends upon the dimensions of the array, not on the plan, so you are guaranteed that different plans for the same size (or inverse plans) will use the same (consistent) data layouts.

Usage of MPI FFTW for Real Multi-dimensional Transforms

MPI transforms specialized for real data are also available, similiar to the uniprocessor rfftwnd transforms. Just as in the uniprocessor case, the real-data MPI functions gain roughly a factor of two in speed (and save a factor of two in space) at the expense of more complicated data formats in the calling program. Before reading this section, you should definitely understand how to call the uniprocessor rfftwnd functions and also the complex MPI FFTW functions.

The following is an example of a program using rfftwnd_mpi. It computes the size nx x ny x nz transform of a real function f(x,y,z), multiplies the imaginary part by 2 for fun, then computes the inverse transform. (We'll also use FFTW_TRANSPOSED_ORDER output for the transform, and additionally supply the optional workspace parameter to rfftwnd_mpi, just to add a little spice.)

#include <rfftw_mpi.h>

int main(int argc, char **argv)
{
     const int nx = ..., ny = ..., nz = ...;
     int local_nx, local_x_start, local_ny_after_transpose,
         local_y_start_after_transpose, total_local_size;
     int x, y, z;
     rfftwnd_mpi_plan plan, iplan;
     fftw_real *data, *work;
     fftw_complex *cdata;

     MPI_Init(&argc,&argv);

     /* create the forward and backward plans: */
     plan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD,
                                    nx, ny, nz,
                                    FFTW_REAL_TO_COMPLEX,
                                    FFTW_ESTIMATE);
     iplan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD,
      /* dim.'s of REAL data --> */  nx, ny, nz,
                                     FFTW_COMPLEX_TO_REAL,
                                     FFTW_ESTIMATE);

     rfftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start,
                            &local_ny_after_transpose,
                            &local_y_start_after_transpose,
                            &total_local_size);

     data = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size);

     /* workspace is the same size as the data: */
     work = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size);

     /* initialize data to f(x,y,z): */
     for (x = 0; x < local_nx; ++x)
             for (y = 0; y < ny; ++y)
                     for (z = 0; z < nz; ++z)
                             data[(x*ny + y) * (2*(nz/2+1)) + z]
                                     = f(x + local_x_start, y, z);

     /* Now, compute the forward transform: */
     rfftwnd_mpi(plan, 1, data, work, FFTW_TRANSPOSED_ORDER);

     /* the data is now complex, so typecast a pointer: */
     cdata = (fftw_complex*) data;
     
     /* multiply imaginary part by 2, for fun:
        (note that the data is transposed) */
     for (y = 0; y < local_ny_after_transpose; ++y)
             for (x = 0; x < nx; ++x)
                     for (z = 0; z < (nz/2+1); ++z)
                             cdata[(y*nx + x) * (nz/2+1) + z].im
                                     *= 2.0;

     /* Finally, compute the inverse transform; the result
        is transposed back to the original data layout: */
     rfftwnd_mpi(iplan, 1, data, work, FFTW_TRANSPOSED_ORDER);

     free(data);
     free(work);
     rfftwnd_mpi_destroy_plan(plan);
     rfftwnd_mpi_destroy_plan(iplan);
     MPI_Finalize();
}

There's a lot of stuff in this example, but it's all just what you would have guessed, right? We replaced all the fftwnd_mpi* functions by rfftwnd_mpi*, but otherwise the parameters were pretty much the same. The data layout distributed among the processes just like for the complex transforms (see Section MPI Data Layout), but in addition the final dimension is padded just like it is for the uniprocessor in-place real transforms (see Section Array Dimensions for Real Multi-dimensional Transforms). In particular, the z dimension of the real input data is padded to a size 2*(nz/2+1), and after the transform it contains nz/2+1 complex values.

Some other important things to know about the real MPI transforms:

  • As for the uniprocessor rfftwnd_create_plan, the dimensions passed for the FFTW_COMPLEX_TO_REAL plan are those of the real data. In particular, even when FFTW_TRANSPOSED_ORDER is used as in this case, the dimensions are those of the (untransposed) real output, not the (transposed) complex input. (For the complex MPI transforms, on the other hand, the dimensions are always those of the input array.)
  • The output ordering of the transform (FFTW_TRANSPOSED_ORDER or FFTW_TRANSPOSED_ORDER) must be the same for both forward and backward transforms. (This is not required in the complex case.)
  • total_local_size is the required size in fftw_real values, not fftw_complex values as it is for the complex transforms.
  • local_ny_after_transpose and local_y_start_after_transpose describe the portion of the array after the transform; that is, they are indices in the complex array for an FFTW_REAL_TO_COMPLEX transform and in the real array for an FFTW_COMPLEX_TO_REAL transform.
  • rfftwnd_mpi always expects fftw_real* array arguments, but of course these pointers can refer to either real or complex arrays, depending upon which side of the transform you are on. Just as for in-place uniprocessor real transforms (and also in the example above), this is most easily handled by typecasting to a complex pointer when handling the complex data.
  • As with the complex transforms, there are also rfftwnd_create_plan and rfftw2d_create_plan functions, and any rank greater than one is supported.

Programs using the MPI FFTW real transforms should link with -lrfftw_mpi -lfftw_mpi -lrfftw -lfftw -lm on Unix.

Usage of MPI FFTW for Complex One-dimensional Transforms

The MPI FFTW also includes routines for parallel one-dimensional transforms of complex data (only). Although the speedup is generally worse than it is for the multi-dimensional routines,(6) these distributed-memory one-dimensional transforms are especially useful for performing one-dimensional transforms that don't fit into the memory of a single machine.

The usage of these routines is straightforward, and is similar to that of the multi-dimensional MPI transform functions. You first include the header <fftw_mpi.h> and then create a plan by calling:

fftw_mpi_plan fftw_mpi_create_plan(MPI_Comm comm, int n, 
                                   fftw_direction dir, int flags);

The last three arguments are the same as for fftw_create_plan (except that all MPI transforms are automatically FFTW_IN_PLACE). The first argument specifies the group of processes you are using, and is usually MPI_COMM_WORLD (all processes). A plan can be used for many transforms of the same size, and is destroyed when you are done with it by calling fftw_mpi_destroy_plan(plan).

If you don't care about the ordering of the input or output data of the transform, you can include FFTW_SCRAMBLED_INPUT and/or FFTW_SCRAMBLED_OUTPUT in the flags. These save some communications at the expense of having the input and/or output reordered in an undocumented way. For example, if you are performing an FFT-based convolution, you might use FFTW_SCRAMBLED_OUTPUT for the forward transform and FFTW_SCRAMBLED_INPUT for the inverse transform.

The transform itself is computed by:

void fftw_mpi(fftw_mpi_plan p, int n_fields,
              fftw_complex *local_data, fftw_complex *work);

n_fields, as in fftwnd_mpi, is equivalent to howmany=n_fields, stride=n_fields, and dist=1, and should be 1 when you are computing the transform of a single array. local_data contains the portion of the array local to the current process, described below. work is either NULL or an array exactly the same size as local_data; in the latter case, FFTW can use the MPI_Alltoall communications primitive which is (usually) faster at the expense of extra storage. Upon return, local_data contains the portion of the output local to the current process (see below).

To find out what portion of the array is stored local to the current process, you call the following routine:

void fftw_mpi_local_sizes(fftw_mpi_plan p,
                          int *local_n, int *local_start,
                          int *local_n_after_transform,
                          int *local_start_after_transform,
                          int *total_local_size);

total_local_size is the number of fftw_complex elements you should actually allocate for local_data (and work). local_n and local_start indicate that the current process stores local_n elements corresponding to the indices local_start to local_start+local_n-1 in the "real" array. After the transform, the process may store a different portion of the array. The portion of the data stored on the process after the transform is given by local_n_after_transform and local_start_after_transform. This data is exactly the same as a contiguous segment of the corresponding uniprocessor transform output (i.e. an in-order sequence of sequential frequency bins).

Note that, if you compute both a forward and a backward transform of the same size, the local sizes are guaranteed to be consistent. That is, the local size after the forward transform will be the same as the local size before the backward transform, and vice versa.

Programs using the FFTW MPI routines should be linked with -lfftw_mpi -lfftw -lm on Unix, in addition to whatever libraries are required for MPI.

MPI Tips

There are several things you should consider in order to get the best performance out of the MPI FFTW routines.

First, if possible, the first and second dimensions of your data should be divisible by the number of processes you are using. (If only one can be divisible, then you should choose the first dimension.) This allows the computational load to be spread evenly among the processes, and also reduces the communications complexity and overhead. In the one-dimensional transform case, the size of the transform should ideally be divisible by the square of the number of processors.

Second, you should consider using the FFTW_TRANSPOSED_ORDER output format if it is not too burdensome. The speed gains from communications savings are usually substantial.

Third, you should consider allocating a workspace for (r)fftw(nd)_mpi, as this can often (but not always) improve performance (at the cost of extra storage).

Fourth, you should experiment with the best number of processors to use for your problem. (There comes a point of diminishing returns, when the communications costs outweigh the computational benefits.(7)) The fftw_mpi_test program can output helpful performance benchmarks. It accepts the same parameters as the uniprocessor test programs (c.f. tests/README) and is run like an ordinary MPI program. For example, mpirun -np 4 fftw_mpi_test -s 128x128x128 will benchmark a 128x128x128 transform on four processors, reporting timings and parallel speedups for all variants of fftwnd_mpi (transposed, with workspace, etcetera). (Note also that there is the rfftw_mpi_test program for the real transforms.)


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_7.html0000644000175400001440000000711007637531661011012 FFTW - Acknowledgments Go to the first, previous, next, last section, table of contents.


Acknowledgments

Matteo Frigo was supported in part by the Defense Advanced Research Projects Agency (DARPA) under Grants N00014-94-1-0985 and F30602-97-1-0270, and by a Digital Equipment Corporation Fellowship. Steven G. Johnson was supported in part by a DoD NDSEG Fellowship, an MIT Karl Taylor Compton Fellowship, and by the Materials Research Science and Engineering Center program of the National Science Foundation under award DMR-9400334.

Both authors were also supported in part by their respective girlfriends, by the letters "Q" and "R", and by the number 12.

We are grateful to SUN Microsystems Inc. for its donation of a cluster of 9 8-processor Ultra HPC 5000 SMPs (24 Gflops peak). These machines served as the primary platform for the development of earlier versions of FFTW.

We thank Intel Corporation for donating a four-processor Pentium Pro machine. We thank the Linux community for giving us a decent OS to run on that machine.

The genfft program was written using Objective Caml, a dialect of ML. Objective Caml is a small and elegant language developed by Xavier Leroy. The implementation is available from ftp.inria.fr in the directory lang/caml-light. We used versions 1.07 and 2.00 of the software. In previous releases of FFTW, genfft was written in Caml Light, by the same authors. An even earlier implementation of genfft was written in Scheme, but Caml is definitely better for this kind of application.

FFTW uses many tools from the GNU project, including automake, texinfo, and libtool.

Prof. Charles E. Leiserson of MIT provided continuous support and encouragement. This program would not exist without him. Charles also proposed the name "codelets" for the basic FFT blocks.

Prof. John D. Joannopoulos of MIT demonstrated continuing tolerance of Steven's "extra-curricular" computer-science activities. Steven's chances at a physics degree would not exist without him.

Andrew Sterian contributed the Windows timing code.

Didier Miras reported a bug in the test procedure used in FFTW 1.2. We now use a completely different test algorithm by Funda Ergun that does not require a separate FFT program to compare against.

Wolfgang Reimer contributed the Pentium cycle counter and a few fixes that help portability.

Ming-Chang Liu uncovered a well-hidden bug in the complex transforms of FFTW 2.0 and supplied a patch to correct it.

The FFTW FAQ was written in bfnn (Bizarre Format With No Name) and formatted using the tools developed by Ian Jackson for the Linux FAQ.

We are especially thankful to all of our users for their continuing support, feedback, and interest during our development of FFTW.


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_foot.html0000644000175400001440000000616007637531661011617 FFTW - Footnotes

FFTW

For version 2.1.5, 16 March 2003


(1)

The output for the multi-dimensional rfftw is a more-conventional array of fftw_complex values, but the format here permitted us greater efficiency in one dimension.

(2)

The basic problem is the resolution of the clock: FFTW needs to run for a certain time for the clock to be reliable.

(3)

fftwnd actually may use some temporary storage (hidden in the plan), but this storage space is only the size of the largest dimension of the array, rather than being as big as the entire array. (Unless you use fftwnd to perform one-dimensional transforms, in which case the temporary storage required for in-place transforms is as big as the entire array.)

(4)

The etymologically-correct spelling would be frftw_, but it is hard to remember.

(5)

There is one exception: when performing one-dimensional in-place transforms, the out parameter is always ignored by the multi-threaded routines, instead of being used as a workspace if it is non-NULL as in the uniprocessor routines. The multi-threaded routines always allocate their own workspace (the size of which depends upon the number of threads).

(6)

The 1D transforms require much more communication. All the communication in our FFT routines takes the form of an all-to-all communication: the multi-dimensional transforms require two all-to-all communications (or one, if you use FFTW_TRANSPOSED_ORDER), while the one-dimensional transforms require three (or two, if you use scrambled input or output).

(7)

An FFT is particularly hard on communications systems, as it requires an all-to-all communication, which is more or less the worst possible case.

(8)

Technically, Fortran 77 identifiers are not allowed to have more than 6 characters, nor may they contain underscores. Any compiler that enforces this limitation doesn't deserve to link to FFTW.

(9)

Each version of cc seems to have its own magic incantation to get the fastest code most of the time--you'd think that people would have agreed upon some convention, e.g. "-Omax", by now.


This document was generated on 24 March 2003 using the texi2html translator version 1.52. (properly hacked by athena@theory.lcs.mit.edu)

fftw-2.1.5/doc/equation-2.gif0000644000175400001440000004365007635206026011404 GIF89aÑ@òEEEuuuºººÿÿÿÿÿÿ!þ Imported from MIFF image: !ù,Ñ@@þXUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P(  (P @ (P € P@@ (Pþ @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @þP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@PP@P@P@P@P@P@PÀP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ P@P@P@P@þP@P@P@P@€PÀP@P@P@P@P@P@P€0@ €P@P@0@P€P@ €PÀP@P@P@P@P@ €P@ @P@ @@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@þP@P@P@P@P@0@@P@P@P@PP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P`þ(@ P€ (@ P€ (@ € (@ P€ (@ P€ (@ P€ ( P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€  (@ P€ (@ P€ @ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (þ@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P@(€P€ (@ P€ (@ P€@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP00PPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPP0PP   0P0PPP0PPPPPPPPPPPPPPP PPPP0PP00 PPPP0PPPPPPPPP       PPPPPPPPPPþPPPPPPPPPPPPPP0PPPPPPPPPP PPPPPPPPPPPP0P PPPPPPPPPPPPPPPPPPP PPPPPPPP  PPPPPPPPPPþPPPPPPPPPPPPPPP00PPPPPPPPPPPP0PP PPPPPPP 0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0PPPPPPPPP0PPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP  þPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPP PP PP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @ (P@ (P @ (P À(P @ (P @ (P @P @ ( @ (P @ (P @ (P @ (P @ (P @(P @ (P @ (P @ (P @ À€ (@@ (P @ (P @ (P @ (0 @€ (P €€(0`@ (0`@þ  @ (P @ (P @(P @(P @0@ @P@0@@P@P@P@P@P@P@P@P@P@P@P@P @P@P@P@P@P@P@P@ @P@P@P@P@P@P@ @@ @P@0@PP@P€þ €P@P@P@P@P@@ P@P@P@P@ €P@ P@P@0@P@P@P@P@P@P@P@P@P@P@0P@P@P@P@P@P@P@P€@P@P@ @PÀP@0@P@P@P@P@P@P@P@Pþ@P@P@P@P@P@P@P@P@P@P@P@P@P@P@ P@P@ @P@P@ € € € €P@P@P@P@ P@P@P@P@P@P@(@ 0€ (@ (@ P (@  (@P€ (@ P€ (@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ ÀP€ (@ P€ (@ P€ (@ P€ (@ P€ (@ € (@ P€ (@ P€ À P€ (@ P€ (@ P€ (@ P€@(@ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ P€ (@ P€ (@ @ P€ (@ P€ (þ@ P€ (@ 0€@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@þ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ þP€ (@ P€ (@ P€ (@ P€ (@ P€`(@ P€ PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþ0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPP0P PPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPP P PPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP0 PPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @  (P @ (P @ (P @ (P @ (P @ (P @P @ (P @ (PÀ€  @ (P @ P @ (P @ (P`À€ (P @ (P @ (P @ (P @ (P @ (P @ þ(P @ (P @ (P @ `@ (P @ (P @(P @ (P @ (P @ (P @P@P@P@P@@ @P@P@P@P@P@P@P@P@ÀP@P@P@P@ €P@P€P@P@P@ € ÀP@ € P@P@P@P@þP@P@P@P@P@P@@P@P@P@P@PÀP@P@PÀ € P@ €P@P@P@P@P@P@ @€€ P@ €P€0@P@P@ÀP@P@P@P@P€P@P@P@ @ P€P@@P@0€P@P@P@þP@P@P@P@P@P@P@00@P@P@P@P@P@P@P@P P@0ÀP@P@P@P@P@P@ ÀP@P€P@PP@@0ÀP@ÀP@ @P@P@P@P@P@(@  (€€ (€ P€ þ(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ € (@ P€ (@ P€ (@ P€ (@ 0 € P€ (@ P€ (@ P€ (@ P @ P€ (@ P€ @ P€@(@ P€ (@P€ (@ P€ (@ P€ € P€ @ P€ þ@ @(@  À P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@`(@ P€ (@ P€ (@ P€ (@ P€@ P€ (@ P€ (@ P€@@ P€ (@ P€ (@ P€ (@ P€(@ P€ ( P€ (@ P€ (@þ P€ (@ P€ @ P€ (@ P€ (@ P€@ P€ (@ P€ (@ P@€ @€P€ (@ P€ (@ P€@ P€ (@ P€ (@ P€ (@ P€ € P€ (@ P€ (@  (€ P€ (@ P€ (@ P€ (@ 0€@(@þ P€ ( P€ (@ P€ (@ P€ (@ P€ @ P€ (@ P€ (@ P€@@ P€ (€ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ € P€ (@ P€ (@ P€ (@ P€@( € (@ P€`(@ @@ P€ (@ þP€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ @ P€ € P€ (@ P€@€ @€  (@ P€ (@ P€ @ P€ (@ P€ (@ P€ (@ P€ `(@  (@ Pþ€@(@ P (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ PPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPP00PPPPPþPPPPPPPP PPP0PPP0PPPP0PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 0PPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPP PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP00PPPPPPPPP0PPPPPPPPPPPP0P PPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP PPPPPPPPPþPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPþPPPPPPPPPP0P PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPUUU¥”RJ)¥”RJ)EQEQEQEQEQEQEQEQ…B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( …B¡P( þ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @(P € (P @ (P @ (P @ (þP @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @ (P @P@P@P@P@P@P@P@P@P@P@P@ € €P@P@P@P@P@P@P@P@Pþ@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@þP@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@P@0@P@P@P@P@P@P@P@P@P@P@P@P@”P@P@(@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ P€ (@ ;fftw-2.1.5/doc/fftw_2.html0000644000175400001440000012250407637531661011012 FFTW - Tutorial Go to the first, previous, next, last section, table of contents.


Tutorial

This chapter describes the basic usage of FFTW, i.e., how to compute the Fourier transform of a single array. This chapter tells the truth, but not the whole truth. Specifically, FFTW implements additional routines and flags, providing extra functionality, that are not documented here. See Section FFTW Reference, for more complete information. (Note that you need to compile and install FFTW before you can use it in a program. See Section Installation and Customization, for the details of the installation.)

Here, we assume a default installation of FFTW. In some installations (particulary from binary packages), the FFTW header files and libraries are prefixed with `d' or `s' to indicate versions in double or single precision, respectively. The usage of FFTW in that case is the same, except that #include directives and link commands must use the appropriate prefix. See Section Installing FFTW in both single and double precision, for more information.

This tutorial chapter is structured as follows. Section Complex One-dimensional Transforms Tutorial describes the basic usage of the one-dimensional transform of complex data. Section Complex Multi-dimensional Transforms Tutorial describes the basic usage of the multi-dimensional transform of complex data. Section Real One-dimensional Transforms Tutorial describes the one-dimensional transform of real data and its inverse. Finally, Section Real Multi-dimensional Transforms Tutorial describes the multi-dimensional transform of real data and its inverse. We recommend that you read these sections in the order that they are presented. We then discuss two topics in detail. In Section Multi-dimensional Array Format, we discuss the various alternatives for storing multi-dimensional arrays in memory. Section Words of Wisdom shows how you can save FFTW's plans for future use.

Complex One-dimensional Transforms Tutorial

The basic usage of FFTW is simple. A typical call to FFTW looks like:

#include <fftw.h>
...
{
     fftw_complex in[N], out[N];
     fftw_plan p;
     ...
     p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
     ...
     fftw_one(p, in, out);
     ...
     fftw_destroy_plan(p);  
}

The first thing we do is to create a plan, which is an object that contains all the data that FFTW needs to compute the FFT, using the following function:

fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags);

The first argument, n, is the size of the transform you are trying to compute. The size n can be any positive integer, but sizes that are products of small factors are transformed most efficiently. The second argument, dir, can be either FFTW_FORWARD or FFTW_BACKWARD, and indicates the direction of the transform you are interested in. Alternatively, you can use the sign of the exponent in the transform, -1 or +1, which corresponds to FFTW_FORWARD or FFTW_BACKWARD respectively. The flags argument is either FFTW_MEASURE or FFTW_ESTIMATE. FFTW_MEASURE means that FFTW actually runs and measures the execution time of several FFTs in order to find the best way to compute the transform of size n. This may take some time, depending on your installation and on the precision of the timer in your machine. FFTW_ESTIMATE, on the contrary, does not run any computation, and just builds a reasonable plan, which may be sub-optimal. In other words, if your program performs many transforms of the same size and initialization time is not important, use FFTW_MEASURE; otherwise use the estimate. (A compromise between these two extremes exists. See Section Words of Wisdom.)

Once the plan has been created, you can use it as many times as you like for transforms on arrays of the same size. When you are done with the plan, you deallocate it by calling fftw_destroy_plan(plan).

The transform itself is computed by passing the plan along with the input and output arrays to fftw_one:

void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out);

Note that the transform is out of place: in and out must point to distinct arrays. It operates on data of type fftw_complex, a data structure with real (in[i].re) and imaginary (in[i].im) floating-point components. The in and out arrays should have the length specified when the plan was created. An alternative function, fftw, allows you to efficiently perform multiple and/or strided transforms (see Section FFTW Reference).

The DFT results are stored in-order in the array out, with the zero-frequency (DC) component in out[0]. The array in is not modified. Users should note that FFTW computes an unnormalized DFT, the sign of whose exponent is given by the dir parameter of fftw_create_plan. Thus, computing a forward followed by a backward transform (or vice versa) results in the original array scaled by n. See Section What FFTW Really Computes, for the definition of DFT.

A program using FFTW should be linked with -lfftw -lm on Unix systems, or with the FFTW and standard math libraries in general.

Complex Multi-dimensional Transforms Tutorial

FFTW can also compute transforms of any number of dimensions (rank). The syntax is similar to that for the one-dimensional transforms, with `fftw_' replaced by `fftwnd_' (which stands for "fftw in N dimensions").

As before, we #include <fftw.h> and create a plan for the transforms, this time of type fftwnd_plan:

fftwnd_plan fftwnd_create_plan(int rank, const int *n,
                               fftw_direction dir, int flags);

rank is the dimensionality of the array, and can be any non-negative integer. The next argument, n, is a pointer to an integer array of length rank containing the (positive) sizes of each dimension of the array. (Note that the array will be stored in row-major order. See Section Multi-dimensional Array Format, for information on row-major order.) The last two parameters are the same as in fftw_create_plan. We now, however, have an additional possible flag, FFTW_IN_PLACE, since fftwnd supports true in-place transforms. Multiple flags are combined using a bitwise or (`|'). (An in-place transform is one in which the output data overwrite the input data. It thus requires half as much memory as--and is often faster than--its opposite, an out-of-place transform.)

For two- and three-dimensional transforms, FFTWND provides alternative routines that accept the sizes of each dimension directly, rather than indirectly through a rank and an array of sizes. These are otherwise identical to fftwnd_create_plan, and are sometimes more convenient:

fftwnd_plan fftw2d_create_plan(int nx, int ny,
                               fftw_direction dir, int flags);
fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz,
                               fftw_direction dir, int flags);

Once the plan has been created, you can use it any number of times for transforms of the same size. When you do not need a plan anymore, you can deallocate the plan by calling fftwnd_destroy_plan(plan).

Given a plan, you can compute the transform of an array of data by calling:

void fftwnd_one(fftwnd_plan plan, fftw_complex *in, fftw_complex *out);

Here, in and out point to multi-dimensional arrays in row-major order, of the size specified when the plan was created. In the case of an in-place transform, the out parameter is ignored and the output data are stored in the in array. The results are stored in-order, unnormalized, with the zero-frequency component in out[0]. A forward followed by a backward transform (or vice-versa) yields the original data multiplied by the size of the array (i.e. the product of the dimensions). See Section What FFTWND Really Computes, for a discussion of what FFTWND computes.

For example, code to perform an in-place FFT of a three-dimensional array might look like:

#include <fftw.h>
...
{
     fftw_complex in[L][M][N];
     fftwnd_plan p;
     ...
     p = fftw3d_create_plan(L, M, N, FFTW_FORWARD,
                            FFTW_MEASURE | FFTW_IN_PLACE);
     ...
     fftwnd_one(p, &in[0][0][0], NULL);
     ...
     fftwnd_destroy_plan(p);  
}

Note that in is a statically-declared array, which is automatically in row-major order, but we must take the address of the first element in order to fit the type expected by fftwnd_one. (See Section Multi-dimensional Array Format.)

Real One-dimensional Transforms Tutorial

If the input data are purely real, you can save roughly a factor of two in both time and storage by using the rfftw transforms, which are FFTs specialized for real data. The output of a such a transform is a halfcomplex array, which consists of only half of the complex DFT amplitudes (since the negative-frequency amplitudes for real data are the complex conjugate of the positive-frequency amplitudes).

In exchange for these speed and space advantages, the user sacrifices some of the simplicity of FFTW's complex transforms. First of all, to allow maximum performance, the output format of the one-dimensional real transforms is different from that used by the multi-dimensional transforms. Second, the inverse transform (halfcomplex to real) has the side-effect of destroying its input array. Neither of these inconveniences should pose a serious problem for users, but it is important to be aware of them. (Both the inconvenient output format and the side-effect of the inverse transform can be ameliorated for one-dimensional transforms, at the expense of some performance, by using instead the multi-dimensional transform routines with a rank of one.)

The computation of the plan is similar to that for the complex transforms. First, you #include <rfftw.h>. Then, you create a plan (of type rfftw_plan) by calling:

rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags);

n is the length of the real array in the transform (even for halfcomplex-to-real transforms), and can be any positive integer (although sizes with small factors are transformed more efficiently). dir is either FFTW_REAL_TO_COMPLEX or FFTW_COMPLEX_TO_REAL. The flags parameter is the same as in fftw_create_plan.

Once created, a plan can be used for any number of transforms, and is deallocated when you are done with it by calling rfftw_destroy_plan(plan).

Given a plan, a real-to-complex or complex-to-real transform is computed by calling:

void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out);

(Note that fftw_real is an alias for the floating-point type for which FFTW was compiled.) Depending upon the direction of the plan, either the input or the output array is halfcomplex, and is stored in the following format:

r0, r1, r2, ..., rn/2, i(n+1)/2-1, ..., i2, i1

Here, rk is the real part of the kth output, and ik is the imaginary part. (We follow here the C convention that integer division is rounded down, e.g. 7 / 2 = 3.) For a halfcomplex array hc[], the kth component has its real part in hc[k] and its imaginary part in hc[n-k], with the exception of k == 0 or n/2 (the latter only if n is even)---in these two cases, the imaginary part is zero due to symmetries of the real-complex transform, and is not stored. Thus, the transform of n real values is a halfcomplex array of length n, and vice versa. (1) This is actually only half of the DFT spectrum of the data. Although the other half can be obtained by complex conjugation, it is not required by many applications such as convolution and filtering.

Like the complex transforms, the RFFTW transforms are unnormalized, so a forward followed by a backward transform (or vice-versa) yields the original data scaled by the length of the array, n.

Let us reiterate here our warning that an FFTW_COMPLEX_TO_REAL transform has the side-effect of destroying its (halfcomplex) input. The FFTW_REAL_TO_COMPLEX transform, however, leaves its (real) input untouched, just as you would hope.

As an example, here is an outline of how you might use RFFTW to compute the power spectrum of a real array (i.e. the squares of the absolute values of the DFT amplitudes):

#include <rfftw.h>
...
{
     fftw_real in[N], out[N], power_spectrum[N/2+1];
     rfftw_plan p;
     int k;
     ...
     p = rfftw_create_plan(N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);
     ...
     rfftw_one(p, in, out);
     power_spectrum[0] = out[0]*out[0];  /* DC component */
     for (k = 1; k < (N+1)/2; ++k)  /* (k < N/2 rounded up) */
          power_spectrum[k] = out[k]*out[k] + out[N-k]*out[N-k];
     if (N % 2 == 0) /* N is even */
          power_spectrum[N/2] = out[N/2]*out[N/2];  /* Nyquist freq. */
     ...
     rfftw_destroy_plan(p);
}

Programs using RFFTW should link with -lrfftw -lfftw -lm on Unix, or with the FFTW, RFFTW, and math libraries in general.

Real Multi-dimensional Transforms Tutorial

FFTW includes multi-dimensional transforms for real data of any rank. As with the one-dimensional real transforms, they save roughly a factor of two in time and storage over complex transforms of the same size. Also as in one dimension, these gains come at the expense of some increase in complexity--the output format is different from the one-dimensional RFFTW (and is more similar to that of the complex FFTW) and the inverse (complex to real) transforms have the side-effect of overwriting their input data.

To use the real multi-dimensional transforms, you first #include <rfftw.h> and then create a plan for the size and direction of transform that you are interested in:

rfftwnd_plan rfftwnd_create_plan(int rank, const int *n,
                                 fftw_direction dir, int flags);

The first two parameters describe the size of the real data (not the halfcomplex data, which will have different dimensions). The last two parameters are the same as those for rfftw_create_plan. Just as for fftwnd, there are two alternate versions of this routine, rfftw2d_create_plan and rfftw3d_create_plan, that are sometimes more convenient for two- and three-dimensional transforms. Also as in fftwnd, rfftwnd supports true in-place transforms, specified by including FFTW_IN_PLACE in the flags.

Once created, a plan can be used for any number of transforms, and is deallocated by calling rfftwnd_destroy_plan(plan).

Given a plan, the transform is computed by calling one of the following two routines:

void rfftwnd_one_real_to_complex(rfftwnd_plan plan,
                                 fftw_real *in, fftw_complex *out);
void rfftwnd_one_complex_to_real(rfftwnd_plan plan,
                                 fftw_complex *in, fftw_real *out);

As is clear from their names and parameter types, the former function is for FFTW_REAL_TO_COMPLEX transforms and the latter is for FFTW_COMPLEX_TO_REAL transforms. (We could have used only a single routine, since the direction of the transform is encoded in the plan, but we wanted to correctly express the datatypes of the parameters.) The latter routine, as we discuss elsewhere, has the side-effect of overwriting its input (except when the rank of the array is one). In both cases, the out parameter is ignored for in-place transforms.

The format of the complex arrays deserves careful attention. Suppose that the real data has dimensions n1 x n2 x ... x nd (in row-major order). Then, after a real-to-complex transform, the output is an n1 x n2 x ... x (nd/2+1) array of fftw_complex values in row-major order, corresponding to slightly over half of the output of the corresponding complex transform. (Note that the division is rounded down.) The ordering of the data is otherwise exactly the same as in the complex case. (In principle, the output could be exactly half the size of the complex transform output, but in more than one dimension this requires too complicated a format to be practical.) Note that, unlike the one-dimensional RFFTW, the real and imaginary parts of the DFT amplitudes are here stored together in the natural way.

Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data--two extra if the last dimension is even and one if it is odd. That is, the last dimension of the real data must physically contain 2 * (nd/2+1) fftw_real values (exactly enough to hold the complex data). This physical array size does not, however, change the logical array size--only nd values are actually stored in the last dimension, and nd is the last dimension passed to rfftwnd_create_plan.

For example, consider the transform of a two-dimensional real array of size nx by ny. The output of the rfftwnd transform is a two-dimensional complex array of size nx by ny/2+1, where the y dimension has been cut nearly in half because of redundancies in the output. Because fftw_complex is twice the size of fftw_real, the output array is slightly bigger than the input array. Thus, if we want to compute the transform in place, we must pad the input array so that it is of size nx by 2*(ny/2+1). If ny is even, then there are two padding elements at the end of each row (which need not be initialized, as they are only used for output). The following illustration depicts the input and output arrays just described, for both the out-of-place and in-place transforms (with the arrows indicating consecutive memory locations):

The RFFTWND transforms are unnormalized, so a forward followed by a backward transform will result in the original data scaled by the number of real data elements--that is, the product of the (logical) dimensions of the real data.

Below, we illustrate the use of RFFTWND by showing how you might use it to compute the (cyclic) convolution of two-dimensional real arrays a and b (using the identity that a convolution corresponds to a pointwise product of the Fourier transforms). For variety, in-place transforms are used for the forward FFTs and an out-of-place transform is used for the inverse transform.

#include <rfftw.h>
...
{
     fftw_real a[M][2*(N/2+1)], b[M][2*(N/2+1)], c[M][N];
     fftw_complex *A, *B, C[M][N/2+1];
     rfftwnd_plan p, pinv;
     fftw_real scale = 1.0 / (M * N);
     int i, j;
     ...
     p    = rfftw2d_create_plan(M, N, FFTW_REAL_TO_COMPLEX,
                                FFTW_ESTIMATE | FFTW_IN_PLACE);
     pinv = rfftw2d_create_plan(M, N, FFTW_COMPLEX_TO_REAL,
                                FFTW_ESTIMATE);

     /* aliases for accessing complex transform outputs: */
     A = (fftw_complex*) &a[0][0];
     B = (fftw_complex*) &b[0][0];
     ...
     for (i = 0; i < M; ++i)
          for (j = 0; j < N; ++j) {
               a[i][j] = ... ;
               b[i][j] = ... ;
          }
     ...
     rfftwnd_one_real_to_complex(p, &a[0][0], NULL);
     rfftwnd_one_real_to_complex(p, &b[0][0], NULL);

     for (i = 0; i < M; ++i)
          for (j = 0; j < N/2+1; ++j) {
               int ij = i*(N/2+1) + j;
               C[i][j].re = (A[ij].re * B[ij].re
                             - A[ij].im * B[ij].im) * scale;
               C[i][j].im = (A[ij].re * B[ij].im
                             + A[ij].im * B[ij].re) * scale;
          }

     /* inverse transform to get c, the convolution of a and b;
        this has the side effect of overwriting C */
     rfftwnd_one_complex_to_real(pinv, &C[0][0], &c[0][0]);
     ...
     rfftwnd_destroy_plan(p);
     rfftwnd_destroy_plan(pinv);
}

We access the complex outputs of the in-place transforms by casting each real array to a fftw_complex pointer. Because this is a "flat" pointer, we have to compute the row-major index ij explicitly in the convolution product loop. In order to normalize the convolution, we must multiply by a scale factor--we can do so either before or after the inverse transform, and choose the former because it obviates the necessity of an additional loop. Notice the limits of the loops and the dimensions of the various arrays.

As with the one-dimensional RFFTW, an out-of-place FFTW_COMPLEX_TO_REAL transform has the side-effect of overwriting its input array. (The real-to-complex transform, on the other hand, leaves its input array untouched.) If you use RFFTWND for a rank-one transform, however, this side-effect does not occur. Because of this fact (and the simpler output format), users may find the RFFTWND interface more convenient than RFFTW for one-dimensional transforms. However, RFFTWND in one dimension is slightly slower than RFFTW because RFFTWND uses an extra buffer array internally.

Multi-dimensional Array Format

This section describes the format in which multi-dimensional arrays are stored. We felt that a detailed discussion of this topic was necessary, since it is often a source of confusion among users and several different formats are common. Although the comments below refer to fftwnd, they are also applicable to the rfftwnd routines.

Row-major Format

The multi-dimensional arrays passed to fftwnd are expected to be stored as a single contiguous block in row-major order (sometimes called "C order"). Basically, this means that as you step through adjacent memory locations, the first dimension's index varies most slowly and the last dimension's index varies most quickly.

To be more explicit, let us consider an array of rank d whose dimensions are n1 x n2 x n3 x ... x nd. Now, we specify a location in the array by a sequence of (zero-based) indices, one for each dimension: (i1, i2, i3,..., id). If the array is stored in row-major order, then this element is located at the position id + nd * (id-1 + nd-1 * (... + n2 * i1)).

Note that each element of the array must be of type fftw_complex; i.e. a (real, imaginary) pair of (double-precision) numbers. Note also that, in fftwnd, the expression above is multiplied by the stride to get the actual array index--this is useful in situations where each element of the multi-dimensional array is actually a data structure or another array, and you just want to transform a single field. In most cases, however, you use a stride of 1.

Column-major Format

Readers from the Fortran world are used to arrays stored in column-major order (sometimes called "Fortran order"). This is essentially the exact opposite of row-major order in that, here, the first dimension's index varies most quickly.

If you have an array stored in column-major order and wish to transform it using fftwnd, it is quite easy to do. When creating the plan, simply pass the dimensions of the array to fftwnd_create_plan in reverse order. For example, if your array is a rank three N x M x L matrix in column-major order, you should pass the dimensions of the array as if it were an L x M x N matrix (which it is, from the perspective of fftwnd). This is done for you automatically by the FFTW Fortran wrapper routines (see Section Calling FFTW from Fortran).

Static Arrays in C

Multi-dimensional arrays declared statically (that is, at compile time, not necessarily with the static keyword) in C are already in row-major order. You don't have to do anything special to transform them. (See Section Complex Multi-dimensional Transforms Tutorial, for an example of this sort of code.)

Dynamic Arrays in C

Often, especially for large arrays, it is desirable to allocate the arrays dynamically, at runtime. This isn't too hard to do, although it is not as straightforward for multi-dimensional arrays as it is for one-dimensional arrays.

Creating the array is simple: using a dynamic-allocation routine like malloc, allocate an array big enough to store N fftw_complex values, where N is the product of the sizes of the array dimensions (i.e. the total number of complex values in the array). For example, here is code to allocate a 5x12x27 rank 3 array:

fftw_complex *an_array;

an_array = (fftw_complex *) malloc(5 * 12 * 27 * sizeof(fftw_complex));

Accessing the array elements, however, is more tricky--you can't simply use multiple applications of the `[]' operator like you could for static arrays. Instead, you have to explicitly compute the offset into the array using the formula given earlier for row-major arrays. For example, to reference the (i,j,k)-th element of the array allocated above, you would use the expression an_array[k + 27 * (j + 12 * i)].

This pain can be alleviated somewhat by defining appropriate macros, or, in C++, creating a class and overloading the `()' operator.

Dynamic Arrays in C--The Wrong Way

A different method for allocating multi-dimensional arrays in C is often suggested that is incompatible with fftwnd: using it will cause FFTW to die a painful death. We discuss the technique here, however, because it is so commonly known and used. This method is to create arrays of pointers of arrays of pointers of ...etcetera. For example, the analogue in this method to the example above is:

int i,j;
fftw_complex ***a_bad_array;  /* another way to make a 5x12x27 array */

a_bad_array = (fftw_complex ***) malloc(5 * sizeof(fftw_complex **));
for (i = 0; i < 5; ++i) {
     a_bad_array[i] = 
        (fftw_complex **) malloc(12 * sizeof(fftw_complex *));
     for (j = 0; j < 12; ++j)
          a_bad_array[i][j] =
                (fftw_complex *) malloc(27 * sizeof(fftw_complex));
}

As you can see, this sort of array is inconvenient to allocate (and deallocate). On the other hand, it has the advantage that the (i,j,k)-th element can be referenced simply by a_bad_array[i][j][k].

If you like this technique and want to maximize convenience in accessing the array, but still want to pass the array to FFTW, you can use a hybrid method. Allocate the array as one contiguous block, but also declare an array of arrays of pointers that point to appropriate places in the block. That sort of trick is beyond the scope of this documentation; for more information on multi-dimensional arrays in C, see the comp.lang.c FAQ.

Words of Wisdom

FFTW implements a method for saving plans to disk and restoring them. In fact, what FFTW does is more general than just saving and loading plans. The mechanism is called wisdom. Here, we describe this feature at a high level. See Section FFTW Reference, for a less casual (but more complete) discussion of how to use wisdom in FFTW.

Plans created with the FFTW_MEASURE option produce near-optimal FFT performance, but it can take a long time to compute a plan because FFTW must actually measure the runtime of many possible plans and select the best one. This is designed for the situations where so many transforms of the same size must be computed that the start-up time is irrelevant. For short initialization times but slightly slower transforms, we have provided FFTW_ESTIMATE. The wisdom mechanism is a way to get the best of both worlds. There are, however, certain caveats that the user must be aware of in using wisdom. For this reason, wisdom is an optional feature which is not enabled by default.

At its simplest, wisdom provides a way of saving plans to disk so that they can be reused in other program runs. You create a plan with the flags FFTW_MEASURE and FFTW_USE_WISDOM, and then save the wisdom using fftw_export_wisdom:

     plan = fftw_create_plan(..., ... | FFTW_MEASURE | FFTW_USE_WISDOM);
     fftw_export_wisdom(...);

The next time you run the program, you can restore the wisdom with fftw_import_wisdom, and then recreate the plan using the same flags as before. This time, however, the same optimal plan will be created very quickly without measurements. (FFTW still needs some time to compute trigonometric tables, however.) The basic outline is:

     fftw_import_wisdom(...);
     plan = fftw_create_plan(..., ... | FFTW_USE_WISDOM);

Wisdom is more than mere rote memorization, however. FFTW's wisdom encompasses all of the knowledge and measurements that were used to create the plan for a given size. Therefore, existing wisdom is also applied to the creation of other plans of different sizes.

Whenever a plan is created with the FFTW_MEASURE and FFTW_USE_WISDOM flags, wisdom is generated. Thereafter, plans for any transform with a similar factorization will be computed more quickly, so long as they use the FFTW_USE_WISDOM flag. In fact, for transforms with the same factors and of equal or lesser size, no measurements at all need to be made and an optimal plan can be created with negligible delay!

For example, suppose that you create a plan for N = 216. Then, for any equal or smaller power of two, FFTW can create a plan (with the same direction and flags) quickly, using the precomputed wisdom. Even for larger powers of two, or sizes that are a power of two times some other prime factors, plans will be computed more quickly than they would otherwise (although some measurements still have to be made).

The wisdom is cumulative, and is stored in a global, private data structure managed internally by FFTW. The storage space required is minimal, proportional to the logarithm of the sizes the wisdom was generated from. The wisdom can be forgotten (and its associated memory freed) by a call to fftw_forget_wisdom(); otherwise, it is remembered until the program terminates. It can also be exported to a file, a string, or any other medium using fftw_export_wisdom and restored during a subsequent execution of the program (or a different program) using fftw_import_wisdom (these functions are described below).

Because wisdom is incorporated into FFTW at a very low level, the same wisdom can be used for one-dimensional transforms, multi-dimensional transforms, and even the parallel extensions to FFTW. Just include FFTW_USE_WISDOM in the flags for whatever plans you create (i.e., always plan wisely).

Plans created with the FFTW_ESTIMATE plan can use wisdom, but cannot generate it; only FFTW_MEASURE plans actually produce wisdom. Also, plans can only use wisdom generated from plans created with the same direction and flags. For example, a size 42 FFTW_BACKWARD transform will not use wisdom produced by a size 42 FFTW_FORWARD transform. The only exception to this rule is that FFTW_ESTIMATE plans can use wisdom from FFTW_MEASURE plans.

Caveats in Using Wisdom

For in much wisdom is much grief, and he that increaseth knowledge increaseth sorrow. [Ecclesiastes 1:18]

There are pitfalls to using wisdom, in that it can negate FFTW's ability to adapt to changing hardware and other conditions. For example, it would be perfectly possible to export wisdom from a program running on one processor and import it into a program running on another processor. Doing so, however, would mean that the second program would use plans optimized for the first processor, instead of the one it is running on.

It should be safe to reuse wisdom as long as the hardware and program binaries remain unchanged. (Actually, the optimal plan may change even between runs of the same binary on identical hardware, due to differences in the virtual memory environment, etcetera. Users seriously interested in performance should worry about this problem, too.) It is likely that, if the same wisdom is used for two different program binaries, even running on the same machine, the plans may be sub-optimal because of differing code alignments. It is therefore wise to recreate wisdom every time an application is recompiled. The more the underlying hardware and software changes between the creation of wisdom and its use, the greater grows the risk of sub-optimal plans.

Importing and Exporting Wisdom

void fftw_export_wisdom_to_file(FILE *output_file);
fftw_status fftw_import_wisdom_from_file(FILE *input_file);

fftw_export_wisdom_to_file writes the wisdom to output_file, which must be a file open for writing. fftw_import_wisdom_from_file reads the wisdom from input_file, which must be a file open for reading, and returns FFTW_SUCCESS if successful and FFTW_FAILURE otherwise. In both cases, the file is left open and must be closed by the caller. It is perfectly fine if other data lie before or after the wisdom in the file, as long as the file is positioned at the beginning of the wisdom data before import.

char *fftw_export_wisdom_to_string(void);
fftw_status fftw_import_wisdom_from_string(const char *input_string)

fftw_export_wisdom_to_string allocates a string, exports the wisdom to it in NULL-terminated format, and returns a pointer to the string. If there is an error in allocating or writing the data, it returns NULL. The caller is responsible for deallocating the string (with fftw_free) when she is done with it. fftw_import_wisdom_from_string imports the wisdom from input_string, returning FFTW_SUCCESS if successful and FFTW_FAILURE otherwise.

Exporting wisdom does not affect the store of wisdom. Imported wisdom supplements the current store rather than replacing it (except when there is conflicting wisdom, in which case the older wisdom is discarded). The format of the exported wisdom is "nerd-readable" LISP-like ASCII text; we will not document it here except to note that it is insensitive to white space (interested users can contact us for more details).

See Section FFTW Reference, for more information, and for a description of how you can implement wisdom import/export for other media besides files and strings.

The following is a brief example in which the wisdom is read from a file, a plan is created (possibly generating more wisdom), and then the wisdom is exported to a string and printed to stdout.

{
     fftw_plan plan;
     char *wisdom_string;
     FILE *input_file;

     /* open file to read wisdom from */
     input_file = fopen("sample.wisdom", "r");
     if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file))
          printf("Error reading wisdom!\n");
     fclose(input_file); /* be sure to close the file! */

     /* create a plan for N=64, possibly creating and/or using wisdom */
     plan = fftw_create_plan(64,FFTW_FORWARD,
                             FFTW_MEASURE | FFTW_USE_WISDOM);

     /* ... do some computations with the plan ... */

     /* always destroy plans when you are done */
     fftw_destroy_plan(plan);

     /* write the wisdom to a string */
     wisdom_string = fftw_export_wisdom_to_string();
     if (wisdom_string != NULL) {
          printf("Accumulated wisdom: %s\n",wisdom_string);

          /* Just for fun, destroy and restore the wisdom */
          fftw_forget_wisdom(); /* all gone! */
          fftw_import_wisdom_from_string(wisdom_string);
          /* wisdom is back! */

          fftw_free(wisdom_string); /* deallocate it since we're done */
     }
}


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_5.html0000644000175400001440000002516507637531661011022 FFTW - Calling FFTW from Fortran Go to the first, previous, next, last section, table of contents.


Calling FFTW from Fortran

The standard FFTW libraries include special wrapper functions that allow Fortran programs to call FFTW subroutines. This chapter describes how those functions may be employed to use FFTW from Fortran. We assume here that the reader is already familiar with the usage of FFTW in C, as described elsewhere in this manual.

In general, it is not possible to call C functions directly from Fortran, due to Fortran's inability to pass arguments by value and also because Fortran compilers typically expect identifiers to be mangled somehow for linking. However, if C functions are written in a special way, they are callable from Fortran, and we have employed this technique to create Fortran-callable "wrapper" functions around the main FFTW routines. These wrapper functions are included in the FFTW libraries by default, unless a Fortran compiler isn't found on your system or --disable-fortran is included in the configure flags.

As a result, calling FFTW from Fortran requires little more than appending `_f77' to the function names and then linking normally with the FFTW libraries. There are a few wrinkles, however, as we shall discuss below.

Wrapper Routines

All of the uniprocessor and multi-threaded transform routines have Fortran-callable wrappers, except for the wisdom import/export functions (since it is not possible to exchange string and file arguments portably with Fortran) and the specific planner routines (see Section Discussion on Specific Plans). The name of the wrapper routine is the same as that of the corresponding C routine, but with fftw/fftwnd/rfftw/rfftwnd replaced by fftw_f77/fftwnd_f77/rfftw_f77/rfftwnd_f77. For example, in Fortran, instead of calling fftw_one you would call fftw_f77_one.(8) For the most part, all of the arguments to the functions are the same, with the following exceptions:

  • plan variables (what would be of type fftw_plan, rfftwnd_plan, etcetera, in C), must be declared as a type that is the same size as a pointer (address) on your machine. (Fortran has no generic pointer type.) The Fortran integer type is usually the same size as a pointer, but you need to be wary (especially on 64-bit machines). (You could also use integer*4 on a 32-bit machine and integer*8 on a 64-bit machine.) Ugh. (g77 has a special type, integer(kind=7), that is defined to be the same size as a pointer.)
  • Any function that returns a value (e.g. fftw_create_plan) is converted into a subroutine. The return value is converted into an additional (first) parameter of the wrapper subroutine. (The reason for this is that some Fortran implementations seem to have trouble with C function return values.)
  • When performing one-dimensional FFTW_IN_PLACE transforms, you don't have the option of passing NULL for the out argument (since there is no way to pass NULL from Fortran). Therefore, when performing such transforms, you must allocate and pass a contiguous scratch array of the same size as the transform. Note that for in-place multi-dimensional ((r)fftwnd) transforms, the out argument is ignored, so you can pass anything for that parameter.
  • The wrapper routines expect multi-dimensional arrays to be in column-major order, which is the ordinary format of Fortran arrays. They do this transparently and costlessly simply by reversing the order of the dimensions passed to FFTW, but this has one important consequence for multi-dimensional real-complex transforms, discussed below.

In general, you should take care to use Fortran data types that correspond to (i.e. are the same size as) the C types used by FFTW. If your C and Fortran compilers are made by the same vendor, the correspondence is usually straightforward (i.e. integer corresponds to int, real corresponds to float, etcetera). Such simple correspondences are assumed in the examples below. The examples also assume that FFTW was compiled in double precision (the default).

FFTW Constants in Fortran

When creating plans in FFTW, a number of constants are used to specify options, such as FFTW_FORWARD or FFTW_USE_WISDOM. The same constants must be used with the wrapper routines, but of course the C header files where the constants are defined can't be incorporated directly into Fortran code.

Instead, we have placed Fortran equivalents of the FFTW constant definitions in the file fortran/fftw_f77.i of the FFTW package. If your Fortran compiler supports a preprocessor, you can use that to incorporate this file into your code whenever you need to call FFTW. Otherwise, you will have to paste the constant definitions in directly. They are:

      integer FFTW_FORWARD,FFTW_BACKWARD
      parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1)

      integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL
      parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1)

      integer FFTW_ESTIMATE,FFTW_MEASURE
      parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1)

      integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM
      parameter (FFTW_OUT_OF_PLACE=0)
      parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16)

      integer FFTW_THREADSAFE
      parameter (FFTW_THREADSAFE=128)

In C, you combine different flags (like FFTW_USE_WISDOM and FFTW_MEASURE) using the `|' operator; in Fortran you should just use `+'.

Fortran Examples

In C you might have something like the following to transform a one-dimensional complex array:

        fftw_complex in[N], *out[N];
        fftw_plan plan;

        plan = fftw_create_plan(N,FFTW_FORWARD,FFTW_ESTIMATE);
        fftw_one(plan,in,out);
        fftw_destroy_plan(plan);

In Fortran, you use the following to accomplish the same thing:

        double complex in, out
        dimension in(N), out(N)
        integer plan

        call fftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE)
        call fftw_f77_one(plan,in,out)
        call fftw_f77_destroy_plan(plan)

Notice how all routines are called as Fortran subroutines, and the plan is returned via the first argument to fftw_f77_create_plan. Important: these examples assume that integer is the same size as a pointer, and may need modification on a 64-bit machine. See Section Wrapper Routines, above. To do the same thing, but using 8 threads in parallel (see Section Multi-threaded FFTW), you would simply replace the call to fftw_f77_one with:

        call fftw_f77_threads_one(8,plan,in,out)

To transform a three-dimensional array in-place with C, you might do:

        fftw_complex arr[L][M][N];
        fftwnd_plan plan;
        int n[3] = {L,M,N};

        plan = fftwnd_create_plan(3,n,FFTW_FORWARD,
                                  FFTW_ESTIMATE | FFTW_IN_PLACE);
        fftwnd_one(plan, arr, 0);
        fftwnd_destroy_plan(plan);

In Fortran, you would use this instead:

        double complex arr
        dimension arr(L,M,N)
        integer n
        dimension n(3)
        integer plan

        n(1) = L
        n(2) = M
        n(3) = N
        call fftwnd_f77_create_plan(plan,3,n,FFTW_FORWARD,
       +                            FFTW_ESTIMATE + FFTW_IN_PLACE)
        call fftwnd_f77_one(plan, arr, 0)
        call fftwnd_f77_destroy_plan(plan)

Instead of calling fftwnd_f77_create_plan(plan,3,n,...), we could also have called fftw3d_f77_create_plan(plan,L,M,N,...).

Note that we pass the array dimensions in the "natural" order; also note that the last argument to fftwnd_f77 is ignored since the transform is FFTW_IN_PLACE.

To transform a one-dimensional real array in Fortran, you might do:

        double precision in, out
        dimension in(N), out(N)
        integer plan

        call rfftw_f77_create_plan(plan,N,FFTW_REAL_TO_COMPLEX,
       +                           FFTW_ESTIMATE)
        call rfftw_f77_one(plan,in,out)
        call rfftw_f77_destroy_plan(plan)

To transform a two-dimensional real array, out of place, you might use the following:

        double precision in
        double complex out
        dimension in(M,N), out(M/2 + 1, N)
        integer plan

        call rfftw2d_f77_create_plan(plan,M,N,FFTW_REAL_TO_COMPLEX,
       +                             FFTW_ESTIMATE)
        call rfftwnd_f77_one_real_to_complex(plan, in, out)
        call rfftwnd_f77_destroy_plan(plan)

Important: Notice that it is the first dimension of the complex output array that is cut in half in Fortran, rather than the last dimension as in C. This is a consequence of the wrapper routines reversing the order of the array dimensions passed to FFTW so that the Fortran program can use its ordinary column-major order.


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_8.html0000644000175400001440000000437207637531661011022 FFTW - License and Copyright Go to the first, previous, next, last section, table of contents.


License and Copyright

FFTW is copyright © 1997--1999 Massachusetts Institute of Technology.

FFTW is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. You can also find the GPL on the GNU web site.

In addition, we kindly ask you to acknowledge FFTW and its authors in any program or publication in which you use FFTW. (You are not required to do so; it is up to your common sense to decide whether you want to comply with this request or not.)

Non-free versions of FFTW are available under terms different than the General Public License. (e.g. they do not require you to accompany any object code using FFTW with the corresponding source code.) For these alternate terms you must purchase a license from MIT's Technology Licensing Office. Users interested in such a license should contact us (fftw@fftw.org) for more information.


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_toc.html0000644000175400001440000001510607637531661011435 FFTW - Table of Contents

FFTW

For version 2.1.5, 16 March 2003



This document was generated on 24 March 2003 using the texi2html translator version 1.52. (properly hacked by athena@theory.lcs.mit.edu)

fftw-2.1.5/doc/equation-3.gif0000644000175400001440000002377607635206026011414 GIF89aWó 000EEEUUUuuuŠŠŠªªªÏÏÏßßßÿÿÿ!þ Imported from MIFF image: ,WþPÉI«½8ëÍ»ÿ`(Ždižhª®lÛ"ÇáÎaŒÐø•ÄñÊË Øá¦3rDáˆQHèɉÌP«XI˜ ˆÝ0å' = ø³·%1jËSõMÂSì%rah‡R3ŠŒ%‡v€’,„†”3‚•}‚…c5£’¥¡&—•‹y¯ ™cªX›‘¶–+‘’Á­-¬YÃ9±v³@Œ¸Ä3Ï#Æ•´Ò ÔU ¨ÈÐ å]èæ«Ù4ê/í]Ûݼë8ñàvÖ[L¶ é`Ï®AhþQð§l þôI0G:0Žd\H‘ Æ4þµ^QÐñÏG(d@ù*9¥‚¾4#O$†e H€€ƒpÎì8TfJl;I&½€í§7 $%$„‚ËipbЪà&Ñ¡7öûz²ŒÀ) ¥#“놂?ëi¨A¦»©:4ÝUéª g*dëñ« ~t)…ƒ¯oßJõœ Xj†7 øJ `JŸ|ž§rçʼn÷X®¥¸ïR&‘‹~ÒšænPÞ)Ö™Z‚ÚªO¯>U&TlÕJ€Œá¶f8ÜV$ý†s ÃNX’¸ ð®¶ÿüîö‡IeæΓ–޼tðö½‡×f¼¼¼†ëЫ³GÍáqÞ 2¼þcA€¾Ð@`-gžwîGY{ÔݦÞaŒ<¥E)5AÀ8uw„…/qxA†¾™wܬ×K!¬°¢8ôu%Ã{üqˆµ¤È 2ƨƒb8 #‹DÆ(l2¼ˆŠTt X$€Ò°c-×pÃZP’$74¾DR!S f)7Žc‹…(ãŠ ÖøÍ“_^¨×†ÿ½´‡loTÀÓ~;hמ²µt†Ê]IåšØ™iŒšªAÀgq¹Á 0ó&(r<ÊC; ,Q§Ü0%¤fjlÖò¤¦‘ªº^´B*€Ñ¹*£žžJ.³æg+šFö*+¤ÔÐ$®RÁi+²ŸþN0Ú±© !J…È uÝð «q[m€Ä> lWá"j$¬›ål¹“VŠXWzb˜¢£pFR+„ ʾè"í¡¶Fâí²7ªÅÍVpIž 1=z“°â %PØ^²ËÄ7#n!gy+=ÝpÈÄÄ,CÅ®î¡NÈÝ\‹áÇÁBv²4[œ¶ÕtSc Ëçˆo7±ÆŽ3Ê„PÁlÓ7;y&ÈÏ M$÷¥Ï/ãt;ø6/¿"à ñÅÞL†5X÷Á2èrô·Ëáâu‚XsD˜OLK1ù ༊ñ=H­R2‹oi1ïh·þú¤á*›]‹Éþ+£Â]åØ&¹ Ôºt˜›ÛbŠâؘù€/; âÓú|-ì‡0t@™m5éG\‹åñ²N妛Y†¹®3Ј´·¢ð`îG¼æ6W*R G+Œ^-ßãµÞåݲ}•¹ß²žá?£Âp;<C9Ù R&J„ªEAZgðÃR^°tƒÏhG3ó£D§ ¸“€ì¤S¿àï 0žD‚œÙ âÀ=(á¡àï ‰Rl‰ðA.¼D„¡Ðñ‡~p ÙúW‚@€ |H©å¼ze¨IèA͸pƒY¡ ígC)Æ0‚2´ þ¨`ÈÄI ŒÇ"¢Y'E¦ôdü[.¥ úY P¢€—áÔ±Ž¢{о@²<’#‰ýàâRn8AÈiшL¤"‹7h m‘ÆBÆa7С¢RK ¦ôïZ‘ ¥(G™H­ƒ $¥*]²-0ç„‚ÂNVÃRI!•“ÚŽ+åHˆ:€r•À ¦0U ÁP—ÃLf.f¬ïé œYMôR€É—4“`:¢2·ÉÍnzó›à´J¯ÂÙŸóœèL§:K m¹óð\§<çIÏzÚsq àîÉÏ~ú³.û\äòþ9‡"òaŸm0€6 jP`ôœ ­þ\ˆ*Œ„= ¨=”ÀA$-*¸è(í¥½k@KHHLÁD¡Å†/x!¢ù )9:‘Fb ÏŸ3EáHoÜ&C2H±Š!²< Q•3Ž“ÂCɆˆ…0-0ƒO³º ¦ƒ“9ÝŠQ1áÔVhMgJSCÀÕ®"›¨zkÃb a´ÍÕT€þºÀF\¾ ,¥@R!I‘‰ðe]`U¡P8pǦãSW©ÉƒºJá®ÓtE[OÐWbˆN@OÙ,üÌ)Y¹""®%0aC©÷ˆw(‚€¬ ô5Ø;ÜΦµMd>ïe•AaªTªn?ª%‚Ü~`²'P­eyþa‹×úF¶% ­iS€­r"$¢âÓošð“ª@Œ„P` aF$ebÓeÊñŽ-ü!ÐÕ'E¨a\½>B+ùLžÒŒ”\¥mH/ ˆI¬ò*$Eb÷Õ©'dWaàmÉ?jD“†€¹`+o5Ê^¼ÆE:ñAD‚;ÝöØxä ¢ÁÐe †lÆ¡7àǼD0€û¹²êa¯8àŒg¤PßwMˆD7ŽÄkö3ÐØI®”•!d*Õòd$YƒBñKò(ö¥Ž ¨ŒÅƒ–èü”7Ž\mYôˆÕ¹ð2FOcÈ‹¡ºãd]mPµê¡S&Zo¢çþ:„”U·ÉÞ<êãÓVÁX½îZÃ(S"¯K|!´Âú±@:l8ó98 1ܰ4ÁPËD×é-ÒXs‰=i&3m­Å8ñuá'"  ¨©ãÑ—£­›šc¬~š¶@#e24ø*iõ'l’|¸?—-˜±Õõ9t³ºš4ò…‡©r@´nFÀfWh«&ëÐCCW*šý†cbÒÆ(µEd\“Ç í¤è .moŽ€F‘! ]LÍ”Ââžì7$5+9ÈØÃkìÀi ³¤Å^‰¬ @i=<´‰ÞðàÉaØSië¶ðv_hä.K¶ÿÊeþ/w ‚‚-Æq q/q¼?5`ç2®)Šë–û<Žg¨s~Ã0k: ºÞ›µŠ —ò(|èÁËÄ!t­j@oUÏä%uU¡ @М2l'$4H3i¹ËÍ-:Ñ®­!7Ñ»ÍkÑ<ˆOJs:ðzÓÛ~>5 ¤±0»c½w=ÖÕŠíÖ¼D§%y=I^6[>·³[ÂÍ!õI ! ¸7 ì` ¦a…-ö²§@Ãæ¢wøvìáåèÇ †µÇÉ×"èFBÞïDL!HÑ1 3ð B¼=ºF’øfq)÷k_g9â…Lܽÿzßy·þZ¾E$¾8ŒŸ-åû_Žã€~ÎGd²Ôk9°†<¨ÖTŒ6)hLØP* 3X*F]Ç5k£$$þ¦LH H*ˆ/CÓ“pÝ4KÑ'ä—ajƒNè˜Jõ%L*XO$(J/1›t¢DÍö=ÑtU±z1„ê$zN? Ø0Ueê4Q«¥NyµNHøL±„LÈTHP\( ×¶JC„]8†ë0QbØ aH†j¸†l؆nø†p‡r8‡tX‡vx‡x˜‡z¸‡|؇~ø‡€ˆ‚8ˆ„Xˆ†xˆˆ˜ˆŠ¸ˆŒØˆŽøˆ‰q8xöC"°Rn ~]€‰’˜šIþRK?Ý÷Ooe‰ä„ŠÇðµ¢’ò [uTçÕ±Ng 3h üàŠì´‚p‹ a :êãM› jœfXã+$ñŠ&(‹€ 7ˆH<¶H¹( €ÕhhX°iU °PŒÝÄ=äB+dY×TŠã‹_NØ Lë(s„ÈXQîË  ÷(JúèŒâPPà¨VâUaAà|S± 9{úUGe= $9aûC0v/׿!)la–hQg±?vRi .a’FmAxá2¡ļ— 9^XHa)QÈþ )p~F@â‘Cé’&-9^+©‰,‘_Ä‘ fQ©-©*Þ%•ä•)q’xñ•aÙ–fQ‘dG1–'n ¢5ByLFcf– ¶‘ÍЗ]!Ç}™f§c>‡$zÔdŒ§‹IÂáL»3ö¿†)óVã:ê±dé!˜p™{©™•YÅQV¢ôðF¤™ÓA˜i–Ú`@|ð—ËÈŒi¿!šyY!)5V9û±]²³Åœ¤!šâțߜ±9™›)MÌ©Ïáœeýscý1I7ŒBy[â:…BcR³,?YÝ©ÊC7˜þ¶çé:Å$c'¨65üY"ȳ(f2ŸÜhcSŸ÷¹,µV&r2›ã?Ê"í3n€%gUbMX‚<[2ŸåÙ&F—œ"s#ùiŸtÞÆÓvúœŸ¹¡Dã&Åx *ª>'úž#Ú¢îÈŒ .›Òtßàà/ñXÜÖ#º²žFrl×2¢ò¦fì&¢ý‰)Ô³¤*¤ÿiì’¤î5Á¥4C0tS0þyïÆ¤¦ŒÓŒ€¢à£~ƒ<;š-ÛÂ.ÌG j.yFœ#Ú#pZVV*£*’§Ë±l̲¥;â§/¦{j§ãc¤IvY9_£§Jpc47×2wÓhYÒ7•4þV“5˜Csª)¦ã²¸€23ÓŸ3¥K3ž:I8'Gm„rQj6“4E°…!‚ssêpÚ~ÔSzØW4rs£ Êžú¨™T2®¢©Ä rrÀ¬©¢pbL`Ïzií੼º[Ь¼Úªê­AÄ5ÜšIu9žÃã>MÇ;…†;Ý0/uç<öR¦Rã1¾â9Vã;‘,/QxqW:‚Š:²Á 3wqg2xç}5U‚¡3uŠ'9gB°ª“°-Ñnñ:§ñJ¾0Œæ®TŒ‰·Aò;ê*X ‹°b:{<É# ÀãTúª>öº¯'K6C±[:³‘'¢3U*û™<[þ‚#À­åHÔEÖ'–ê×Bìç €´ï7F¸Â@@‘/9b´DFA {õãBV{E…ÔM µ¸‚El‹"S¸Á‘ª#qR´}=Tµ&Ej»µg[L'DCé×DTôi;Ôbd{[;DxkDÜeØ×sfãf^[C´·;YFÛ¶^”¸¼$·‡´¹ËµVû¹¬ÃDvËZ+#H”+@™[ËQµ0»Ô´îW@ÇäºÌ•ºK»b$#ÓØ‰Už¤$¼w± À{¼È ÄÛƒ5ê¨d¼É½Òkz@×MÅ$PóøX8½ÜÛ½Þû½à¾â;¾ä[¾æ{¾è›¾ê»¾ À‰?þ)q¬{ Ÿ:ó¥Œó;웿ú;`µØCÓ¸Ö^§¡tËt˜û{À̃V §ÅÕ\,r‹è°¼ <Áç›Tó¬äàÀ3G¤ÜÁì빎ûó 80¢~)yP‡‰»Eé<ÃÝ›™îyâ—`†©G–ñ™Þ¨¾ºu$Ç pŒ4œÄXŸI… xí9jâÃV£&QÁRu¿«Ä\Œ‡mjg ã.4NS.TÜ¥åBÆ …ð,]üÆ‘hª7܃¦Ø7¤0sÆÍYªCª0´Šj[ Ç‚ ‡üªy8¾:3®Â£Ç·b8ó*G8‚`;ƒ|Éþ‹¸·„¶g´?…Ë|‘‡µõ3Ä]4¹Ÿ»@žû¾Lw¿˜üÊâÈY ˰\Ë„HË8ð¼¶¼Ëß;…`˜½¼ÌÂ<ÌÄ\ÌÆ|ÌÈœÌʼÌÌÜÌÎüÌÐÍÒ<ÍÔ\ÍÖ|ÍØœÍÚ¼ÍÜÜÍÞüÍàÎâ<Îä\Îæ|ÎèœÎê¼ÎìÜÎîüÎðÏò<Ïô\Ïö|ÏøœÏú¼ÏüÜϘ¼½j`íÏôŒR›dÇ]`Ð]ÏXU\Ip9­R½L ]ÏÓ;MÞƒÑe04îxÑ–³r]UÑô¬6Gú[¥‚² A\€i6ͦÒ'`Ò@b2RÓ$Ïh ò 9mÓ9¦n/ôþz 7-ω5Ñe€4æaIÉVáRc‡J]Ô]½Ñ_d(VýÕ`Öb=Ö8 ß×l¥"î¬f[hý(k=mýÖp­-[݇’w×|z¥××ù~T-O ;䀅m‚ØŠø>í²L±Q²`¾eéMñËYÃX—‘ÙaGÀÙ•G• N—­¼;ç§m¾€ËwŠ’Zëtl…Ä#ð;"ÁL¡-…/f½Û4ÐÛ:8i`  =íÛ û%Áôw9樗n•°ÜÌ-½Ž ̱FmEÀ¹0,P‰MÂðÝÉÞ(Ð  à "Þ<þe OÜ/]ÄÆ^ÆÝU5 ßcGÇÁÚl \L£0$MíˆÙh> NÍ 9|áØ-°àSÀÀNN!¦5ôÕ#Ë(\nVZ¦Ó½u¼õ˜RçtàÅ×û§ß`óÙ³vÁr¡Nñ…Ô6M~0NU$ÞRB=6i2Ô’ˆ”» ³_?ŽîEÔ¹æÕì޴ͨHnpqvã#¼ÇR†KT¾[!]åùÀB»à—È{„ Nç S¼áä¯mSΓÐ$‚btÍc}P£qN s~;Å`¼sÀ< yn>¾Ü¨þó{18$s¡Õ â@ ®†ä‹9èþ`äþ‘XЦÇT™Þ<Ñ -Þ*®¡®¼i‡výÚ²@'-ÎgšnkYÀêT\÷ Z0ë. z¸þJÉøš Å"îê %}’FÞX!Íy·ÉÑGGÿwnê="büé{ètœäÖ>Óæc=Jë–CËÍîìnßNÁŒþÓA“#g'Üo°qâvì]C‰^®'¸JNX ù®OuLí§s)ÖÄ[ÁËÓû’‚Ímð"=ìРð-(ù;Œ§Bdší»/ßâ£y¹žÈAG”ÿø ‚çr0…Õ&@òb`òJØÿKUŸóäëš6,Â=¦îvßcm³/|[ÿðJþ9ïwiÓî(~ôÔ¾IÞÚM^'£F ¬UZv|Í€Ë÷ôg÷0pݬtƒ{®àr•?hôÉ,ÏFþûF» =ÈWõÛGfwf7-ß× .ïJ~âU5^qïàjð,î’•D1i·ƒDÍG-ðw[ ŒíPÜøŠ=IÎI‚å$Hù(‹øÝCϨYO¿iÓt4†O^ÑI÷½HÿD— ÍÍ/(8ùºôwFîu9û¯ ¾ùH€å; èåË áÖAÐÄÏK¤…úGKéz2X©£]¿5ûÔ%ÆLWÕÕ„ÅoKZ€ü$sMÊïKëˆþeLºOÃO‘÷•@*¯¯È~òqŸ ÷~0v¹sPÿ]sÿ'°þ.¸ü äœGœDõæ}& ¯4Ot*ÂH_8–gº¶o<×kð`pê¿áŽR<“JhT:¥V­WlV»åÊpX<Ƙ¾d48=§Éën\>§×íw|^¿ç÷ýÀ@ÁAÂBÃCÄDÅEÆFÇGÈHÉIÊʘ2Ë—L¥MN¸JÑQÒRS„—!ƒÔŽV”ÕWÙ“ØÓ[Ü\]C’„ÞO^”_‰`œabà]æfçç¬ ‘k‚ßÞ' ij kìl0 îïpìTrshøxùù޳ Zámûâþ’ö÷ö*à« ÞA„ ›=a!¡M˜ \Hì0Aª$ÕP¤¸Ã+e8~SXÒäIHÜ2¾Q`à€PT:d馒'.(¹ÆfL”A…åƒ A0€¾ŽäbtS±¤D¥N¥zÇÚM ž¸š!AǬtuè2ЪiÕ®eÛÖí[¸qåÎ¥[×î]¼yõîåÛ×ï_À&\Øðaĉ/fÜØñcÈ‘%O¦\ÙòeÌ™5oæÜÙógСE&]ÚôiÔ©U¯f}:M*‰$QÄžA{ ‚[«L“ÝÚ7.€;kT g(Ÿ2ÂZd—èNý÷u³—@9þ'äþÂßpÞ¡wŽò“Îc¿>lx…ã2¾co#}µú2îC²ÆÞ?‡÷„g‰^ê€0¾CƒŸhèªìZ(›– .Œ²lšÀ%9@@€ `3@C1äiDmºC€6|iØ Œíhô Áî^ÌÐFOäðÚpKåÃË20+ÿs»nÎr§' ËÁJb:Z”ÀÉ.iè ¨©2;(SÑò=,ƒ“à‚¹A3,Ït’Â,}rg' •7©ÌÀþœ’ËMòÜ3«(­ÑâJ¢¼ï¢¼ÄÂî”D-Àn%Á€ŒÆp‚2ín§LÁ¼g'ØÙ@9æþ5Q+ˆUM¹)ƒò8­€ÔïhAR7dˆ×$|u𠼫õXaª²€[-]rÕZ ¸ŒYŸ'h xÔ ÂÒà,i† °ÛbµÕVYcuÝ_Ó+ÀÊÛv»_5V&sîu;c÷½W9Hµ½V¹y`WZÐ0m÷Î,Ãc.¬¯Øâ(p‡À2LÎj¥bf¿xÂÛWÛÌ._¿$¸—³)dF™}x_Ì™J}ÓÍW\™ >ùæâ¬¤ŽaÍŽ—„¯î0Xr¹Ó&-ÎÎÓì- ØŸf„ ØÐÜ|³6wår*/i[ó•™f‡¢æÉShsÖ—Ô¯ÖPÎë†þö#¦ˆMd\úàj£XÌ70ƒÒ,W°  Ä¥9jOP³ììHêŒ &?—sÆ7髇ÙüñÉ §Ôñ—>Ì­¸F|×ëÔk'<Ç[A\vn÷´ýÐÇYÅqÃËi'r3ÃXÏoæ)›¯yèý{>zê[K½zì³×~{î»÷þ{ðÃ|òË7ÿ|ôÓW}öÛwÿ}øã—~úë·ÿ~üó×þû÷ÿP€$` x@ì - ¼ˆ@ ì ‚t˜àûÇÊ$Ê ¨fÁAýX°ˆ[~4؆0:.0¡E¸¿<  Ç ? Ãâ C3ÁA þ1Ç”Úð…ù»Øëdf‚wqH|C¢”HV4qˆù›FvŒèŽ î5º"ýѹTQH9 ÖÀ8Åÿµ0‹„TÐ8D­äà+<‹CòôF<æQ{äã\*€ìPL˜8|HAR Dä¹–BC‘Ì(IÉ>ÖÂr&°Õ*²É/zÒ# LŽD9ê°ñd¨hJ T‰™A"q;€Â²¸¼ ÔraÂÀ¥ tyKÄR³ä¤?äcÌ-ì2+žÑF'L4º{XÇÒ¤‚QV5=ü‘šâж©Ì0z3‹þ0‘6ZÍ.pŠÃfA†! t¬’“ÇK:úþQ…$ƒ z¥a†“ ãüpKlÜ ª5šÀ8å ÚÐ,<ó‚Ã弨¤¢VШÂãCµÙ£©vžp“Z¤úX;ZÒOà $Iè jZ“ªÐ)rºST®°º)!ÆC§‹þ0?HM*«@'œ0ªš™|„‰¢Öã—=Üj»JU¡¤ÏzÑú˜UŸ?”ÆX^çFÂ53BuPLNŠ•Hd›lÀ«è¢0œ;Ú°{Â`m°Ð¾žõHœè%Ë$ÐÂ¥»ÒÝRt¨ ©Hs|ÊR8ûAÍ’Ô,‡óìh7¢N¸°D-ÄVZ[þ‘tR5)o0¯¬NÔ¶3è©_á³c÷ õRæÅ$Ë$IhÇu¥r¡æ¢Â¹ŸY(A2r’P'"qãIj§°]ÙD1©Jøª/m‰‰`P@U@ya`Sž4yZDÚ #ïJÁ¾}iÙ¤‚üW’ÑAáz»ñûÆU¥À+è'qMpW௶n³Ñb˜ ‡5àabh89Ð=ïUÑöàçŒIÂàÜÚl6¶* ªíÅ»Ó9æfŒ}CDZƧ¢œ¼˜gs‹‚/§?gíîkòª(9BY ¸ñf{Ö ?l¼&ãOŽŒdn\Ä›0U[/þ26;™ðÒœYˆ÷4%Î2:úØ;%cÂxVoŽÑç ÈÒô;Bb6Š–£aÝ À®Õ!/E«=“ÐYùóŸ{“BBcœ”®z‚ú%d¾ÄJ­êp­:Ë4Øôb¦8´0¤‹Ü¨* _aÙ,!7KÞñŽ…MÂs–Hµa1 „»…gu^[(SÍqG› û¾$ýD¯uüábXÛØV¶ÃÞ.ÉçþéÚÌQv§›L¹åñe®@úÍN2ÉÔ/Cq§„5µªPð|Û‡¤T{¬\Ì“!Y›õÔ¿_QŸ€î¡þOT´¸ÌzþÒ=:ç BÅdÁÖ‡¶#ÝcU®ð:!üã ù'@ ‚‘çÀt †É¿q%èÛcëø mt˜’”¯›¢ýþn †ü®MÔ7ûôZð$Y˜<:^¤àc[Ï:'Ïxƒ›c}¸õ {g8•ñ¡Ÿ¼‡R–: ky*?ÇîÚÖAÞë±÷¼³}†Ï3)&4ãI¼â}÷%8^‡¯ß¡Ý@M˧¡ÊFw6OyЇ^ô£'}éMöfEš©¯kXßúÓ§/ƒ¶p…*ú«„Ò>öå£zv– ôãõÅ þïw?¾x®R׈å¬ÄøÎ6_‚UÄ8Øaã‹þO #ýÇ>ÇÄa¿‡“53€ÄŸ}ðñ°'#­ ×?ÚÚŠFa ûÑ/>õ×DG †3MÆð§ýs"A–h‰¼¿îq ÊÊ&Ï‹á #Ë’+T²À Œƒ ´£Ï›@ì@ü@ AA,AY )Ì›é¨ù€–Žé:,Q™‘¹TQV¨“ᨕ–Á``ˆ*Ue,™c“WüV[YÖV(Ö›™QwØ„Ç1i=ÄbT iÖ"ÊÐä˜ûúyí®g ÔhE™|­Öo¼VwÕÖ,­ÒPÖ{ýQST=TU="•Kµ.VX}Wø XÑ›0ÁÕ#𠦻›‡MÍ_%²ËKÃ$íþX}´¬qš±9©`©Øøª1}On"†ÀVgaYCõXNt1îzE¡¥†1“`IY­ëkd8H5“±YîTÚGK±©+·yª9Ú,yÙîˆÙ˜ÙÉ<Ù›}šúÜÙC,Ú‚mXWpÙÒtXõX‘åNf!®]q\I¨ZX¥Ú€à®{Ú‰ œßá“k±(â hríòâaº{Òq\ÆAžj`݉Á­ØÈÒâÁ€ÒÐÉ5rðøÜÆU£Pžª1"Áí#\Ùu´ÖU×0ZÃa\+ºÝ¢>Ø!¦ÕÅH XœáÑ hªâÙÝòs'ZƒÓ#äIʱ¨Îþ¥€ç]ä Þ䥴É5ÔE^ aÁÜß•Óí§ðÛi?ße\÷ÝÞÙI_ù5†ÑÕ]㑆ä 5±ß,¡Žã%Üâ±ÜñË/Z,¬w*#ôéEòQD.„kT!u#Ùi`ñi§ …ëaƒç¤`è1ÊùÉ`—\ D V~£s PÏ/–ŒýYwѸu‡‰HRhã€À.º×ŒcÇÐTµÙxaÚ–xÕAÝ”=&ª€;”‡ëŽ>d¶H™‹Y[g¡Vô7]Íäàcb`c5…–d©¸Ú%üYSÎ%sZUîdFÆþr¹‡d¬5Ræ‹ëmÜØõš\VÝ ^ë¥>¶&œâÞY>±apÒ[~Œf±6f‹ˆ>”ó¨rkfθ`ÐæEF¨a¡&²8lî nDpú†ú¹Çë.ê‰j>Ø%gñ™‘`‰™“çLj;fftw-2.1.5/doc/fftw_3.html0000644000175400001440000017542507637531661011025 FFTW - FFTW Reference Go to the first, previous, next, last section, table of contents.


FFTW Reference

This chapter provides a complete reference for all sequential (i.e., one-processor) FFTW functions. We first define the data types upon which FFTW operates, that is, real, complex, and "halfcomplex" numbers (see Section Data Types). Then, in four sections, we explain the FFTW program interface for complex one-dimensional transforms (see Section One-dimensional Transforms Reference), complex multi-dimensional transforms (see Section Multi-dimensional Transforms Reference), and real one-dimensional transforms (see Section Real One-dimensional Transforms Reference), real multi-dimensional transforms (see Section Real Multi-dimensional Transforms Reference). Section Wisdom Reference describes the wisdom mechanism for exporting and importing plans. Finally, Section Memory Allocator Reference describes how to change FFTW's default memory allocator. For parallel transforms, See Section Parallel FFTW.

Data Types

The routines in the FFTW package use three main kinds of data types. Real and complex numbers should be already known to the reader. We also use the term halfcomplex to describe complex arrays in a special packed format used by the one-dimensional real transforms (taking advantage of the hermitian symmetry that arises in those cases).

By including <fftw.h> or <rfftw.h>, you will have access to the following definitions:

typedef double fftw_real;

typedef struct {
     fftw_real re, im;
} fftw_complex;

#define c_re(c)  ((c).re)
#define c_im(c)  ((c).im)

All FFTW operations are performed on the fftw_real and fftw_complex data types. For fftw_complex numbers, the two macros c_re and c_im retrieve, respectively, the real and imaginary parts of the number.

A real array is an array of real numbers. A complex array is an array of complex numbers. A one-dimensional array X of n complex numbers is hermitian if the following property holds: for all 0 <= i < n, we have Xi = conj(Xn-i)}. Hermitian arrays are relevant to FFTW because the Fourier transform of a real array is hermitian.

Because of its symmetry, a hermitian array can be stored in half the space of a complex array of the same size. FFTW's one-dimensional real transforms store hermitian arrays as halfcomplex arrays. A halfcomplex array of size n is a one-dimensional array of n fftw_real numbers. A hermitian array X in stored into a halfcomplex array Y as follows. For all integers i such that 0 <= i <= n / 2, we have Yi = Re(Xi). For all integers i such that 0 < i < n / 2, we have Yn-i = Im(Xi).

We now illustrate halfcomplex storage for n = 4 and n = 5, since the scheme depends on the parity of n. Let n = 4. In this case, we have Y0 = Re(X0), Y1 = Re(X1), Y2 = Re(X2), and Y3 = Im(X1). Let now n = 5. In this case, we have Y0 = Re(X0), Y1 = Re(X1), Y2 = Re(X2), Y3 = Im(X2), and Y4 = Im(X1).

By default, the type fftw_real equals the C type double. To work in single precision rather than double precision, #define the symbol FFTW_ENABLE_FLOAT in fftw.h and then recompile the library. On Unix systems, you can instead use configure --enable-float at installation time (see Section Installation and Customization).

In version 1 of FFTW, the data types were called FFTW_REAL and FFTW_COMPLEX. We changed the capitalization for consistency with the rest of FFTW's conventions. The old names are still supported, but their use is deprecated.

One-dimensional Transforms Reference

The one-dimensional complex routines are generally prefixed with fftw_. Programs using FFTW should be linked with -lfftw -lm on Unix systems, or with the FFTW and standard math libraries in general.

Plan Creation for One-dimensional Transforms

#include <fftw.h>

fftw_plan fftw_create_plan(int n, fftw_direction dir,
                           int flags);

fftw_plan fftw_create_plan_specific(int n, fftw_direction dir,
                                    int flags,
                                    fftw_complex *in, int istride,
                                    fftw_complex *out, int ostride);

The function fftw_create_plan creates a plan, which is a data structure containing all the information that fftw needs in order to compute the 1D Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times).

fftw_create_plan returns a valid plan, or NULL if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure FFTW in such a way that some input sizes are forbidden, and FFTW cannot create a plan.

The fftw_create_plan_specific variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to fftw. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are destroyed by the specific planner (the initial contents are ignored, so the arrays need not have been initialized).

Arguments

  • n is the size of the transform. It can be any positive integer.
    • FFTW is best at handling sizes of the form 2a 3b 5c 7d 11e 13f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (which nevertheless retains O(n lg n) performance, even for prime sizes). (It is possible to customize FFTW for different array sizes. See Section Installation and Customization, for more information.) Transforms whose sizes are powers of 2 are especially fast.
  • dir is the sign of the exponent in the formula that defines the Fourier transform. It can be -1 or +1. The aliases FFTW_FORWARD and FFTW_BACKWARD are provided, where FFTW_FORWARD stands for -1.
  • flags is a boolean OR (`|') of zero or more of the following:
    • FFTW_MEASURE: this flag tells FFTW to find the optimal plan by actually computing several FFTs and measuring their execution time. Depending on the installation, this can take some time. (2)
    • FFTW_ESTIMATE: do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither FFTW_ESTIMATE nor FFTW_MEASURE is provided, the default is FFTW_ESTIMATE.
    • FFTW_OUT_OF_PLACE: produce a plan assuming that the input and output arrays will be distinct (this is the default).
    • FFTW_IN_PLACE: produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: FFTW is able to compute true in-place transforms only for small values of n. If FFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. Warning: This option changes the meaning of some parameters of fftw (see Section Computing the One-dimensional Transform). The in-place option is mainly provided for people who want to write their own in-place multi-dimensional Fourier transform, using FFTW as a base. For example, consider a three-dimensional n * n * n transform. An out-of-place algorithm will need another array (which may be huge). However, FFTW can compute the in-place transform along each dimension using only a temporary array of size n. Moreover, if FFTW happens to be able to compute the transform truly in-place, no temporary array and no copying are needed. As distributed, FFTW `knows' how to compute in-place transforms of size 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32 and 64. The default mode of operation is FFTW_OUT_OF_PLACE.
    • FFTW_USE_WISDOM: use any wisdom that is available to help in the creation of the plan. (See Section Words of Wisdom.) This can greatly speed the creation of plans, especially with the FFTW_MEASURE option. FFTW_ESTIMATE plans can also take advantage of wisdom to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the FFTW_MEASURE option is used, new wisdom will also be generated if the current transform size is not completely understood by existing wisdom.
  • in, out, istride, ostride (only for fftw_create_plan_specific): see corresponding arguments in the description of fftw. (See Section Computing the One-dimensional Transform.) In particular, the out and ostride parameters have the same special meaning for FFTW_IN_PLACE transforms as they have for fftw.

Discussion on Specific Plans

We recommend the use of the specific planners, even in cases where you will be transforming arrays different from those passed to the specific planners, as they confer the following advantages:

  • The resulting plans will be optimized for your specific arrays and strides. This may or may not make a significant difference, but it certainly doesn't hurt. (The ordinary planner does its planning based upon a stride-one temporary array that it allocates.)
  • Less intermediate storage is required during the planning process. (The ordinary planner uses O(N) temporary storage, where N is the maximum dimension, while it is creating the plan.)
  • For multi-dimensional transforms, new parameters become accessible for optimization by the planner. (Since multi-dimensional arrays can be very large, we don't dare to allocate one in the ordinary planner for experimentation. This prevents us from doing certain optimizations that can yield dramatic improvements in some cases.)

On the other hand, note that the specific planner destroys the contents of the in and out arrays.

Computing the One-dimensional Transform

#include <fftw.h>

void fftw(fftw_plan plan, int howmany,
          fftw_complex *in, int istride, int idist,
          fftw_complex *out, int ostride, int odist);

void fftw_one(fftw_plan plan, fftw_complex *in, 
          fftw_complex *out);

The function fftw computes the one-dimensional Fourier transform, using a plan created by fftw_create_plan (See Section Plan Creation for One-dimensional Transforms.) The function fftw_one provides a simplified interface for the common case of single input array of stride 1.

Arguments

  • plan is the plan created by fftw_create_plan (see Section Plan Creation for One-dimensional Transforms).
  • howmany is the number of transforms fftw will compute. It is faster to tell FFTW to compute many transforms, instead of simply calling fftw many times.
  • in, istride and idist describe the input array(s). There are howmany input arrays; the first one is pointed to by in, the second one is pointed to by in + idist, and so on, up to in + (howmany - 1) * idist. Each input array consists of complex numbers (see Section Data Types), which are not necessarily contiguous in memory. Specifically, in[0] is the first element of the first array, in[istride] is the second element of the first array, and so on. In general, the i-th element of the j-th input array will be in position in[i * istride + j * idist].
  • out, ostride and odist describe the output array(s). The format is the same as for the input array.
    • In-place transforms: If the plan specifies an in-place transform, ostride and odist are always ignored. If out is NULL, out is ignored, too. Otherwise, out is interpreted as a pointer to an array of n complex numbers, that FFTW will use as temporary space to perform the in-place computation. out is used as scratch space and its contents destroyed. In this case, out must be an ordinary array whose elements are contiguous in memory (no striding).

The function fftw_one transforms a single, contiguous input array to a contiguous output array. By definition, the call

fftw_one(plan, in, out)

is equivalent to

fftw(plan, 1, in, 1, 0, out, 1, 0)

Destroying a One-dimensional Plan

#include <fftw.h>

void fftw_destroy_plan(fftw_plan plan);

The function fftw_destroy_plan frees the plan plan and releases all the memory associated with it. After destruction, a plan is no longer valid.

What FFTW Really Computes

In this section, we define precisely what FFTW computes. Please be warned that different authors and software packages might employ different conventions than FFTW does.

The forward transform of a complex array X of size n computes an array Y, where

The backward transform computes

FFTW computes an unnormalized transform, that is, the equation IFFT(FFT(X)) = n X holds. In other words, applying the forward and then the backward transform will multiply the input by n.

An FFTW_FORWARD transform corresponds to a sign of -1 in the exponent of the DFT. Note also that we use the standard "in-order" output ordering--the k-th output corresponds to the frequency k/n (or k/T, where T is your total sampling period). For those who like to think in terms of positive and negative frequencies, this means that the positive frequencies are stored in the first half of the output and the negative frequencies are stored in backwards order in the second half of the output. (The frequency -k/n is the same as the frequency (n-k)/n.)

Multi-dimensional Transforms Reference

The multi-dimensional complex routines are generally prefixed with fftwnd_. Programs using FFTWND should be linked with -lfftw -lm on Unix systems, or with the FFTW and standard math libraries in general.

Plan Creation for Multi-dimensional Transforms

#include <fftw.h>

fftwnd_plan fftwnd_create_plan(int rank, const int *n,
                               fftw_direction dir, int flags);

fftwnd_plan fftw2d_create_plan(int nx, int ny,
                               fftw_direction dir, int flags);

fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz,
                               fftw_direction dir, int flags);

fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n,
                                        fftw_direction dir,
                                        int flags,
                                        fftw_complex *in, int istride,
                                        fftw_complex *out, int ostride);

fftwnd_plan fftw2d_create_plan_specific(int nx, int ny,
                                        fftw_direction dir,
                                        int flags,
                                        fftw_complex *in, int istride,
                                        fftw_complex *out, int ostride);

fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz,
                                        fftw_direction dir, int flags,
                                        fftw_complex *in, int istride,
                                        fftw_complex *out, int ostride);

The function fftwnd_create_plan creates a plan, which is a data structure containing all the information that fftwnd needs in order to compute a multi-dimensional Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions fftw2d_create_plan and fftw3d_create_plan are optional, alternative interfaces to fftwnd_create_plan for two and three dimensions, respectively.

fftwnd_create_plan returns a valid plan, or NULL if, for some reason, the plan can't be created. This can happen if memory runs out or if the arguments are invalid in some way (e.g. if rank < 0).

The create_plan_specific variants take as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to fftwnd. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are destroyed by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). See Section Discussion on Specific Plans, for a discussion on specific plans.

Arguments

  • rank is the dimensionality of the arrays to be transformed. It can be any non-negative integer.
  • n is a pointer to an array of rank integers, giving the size of each dimension of the arrays to be transformed. These sizes, which must be positive integers, correspond to the dimensions of row-major arrays--i.e. n[0] is the size of the dimension whose indices vary most slowly, and so on. (See Section Multi-dimensional Array Format, for more information on row-major storage.) See Section Plan Creation for One-dimensional Transforms, for more information regarding optimal array sizes.
  • nx and ny in fftw2d_create_plan are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on nx x ny arrays in row-major order, where nx is the number of rows and ny is the number of columns.
  • nx, ny and nz in fftw3d_create_plan are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on nx x ny x nz arrays in row-major order.
  • dir is the sign of the exponent in the formula that defines the Fourier transform. It can be -1 or +1. The aliases FFTW_FORWARD and FFTW_BACKWARD are provided, where FFTW_FORWARD stands for -1.
  • flags is a boolean OR (`|') of zero or more of the following:
    • FFTW_MEASURE: this flag tells FFTW to find the optimal plan by actually computing several FFTs and measuring their execution time.
    • FFTW_ESTIMATE: do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither FFTW_ESTIMATE nor FFTW_MEASURE is provided, the default is FFTW_ESTIMATE.
    • FFTW_OUT_OF_PLACE: produce a plan assuming that the input and output arrays will be distinct (this is the default).
    • FFTW_IN_PLACE: produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this "really" (3) performs the transform in-place.) Note that, if you want to perform in-place transforms, you must use a plan created with this option. The default mode of operation is FFTW_OUT_OF_PLACE.
    • FFTW_USE_WISDOM: use any wisdom that is available to help in the creation of the plan. (See Section Words of Wisdom.) This can greatly speed the creation of plans, especially with the FFTW_MEASURE option. FFTW_ESTIMATE plans can also take advantage of wisdom to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the FFTW_MEASURE option is used, new wisdom will also be generated if the current transform size is not completely understood by existing wisdom. Note that the same wisdom is shared between one-dimensional and multi-dimensional transforms.
  • in, out, istride, ostride (only for the _create_plan_specific variants): see corresponding arguments in the description of fftwnd. (See Section Computing the Multi-dimensional Transform.)

Computing the Multi-dimensional Transform

#include <fftw.h>

void fftwnd(fftwnd_plan plan, int howmany,
            fftw_complex *in, int istride, int idist,
            fftw_complex *out, int ostride, int odist);

void fftwnd_one(fftwnd_plan p, fftw_complex *in, 
                fftw_complex *out);

The function fftwnd computes one or more multi-dimensional Fourier Transforms, using a plan created by fftwnd_create_plan (see Section Plan Creation for Multi-dimensional Transforms). (Note that the plan determines the rank and dimensions of the array to be transformed.) The function fftwnd_one provides a simplified interface for the common case of single input array of stride 1.

Arguments

  • plan is the plan created by fftwnd_create_plan. (see Section Plan Creation for Multi-dimensional Transforms). In the case of two and three-dimensional transforms, it could also have been created by fftw2d_create_plan or fftw3d_create_plan, respectively.
  • howmany is the number of multi-dimensional transforms fftwnd will compute.
  • in, istride and idist describe the input array(s). There are howmany multi-dimensional input arrays; the first one is pointed to by in, the second one is pointed to by in + idist, and so on, up to in + (howmany - 1) * idist. Each multi-dimensional input array consists of complex numbers (see Section Data Types), stored in row-major format (see Section Multi-dimensional Array Format), which are not necessarily contiguous in memory. Specifically, in[0] is the first element of the first array, in[istride] is the second element of the first array, and so on. In general, the i-th element of the j-th input array will be in position in[i * istride + j * idist]. Note that, here, i refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension.
    • In-place transforms: For plans created with the FFTW_IN_PLACE option, the transform is computed in-place--the output is returned in the in array, using the same strides, etcetera, as were used in the input.
  • out, ostride and odist describe the output array(s). The format is the same as for the input array.
    • In-place transforms: These parameters are ignored for plans created with the FFTW_IN_PLACE option.

The function fftwnd_one transforms a single, contiguous input array to a contiguous output array. By definition, the call

fftwnd_one(plan, in, out)

is equivalent to

fftwnd(plan, 1, in, 1, 0, out, 1, 0)

Destroying a Multi-dimensional Plan

#include <fftw.h>

void fftwnd_destroy_plan(fftwnd_plan plan);

The function fftwnd_destroy_plan frees the plan plan and releases all the memory associated with it. After destruction, a plan is no longer valid.

What FFTWND Really Computes

The conventions that we follow for the multi-dimensional transform are analogous to those for the one-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions. The output is in-order, and the zeroth element of the output is the amplitude of the zero frequency component. The Gods forbade using HTML to display mathematical formulas. Please see the TeX or Postscript version of this manual for the proper definition of the n-dimensional Fourier transform that FFTW uses. For completeness, we include a bitmap of the TeX output below:

Real One-dimensional Transforms Reference

The one-dimensional real routines are generally prefixed with rfftw_. (4) Programs using RFFTW should be linked with -lrfftw -lfftw -lm on Unix systems, or with the RFFTW, the FFTW, and the standard math libraries in general.

Plan Creation for Real One-dimensional Transforms

#include <rfftw.h>

rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags);

rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir,
	    int flags, fftw_real *in, int istride,
	    fftw_real *out, int ostride);

The function rfftw_create_plan creates a plan, which is a data structure containing all the information that rfftw needs in order to compute the 1D real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times).

rfftw_create_plan returns a valid plan, or NULL if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure RFFTW in such a way that some input sizes are forbidden, and RFFTW cannot create a plan.

The rfftw_create_plan_specific variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to rfftw. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are destroyed by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). See Section Discussion on Specific Plans, for a discussion on specific plans.

Arguments

  • n is the size of the transform. It can be any positive integer.
    • RFFTW is best at handling sizes of the form 2a 3b 5c 7d 11e 13f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (reducing to O(n2) performance for prime sizes). (It is possible to customize RFFTW for different array sizes. See Section Installation and Customization, for more information.) Transforms whose sizes are powers of 2 are especially fast. If you have large prime factors, it may be faster to switch over to the complex FFTW routines, which have O(n lg n) performance even for prime sizes (we don't know of a similar algorithm specialized for real data, unfortunately).
  • dir is the direction of the desired transform, either FFTW_REAL_TO_COMPLEX or FFTW_COMPLEX_TO_REAL, corresponding to FFTW_FORWARD or FFTW_BACKWARD, respectively.
  • flags is a boolean OR (`|') of zero or more of the following:
    • FFTW_MEASURE: this flag tells RFFTW to find the optimal plan by actually computing several FFTs and measuring their execution time. Depending on the installation, this can take some time.
    • FFTW_ESTIMATE: do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither FFTW_ESTIMATE nor FFTW_MEASURE is provided, the default is FFTW_ESTIMATE.
    • FFTW_OUT_OF_PLACE: produce a plan assuming that the input and output arrays will be distinct (this is the default).
    • FFTW_IN_PLACE: produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: RFFTW is able to compute true in-place transforms only for small values of n. If RFFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. Warning: This option changes the meaning of some parameters of rfftw (see Section Computing the Real One-dimensional Transform). The default mode of operation is FFTW_OUT_OF_PLACE.
    • FFTW_USE_WISDOM: use any wisdom that is available to help in the creation of the plan. (See Section Words of Wisdom.) This can greatly speed the creation of plans, especially with the FFTW_MEASURE option. FFTW_ESTIMATE plans can also take advantage of wisdom to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the FFTW_MEASURE option is used, new wisdom will also be generated if the current transform size is not completely understood by existing wisdom.
  • in, out, istride, ostride (only for rfftw_create_plan_specific): see corresponding arguments in the description of rfftw. (See Section Computing the Real One-dimensional Transform.) In particular, the out and ostride parameters have the same special meaning for FFTW_IN_PLACE transforms as they have for rfftw.

Computing the Real One-dimensional Transform

#include <rfftw.h>

void rfftw(rfftw_plan plan, int howmany, 
           fftw_real *in, int istride, int idist, 
           fftw_real *out, int ostride, int odist);

void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out);

The function rfftw computes the Real One-dimensional Fourier Transform, using a plan created by rfftw_create_plan (see Section Plan Creation for Real One-dimensional Transforms). The function rfftw_one provides a simplified interface for the common case of single input array of stride 1.

Important: When invoked for an out-of-place, FFTW_COMPLEX_TO_REAL transform, the input array is overwritten with scratch values by these routines. The input array is not modified for FFTW_REAL_TO_COMPLEX transforms.

Arguments

  • plan is the plan created by rfftw_create_plan (see Section Plan Creation for Real One-dimensional Transforms).
  • howmany is the number of transforms rfftw will compute. It is faster to tell RFFTW to compute many transforms, instead of simply calling rfftw many times.
  • in, istride and idist describe the input array(s). There are two cases. If the plan defines a FFTW_REAL_TO_COMPLEX transform, in is a real array. Otherwise, for FFTW_COMPLEX_TO_REAL transforms, in is a halfcomplex array whose contents will be destroyed.
  • out, ostride and odist describe the output array(s), and have the same meaning as the corresponding parameters for the input array.
    • In-place transforms: If the plan specifies an in-place transform, ostride and odist are always ignored. If out is NULL, out is ignored, too. Otherwise, out is interpreted as a pointer to an array of n complex numbers, that FFTW will use as temporary space to perform the in-place computation. out is used as scratch space and its contents destroyed. In this case, out must be an ordinary array whose elements are contiguous in memory (no striding).

The function rfftw_one transforms a single, contiguous input array to a contiguous output array. By definition, the call

rfftw_one(plan, in, out)

is equivalent to

rfftw(plan, 1, in, 1, 0, out, 1, 0)

Destroying a Real One-dimensional Plan

#include <rfftw.h>

void rfftw_destroy_plan(rfftw_plan plan);

The function rfftw_destroy_plan frees the plan plan and releases all the memory associated with it. After destruction, a plan is no longer valid.

What RFFTW Really Computes

In this section, we define precisely what RFFTW computes.

The real to complex (FFTW_REAL_TO_COMPLEX) transform of a real array X of size n computes an hermitian array Y, where

(That Y is a hermitian array is not intended to be obvious, although the proof is easy.) The hermitian array Y is stored in halfcomplex order (see Section Data Types). Currently, RFFTW provides no way to compute a real to complex transform with a positive sign in the exponent.

The complex to real (FFTW_COMPLEX_TO_REAL) transform of a hermitian array X of size n computes a real array Y, where

(That Y is a real array is not intended to be obvious, although the proof is easy.) The hermitian input array X is stored in halfcomplex order (see Section Data Types). Currently, RFFTW provides no way to compute a complex to real transform with a negative sign in the exponent.

Like FFTW, RFFTW computes an unnormalized transform. In other words, applying the real to complex (forward) and then the complex to real (backward) transform will multiply the input by n.

Real Multi-dimensional Transforms Reference

The multi-dimensional real routines are generally prefixed with rfftwnd_. Programs using RFFTWND should be linked with -lrfftw -lfftw -lm on Unix systems, or with the FFTW, RFFTW, and standard math libraries in general.

Plan Creation for Real Multi-dimensional Transforms

#include <rfftw.h>

rfftwnd_plan rfftwnd_create_plan(int rank, const int *n,
                                 fftw_direction dir, int flags);

rfftwnd_plan rfftw2d_create_plan(int nx, int ny,
                                 fftw_direction dir, int flags);

rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz,
                                 fftw_direction dir, int flags);

The function rfftwnd_create_plan creates a plan, which is a data structure containing all the information that rfftwnd needs in order to compute a multi-dimensional real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions rfftw2d_create_plan and rfftw3d_create_plan are optional, alternative interfaces to rfftwnd_create_plan for two and three dimensions, respectively.

rfftwnd_create_plan returns a valid plan, or NULL if, for some reason, the plan can't be created. This can happen if the arguments are invalid in some way (e.g. if rank < 0).

Arguments

  • rank is the dimensionality of the arrays to be transformed. It can be any non-negative integer.
  • n is a pointer to an array of rank integers, giving the size of each dimension of the arrays to be transformed. Note that these are always the dimensions of the real arrays; the complex arrays have different dimensions (see Section Array Dimensions for Real Multi-dimensional Transforms). These sizes, which must be positive integers, correspond to the dimensions of row-major arrays--i.e. n[0] is the size of the dimension whose indices vary most slowly, and so on. (See Section Multi-dimensional Array Format, for more information.)
  • nx and ny in rfftw2d_create_plan are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on nx x ny arrays in row-major order, where nx is the number of rows and ny is the number of columns.
  • nx, ny and nz in rfftw3d_create_plan are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on nx x ny x nz arrays in row-major order.
  • dir is the direction of the desired transform, either FFTW_REAL_TO_COMPLEX or FFTW_COMPLEX_TO_REAL, corresponding to FFTW_FORWARD or FFTW_BACKWARD, respectively.
  • flags is a boolean OR (`|') of zero or more of the following:
    • FFTW_MEASURE: this flag tells FFTW to find the optimal plan by actually computing several FFTs and measuring their execution time.
    • FFTW_ESTIMATE: do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither FFTW_ESTIMATE nor FFTW_MEASURE is provided, the default is FFTW_ESTIMATE.
    • FFTW_OUT_OF_PLACE: produce a plan assuming that the input and output arrays will be distinct (this is the default).
    • FFTW_IN_PLACE: produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this "really" performs the transform in-place.) Note that, if you want to perform in-place transforms, you must use a plan created with this option. The use of this option has important implications for the size of the input/output array (see Section Computing the Real Multi-dimensional Transform). The default mode of operation is FFTW_OUT_OF_PLACE.
    • FFTW_USE_WISDOM: use any wisdom that is available to help in the creation of the plan. (See Section Words of Wisdom.) This can greatly speed the creation of plans, especially with the FFTW_MEASURE option. FFTW_ESTIMATE plans can also take advantage of wisdom to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the FFTW_MEASURE option is used, new wisdom will also be generated if the current transform size is not completely understood by existing wisdom. Note that the same wisdom is shared between one-dimensional and multi-dimensional transforms.

Computing the Real Multi-dimensional Transform

#include <rfftw.h>

void rfftwnd_real_to_complex(rfftwnd_plan plan, int howmany,
                             fftw_real *in, int istride, int idist,
                             fftw_complex *out, int ostride, int odist);
void rfftwnd_complex_to_real(rfftwnd_plan plan, int howmany,
                             fftw_complex *in, int istride, int idist,
                             fftw_real *out, int ostride, int odist);

void rfftwnd_one_real_to_complex(rfftwnd_plan p, fftw_real *in,
                                 fftw_complex *out);
void rfftwnd_one_complex_to_real(rfftwnd_plan p, fftw_complex *in,
                                 fftw_real *out);

These functions compute the real multi-dimensional Fourier Transform, using a plan created by rfftwnd_create_plan (see Section Plan Creation for Real Multi-dimensional Transforms). (Note that the plan determines the rank and dimensions of the array to be transformed.) The `rfftwnd_one_' functions provide a simplified interface for the common case of single input array of stride 1. Unlike other transform routines in FFTW, we here use separate functions for the two directions of the transform in order to correctly express the datatypes of the parameters.

Important: When invoked for an out-of-place, FFTW_COMPLEX_TO_REAL transform with rank > 1, the input array is overwritten with scratch values by these routines. The input array is not modified for FFTW_REAL_TO_COMPLEX transforms or for FFTW_COMPLEX_TO_REAL with rank == 1.

Arguments

  • plan is the plan created by rfftwnd_create_plan. (see Section Plan Creation for Real Multi-dimensional Transforms). In the case of two and three-dimensional transforms, it could also have been created by rfftw2d_create_plan or rfftw3d_create_plan, respectively. FFTW_REAL_TO_COMPLEX plans must be used with the `real_to_complex' functions, and FFTW_COMPLEX_TO_REAL plans must be used with the `complex_to_real' functions. It is an error to mismatch the plan direction and the transform function.
  • howmany is the number of transforms to be computed.
  • in, istride and idist describe the input array(s). There are howmany input arrays; the first one is pointed to by in, the second one is pointed to by in + idist, and so on, up to in + (howmany - 1) * idist. Each input array is stored in row-major format (see Section Multi-dimensional Array Format), and is not necessarily contiguous in memory. Specifically, in[0] is the first element of the first array, in[istride] is the second element of the first array, and so on. In general, the i-th element of the j-th input array will be in position in[i * istride + j * idist]. Note that, here, i refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension. The dimensions of the arrays are different for real and complex data, and are discussed in more detail below (see Section Array Dimensions for Real Multi-dimensional Transforms).
    • In-place transforms: For plans created with the FFTW_IN_PLACE option, the transform is computed in-place--the output is returned in the in array. The meaning of the stride and dist parameters in this case is subtle and is discussed below (see Section Strides in In-place RFFTWND).
  • out, ostride and odist describe the output array(s). The format is the same as that for the input array. See below for a discussion of the dimensions of the output array for real and complex data.
    • In-place transforms: These parameters are ignored for plans created with the FFTW_IN_PLACE option.

The function rfftwnd_one transforms a single, contiguous input array to a contiguous output array. By definition, the call

rfftwnd_one_...(plan, in, out)

is equivalent to

rfftwnd_...(plan, 1, in, 1, 0, out, 1, 0)

Array Dimensions for Real Multi-dimensional Transforms

The output of a multi-dimensional transform of real data contains symmetries that, in principle, make half of the outputs redundant (see Section What RFFTWND Really Computes). In practice, it is not possible to entirely realize these savings in an efficient and understandable format. Instead, the output of the rfftwnd transforms is slightly over half of the output of the corresponding complex transform. We do not "pack" the data in any way, but store it as an ordinary array of fftw_complex values. In fact, this data is simply a subsection of what would be the array in the corresponding complex transform.

Specifically, for a real transform of dimensions n1 x n2 x ... x nd, the complex data is an n1 x n2 x ... x (nd/2+1) array of fftw_complex values in row-major order (with the division rounded down). That is, we only store the lower half (plus one element) of the last dimension of the data from the ordinary complex transform. (We could have instead taken half of any other dimension, but implementation turns out to be simpler if the last, contiguous, dimension is used.)

Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data--two extra if the last dimension is even and one if it is odd. That is, the last dimension of the real data must physically contain 2 * (nd/2+1) fftw_real values (exactly enough to hold the complex data). This physical array size does not, however, change the logical array size--only nd values are actually stored in the last dimension, and nd is the last dimension passed to rfftwnd_create_plan.

Strides in In-place RFFTWND

The fact that the input and output datatypes are different for rfftwnd complicates the meaning of the stride and dist parameters of in-place transforms--are they in units of fftw_real or fftw_complex elements? When reading the input, they are interpreted in units of the datatype of the input data. When writing the output, the istride and idist are translated to the output datatype's "units" in one of two ways, corresponding to the two most common situations in which stride and dist parameters are useful. Below, we refer to these "translated" parameters as ostride_t and odist_t. (Note that these are computed internally by rfftwnd; the actual ostride and odist parameters are ignored for in-place transforms.)

First, there is the case where you are transforming a number of contiguous arrays located one after another in memory. In this situation, istride is 1 and idist is the product of the physical dimensions of the array. ostride_t and odist_t are then chosen so that the output arrays are contiguous and lie on top of the input arrays. ostride_t is therefore 1. For a real-to-complex transform, odist_t is idist/2; for a complex-to-real transform, odist_t is idist*2.

The second case is when you have an array in which each element has nc components (e.g. a structure with nc numeric fields), and you want to transform all of the components at once. Here, istride is nc and idist is 1. For this case, it is natural to want the output to also have nc consecutive components, now of the output data type; this is exactly what rfftwnd does. Specifically, it uses an ostride_t equal to istride, and an odist_t of 1. (Astute readers will realize that some extra buffer space is required in order to perform such a transform; this is handled automatically by rfftwnd.)

The general rule is as follows. ostride_t equals istride. If idist is 1 and idist is less than istride, then odist_t is 1. Otherwise, for a real-to-complex transform odist_t is idist/2 and for a complex-to-real transform odist_t is idist*2.

Destroying a Multi-dimensional Plan

#include <rfftw.h>

void rfftwnd_destroy_plan(rfftwnd_plan plan);

The function rfftwnd_destroy_plan frees the plan plan and releases all the memory associated with it. After destruction, a plan is no longer valid.

What RFFTWND Really Computes

The conventions that we follow for the real multi-dimensional transform are analogous to those for the complex multi-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions (that is, the logical dimensions of the real data). The forward transform is real-to-complex and the backward transform is complex-to-real.

The Gods forbade using HTML to display mathematical formulas. Please see the TeX or Postscript version of this manual for the proper definition of the n-dimensional real Fourier transform that RFFTW uses. For completeness, we include a bitmap of the TeX output below:

Wisdom Reference

Exporting Wisdom

#include <fftw.h>

void fftw_export_wisdom(void (*emitter)(char c, void *), void *data);
void fftw_export_wisdom_to_file(FILE *output_file);
char *fftw_export_wisdom_to_string(void);

These functions allow you to export all currently accumulated wisdom in a form from which it can be later imported and restored, even during a separate run of the program. (See Section Words of Wisdom.) The current store of wisdom is not affected by calling any of these routines.

fftw_export_wisdom exports the wisdom to any output medium, as specified by the callback function emitter. emitter is a putc-like function that writes the character c to some output; its second parameter is the data pointer passed to fftw_export_wisdom. For convenience, the following two "wrapper" routines are provided:

fftw_export_wisdom_to_file writes the wisdom to the current position in output_file, which should be open with write permission. Upon exit, the file remains open and is positioned at the end of the wisdom data.

fftw_export_wisdom_to_string returns a pointer to a NULL-terminated string holding the wisdom data. This string is dynamically allocated, and it is the responsibility of the caller to deallocate it with fftw_free when it is no longer needed.

All of these routines export the wisdom in the same format, which we will not document here except to say that it is LISP-like ASCII text that is insensitive to white space.

Importing Wisdom

#include <fftw.h>

fftw_status fftw_import_wisdom(int (*get_input)(void *), void *data);
fftw_status fftw_import_wisdom_from_file(FILE *input_file);
fftw_status fftw_import_wisdom_from_string(const char *input_string);

These functions import wisdom into a program from data stored by the fftw_export_wisdom functions above. (See Section Words of Wisdom.) The imported wisdom supplements rather than replaces any wisdom already accumulated by the running program (except when there is conflicting wisdom, in which case the existing wisdom is replaced).

fftw_import_wisdom imports wisdom from any input medium, as specified by the callback function get_input. get_input is a getc-like function that returns the next character in the input; its parameter is the data pointer passed to fftw_import_wisdom. If the end of the input data is reached (which should never happen for valid data), it may return either NULL (ASCII 0) or EOF (as defined in <stdio.h>). For convenience, the following two "wrapper" routines are provided:

fftw_import_wisdom_from_file reads wisdom from the current position in input_file, which should be open with read permission. Upon exit, the file remains open and is positioned at the end of the wisdom data.

fftw_import_wisdom_from_string reads wisdom from the NULL-terminated string input_string.

The return value of these routines is FFTW_SUCCESS if the wisdom was read successfully, and FFTW_FAILURE otherwise. Note that, in all of these functions, any data in the input stream past the end of the wisdom data is simply ignored (it is not even read if the wisdom data is well-formed).

Forgetting Wisdom

#include <fftw.h>

void fftw_forget_wisdom(void);

Calling fftw_forget_wisdom causes all accumulated wisdom to be discarded and its associated memory to be freed. (New wisdom can still be gathered subsequently, however.)

Memory Allocator Reference

#include <fftw.h>

void *(*fftw_malloc_hook) (size_t n);
void (*fftw_free_hook) (void *p);

Whenever it has to allocate and release memory, FFTW ordinarily calls malloc and free. If malloc fails, FFTW prints an error message and exits. This behavior may be undesirable in some applications. Also, special memory-handling functions may be necessary in certain environments. Consequently, FFTW provides means by which you can install your own memory allocator and take whatever error-correcting action you find appropriate. The variables fftw_malloc_hook and fftw_free_hook are pointers to functions, and they are normally NULL. If you set those variables to point to other functions, then FFTW will use your routines instead of malloc and free. fftw_malloc_hook must point to a malloc-like function, and fftw_free_hook must point to a free-like function.

Thread safety

Users writing multi-threaded programs must concern themselves with the thread safety of the libraries they use--that is, whether it is safe to call routines in parallel from multiple threads. FFTW can be used in such an environment, but some care must be taken because certain parts of FFTW use private global variables to share data between calls. In particular, the plan-creation functions share trigonometric tables and accumulated wisdom. (Users should note that these comments only apply to programs using shared-memory threads. Parallelism using MPI or forked processes involves a separate address-space and global variables for each process, and is not susceptible to problems of this sort.)

The central restriction of FFTW is that it is not safe to create multiple plans in parallel. You must either create all of your plans from a single thread, or instead use a semaphore, mutex, or other mechanism to ensure that different threads don't attempt to create plans at the same time. The same restriction also holds for destruction of plans and importing/forgetting wisdom. Once created, a plan may safely be used in any thread.

The actual transform routines in FFTW (fftw_one, etcetera) are re-entrant and thread-safe, so it is fine to call them simultaneously from multiple threads. Another question arises, however--is it safe to use the same plan for multiple transforms in parallel? (It would be unsafe if, for example, the plan were modified in some way by the transform.) We address this question by defining an additional planner flag, FFTW_THREADSAFE. When included in the flags for any of the plan-creation routines, FFTW_THREADSAFE guarantees that the resulting plan will be read-only and safe to use in parallel by multiple threads.


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_6.html0000644000175400001440000004466107637531661011025 FFTW - Installation and Customization Go to the first, previous, next, last section, table of contents.


Installation and Customization

This chapter describes the installation and customization of FFTW, the latest version of which may be downloaded from the FFTW home page.

As distributed, FFTW makes very few assumptions about your system. All you need is an ANSI C compiler (gcc is fine, although vendor-provided compilers often produce faster code). However, installation of FFTW is somewhat simpler if you have a Unix or a GNU system, such as Linux. In this chapter, we first describe the installation of FFTW on Unix and non-Unix systems. We then describe how you can customize FFTW to achieve better performance. Specifically, you can I) enable gcc/x86-specific hacks that improve performance on Pentia and PentiumPro's; II) adapt FFTW to use the high-resolution clock of your machine, if any; III) produce code (codelets) to support fast transforms of sizes that are not supported efficiently by the standard FFTW distribution.

Installation on Unix

FFTW comes with a configure program in the GNU style. Installation can be as simple as:

./configure
make
make install

This will build the uniprocessor complex and real transform libraries along with the test programs. We strongly recommend that you use GNU make if it is available; on some systems it is called gmake. The "make install" command installs the fftw and rfftw libraries in standard places, and typically requires root privileges (unless you specify a different install directory with the --prefix flag to configure). You can also type "make check" to put the FFTW test programs through their paces. If you have problems during configuration or compilation, you may want to run "make distclean" before trying again; this ensures that you don't have any stale files left over from previous compilation attempts.

The configure script knows good CFLAGS (C compiler flags) for a few systems. If your system is not known, the configure script will print out a warning. (9) In this case, you can compile FFTW with the command

make CFLAGS="<write your CFLAGS here>"

If you do find an optimal set of CFLAGS for your system, please let us know what they are (along with the output of config.guess) so that we can include them in future releases.

The configure program supports all the standard flags defined by the GNU Coding Standards; see the INSTALL file in FFTW or the GNU web page. Note especially --help to list all flags and --enable-shared to create shared, rather than static, libraries. configure also accepts a few FFTW-specific flags, particularly:

  • --enable-float Produces a single-precision version of FFTW (float) instead of the default double-precision (double). See Section Installing FFTW in both single and double precision.
  • --enable-type-prefix Adds a `d' or `s' prefix to all installed libraries and header files to indicate the floating-point precision. See Section Installing FFTW in both single and double precision. (--enable-type-prefix=<prefix> lets you add an arbitrary prefix.) By default, no prefix is used.
  • --enable-threads Enables compilation and installation of the FFTW threads library (see Section Multi-threaded FFTW), which provides a simple interface to parallel transforms for SMP systems. (By default, the threads routines are not compiled.)
  • --with-openmp, --with-sgimp In conjunction with --enable-threads, causes the multi-threaded FFTW library to use OpenMP or SGI MP compiler directives in order to induce parallelism, rather than spawning its own threads directly. (Useful especially for programs already employing such directives, in order to minimize conflicts between different parallelization mechanisms.)
  • --enable-mpi Enables compilation and installation of the FFTW MPI library (see Section MPI FFTW), which provides parallel transforms for distributed-memory systems with MPI. (By default, the MPI routines are not compiled.)
  • --disable-fortran Disables inclusion of Fortran-callable wrapper routines (see Section Calling FFTW from Fortran) in the standard FFTW libraries. These wrapper routines increase the library size by only a negligible amount, so they are included by default as long as the configure script finds a Fortran compiler on your system.
  • --with-gcc Enables the use of gcc. By default, FFTW uses the vendor-supplied cc compiler if present. Unfortunately, gcc produces slower code than cc on many systems.
  • --enable-i386-hacks See Section gcc and Pentium hacks, below.
  • --enable-pentium-timer See Section gcc and Pentium hacks, below.

To force configure to use a particular C compiler (instead of the default, usually cc), set the environment variable CC to the name of the desired compiler before running configure; you may also need to set the flags via the variable CFLAGS.

Installation on non-Unix Systems

It is quite straightforward to install FFTW even on non-Unix systems lacking the niceties of the configure script. The FFTW Home Page may include some FFTW packages preconfigured for particular systems/compilers, and also contains installation notes sent in by users. All you really need to do, though, is to compile all of the .c files in the appropriate directories of the FFTW package. (You needn't worry about the many extraneous files lying around.)

For the complex transforms, compile all of the .c files in the fftw directory and link them into a library. Similarly, for the real transforms, compile all of the .c files in the rfftw directory into a library. Note that these sources #include various files in the fftw and rfftw directories, so you may need to set up the #include paths for your compiler appropriately. Be sure to enable the highest-possible level of optimization in your compiler.

By default, FFTW is compiled for double-precision transforms. To work in single precision rather than double precision, #define the symbol FFTW_ENABLE_FLOAT in fftw.h (in the fftw directory) and (re)compile FFTW.

These libraries should be linked with any program that uses the corresponding transforms. The required header files, fftw.h and rfftw.h, are located in the fftw and rfftw directories respectively; you may want to put them with the libraries, or wherever header files normally go on your system.

FFTW includes test programs, fftw_test and rfftw_test, in the tests directory. These are compiled and linked like any program using FFTW, except that they use additional header files located in the fftw and rfftw directories, so you will need to set your compiler #include paths appropriately. fftw_test is compiled from fftw_test.c and test_main.c, while rfftw_test is compiled from rfftw_test.c and test_main.c. When you run these programs, you will be prompted interactively for various possible tests to perform; see also tests/README for more information.

Installing FFTW in both single and double precision

It is often useful to install both single- and double-precision versions of the FFTW libraries on the same machine, and we provide a convenient mechanism for achieving this on Unix systems.

When the --enable-type-prefix option of configure is used, the FFTW libraries and header files are installed with a prefix of `d' or `s', depending upon whether you compiled in double or single precision. Then, instead of linking your program with -lrfftw -lfftw, for example, you would link with -ldrfftw -ldfftw to use the double-precision version or with -lsrfftw -lsfftw to use the single-precision version. Also, you would #include <drfftw.h> or <srfftw.h> instead of <rfftw.h>, and so on.

The names of FFTW functions, data types, and constants remain unchanged! You still call, for instance, fftw_one and not dfftw_one. Only the names of header files and libraries are modified. One consequence of this is that you cannot use both the single- and double-precision FFTW libraries in the same program, simultaneously, as the function names would conflict.

So, to install both the single- and double-precision libraries on the same machine, you would do:

./configure --enable-type-prefix [ other options ]
make
make install
make clean
./configure --enable-float --enable-type-prefix [ other options ]
make
make install

gcc and Pentium hacks

The configure option --enable-i386-hacks enables specific optimizations for the Pentium and later x86 CPUs under gcc, which can significantly improve performance of double-precision transforms. Specifically, we have tested these hacks on Linux with gcc 2.[789] and versions of egcs since 1.0.3. These optimizations affect only the performance and not the correctness of FFTW (i.e. it is always safe to try them out).

These hacks provide a workaround to the incorrect alignment of local double variables in gcc. The compiler aligns these variables to multiples of 4 bytes, but execution is much faster (on Pentium and PentiumPro) if doubles are aligned to a multiple of 8 bytes. By carefully counting the number of variables allocated by the compiler in performance-critical regions of the code, we have been able to introduce dummy allocations (using alloca) that align the stack properly. The hack depends crucially on the compiler flags that are used. For example, it won't work without -fomit-frame-pointer.

In principle, these hacks are no longer required under gcc versions 2.95 and later, which automatically align the stack correctly (see -mpreferred-stack-boundary in the gcc manual). However, we have encountered a bug in the stack alignment of versions 2.95.[012] that causes FFTW's stack to be misaligned under some circumstances. The configure script automatically detects this bug and disables gcc's stack alignment in favor of our own hacks when --enable-i386-hacks is used.

The fftw_test program outputs speed measurements that you can use to see if these hacks are beneficial.

The configure option --enable-pentium-timer enables the use of the Pentium and PentiumPro cycle counter for timing purposes. In order to get correct results, you must define FFTW_CYCLES_PER_SEC in fftw/config.h to be the clock speed of your processor; the resulting FFTW library will be nonportable. The use of this option is deprecated. On serious operating systems (such as Linux), FFTW uses gettimeofday(), which has enough resolution and is portable. (Note that Win32 has its own high-resolution timing routines as well. FFTW contains unsupported code to use these routines.)

Customizing the timer

FFTW needs a reasonably-precise clock in order to find the optimal way to compute a transform. On Unix systems, configure looks for gettimeofday and other system-specific timers. If it does not find any high resolution clock, it defaults to using the clock() function, which is very portable, but forces FFTW to run for a long time in order to get reliable measurements.

If your machine supports a high-resolution clock not recognized by FFTW, it is therefore advisable to use it. You must edit fftw/fftw-int.h. There are a few macros you must redefine. The code is documented and should be self-explanatory. (By the way, fftw-int stands for fftw-internal, but for some inexplicable reason people are still using primitive systems with 8.3 filenames.)

Even if you don't install high-resolution timing code, we still recommend that you look at the FFTW_TIME_MIN constant in fftw/fftw-int.h. This constant holds the minimum time interval (in seconds) required to get accurate timing measurements, and should be (at least) several hundred times the resolution of your clock. The default constants are on the conservative side, and may cause FFTW to take longer than necessary when you create a plan. Set FFTW_TIME_MIN to whatever is appropriate on your system (be sure to set the right FFTW_TIME_MIN...there are several definitions in fftw-int.h, corresponding to different platforms and timers).

As an aid in checking the resolution of your clock, you can use the tests/fftw_test program with the -t option (c.f. tests/README). Remember, the mere fact that your clock reports times in, say, picoseconds, does not mean that it is actually accurate to that resolution.

Generating your own code

If you know that you will only use transforms of a certain size (say, powers of 2) and want to reduce the size of the library, you can reconfigure FFTW to support only those sizes you are interested in. You may even generate code to enable efficient transforms of a size not supported by the default distribution. The default distribution supports transforms of any size, but not all sizes are equally fast. The default installation of FFTW is best at handling sizes of the form 2a 3b 5c 7d 11e 13f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine. However, if you have an application that requires fast transforms of size, say, 17, there is a way to generate specialized code to handle that.

The directory gensrc contains all the programs and scripts that were used to generate FFTW. In particular, the program gensrc/genfft.ml was used to generate the code that FFTW uses to compute the transforms. We do not expect casual users to use it. genfft is a rather sophisticated program that generates directed acyclic graphs of FFT algorithms and performs algebraic simplifications on them. genfft is written in Objective Caml, a dialect of ML. Objective Caml is described at http://pauillac.inria.fr/ocaml/ and can be downloaded from from ftp://ftp.inria.fr/lang/caml-light.

If you have Objective Caml installed, you can type sh bootstrap.sh in the top-level directory to re-generate the files. If you change the gensrc/config file, you can optimize FFTW for sizes that are not currently supported efficiently (say, 17 or 19).

We do not provide more details about the code-generation process, since we do not expect that users will need to generate their own code. However, feel free to contact us at fftw@fftw.org if you are interested in the subject.

You might find it interesting to learn Caml and/or some modern programming techniques that we used in the generator (including monadic programming), especially if you heard the rumor that Java and object-oriented programming are the latest advancement in the field. The internal operation of the codelet generator is described in the paper, "A Fast Fourier Transform Compiler," by M. Frigo, which is available from the FFTW home page and will appear in the Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI).


Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_9.html0000644000175400001440000002445007637531661011022 FFTW - Concept Index Go to the first, previous, next, last section, table of contents.


Concept Index

Jump to: a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - w

a

  • algorithm
  • b

  • benchmark, benchmark, benchmark, benchmark
  • blocking
  • c

  • C multi-dimensional arrays
  • Caml, Caml, Caml
  • Cilk, Cilk
  • code generator, code generator
  • column-major, column-major, column-major
  • compiler, compiler, compiler, compiler, compiler, compiler
  • compiler flags, compiler flags
  • complex multi-dimensional transform, complex multi-dimensional transform
  • complex number
  • complex one-dimensional transform
  • complex to real transform, complex to real transform
  • complex transform
  • convolution
  • cyclic convolution
  • d

  • Discrete Fourier Transform, Discrete Fourier Transform, Discrete Fourier Transform, Discrete Fourier Transform, Discrete Fourier Transform
  • distributed array format, distributed array format, distributed array format
  • distributed memory, distributed memory, distributed memory
  • e

  • Ecclesiastes
  • executor
  • f

  • FFTW
  • FFTWND
  • flags, flags, flags, flags, flags, flags, flags, flags
  • floating-point precision, floating-point precision, floating-point precision, floating-point precision, floating-point precision
  • Fortran-callable wrappers, Fortran-callable wrappers, Fortran-callable wrappers
  • frequency, frequency, frequency
  • g

  • girlfriends
  • h

  • halfcomplex array, halfcomplex array, halfcomplex array
  • hermitian array, hermitian array
  • i

  • in-place transform, in-place transform, in-place transform, in-place transform, in-place transform, in-place transform, in-place transform, in-place transform, in-place transform
  • installation
  • l

  • linking on Unix, linking on Unix, linking on Unix, linking on Unix, linking on Unix, linking on Unix
  • LISP, LISP
  • load-balancing
  • m

  • ML
  • monadic programming
  • MPI, MPI, MPI, MPI
  • multi-dimensional transform, multi-dimensional transform, multi-dimensional transform
  • n

  • n_fields, n_fields
  • nerd-readable text
  • normalization, normalization, normalization, normalization, normalization, normalization, normalization, normalization
  • number of threads, number of threads
  • o

  • out-of-place transform
  • p

  • padding, padding, padding
  • parallel transform, parallel transform
  • Pentium hack
  • plan, plan, plan
  • planner
  • power spectrum
  • r

  • rank
  • real multi-dimensional transform, real multi-dimensional transform
  • real number
  • real transform, real transform
  • RFFTW, RFFTW
  • RFFTWND
  • rfftwnd array format, rfftwnd array format, rfftwnd array format, rfftwnd array format, rfftwnd array format
  • row-major, row-major, row-major, row-major
  • s

  • saving plans to disk
  • slab decomposition
  • specific planner
  • stride, stride, stride, stride, stride, stride, stride
  • t

  • thread safety, thread safety
  • threads, threads, threads, threads, threads
  • timer, customization of
  • Tutorial
  • w

  • wisdom, wisdom, wisdom, wisdom, wisdom
  • wisdom, import and export
  • wisdom, problems with

  • Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/fftw_10.html0000644000175400001440000001455107637531661011073 FFTW - Library Index Go to the first, previous, next, last section, table of contents.


    Library Index

    Jump to: f - r

    f

  • fftw
  • fftw2d_create_plan, fftw2d_create_plan
  • fftw2d_create_plan_specific
  • fftw2d_mpi_create_plan
  • fftw3d_create_plan, fftw3d_create_plan
  • fftw3d_create_plan_specific
  • fftw3d_f77_create_plan
  • fftw3d_mpi_create_plan
  • fftw_create_plan, fftw_create_plan
  • fftw_create_plan_specific
  • fftw_destroy_plan
  • fftw_direction
  • fftw_export_wisdom, fftw_export_wisdom
  • fftw_export_wisdom_to_file, fftw_export_wisdom_to_file
  • fftw_export_wisdom_to_string, fftw_export_wisdom_to_string
  • fftw_f77_create_plan
  • fftw_f77_destroy_plan
  • fftw_f77_one, fftw_f77_one
  • fftw_f77_threads_one
  • fftw_forget_wisdom
  • fftw_import_wisdom, fftw_import_wisdom
  • fftw_import_wisdom_from_file, fftw_import_wisdom_from_file
  • fftw_import_wisdom_from_string, fftw_import_wisdom_from_string
  • fftw_malloc
  • fftw_mpi
  • fftw_mpi_create_plan
  • fftw_mpi_destroy_plan
  • fftw_mpi_local_sizes
  • fftw_one, fftw_one
  • fftw_threads
  • fftw_threads_init
  • fftw_threads_one
  • fftwnd, fftwnd
  • fftwnd_create_plan, fftwnd_create_plan
  • fftwnd_create_plan_specific
  • fftwnd_destroy_plan, fftwnd_destroy_plan
  • fftwnd_f77_create_plan
  • fftwnd_f77_destroy_plan
  • fftwnd_f77_one
  • fftwnd_mpi
  • fftwnd_mpi_create_plan
  • fftwnd_mpi_destroy_plan
  • fftwnd_mpi_local_sizes
  • fftwnd_one, fftwnd_one
  • fftwnd_threads
  • fftwnd_threads_one
  • r

  • rfftw
  • rfftw2d_create_plan, rfftw2d_create_plan, rfftw2d_create_plan
  • rfftw2d_f77_create_plan
  • rfftw3d_create_plan, rfftw3d_create_plan
  • rfftw3d_mpi_create_plan
  • rfftw_create_plan, rfftw_create_plan
  • rfftw_create_plan_specific
  • rfftw_destroy_plan, rfftw_destroy_plan
  • rfftw_f77_create_plan
  • rfftw_f77_destroy_plan
  • rfftw_f77_one
  • rfftw_one, rfftw_one
  • rfftw_threads
  • rfftw_threads_one
  • rfftwnd_complex_to_real
  • rfftwnd_create_plan, rfftwnd_create_plan, rfftwnd_create_plan
  • rfftwnd_destroy_plan
  • rfftwnd_f77_destroy_plan
  • rfftwnd_f77_one_real_to_complex
  • rfftwnd_mpi
  • rfftwnd_mpi_destroy_plan
  • rfftwnd_mpi_local_sizes
  • rfftwnd_one_complex_to_real, rfftwnd_one_complex_to_real
  • rfftwnd_one_real_to_complex, rfftwnd_one_real_to_complex
  • rfftwnd_real_to_complex
  • rfftwnd_threads_complex_to_real
  • rfftwnd_threads_one_complex_to_real
  • rfftwnd_threads_one_real_to_complex, rfftwnd_threads_one_real_to_complex
  • rfftwnd_threads_real_to_complex

  • Go to the first, previous, next, last section, table of contents. fftw-2.1.5/doc/equation-4.gif0000644000175400001440000011006607635206026011402 GIF87an4÷ (((040@D@PPP```hlhx|xˆˆˆ” ¤ °°°ÀÀÀÈÌÈè787›ø$ÿôôÿÿ@¿¿L«ôÿ@¿¤d÷`;W @@lö00ÿ¿`ö0>”t >7@ly<öÎ7ÿ¿¤``>£`0a @¨[õÿ¿L «@¤X`0d´P;õ7 ÿ@¿5Õ`TTôÿ@@¿&iX60a@\[d ;0 @@ÌXöõÿÿ¿¿½ÕX]T7@@Ð `57ôÿ¿XLX6õiÿ¿\0ddƒ;; @@@l`4[Ì0Ðt5>XyY6Ψöÿ¿ý >0ÄülGõô ÿÿ¿¿ÕTp@T<÷7_ÿ|õ)ÿ@¿¯±€d|ö;ôÿ ÿ¿@¿r!Ë0dð÷0\tÈ÷>ùÿÿ¿¿|÷)ÿk0{û` €>Ü8)dÈ;ù ÿ@¿šÈcùÿRìöÿ¿)n`9>ÿ¿#ØÈõùÿÿ¿¿|sü£¸@@V¬@¤9ö7ÿ¿ `>d@;öˆµä5÷TW0,n4þH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳçA@ƒ}À AŸ‹5 ¢R…O:H  ƒ…M2ÙA‚­2£f[0+¨fC¦MjTeׯ\½‚%ˆ¶-R¦¨"€@‚sîÆ¹‚ «%8`ÄÄ !#l `+ 4¬Ù£ƒ ˜)9ciÎŽ¥ØYdk‹¥Ë‚üz´gТ JŽ}W¤‹`«Å.xT>ð¸HæÁ 7t®úA¶ýb ¨tÎþÓ´žÑz÷µ©£÷¸~"y‚Ý9†¿êqþAëï{ƒ´|¸À <_J Øv˜"Ç‚î)xŸƒð1èP% “…©'áBî4 …uˆQ‡øA¨{›ù÷€ $È€_`5p€ÐWŒ4^•À,ÀÆU…À@ôõÛ  ÀŒ-p@q06àW€ý–ÀH*ɤ‹0 „cH>ùbqR"@¥€Bþ§%p?2WäoÀ¡y%A‰€b_êHÀ’<2ç$”ÅÅc–K²9èŠ}& ß!Ú¥€pÀwoê¤r?fgÀo“¤À¦4n•§œXV áŸc2Pf€— j sþI*h|Íývç¬ÿ‰å”^Î&ªR¥Àhm™èVÀ*Jjs§®) ¨ZYj²` ;Ú°’nU©qÐ2@íª÷EÚ鶦2+¹4NÊãQ<hí‰ '—䊴¸@j9/’©)@`• Ä×Àp{ tÀ†%0€½åÀÀ™°ÃÒK1¾ú¦&1ÅcüÀÁ#Œ`ŠMü@Ã'k¬p¹€¥„ù2Ç#7r–=ó<Ë+@_Tþ|oA-Ò43íôP$0@,EÖ\[õï¾1#ÇŠØCÛ™ˆ€1æÇŒ„ÑbÏ7Ã)&‹xܺH86gŽ&²c•°FÇ(Fh j¤‘ ÊˆœRЋt¤ŽÓ¨$ }‡FòG„¬ß@š×

    òyTä&ÃI±Ñ„„X)Ç6¶nXFKfÒ‡ â,§È;…Ó 0@¸´Ý Š×2žþ$I”f*2š|À1‡‰Jj2ÀšWP¹ž¹p®è{!§s¶9Êìò×'Ú¶©=:fíUâþCçÝð™Í0Bóžt1g ¥ØMÿ$2œqrN†¢NÅ8pšÃa',‘¤¦Q‡žâëâ7KByo£h+aü¨”$‹*£¯ì'5ÓsR~’¥Ú,€r–¹’Z˜P‘e6¿94#V³§+RX<W™ÔÝŽ?ØA˜4c¹DZÌ2¼œ(O#&R¦²ñ©/‹*ÚŒJU§V8ùih‚6UÀ]ÅqÅc:µê çPö Î[Wù“¹:Ï•þücpò 8¯¾HŸ*5¨C¨A¶BH¬Guè;Ý(ɲò'}=r˜Iå:Jåtѯ€M*sŠçW°R0²›,QìºHÆêÔ„v%[+»×!@ôþmdí‚Ó/^R¦`Y€¸`€_~êEqò”€[AǼ  €X¦Ý÷”a@©À·ÛÞª ÃUî˜ ÝÊ I·Ù²î³ˆ ÞIY÷GØUÕ–»Äè~7RGqî‘´Ë\o‰«IÖoó ÖT¬¼Hªn&Á{÷8/ãMÀÌÊËÛLúô· þÏnÓ3ÜÍGÀ®à_0yªÃôùíoè»$ûJª >o†Ö4 kÀ&0~_tÉÁ÷ÀæÍ$z…Ê_7˜GJsoœ`…¥ØÁ$¶ñ‰oä]ºëÝn‰ d!û¸ÈN^ÒU¨¼cé0Ë0„Ïö€ «V>]þm/Ò½„´Y! ¸ŠxHx#‹ÄyE6òT|Ê;Ϻn6¢Ÿùü“ÀèùÍÑsYLFŸÅ§ hQ£â•g9;"‘&JBh%åÒWÉt 2è>ÃÙÒR.§ériŒ zÏL#’¬E½æZÛúָε®wÍë^ûú×À¶°‡MìbûØÈN¶²—Íìf;ûÙÐŽ¶´§Míj[ûÚØÎ¶¶·Íín{ûÛà·¸ÇMîr›ûÜèN·º×-ìU·ÄÝ쎷¼g¢K8) ÕÙî™r¢oŒLw»Ó-ÉÌ”5–|$Àñˆà´åß|§(ÁýYÊBÛöpÄâN¡-›5N“‰«…ãúIæ2þ½EZ-„2Èc‚ò‹ôehξIÒòtÎ\åø¦Hb€›sÄ™¾'½™Þ&TÉE&'?â™ic| H¤NÞTÄê2Á:ÓÇ(¢gDk)ŠxCr‰äÜ$dO ‚È鷺3;HØ^ˆ=!&¿–âáƒø±#È­r0®Â?DDA|K-G$8ÛÛ¼Ö‹¹›_0±¼EbN$ó¹Åóq<æz’Øý‡«›cäŽ÷ÔkÄdaüMdÏÚ§ÄöÁ½D@4÷Rá­WIU ÃÀ& `É•ò¹£Žä(‚_*UàlEŸâC×WÒïQ›nþÎ~}ê—Í·¨†ÿ" ñHcš~•ƪ*U%|5˜ñ%Vö§_¹šT°~s-ñ†ÿYê÷|»Bp qz7â+[æ,Õ‘^ ñ0VB£’i2Ââxv?ƒò-¼|5B-CøÒ|¹¥+Š"-ÜD'Ýr}Id‚±ã)ø,œò"в,UÒ.ZÍa~À.–õUÊB.€‚*ØwÔ1*H€HH‚È¢€ï‚3#;n<£q1ÀaÌÁAát¡CœÇ4³™óµ3&Å&|õZW±Zø3ZÀ“NâÃ5r(ôS:Q;CÄ5ÀQrÐ7;Â6YÈ{x'þCTô5dVˆ‚¨MІN†0ˆx‡e¨‡ã07ujèH$c“wðt~[ £3s‹óN3¦H57ã3Šá9l#g¡H9Ã:„“3¢“4•#9g3 œ#6;ÓŠ¢”1fó8a£M™ˆŒÚT;X3¨£:BU/@ƒ‡T³]ƒ2«(†¹¨‹YÒ7ªH6ä¸4Åc®÷oÓ"@g⇣õw33^x€%vó4´rL %‹€´Oyc}û8ù”ô8PF !Œø4¥bôÈ3ï¨Tö¨M3S‘#”^q!ÙTâ‘Ç„ŽGÈr9fØÇäþ6 ™Ÿø?¶“R -­V<¼3B¥Gg‚tyxwÖç@äE>ÙO<¤B/SCïãF´Xý“;I•-ÈjÞãB#d•^‚1ywCبCJé”K =å£h>9Afy“G)IiÙOÅS–£”Qh%K±#,ƒ%"idw1óH+0]€’yx33Ã…ðvùtwYàó“1V!9$…™‡ñvb„\1;Ø™y&ƒ9ðoüƒû¦™z š‡É’n7e†–Ùs†¹˜û&’ù¨˜ Q“CIgÕŽH’\{×€2D„_J(V=WñZJ‚0RyW‘äÇ©R¾DW·4QƒþtJÿtD[´ÑIFcDJbJ ryg›»„‘]”×I5¾©z[t=ÇYUTTŸp‰ ï‰`w7ù$L•šªÒ ‡ŠqÂá;ù”v¸93š‡Jd £T‘±ˆ¶); Ê6z–: °à­™¡z2Á¥™vØy  '’¹DiWš@]Ç4¡Ê¡“I%ê‰Á%u>w·ƒ3zýSœ‘çz ð¡IÂ" Õ Õ@Ó¹ÕE65Y0•>Iš3€Å“²¥ç”`ú›z5¦¦¢Dד‹YÚ‰QWú£_#!ë$§Sú£—MWŠ‘HX³CúŸS¢þõ2kZ%Dú°µLˆŠ£*›ÿ@v¡J<‘F™¡ ꨓh}å3,'Å'[.£¡†…*wÖWª£ š$«žç©†$ñ7«#ê$ ñ‰eäXW¡YgQ*ãu#41ÂÚOq `N÷¡7B™tBSúS—TYmeWÙÔY]Zž|µ#½øWgT®ÀAžBÓ¬‰¤£É†Úé†7([>2®>µ¬me¯úÚEÄJ¯á$Pš3C6&ø‚¦{Y à'†Ò…$ù…œÁs÷‹A5Ö`Õa½øOB5&acÂ2„>B¹©›‘±[~Fþ’bD°ÝŠ Û à²V öÕ°”qþò°7û² [ ¹³96~AÆ[@§² ʲAû+Û[ AæŒ!°2õ0§'bqb`žr[^Ò[‹Šw;Jë÷\EeõÕ/1w%Z˜où²Æe+Æ-ÀEe‚‘´C†`c&aá•IIfbñÁaZv¶#¦¶Sv_iË^ú÷d„[#;J”wffx‹e“f\{=&f+`×ÅcäºÝõ°™û#!%6‚h™ögp†•°»á…^@‘¨²‹6iðèhÊãiY¤^g½›j´Vh,ñjmGçh¥f1²gÀ˼ ¦j£þÖg¨¶{•†gØË½¤–½Ój»;!ôjŠöj‹v½”Fjçb½ÒF°A€4ÑÀ9oö; 1÷kk‚Aµµ;Mg±¸¿Œ¿Orvœlèë›ÀìËûÀ<Á\Á|Á¬nƒIÜÁ\„Â",oRÁPtiß‘žÈö"ÊçCºô¿#ÜdÂãAÃÏöWP3!“Û/ï¦Åfo çÓr,k2Ü$"ʼ wE¼Mpájmáq1,Š–s Üuv ½öfÃ:¼Ã8ˆg¶=CÑ… á Ät grá vtI‡0Ò’aÇ,Çe¡Â ¡ul6\þ^á ÐÂz,øQ¿}L†\÷1«rÖÆÒJMw6ÿÒÇA—Åtñ‹Ì›r}2Õ(ÉeV„XBrÞ’rN|ÈH‘:|gDkñÄ?÷|\{Žw¨h†µ»sLËî;"9Ì,•Œñ'-ü§Þq²“13®Œz0l0¤ì0¡{-±]í %ÈwSY}‚ƒ Âz 0's’xÃ|‰Èz£4Íúº¹—˱4Ëè³—QÍ‘LÆ‚WÅŠ•Ï2…Ì ¡Ì¡×Æ'€È¯g#½›ÕÌ{Í+ÑTq=êP-L “[±ÏA"ÆE,ƒí±Ç€P„þùÒ”¼ÒÐËÇéÒ&Û¾ ¨,åÛ†›‚Úáñ‹ ÝŒÁ•kÙÞ’Ù‘Âg±ìÔY»ô};%\![¡©o"( –9t;%Aíý–¤­‰eÁÚ|ßÁ¤à 1$±¢ÓACîc“Èk”Žç¨;sB¡*Y-!ÁëE'ÍÛ<:•ÄÜìíe)CžRÑôaü<ÐÀá(ÞymÏáâNiálF؃Ÿù&œ;ìØ?µaò\NÁÑ­ 5—­¹´žÐ‘>øYeçP”AÏÁ¤°å;&Ο(1õOwì%[Q0UG~}M®×ý탻äB0ÅÜ®¥¯ea¬:…ä ÕáÍu4¹Ÿü2“«qÇqò>ïéô"µÏû^ïºË;¥¯éTÑLfÉúìnï^+[ëÏ^ã—Nú‡&/Eòz(£®ÁŽbÍ„ãM¢ÐWþq%A¡'ï”§ï-­åýÛCãÒ&Ú͘2®Y…‘zÅ®ÎA¯O+Ð"àUñ²LÈá#8ðåòó”.û¸!Öct¶4:°”‡äžZÊ«:“[$^ã²u£Ÿ ²tf(æŽJ!ÓÏb?ÐÓc T6^G"õ†¤v½:¤æn[’· 8/Í#¢|Ÿo÷Õ·Y&±[^fÊ@ÁÎsCç ¡Ì4%†ñ'|mHeOö±ù+Ò¶\ÜÊlöàñ@f€›ëµ‹+e“R^§«I‹ô²${ò§ƒo3q9ú~kY³¨…‹ÏûháØeÅõt"ðt±’UþЛO‰42{å‘aĆ޶aÄ}|5 Àª·~s‚v._!þêû½ÞëÇ‹LGéyæË_{Ð/€¦ÑÝŸþðVüíÛþš¼rÁàÁ@ 8PáB† 6hàPâDŠ-*Tp‘ƒ‹=~¼x`£T@AD… ’4©pš.Ú駘'08°`€Ž@[æDš´áM6eù²¤ÏŸ"©*uÔ(V®]) HH§X¯ÆV[V­Z­W×¾õzîܤ"H` â‚„wóî ‹•¯B¿z:àȱêÀÁtá2}ê4êƒÂ L~{ÙñæŽ2Rþl :°ÒÐPÌYµDÍ«]‹~[g­=Ú–]3ÃäæÞŒøðÍì&ÞQÁäÉ?‡]útêÕ­_Çž]ûvîݽ^üxòå¹;XÐûJóíÝ¿‡ß;ƒ.éÿv¬ æÔ7ʾo  “¯@D0Á®J ¶|m€°P`¨Š@@ÜâŒ'POAG$±Dò€Ųpj‰ÒˆøL¢ küè" FM2H!‡”NŌĪhñÅÑh¤H>€¶×HíG"·ä²K/Aj*2É p‘¡èï«'k”'tþ¬š‚p -¿ä³O?‰`Ì,3OŠHz€Ì‚òhO(/Z€Ñàb`Ž sÏ?7å´ÓøþC²Ð‹H.„dDµ¹¬\èQ‹Hs³G{\hÕ6=Å5W]µ 1JÑЉ@¥†0)Ù~C €I]=4VÇ"U Ë…xbnWm·å69àHÅpƒµ(!3Ú¯#ÀeZ‰=r³_˜É6Z»Å7_}çêí&°24v`U¦‚Ñzs!ãÕ“®õ¬ú"f⛬4À4úqâ}?9dŠ€uijej¸Õ,g/úq¹6TŒ€þb¡…vÉg† 8é…”^ÈèÃÓ€«~dZd«¯¹Äj{Cúe='mΉÌV í¾Ú%k·ß†[5MÚ±Ö²êf;n½÷æ[-ϳ¨4ÒÚnè4®ûF¼åB\R‘‰‹d‘ùþ×Ë*΀ðºËÌâ¾åXeYÇῸ¸Ê°”Ò–JdXShJE.§“UaU*3ÂÍo~²›{e›tym2„›G’f_¢H·vòÑŒ±äayM¶Od2ÖLj"z=p!Àš:HP¡ $P4LÿúEK¡ ’°ójSÑÀE °ÐL\âk5?!¨‘N‘†J 1ššè@ªÐ9«yv¨@bŠå¡™*(+Þ¢oìß kz T‡ûë‘0¥_Tɳ£Ñ•hK·IÎð ›gœU>sºÉ7nõ!ôjáyй^Z¢«â« ©p’g|ÿÌÝ€•øBNÎbÚ {˃V±i[~k~7;º+ògHÞì•[¼6þ–TÊ—<š<«%mJ7sÍR+Œ8lQ A·äˆ%œÕNÝßB)ÌJ©^þõX—¹éÿú3¼æ<ÅdÞî4Ì\¼ô¬kõ$ ·0Ç–¢þ’ý'`W;$'êôYý&óm;a>f ?àQ*2úMj#vrÚé¶¶õà›#K"+xÆô×Ôþ=ñLSP"¿ô…ž¼´){{¹¼á«sÄïö}Ò®kÔk’·/:Øûxͳhë«ï`²{€%Ѐu·Ä LŠ˜>ÉBx²–)f`ñ%öÿ²g}‘‰ôÑ‹ÊXÆè[¥|’Æ ûǤ~:c–˜_¤îEð©úJÔ>“A ?öƒµÞ‘“(@éû‹ ±>zy>XŠ÷s§òÓ9ñK¿t?ì3)ƒÐ$Š¢£òሻ`€ðÜ ˜)î³# Ì$ôc œ@½x¤"ú“¾ûË?Ø¿‡XA,ú¿p BÊøAªx&‡XæC›DQº†H)V)Àöc@Ã@Áú›þ¾Ös–­ Á1q@%J¬D•¹Â-ÁìÂë»Bƒ \ÊB!Ã(Œ¾óû")K@"ܾ„à ÌÁ%ä•~22˜ÙšŠÀŒÿ(uòÃüÒBìš‘ DÖ ŒQD¯ˆDûˆ~™¯ALŒGœ­©š™ÄI¬K¬QdÄOìšF C,›‰H ?TÄÔÄÂáD˜™á*¸6Á Lôõ‘ÅNÔˆ[ùEÂPÅ`äœÓ d4e„5¥À›×ŒFm¡Æ÷¸FêðZB Á‘ÆoG!žp$Çr4ÇsDÇtTÇudÇvtÇw„Çx|åY‹Ý!›§à¤àyŸÚA¥;I>¤þ GúàCy$HnIñ)Eàž8!Ô9G©¼‡H Ë „|ˆª)ÈìT›HsÄâš±‰(SŽŒº#ù°œ fäÈ—ìj!:I‹p òbEô27›óˆ–äI˜Ê9¥–¨'•£ <*¢Dª"b‚*,B%J*¤õ‹ ìÉûã'³ ”I–Jr¥ ™'>‰ì0 c2¦ DKóÐ+¯’¹ø*ªàz­M»ÅÒIŠ€°ªˆí’)Är«ã¬Ø‚Çš½*±<)®‚8\JËÅ$ ó±‹)cÓ0—´H岯(Y? 1ñ²‰ ˜ˮͬK,Tˆj#,©cÌþÔ7Ë^ÛÉe‹OsIU»L‰` ’´ b«4C‹#NûÌ8ãM“ÐÍw)35ÔTÍääC,œË9}ó¹kˆ’Í‚c,Ñ¢ˆ„«¥”óÌ⢱€ÓÎÚ$ͼƒ'€åDOà(>oò½†ð;H+¾×CÎ ;=ñš“’À=€«käãˆî¤9äk€þô—wù- ÎKÏÕ"ü¤:lˆ-ÌÃË(BÊ迲ÁÀ”J2‘3+¹œpš¥°?9»;û˜êKú«Ð=¤—>ÓZ–^i½jtÐ} ODŒŸó`DU„Äœ¼^Ä SôˆHÜá¨Ó"R…ÒmÁþQm|Æ(µÒ«ñFîØÆ'½Ò.%LjôÒ0Ó1%Ó25Ó3EÓ4UÓ5eÓ6uÓ7…Ó8•Ó9¥Ó:µÓ;ÅÓ<ÕÓ=åÓ>õÓ?Ô@ÔA%ÔB5ÔCEÔDUÔEeÔFuÔG…ÔH•ÔI¥ÔJµÔK•œó¤ÛÂÔKu€¢ˆOýÈÕÕNÔô1>À!TÈ) V͉Q5U;%@„X€¬Fa©U“Oå´Ä°Õ•Ì`U?µ“1¹'‚¡:e‰aIV³gL»sVŽñŠh½§ý9¦kÕ“cýSÜ„øIÇ›N×—°Yý8tm€R±Ì¯W?5N¢@ÓH öÀÖDþ±W ‘OU 0uU~E—°9€Õ×yÍSÅèQÿÓÔà NbÈr- †Áe1€SØåØŽõØ’)š Ù’šíD¡ €’eÙ“½ Ù•eY’uÙ¸±W$äRœ•ˆ›už-›œT9U;€&”¡™“1Z¿€¡UZ›=›µÈVV¥Zp泈bE ­­®…‹¬ýI°½š3²M-ÅæHè0Û³UGÑXñ`Їõ¡¹Úh š)±ˆ)‰¼½[¬€Û™Û쩇HìT A\zI¬y,\Ãm\Öó” ¨ 4"Œœ@[µ@Ž[}Ù‹H€bÙ\]þâ]M§ÈGʽ\ZTHâ¨ϵe1& ñ “! öc ¥]F±]_ö^Õè]±]…%Ý«åò1Œ€•¹ëêÝQëí´·³ÅEŠíMïM\è{H}Ý%„ãÞ‰@€óåŒô•ˆ̉teV„³‰øUŠý Ö 3Žû%ŽtåVÁ .B›„ Ö "ÚíißϽˆÓ(¯``¼|NѪᛆÝVŠiª¦‰ Šˆ{á V×áà`³ˆ×D‰ˆúPßЙ¡ &` R`°[I¬ááð[¬¸InÔ*ºí÷UÈÔ°-f¢ÐW"Ž‘„ÍÅþÝ!Æ(z1ØÕY—“øU2îú ]ÒbE›‹Óíb†)Ýáã´¡ÊF ¾õUàhc ¦DÂ@ ’ŒB¦ ¢þ¸ ¦Aéc#îÅqë'(Ê ùcÊÀظ¿ ,ÞQÌ÷飿 I ® ¤áäN~Ù- PÞ_¯MŠ»4·°8‰Ÿ² ŽbdºHeÝŠ°R6µe&{ŽZöarô°S&/~šìôeÊ`bº“D¤Å˜‹ iå$€ef-Èj Uæ´ÉLÓ2@]í¡\Ô¥1îIlžŒc6Љãç•Ú4!Ds† ~Dág®"tV u.ÈËâeÊPºRþæ2>UÞŒmˆŸÒä²°+æ[t)쳎èn\ †d ±м}væZZ€> ª€­Ê°²ÐèÔfov„&é2Ã,Ž$æ%GSc“ðÄo¥—–£B"^æð ºÓd‚édOî©¡eK^ ŸÎžë´æZavµ™¾¢iÕX ÁéTÞW(ª Pˆ£F"Šv«V䣩èpô¼z–(3”ý ëÔÐÿu盘³ k °=ᭀ抔ô º»î[ü´åòí(9©¹ð{û ÐcçÂfkÀþ_¸ŽM ùY“,èˆ8ÇfÅ$¤äP”Ʀ 6ɰº{ vÖœþ$ü›¢NÜÝ×O3Z0m)Vˆ5è¥IšƒqíÒ¶Ú˜d¹NvõÃ:à Ñm$åQ5^а–Ù~€r“ mÂ’>Ù^Zå~¡Û¾»•Å.š ¤– ëÎJ-9kânìF8ņ „6òÅ aA›¨˜XQi‹Xï*2ØÁÀm€<©¯ÕˆûæÒoôÅŠò]=s]¢Ðsj«""pùfåHö‰—~Îõ w*hºpp ±m FG¾>Œ|й"£’¼¸È4¡èW /œ¹l‹ˆ+‹øn¸XñŠhq¤ ž˜ ”X»™¼¸š8 Ïñ˜ˆM·2œi1ZùÎåsÔþðÓÔ,Í 'ØŸCf¯PЬ£¬µ¡*¯ž+Gª·Ðò‚ãr µ ¼€`•ë 2œ®hŒÊ¸–MœrÖàði!Ù   r´\§ŽÞ ó‘>Ù?ôŸ|5@'tA,BGtCg˜ÆB[&u GÇÂ>’ííýÔÈÀô§€œKÏôLi8ïtOÙQ'õR7õSGõTWõUן Õa^"?üÔOÿÙÛ€uVOS•¾‘ÞÛÙ®¡Á®VØudÂõ4]ÛÈšT¹ˆÄ#eçŠcGöŸPôboÐÃÝ]|¢]ýHöÊ;Üá­¤lÿÏVóÈ]ÞNR–Œwí¦v(}WàߑÞv‡hwýþ­êx/‹vWÂI÷uOS‹¥ÞÅÚþ¼ù5 sO–€—öµ€þös'/ç÷3Íì{uEìã@‡Èl U‹OrŒg©)®xöëøˆ_L%®¢:ööâ@.—µ0yCÎØ„$ù2Md*'öܨù™×ùçùž÷ùŸú ú¡'ú¢7ú£Gú¤Wú¥gú¦wú§‡ú¨—ú©§úª·ú«Çúp”Ø¡IWÉËMŠËzü‰Ñ¸䱑Ð6ûjµ÷’·Ç ÀíRDû»¯{ÜYC yˆžZsyÀMç=ŸèU ç¡õà`ŸÀ˘—Çç Éç ŒÄȲ |Çoá²g þ‚|•—ÊOÒúQw±ÂÎË—yÓÿåéø¢Û:"ª®Äÿ~æèÊvj»ç½³/rª<Ø×TÖ}ñÐóÖk¯(ºÕ ÒçýÝýÎ6þéøÇÛ !ûd‹iOøž;“T0ûIàŽÿÿ$Å~êpöìy¹÷)ÿêñ!æßYæ?ÿYJɰÒŒ¤ä¢tê"¥,§~á¦5 8xð`Á(pP€€ R| 0Š <À`cG`4¨ á‚(+t@a‘,+6x  Bu.lØ %‚"OH¹2@‡,/fœ™s'ƒS"TÈP©E#Ndþ¨Ð¤@Z½|*T*‚”jžÄy@§PƒH8$ 4®Yž`KšÔ:S¨ÙÞ´Èñ$ƒ¼Q§$»¢Äž_™–}+xæ\‡DUŒV­gÆkmâ„<$âÍ*‹Î,k:ëå‘|si7skŠ´#ÃŽ;º-K»#úý}SñÖÈvwwd½27ôèÒs3 Sc€‰8ðsÁ–|P@m¿ lXñ€€‚ ¼ËUÏ^%V–20@ÑÀ À Hà~*ùW r}5S,0tÝ}Þ  _XÇyÇ ƒhÞL öך†èaAé•u_Víå'£yþMàŽnøÐ‹8`áA¶ø‰"Ö×Rˆæ¥täv©¸ `­)’D‚gúè"wB.‰_E8N)×Q–y¢R4˜áWP dyrÒ©%†îý —n–ža©æ™dæ&clJ¨ rGß–,áX€ŽBžœ6–Y\ ~Â9¨¡BWÝu}5ÆÞo>ÀO! ª†¦.t£ T•³jÚ媒ªÀVÔkk‰ù S F—*E¬[]³"½JQ¬ kX 8 Ö°¾WQ®Õ•÷a¸4æÊh•  ‘_¿–;.Cª:[îÙn+ë´h>K#±¹þ ®_Ð2+åþOË*®”2›_¸ÞL£«ÞklA¾›ðÃðìl­ÁZ[ñ¢XÑۘÆZ©•½Üæ†nÀ¨ÊÛ*»­+ëÆûî*«É«$*Ï=ÏZªÍlØQy"Š|ßȵbßÃ7÷ÓN3ÊQ?@Э7Ð7òª"ݪÑ}Xï," ÛÔ߯¬+Æ`/ °JÅùkwËÑvM´Íæ¥=™_c›ÄØTGýïÛÐî ˧FK3÷Ý4„Sd¶ÅycÜwØ‹¦4K˜‡œ8¿“›üWà–/¹ãžmªÕ¹zÞwãN‹î3îÒ‘ºTÞäÇ’ïØQî…¾™´fÁàpÅùÊþÀòÅf¥Ðï›[ð¼;Žqö‚öE}Y®© =óÚÃ6çsSX¥Xo»«yØÝ“~øÅveßä‹xÓò; ö‡ŠEIˆ¬p8ä+ÀúڵòDOéùÈéeÄÀP$¿cÉÖÆ«™e¨dИ Ûó 'ÞP-¬¹¡RŽH¡ùÅMˆoãáÙªÔ€´ Gï; uf(+¢Ê‹) §‚ 1‘6“cO×@|±FK üºØnqþ‘Œèã\©˜€‚ Ñ‡Old½NÄ’JÒ.ŒLä$êTbÇL¶”2”äëj´Æ6L’}3eq@ùL¾°–W@2F€ XˆÀø§i |bb€¦$s™Í|&K0€, =QÀ"â«pF›Üôæ 5¹”àr˜¹Ùˆ0ÂKüòqÁ<æ{4Ù0$›ÛìfDJµ€yúRmÖ¬&; °­y®› PLº¨í¡%è/=’Ð` Dž½Ìè>ûiQ“Ÿ¥§Ú`N€…¡Ä(0áÙQpŠÓ£(Õ(3ÃK9“±èJ½yÒ‚þŒüDÖ49ÔŒZS§5èFeJ¡žf„¦Em& @Eš«lk6kZÛ|v&u,îPË×ÕRäµ­`3ÛWÖfsQ¯s§b¥cÛÚJGµà‚myuÛn©48Ë-rßóÜÝR·º­a”u}†€¬e{S)¹ÛÝñ’·¼æ=¯¨¶{6ôBG½kS'{_óºw¾öõMá{_W½eºþÔ5@B¨9“ªd¿>0‚çK`ÿÒ·¿­}•™`ê.x¾pZï Ùè$Ãþ0ˆƒkᇸÄ51ŠS¬â³¸Å.~1Œc,ãÓ¸Æ6¾1ŽsÜÝ|Æ‚0uy¬ã!÷õÇD>2’k,L D K q{Fbó&wU³¥×®3!<¹Çݲ†‰Üa+K‘W‰•1á›æÇ" &}]óšI»[0xÉ^c0‚ÐfÇ98@ÆÝ¶˜ 3pjK%×±iâ,û"šWeæY  0èmVìÏs^ô„cMÛæA^n‰Õ¢ã€Ps‡Ôbãžh¦Úmñ¥Oõ x™Óþv@u¨—˜9¡Ø%Ú|¢LZÝš`ȺB{Ï{J…gŠ,»º­í'_}Ãd³·Ùæµ¶ŠoÛOT͘ïtõ·C ª*Á–¯lM| BK'€Àe¶ 9[ÞË&ಠ&w`3Ç+KãN‡­š¬.u íZú»=¯ x’.*h«K¡á·«ýÈÁêž›%jZQn¸íî/û.Ñ/¼¬ß}a‰3@dà&¯K`´€Äã&A€Ë©Ûrê<ºg)ÏÐÊeR’ ØÜ0ÕÎbÝ™Û7è='øÏiÎ ýd—á¶o¤çµâæ/ …º^PƒpDÀßÔ ¯êE‡è ÷„þñëDh0¤¹þKGeÓ”ªô+U'Ìg±®0‚Zü5€¹Ìm’²ÛM„"ùHjn’(~ÇŒWºxn%ùÉלðÀÕ¥Z€Š=wˆo¼F4Ïù ?~¾™¿Õèß\zGk¤ìƒÒÊxÊCvÙU*I(â`ìE¤–.é·Pû·ÕLýªOkõÓ)y1Ë.z•t>TûI {)ƒü÷)޶f{‡ài&¹wΊ(²×SK+g¾=_×Óy]fdã¡j¿ÈÉ ȧ_YE”ÖX æÓ„Ÿþ÷ÿę̈d„þMÓt4Àÿý_* `|àîñ_m% VvZ¨ÐK¾øˆ©¨K̤L¸e`¬ `I]»þ§¸òYŽJHÚt8 —@ t\€ŒÚËàwÈD¿”àöxàÆ¬bˆÄŠÜ ŒÄ_ÏhŸá ÆV-„pQ‘TÄ\¼5!ÔõÄn)áý1!E0QcJB|á͇Q®—a‚aõŒá`¤áy¹aþ)[PHʆa65!wÔáÀI½ŽE VÄNêÌU(¢9ÍÓT Þ„_ÄÜP±G ™JÇð–ò[n\–‡4Äд…©ž\“ë°" âʘÜÉŽêð•Ádáj¼–ÄÝÐ0‘]y%ĆéžFÞäQ ˆ]{èœRØP¯Ôb¨ðbc)cþãX,ÄDè¢Ï0c."án=ccD#EP#Ï0#*¦D–]©”P$—UÉýÌ v½šÁÞïµÆÅ!¯ ÝÊÜ¢š7²4:!îØ.ù:6Fæg*@h‚ÞZeÔ=-ÈIÄDÉUBÀQÑ#CÁ>Y9XyÄI5§SøÇF<mÕ¦@XÙt´›Èý&X˜§njMB%€¬ÏDQÈ@ÅÓv"3ñãt¶••”sò]6uLGYI§hZ­–Û—i§Iìƒ6†C|ä/îb°‰XþÍK,hE¼Îj9hîþ4¨:™%ϸ“‡Jè§ÄÛ«MèW(ÏÈ–s5—q… Œr˜gÙ“½i!@K‚ ­¥–ˆñ(rÒh*¡Öp FbqGnuKtÔhtÊŒš×Öm¨¤4©Hp‹¬áN–ZœÇá é M)ºe—Ûl©Ÿue])µdã¸u©„™››~©ÂU×–y×€™ÄĺuWž2ÀžÎi‹‰)w\ ¾)=B¯„&J‡¡vx(€|€© *³ªVˆ¥–¿ÑF¢Ö§žH£ºP¨ÒÜ£b›£nH¤êÚ©‚C¸¨-i”ª¶Ø3J*ˆ9Vó˜i6æÒ¬†®Rׯ6„®öjy5Ê]*±&«þ².+³6«³>+´F«´N+µV«µ^+¶f«¶n+·v«·~ku ¸Žk“f™n8Ù™&XŸ¥ëi¥õ?}غ¦éB EÏÌkc,ªI$Db +Sî–hi–œ]”U„ªe— D‘ê«ç1,¨è™›%™Ã¦Öz¸ IPEâ‹«©QŸÆê³uì| ›Ç~ɲdx4@nNÇÉV±}#… @,j©¼l-%^ÉÑ|¨š@”\™M©µh_áÚ~ð8©“Í–×Òî–¯¥ZÂÙjtH[{PÇÄ®W_‘œ¾"‹2²×¯Äë‡uí½ÊÄ;N‡-”~‹tŠ ² mî§±\žïˆþ–TGM©XlvÀuǹíx®¹Áž©®XÉÉÜ¢MÖ›ém¿©æÂ±N‚‰mä:î¤2îýþÈ…&nu%jr5ÞlÚí¾žß– YΘäön¨J„FÁ®Zà]rœÆa|ÓJœ?;óüœ¢4×yÐtÄi6‹¢"²DLˆ{<ˆP«›J·G#ö´×L“Zí(‘V¸NM‹ÛM·„i ™tËêófçèF °af…â Z.%ÄCƒþÎò2âå,u³p°]Î3I;5ߌ L׈L÷M_kÏ_—­Ï¨ã9R5P…v±¨lóĶnÔϵãÍÈ:JœDCŒ3‘ã($N“fÿôö¼Qùa»³BÌ쉜6»0p½4µÿ¨£òNõÒ4A6µùdu½¾GüNm'ý˜cV[‹iRPåæ|È.®JfÂõBäa·Æ[7õ E½6;2äv×öX¶WæÎa6ä^‘-??¡R½Ò;b’HèË()’(µ÷Îp¥%Á#µ\å)OoÃ’ãüe¾© Mw/`ú‹XŽ÷°@FDHyì¥AÐRmþ±Ñ˜øaæ%X{ô¸÷È3ó6D¢â¥‚ã7àl£-Ž5E ô…SÈ™ùÒÒxDчµèÂÙ£IJãô™7tp2ô0Ð(¢÷‡¸Í”w•èwÓ”÷V fj£"•R hSÕÕAIÕ``“U\Vé¡EæJï~ì§QA›Z-çÅÖÂEI‘EÕU*ÝÕ€ò'͉/Q“—×g܇2%TsÕ?yS˜C}åZzXaUnÈ9t’T<™Õ.-Yvz$DL¼1Å“sÆ•ZkºÇp„OMÆ|^zGá9DQºI h‘®Ƶ§JHÓƒNPø©ªéÒhÕÜÉÕþbbgM%ú}BºS(&|ÌÔ¹–'ÔP¬z]YúHYç>Utª¹nT§¾¹âúL”܎ݹo—Ó.i‡¢;t½Út¡V¯k_%š“–r1)M$©FV¨,Mܨ¸“¼c–’Ê»/\½3—¿v¨|ÀaÁÛûº¼¨,0„E!rÁv1Rב>w|9iK¨»s—Ç,}Ñõ}ÕW™ëtT9‹™<Ê»¥òË·|z9X‚U˜n\m¶æWټ̳ØË×Ï÷ÿÄÝîÔ‹ë×H¹Y¬¢WÝÞµE4ÈІ>ð'³“¾š~ç¯†å† æ›OŒñ`þLY æRn¬&Xèò¾ç¿öß'S-òz¯úôûÉ®`6³ ù^ËÁŸðcp?“L#iB’î«À3ܰCº>$ ¶·@|ñA²ˆ‘Cã’Š‹¤jqÄW$ ¬¢2į½èúZOÊ)©¬ÒÊ+±,êIÄ*`0‰–«(9‰©áÀRGÕ¼«àÍÄׄpº/qrqÀÜÈÊÍ/¹ÊHÑ.l³Qú¦ƒH¤ÚsQÀ¤›ì0/ÂI'¢„iD ¯,aUÖYiÅrK²¸2àU(ÑPþ8"€P¼è )Pº„þt«ÂhÃ9 <’G¿^=r³Â6²MWѼ”W_}5*EbêµÂp¼VC·=©[K¥PÝD R.øö\ÐfÚíUC%‹ 3rµÖƒNXá…‘ºŸàÕFÔ¬,¡wŠ´-r]ìŽ@Òx§X²²bãMHâ×.m³²U‹9E6¶À¹p ãìX½ùf‹u¦k@˜ßŠù'Àà ^¡/ä‘h—Câ É2α­Š¥sk×n;:•£ÂÀ:S²$ À-âN[íµÙ."|­¾‘PÊÙ­X`Ê`.à ð›+d '…òÉ»Àÿn@:˜§š¤þ ÈùQUýN€q„ ÈJñÊ!²{s:Ï)®f1à°º€nôÒñÖ›o6/-. @HÂ}oÃiœô¬N¯wôÐ[?‰w–^÷üïŠçªÞàš?ÃH‡É÷Ù'ëî‹+j'† @®òE‚nÒ¶Ùoßý÷•ÊèÔIj@1¯©jÀ¾¢–Lê>úú…%úþøw?ñØO!$I˜.‚,:޲2V$“0Ðø¹ `82œ¦+#„ß Q˜B®…-DÑq$Ǔ텄'rá q˜Cî‡Vš^Ĉ²;Ãø¯ ¡X {˜D%.‘‰MÜa\H•œmȉU´þⱘE-n‘‹]ôâÁF1Ž‘Œe4ãјF5®‘mtãáG9ΑŽu´ãñ˜G=î‘}ôãAµ …4ä”@(„tÄmšcßÞ6c‡d’O¹z%èdioQZÝBH¨”JÌ Yä‘)i'Š?A›³ÔK)¢Í‡´\!+&“`“ €'¡ÂÀõ8˜&aˆ…"Ù $“<Ž# ˜9² R%ù Ê”„L“EJž²F£B6`}ëyO/MB1º <ça§UÔ‰¥x¶pž´"@Ž‚UL« šNA7ÇÃOqÉE8¢DJAÓÃ5r"åŸæ¨þAÏs+N-EloᦥÔC Qh¨4,©²3*‰4…$ÅêcÌ~R¡Si'zZJ”|MÎzMIPzÎT–ä¥ðLé•$:P¦x CÅhzvT“²m©êiêûžJ¥ük3 ÑÈ×’–3‡d¤/[HC¿Ö-›˜ª I‹˜Y7€ƒ(˪ÐTª<•±F*®ªiIÀSØ$Ü©ëU¢² #YMšYNòWˆÄõ!|M€õš–Öµ.œŠ¥ˆî*9‚ ÄO aˆ[)«ª¬^„«+5JP92WÁé&Jéè8U¾žJµJu‰>KÒ€™ì´TŠšh-²Õ«¦ö&‡£Hpþ¢Ùßvå³9®V{[íÔ³¥ªn%ŸKÚá¢D%`ÍOm`V‘,r'|J$’³ˆàäbÒìFÐj’­Œ÷0h t{ɎФ&ŨRV…ÛËèd¦rŠ™[Nó¦å(G°ÌÁH  Õxt7›p°(<™Þ„„Áîy|lÔÓ·Ç/ v¦pÜb…„*WhA€–D3](8>Ž—T£5e•BF1@/qŒ˜Çg]»ÍŽ‹8wiÃÖ‚ïÚ°v¥99êQ€Î¢$G1ͱNcˆÒ-³73_vÈÄ8ˆé2cƲWÙ 2–ÁÍd6#çÂ@è9Å"JlPþza<‡è15Ö —9 Û|YD‰ñJ†ÅLÞ¨æ0“öM¤ý¢ðeRgÂt`6Ù(97{£ÍŠá\•îLyHQÊ¿^C—H ‹$¢ö Zd|4’ü’Ä;¡un\Ýk’ä:XÒûZ…%=æ`%ó×­:ö­a]“|ª2QuIÓ³<ìøä(Û©ò°=Iì° ;Úð ‘²™n£97\7µbV§ 6Iv¹²Rýöß6m«Þ„4u7F=Vß4ZtqNÕïKùhFÊÑZöo?Ë·[Ù¬Q’n'ŽMÊ6 § *qñŸ"÷4hŒrSˆ:K:ÒÅÃpÐäè§RéŽGÿyþÍbç“ÜT(GT—ÏT9vr5'ÊÏ…3ka½ªYáëkP™(5{'%+ÉÏЭðJèÀ @õ’Ùqæ ê\gz­£4€(-ŸUO&Ö·þKp#›9Xõ`’tmŸ}îÐ̼7:RIÄgHJEc«"µ ž¬ÙÓNW…p–¼)NŒjÁ™†) —êpGzTgmSNEüñç iD, iÞgc =ž¥[PHË‹¥>5÷Ù3'!+ÖžRß=?1>öRN ±šÛú翆NKÇÅÏqñçÝé¬F€Ò?[[IÓÇ;Óu‚õD¶¥9ý5?Y"Ñ•S ŸgJ~JÜÝþô#¦·ÂzÒŒRPŒÐŸçY§¢ÿ9Bí²©&ÚE ²¯Ö<,€š¯/º)n…bàM† )´#7DLG®]ÄÅ\-cdM9ô§Y· ®N¦EÏ.æ¥B40ÔÖD_:ФH0Ú ¢[R†cð…g¨ 2 -£ðÚÄ„|ìÕ|jޤ[PÐ*z"&¸Â•§+~ªù¾¦iÖ¡†ì@C¬®4¤¡¨° DŒà¢ã!h§[€cj'HcU$M3Ø01F‚l~â:Büpg.£!  6Œ¥ L ‹*,º…àÚp$ZŠŸ(â$ñ k,ñ7ƒÖ"Q)nþeXV†‘@åÄå¼zfËr$6>±¯2(Ö¼P¯@âÇ’oƒÂðd:&ó4.ÑÅÞ^ÆhffÄÖkÈΤÎÄdz4jfO¦eæv-hB‚kTñ=\dqÆ-,¥Sêì4¦Š&,umÄžfp b^brÂǸ.gx*çyb-å'.',Ѝ!æB-$àÒéq¾&Hª'öG«¼b„¤®Yæ±(Hcëz$ïÚB;~Ieò%“ò!àîQeÆ¢ !Ò"R' ˆ§³œ)ÿø ¢ƒò G’s¼#Šˆt²iàâ#éÑs:§q‡t.prž'wnœÂçnþø1ˆ$xðaZiÄà±"D£(‰b{€g' _^BÅL‚r,'+"§yây@§n†,£‡ƒŽu\Gx`'o~g"§(r(ÔòkØÒy¼CB°'%Ð’n¤2C nX*ugyÌÐp È-ùFEšr×M.ÀòÓ´-Î2tÄžB()²-ÃX俦E@S4ë,:h)z • è4?3)NÅkV“›þ§"") *6ó¯& j3³$„ JŠJƒ›8hšb7;è7‚7cB7(~h)BH9‘CƒšÓ)†“)®Ó¢\ó˜‚~*¯FóJÔn‰@«}êг<îV±ÄˆþbzR‰ Ñ}”-=ís” §1c…PÀê>F:†Õüs@s9 ô@4AtA´AôŒ¦H‡„Â3Ô…8Ä@Fœì—’ˆ”LÉ¡2 "<Ë2i÷ºÓ–Ê@«‚D«$‘àñ*p‰C«d é¿Xô£ÐæÅ¢B}ÔYh”©JåC)4*ê)=ŠI;œÚbIÈë™~’I¢=ÌÍvZ”QȃtzD?‰Â‘Ž¢Jfåðf†FtLŽtJ€„2‚•Š!ªO=ÎÉ1Ÿ‚W<¥>«WÎTm¾)-4´<¢ cñŠ4<ÊE»VhzBŠº¨‚Á¨'ImD£”ÂPs CbÑ(þU©0OFKÅ´Ò¯˜C@S :oJ$õS/UYÆe’þô`5S]‹Qe”L©„¨úó- õ„u*ZÕ)öì-ê°N§tÅR›¢W™âòª‚œ´""`tJT bK †J’ Z™BŹŒÆ}lVGÆ¿¤¶²K¸@‹\+¿ Ãp”E¹lë!"½ú«ñŽâµ<êIÀ%œ"_¹Ô<øµ(vÕ(æ+iê‹hîK¿j ½Øk^ÕF¦íÒ).<5&ôuNu¥HÏQ(p )ÿ¦­k½žÔ@Ü«ëÕY§’H[£CZ):‚õ*tK HCe½‰EX€ô¿ˆ‹^åkdVw@¶ þ|­âK`óR<í.’ö7†H8T2Õ˜–cèì´ú 5(mi‘"ËÊä4obE7¬¤k­T):íAPÂ]ÕôÐjWkOOñ$©›Bl»“—’4ùˆ„%B4VImÐØ6Š0­ÂX‚Déi˜‚fõñ(V%W¥iN$hnuWÏgd`Ã%Io÷rÏg8åÄ (dW&_eµ\BBk¼VFkJ7Ë„BH>hõ¸M"¸$f0 “Ón¡óÛˆâC:¸~¸†fvñ…cl§öP†QŸgûvb’fˆ£N’Ѝ}Yv7fx*"B¼æ=«GK±eR¯JO‡‡ðŠy.€‚Åã u°¼l‘GÀx7kÜ:£ŸˆÐgÀ`iã¥B–}wM)ØwÓbJä8$z1„p$’ÐÁxßhõkÆtCâb“"7ø((l$fF YV[þä]h•Ãe©‹º ÀXדøi’˜* ¥0p6XF99§x ¹ÁE!™ƒðÉŠ´5L<ÆÑ6ryŒ#d—c7ábËä}fKƒQ)d©C§T8Š–YÒ”ejL–TTE¥y'žÙ#7C“W¸ÑQ½Åõö|Äùè,•Gµ“â™…6“J>F®8‚P‚1ù6V—‘Fih™1·Ò\€VÇ)ƒ®ÙFu¸yšc¨š%ç é·ÂL[U”WÙ–Ée£®•{„R(÷w¥²vÈ’0î2,½Ã2Qú †ÇLø±2GF1ÙÕ0Y)û™’'H¨ þ££$ªçèNco†íƒó¢œrãU‚ºêT† 6 yƒ†£ã1''¥oZˆbï¤å-ÎÖ:!ʧÍ-€#•eæ%¤FˆS..ëò06µh.¢vF&¡ou'`Òq±'¾îp–ÚB¼Ç‹û:©M©'#/û*µãÅH [ [\n'wœ+¥%ó2së­sÆ0±€,›1q7§—q™8]4GSëP è(²s|§âI?ñ§ $;¸ÆY" “‚ÕVF_5CeH,‰_:ŠEóu¤½‰kd}šÂKQ%·ºÑ\4µ±Ó@m‚H^íYïÖµ®Â¶K{r}H8ŸÓ6¿4Àµ¶‰pñ¯þ„̦¨æ=(†+ÖuˆXÆ*ÖÛ¼¥f#Lô*…„‚”JåFéÛ‚ø8KÃòŠlxšéø*úUq¨=EÑAÂq’‡qOƒˆªÂÂkÂ0zé4Aò80~ö›¿û4·4<†×øN¼…dËð’ôÃ¥ÂÅMr¼†?eœØ÷”›Ç­DÇ3(ÁsˆÇÑsjRiÜ7/Z5$³Ý½¶ÛEÈTÝ£â[yº‡*è½Þ±üq=<ËÆ»\1âª.+jäB¹Öµµ2h¶êG\ÅXgdi']µ ´Æ«3Øu¹„^ÃBâ+)åX‹IuÖ¼&çã+ÜÕã/>g–á­ø‚¾ 0й,¾µ*þà%‚hŠV©þŽVßKèËÿõJ~~ló|çõ=cí‘<‚>‘!çè‘¶b«Äè7Öøœþ…º>˜^*ô¬i„åp6Š£ð®çÍ2·§.W6–ÖÒ#ë -Þ 7ëíÅ@DíWw=Ofj[ÒÖmØÒŒÊ îÛYîEÓÄZkùƒ„èV)ŸJߊ­’º%ŸHHñ¿ §~åœ<_©2_o£þ):?=ðVó÷ö*FW»¼^YWã^NC~ì1Þò÷¡W|3.óciH„|ÇØÖ§+výw==ö½–÷m¦ö+ wzÍ8ø}æäÄÚ ðçI­wѶxkbÄI_û™KU§Ýµ¸þÞ·WÝ¢$ØåG›®ßw%©UÌ?µ¸¿~ÔýåKû…w=Ê7<éxs«þ‚ƒ *`ð @ƒ‚(xÀà@Á‰+Z¬¨@A @˜qcG‚øà@‹)W< ±À4 ¤bG™4Øl91'GäTT#Ä`T:”åK—…ŽŒØT)Ћ9Kž”:5©ÈZ û.AR‚}°@A ((ZA€r‚ ñaw7Fz©ÙÕŽ}~`}Œ«_»ß[àZå4 NãÕžR pÐa™É¤ÙhT‰ÆR+‘fTyÍU¦a` hÅE€bŠ)R¦Ú„lWTˆiT†$ã6Z¸*à¡o!þäº4"D%i$ŽT1Àd‰MZôÜÑå¤ÀH̶å¬ÄbAxGÐLuö@gÅ¥Ó™©¹•}m¦'ç—vÇ]Ÿ=ô™Ud'Joå¹§—`R©Q—)1æçþEÊ9Trp*øg ¥ špöyèy†Þ™P‘ÕUUtb ÷§hVTÀŸßi·ê›®¦éj³ÆYfèFæRSBDªQ¦žJºþ¥Ý޶úÚD¸~w¬n ‘ÌN ë¬¶Ž¦­«ÏKPSÒîª@¯ÖêÊëd¿V´@üeÀI`a,0¯¨%J |ìD¥%€•AèVmAí¾Ë@¼)p0MF ÀO Ã+ïô2°p_ÿ2PWÇ Ü»€ž]ÜðI€&E‡ì.ÆŒ¼@É#ô2»î’V@¿sµwša~xvæúºî‡ ,TÔ@£»|˜E5·zè•^ÔÀ@¬I¥T—Ú.ûš·_dúîG£~WëÁϾ;D´ÃÎÒî?5Ù÷F-cø{rPâePèÑw¦@_‹e·ë0¤ûDÊú–œŽ8™´ˆÔ)=B¼ý~ãÑá¥=¾MB–½lroî}ÿþÿÿ¿Å°1 ½TþùlÐWiÀ§€èåM q J¬#ü©€Bªà¾Pþ‘Ìä&Ý`ó,R ¯2 ü UHÁ»`Pƒjáñ’Aâ(t Ì–FXC NF„ H ˆÄ$*i·Y¢EìçÄ6ÇkØþ•€z±ŠUË¢ešø!.bQ‹à““xÂÿñ‹I\ãÁØ.‚ev„¹‘ËXGÐEq|ì£ÿ8¥ÞHCq€ ¥bÈ>&’>×: !¸H@‚ï’œR$-¢’Vr“œì¤'? ÊPŠr”¤,¥)O‰ÊTªr•¬l¥+_ ËXÊr–´¬¥-où!l+x» L/-Ò?Á‘uÛÒe…ç¿*~aMÌKMÙ“g:s˜JÔ%ü$iLþ–L¯–Û¼Q6±¹Ën¢r˜ûßDÊi¢´ P!•oЉNäìYwIoX‚€•Ò‚1a0jv2e šà©Ù€È­K ½‰§E OZB”u Qçã9QU*PNw1 ›EeÞM)­ÜMÀPàšé]N·Dí®)îü$f^âRïmÔ•R<Ö¦:.%—4<“˜;ïä~®“ùäSaþO,1?^2y?9…Lƃ>A'R!8@§ <©£"Õ;'¹I; iýÓ‘‘Sêè:9“b²`Ô‘I’­Ñm%” MÑ$H6„@0(IKé{¨kC)•M‚_'Jn8•Yé?ÎT”å2DFqD2ù¹Jr¤•iù+SDo~„ˆ:¤–qyQÅ£T—r‰—yÉ’zÉ—}é— ˜)˜ƒI˜…i˜‡‰˜‰©˜‹É˜é˜¹DºátI™•9W9Jß:ÓcMÍ÷KAõ”·Å11©:O©M¼ÃÚ¤LLZÿ7%M/iš¬3›­!LäS”³©™AÍþDÊ´› )!™ATþSœÄ´8P¢œËé?ÁD0s•8ûÔlM2Q åšEu‚°Ò81Úi$¤17+ôv$½Yü“F{!’ëÂO3%ˆè*à @ôù+ÀN®I±+PïÔlüþ$eÿÉ;ö™NJ¡ ýÓ j#‚X¦–Xè:ø92úYc JrE>E•Nt&e‘á{,rœñæì¹àqM Æ<–F¢¡FÕ"eÕ’¢Y›OHGÍq£ÓbN¢·g.!êQuÃPI…D;Ú@ÕŠQåe=ñÑ–¹d–•ä¡H¦Ÿ[<š&JW£R¡C#þÔ¢2z„4¤o¦­ä¥ñ¦)±ƒÐ÷q`…¤$Ò¥C*J@5)RŠ4“?~úšYÚQ¨10,ÈV¹Å¨Tò]JQ`iÂ\ÕòEYAwÑõÝe“^1^ýe°cºª®%1ûÅ©öZÈE^< Îäi…!Ppt/‘xea 1óa¡jZF©Zuªñª¥Z\éå_Ýå¬T X@²IY²jª–j­8ñXñ¬Û•¬ÕB!ÑJ]ċʢZÁZH“\Ü‘×õª\!ªÍÚ^ïõ©Ô5­1Â\ó_Ú«è*ª¦RÃê¨K­Ì%o…”­šzþ2÷ ­ËÕ­º,+±qE4f8Â?h¢VemöfbjÅe}‘aŸ&j‰ögÅ¢,–¶iª#&Á”.[²¥¦%á±Yy&â6³8!‡ °«)`E¢Kö=×6 …²_¶g’Æj E@itš02Ëh„h¡æg‹&{$Û³J+b«$ûT>+¯f'Q”³SKF˦#)'¶f…VÆ*!ë„@Ûµh&²Švidf;h»±­¶pA·ƒnK·Å6³$l;n‹¶f‚d¡.®£pøùU×’ž’±ü£p:'qÁtúvrûÙ[|`"q©[ ªþ‘O arÁOæQ —»Â’,Ûv^ƒOp¶´KVz~a.ðÆr”jo¥¬ü)'—"W…^Òº³¼½¶½çTá–n.GAÚ@”¡½Ñû¸b߆Vú§“í‹ÁÖ…Ø x‡pU(¾çA¾¾¶ ìËQª³ƒÐûzµÖ½öñ¿±Ë&G'ýk±œ“HQ7˜§‰§ž‚×´s—6’iâvŒwz÷~}wN»#_ÂÁÍÂ…§ƒÛ{¦"Nk"Õ(0€‘P¦¡¬æaBwÁVù¶Y[«×}'Ãkw]W%LüTvçNojaE¡ÄBL¿v±q¤¿*‡c>·9ôÁþl²rRH¼½L]·½X<À›AlÁã§Æ1axÀ€dáÁz:þ–ÎÇ©×~`~‘}Ÿ‡zóË&’wáQÈ'<AÅ7T[‰ ²|U1û5RYbÅå1"E‹‚SÊ@LƒÉ&˜9?¬Áã÷ç÷ÔÞWËÛÇc‚|Y8®Ù‡—{»î[‹ÁÆèÑr¡—  œÜKÆ]øwêç!oaˆÜËaxÄ W‚ªÈ\ÆH£Ëçá}YHxÔÁ¬uQÊ»z[LÓæ„E¨([²—'/¬¿¤æ&8Ò„~ûTÃK´&j†ú¼nâ18þ¼%› f‚ ó£›Ö±7eÊßöf’çð¬…S¬£Îé!†ÏqÏJ# ½ )}€1ˆ•u /‚/5ȆÅ̼í'>ÈQrT}¿xÒ!„ …UxÓÝ\Àn÷ѰÒE½ÒGÍÏÓŒ.]"ôt#¡Ö­•ˆs5[DîHÁxAö8‹ªè}10ƒŒô8‚¨Ã ³3íø’@- Ó4ôø4z=5çèŠ^D×A‡RT‹Ê/(¡PÁæ‰IîÃ2¤Ò.ysÖƒG‹ýh2_m^yS(×çØŽÜè4tMÖiý×õ"Ú˨’…Šoi“t’f§»aÙ7þóˆ¥ˆÖø˜/ø2IÃ.aÝ1Ÿ]‡ªÝªØV>“4âè2SÛ'3á¥5`ÃÚ¦ÓÕ[‚Üû‚Ú€ÈÜÕÝÜQ“/~å3 c‹Fr´;!%&.yI­³’Au¥qð}—ÍAGºQ<=‰Þªiß®ü^YxG¿e$éý£)ßi•Sï=߈d’Ž‘“Žá«¡;A¹.?‰<4Yß4éà”’aà þRÞRÞà7ÂàRÒžÞS•Šg™¨DàëÒâˆúâ5î—R•¡Ã–6žJ1¾–L!â<.äqY"hÙFC•é @¤‰äM®•™ääQ.åSNåUnåWŽåY®å[Îå]ÎMþUÔ£^.æcNæS‚ž,"ž\UækÎæm:0zÄF±¢Êêæunçw^h£ž‘LŽçè€`ßµŠÙ0JÙEÆ]çŠIú£­è‘.é‡É²#²“{8­RD8Û"J\Q´“.ê£.—$·“ÉÜ¡½_¨¼YR¼¤뱞–’G#sœé.‚wÊda¤JÃc*ë¿ì£T|(µÍñ‘Õ:-¢2Êб½ìÏí®ÔnrÓ6L… j¼ ¡ŸíßîœñXÏ^ñÚêñŽ×vŒ½ƒMF8îóNï{„·âƺp.à&âßõðFš×3â#ðþð¤ô–š47 QŽ ñÏJ’äoññ¯ñÏñïñò!/ò#Oòƒia&ò)¯ò%Ïò-o“­Ñò1OïxÅ䀌˜dò àç’à2oå°Ù󙹕A{ ¥aþ·ùšÅäí$+Do>@ß„E¯MËÉœÁ HZ¿LMo@ΉôMþžõ›D$(÷Ìì‚ ¬0ü´â生÷é؉Dê_ˆ˜yU.4nI@F¡öç˜W3–WóF÷€tøäƒD‰¯$É÷´ö•Dç˜æIhº[é ²áò'VoðAC*ƒR¡ø¤Vº.°÷š=1™Q#ÂR\ã_f·D›þè7ÎA‚¦b[†êDsú{Hd·QEú´Ä÷ 4ùªãës•ëV‚%j¼a³!eU)¦U¬ñ†û›÷Æv”ž¨ªï,åêžQü@zÜŸ!$d*5ƒÓ¤ûH—DG¥Vý³þ¦ôþ¯4ù¶_þúr¡È¾úëcM <0ðÀàA„$<€ÐƒÁ†4¸à@H¬ @Òù¤×–µrÅ™àÀþ î:] @ÀVƒcŽ, qnWƒ)W²dZÖ/`$¹R´¸øY´d(ÕHq£É‚K6‰ùjHµØ&[1ðG²¦Ó®íN³ õpü×çƒÃ^9óN¨øèqä?ü>è@ÀÄ  “èÁ¨ƒ›àÞ½{Ä LTÚ×ïE‰ ®‡ ù§L¤¸Z¨A>¹2/×Á¯ `Ë€ñê V:€¨¸^BΜ ï ¼ÛI'þ~Z@ªä:DH<œXïB³+N¾Ër:é0À'ø/@¶x1Åq:pbà9W¼¬EdtN;êšÐ 1"Ц„þŒÎ X±˜’<èI¨òJ nìk3ôsiF&,p }ê+Ǻ1ÆÐ–Œˆ¦6q -Îz|àGò\ÚÂꤔ.2úr=Íi9†º¤r"-3b‹¯ ˜ÐQ„«¯X Œ!F‘¯¹À`€$û~Š I7kñ€X1ÂÔA\<*ˆÄ`ƒÝô ªë4Üh•S£<Å¿bCEÎD”\ŠÊÊX6¾À€•X"­“C+«ãÎAZ¤Ï€–Ѓ¾ £t§Ëv¢[uÕ¡J±Å'}Å}p€­å•ÕÞj ŠÊ+rY  Ûcµׇ©©Òsþ¼vºêêõ²‚ ^6߯˜eRB_, §~ù=HÙéTFi¹Š¤ENçã<²¹ásäŸôB O3“>îP”ó.¨Â´sÖ(–ý£ !–Öx÷©ˆ•¾¶—ébˆ© )ã·½Ü8ä…âB;,Ä úë'Ž«+’^sÓFÌh¤•fÈØJ ‡Éã· ðlûïrþ3î²­llò¡Gpn ë˜h&ÇÉqÈm=«ð­9e9´%Ùê\Òª(¼ÓýTÃ[?б9‹]‰I·5€]jpߢ{g2xÖÇШ )ò=KA{œ0¿F©Åòr‚dOˆ`‡üžîþÏ7 ËáÅÎ^sJÒ'â;ŸßêêÇNzÿp=ÜúÊý‰*B[úB“é[4æœB¾òÏsSûFW9úÉ΀ûÐCs=½îh ¸_”ÆÞá‡RÒ±‰W®¢²$/ l|…¥N<1ƒ×f.´¼”qMz¹ãšûbB¢cÅËW* xlˆD%$ŠPôÕB°J!<™"Ùœâ9Kg ÐPrh¥È]\"sV\œ€ÍãCáŸ`rÀíOŒZJÀNôDªY‰t|ô#úªW!Ýq‡Æš ÜRÆÍ¨J‘裠¿ôöG¡Å«ŽoŒä!íCÈÒð(þf@îâ8ý<Ä5ÀÙ‰e$öøE$3qe£¶Â¥ˆrk¸Bð™‘à’Aø Ï ¬ô/Ÿù%GŒB2`Ý&&ÅÒNBH‘€ˆáå‡÷Í‹tó mc’ìÈùq††¸D@Ø:Å“s†‡:¥Íe>³ªÔEæ*Ȳç>ƒ™¢4Ó$€œ^ðÍ%`U+h0]C0élˆ{Hiåh„™bæMŸ®9æ’ù4”¢Þ¢HF©‚Le†ôž=%°"Pˆè ‰1©=9‚O“0 ¡¾¬Ú*eZ˜²Ô í“B °˜ÿäE§8i@Eêê¸)(©.mv+„¯.þDBG5zVõ?c‚Uäl54|þ¦%óÙÙ‘³z!…5JÉH‰gŒ½,¼·m2ûó¬ VN¡ùª?æ™ëÛæ0Ó«¬*b+/’·ä¸Ù ¤H-çœ%#~YÐÈÑsk‹D<«¬Ð| t‡Ðh32Îð}´å~éŒLzÌÒü³ü0Mè övÐŽLa€³Væ{"VÉh Sj®ÄTÕØ¬Ð]´æg†»{¹Ë@lý’ÓL6'ΩՆ‘b›2¤ )þwóš°¤È7—q¶–`Ýà¨<ÅNˆ²¥ìG÷dÙ!Žq¨àÑF.¨f«¹7Cn®=æÛÁN̬¥ ˜¯ ;1÷tÕA™»+ ˆeÔÊrz n:ÓʼnL¬Du\VL‡S“Ž#Ð(¹K¤Î@ÖØ©IsÌIJU”vy¼é, `Чž"ö°="‹1@¨ý$¤’oæäׯÈDVF”9ï_¸™%þ–<¹ìhïò³Q01\û$ôñœÂ.V²ƒý}X˜gK¿ ﹪Êx”´¤æ3=°‚lëßû˜é»šúK!nƒˆë?„xί¾‡÷_o-.£hDzÇyü÷þÀ€9lhš/¾àH¼– ’ïæ˜éþ´:åõXq£ï×öñ£ ¢ ªQ p’Nå9Î1éqÔ±~BP·HüYîZVVúµt·—>"ë×=%ñl„x?‡Á¾Ý£ ÿK´<—À° @¿y›E£0;3•ÅY@ÁA¾ T¾ˆ0Öq³J)¿é °Jчñ ²[AÙó¼ê !Ù{ ìZIviþ^ ÏQ ‰Ù äÇ ‰ù½ÊK™"$=- ÂÓÛ eI bB_BÌ5‚)ÜÄsÂ<ú6¬ÂþI²ç;±ÒAŽ€K Ù±¶Ÿ LÆ£I™2&;ÁøJœš1â裘ŠCª=Ä ™=D¢€´¯Ê +:«X‰x.ô9#<:$NZ1 é<š$øûž¿!#ú0!LTÊ  I䙸𤩩#JE†°DP"=QÅøûCS¤#éóP‚TüIjA‡±Œ"y j' k)!t@#aìÄP‹•1ˆB´CË.R%Ÿè¨Z&gš*R&j˜šÂFeþ¢ÙâŠRâ§t:¢ª¨Ž Ê§‡˜©r‘ªB–¨Ò ¹¨¨o eª~Z¥¦"©:Qªƒ‚ššÇ" »¨{¬‰ŠjGÄ0ÈÑ*qü ‡ª˜²Æš ª–ZÈ‘b¨•‚œ‰l¼Ÿ* ~c Ç!Ž ¨8t”!UrœÈ±ÆìJ€†rȧ*‹˜L†£á—“Æ“–Ðz¦8j¬¬:J AÊàÃT²Pù¬Áû à–ïÚ¬ÛC ¤À—§@J©­ia«¯¥\2Ä‚¬±¬‰£(J¹èÊë©+L¡ŠÃbËb¬É¢¦J½L0Af ʽ ÌâÌëêKéLÄl”£á4þNi®Ä|LèrÌöZ̼„LË´0ËÌLÍ|¬ÍìLÏüLÐ MÑMÒ,MÓíÓ!£¦ñ AÔoâÉÇzœTE-Ô½c@MTETFíL-u•Êd ĪTÖÒT™¸T?½/lj³¤€^ʉP}«>*Uß9ÕÇJUJíFA®!YýÔ€R: m–\5Š]¥!\Å´_…LàÑ3ýèY€c½ªd]VøT;•/ «Ï³zœ}°¨xŸ ̱Ö×þ‚!hí¯i•OñÈ ƒyºß)ט8WÖt•¡ÿ(Ï›° ³Õ8ˆeuÖ­ mTI€¦ÑW) Xߨad–°¨T «A{¥JñTb«~}¦É¸Œ9R  Jµè‹8 ŒÕPjM«ŠÝ³ßÀØx™Õé´1Ma e…¤´‚YÖâijòWqœwåœý­¥K‚ú6.­§xÉÙ¢ðªÝ2Úš= !UÑñÉ‘O‹ˆ#•Ñ®R‰•¸AQZÚ=;‰Dtï3 កت±Ä²ÙqŽƒÚ´MRÔZ[•¹@+‘¡}ʳõ­ÂâÈŸ R&I ÙÛãÐÛÐX¾ ÜÑÒ[Dyºþ¾=Üñ<´éÛ/¼mlEYùôÖÝš\•Ù4™Ûó×5õÛ?y"{ÚϽ ú€ˆ1ÝÑZS %Ե؈O\kˆ ŽYr— EXÜMZ2ØÝ%‚Ý-àEX£—$³ˆ³UÞÜÒТÅ‚â‘ø*„¡Þ©” é•!8%ë’8í¢ÜÞu«SÑ­­0_ñlD CÞ?±³}_»°­«˜_ßEˆÜѸBŽ”lþõ­ÿå³Ë’“hˆ±[š™³-¶Ó…dïiÎÖŠàÇýNÆ#àA'þ¬ª-Y.%«Æ_\߉ŠhíÖž¦á0K,HáþØþž©§<ØÚªaúP‹àÅ.ˆ8Xh»¾úà=‚Ð×p%,Ûa cá)b¬ZY?÷ŽûñÏÇ:Ÿ:`«Æ•£ nñ/¾Yc9§ðå[ní¶ù€šÛ0¢â§°bŸÀb«â¤qââ†8š9Ì:ÄãΓ‹c t?Ä™™>þaû,<°Õ!µÒê›ÒjˆÎ­»Xd`±°Ê_ý5¥‰ß£p§ßòdGÁ¥3d.ªã(“ó ÔBeìÈ!{4åS E‹ X¾+†aÿUˆu @\&ÏCÄ`ÑÕ‹PaŠD4êÅ3’س%ZáenZ9æ¹ Iéb›á³­±æ£}Ú³þòÅ̙ۊÆ(f&ñ•df–¢fžÚ• ´˜æ†èÛ`¡›Ðågy® HÖf›±gà˜ç?9#Niaè4Çãf PzÆR=è @ht*Ur"cÙyI†þÞ°_jFXý¬ÌY[]êèvûß•€–L䃈FFˆ—|”.‹ HG‰d¾UU”®4Œ†äD¥YꔲÊéXš«r­ø€¥Žf°Z@O¡–Æ@– ѰՠܦÔJŠÓÊèPvÄŸh<[ÑjDœc¯Ž ®6¨è¥”Á«^‚j–¸«ð¸åˆXHJÖ‰F™ën;c›±k‹Ö»3åÜÀðR ÐA þ¼Î‰ÙÒ‹è¨T¬~ع²Ž=’N–ê³ml'‘lR›2ýã‹Àl<ê í"Ù ùìëKl±ÙM×Ë®·–Lõkse2Øv”ÚnŽ8@ßyƳ2 \eJÞ¶ߎ îðn±Û¦‚G É íbÛåúâZnFYSjÔÍÞai íßBìInô,NV/ê(lZ.TôNoLCôno}îönoô~odã ¹<[ív”ûæ›o†1ë¶Õƒ„pÿ.'pÿcß9ððüpp Ÿp ¯p ¿p Ïp gONµÒ±êpÜQð­ñð ?ñXM«‚hQ»:þŽ•´’^γ¶ZñGq—n ŒJ[×÷‰OPÌÔqú¾q"ïv…]jcQðñ :W=8%/h€¶™#'Ù܈š8fò"ßr2Y¦ý )"Œ•Z0×òÖñò¬-s;âr6÷D$Ž+‡ˆwfÂMr,¢:ÿ+RÜ8¿ ¡ó!osBWé Ó‡Ø)Œè[Õ}D¯`C‡]D_H/t"]6•ÏÄ]ðÅ´JwN§Ó¬ÑtK/u!cq•ù^ßRuSouWuXuYŸuZ¯u[¿u\Ïu]ßu^ïu_ÿu`vavb/vc?vdOve_vfovgvh‡uvÚüÜßþlßmÿv´° W×0kaqç;\²ì³z1ÖnWrïvs÷t7o1§(wïÕl×EHH@ž-²œPYkY!ÚŸ x„2ó­Á 2}t.{Z†g­€O2+³…ožÀÈxÛµ'“„-"òÍQ§ å ²èè¯ó§;9{§Õ ŠùÖïëÙ;N5ÑùùtPkù2T4…³âò¡ù ®qׄ‰£âųj4ÆÛÝbyÉ•ø« ´=§¬EðòI£¡Ž®s«'«²o­_êÍÅì ¹´ ¬¨·½7³šÝÍØ+½Ø6x+fS8¹÷Åþ”É{bÙ{_B¸¸ }£{®1|ÔP7qs7Ùˆ y‹·i @K‰P7ÖH|êÀ|Z#B¼|Ä?üܸ¾=$|W±·¸ð63I¸Ñj+Îè ¸çZš|`;|Íg‰£ªiº6ˆ°üן¥“ÄŽÏæ6¤`7ʘûw£ýˆCu\ëMæö¦/ê:*Ѹó”S­£K”„¨¸¢“:7 :­C61Q±ë¼@Ë“7Ùƺ:‘“·“ŒE™“c±º‰(:üMÍÑ€x`€Àƒ L àƒ Xpრ&€Xp#Ç<8`  Š pT@AEŠ >ˆh¢ÅþÄLÀR%Ë;†D¹‘gK†T4¤€‡ Ž Ѐ@‚—%Z)ñAÉ¥31jìèê¥C޳àÀ„€éu.ݺvïâÍ«w/_ ÞvdgJŠ‚ 2xصàɺAÖíŠ@À[; ÈXóHs¥¸¸ãâÉ•/F|çJƒÎ],æàÌ?+þ)û"l¯°Þèzéo(môÜ1xB¥Å  œ ¦äÖ¯w§lÙ.èÅ‹‹‡V]¹A¥Øî}Þ¯P’†/"ïŒsûÇ9“žÿúOÒ Mo‡guG€[5ÀC€utS_B¡„Fø×þR‚6Ô{ˆ€À?·TMv-V0¸Qq  €‹8Õá‡î-5š‰(Ö¸¡}CñbjèñÖ,º¨Œèɨۆ½'ÔŽ$ÉQq3ù¢\µ§|íÍøÀ ÖÕ“\ñvÞ)^˜$L†$–<¶™ÞQœQJÙÞ1µh%{*.´b–©åš@•x"šU‰¤‡?¹`zå …—bš©¦yyxá`þ‰Ç@\á-ˆK¾qFWW[ù„cíAبÞõ§aA¬R†è†±’À«\å(^r 𺑨¹1´'l§ÒÇU±*5©"AÅ.õ¬¯SjV’ve횇áêþª¬È¶ÙØ©çy»Þ:1»^³çîªg´lô\–¾zÛ¦®Ýš+GÔKj¸îm[é|›"œ°Â* ¯j~»åD °„Àqs €f°lÅñŸˆùš¿)„Óh?z’¸Ø=¥â[‡¬›ÃŠ*ÜÈB•¼Ó’0kÌsËŒi_‹è…lЕèˆÐ§:€ž]ýÒ[ÞÁ×±DØÙìL&x±²Q[HõF»ËÏm³_œ ÀRq`#÷¡ ¦œ²±E„óMFZ½‘ÓÂeÝÙƒ^8]cv@Øи(60À (Ôø Üi,άW7  ©Àþé,Å,U~y椧HzF'Ž&íÄ⨀ $Öæµûäƒ>’ï¯on9æ¬3`<Žœ3à9GÔƒ´|ð¾­‹ºçË»XãïÛK€÷ÿzn»ëä3d9ê€;êPôõÎÏ9BØW¤?ïGj/- YÀû ð€ÑóßñŽ6¼êõ/rÿs]øü"ó {«k]‡2¾´ì®#¶“ŸÆÀ§€Ø=yÈ”²6&¤Êp2œaÂp°5à!¸Ò 'ôô°. ÙHâ@¯ü0ˆÜq ó2Ä‚q‡vi"9òĹ@ÌXGÔ"P²˜,º\ŠŸIS2—(‘Š9Zþ Ó¨¹ÝE\Œ–»èÀ0Ú%‰`” ÉØÃÖk4$!1µ2‘Š\$# ¸D®#µ"œ¹PÊ+1´$'y9v2”¢e( ØÈ!áddœê.HJNuh‹ ×+kÉJ[â2—ºÜå¥(V^†’Š&1‹iÌc"3™Ê\&3›éÌgB3šÒœ&5«iÍkb3›ÚÜ&7»éÍo‚3œâ'9ËiÎs¢3ê\';ÛéÎwÂ3žòœ'=ëiÏ{â3ŸÉ<X²JžSÀûç±VG… t 0hÂj¾.& # ÕÔD­¨ U/À/š°ŒΡ]X@þ R1#EOD”RK>åT ˜Ü !6€× t##›dP9‡-l§^Yi„šöS„uªP5ÕÔëI/z*^Õ¼X¨—¢ª–T­.ì¦ ™W!DÕ ‰u.e£N»$ʬĊxƒZ¡é¥+Rœáɤ”0½n‘a Ù+¨ô•©¾þŠ/ B¬]*yÇ^б1C`iWZaêd€±klx:—Åz–‘˜ä& Ö¾ ¯y‘,á›Zʆ–B¬mÓl!ÄXÈbñi±õÍié‚Û ¹¶·¶Ý­á0ÙŸ¼/µµ¢nI ?DÄýDNI]P·ØÝŠïú‰þ݇2n¿ñ ëX‚:„X—bÔ.»v%ò^êÍPâ H’ø!Ó5™^D±¿œ÷vsQ ã;ÿ’ÄE“)žÊë,8}šoB\dªüJ»üõoz5¬]вa‘Ó¯†mÕ¦ ¯×HÈ[—Ô$R_#É¥H fó‰Ü˜#ð•o‰¡h_ž¤Æ .0G2>sýÅ*p‹¹¢"?ØHnTð$weÍEx#^¯A,Ì ï÷ÊÑ›°‡·[#ÿEÀ´m«Læìš9¼HÊbv|^’dPÁÔYˆŠql·~984ÞÜ )DfE&®é‰+  Æ4iHQÈ­‚þJ—‡Ñ¡“NŽ¢ø$ºdÁ©‰-H…*1AI‚“–³ˆ„-©ÎH cž‚ÕSɬ…·è¢´t-'vÈU¢²ëL·$#Ž>¢^‰­•55&2ÙQ«e¤”"¶Æu¤Ç‚”¶MŸŽk¨¯ ê*½ÞÈÐ ±†Í‡Úö]rÀ”]«ºÖlÁµžðÍk{ gh¡6]âl™øÙ>Qö£"oWOÚ<ýõÂòhLh4ÅÁ4Sœ•Å€û óꕦ½}nB&‘û¹m#(e±É¸‡IO%?½¤ø(çG+OE|Õ4Χ@›ÑrÑn«'ž mZÓÎSµ›–þkåmŽuzθ&)8oÀŠÎïĪÚAkî̶®5ã ‡\ÐbNNrHûëA'W|ºnⳇ$UIßÓÒÛÔôIGH"Š;Ð%LjAý<ψêc*Šˆ·€‡Ï€@™°¿u„Öƒ‚ù§˜4#u‘ý<œ¹²uß6Jb ÀŒä5GuiJJ"=x¼çV3)jM©ù’¿¯ÝOø¬wýdMÿT£Š~™Ä»™úã³ÏÈö&©Õ‡ ¼‚ ¿1›U“çgÿ±ÄrèQ&NO¤P¿y› Ë÷pi½öMlÜÂÊéSŠoüÝe¯¯IMöû{2~!`?Æ ]¯pžËÁ A€°þL]Ù±‹äÁ‹°P˾ W\‹¼@Bð€ ݵnj–Š˜ øŒ^íÉÀ€Ü½ð^úu¨ä fåK>ÀÚÉr ò ]hÌŸ4àÌ< ô)Ь 2†µÍ¿0Î b ÑhàFÌà×ÊÛø`²` R„· ß̨_G¸ ºŸhðÔzÈß’,°„!½è‹¶”¹ Í’õYÒ¸ÌÖàœè ”(¡×ÈoôÖÙ| Þl$ › HŒLŒƒ\ÍÇ™×L‰ÞPÌžÔDøáVaüÕÔüáÔÉM ÆD¤¥È bÄ­ »1 æ’.I͈Œ€b!RL‚$¢þÔôœ\ˆŠ z¢+2I(~Å)NV#N̺I$ÆÉVb¤ ¬ØbŒqááÁ¡ØèËÙhÛ#ö•² *t”­ÏHHòÀOÛ]±@ÆÐí|cLœHyÿ|£«1ŽåWµÒ}}\{ PæÜ#L,Àï4 ŽtÿôcóÈô|# E–}Wlx1ŠPÑN7ÞŠþTdÙR4LJä©ü#Řˆ¸uO‡´WÀcDÐGúEI‚Ä>BOÿ¼Žê´ˆEXÎF~áOy=ä­äHAö$L6NB®Ðü„=öä7N¤ÁääE–íT$=JÐñPû¬üLþ%ö¨S`HLeHÔ¥JRG’’)Àå]r…‰gY^ÚiT[~Q^B‘Vb8©Q!Ñæ¨ ^ΑN)æ­Ñ_²f´e]¦± $_ZbÊYæPí`Ò…`.…abîEfN‘[~^ZÞdÓoAH$Ù„>¡&åmÆdÙ&"‰S+e„ ÒXý&nr“‡ i'9ù¦W'r&§±(À/='9Õåt¾SuÚS†Yçvrgw²“LxgxŠçx*S倨Gz @KÔç{Âg|’”GñëtĘ\WiÉç~ògVÕUå…}rÄ“þ¤–Èùç"h‚â^èØÐ­™’‚Jè„Æ'lVJŠ(Ç´ˆsRh‡zh3ežù×5JˆrEŽå}YŸ5P4è›D—ñ‘µžõ|èâ¨(­›¬¾uÀ‘a¸G·AEÈ!Ò‹®p=N,ˆæè“B)!íÏÅÇÞEÞÈ…Ý£ñ&’(_€„¿dP‘õS”’i™~÷±ÉÛ éà"Ù›.Ÿ‹b¨pÅQÑXÊØÐ’™êéž:Ñ–Jžd ©ÌrI¶´ÍHq)vP$€P´ aœqñé¤RjbåLš …+–"X-ßœV¢æ…’ñ”؉‡", # HTML+ " ", " ", "\n", "\n", "|", "", # spacing commands ":", "", "!", "!", "?", "?", ".", ".", # hyphenation "-", "" # use ­ entity here? ); # # texinfo "things" (@foo{}) to HTML ones # %things_map = ( 'TeX', 'TeX', 'br', '

    ', # paragraph break 'bullet', '*', 'copyright', '©', 'dots', '...', # use … entity here? 'equiv', '==', 'error', 'error-->', 'expansion', '==>', 'minus', '-', 'point', '-!-', 'print', '-|', 'result', '=>', 'today', $TODAY, ); # # texinfo styles (@foo{bar}) to HTML ones # %style_map = ( 'asis', '', 'b', 'B', 'cite', 'CITE', 'code', 'CODE', 'ctrl', '&do_ctrl', # special case 'dfn', 'EM', # DFN tag is illegal in the standard 'dmn', '', # useless 'email', '&do_email', # insert a clickable email address 'emph', 'EM', 'file', '"TT', # will put quotes, cf. &apply_style 'i', 'I', 'kbd', 'KBD', 'key', 'KBD', 'math', '', 'r', '', # unsupported 'samp', '"SAMP', # will put quotes, cf. &apply_style 'sc', '&do_sc', # special case 'strong', 'STRONG', 't', 'TT', 'titlefont', '', # useless 'uref', '&do_uref', # insert a clickable URL 'url', '&do_url', # insert a clickable URL 'var', 'VAR', 'w', '', # unsupported ); # # texinfo format (@foo/@end foo) to HTML ones # %format_map = ( 'display', 'PRE', 'example', 'PRE', 'format', 'PRE', 'lisp', 'PRE', 'quotation', 'BLOCKQUOTE', 'smallexample', 'PRE', 'smalllisp', 'PRE', # lists 'itemize', 'UL', 'enumerate', 'OL', # poorly supported 'flushleft', 'PRE', 'flushright', 'PRE', ); # # texinfo definition shortcuts to real ones # %def_map = ( # basic commands 'deffn', 0, 'defvr', 0, 'deftypefn', 0, 'deftypevr', 0, 'defcv', 0, 'defop', 0, 'deftp', 0, # basic x commands 'deffnx', 0, 'defvrx', 0, 'deftypefnx', 0, 'deftypevrx', 0, 'defcvx', 0, 'defopx', 0, 'deftpx', 0, # shortcuts 'defun', 'deffn Function', 'defmac', 'deffn Macro', 'defspec', 'deffn {Special Form}', 'defvar', 'defvr Variable', 'defopt', 'defvr {User Option}', 'deftypefun', 'deftypefn Function', 'deftypevar', 'deftypevr Variable', 'defivar', 'defcv {Instance Variable}', 'defmethod', 'defop Method', # x shortcuts 'defunx', 'deffnx Function', 'defmacx', 'deffnx Macro', 'defspecx', 'deffnx {Special Form}', 'defvarx', 'defvrx Variable', 'defoptx', 'defvrx {User Option}', 'deftypefunx', 'deftypefnx Function', 'deftypevarx', 'deftypevrx Variable', 'defivarx', 'defcvx {Instance Variable}', 'defmethodx', 'defopx Method', ); # # things to skip # %to_skip = ( # comments 'c', 1, 'comment', 1, # useless 'contents', 1, 'shortcontents', 1, 'summarycontents', 1, 'footnotestyle', 1, 'end ifclear', 1, 'end ifset', 1, 'titlepage', 1, 'end titlepage', 1, # unsupported commands (formatting) 'afourpaper', 1, 'cropmarks', 1, 'finalout', 1, 'headings', 1, 'need', 1, 'page', 1, 'setchapternewpage', 1, 'everyheading', 1, 'everyfooting', 1, 'evenheading', 1, 'evenfooting', 1, 'oddheading', 1, 'oddfooting', 1, 'smallbook', 1, 'vskip', 1, 'filbreak', 1, 'paragraphindent', 1, # unsupported formats 'cartouche', 1, 'end cartouche', 1, 'group', 1, 'end group', 1, ); #+++############################################################################ # # # Argument parsing, initialisation # # # #---############################################################################ %value = (); # hold texinfo variables, see also -D $use_bibliography = 1; $use_acc = 0; $debug = 0; $doctype = ''; $check = 0; $expandinfo = 0; $use_glossary = 0; $invisible_mark = ''; $use_iso = 0; @include_dirs = (); $show_menu = 0; $number_sections = 0; $split_node = 0; $split_chapter = 0; $no_toc_href = 0; $monolithic = 0; $verbose = 0; $usage = < 0; ✓ exit; } if (($split_node || $split_chapter) && $monolithic) { warn "Can't use -monolithic with -split, -monolithic ignored.\n"; $monolithic = 0; } if ($expandinfo) { $to_skip{'ifinfo'}++; $to_skip{'end ifinfo'}++; } else { $to_skip{'iftex'}++; $to_skip{'end iftex'}++; } $invisible_mark = '' if $invisible_mark eq 'xbm'; die $usage unless @ARGV == 1; $docu = shift(@ARGV); if ($docu =~ /.*\//) { chop($docu_dir = $&); $docu_name = $'; } else { $docu_dir = '.'; $docu_name = $docu; } unshift(@include_dirs, $docu_dir); $docu_name =~ s/\.te?x(i|info)?$//; # basename of the document $docu_doc = "$docu_name.html"; # document's contents if ($monolithic) { $docu_toc = $docu_foot = $docu_doc; } else { $docu_toc = "${docu_name}_toc.html"; # document's table of contents $docu_foot = "${docu_name}_foot.html"; # document's footnotes } # # variables # $value{'html'} = 1; # predefine html (the output format) $value{'texi2html'} = '1.52'; # predefine texi2html (the translator) # _foo: internal to track @foo foreach ('_author', '_title', '_subtitle', '_settitle', '_setfilename') { $value{$_} = ''; # prevent -w warnings } %node2sec = (); # node to section name %node2href = (); # node to HREF %bib2href = (); # bibliography reference to HREF %gloss2href = (); # glossary term to HREF @sections = (); # list of sections %tag2pro = (); # protected sections # # initial indexes # $bib_num = 0; $foot_num = 0; $gloss_num = 0; $idx_num = 0; $sec_num = 0; $doc_num = 0; $html_num = 0; # # can I use ISO8879 characters? (HTML+) # if ($use_iso) { $things_map{'bullet'} = "•"; $things_map{'copyright'} = "©"; $things_map{'dots'} = "…"; $things_map{'equiv'} = "≡"; $things_map{'expansion'} = "→"; $things_map{'point'} = "∗"; $things_map{'result'} = "⇒"; } # # read texi2html extensions (if any) # $extensions = 'texi2html.ext'; # extensions in working directory if (-f $extensions) { print "# reading extensions from $extensions\n" if $verbose; require($extensions); } ($progdir = $0) =~ s/[^\/]+$//; if ($progdir && ($progdir ne './')) { $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory if (-f $extensions) { print "# reading extensions from $extensions\n" if $verbose; require($extensions); } } print "# reading from $docu\n" if $verbose; #+++############################################################################ # # # Pass 1: read source, handle command, variable, simple substitution # # # #---############################################################################ @lines = (); # whole document @toc_lines = (); # table of contents $toplevel = 0; # top level seen in hierarchy $curlevel = 0; # current level in TOC $node = ''; # current node name $in_table = 0; # am I inside a table $table_type = ''; # type of table ('', 'f', 'v', 'multi') @tables = (); # nested table support $in_bibliography = 0; # am I inside a bibliography $in_glossary = 0; # am I inside a glossary $in_top = 0; # am I inside the top node $in_pre = 0; # am I inside a preformatted section $in_list = 0; # am I inside a list $in_html = 0; # am I inside an HTML section $first_line = 1; # is it the first line $dont_html = 0; # don't protect HTML on thisline $split_num = 0; # split index $deferred_ref = ''; # deferred reference for indexes @html_stack = (); # HTML elements stack $html_element = ''; # current HTML element &html_reset; # build code for simple substitutions # the maps used (%simple_map and %things_map) MUST be aware of this # watch out for regexps, / and escaped characters! $subst_code = ''; foreach (keys(%simple_map)) { ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n"; } foreach (keys(%things_map)) { $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n"; } if ($use_acc) { # accentuated characters foreach (keys(%accent_map)) { if ($_ eq "`") { $subst_code .= "s/$;3"; } elsif ($_ eq "'") { $subst_code .= "s/$;4"; } else { $subst_code .= "s/\\\@\\$_"; } $subst_code .= "([aeiou])/&\${1}$accent_map{$_};/gi;\n"; } } eval("sub simple_substitutions { $subst_code }"); &init_input; while ($_ = &next_line) { # # remove \input on the first lines only # if ($first_line) { next if /^\\input/; $first_line = 0; } # # parse texinfo tags # $tag = ''; $end_tag = ''; if (/^\@end\s+(\w+)\b/) { $end_tag = $1; } elsif (/^\@(\w+)\b/) { $tag = $1; } # # handle @ifhtml / @end ifhtml # if ($in_html) { if ($end_tag eq 'ifhtml') { $in_html = 0; } else { $tag2pro{$in_html} .= $_; } next; } elsif ($tag eq 'ifhtml') { $in_html = $PROTECTTAG . ++$html_num; push(@lines, $in_html); next; } # # try to skip the line # if ($end_tag) { next if $to_skip{"end $end_tag"}; } elsif ($tag) { next if $to_skip{$tag}; last if $tag eq 'bye'; } if ($in_top) { # parsing the top node if ($tag eq 'node' || $tag eq 'include' || $sec2level{$tag}) { # no more in top $in_top = 0; } else { # skip it next; } } # # try to remove inlined comments # syntax from tex-mode.el comment-start-skip # s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/; # non-@ substitutions cf. texinfmt.el unless ($in_pre) { s/``/\"/g; s/''/\"/g; s/([\w ])---([\w ])/$1--$2/g; } # # analyze the tag # if ($tag) { # skip lines &skip_until($tag), next if $tag eq 'ignore'; if ($expandinfo) { &skip_until($tag), next if $tag eq 'iftex'; } else { &skip_until($tag), next if $tag eq 'ifinfo'; } &skip_until($tag), next if $tag eq 'tex'; # handle special tables if ($tag =~ /^(|f|v|multi)table$/) { $table_type = $1; $tag = 'table'; } # special cases if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) { $in_top = 1; @lines = (); # ignore all lines before top (title page garbage) next; } elsif ($tag eq 'node') { $in_top = 0; warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o; $_ = &protect_html($_); # if node contains '&' for instance s/^\@node\s+//; ($node) = split(/,/); &normalise_node($node); if ($split_node) { &next_doc; push(@lines, $SPLITTAG) if $split_num++; push(@sections, $node); } next; } elsif ($tag eq 'include') { if (/^\@include\s+($FILERE)\s*$/o) { $file = $1; unless (-e $file) { foreach $dir (@include_dirs) { $file = "$dir/$1"; last if -e $file; } } if (-e $file) { &open($file); print "# including $file\n" if $verbose; } else { warn "$ERROR Can't find $file, skipping"; } } else { warn "$ERROR Bad include line: $_"; } next; } elsif ($tag eq 'ifclear') { if (/^\@ifclear\s+($VARRE)\s*$/o) { next unless defined($value{$1}); &skip_until($tag); } else { warn "$ERROR Bad ifclear line: $_"; } next; } elsif ($tag eq 'ifset') { if (/^\@ifset\s+($VARRE)\s*$/o) { next if defined($value{$1}); &skip_until($tag); } else { warn "$ERROR Bad ifset line: $_"; } next; } elsif ($tag eq 'menu') { unless ($show_menu) { &skip_until($tag); next; } &html_push_if($tag); push(@lines, &html_debug("\n", __LINE__)); } elsif ($format_map{$tag}) { $in_pre = 1 if $format_map{$tag} eq 'PRE'; &html_push_if($format_map{$tag}); push(@lines, &html_debug("\n", __LINE__)); $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ; push(@lines, &debug("<$format_map{$tag}>\n", __LINE__)); next; } elsif ($tag eq 'table') { if (/^\@(|f|v|multi)table\s+\@(\w+)/) { $in_table = $2; unshift(@tables, join($;, $table_type, $in_table)); if ($table_type eq "multi") { push(@lines, &debug("\n", __LINE__)); &html_push_if('TABLE'); } else { push(@lines, &debug("
    \n", __LINE__)); &html_push_if('DL'); } push(@lines, &html_debug("\n", __LINE__)); } else { warn "$ERROR Bad table line: $_"; } next; } elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') { if (/^\@$tag\s+(\w\w?)\s+(\w\w?)\s*$/) { eval("*${1}index = *${2}index"); } else { warn "$ERROR Bad syn*index line: $_"; } next; } elsif ($tag eq 'sp') { push(@lines, &debug("

    \n", __LINE__)); next; } elsif ($tag eq 'setref') { &protect_html; # if setref contains '&' for instance if (/^\@$tag\s*{($NODERE)}\s*$/) { $setref = $1; $setref =~ s/\s+/ /g; # normalize $setref =~ s/ $//; $node2sec{$setref} = $name; $node2href{$setref} = "$docu_doc#$docid"; } else { warn "$ERROR Bad setref line: $_"; } next; } elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') { if (/^\@$tag\s+(\w\w)\s*$/) { $valid_index{$1} = 1; } else { warn "$ERROR Bad defindex line: $_"; } next; } elsif (defined($def_map{$tag})) { if ($def_map{$tag}) { s/^\@$tag\s+//; $tag = $def_map{$tag}; $_ = "\@$tag $_"; $tag =~ s/\s.*//; } } elsif (defined($user_sub{$tag})) { s/^\@$tag\s+//; $sub = $user_sub{$tag}; print "# user $tag = $sub, arg: $_" if $debug & $DEBUG_USER; if (defined(&$sub)) { chop($_); &$sub($_); } else { warn "$ERROR Bad user sub for $tag: $sub\n"; } next; } if (defined($def_map{$tag})) { s/^\@$tag\s+//; if ($tag =~ /x$/) { # extra definition line $tag = $`; $is_extra = 1; } else { $is_extra = 0; } while (/\{([^\{\}]*)\}/) { # this is a {} construct ($before, $contents, $after) = ($`, $1, $'); # protect spaces $contents =~ s/\s+/$;9/g; # restore $_ protecting {} $_ = "$before$;7$contents$;8$after"; } @args = split(/\s+/, &protect_html($_)); foreach (@args) { s/$;9/ /g; # unprotect spaces s/$;7/\{/g; # ... { s/$;8/\}/g; # ... } } $type = shift(@args); $type =~ s/^\{(.*)\}$/$1/; print "# def ($tag): {$type} ", join(', ', @args), "\n" if $debug & $DEBUG_DEF; $type .= ':'; # it's nicer like this $name = shift(@args); $name =~ s/^\{(.*)\}$/$1/; if ($is_extra) { $_ = &debug("

    ", __LINE__); } else { $_ = &debug("
    \n
    ", __LINE__); } if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { $_ .= "$type $name"; $_ .= " @args" if @args; } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' || $tag eq 'defcv' || $tag eq 'defop') { $ftype = $name; $name = shift(@args); $name =~ s/^\{(.*)\}$/$1/; $_ .= "$type $ftype $name"; $_ .= " @args" if @args; } else { warn "$ERROR Unknown definition type: $tag\n"; $_ .= "$type $name"; $_ .= " @args" if @args; } $_ .= &debug("\n
    ", __LINE__); $name = &unprotect_html($name); if ($tag eq 'deffn' || $tag eq 'deftypefn') { unshift(@input_spool, "\@findex $name\n"); } elsif ($tag eq 'defop') { unshift(@input_spool, "\@findex $name on $ftype\n"); } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') { unshift(@input_spool, "\@vindex $name\n"); } else { unshift(@input_spool, "\@tindex $name\n"); } $dont_html = 1; } } elsif ($end_tag) { if ($format_map{$end_tag}) { $in_pre = 0 if $format_map{$end_tag} eq 'PRE'; $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ; &html_pop_if('LI', 'P'); &html_pop_if(); push(@lines, &debug("\n", __LINE__)); push(@lines, &html_debug("\n", __LINE__)); } elsif ($end_tag =~ /^(|f|v|multi)table$/) { unless (@tables) { warn "$ERROR \@end $end_tag without \@*table\n"; next; } ($table_type, $in_table) = split($;, shift(@tables)); unless ($1 eq $table_type) { warn "$ERROR \@end $end_tag without matching \@$end_tag\n"; next; } if ($table_type eq "multi") { push(@lines, "
    \n"); &html_pop_if('TR'); } else { push(@lines, "\n"); &html_pop_if('DD'); } &html_pop_if(); if (@tables) { ($table_type, $in_table) = split($;, $tables[0]); } else { $in_table = 0; } } elsif (defined($def_map{$end_tag})) { push(@lines, &debug("\n", __LINE__)); } elsif ($end_tag eq 'menu') { &html_pop_if(); push(@lines, $_); # must keep it for pass 2 } next; } # # misc things # # protect texi and HTML things &protect_texi; $_ = &protect_html($_) unless $dont_html; $dont_html = 0; # substitution (unsupported things) s/^\@center\s+//g; s/^\@exdent\s+//g; s/\@noindent\s+//g; s/\@refill\s+//g; # other substitutions &simple_substitutions; s/\@value{($VARRE)}/$value{$1}/eg; s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 # # analyze the tag again # if ($tag) { if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) { if (/^\@$tag\s+(.+)$/) { $name = $1; $name =~ s/\s+$//; $level = $sec2level{$tag}; $name = &update_sec_num($tag, $level) . " $name" if $number_sections && $tag !~ /^unnumbered/; if ($tag =~ /heading$/) { push(@lines, &html_debug("\n", __LINE__)); if ($html_element ne 'body') { # We are in a nice pickle here. We are trying to get a H? heading # even though we are not in the body level. So, we convert it to a # nice, bold, line by itself. $_ = &debug("\n\n

    $name\n\n", __LINE__); } else { $_ = &debug("$name\n", __LINE__); &html_push_if('body'); } print "# heading, section $name, level $level\n" if $debug & $DEBUG_TOC; } else { if ($split_chapter) { unless ($toplevel) { # first time we see a "section" unless ($level == 1) { warn "$ERROR The first section found is not of level 1: $_"; warn "$ERROR I'll split on sections of level $level...\n"; } $toplevel = $level; } if ($level == $toplevel) { &next_doc; push(@lines, $SPLITTAG) if $split_num++; push(@sections, $name); } } $sec_num++; $docid = "SEC$sec_num"; $tocid = "TOC$sec_num"; # check biblio and glossary $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i); $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i); # check node if ($node) { if ($node2sec{$node}) { warn "$ERROR Duplicate node found: $node\n"; } else { $node2sec{$node} = $name; $node2href{$node} = "$docu_doc#$docid"; print "# node $node, section $name, level $level\n" if $debug & $DEBUG_TOC; } $node = ''; } else { print "# no node, section $name, level $level\n" if $debug & $DEBUG_TOC; } # update TOC while ($level > $curlevel) { $curlevel++; push(@toc_lines, "

      \n"); } while ($level < $curlevel) { $curlevel--; push(@toc_lines, "
    \n"); } $_ = "
  • " . &anchor($tocid, "$docu_doc#$docid", $name, 1); push(@toc_lines, &substitute_style($_)); # update DOC push(@lines, &html_debug("\n", __LINE__)); &html_reset; if ($no_toc_href) { $_ = "" . &anchor($docid, "", $name) . "\n"; } else { $_ = "" . &anchor($docid, "$docu_toc#$tocid", $name) . "\n"; } $_ = &debug($_, __LINE__); push(@lines, &html_debug("\n", __LINE__)); } # update DOC foreach $line (split(/\n+/, $_)) { push(@lines, "$line\n"); } next; } else { warn "$ERROR Bad section line: $_"; } } else { # track variables $value{$1} = $2, next if /^\@set\s+($VARRE)\s+(.*)$/o; delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o; # store things $value{'_setfilename'} = $1, next if /^\@setfilename\s+(.*)$/; $value{'_settitle'} = $1, next if /^\@settitle\s+(.*)$/; $value{'_author'} .= "$1\n", next if /^\@author\s+(.*)$/; $value{'_subtitle'} .= "$1\n", next if /^\@subtitle\s+(.*)$/; $value{'_title'} .= "$1\n", next if /^\@title\s+(.*)$/; # index if (/^\@(..?)index\s+/) { unless ($valid_index{$1}) { warn "$ERROR Undefined index command: $_"; next; } $id = 'IDX' . ++$idx_num; $index = $1 . 'index'; $what = &substitute_style($'); $what =~ s/\s+$//; print "# found $index for '$what' id $id\n" if $debug & $DEBUG_INDEX; eval(<\n", __LINE__)); push(@lines, &anchor($id, '', $invisible_mark, !$in_pre)); &html_push('P'); } elsif ($html_element eq 'DL' || $html_element eq 'UL' || $html_element eq 'OL' ) { $deferred_ref .= &anchor($id, '', $invisible_mark, !$in_pre) . " "; } next; } # list item if (/^\@itemx?\s+/) { $what = $'; $what =~ s/\s+$//; if ($in_bibliography && $use_bibliography) { if ($what =~ /^$BIBRE$/o) { $id = 'BIB' . ++$bib_num; $bib2href{$what} = "$docu_doc#$id"; print "# found bibliography for '$what' id $id\n" if $debug & $DEBUG_BIB; $what = &anchor($id, '', $what); } } elsif ($in_glossary && $use_glossary) { $id = 'GLOSS' . ++$gloss_num; $entry = $what; $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; $gloss2href{$entry} = "$docu_doc#$id"; print "# found glossary for '$entry' id $id\n" if $debug & $DEBUG_GLOSS; $what = &anchor($id, '', $what); } &html_pop_if('P'); if ($html_element eq 'DL' || $html_element eq 'DD') { if ($things_map{$in_table} && !$what) { # special case to allow @table @bullet for instance push(@lines, &debug("
    $things_map{$in_table}\n", __LINE__)); } else { push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); } push(@lines, "
    "); &html_push('DD') unless $html_element eq 'DD'; if ($table_type) { # add also an index unshift(@input_spool, "\@${table_type}index $what\n"); } } elsif ($html_element eq 'TABLE') { push(@lines, &debug("$what\n", __LINE__)); &html_push('TR'); } elsif ($html_element eq 'TR') { push(@lines, &debug("\n", __LINE__)); push(@lines, &debug("$what\n", __LINE__)); } else { push(@lines, &debug("
  • $what\n", __LINE__)); &html_push('LI') unless $html_element eq 'LI'; } push(@lines, &html_debug("\n", __LINE__)); if ($deferred_ref) { push(@lines, &debug("$deferred_ref\n", __LINE__)); $deferred_ref = ''; } next; } elsif (/^\@tab\s+(.*)$/) { push(@lines, "$1\n"); next; } } } # paragraph separator if ($_ eq "\n") { next if $#lines >= 0 && $lines[$#lines] eq "\n"; if ($html_element eq 'P') { push(@lines, "\n"); $_ = &debug("\n", __LINE__); &html_pop; } } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE') { push(@lines, "

    \n"); &html_push('P'); $_ = &debug($_, __LINE__); } # otherwise push(@lines, $_); } # finish TOC $level = 0; while ($level < $curlevel) { $curlevel--; push(@toc_lines, "\n"); } print "# end of pass 1\n" if $verbose; #+++############################################################################ # # # Pass 2/3: handle style, menu, index, cross-reference # # # #---############################################################################ @lines2 = (); # whole document (2nd pass) @lines3 = (); # whole document (3rd pass) $in_menu = 0; # am I inside a menu while (@lines) { $_ = shift(@lines); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@lines2, $_); next; } # # menu # $in_menu = 1, push(@lines2, &debug("

      \n", __LINE__)), next if /^\@menu\b/; $in_menu = 0, push(@lines2, &debug("
    \n", __LINE__)), next if /^\@end\s+menu\b/; if ($in_menu) { if (/^\*\s+($NODERE)::/o) { $descr = $'; chop($descr); &menu_entry($1, $1, $descr); } elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) { $descr = $'; chop($descr); &menu_entry($1, $2, $descr); } elsif (/^\*/) { warn "$ERROR Bad menu line: $_"; } else { # description continued? push(@lines2, $_); } next; } # # printindex # if (/^\@printindex\s+(\w\w)\b/) { local($index, *ary, @keys, $key, $letter, $last_letter, @refs); if ($predefined_index{$1}) { $index = $predefined_index{$1} . 'index'; } else { $index = $1 . 'index'; } eval("*ary = *$index"); @keys = keys(%ary); foreach $key (@keys) { $_ = $key; 1 while s/<(\w+)>\`(.*)\'<\/\1>/$2/; # remove HTML tags with quotes 1 while s/<(\w+)>(.*)<\/\1>/$2/; # remove HTML tags $_ = &unprotect_html($_); &unprotect_texi; tr/A-Z/a-z/; # lowercase $key2alpha{$key} = $_; print "# index $key sorted as $_\n" if $key ne $_ && $debug & $DEBUG_INDEX; } push(@lines2, "Jump to:\n"); $last_letter = undef; foreach $key (sort byalpha @keys) { $letter = substr($key2alpha{$key}, 0, 1); $letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;; if (!defined($last_letter) || $letter ne $last_letter) { push(@lines2, "-\n") if defined($last_letter); push(@lines2, "" . &protect_html($letter) . "\n"); $last_letter = $letter; } } push(@lines2, "

    \n"); $last_letter = undef; foreach $key (sort byalpha @keys) { $letter = substr($key2alpha{$key}, 0, 1); $letter = substr($key2alpha{$key}, 0, 2) if $letter eq $;; if (!defined($last_letter) || $letter ne $last_letter) { push(@lines2, "\n") if defined($last_letter); push(@lines2, "

    " . &protect_html($letter) . "

    \n"); push(@lines2, "\n"); $last_letter = $letter; } @refs = (); foreach (split(/$;/, $ary{$key})) { push(@refs, &anchor('', $_, $key, 0)); } push(@lines2, "
  • " . join(", ", @refs) . "\n"); } push(@lines2, "
  • \n") if defined($last_letter); next; } # # simple style substitutions # $_ = &substitute_style($_); # # xref # while (/\@(x|px|info|)ref{($XREFRE)(}?)/o) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); ($before, $after) = ($`, $'); if (! $full && $after) { warn "$ERROR Bad xref (no ending } on line): $_"; $_ = "$before$;0${type}ref\{$nodes$after"; next; # while xref } if ($type eq 'x') { $type = 'See '; } elsif ($type eq 'px') { $type = 'see '; } elsif ($type eq 'info') { $type = 'See Info'; } else { $type = ''; } unless ($full) { $next = shift(@lines); $next = &substitute_style($next); chop($nodes); # remove final newline if ($next =~ /\}/) { # split on 2 lines $nodes .= " $`"; $after = $'; } else { $nodes .= " $next"; $next = shift(@lines); $next = &substitute_style($next); chop($nodes); if ($next =~ /\}/) { # split on 3 lines $nodes .= " $`"; $after = $'; } else { warn "$ERROR Bad xref (no ending }): $_"; $_ = "$before$;0xref\{$nodes$after"; unshift(@lines, $next); next; # while xref } } } $nodes =~ s/\s+/ /g; # remove useless spaces @args = split(/\s*,\s*/, $nodes); $node = $args[0]; # the node is always the first arg &normalise_node($node); $sec = $node2sec{$node}; if (@args == 5) { # reference to another manual $sec = $args[2] || $node; $man = $args[4] || $args[3]; $_ = "${before}${type}Section `$sec' in \@cite{$man}$after"; } elsif ($type =~ /Info/) { # inforef warn "$ERROR Wrong number of arguments: $_" unless @args == 3; ($nn, $_, $in) = @args; $_ = "${before}${type} file `$in', node `$nn'$after"; } elsif ($sec) { $href = $node2href{$node}; $_ = "${before}${type}Section " . &anchor('', $href, $sec) . $after; } else { warn "$ERROR Undefined node ($node): $_"; $_ = "$before$;0xref{$nodes}$after"; } } # # try to guess bibliography references or glossary terms # unless (/^/) { $done .= $pre . &anchor('', $href, $what); } else { $done .= "$pre$what"; } $_ = $post; } $_ = $done . $_; } if ($use_glossary) { $done = ''; while (/\b\w+\b/) { ($pre, $what, $post) = ($`, $&, $'); $entry = $what; $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; $href = $gloss2href{$entry}; if (defined($href) && $post !~ /^[^<]*<\/A>/) { $done .= $pre . &anchor('', $href, $what); } else { $done .= "$pre$what"; } $_ = $post; } $_ = $done . $_; } } # otherwise push(@lines2, $_); } print "# end of pass 2\n" if $verbose; # # split style substitutions # while (@lines2) { $_ = shift(@lines2); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@lines3, $_); next; } # # split style substitutions # $old = ''; while ($old ne $_) { $old = $_; if (/\@(\w+)\{/) { ($before, $style, $after) = ($`, $1, $'); if (defined($style_map{$style})) { $_ = $after; $text = ''; $after = ''; $failed = 1; while (@lines2) { if (/\}/) { $text .= $`; $after = $'; $failed = 0; last; } else { $text .= $_; $_ = shift(@lines2); } } if ($failed) { die "* Bad syntax (\@$style) after: $before\n"; } else { $text = &apply_style($style, $text); $_ = "$before$text$after"; } } } } # otherwise push(@lines3, $_); } print "# end of pass 3\n" if $verbose; #+++############################################################################ # # # Pass 4: foot notes, final cleanup # # # #---############################################################################ @foot_lines = (); # footnotes @doc_lines = (); # final document $end_of_para = 0; # true if last line is

    while (@lines3) { $_ = shift(@lines3); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@doc_lines, $_); $end_of_para = 0; next; } # # footnotes # while (/\@footnote([^\{\s]+)\{/) { ($before, $d, $after) = ($`, $1, $'); $_ = $after; $text = ''; $after = ''; $failed = 1; while (@lines3) { if (/\}/) { $text .= $`; $after = $'; $failed = 0; last; } else { $text .= $_; $_ = shift(@lines3); } } if ($failed) { die "* Bad syntax (\@footnote) after: $before\n"; } else { $foot_num++; $docid = "DOCF$foot_num"; $footid = "FOOT$foot_num"; $foot = "($foot_num)"; push(@foot_lines, "

    " . &anchor($footid, "$d#$docid", $foot) . "

    \n"); $text = "

    $text" unless $text =~ /^\s*

    /; push(@foot_lines, "$text\n"); $_ = $before . &anchor($docid, "$docu_foot#$footid", $foot) . $after; } } # # remove unnecessary

    # if (/^\s*

    \s*$/) { next if $end_of_para++; } else { $end_of_para = 0; } # otherwise push(@doc_lines, $_); } print "# end of pass 4\n" if $verbose; #+++############################################################################ # # # Pass 5: print things # # # #---############################################################################ $header = < EOT $full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document"; $title = $value{'_settitle'} || $full_title; $_ = &substitute_style($full_title); &unprotect_texi; s/\n$//; # rmv last \n (if any) $full_title = "

    " . join("

    \n

    ", split(/\n/, $_)) . "

    \n"; # # print ToC # if (!$monolithic && @toc_lines) { if (open(FILE, "> $docu_toc")) { print "# creating $docu_toc...\n" if $verbose; &print_toplevel_header("$title - Table of Contents"); &print_ruler; &print(*toc_lines, FILE); &print_toplevel_footer; close(FILE); } else { warn "$ERROR Can't write to $docu_toc: $!\n"; } } # # print footnotes # if (!$monolithic && @foot_lines) { if (open(FILE, "> $docu_foot")) { print "# creating $docu_foot...\n" if $verbose; &print_toplevel_header("$title - Footnotes"); &print_ruler; &print(*foot_lines, FILE); &print_toplevel_footer; close(FILE); } else { warn "$ERROR Can't write to $docu_foot: $!\n"; } } # # print document # if ($split_chapter || $split_node) { # split $doc_num = 0; $last_num = scalar(@sections); $first_doc = &doc_name(1); $last_doc = &doc_name($last_num); while (@sections) { $section = shift(@sections); &next_doc; if (open(FILE, "> $docu_doc")) { print "# creating $docu_doc...\n" if $verbose; &print_header("$title - $section"); $prev_doc = ($doc_num == 1 ? undef : &doc_name($doc_num - 1)); $next_doc = ($doc_num == $last_num ? undef : &doc_name($doc_num + 1)); $navigation = "Go to the "; $navigation .= ($prev_doc ? &anchor('', $first_doc, "first") : "first"); $navigation .= ", "; $navigation .= ($prev_doc ? &anchor('', $prev_doc, "previous") : "previous"); $navigation .= ", "; $navigation .= ($next_doc ? &anchor('', $next_doc, "next") : "next"); $navigation .= ", "; $navigation .= ($next_doc ? &anchor('', $last_doc, "last") : "last"); $navigation .= " section, " . &anchor('', $docu_toc, "table of contents") . ".\n"; print FILE $navigation; &print_ruler; # find corresponding lines @tmp_lines = (); while (@doc_lines) { $_ = shift(@doc_lines); last if ($_ eq $SPLITTAG); push(@tmp_lines, $_); } &print(*tmp_lines, FILE); &print_ruler; print FILE $navigation; &print_footer; close(FILE); } else { warn "$ERROR Can't write to $docu_doc: $!\n"; } } } else { # not split if (open(FILE, "> $docu_doc")) { print "# creating $docu_doc...\n" if $verbose; if ($monolithic || !@toc_lines) { &print_toplevel_header($title); } else { &print_header($title); print FILE $full_title; } if ($monolithic && @toc_lines) { &print_ruler; print FILE "

    Table of Contents

    \n"; &print(*toc_lines, FILE); } &print_ruler; &print(*doc_lines, FILE); if ($monolithic && @foot_lines) { &print_ruler; print FILE "

    Footnotes

    \n"; &print(*foot_lines, FILE); } if ($monolithic || !@toc_lines) { &print_toplevel_footer; } else { &print_footer; } close(FILE); } else { warn "$ERROR Can't write to $docu_doc: $!\n"; } } print "# that's all folks\n" if $verbose; #+++############################################################################ # # # Low level functions # # # #---############################################################################ sub update_sec_num { local($name, $level) = @_; $level--; # here we start at 0 if ($name =~ /^appendix/) { # appendix style if (defined(@appendix_sec_num)) { &incr_sec_num($level, @appendix_sec_num); } else { @appendix_sec_num = ('A', 0, 0, 0); } return(join('.', @appendix_sec_num[0..$level])); } else { # normal style if (defined(@normal_sec_num)) { &incr_sec_num($level, @normal_sec_num); } else { @normal_sec_num = (1, 0, 0, 0); } return(join('.', @normal_sec_num[0..$level])); } } sub incr_sec_num { local($level, $l); $level = shift(@_); $_[$level]++; foreach $l ($level+1 .. 3) { $_[$l] = 0; } } sub check { local($_, %seen, %context, $before, $match, $after); while (<>) { if (/\@(\*|\.|\:|\@|\{|\})/) { $seen{$&}++; $context{$&} .= "> $_" if $verbose; $_ = "$`XX$'"; redo; } if (/\@(\w+)/) { ($before, $match, $after) = ($`, $&, $'); if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address $seen{'e-mail address'}++; $context{'e-mail address'} .= "> $_" if $verbose; } else { $seen{$match}++; $context{$match} .= "> $_" if $verbose; } $match =~ s/^\@/X/; $_ = "$before$match$after"; redo; } } foreach (sort(keys(%seen))) { if ($verbose) { print "$_\n"; print $context{$_}; } else { print "$_ ($seen{$_})\n"; } } } sub open { local($name) = @_; ++$fh_name; if (open($fh_name, $name)) { unshift(@fhs, $fh_name); } else { warn "$ERROR Can't read file $name: $!\n"; } } sub init_input { @fhs = (); # hold the file handles to read @input_spool = (); # spooled lines to read $fh_name = 'FH000'; &open($docu); } sub next_line { local($fh, $line); if (@input_spool) { $line = shift(@input_spool); return($line); } while (@fhs) { $fh = $fhs[0]; $line = <$fh>; return($line) if $line; close($fh); shift(@fhs); } return(undef); } # used in pass 1, use &next_line sub skip_until { local($tag) = @_; local($_); while ($_ = &next_line) { return if /^\@end\s+$tag\s*$/; } die "* Failed to find '$tag' after: " . $lines[$#lines]; } # # HTML stacking to have a better HTML output # sub html_reset { @html_stack = ('html'); $html_element = 'body'; } sub html_push { local($what) = @_; push(@html_stack, $html_element); $html_element = $what; } sub html_push_if { local($what) = @_; push(@html_stack, $html_element) if ($html_element && $html_element ne 'P'); $html_element = $what; } sub html_pop { $html_element = pop(@html_stack); } sub html_pop_if { local($elt); if (@_) { foreach $elt (@_) { if ($elt eq $html_element) { $html_element = pop(@html_stack) if @html_stack; last; } } } else { $html_element = pop(@html_stack) if @html_stack; } } sub html_debug { local($what, $line) = @_; return("$what") if $debug & $DEBUG_HTML; return($what); } # to debug the output... sub debug { local($what, $line) = @_; return("$what") if $debug & $DEBUG_HTML; return($what); } sub normalise_node { $_[0] =~ s/\s+/ /g; $_[0] =~ s/ $//; $_[0] =~ s/^ //; } sub menu_entry { local($entry, $node, $descr) = @_; local($href); &normalise_node($node); $href = $node2href{$node}; if ($href) { $descr =~ s/^\s+//; $descr = ": $descr" if $descr; push(@lines2, "
  • " . &anchor('', $href, $entry) . "$descr\n"); } else { warn "$ERROR Undefined node ($node): $_"; } } sub do_ctrl { "^$_[0]" } sub do_email { local($addr, $text) = split(/,\s*/, $_[0]); $text = $addr unless $text; &anchor('', "mailto:$addr", $text); } sub do_sc { "\U$_[0]\E" } sub do_uref { local($url, $text) = split(/,\s*/, $_[0]); $text = $url unless $text; &anchor('', $url, $text); } sub do_url { &anchor('', $_[0], $_[0]) } sub apply_style { local($texi_style, $text) = @_; local($style); $style = $style_map{$texi_style}; if (defined($style)) { # known style if ($style =~ /^\"/) { # add quotes $style = $'; $text = "\`$text\'"; } if ($style =~ /^\&/) { # custom $style = $'; $text = &$style($text); } elsif ($style) { # good style $text = "<$style>$text"; } else { # no style } } else { # unknown style $text = undef; } return($text); } # remove Texinfo styles sub remove_style { local($_) = @_; s/\@\w+{([^\{\}]+)}/$1/g; return($_); } sub substitute_style { local($_) = @_; local($changed, $done, $style, $text); $changed = 1; while ($changed) { $changed = 0; $done = ''; while (/\@(\w+){([^\{\}]+)}/) { $text = &apply_style($1, $2); if ($text) { $_ = "$`$text$'"; $changed = 1; } else { $done .= "$`\@$1"; $_ = "{$2}$'"; } } $_ = $done . $_; } return($_); } sub anchor { local($name, $href, $text, $newline) = @_; local($result); $result = "

    \n"; } sub print_header { local($_); # clean the title $_ = &remove_style($_[0]); &unprotect_texi; # print the header if ($doctype eq 'html2') { print FILE $html2_doctype; } elsif ($doctype) { print FILE $doctype; } print FILE < $header $_ EOT } sub print_toplevel_header { local($_); &print_header; # pass given arg... print FILE $full_title; if ($value{'_subtitle'}) { $value{'_subtitle'} =~ s/\n+$//; foreach (split(/\n/, $value{'_subtitle'})) { $_ = &substitute_style($_); &unprotect_texi; print FILE "

    $_

    \n"; } } if ($value{'_author'}) { $value{'_author'} =~ s/\n+$//; foreach (split(/\n/, $value{'_author'})) { $_ = &substitute_style($_); &unprotect_texi; s/[\w.-]+\@[\w.-]+/
    $&<\/A>/g; print FILE "
    $_
    \n"; } } print FILE "

    \n"; } sub print_footer { print FILE < EOT } sub print_toplevel_footer { &print_ruler; print FILE <texi2html translator version 1.52. (properly hacked by athena\@theory.lcs.mit.edu)

    EOT &print_footer; } sub protect_texi { # protect @ { } ` ' s/\@\@/$;0/go; s/\@\{/$;1/go; s/\@\}/$;2/go; s/\@\`/$;3/go; s/\@\'/$;4/go; } sub protect_html { local($what) = @_; # protect & < > $what =~ s/\&/\&\#38;/g; $what =~ s/\/\&\#62;/g; # but recognize some HTML things $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # return($what); } sub unprotect_texi { s/$;0/\@/go; s/$;1/\{/go; s/$;2/\}/go; s/$;3/\`/go; s/$;4/\'/go; } sub unprotect_html { local($what) = @_; $what =~ s/\&\#38;/\&/g; $what =~ s/\&\#60;/\/g; return($what); } sub byalpha { $key2alpha{$a} cmp $key2alpha{$b}; } ############################################################################## # These next few lines are legal in both Perl and nroff. .00 ; # finish .ig 'di \" finish diversion--previous line must be blank .nr nl 0-1 \" fake up transition to first page again .nr % 0 \" start at page 1 '; __END__ ############# From here on it's a standard manual page ############ .TH TEXI2HTML 1 "01/05/98" .AT 3 .SH NAME texi2html \- a Texinfo to HTML converter .SH SYNOPSIS .B texi2html [options] file .PP .B texi2html -check [-verbose] files .SH DESCRIPTION .I Texi2html converts the given Texinfo file to a set of HTML files. It tries to handle most of the Texinfo commands. It creates hypertext links for cross-references, footnotes... .PP It also tries to add links from a reference to its corresponding entry in the bibliography (if any). It may also handle a glossary (see the .B \-glossary option). .PP .I Texi2html creates several files depending on the contents of the Texinfo file and on the chosen options (see FILES). .PP The HTML files created by .I texi2html are closer to TeX than to Info, that's why .I texi2html converts @iftex sections and not @ifinfo ones by default. You can reverse this with the \-expandinfo option. .SH OPTIONS .TP 12 .B \-check Check the given file and give the list of all things that may be Texinfo commands. This may be used to check the output of .I texi2html to find the Texinfo commands that have been left in the HTML file. .TP .B \-expandinfo Expand @ifinfo sections, not @iftex ones. .TP .B \-glossary Use the section named 'Glossary' to build a list of terms and put links in the HTML document from each term toward its definition. .TP .B \-invisible \fIname\fP Use \fIname\fP to create invisible destination anchors for index links (you can for instance use the invisible.xbm file shipped with this program). This is a workaround for a known bug of many WWW browsers, including netscape. .TP .B \-I \fIdir\fP Look also in \fIdir\fP to find included files. .TP .B \-menu Show the Texinfo menus; by default they are ignored. .TP .B \-monolithic Output only one file, including the table of contents and footnotes. .TP .B \-number Number the sections. .TP .B \-split_chapter Split the output into several HTML files (one per main section: chapter, appendix...). .TP .B \-split_node Split the output into several HTML files (one per node). .TP .B \-usage Print usage instructions, listing the current available command-line options. .TP .B \-verbose Give a verbose output. Can be used with the .B \-check option. .PP .SH FILES By default .I texi2html creates the following files (foo being the name of the Texinfo file): .TP 16 .B foo_toc.html The table of contents. .TP .B foo.html The document's contents. .TP .B foo_foot.html The footnotes (if any). .PP When used with the .B \-split option, it creates several files (one per chapter or node), named .B foo_n.html (n being the indice of the chapter or node), instead of the single .B foo.html file. .PP When used with the .B \-monolithic option, it creates only one file: .B foo.html .SH VARIABLES .I texi2html predefines the following variables: \fBhtml\fP, \fBtexi2html\fP. .SH ADDITIONAL COMMANDS .I texi2html implements the following non-Texinfo commands (maybe they are in Texinfo now...): .TP 16 .B @ifhtml This indicates the start of an HTML section, this section will passed through without any modification. .TP .B @end ifhtml This indicates the end of an HTML section. .SH VERSION This is \fItexi2html\fP version 1.52, 01/05/98. .PP The latest version of \fItexi2html\fP can be found in WWW, cf. URL http://wwwinfo.cern.ch/dis/texi2html/ .SH AUTHOR The main author is Lionel Cons, CERN IT/DIS/OSE, Lionel.Cons@cern.ch. Many other people around the net contributed to this program. .SH COPYRIGHT This program is the intellectual property of the European Laboratory for Particle Physics (known as CERN). No guarantee whatsoever is provided by CERN. No liability whatsoever is accepted for any loss or damage of any kind resulting from any defect or inaccuracy in this information or code. .PP CERN, 1211 Geneva 23, Switzerland .SH "SEE ALSO" GNU Texinfo Documentation Format, HyperText Markup Language (HTML), World Wide Web (WWW). .SH BUGS This program does not understand all Texinfo commands (yet). .PP TeX specific commands (normally enclosed in @iftex) will be passed unmodified. .ex fftw-2.1.5/doc/rfftwnd.fig0000644000175400001440000012664307635206026011076 #FIG 3.2 Portrait Flush left Inches Letter 100.00 Single -2 1200 2 0 32 #797d79 0 33 #efebef 0 34 #e73020 0 35 #f78e86 0 36 #6996c7 0 37 #86aad7 0 38 #dfdb00 6 75 75 6450 9750 2 1 0 0 7 7 998 0 20 4.000 0 0 0 0 0 5 1221 7280 6435 7280 6435 9676 1221 9676 1221 7280 2 1 0 1 32 32 997 0 -1 4.000 0 0 0 0 0 5 1221 7280 6435 7280 6435 9676 1221 9676 1221 7280 2 1 0 0 33 33 996 0 20 4.000 0 0 0 0 0 5 1221 7280 1620 7280 1620 7656 1221 7656 1221 7280 2 1 0 1 32 32 995 0 -1 4.000 0 0 0 0 0 5 1221 7280 1620 7280 1620 7656 1221 7656 1221 7280 2 1 0 0 33 33 994 0 20 4.000 0 0 0 0 0 5 1620 7280 2019 7280 2019 7656 1620 7656 1620 7280 2 1 0 1 32 32 993 0 -1 4.000 0 0 0 0 0 5 1620 7280 2019 7280 2019 7656 1620 7656 1620 7280 2 1 0 0 33 33 992 0 20 4.000 0 0 0 0 0 5 2019 7280 2418 7280 2418 7656 2019 7656 2019 7280 2 1 0 1 32 32 991 0 -1 4.000 0 0 0 0 0 5 2019 7280 2418 7280 2418 7656 2019 7656 2019 7280 2 1 0 0 33 33 990 0 20 4.000 0 0 0 0 0 5 2418 7280 2817 7280 2817 7656 2418 7656 2418 7280 2 1 0 1 32 32 989 0 -1 4.000 0 0 0 0 0 5 2418 7280 2817 7280 2817 7656 2418 7656 2418 7280 2 1 0 0 33 33 988 0 20 4.000 0 0 0 0 0 5 4038 7280 4438 7280 4438 7656 4038 7656 4038 7280 2 1 0 1 32 32 987 0 -1 4.000 0 0 0 0 0 5 4038 7280 4438 7280 4438 7656 4038 7656 4038 7280 2 1 0 0 33 33 986 0 20 4.000 0 0 0 0 0 5 4438 7280 4837 7280 4837 7656 4438 7656 4438 7280 2 1 0 1 32 32 985 0 -1 4.000 0 0 0 0 0 5 4438 7280 4837 7280 4837 7656 4438 7656 4438 7280 2 1 0 0 33 33 984 0 20 4.000 0 0 0 0 0 5 4837 7280 5236 7280 5236 7656 4837 7656 4837 7280 2 1 0 1 32 32 983 0 -1 4.000 0 0 0 0 0 5 4837 7280 5236 7280 5236 7656 4837 7656 4837 7280 2 1 0 0 33 33 982 0 20 4.000 0 0 0 0 0 5 5236 7280 5635 7280 5635 7656 5236 7656 5236 7280 2 1 0 1 32 32 981 0 -1 4.000 0 0 0 0 0 5 5236 7280 5635 7280 5635 7656 5236 7656 5236 7280 2 1 0 0 33 33 980 0 20 4.000 0 0 0 0 0 5 1221 7656 1620 7656 1620 8032 1221 8032 1221 7656 2 1 0 1 32 32 979 0 -1 4.000 0 0 0 0 0 5 1221 7656 1620 7656 1620 8032 1221 8032 1221 7656 2 1 0 0 33 33 978 0 20 4.000 0 0 0 0 0 5 1620 7656 2019 7656 2019 8032 1620 8032 1620 7656 2 1 0 1 32 32 977 0 -1 4.000 0 0 0 0 0 5 1620 7656 2019 7656 2019 8032 1620 8032 1620 7656 2 1 0 0 33 33 976 0 20 4.000 0 0 0 0 0 5 2019 7656 2418 7656 2418 8032 2019 8032 2019 7656 2 1 0 1 32 32 975 0 -1 4.000 0 0 0 0 0 5 2019 7656 2418 7656 2418 8032 2019 8032 2019 7656 2 1 0 0 33 33 974 0 20 4.000 0 0 0 0 0 5 2418 7656 2817 7656 2817 8032 2418 8032 2418 7656 2 1 0 1 32 32 973 0 -1 4.000 0 0 0 0 0 5 2418 7656 2817 7656 2817 8032 2418 8032 2418 7656 2 1 0 0 33 33 972 0 20 4.000 0 0 0 0 0 5 4038 7656 4438 7656 4438 8032 4038 8032 4038 7656 2 1 0 1 32 32 971 0 -1 4.000 0 0 0 0 0 5 4038 7656 4438 7656 4438 8032 4038 8032 4038 7656 2 1 0 0 33 33 970 0 20 4.000 0 0 0 0 0 5 4438 7656 4837 7656 4837 8032 4438 8032 4438 7656 2 1 0 1 32 32 969 0 -1 4.000 0 0 0 0 0 5 4438 7656 4837 7656 4837 8032 4438 8032 4438 7656 2 1 0 0 33 33 968 0 20 4.000 0 0 0 0 0 5 4837 7656 5236 7656 5236 8032 4837 8032 4837 7656 2 1 0 1 32 32 967 0 -1 4.000 0 0 0 0 0 5 4837 7656 5236 7656 5236 8032 4837 8032 4837 7656 2 1 0 0 33 33 966 0 20 4.000 0 0 0 0 0 5 5236 7656 5635 7656 5635 8032 5236 8032 5236 7656 2 1 0 1 32 32 965 0 -1 4.000 0 0 0 0 0 5 5236 7656 5635 7656 5635 8032 5236 8032 5236 7656 2 1 0 0 33 33 964 0 20 4.000 0 0 0 0 0 5 1221 8924 1620 8924 1620 9300 1221 9300 1221 8924 2 1 0 1 32 32 963 0 -1 4.000 0 0 0 0 0 5 1221 8924 1620 8924 1620 9300 1221 9300 1221 8924 2 1 0 0 33 33 962 0 20 4.000 0 0 0 0 0 5 1620 8924 2019 8924 2019 9300 1620 9300 1620 8924 2 1 0 1 32 32 961 0 -1 4.000 0 0 0 0 0 5 1620 8924 2019 8924 2019 9300 1620 9300 1620 8924 2 1 0 0 33 33 960 0 20 4.000 0 0 0 0 0 5 2019 8924 2418 8924 2418 9300 2019 9300 2019 8924 2 1 0 1 32 32 959 0 -1 4.000 0 0 0 0 0 5 2019 8924 2418 8924 2418 9300 2019 9300 2019 8924 2 1 0 0 33 33 958 0 20 4.000 0 0 0 0 0 5 2418 8924 2817 8924 2817 9300 2418 9300 2418 8924 2 1 0 1 32 32 957 0 -1 4.000 0 0 0 0 0 5 2418 8924 2817 8924 2817 9300 2418 9300 2418 8924 2 1 0 0 33 33 956 0 20 4.000 0 0 0 0 0 5 4038 8924 4438 8924 4438 9300 4038 9300 4038 8924 2 1 0 1 32 32 955 0 -1 4.000 0 0 0 0 0 5 4038 8924 4438 8924 4438 9300 4038 9300 4038 8924 2 1 0 0 33 33 954 0 20 4.000 0 0 0 0 0 5 4438 8924 4837 8924 4837 9300 4438 9300 4438 8924 2 1 0 1 32 32 953 0 -1 4.000 0 0 0 0 0 5 4438 8924 4837 8924 4837 9300 4438 9300 4438 8924 2 1 0 0 33 33 952 0 20 4.000 0 0 0 0 0 5 4837 8924 5236 8924 5236 9300 4837 9300 4837 8924 2 1 0 1 32 32 951 0 -1 4.000 0 0 0 0 0 5 4837 8924 5236 8924 5236 9300 4837 9300 4837 8924 2 1 0 0 33 33 950 0 20 4.000 0 0 0 0 0 5 5236 8924 5635 8924 5635 9300 5236 9300 5236 8924 2 1 0 1 32 32 949 0 -1 4.000 0 0 0 0 0 5 5236 8924 5635 8924 5635 9300 5236 9300 5236 8924 2 1 0 0 33 33 948 0 20 4.000 0 0 0 0 0 5 1221 9300 1620 9300 1620 9676 1221 9676 1221 9300 2 1 0 1 32 32 947 0 -1 4.000 0 0 0 0 0 5 1221 9300 1620 9300 1620 9676 1221 9676 1221 9300 2 1 0 0 33 33 946 0 20 4.000 0 0 0 0 0 5 1620 9300 2019 9300 2019 9676 1620 9676 1620 9300 2 1 0 1 32 32 945 0 -1 4.000 0 0 0 0 0 5 1620 9300 2019 9300 2019 9676 1620 9676 1620 9300 2 1 0 0 33 33 944 0 20 4.000 0 0 0 0 0 5 2019 9300 2418 9300 2418 9676 2019 9676 2019 9300 2 1 0 1 32 32 943 0 -1 4.000 0 0 0 0 0 5 2019 9300 2418 9300 2418 9676 2019 9676 2019 9300 2 1 0 0 33 33 942 0 20 4.000 0 0 0 0 0 5 2418 9300 2817 9300 2817 9676 2418 9676 2418 9300 2 1 0 1 32 32 941 0 -1 4.000 0 0 0 0 0 5 2418 9300 2817 9300 2817 9676 2418 9676 2418 9300 2 1 0 0 33 33 940 0 20 4.000 0 0 0 0 0 5 4038 9300 4438 9300 4438 9676 4038 9676 4038 9300 2 1 0 1 32 32 939 0 -1 4.000 0 0 0 0 0 5 4038 9300 4438 9300 4438 9676 4038 9676 4038 9300 2 1 0 0 33 33 938 0 20 4.000 0 0 0 0 0 5 4438 9300 4837 9300 4837 9676 4438 9676 4438 9300 2 1 0 1 32 32 937 0 -1 4.000 0 0 0 0 0 5 4438 9300 4837 9300 4837 9676 4438 9676 4438 9300 2 1 0 0 33 33 936 0 20 4.000 0 0 0 0 0 5 4837 9300 5236 9300 5236 9676 4837 9676 4837 9300 2 1 0 1 32 32 935 0 -1 4.000 0 0 0 0 0 5 4837 9300 5236 9300 5236 9676 4837 9676 4837 9300 2 1 0 0 33 33 934 0 20 4.000 0 0 0 0 0 5 5236 9300 5635 9300 5635 9676 5236 9676 5236 9300 2 1 0 1 32 32 933 0 -1 4.000 0 0 0 0 0 5 5236 9300 5635 9300 5635 9676 5236 9676 5236 9300 2 1 0 1 32 32 930 0 -1 4.000 0 0 0 0 0 2 2819 7658 2869 7658 2 1 0 1 32 32 929 0 -1 4.000 0 0 0 0 0 2 2952 7658 3002 7658 2 1 0 1 32 32 928 0 -1 4.000 0 0 0 0 0 2 3085 7658 3135 7658 2 1 0 1 32 32 927 0 -1 4.000 0 0 0 0 0 2 3219 7658 3252 7658 2 1 0 1 32 32 926 0 -1 4.000 0 0 0 0 0 2 2819 8033 2869 8033 2 1 0 1 32 32 925 0 -1 4.000 0 0 0 0 0 2 2952 8033 3002 8033 2 1 0 1 32 32 924 0 -1 4.000 0 0 0 0 0 2 3085 8033 3135 8033 2 1 0 1 32 32 923 0 -1 4.000 0 0 0 0 0 2 3219 8033 3252 8033 2 1 0 1 32 32 922 0 -1 4.000 0 0 0 0 0 2 2819 8025 2819 8075 2 1 0 1 32 32 921 0 -1 4.000 0 0 0 0 0 2 2819 8158 2819 8208 2 1 0 1 32 32 920 0 -1 4.000 0 0 0 0 0 2 2819 8291 2819 8341 2 1 0 1 32 32 919 0 -1 4.000 0 0 0 0 0 2 2419 8025 2419 8075 2 1 0 1 32 32 918 0 -1 4.000 0 0 0 0 0 2 2419 8158 2419 8208 2 1 0 1 32 32 917 0 -1 4.000 0 0 0 0 0 2 2419 8291 2419 8341 2 1 0 1 32 32 916 0 -1 4.000 0 0 0 0 0 2 2019 8025 2019 8075 2 1 0 1 32 32 915 0 -1 4.000 0 0 0 0 0 2 2019 8158 2019 8208 2 1 0 1 32 32 914 0 -1 4.000 0 0 0 0 0 2 2019 8291 2019 8341 2 1 0 1 32 32 913 0 -1 4.000 0 0 0 0 0 2 1619 8025 1619 8075 2 1 0 1 32 32 912 0 -1 4.000 0 0 0 0 0 2 1619 8158 1619 8208 2 1 0 1 32 32 911 0 -1 4.000 0 0 0 0 0 2 1619 8291 1619 8341 2 1 0 1 32 32 910 0 -1 4.000 0 0 0 0 0 2 4036 7658 3986 7658 2 1 0 1 32 32 909 0 -1 4.000 0 0 0 0 0 2 3902 7658 3852 7658 2 1 0 1 32 32 908 0 -1 4.000 0 0 0 0 0 2 3769 7658 3719 7658 2 1 0 1 32 32 907 0 -1 4.000 0 0 0 0 0 2 3636 7658 3602 7658 2 1 0 1 32 32 906 0 -1 4.000 0 0 0 0 0 2 4036 8033 3986 8033 2 1 0 1 32 32 905 0 -1 4.000 0 0 0 0 0 2 3902 8033 3852 8033 2 1 0 1 32 32 904 0 -1 4.000 0 0 0 0 0 2 3769 8033 3719 8033 2 1 0 1 32 32 903 0 -1 4.000 0 0 0 0 0 2 3636 8033 3602 8033 2 1 0 1 32 32 902 0 -1 4.000 0 0 0 0 0 2 4035 8025 4035 8075 2 1 0 1 32 32 901 0 -1 4.000 0 0 0 0 0 2 4035 8158 4035 8208 2 1 0 1 32 32 900 0 -1 4.000 0 0 0 0 0 2 4035 8291 4035 8341 2 1 0 1 32 32 899 0 -1 4.000 0 0 0 0 0 2 4435 8025 4435 8075 2 1 0 1 32 32 898 0 -1 4.000 0 0 0 0 0 2 4435 8158 4435 8208 2 1 0 1 32 32 897 0 -1 4.000 0 0 0 0 0 2 4435 8291 4435 8341 2 1 0 1 32 32 896 0 -1 4.000 0 0 0 0 0 2 4835 8025 4835 8075 2 1 0 1 32 32 895 0 -1 4.000 0 0 0 0 0 2 4835 8158 4835 8208 2 1 0 1 32 32 894 0 -1 4.000 0 0 0 0 0 2 4835 8291 4835 8341 2 1 0 1 32 32 893 0 -1 4.000 0 0 0 0 0 2 5235 8025 5235 8075 2 1 0 1 32 32 892 0 -1 4.000 0 0 0 0 0 2 5235 8158 5235 8208 2 1 0 1 32 32 891 0 -1 4.000 0 0 0 0 0 2 5235 8291 5235 8341 2 1 0 1 32 32 890 0 -1 4.000 0 0 0 0 0 2 4036 9300 3986 9300 2 1 0 1 32 32 889 0 -1 4.000 0 0 0 0 0 2 3902 9300 3852 9300 2 1 0 1 32 32 888 0 -1 4.000 0 0 0 0 0 2 3769 9300 3719 9300 2 1 0 1 32 32 887 0 -1 4.000 0 0 0 0 0 2 3636 9300 3602 9300 2 1 0 1 32 32 886 0 -1 4.000 0 0 0 0 0 2 4036 8925 3986 8925 2 1 0 1 32 32 885 0 -1 4.000 0 0 0 0 0 2 3902 8925 3852 8925 2 1 0 1 32 32 884 0 -1 4.000 0 0 0 0 0 2 3769 8925 3719 8925 2 1 0 1 32 32 883 0 -1 4.000 0 0 0 0 0 2 3636 8925 3602 8925 2 1 0 1 32 32 882 0 -1 4.000 0 0 0 0 0 2 4035 8933 4035 8883 2 1 0 1 32 32 881 0 -1 4.000 0 0 0 0 0 2 4035 8800 4035 8750 2 1 0 1 32 32 880 0 -1 4.000 0 0 0 0 0 2 4035 8666 4035 8616 2 1 0 1 32 32 879 0 -1 4.000 0 0 0 0 0 2 4435 8933 4435 8883 2 1 0 1 32 32 878 0 -1 4.000 0 0 0 0 0 2 4435 8800 4435 8750 2 1 0 1 32 32 877 0 -1 4.000 0 0 0 0 0 2 4435 8666 4435 8616 2 1 0 1 32 32 876 0 -1 4.000 0 0 0 0 0 2 4835 8933 4835 8883 2 1 0 1 32 32 875 0 -1 4.000 0 0 0 0 0 2 4835 8800 4835 8750 2 1 0 1 32 32 874 0 -1 4.000 0 0 0 0 0 2 4835 8666 4835 8616 2 1 0 1 32 32 873 0 -1 4.000 0 0 0 0 0 2 5235 8933 5235 8883 2 1 0 1 32 32 872 0 -1 4.000 0 0 0 0 0 2 5235 8800 5235 8750 2 1 0 1 32 32 871 0 -1 4.000 0 0 0 0 0 2 5235 8666 5235 8616 2 1 0 1 32 32 870 0 -1 4.000 0 0 0 0 0 2 2819 9300 2869 9300 2 1 0 1 32 32 869 0 -1 4.000 0 0 0 0 0 2 2952 9300 3002 9300 2 1 0 1 32 32 868 0 -1 4.000 0 0 0 0 0 2 3085 9300 3135 9300 2 1 0 1 32 32 867 0 -1 4.000 0 0 0 0 0 2 3219 9300 3252 9300 2 1 0 1 32 32 866 0 -1 4.000 0 0 0 0 0 2 2819 8925 2869 8925 2 1 0 1 32 32 865 0 -1 4.000 0 0 0 0 0 2 2952 8925 3002 8925 2 1 0 1 32 32 864 0 -1 4.000 0 0 0 0 0 2 3085 8925 3135 8925 2 1 0 1 32 32 863 0 -1 4.000 0 0 0 0 0 2 3219 8925 3252 8925 2 1 0 1 32 32 862 0 -1 4.000 0 0 0 0 0 2 2819 8933 2819 8883 2 1 0 1 32 32 861 0 -1 4.000 0 0 0 0 0 2 2819 8800 2819 8750 2 1 0 1 32 32 860 0 -1 4.000 0 0 0 0 0 2 2819 8666 2819 8616 2 1 0 1 32 32 859 0 -1 4.000 0 0 0 0 0 2 2419 8933 2419 8883 2 1 0 1 32 32 858 0 -1 4.000 0 0 0 0 0 2 2419 8800 2419 8750 2 1 0 1 32 32 857 0 -1 4.000 0 0 0 0 0 2 2419 8666 2419 8616 2 1 0 1 32 32 856 0 -1 4.000 0 0 0 0 0 2 2019 8933 2019 8883 2 1 0 1 32 32 855 0 -1 4.000 0 0 0 0 0 2 2019 8800 2019 8750 2 1 0 1 32 32 854 0 -1 4.000 0 0 0 0 0 2 2019 8666 2019 8616 2 1 0 1 32 32 853 0 -1 4.000 0 0 0 0 0 2 1619 8933 1619 8883 2 1 0 1 32 32 852 0 -1 4.000 0 0 0 0 0 2 1619 8800 1619 8750 2 1 0 1 32 32 851 0 -1 4.000 0 0 0 0 0 2 1619 8666 1619 8616 2 1 0 0 35 35 836 0 20 4.000 0 0 0 0 0 5 5636 7280 6035 7280 6035 7656 5636 7656 5636 7280 2 1 0 1 32 32 835 0 -1 4.000 0 0 0 0 0 5 5636 7280 6035 7280 6035 7656 5636 7656 5636 7280 2 1 0 0 35 35 834 0 20 4.000 0 0 0 0 0 5 5636 7656 6035 7656 6035 8032 5636 8032 5636 7656 2 1 0 1 32 32 833 0 -1 4.000 0 0 0 0 0 5 5636 7656 6035 7656 6035 8032 5636 8032 5636 7656 2 1 0 0 35 35 832 0 20 4.000 0 0 0 0 0 5 5636 8924 6035 8924 6035 9300 5636 9300 5636 8924 2 1 0 1 32 32 831 0 -1 4.000 0 0 0 0 0 5 5636 8924 6035 8924 6035 9300 5636 9300 5636 8924 2 1 0 0 35 35 830 0 20 4.000 0 0 0 0 0 5 5636 9300 6035 9300 6035 9676 5636 9676 5636 9300 2 1 0 1 32 32 829 0 -1 4.000 0 0 0 0 0 5 5636 9300 6035 9300 6035 9676 5636 9676 5636 9300 2 1 0 0 35 35 828 0 20 4.000 0 0 0 0 0 5 6036 7280 6435 7280 6435 7656 6036 7656 6036 7280 2 1 0 1 32 32 827 0 -1 4.000 0 0 0 0 0 5 6036 7280 6435 7280 6435 7656 6036 7656 6036 7280 2 1 0 0 35 35 826 0 20 4.000 0 0 0 0 0 5 6036 7656 6435 7656 6435 8032 6036 8032 6036 7656 2 1 0 1 32 32 825 0 -1 4.000 0 0 0 0 0 5 6036 7656 6435 7656 6435 8032 6036 8032 6036 7656 2 1 0 0 35 35 824 0 20 4.000 0 0 0 0 0 5 6036 8924 6435 8924 6435 9300 6036 9300 6036 8924 2 1 0 1 32 32 823 0 -1 4.000 0 0 0 0 0 5 6036 8924 6435 8924 6435 9300 6036 9300 6036 8924 2 1 0 0 35 35 822 0 20 4.000 0 0 0 0 0 5 6036 9300 6435 9300 6435 9676 6036 9676 6036 9300 2 1 0 1 32 32 821 0 -1 4.000 0 0 0 0 0 5 6036 9300 6435 9300 6435 9676 6036 9676 6036 9300 2 1 0 1 0 0 820 0 -1 4.000 0 0 0 0 0 2 5635 7283 5635 9683 2 1 0 1 0 0 819 0 -1 4.000 0 0 0 0 0 2 1420 7515 6312 7515 2 1 0 0 0 0 818 0 20 4.000 0 0 0 0 0 3 6348 7518 6117 7462 6117 7515 2 1 0 1 0 0 817 0 -1 4.000 0 0 0 0 0 3 6348 7518 6117 7462 6117 7515 2 1 0 0 0 0 816 0 20 4.000 0 0 0 0 0 3 6348 7512 6117 7568 6117 7515 2 1 0 1 0 0 815 0 -1 4.000 0 0 0 0 0 3 6348 7512 6117 7568 6117 7515 2 1 0 1 0 0 814 0 -1 4.000 0 0 0 0 0 2 1420 7891 5863 7891 2 1 0 0 0 0 813 0 20 4.000 0 0 0 0 0 3 5895 7894 5685 7838 5685 7891 2 1 0 1 0 0 812 0 -1 4.000 0 0 0 0 0 3 5895 7894 5685 7838 5685 7891 2 1 0 0 0 0 811 0 20 4.000 0 0 0 0 0 3 5895 7888 5685 7944 5685 7891 2 1 0 1 0 0 810 0 -1 4.000 0 0 0 0 0 3 5895 7888 5685 7944 5685 7891 2 1 0 1 0 0 809 0 -1 4.000 0 0 0 0 0 2 1420 9112 5863 9112 2 1 0 0 0 0 808 0 20 4.000 0 0 0 0 0 3 5895 9115 5685 9059 5685 9112 2 1 0 1 0 0 807 0 -1 4.000 0 0 0 0 0 3 5895 9115 5685 9059 5685 9112 2 1 0 0 0 0 806 0 20 4.000 0 0 0 0 0 3 5895 9109 5685 9165 5685 9112 2 1 0 1 0 0 805 0 -1 4.000 0 0 0 0 0 3 5895 9109 5685 9165 5685 9112 2 1 0 1 0 0 804 0 -1 4.000 0 0 0 0 0 2 1420 9488 5863 9488 2 1 0 0 0 0 803 0 20 4.000 0 0 0 0 0 3 5895 9491 5685 9435 5685 9488 2 1 0 1 0 0 802 0 -1 4.000 0 0 0 0 0 3 5895 9491 5685 9435 5685 9488 2 1 0 0 0 0 801 0 20 4.000 0 0 0 0 0 3 5895 9485 5685 9541 5685 9488 2 1 0 1 0 0 800 0 -1 4.000 0 0 0 0 0 3 5895 9485 5685 9541 5685 9488 2 1 0 0 36 36 771 0 20 4.000 0 0 0 0 0 5 5226 5196 5623 5196 5623 5572 5226 5572 5226 5196 2 1 0 0 37 37 770 0 20 4.000 0 0 0 0 0 5 4827 5196 5226 5196 5226 5572 4827 5572 4827 5196 2 1 0 1 38 38 769 0 -1 4.000 0 0 0 0 0 5 4835 5194 5631 5194 5631 5569 4835 5569 4835 5194 2 1 0 0 36 36 768 0 20 4.000 0 0 0 0 0 5 4434 5196 4832 5196 4832 5572 4434 5572 4434 5196 2 1 0 0 37 37 767 0 20 4.000 0 0 0 0 0 5 4035 5196 4434 5196 4434 5572 4035 5572 4035 5196 2 1 0 1 38 38 766 0 -1 4.000 0 0 0 0 0 5 4044 5194 4840 5194 4840 5569 4044 5569 4044 5194 2 1 0 0 36 36 765 0 20 4.000 0 0 0 0 0 5 6026 5196 6440 5196 6440 5572 6026 5572 6026 5196 2 1 0 0 37 37 764 0 20 4.000 0 0 0 0 0 5 5627 5196 6026 5196 6026 5572 5627 5572 5627 5196 2 1 0 1 38 38 763 0 -1 4.000 0 0 0 0 0 5 5635 5194 6440 5194 6440 5569 5635 5569 5635 5194 2 1 0 0 36 36 762 0 20 4.000 0 0 0 0 0 5 5226 5571 5623 5571 5623 5947 5226 5947 5226 5571 2 1 0 0 37 37 761 0 20 4.000 0 0 0 0 0 5 4827 5571 5226 5571 5226 5947 4827 5947 4827 5571 2 1 0 1 38 38 760 0 -1 4.000 0 0 0 0 0 5 4835 5569 5631 5569 5631 5944 4835 5944 4835 5569 2 1 0 0 36 36 759 0 20 4.000 0 0 0 0 0 5 4434 5571 4832 5571 4832 5947 4434 5947 4434 5571 2 1 0 0 37 37 758 0 20 4.000 0 0 0 0 0 5 4035 5571 4434 5571 4434 5947 4035 5947 4035 5571 2 1 0 1 38 38 757 0 -1 4.000 0 0 0 0 0 5 4044 5569 4840 5569 4840 5944 4044 5944 4044 5569 2 1 0 0 36 36 756 0 20 4.000 0 0 0 0 0 5 6026 5571 6440 5571 6440 5947 6026 5947 6026 5571 2 1 0 0 37 37 755 0 20 4.000 0 0 0 0 0 5 5627 5571 6026 5571 6026 5947 5627 5947 5627 5571 2 1 0 1 38 38 754 0 -1 4.000 0 0 0 0 0 5 5635 5569 6440 5569 6440 5944 5635 5944 5635 5569 2 1 0 0 36 36 753 0 20 4.000 0 0 0 0 0 5 2409 5571 2807 5571 2807 5947 2409 5947 2409 5571 2 1 0 0 37 37 752 0 20 4.000 0 0 0 0 0 5 2010 5571 2409 5571 2409 5947 2010 5947 2010 5571 2 1 0 1 38 38 751 0 -1 4.000 0 0 0 0 0 5 2019 5561 2815 5561 2815 5936 2019 5936 2019 5561 2 1 0 0 36 36 750 0 20 4.000 0 0 0 0 0 5 1618 5571 2015 5571 2015 5947 1618 5947 1618 5571 2 1 0 0 37 37 749 0 20 4.000 0 0 0 0 0 5 1219 5571 1618 5571 1618 5947 1219 5947 1219 5571 2 1 0 1 38 38 748 0 -1 4.000 0 0 0 0 0 5 1227 5561 2023 5561 2023 5939 1227 5939 1227 5561 2 1 0 0 36 36 747 0 20 4.000 0 0 0 0 0 5 2409 5196 2807 5196 2807 5572 2409 5572 2409 5196 2 1 0 0 37 37 746 0 20 4.000 0 0 0 0 0 5 2010 5196 2409 5196 2409 5572 2010 5572 2010 5196 2 1 0 1 38 38 745 0 -1 4.000 0 0 0 0 0 5 2019 5186 2815 5186 2815 5561 2019 5561 2019 5186 2 1 0 0 36 36 744 0 20 4.000 0 0 0 0 0 5 1618 5196 2015 5196 2015 5572 1618 5572 1618 5196 2 1 0 0 37 37 743 0 20 4.000 0 0 0 0 0 5 1219 5196 1618 5196 1618 5572 1219 5572 1219 5196 2 1 0 1 38 38 742 0 -1 4.000 0 0 0 0 0 5 1227 5186 2023 5186 2023 5561 1227 5561 1227 5186 2 1 0 0 36 36 741 0 20 4.000 0 0 0 0 0 5 5226 3546 5623 3546 5623 3922 5226 3922 5226 3546 2 1 0 0 37 37 740 0 20 4.000 0 0 0 0 0 5 4827 3546 5226 3546 5226 3922 4827 3922 4827 3546 2 1 0 1 32 32 739 0 -1 4.000 0 0 0 0 0 5 4835 3544 5631 3544 5631 3919 4835 3919 4835 3544 2 1 0 0 36 36 738 0 20 4.000 0 0 0 0 0 5 4434 3546 4832 3546 4832 3922 4434 3922 4434 3546 2 1 0 0 37 37 737 0 20 4.000 0 0 0 0 0 5 4035 3546 4434 3546 4434 3922 4035 3922 4035 3546 2 1 0 1 38 38 736 0 -1 4.000 0 0 0 0 0 5 4044 3544 4840 3544 4840 3919 4044 3919 4044 3544 2 1 0 0 36 36 735 0 20 4.000 0 0 0 0 0 5 5990 3546 6432 3546 6432 3955 5990 3955 5990 3546 2 1 0 0 37 37 734 0 20 4.000 0 0 0 0 0 5 5627 3546 6026 3546 6026 3922 5627 3922 5627 3546 2 1 0 1 38 38 733 0 -1 4.000 0 0 0 0 0 5 5635 3544 6440 3544 6440 3919 5635 3919 5635 3544 2 1 0 0 36 36 732 0 20 4.000 0 0 0 0 0 5 5226 3921 5623 3921 5623 4297 5226 4297 5226 3921 2 1 0 0 37 37 731 0 20 4.000 0 0 0 0 0 5 4827 3921 5226 3921 5226 4297 4827 4297 4827 3921 2 1 0 1 38 38 730 0 -1 4.000 0 0 0 0 0 5 4835 3919 5631 3919 5631 4294 4835 4294 4835 3919 2 1 0 0 36 36 729 0 20 4.000 0 0 0 0 0 5 4434 3921 4832 3921 4832 4297 4434 4297 4434 3921 2 1 0 0 37 37 728 0 20 4.000 0 0 0 0 0 5 4035 3921 4434 3921 4434 4297 4035 4297 4035 3921 2 1 0 1 38 38 727 0 -1 4.000 0 0 0 0 0 5 4044 3919 4840 3919 4840 4294 4044 4294 4044 3919 2 1 0 0 36 36 726 0 20 4.000 0 0 0 0 0 5 6026 3921 6432 3921 6432 4297 6026 4297 6026 3921 2 1 0 0 37 37 725 0 20 4.000 0 0 0 0 0 5 5627 3921 6026 3921 6026 4297 5627 4297 5627 3921 2 1 0 1 38 38 724 0 -1 4.000 0 0 0 0 0 5 5635 3919 6440 3919 6440 4294 5635 4294 5635 3919 2 1 0 0 36 36 723 0 20 4.000 0 0 0 0 0 5 2409 3921 2807 3921 2807 4297 2409 4297 2409 3921 2 1 0 0 37 37 722 0 20 4.000 0 0 0 0 0 5 2010 3921 2409 3921 2409 4297 2010 4297 2010 3921 2 1 0 1 38 38 721 0 -1 4.000 0 0 0 0 0 5 2019 3919 2815 3919 2815 4294 2019 4294 2019 3919 2 1 0 0 36 36 720 0 20 4.000 0 0 0 0 0 5 1618 3921 2015 3921 2015 4297 1618 4297 1618 3921 2 1 0 0 37 37 719 0 20 4.000 0 0 0 0 0 5 1219 3921 1618 3921 1618 4297 1219 4297 1219 3921 2 1 0 1 38 38 718 0 -1 4.000 0 0 0 0 0 5 1227 3919 2023 3919 2023 4294 1227 4294 1227 3919 2 1 0 0 36 36 717 0 20 4.000 0 0 0 0 0 5 2409 3546 2815 3546 2815 3922 2409 3922 2409 3546 2 1 0 0 37 37 716 0 20 4.000 0 0 0 0 0 5 2010 3546 2409 3546 2409 3922 2010 3922 2010 3546 2 1 0 1 38 38 715 0 -1 4.000 0 0 0 0 0 5 2019 3544 2815 3544 2815 3919 2019 3919 2019 3544 2 1 0 0 36 36 714 0 20 4.000 0 0 0 0 0 5 1618 3546 2015 3546 2015 3922 1618 3922 1618 3546 2 1 0 0 37 37 713 0 20 4.000 0 0 0 0 0 5 1219 3546 1618 3546 1618 3922 1219 3922 1219 3546 2 1 0 1 38 38 712 0 -1 4.000 0 0 0 0 0 5 1227 3544 2023 3544 2023 3919 1227 3919 1227 3544 2 1 0 1 32 32 711 0 -1 4.000 0 0 0 0 0 5 1221 3546 6440 3546 6440 5941 1221 5941 1221 3546 2 1 0 1 32 32 708 0 -1 4.000 0 0 0 0 0 2 2819 3915 2869 3915 2 1 0 1 32 32 707 0 -1 4.000 0 0 0 0 0 2 2952 3915 3002 3915 2 1 0 1 32 32 706 0 -1 4.000 0 0 0 0 0 2 3085 3915 3135 3915 2 1 0 1 32 32 705 0 -1 4.000 0 0 0 0 0 2 3219 3915 3252 3915 2 1 0 1 32 32 704 0 -1 4.000 0 0 0 0 0 2 2819 4290 2869 4290 2 1 0 1 32 32 703 0 -1 4.000 0 0 0 0 0 2 2952 4290 3002 4290 2 1 0 1 32 32 702 0 -1 4.000 0 0 0 0 0 2 3085 4290 3135 4290 2 1 0 1 32 32 701 0 -1 4.000 0 0 0 0 0 2 3219 4290 3252 4290 2 1 0 1 32 32 700 0 -1 4.000 0 0 0 0 0 2 2819 4282 2819 4332 2 1 0 1 32 32 699 0 -1 4.000 0 0 0 0 0 2 2819 4415 2819 4465 2 1 0 1 32 32 698 0 -1 4.000 0 0 0 0 0 2 2819 4548 2819 4598 2 1 0 1 32 32 697 0 -1 4.000 0 0 0 0 0 2 2019 4282 2019 4332 2 1 0 1 32 32 696 0 -1 4.000 0 0 0 0 0 2 2019 4415 2019 4465 2 1 0 1 32 32 695 0 -1 4.000 0 0 0 0 0 2 2019 4548 2019 4598 2 1 0 1 32 32 694 0 -1 4.000 0 0 0 0 0 2 4036 3915 3986 3915 2 1 0 1 32 32 693 0 -1 4.000 0 0 0 0 0 2 3902 3915 3852 3915 2 1 0 1 32 32 692 0 -1 4.000 0 0 0 0 0 2 3769 3915 3719 3915 2 1 0 1 32 32 691 0 -1 4.000 0 0 0 0 0 2 3636 3915 3602 3915 2 1 0 1 32 32 690 0 -1 4.000 0 0 0 0 0 2 4036 4290 3986 4290 2 1 0 1 32 32 689 0 -1 4.000 0 0 0 0 0 2 3902 4290 3852 4290 2 1 0 1 32 32 688 0 -1 4.000 0 0 0 0 0 2 3769 4290 3719 4290 2 1 0 1 32 32 687 0 -1 4.000 0 0 0 0 0 2 3636 4290 3602 4290 2 1 0 1 32 32 686 0 -1 4.000 0 0 0 0 0 2 4035 4282 4035 4332 2 1 0 1 32 32 685 0 -1 4.000 0 0 0 0 0 2 4035 4415 4035 4465 2 1 0 1 32 32 684 0 -1 4.000 0 0 0 0 0 2 4035 4548 4035 4598 2 1 0 1 32 32 683 0 -1 4.000 0 0 0 0 0 2 4835 4282 4835 4332 2 1 0 1 32 32 682 0 -1 4.000 0 0 0 0 0 2 4835 4415 4835 4465 2 1 0 1 32 32 681 0 -1 4.000 0 0 0 0 0 2 4835 4548 4835 4598 2 1 0 1 32 32 680 0 -1 4.000 0 0 0 0 0 2 4036 5565 3986 5565 2 1 0 1 32 32 679 0 -1 4.000 0 0 0 0 0 2 3902 5565 3852 5565 2 1 0 1 32 32 678 0 -1 4.000 0 0 0 0 0 2 3769 5565 3719 5565 2 1 0 1 32 32 677 0 -1 4.000 0 0 0 0 0 2 3636 5565 3602 5565 2 1 0 1 32 32 676 0 -1 4.000 0 0 0 0 0 2 4036 5190 3986 5190 2 1 0 1 32 32 675 0 -1 4.000 0 0 0 0 0 2 3902 5190 3852 5190 2 1 0 1 32 32 674 0 -1 4.000 0 0 0 0 0 2 3769 5190 3719 5190 2 1 0 1 32 32 673 0 -1 4.000 0 0 0 0 0 2 3636 5190 3602 5190 2 1 0 1 32 32 672 0 -1 4.000 0 0 0 0 0 2 4035 5198 4035 5148 2 1 0 1 32 32 671 0 -1 4.000 0 0 0 0 0 2 4035 5065 4035 5015 2 1 0 1 32 32 670 0 -1 4.000 0 0 0 0 0 2 4035 4932 4035 4882 2 1 0 1 32 32 669 0 -1 4.000 0 0 0 0 0 2 4835 5198 4835 5148 2 1 0 1 32 32 668 0 -1 4.000 0 0 0 0 0 2 4835 5065 4835 5015 2 1 0 1 32 32 667 0 -1 4.000 0 0 0 0 0 2 4835 4932 4835 4882 2 1 0 1 32 32 666 0 -1 4.000 0 0 0 0 0 2 2819 5565 2869 5565 2 1 0 1 32 32 665 0 -1 4.000 0 0 0 0 0 2 2952 5565 3002 5565 2 1 0 1 32 32 664 0 -1 4.000 0 0 0 0 0 2 3085 5565 3135 5565 2 1 0 1 32 32 663 0 -1 4.000 0 0 0 0 0 2 3219 5565 3252 5565 2 1 0 1 32 32 662 0 -1 4.000 0 0 0 0 0 2 2819 5190 2869 5190 2 1 0 1 32 32 661 0 -1 4.000 0 0 0 0 0 2 2952 5190 3002 5190 2 1 0 1 32 32 660 0 -1 4.000 0 0 0 0 0 2 3085 5190 3135 5190 2 1 0 1 32 32 659 0 -1 4.000 0 0 0 0 0 2 3219 5190 3252 5190 2 1 0 1 32 32 658 0 -1 4.000 0 0 0 0 0 2 2819 5198 2819 5148 2 1 0 1 32 32 657 0 -1 4.000 0 0 0 0 0 2 2819 5065 2819 5015 2 1 0 1 32 32 656 0 -1 4.000 0 0 0 0 0 2 2819 4932 2819 4882 2 1 0 1 32 32 655 0 -1 4.000 0 0 0 0 0 2 2019 5198 2019 5148 2 1 0 1 32 32 654 0 -1 4.000 0 0 0 0 0 2 2019 5065 2019 5015 2 1 0 1 32 32 653 0 -1 4.000 0 0 0 0 0 2 2019 4932 2019 4882 2 1 0 1 32 32 640 0 -1 4.000 0 0 0 0 0 2 5635 4282 5635 4332 2 1 0 1 32 32 639 0 -1 4.000 0 0 0 0 0 2 5635 4415 5635 4465 2 1 0 1 32 32 638 0 -1 4.000 0 0 0 0 0 2 5635 4548 5635 4598 2 1 0 1 32 32 637 0 -1 4.000 0 0 0 0 0 2 5635 5198 5635 5148 2 1 0 1 32 32 636 0 -1 4.000 0 0 0 0 0 2 5635 5065 5635 5015 2 1 0 1 32 32 635 0 -1 4.000 0 0 0 0 0 2 5635 4932 5635 4882 2 1 0 1 0 0 634 0 -1 4.000 0 0 0 0 0 2 1420 3781 6312 3781 2 1 0 0 0 0 633 0 20 4.000 0 0 0 0 0 3 6348 3784 6117 3728 6117 3781 2 1 0 1 0 0 632 0 -1 4.000 0 0 0 0 0 3 6348 3784 6117 3728 6117 3781 2 1 0 0 0 0 631 0 20 4.000 0 0 0 0 0 3 6348 3778 6117 3834 6117 3781 2 1 0 1 0 0 630 0 -1 4.000 0 0 0 0 0 3 6348 3778 6117 3834 6117 3781 2 1 0 1 0 0 629 0 -1 4.000 0 0 0 0 0 2 1420 4169 6312 4169 2 1 0 0 0 0 628 0 20 4.000 0 0 0 0 0 3 6348 4172 6117 4116 6117 4169 2 1 0 1 0 0 627 0 -1 4.000 0 0 0 0 0 3 6348 4172 6117 4116 6117 4169 2 1 0 0 0 0 626 0 20 4.000 0 0 0 0 0 3 6348 4166 6117 4222 6117 4169 2 1 0 1 0 0 625 0 -1 4.000 0 0 0 0 0 3 6348 4166 6117 4222 6117 4169 2 1 0 1 0 0 624 0 -1 4.000 0 0 0 0 0 2 1420 5390 6312 5390 2 1 0 0 0 0 623 0 20 4.000 0 0 0 0 0 3 6348 5393 6117 5337 6117 5390 2 1 0 1 0 0 622 0 -1 4.000 0 0 0 0 0 3 6348 5393 6117 5337 6117 5390 2 1 0 0 0 0 621 0 20 4.000 0 0 0 0 0 3 6348 5387 6117 5443 6117 5390 2 1 0 1 0 0 620 0 -1 4.000 0 0 0 0 0 3 6348 5387 6117 5443 6117 5390 2 1 0 1 0 0 619 0 -1 4.000 0 0 0 0 0 2 1420 5766 6312 5766 2 1 0 0 0 0 618 0 20 4.000 0 0 0 0 0 3 6348 5769 6117 5713 6117 5766 2 1 0 1 0 0 617 0 -1 4.000 0 0 0 0 0 3 6348 5769 6117 5713 6117 5766 2 1 0 0 0 0 616 0 20 4.000 0 0 0 0 0 3 6348 5763 6117 5819 6117 5766 2 1 0 1 0 0 615 0 -1 4.000 0 0 0 0 0 3 6348 5763 6117 5819 6117 5766 2 1 0 0 33 33 614 0 20 4.000 0 0 0 0 0 5 1469 6215 1868 6215 1868 6591 1469 6591 1469 6215 2 1 0 1 32 32 613 0 -1 4.000 0 0 0 0 0 5 1469 6215 1868 6215 1868 6591 1469 6591 1469 6215 2 1 0 0 36 36 610 0 20 4.000 0 0 0 0 0 5 4026 6217 4432 6217 4432 6593 4026 6593 4026 6217 2 1 0 0 37 37 609 0 20 4.000 0 0 0 0 0 5 3627 6217 4026 6217 4026 6593 3627 6593 3627 6217 2 1 0 1 38 38 608 0 -1 4.000 0 0 0 0 0 5 3635 6215 4440 6215 4440 6590 3635 6590 3635 6215 2 1 0 0 7 7 591 0 20 4.000 0 0 0 0 0 5 1221 495 5635 495 5635 2890 1221 2890 1221 495 2 1 0 1 32 32 590 0 -1 4.000 0 0 0 0 0 5 1221 495 5635 495 5635 2890 1221 2890 1221 495 2 1 0 0 33 33 589 0 20 4.000 0 0 0 0 0 5 1221 495 1620 495 1620 871 1221 871 1221 495 2 1 0 1 32 32 588 0 -1 4.000 0 0 0 0 0 5 1221 495 1620 495 1620 871 1221 871 1221 495 2 1 0 0 33 33 587 0 20 4.000 0 0 0 0 0 5 1620 495 2019 495 2019 871 1620 871 1620 495 2 1 0 1 32 32 586 0 -1 4.000 0 0 0 0 0 5 1620 495 2019 495 2019 871 1620 871 1620 495 2 1 0 0 33 33 585 0 20 4.000 0 0 0 0 0 5 2019 495 2418 495 2418 871 2019 871 2019 495 2 1 0 1 32 32 584 0 -1 4.000 0 0 0 0 0 5 2019 495 2418 495 2418 871 2019 871 2019 495 2 1 0 0 33 33 583 0 20 4.000 0 0 0 0 0 5 2418 495 2817 495 2817 871 2418 871 2418 495 2 1 0 1 32 32 582 0 -1 4.000 0 0 0 0 0 5 2418 495 2817 495 2817 871 2418 871 2418 495 2 1 0 0 33 33 581 0 20 4.000 0 0 0 0 0 5 4038 495 4438 495 4438 871 4038 871 4038 495 2 1 0 1 32 32 580 0 -1 4.000 0 0 0 0 0 5 4038 495 4438 495 4438 871 4038 871 4038 495 2 1 0 0 33 33 579 0 20 4.000 0 0 0 0 0 5 4438 495 4837 495 4837 871 4438 871 4438 495 2 1 0 1 32 32 578 0 -1 4.000 0 0 0 0 0 5 4438 495 4837 495 4837 871 4438 871 4438 495 2 1 0 0 33 33 577 0 20 4.000 0 0 0 0 0 5 4837 495 5236 495 5236 871 4837 871 4837 495 2 1 0 1 32 32 576 0 -1 4.000 0 0 0 0 0 5 4837 495 5236 495 5236 871 4837 871 4837 495 2 1 0 0 33 33 575 0 20 4.000 0 0 0 0 0 5 5236 495 5635 495 5635 871 5236 871 5236 495 2 1 0 1 32 32 574 0 -1 4.000 0 0 0 0 0 5 5236 495 5635 495 5635 871 5236 871 5236 495 2 1 0 0 33 33 573 0 20 4.000 0 0 0 0 0 5 1221 871 1620 871 1620 1247 1221 1247 1221 871 2 1 0 1 32 32 572 0 -1 4.000 0 0 0 0 0 5 1221 871 1620 871 1620 1247 1221 1247 1221 871 2 1 0 0 33 33 571 0 20 4.000 0 0 0 0 0 5 1620 871 2019 871 2019 1247 1620 1247 1620 871 2 1 0 1 32 32 570 0 -1 4.000 0 0 0 0 0 5 1620 871 2019 871 2019 1247 1620 1247 1620 871 2 1 0 0 33 33 569 0 20 4.000 0 0 0 0 0 5 2019 871 2418 871 2418 1247 2019 1247 2019 871 2 1 0 1 32 32 568 0 -1 4.000 0 0 0 0 0 5 2019 871 2418 871 2418 1247 2019 1247 2019 871 2 1 0 0 33 33 567 0 20 4.000 0 0 0 0 0 5 2418 871 2817 871 2817 1247 2418 1247 2418 871 2 1 0 1 32 32 566 0 -1 4.000 0 0 0 0 0 5 2418 871 2817 871 2817 1247 2418 1247 2418 871 2 1 0 0 33 33 565 0 20 4.000 0 0 0 0 0 5 4038 871 4438 871 4438 1247 4038 1247 4038 871 2 1 0 1 32 32 564 0 -1 4.000 0 0 0 0 0 5 4038 871 4438 871 4438 1247 4038 1247 4038 871 2 1 0 0 33 33 563 0 20 4.000 0 0 0 0 0 5 4438 871 4837 871 4837 1247 4438 1247 4438 871 2 1 0 1 32 32 562 0 -1 4.000 0 0 0 0 0 5 4438 871 4837 871 4837 1247 4438 1247 4438 871 2 1 0 0 33 33 561 0 20 4.000 0 0 0 0 0 5 4837 871 5236 871 5236 1247 4837 1247 4837 871 2 1 0 1 32 32 560 0 -1 4.000 0 0 0 0 0 5 4837 871 5236 871 5236 1247 4837 1247 4837 871 2 1 0 0 33 33 559 0 20 4.000 0 0 0 0 0 5 5236 871 5635 871 5635 1247 5236 1247 5236 871 2 1 0 1 32 32 558 0 -1 4.000 0 0 0 0 0 5 5236 871 5635 871 5635 1247 5236 1247 5236 871 2 1 0 0 33 33 557 0 20 4.000 0 0 0 0 0 5 1221 2139 1620 2139 1620 2515 1221 2515 1221 2139 2 1 0 1 32 32 556 0 -1 4.000 0 0 0 0 0 5 1221 2139 1620 2139 1620 2515 1221 2515 1221 2139 2 1 0 0 33 33 555 0 20 4.000 0 0 0 0 0 5 1620 2139 2019 2139 2019 2515 1620 2515 1620 2139 2 1 0 1 32 32 554 0 -1 4.000 0 0 0 0 0 5 1620 2139 2019 2139 2019 2515 1620 2515 1620 2139 2 1 0 0 33 33 553 0 20 4.000 0 0 0 0 0 5 2019 2139 2418 2139 2418 2515 2019 2515 2019 2139 2 1 0 1 32 32 552 0 -1 4.000 0 0 0 0 0 5 2019 2139 2418 2139 2418 2515 2019 2515 2019 2139 2 1 0 0 33 33 551 0 20 4.000 0 0 0 0 0 5 2418 2139 2817 2139 2817 2515 2418 2515 2418 2139 2 1 0 1 32 32 550 0 -1 4.000 0 0 0 0 0 5 2418 2139 2817 2139 2817 2515 2418 2515 2418 2139 2 1 0 0 33 33 549 0 20 4.000 0 0 0 0 0 5 4038 2139 4438 2139 4438 2515 4038 2515 4038 2139 2 1 0 1 32 32 548 0 -1 4.000 0 0 0 0 0 5 4038 2139 4438 2139 4438 2515 4038 2515 4038 2139 2 1 0 0 33 33 547 0 20 4.000 0 0 0 0 0 5 4438 2139 4837 2139 4837 2515 4438 2515 4438 2139 2 1 0 1 32 32 546 0 -1 4.000 0 0 0 0 0 5 4438 2139 4837 2139 4837 2515 4438 2515 4438 2139 2 1 0 0 33 33 545 0 20 4.000 0 0 0 0 0 5 4837 2139 5236 2139 5236 2515 4837 2515 4837 2139 2 1 0 1 32 32 544 0 -1 4.000 0 0 0 0 0 5 4837 2139 5236 2139 5236 2515 4837 2515 4837 2139 2 1 0 0 33 33 543 0 20 4.000 0 0 0 0 0 5 5236 2139 5635 2139 5635 2515 5236 2515 5236 2139 2 1 0 1 32 32 542 0 -1 4.000 0 0 0 0 0 5 5236 2139 5635 2139 5635 2515 5236 2515 5236 2139 2 1 0 0 33 33 541 0 20 4.000 0 0 0 0 0 5 1221 2515 1620 2515 1620 2890 1221 2890 1221 2515 2 1 0 1 32 32 540 0 -1 4.000 0 0 0 0 0 5 1221 2515 1620 2515 1620 2890 1221 2890 1221 2515 2 1 0 0 33 33 539 0 20 4.000 0 0 0 0 0 5 1620 2515 2019 2515 2019 2890 1620 2890 1620 2515 2 1 0 1 32 32 538 0 -1 4.000 0 0 0 0 0 5 1620 2515 2019 2515 2019 2890 1620 2890 1620 2515 2 1 0 0 33 33 537 0 20 4.000 0 0 0 0 0 5 2019 2515 2418 2515 2418 2890 2019 2890 2019 2515 2 1 0 1 32 32 536 0 -1 4.000 0 0 0 0 0 5 2019 2515 2418 2515 2418 2890 2019 2890 2019 2515 2 1 0 0 33 33 535 0 20 4.000 0 0 0 0 0 5 2418 2515 2817 2515 2817 2890 2418 2890 2418 2515 2 1 0 1 32 32 534 0 -1 4.000 0 0 0 0 0 5 2418 2515 2817 2515 2817 2890 2418 2890 2418 2515 2 1 0 0 33 33 533 0 20 4.000 0 0 0 0 0 5 4038 2515 4438 2515 4438 2890 4038 2890 4038 2515 2 1 0 1 32 32 532 0 -1 4.000 0 0 0 0 0 5 4038 2515 4438 2515 4438 2890 4038 2890 4038 2515 2 1 0 0 33 33 531 0 20 4.000 0 0 0 0 0 5 4438 2515 4837 2515 4837 2890 4438 2890 4438 2515 2 1 0 1 32 32 530 0 -1 4.000 0 0 0 0 0 5 4438 2515 4837 2515 4837 2890 4438 2890 4438 2515 2 1 0 0 33 33 529 0 20 4.000 0 0 0 0 0 5 4837 2515 5236 2515 5236 2890 4837 2890 4837 2515 2 1 0 1 32 32 528 0 -1 4.000 0 0 0 0 0 5 4837 2515 5236 2515 5236 2890 4837 2890 4837 2515 2 1 0 0 33 33 527 0 20 4.000 0 0 0 0 0 5 5236 2515 5635 2515 5635 2890 5236 2890 5236 2515 2 1 0 1 32 32 526 0 -1 4.000 0 0 0 0 0 5 5236 2515 5635 2515 5635 2890 5236 2890 5236 2515 2 1 0 1 0 0 525 0 -1 4.000 0 0 0 0 0 2 1420 730 5459 730 2 1 0 0 0 0 524 0 20 4.000 0 0 0 0 0 3 5488 733 5298 677 5298 730 2 1 0 1 0 0 523 0 -1 4.000 0 0 0 0 0 3 5488 733 5298 677 5298 730 2 1 0 0 0 0 522 0 20 4.000 0 0 0 0 0 3 5488 727 5298 783 5298 730 2 1 0 1 0 0 521 0 -1 4.000 0 0 0 0 0 3 5488 727 5298 783 5298 730 2 1 0 1 32 32 518 0 -1 4.000 0 0 0 0 0 2 2819 873 2869 873 2 1 0 1 32 32 517 0 -1 4.000 0 0 0 0 0 2 2952 873 3002 873 2 1 0 1 32 32 516 0 -1 4.000 0 0 0 0 0 2 3085 873 3135 873 2 1 0 1 32 32 515 0 -1 4.000 0 0 0 0 0 2 3219 873 3252 873 2 1 0 1 32 32 514 0 -1 4.000 0 0 0 0 0 2 2819 1248 2869 1248 2 1 0 1 32 32 513 0 -1 4.000 0 0 0 0 0 2 2952 1248 3002 1248 2 1 0 1 32 32 512 0 -1 4.000 0 0 0 0 0 2 3085 1248 3135 1248 2 1 0 1 32 32 511 0 -1 4.000 0 0 0 0 0 2 3219 1248 3252 1248 2 1 0 1 32 32 510 0 -1 4.000 0 0 0 0 0 2 2819 1240 2819 1290 2 1 0 1 32 32 509 0 -1 4.000 0 0 0 0 0 2 2819 1373 2819 1423 2 1 0 1 32 32 508 0 -1 4.000 0 0 0 0 0 2 2819 1506 2819 1556 2 1 0 1 32 32 507 0 -1 4.000 0 0 0 0 0 2 2419 1240 2419 1290 2 1 0 1 32 32 506 0 -1 4.000 0 0 0 0 0 2 2419 1373 2419 1423 2 1 0 1 32 32 505 0 -1 4.000 0 0 0 0 0 2 2419 1506 2419 1556 2 1 0 1 32 32 504 0 -1 4.000 0 0 0 0 0 2 2019 1240 2019 1290 2 1 0 1 32 32 503 0 -1 4.000 0 0 0 0 0 2 2019 1373 2019 1423 2 1 0 1 32 32 502 0 -1 4.000 0 0 0 0 0 2 2019 1506 2019 1556 2 1 0 1 32 32 501 0 -1 4.000 0 0 0 0 0 2 1619 1240 1619 1290 2 1 0 1 32 32 500 0 -1 4.000 0 0 0 0 0 2 1619 1373 1619 1423 2 1 0 1 32 32 499 0 -1 4.000 0 0 0 0 0 2 1619 1506 1619 1556 2 1 0 1 32 32 498 0 -1 4.000 0 0 0 0 0 2 4036 873 3986 873 2 1 0 1 32 32 497 0 -1 4.000 0 0 0 0 0 2 3902 873 3852 873 2 1 0 1 32 32 496 0 -1 4.000 0 0 0 0 0 2 3769 873 3719 873 2 1 0 1 32 32 495 0 -1 4.000 0 0 0 0 0 2 3636 873 3602 873 2 1 0 1 32 32 494 0 -1 4.000 0 0 0 0 0 2 4036 1248 3986 1248 2 1 0 1 32 32 493 0 -1 4.000 0 0 0 0 0 2 3902 1248 3852 1248 2 1 0 1 32 32 492 0 -1 4.000 0 0 0 0 0 2 3769 1248 3719 1248 2 1 0 1 32 32 491 0 -1 4.000 0 0 0 0 0 2 3636 1248 3602 1248 2 1 0 1 32 32 490 0 -1 4.000 0 0 0 0 0 2 4035 1240 4035 1290 2 1 0 1 32 32 489 0 -1 4.000 0 0 0 0 0 2 4035 1373 4035 1423 2 1 0 1 32 32 488 0 -1 4.000 0 0 0 0 0 2 4035 1506 4035 1556 2 1 0 1 32 32 487 0 -1 4.000 0 0 0 0 0 2 4435 1240 4435 1290 2 1 0 1 32 32 486 0 -1 4.000 0 0 0 0 0 2 4435 1373 4435 1423 2 1 0 1 32 32 485 0 -1 4.000 0 0 0 0 0 2 4435 1506 4435 1556 2 1 0 1 32 32 484 0 -1 4.000 0 0 0 0 0 2 4835 1240 4835 1290 2 1 0 1 32 32 483 0 -1 4.000 0 0 0 0 0 2 4835 1373 4835 1423 2 1 0 1 32 32 482 0 -1 4.000 0 0 0 0 0 2 4835 1506 4835 1556 2 1 0 1 32 32 481 0 -1 4.000 0 0 0 0 0 2 5235 1240 5235 1290 2 1 0 1 32 32 480 0 -1 4.000 0 0 0 0 0 2 5235 1373 5235 1423 2 1 0 1 32 32 479 0 -1 4.000 0 0 0 0 0 2 5235 1506 5235 1556 2 1 0 1 32 32 478 0 -1 4.000 0 0 0 0 0 2 4036 2515 3986 2515 2 1 0 1 32 32 477 0 -1 4.000 0 0 0 0 0 2 3902 2515 3852 2515 2 1 0 1 32 32 476 0 -1 4.000 0 0 0 0 0 2 3769 2515 3719 2515 2 1 0 1 32 32 475 0 -1 4.000 0 0 0 0 0 2 3636 2515 3602 2515 2 1 0 1 32 32 474 0 -1 4.000 0 0 0 0 0 2 4036 2140 3986 2140 2 1 0 1 32 32 473 0 -1 4.000 0 0 0 0 0 2 3902 2140 3852 2140 2 1 0 1 32 32 472 0 -1 4.000 0 0 0 0 0 2 3769 2140 3719 2140 2 1 0 1 32 32 471 0 -1 4.000 0 0 0 0 0 2 3636 2140 3602 2140 2 1 0 1 32 32 470 0 -1 4.000 0 0 0 0 0 2 4035 2148 4035 2098 2 1 0 1 32 32 469 0 -1 4.000 0 0 0 0 0 2 4035 2015 4035 1965 2 1 0 1 32 32 468 0 -1 4.000 0 0 0 0 0 2 4035 1881 4035 1831 2 1 0 1 32 32 467 0 -1 4.000 0 0 0 0 0 2 4435 2148 4435 2098 2 1 0 1 32 32 466 0 -1 4.000 0 0 0 0 0 2 4435 2015 4435 1965 2 1 0 1 32 32 465 0 -1 4.000 0 0 0 0 0 2 4435 1881 4435 1831 2 1 0 1 32 32 464 0 -1 4.000 0 0 0 0 0 2 4835 2148 4835 2098 2 1 0 1 32 32 463 0 -1 4.000 0 0 0 0 0 2 4835 2015 4835 1965 2 1 0 1 32 32 462 0 -1 4.000 0 0 0 0 0 2 4835 1881 4835 1831 2 1 0 1 32 32 461 0 -1 4.000 0 0 0 0 0 2 5235 2148 5235 2098 2 1 0 1 32 32 460 0 -1 4.000 0 0 0 0 0 2 5235 2015 5235 1965 2 1 0 1 32 32 459 0 -1 4.000 0 0 0 0 0 2 5235 1881 5235 1831 2 1 0 1 32 32 458 0 -1 4.000 0 0 0 0 0 2 2819 2515 2869 2515 2 1 0 1 32 32 457 0 -1 4.000 0 0 0 0 0 2 2952 2515 3002 2515 2 1 0 1 32 32 456 0 -1 4.000 0 0 0 0 0 2 3085 2515 3135 2515 2 1 0 1 32 32 455 0 -1 4.000 0 0 0 0 0 2 3219 2515 3252 2515 2 1 0 1 32 32 454 0 -1 4.000 0 0 0 0 0 2 2819 2140 2869 2140 2 1 0 1 32 32 453 0 -1 4.000 0 0 0 0 0 2 2952 2140 3002 2140 2 1 0 1 32 32 452 0 -1 4.000 0 0 0 0 0 2 3085 2140 3135 2140 2 1 0 1 32 32 451 0 -1 4.000 0 0 0 0 0 2 3219 2140 3252 2140 2 1 0 1 32 32 450 0 -1 4.000 0 0 0 0 0 2 2819 2148 2819 2098 2 1 0 1 32 32 449 0 -1 4.000 0 0 0 0 0 2 2819 2015 2819 1965 2 1 0 1 32 32 448 0 -1 4.000 0 0 0 0 0 2 2819 1881 2819 1831 2 1 0 1 32 32 447 0 -1 4.000 0 0 0 0 0 2 2419 2148 2419 2098 2 1 0 1 32 32 446 0 -1 4.000 0 0 0 0 0 2 2419 2015 2419 1965 2 1 0 1 32 32 445 0 -1 4.000 0 0 0 0 0 2 2419 1881 2419 1831 2 1 0 1 32 32 444 0 -1 4.000 0 0 0 0 0 2 2019 2148 2019 2098 2 1 0 1 32 32 443 0 -1 4.000 0 0 0 0 0 2 2019 2015 2019 1965 2 1 0 1 32 32 442 0 -1 4.000 0 0 0 0 0 2 2019 1881 2019 1831 2 1 0 1 32 32 441 0 -1 4.000 0 0 0 0 0 2 1619 2148 1619 2098 2 1 0 1 32 32 440 0 -1 4.000 0 0 0 0 0 2 1619 2015 1619 1965 2 1 0 1 32 32 439 0 -1 4.000 0 0 0 0 0 2 1619 1881 1619 1831 2 1 0 1 0 0 426 0 -1 4.000 0 0 0 0 0 2 1420 1106 5459 1106 2 1 0 0 0 0 425 0 20 4.000 0 0 0 0 0 3 5488 1109 5298 1053 5298 1106 2 1 0 1 0 0 424 0 -1 4.000 0 0 0 0 0 3 5488 1109 5298 1053 5298 1106 2 1 0 0 0 0 423 0 20 4.000 0 0 0 0 0 3 5488 1103 5298 1159 5298 1106 2 1 0 1 0 0 422 0 -1 4.000 0 0 0 0 0 3 5488 1103 5298 1159 5298 1106 2 1 0 1 0 0 421 0 -1 4.000 0 0 0 0 0 2 1420 2327 5459 2327 2 1 0 0 0 0 420 0 20 4.000 0 0 0 0 0 3 5488 2330 5298 2274 5298 2327 2 1 0 1 0 0 419 0 -1 4.000 0 0 0 0 0 3 5488 2330 5298 2274 5298 2327 2 1 0 0 0 0 418 0 20 4.000 0 0 0 0 0 3 5488 2324 5298 2380 5298 2327 2 1 0 1 0 0 417 0 -1 4.000 0 0 0 0 0 3 5488 2324 5298 2380 5298 2327 2 1 0 1 0 0 416 0 -1 4.000 0 0 0 0 0 2 1420 2703 5459 2703 2 1 0 0 0 0 415 0 20 4.000 0 0 0 0 0 3 5488 2706 5298 2650 5298 2703 2 1 0 1 0 0 414 0 -1 4.000 0 0 0 0 0 3 5488 2706 5298 2650 5298 2703 2 1 0 0 0 0 413 0 20 4.000 0 0 0 0 0 3 5488 2700 5298 2755 5298 2703 2 1 0 1 0 0 412 0 -1 4.000 0 0 0 0 0 3 5488 2700 5298 2755 5298 2703 2 1 0 1 0 0 389 0 -1 4.000 0 0 0 0 0 2 273 3662 273 3039 2 1 0 1 0 0 388 0 -1 4.000 0 0 0 0 0 2 382 3920 156 3662 2 1 0 1 0 0 387 0 -1 4.000 0 0 0 0 0 2 273 3662 148 3662 2 1 0 1 0 0 386 0 -1 4.000 0 0 0 0 0 2 487 3662 487 3039 2 1 0 1 0 0 385 0 -1 4.000 0 0 0 0 0 2 378 3920 604 3662 2 1 0 1 0 0 384 0 -1 4.000 0 0 0 0 0 2 487 3662 612 3662 2 1 0 1 0 0 383 0 -1 4.000 0 0 0 0 0 2 273 6130 273 6753 2 1 0 1 0 0 382 0 -1 4.000 0 0 0 0 0 2 382 5872 156 6130 2 1 0 1 0 0 381 0 -1 4.000 0 0 0 0 0 2 273 6130 148 6130 2 1 0 1 0 0 380 0 -1 4.000 0 0 0 0 0 2 487 6129 487 6753 2 1 0 1 0 0 379 0 -1 4.000 0 0 0 0 0 2 378 5872 604 6129 2 1 0 1 0 0 378 0 -1 4.000 0 0 0 0 0 2 487 6129 612 6129 4 0 0 931 -1 16 15 0.0000 4 30 135 2064 7726 ...\001 4 0 0 849 -1 16 13 0.0000 4 150 270 2338 7001 ny \001 4 0 34 848 -1 16 13 0.0000 4 180 870 2605 7001 + 2-ny%2\001 4 0 0 847 -1 16 13 0.0000 4 180 1110 3500 7001 = 2*(ny/2+1)\001 4 0 0 845 -1 16 13 0.0000 4 105 195 681 8451 nx\001 4 0 0 843 -1 16 10 0.0000 4 120 90 1364 7179 0\001 4 0 0 841 -1 16 10 0.0000 4 150 345 6097 7179 ny+1\001 4 0 0 839 -1 16 10 0.0000 4 120 90 1064 7479 0\001 4 0 0 837 -1 16 10 0.0000 4 120 375 864 9479 nx-1\001 4 0 0 798 -1 16 25 1.5708 4 360 1575 6250 9461 (padding)\001 4 0 0 796 -1 18 16 1.5708 4 240 1695 428 9283 input, in-place\001 4 0 0 794 -1 16 10 0.0000 4 120 90 1264 7429 0\001 4 0 0 792 -1 16 10 0.0000 4 120 90 1681 7429 1\001 4 0 0 790 -1 16 10 0.0000 4 120 90 2081 7429 2\001 4 0 0 788 -1 16 10 0.0000 4 120 90 2481 7429 3\001 4 0 0 786 -1 16 10 0.0000 4 150 360 4081 7429 ny-4\001 4 0 0 784 -1 16 10 0.0000 4 150 360 4897 7429 ny-2\001 4 0 0 782 -1 16 10 0.0000 4 150 360 5297 7429 ny-1\001 4 0 0 780 -1 16 10 0.0000 4 150 360 4497 7429 ny-3\001 4 0 0 778 -1 16 10 0.0000 4 150 345 1264 7795 ny+2\001 4 0 0 776 -1 16 10 0.0000 4 150 345 1664 7795 ny+3\001 4 0 0 774 -1 16 10 0.0000 4 120 165 5681 7429 ny\001 4 0 0 772 -1 16 10 0.0000 4 150 345 6081 7429 ny+1\001 4 0 0 709 -1 16 15 0.0000 4 30 135 2064 3993 ...\001 4 0 0 651 -1 16 13 0.0000 4 180 585 3181 3267 ny/2+1\001 4 0 0 649 -1 16 13 0.0000 4 105 195 681 4717 nx\001 4 0 0 647 -1 16 10 0.0000 4 120 90 1564 3445 0\001 4 0 0 645 -1 16 10 0.0000 4 150 300 5831 3445 ny/2\001 4 0 0 643 -1 16 10 0.0000 4 120 90 1064 3745 0\001 4 0 0 641 -1 16 10 0.0000 4 120 375 864 5745 nx-1\001 4 0 0 611 -1 16 13 0.0000 4 165 855 1981 6463 = fftw_real\001 4 0 0 606 -1 16 13 0.0000 4 180 1230 4547 6463 = fftw_complex\001 4 0 0 604 -1 18 16 1.5708 4 225 780 428 5128 output\001 4 0 0 602 -1 16 10 0.0000 4 120 90 1264 3679 0\001 4 0 0 600 -1 16 10 0.0000 4 120 90 2081 3679 1\001 4 0 0 598 -1 16 10 0.0000 4 150 495 4097 3679 ny/2-2\001 4 0 0 596 -1 16 10 0.0000 4 150 495 4914 3679 ny/2-1\001 4 0 0 594 -1 16 10 0.0000 4 150 480 1264 4062 ny/2+1\001 4 0 0 592 -1 16 10 0.0000 4 150 300 5697 3679 ny/2\001 4 0 0 519 -1 16 15 0.0000 4 30 135 2064 943 ...\001 4 0 0 437 -1 16 13 0.0000 4 150 210 3381 217 ny\001 4 0 0 435 -1 16 13 0.0000 4 105 195 681 1667 nx\001 4 0 0 433 -1 16 10 0.0000 4 120 90 1364 395 0\001 4 0 0 431 -1 16 10 0.0000 4 150 360 5281 395 ny-1\001 4 0 0 429 -1 16 10 0.0000 4 120 90 1064 695 0\001 4 0 0 427 -1 16 10 0.0000 4 120 375 864 2695 nx-1\001 4 0 0 410 -1 18 16 1.5708 4 240 2235 428 2734 input, out-of-place\001 4 0 0 408 -1 16 10 0.0000 4 120 90 1264 629 0\001 4 0 0 406 -1 16 10 0.0000 4 120 90 1681 629 1\001 4 0 0 404 -1 16 10 0.0000 4 120 90 2081 629 2\001 4 0 0 402 -1 16 10 0.0000 4 120 90 2481 629 3\001 4 0 0 400 -1 16 10 0.0000 4 150 360 4081 629 ny-4\001 4 0 0 398 -1 16 10 0.0000 4 150 360 4897 629 ny-2\001 4 0 0 396 -1 16 10 0.0000 4 150 360 5297 629 ny-1\001 4 0 0 394 -1 16 10 0.0000 4 150 360 4497 629 ny-3\001 4 0 0 392 -1 16 10 0.0000 4 120 165 1264 1012 ny\001 4 0 0 390 -1 16 10 0.0000 4 150 345 1664 1012 ny+1\001 -6 4 0 0 932 -1 16 15 0.0000 4 15 60 74 89 \001 4 0 0 850 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 846 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 844 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 842 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 840 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 838 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 799 -1 16 25 0.0000 4 15 90 74 89 \001 4 0 0 797 -1 18 16 0.0000 4 15 60 74 89 \001 4 0 0 795 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 793 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 791 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 789 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 787 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 785 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 783 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 781 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 779 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 777 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 775 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 773 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 710 -1 16 15 0.0000 4 15 60 74 89 \001 4 0 0 652 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 650 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 648 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 646 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 644 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 642 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 612 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 607 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 605 -1 18 16 0.0000 4 15 60 74 89 \001 4 0 0 603 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 601 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 599 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 597 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 595 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 593 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 520 -1 16 15 0.0000 4 15 60 74 89 \001 4 0 0 438 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 436 -1 16 13 0.0000 4 15 60 74 89 \001 4 0 0 434 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 432 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 430 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 428 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 411 -1 18 16 0.0000 4 15 60 74 89 \001 4 0 0 409 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 407 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 405 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 403 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 401 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 399 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 397 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 395 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 393 -1 16 10 0.0000 4 15 45 74 89 \001 4 0 0 391 -1 16 10 0.0000 4 15 45 1425 4800 \001 fftw-2.1.5/doc/rfftwnd.gif0000644000175400001440000003050107635206026011061 GIF89a…G÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷ïï÷ïï÷ïï÷ÞÞ÷ÞÞ÷ÞÞ÷ÞÞ÷ÖÎ÷ÖÎ÷ÖÎ÷ÖÎ÷ƽ÷ƽ÷ƽ÷ƽ÷Œ„÷Œ„÷Œ„÷Œ„ïïïïïïïïïïïïﵭﵭﵭﵭ便便便便ï„sï„sï„sï„sïskïskïskïskçççççççççççç猄猄猄猄çcZçcZçcZçcZçRJçRJçRJçRJçJÿçJÿçJÿçJÿçJ9çJ9çJ9çJ9ç9)ç9)ç9)ç9)ç1!ç1!ç1!ç1!çŒçŒçŒçŒÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÞÖÖÖÖÖÖÖÖÖÖÖÖÖŒ„ÖŒ„ÖŒ„ÖŒ„ÎÎÎÎÎÎÎÎÎÎÎÎÆÆÆÆÆÆÆÆÆÆÆÆÆŒ„ÆŒ„ÆŒ„½½½½½½½½½½½½µµµµµµµµµµµµµŒ„µŒ„µŒ„µŒ„­­­­­­­­­­­­¥¥¥¥¥¥¥¥¥¥¥¥¥Œ„¥Œ„¥Œ„¥Œ„œœœœœœœœœœœœ”””””””””””””Œ„”Œ„”Œ„”Œ„ŒŒŒŒŒŒŒŒŒŒŒŒ„­Ö„­Ö„­Ö„­Ö„Œ„„Œ„„Œ„„„„„„„„„„„„„{{{{{{{{{{{{ssssssssssssssssk”Æk”Æk”Æk”ÆkkkkkkkkkkkkccccccccccccccccZZZZZZZZZZZZRRRRRRRRRRRRRRRJJJJJJJJJJJJBBBBBBBBBBBBBBBB9999999999991111111111111111))))))))))))!!!!!!!!!!!!!!!,…G@ÿH° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç Cfü7ä@f䂉\ɲ¥Ë—-Mš„I³¦Í›!ÿÍÄɱ”Nï,ñJ´¨Ñ£H_Öú @g©¡¥0üà •ªÕ«X­F½:5«W­X»~õº•ªÎ±_Ÿ&µ«ÛªV§Š ÷í\©w·¾­z.Õ²{åf«vmC Ìt*Þi³,Ú±Ž§•ü82e¬… ?´|™n笜;^¬Xrfͨ†¾¼šõg²¯A§Þsí«­MßÖ:[á»Á¨û÷j]³~!#?.wñr ¹uï†Þ»aôÊÓ¡O¿ŽötuƒL‰æÿ&M¾¼ùóèÓ«_Ͼ½û÷ðãËŸOÿ¬ìïý6o|7wåÛeç~•òY‚– mÛXäù•EBTáf]ˆŸ†Öeè!…ÎÆáB#’øaE%Šx"E)&Ô"B/&Å_C3ÍT‹P–ÔÂbˆ<öø]Œ>ºdD ÒGÉ‘Ø?ÌÈ!ž‘PFI’†)ÜMTJ©å–&r‰e€`ú' ‘ 2(æ™þùH3Wôw[™¸ 8f‘pzöf˜æ™æãÀaÀpg¸Y[ÉÙ †¢9èœ<þ–¡„jæ›d&z§¢ƒ†øÓŒ8Wß§ †*ꨤ–jj_ÔyÙØ¤‹²[–GEÿ*««¯Áªê­¸æª«DŒÔ뮹’³˜" ý ,°Æ”ì±øÕH"ÿk 3M‘¦,xÌf+вÛ6Û­¶àö¨Ø·M}ËmGçžîºìªš®HáTŠ&ÿhB¯½øæ«/¾±ôëï¿ìï[ä[ï¾ó+ð oadÁ÷F\ïÁã«“&±üÃðÆC,±½ß{0½÷[2Ç{ü±È G¬0ÊǨn¹S&l³¾0sLðÍÿü®oýÑ+ÿg.¸·=÷ö«&#í®·ûÛ¤ßÌ»Ïáö:AÞ¡ˆÏßýé—[ò÷m×6ñÇ9˜€Ìæn0Á{¨·^e'w/±nñæ|g\ Ø€—3€BB'ØHpç3Ä—4š'{#ˆ2%h8æ×}8Ä}å—|.h7â7}2ƒÙÇBб4˜ÐW|-”‚13X†E„æVXGX™ñV}µ„nE0P…R8…TX…Vx…X˜…Z¸…\Ø…V؃vf.ÉdXB¸1+Ø3'È#ßw?88CÚ×@08~ÒwyÆ'xm{khC3ȃh„ªG€€ø@‹ˆ„ˆy7jµ‚Doè=×vˆšÿ³lÄôL6vpT *á‡\$t$yäs"ñ}à~¼"‰QnY”#¦´‰_ÄGÛ-Ð"zԉ梊‚#ÇåˆmÊŠ{/V¸XˆÂ8ŒÄXŒ_§#bg·t°KšÄŒ²͸($°À?0ñŒ¼TÖbf×hæ¢vV4vëUŽÏ„ghŒò8½!ôø­Iš¯¹˜¬ù˜À‰šᘿ‰”fki)uNW–YùmÉSü¥bzÐb¦.f<¦”/)rÉùhY“kÿ‰•aP؉aKÂcbIc ÷ *eT†hôYŸ•EXNˆ„Fh!úi„LˆŸö †FYqµùØŠhgEÎùœGtãIžâ‰_æyb( P†Ð à@àÐ =–Pr‘’§v•9÷‘VÕ”™.ú¢0£Ø£B¼õN"£8º|’£<Ú£ÎSw>Š=wgi¤F*\¸¢; -Šy¤N:¸éf»ÙaE5þølUjSYŠk:©TÐ9NÿQTDIŸ¦,ÆiJÙNjy¥0©O7¶¥êtC’’R§¾Æxê‘û´§¾žC¤ö`¡Ù¥š¨qê¦!ÿN@Q‰qˆÈ&T©–z©˜ê;"km„G“*¡Š*ªHg¢9ª§ZªÇˆm% ®JhM«„¥„²Z„ýùª¸hA¥ºiQ¥Tñõ«D5Nb §ÊIcˆª–†ª•%Ú(Ø^BõŒz§Ôz¬Åš”žÌºœ©Êœ©$¢ÍꬉhªäŠª¶sCw¦ªÕ ã:§I¨ÈV‡Ú,ÍAHòª­iÁ­¤Ú¯ßZ¯!2=Lr£ÈGœœÇ9qh°ŸviºšOÚYÖÔp™°»! ëšÛ™A2•8±!Ê® Z°+±(›š×›¶É²éÕ˜x-æ8œ"»²Dÿrqwš5k³šBl‚;Û ‹fr@´©1´!mT‘µ©€)K³*µr°T˰.ËCJ‹´XûoY Aë›<Û±ûµÎU±\;¶ßñm­š«n›Xµz„ùI«ø·o{·p›k㘋#š‘ﺭ檔}ë6§h »âê­ÿº®ñÚKr_ʸ”¸èz®ªÚœùŠ&ëѨ ±¡z¢Ž»eºˆœ™º¼¡·Û9\馫r¯ËrÑ–ºVº±»µ¶£¯o:¸›ê sùÍE¹ÝZ¹ðJº·k•X¼yËÇåÌ4ßìA¥‰¦Gè&‹¸ÖÏ/ü<¶‚³í|$ùŒïÏò\š‹ñ³þ\ÏÚR}²V3Ó¿g§f@‘³;%û¬ý µÈÃ+¬ŠÂc„¿Ó— KÐëÒÍíÑÂó€"ÒËsωáмiÒÉó€ gÓ2­oÿ­Ï ¥rÓ,}+H´÷´: Ñ5-Ñ:ÝóL±;=ÒÐŒÍ8ÉìC'NÝÔßüƒÉ,Ì™|Î)Õ°W͸¼ÊÄ|{é Ò÷ÍáŒ>㌂X5Zm7ÍlÕdBÖkÍx\†ä÷ʰ×ÌéÑ?K]ÕLÖs-Î×Ìײ<Í9#ÖÖ×~=Èv]Ì„­‚Á̇WÝØ:×Ã÷×fØÖ,Êi0™Må²¼„Ø›ÝÉŠýÕÃGÙGüØ»'#%¬Áò"Ú’m†–íy¹ÍlǤñÌ‘½Ø}=Ú3ÛTצڸÛ1ŪÛ¼]Ù¥mÛ½Û@£Ú{܇Ü€x{ÝØÝÚ½Ýn ›4ÿ’Ô€], ÞL¤kÅB»äÀ.œÞîê;r»(ÝÔLgîUðML¥tvã]ÝÁ‹inù½—¬}¿)lDX‘δEàµàÌ…¦Ù„û1ÁáßgýÝ ®, ÎÀ~øs4£B ÚáwÇG0ë+ŽMPœ.Èx—⃌%®8'.<+ÉkVßìMß1žãj‡ã<þã@ÎÁ íI¾À³ÄŒь̸ ä“D’$;À¸”䑘F>¡Ë8äÿ;ï ÀúᡎA¾ ¬á KK±K`Ó(KlîäMN°Ôå·´K mÁ|æ}ôÀ ÊáðXæ,ÿqÁ++0 ”ŠnØ0¥Nz¸ˆ»"¨—^Cºaw·ß›^Þ¡>ê¦XY­ç˧‚‹¬ÏK§ö1¬qýXT}¡§¯þ§:´.’f‘“åP+jž Q85‘š²¦ùT“¨îšj¥åÚU»n§zq­a‘Gå‘Ín¬ÀÊ‘ 5ìÀ~` õëÅ~PÆÞ³ª±¾ {”î‹îãË”OIî*JRϵ¤øç’è »·Ë¯é¿ð[žïž“è‘a·É:½ú¹Ò»ê¬Û¾!b”üνÆ¢‰aæ:rPïÜyï…šð­®½ ïðûN¡ÿ~“Y"°ÿˆ{ZOFÅO ÿ쮋ñáëî"ÿñÏõ¨‘ªÒµk§»Ëëï¼ò ½ïóýò3ÿ”Ñ©Ÿ è(g»0¯ïO¢B?Ân!e÷p92Uc` ïù¡ò›Í·ŸêcŸ¾/_öøŽöR!ì'ñ_6ð¹Iéï}¼È{öï·Q,úÔ R(ðž–P­ðý‘êuMªÛµ]¶›¹øÛøNÃHQùQñ@mETFê‚HÑ­8f+/aÛ²/ùb{µ^ÂRòSûg€ .¾ÒžOfQñ–¯ú Á'µà—øí¿»ã^£ùú!-µÆ_üU[ú/ ù;‚$L.Í;¾üµßDë\-ê‘ú§_ýÿêÚ¯°Ü?Rf!ûr9?a ›²áoæ1Ø0ý!û¹¶íÄt‰ú¦¯ÿËþº$ TA„ Tذà?‡%N4HÑâEŒfäØÑãG!EŽ$YR!DÁþaóƒAàEäþ)Џ1ä¿w&3ÚÜ ’gÏ?u]èÓhP(=þûwFᦅ¥JpjU¬YµnåšU)HE̘2ÅfiâU‰ïþÀAå×®Kµ¥[×îݶsñîÅ«—ïß¼€£ë±”_Á}'¶{˜ñÞÅéþ£PÙòeÌ™+—2ÄnìçÏš-vÚta‘%«^-¹¯ë»¤Qï„ÿݸv]ÖŒs3¦,Ú7f¦–[ý³dùÍ?j¿e+<ƒíôìÔ·Kǰ;±õÁÐKbÌý¯wÈÔ1ôý;s)=àzK2­G¹Ç3ÿj¹Ôn•:øð÷Å/¯/ÿký¤ûï.òL μR(£õ˜º‡IP0þú;+@÷ÛÏ´ ÃÚ<¬«· }cj ÑŽ#Q³ 9” Ä5¼ÏÅ dÌðFéV,ñ<öØ‘E PèìŸd¤±Ca‘®%ó:²£&«³1FêtÜñ²¯dñɱ‚.Àl2J27|’¶$]S<+wDa¸ÀiÅ÷.ÓÃVîaª 1kQ+” !1ÓlÍÐÿÇþ<³LD¯c³2Có-K-ý<Ó°FÍ4»K/bG*s„ô@-)­t´N9ZsÓîÌLõBV¿‹•¯6K=ÕÒW==lW^{õõW`ƒvXb‹5öXd“UvYf›uvØž•VÑ\«µöZl³Õv[n»õö[pÃ¥j&¦hàŠœúç qÛu÷Ýpÿ¡O©ZjÀ’`àÕw_~SUê«uÁìw`‚ ÔK‚!Î`†v8«Z¨}xbŠ+¶øbp£Âxã#æx\u?™¨. ™ G6IP•[‰å/Ãü×e¬4¦ùfŽX6ù!œ{öùÌ”Û-¥K¦Ìúùh¤ë‹*Р“vúi“ÍÿúôbJI»ä=´­«·OëDÃÅl&%ëºìÇΖÒ5²%îƒZÍ·êñ¸V3ë»ñN”ÀÕÄþZk°ÉV{º±ì6|Dܸî:p¾§ûûp²ëf²[¦¨ ¾¦I²Ù>ÀóžÌsɽ>ü:¿;¯[Þ«?ûÐtÔ¿FmÖO7mÉ;GñɹU‹!Kp:xg¹Çúõ½¼ÕÉ"çôÛ¹fW>tØ!'0r«¥±pÇÇ«moåër,÷êdû@ õ62ýn\Óõ‘oŸ¯Üžíé̓7øûÕT?Ñ=-ln í9ÐYÿŠ' ý¡oJø‹ÔÿæÇ­¨”Â,+¡›u³@%%ð|ô_ÿ¤ºÓ­¸Œ)é"à¬òcAÒëS Äö5„…(\ž·VÈÁþé†14!€høAbtøCŸ¶X¿Âȇ9ì[{›'6f‡<üaÖÀvà :±Šð‹"nº%µÏˆo6Í3\ë;Ü‹:dž™xÁAP^ùÝÐ8˜2Ú-¡[cÛØEÚ-ñ…ÚŠ3\¢§h‡5òûÐöØ7Ã"j’‚|dˆ(wÄ1Òq“Ìâ·xÂP¯†rä‰HÉz’“Cì á—±ÌmÅ”¬¤¥mèÆ†òˆ¯œbùVùF8"P’¨Äc Eù^ú’˜îûå »ÕÇ\ž²“×:b,«ÿ2K`VršÏÄe0—‰LRÒhZã$g³¬²«s&PR§\ÐéÎv¦¦œó¤'±ºåÓˆ5ns[EòOÅ0…Ò%éSGE&S¡å–L éðUm¡õT÷¾Ç 9ô‡ŸUG·ÕOz#ýÙFÊÐ2O¤=iG¿…Ä1RT¦þe)gzS…Td&MiOQúÌ•Z$¤-µ&'B®™ä äðR"GJÔ§B•¥•ªPƒª‘KvdŽÀ{‡"Hœ†55›ßq†wЬbÅ©Ng)Š”­9«KÙÚÖvÁ´+n½«ËøZaC¢}½é_1fXÂ~ ±]ñY2:ØÿÄRt±[‘ [ ÊÔ„FV²¥£^¹ÂÓŸÚ5´½êYJKSnásjmk×êZm Õ§°j2'«ÙŠÝvbºÅíÃxë0ÐÒÖªU½–lGÕÙN1¸¯e.rJ\ÓBµñ‚ˆ%0›ÄÞ.ô· Ûnv ÖÝ•5µÍ­­p±ªRéÖä´ê §‹°Mi²ñ™c¢¯&«3Ñ÷zó›¼Tå~A_[f ®Š´/4u£AÃ7›£ô–geYàn¦ò–þd_. Á¸ÂP,0‚k©à:P½´N5M|b§XÅ+fq‹]übÇXƾ§Lp¢Ï}RxÃRf‚õÛJÓq[j±ì[*ØÌÿøÀ=V²6·æÂ%y«ãùjŽwœ¸3yÁÌôñˆ±UÍL^9þ¥q»\L${y‡ùuò–Áiæ&£™ÌÜVs8ÆzæYÏñ4È;åÉg?ÐæU:÷|èr^ÇN³œçÌc8»™‹bv·â3Ÿ·R±Ñ\>³'LéµmúÍF4ÐËl3ž-DÇ¢æï§Yýß8{šc:cÂT j«9¶vt·Y­¥•ú&'C5Ê4ýh,ãÚÃ’†õ“8j¯Ù¹‹4ˆ­Í¾j¶:ڸ浬ØmY“‘Á¯´; ío››Ùe¶­º×MgWO{“çÖ¶rÝ}m]g+×½~7¤m‹h€\àÿ'¸ž½{p„'\á gxÃþpˆJ"ÖŒxŹ4q‹güË×8FÆc4…5½ëxR8Þñ0ø9œ`Ã\+˜ÄK¾”“k¼¬—ËÉ;2j Áöì’hl}óœå<ã;@0È¡òºùü$6GzF2GñŠÃ¼êq¹úÖB¢{}+]{ÙQCv`“ÏìÓÙïJCMµ¯}_03YÛÝÞ¬+-îr‡Ýk X¥óýáy Úø•ñ‹ÿˆá?[pÈG^à[ |å-yÌg^ó›ç|ç=ÿyЇ^ôšÿ“ãe©‰hõªg}ë]ÏúXÄ^ö³§}íeOyÖ3åõ»oÿ½í}ÿû-„k ¼}êWŸûØÿã÷Ëî‰ïzã_ÉW>ó}?üçC_õÒ·~÷K¯ø¬”âøÒÏ>컿|ço¿ü®??ú…¯þñÇÿøæ¯~ûgŸþè«?ÿóŸ~òíÿÖÛ¿ÔÀÞû?Ûû¾ˆ <‹°;ƒ¿õS=¬½ôã¿õ‹@Ú >pÁ>Œ>òC> Œ=üƒ¿ܾì¿X¨¿ÿÃ>Ô?|½œ=ÒPÀT{™½¿ܽA¼Á|A ü–Ô¾ìËÁæ B!$>"4Â#ä="Œ…åAÄ»äAÌÁ ¤BüÀô%¼Á$ìÂLB,d¿Ùc ¬¬‹B(CÿóóA0¬@+|?6ÌB ¼B*Ã9¤Ãb¾‰%54Œì“1ADB,DCò›G$¬D üÆx,Å!,G|´?t¼&ùÁÕ“¾NìÆYÔÇç³Å{ÔEodÈY4GW$ÈÏÈ=ÿ„Çö£E/´G.ìÇóÓÈ0äG‡ìE‰,¾ÌErôÁpÄÂqG‘LÉüGª°A˜lÈšœÅ•¼C+DÈzôAˆ|GŒ´>™$ štI”4J-ÌÉZÜIì>žìIê;"ßÊ¡(J–dÊ‘Ç[¼II8ôÉQ<±,I®LÁ§ÄAŽì–³äF-\K2K†‹ÿ£J°J<Ê«TÉ­DJ›äˇlJïkÆ`LaTÆ>4ÅdFCkLd4ÌÄÌÑ+LÉ=¡É,R¡ñ®͜8ñÂLÆë+jq°} ÍÄ¢K“ KÔDM`ì̽Ò(­¶ÌœMÚ|®Ú,M×´º*ãLÓ¼«Ñ4ÿ »ÍÞÄ+qQÍÜ,®ãÔ Ö¤0‹E{MጠÖìä ?ØÌ™)#M/Q9–“'ƒ°óNíêˆB:¤¦ˆ«£…™9òOüŠÍÏ”Bò‰˜{ÏötO…šÎ‘ÐOüÜ—ßD™_L®þOŒh ûŒ©)þ¤Î•©ß¼3ÜlÐ÷4µê¼¦ }•Õ¼P ÅN ÓЪôÐKÉPÐDP±‘ÐÍêˆÆZ‰ÇQU®Ž¨¬¶P‰ë"Ñ¥ÑѺ¼N«ËÎ=®ÏÂÑ'Ñè”ÎŽP­0Òõ«ËLRÛZRåMÛ|R"EÒE©LУL+í<ÄÜÒgdLdtÌ?ÃÒ,Ý<1ÓÌ+S3żÿŬÌGÀd¾-TË7E?·ìÁ]lS$K¿ìÊ:mäÜ˼lË9¾ŸŒI= Ô¾DTœÔ»T<ýÈBýÀ5ÄGuÊ>…À´ä–K¥ÃƒÔë‹T œT@¬TëóJSÌÔmÙÔ–TÔ®ŒT Ìâ ÄEœUZ­U[½U\¥ÕF<ÔFMÔ^]Ô…,K7%U8uÕWåC^]J¼üÕ®TÊ\Ve½SaÍÓX%V:õTÛ‹SMÅV TÕ—ÜÓ3LÖguÔiýHg=Ir×xU’,Î4}Wb<ׯLWVMAv ×j-WKåÖ ”×S…Öq­Ã{KqEW_Ö:ô×}XƒýKk]>QõÌâ×ÿûóV½ VuÍH‹•ÖŒm¿5õ;ª“ н½MXFEØN}ØOYÙûXbž)TÙl-Y`íH™íV–m>cÅW±ÉYS]Ø?ÅØzV}-Uc•ʱÌ׎Ý×›íד Ø”-Úb KKÚžmÚŠõY…MH¬”Zô;Z‚UÚ¡ÕX­}Ú†åSŸXjŹU¯>šmV³×ƒ…ÚVÍY'Ä9c‹E¬%Ù²Zf5Ë´ÅÛÑœ:&MPÓ;\Æ£¸¶U܆#¼Æu܃SÃÈ•ÜÈúÅʵÜÞJ\Í<Îí\¹û\’š×ÎÓ,Ñ=²Hj™MåÔší«Ôe´ÕU™ÖmBme«Ø-¡8Ê©ˆÿÞÍÜŠÚUÈ‹è]õ\šŽð³ôÙÑ`;u9—èE¼#ëU*£ à€áEÕ$šR›^ñmˆë=ÞrQ©±„ÞIª0Q öE‰ë•ƒàý;Ã]WñU» lÈ –¨Þ£X^µÍȇØ_àé_•`~N˜Ý™@1—ó¬;[£µ–“_ÀKÀNi^5ºe:f`¦Â†~»ôrÀ´Ö‰î½XuaàšS;lpºÿ †àLÎà&º+ p9rP«±[^Êß‹¨aó} ñu*N˜±0©‰› 6‰Ú%ÞÛ&–^vаKˆò-ßcšó5™ÿëµû¬£9bQ%™,6Ùx)*$V]Kr™9~Ý»ÊÝ0&ÖM`s½Ü;V$ÒÕcÓÝ<Ô-dÐõ:?nd¤{dH.9IždcdKÎdMÞdNîäKYX‚Žå%(€PeRŽ+*Ž–±8 x‡0ŽˆóÝ”9”@#öä±ãN¥p9žCˆWV8æ‚X‚€dˆ#``€%8åQXdVf‹`¹¦@ rȨ”£¹–{9”¹èνS æ®Ø¹¥ú_ñ©fz®f‚å@¨çzfe`€#€#€‚x0eT|Ö狺[~Yò™+ÿ©º{Y ¢“M&vg·û §››eFˆŽˆ8æc~hæ8‚k&å% haºª_„g &§ƒ:y‘º(žA?Øaž ­Cˆ•Nˆ¢.j¢Nj¶ˆ•Fj‘¨å‡ˆ¡þ_jíÀ‰_Š%èNŸ¨¶j°^< kqÑμÚ;²îê—eºí¥‘±NkåÅ`¶†kJ¦k»¾ëL–<½Þk¾îëyŠ–½v2‚žG:¦I«'û¨´Qð˜PŒÙùµ©•+1•+9ˆ…Äqó!Å–3Ã&· º£Ïqì<:+Zì÷íö&ßàîî6‘ ïž.ïWsoz#íjK²~3Øo¹,ì{óogJ7óÎoø&ðܦmÓ¨oÃß6þã½ÈU Ïp ßpŸÕͺkëš8ð6KpÆ&qNcðQ‰ð÷èˆæ¬<޵pS6-Ã7~ÃqÀpåXq 1ðgpã&¯ñÛàñIñq‰ ¡>Ð}òk¾ÓÄlFjyF*¿r(<ÀÖ륳¹¢óóŽ·ÿýÖïÿž %Wr0Ò)¶£ÅíÈÑ«‰óÔ†íênnFa3§qö>ówpÌ>ûöé–‰î;1:·z;ñ ô¬Yó—’éLÒ9Çžê ÁI÷sþîó4WïRJô.7ˆ ê$r¤6KïÈ–·ûºq¿õO›57„^h‡^0#éˆ‚ŠšñSß7åÞµ"ÿóoñ±(8a‡9©ËÐ=`¦è…>ùðâÜñwqwr1ËaŸï1pÀ•otI÷"[/q\Oq³vIðJwÞÓ]!O¶§6R×q#w5_qc‡^w_¶z·wÿ‚tf‡÷SGrÑ(…^øv0„>KГ^ €7Èøxƒ†Çˆÿ ~0ŠOvª/a3Éöq™`øË@1ø‡{¨Œœßyoßу2ë õÑáÐò"­ô’ŠõRá.ÿj„’™¢ Ï”3O(®Q¼ª!E;?øžŒº™pòO4*(½úš Eà±há°[‹¬öÅ/Ÿ®ð”û¹g/ª2ú¢'zôdѵ)¼?¯¿®»×{Á'|Ln981¥wR³?ûÆ‹^ÃÇ–BŸä?tޝ.|Œp†ÎÈ_üÀ§{¤ÿ|»ï|ùü…¡ßºWµ8’år®ÔoˆÉ÷|ÒÏ©¥/}ø3ØïòÿÍ'av§ïœýÆ×Û!u|àYOÑ~“ã{¬ßúTcàG~«ÃÎ61Ù«/‘M)…~Í¡ÒEÑ~áw«~ôò~€D•` ú€ ™`Ï„ˆ}Ì'ÿ‘øC¦púˆÊýøg ¶È~øo¼¤¸`„ˆ+ÿþ(hð`©ƒ 2lèð!Ĉ%:LH±¡Å‹ 3jœØñ#ÈŽAŽüXRdHƒS8PÑ•‚W½³bÊu²ì àäE A{ ¥XÔ'R‰G#.…ØôáS‡+}*ÂVs 6K˜‚èõk­¤)£Š-kö,Ú´j×îdËÕ-Ü‚dãÒ­k÷.Þ¶¿òíëjN¿y ÎUXÿØ0Ñă“ö8VqN¢ÿ°5döÏ`Ÿ,ŸYü“ecÂC†öì˜ôh’=§†äÙÐ5ÃÒýÀÆ+Û4îܺï²ì¹­ -3ËÜ•/¶›ƒoïnîü9ÒÞ Ïó;°³qè(ƒNmRûÐîâ¹G^ZQ_ÌæK±oïþ=üøòçÓ¯oÿ~|„íõ³çOº?aû \øx ‚ &ø‚Ö2P} ‡Amw•‚†j¸!‡\Ø!ˆ~"‰ŽXbˆÌ™v"Š"¶H"‹/f£ŒþCŽ9ê¸#8bcWàÒcŽ¡ñ3[ý†Ýr5rHcPÊ(å‹*zFe‹X¢¨%ŒNrÿx#‘aî8Ð8‚óÏ9Rób†d…qq™¢—ÎIg3‚Tž3öiâŸw‚¦˜…’‰£%ÿP£ã@nî)R z(© ">ª¥™öYé—86Zh?~:5( °&;ކ$*_WFúꦔ^Ê”¦±ÚÚ'˜ÖJA)<©mª RMÍa '²É*»,³Í:û,´ÑJ;-µÕ.Ûc¯»†ù¦`æÁš'§vÊ:+Tµ‚ûm¹ò¥-¯’À™æ°ä–{ë¹èzi¥·ö:®ŸÊ-Ê# À&¯¼é¥¹uâÛäÂSFüâ¿çø)‘c»AÖ¹J¯Ã ß›°Âgi2Š[ÿLAuó˜Ì?­ L²a(—Èo¿›Ò¼‘ÈûÚL¢ÊC»ãÃ× ò½ãîLXÏ #ídÐg»r‘KÇö3žOGi5ÓXƒˆó¤þR­ãÔcW…`ƒ¶ÖSr-WÓ·M1Õ†Üó%Á슂%÷Ü3$Ùέ48ÒI§vÜU*mõÚ{ÝaÔÚ¢Pв½”¹qs„¾¹B‡?þdâY¾ýSè[~¾¡º_±[6ÕgC¢µ±Ë>;íµÛ~;îºòÈú樍ɿé6>ºãÁ*6ºʻžÛfüñs‹þvñÒß,iäÚ2/õè]ý}È_úõÖ—˜ý®Û¯Þ=Üæw ½‡ãÃ<®c&i?ŽÎ[8?ù0Êï~ÖÂW?ü©O{ì; ¸é(°| ×;fftw-2.1.5/doc/fftw.info0000644000175400001440000001032507637527602010555 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  Indirect: fftw.info-1: 845 fftw.info-2: 49505 fftw.info-3: 98373 fftw.info-4: 148305 fftw.info-5: 195175  Tag Table: (Indirect) Node: Top845 Node: Introduction4259 Node: Tutorial10607 Node: Complex One-dimensional Transforms Tutorial12836 Node: Complex Multi-dimensional Transforms Tutorial16319 Node: Real One-dimensional Transforms Tutorial20021 Ref: Real One-dimensional Transforms Tutorial-Footnote-124847 Node: Real Multi-dimensional Transforms Tutorial25023 Node: Multi-dimensional Array Format33169 Node: Row-major Format33863 Node: Column-major Format35201 Node: Static Arrays in C36177 Node: Dynamic Arrays in C36666 Node: Dynamic Arrays in C-The Wrong Way38094 Node: Words of Wisdom39840 Node: Caveats in Using Wisdom44489 Node: Importing and Exporting Wisdom45996 Node: FFTW Reference49505 Node: Data Types50849 Node: One-dimensional Transforms Reference53597 Node: fftw_create_plan54271 Ref: fftw_create_plan-Footnote-160092 Node: Discussion on Specific Plans60217 Node: fftw61562 Node: fftw_destroy_plan64208 Node: What FFTW Really Computes64641 Node: Multi-dimensional Transforms Reference66000 Node: fftwnd_create_plan66659 Ref: fftwnd_create_plan-Footnote-173099 Node: fftwnd73471 Node: fftwnd_destroy_plan76433 Node: What FFTWND Really Computes76884 Node: Real One-dimensional Transforms Reference77766 Ref: Real One-dimensional Transforms Reference-Footnote-178494 Node: rfftw_create_plan78585 Node: rfftw83769 Node: rfftw_destroy_plan86369 Node: What RFFTW Really Computes86824 Node: Real Multi-dimensional Transforms Reference88202 Node: rfftwnd_create_plan88963 Node: rfftwnd93914 Node: Array Dimensions for Real Multi-dimensional Transforms98373 Node: Strides in In-place RFFTWND100420 Node: rfftwnd_destroy_plan102812 Node: What RFFTWND Really Computes103295 Node: Wisdom Reference104233 Node: fftw_export_wisdom104499 Node: fftw_import_wisdom106146 Node: fftw_forget_wisdom108013 Node: Memory Allocator Reference108392 Node: Thread safety109475 Node: Parallel FFTW111388 Node: Multi-threaded FFTW113488 Node: Installation and Supported Hardware/Software114386 Node: Usage of Multi-threaded FFTW116205 Ref: Usage of Multi-threaded FFTW-Footnote-1120052 Node: How Many Threads to Use?120418 Node: Using Multi-threaded FFTW in a Multi-threaded Program122084 Node: Tips for Optimal Threading122785 Node: MPI FFTW124401 Node: MPI FFTW Installation125243 Node: Usage of MPI FFTW for Complex Multi-dimensional Transforms127040 Node: MPI Data Layout132162 Node: Usage of MPI FFTW for Real Multi-dimensional Transforms137357 Node: Usage of MPI FFTW for Complex One-dimensional Transforms143774 Ref: Usage of MPI FFTW for Complex One-dimensional Transforms-Footnote-1147938 Node: MPI Tips148305 Ref: MPI Tips-Footnote-1150141 Node: Calling FFTW from Fortran150297 Node: Wrapper Routines151725 Ref: Wrapper Routines-Footnote-1154864 Node: FFTW Constants in Fortran155067 Node: Fortran Examples156665 Node: Installation and Customization160353 Node: Installation on Unix161690 Ref: Installation on Unix-Footnote-1166017 Node: Installation on non-Unix Systems166216 Node: Installing FFTW in both single and double precision168536 Node: gcc and Pentium hacks170220 Node: Customizing the timer172751 Node: Generating your own code174665 Node: Acknowledgments177314 Node: License and Copyright180169 Node: Concept Index181806 Node: Library Index195175  End Tag Table fftw-2.1.5/doc/fftw.info-10000644000175400001440000014054107637527602010717 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: fftw.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) FFTW User Manual **************** Welcome to FFTW, the Fastest Fourier Transform in the West. FFTW is a collection of fast C routines to compute the discrete Fourier transform. This manual documents FFTW version 2.1.5. * Menu: * Introduction:: * Tutorial:: * FFTW Reference:: * Parallel FFTW:: * Calling FFTW from Fortran:: * Installation and Customization:: * Acknowledgments:: * License and Copyright:: * Concept Index:: * Library Index:: Tutorial * Complex One-dimensional Transforms Tutorial:: * Complex Multi-dimensional Transforms Tutorial:: * Real One-dimensional Transforms Tutorial:: * Real Multi-dimensional Transforms Tutorial:: * Multi-dimensional Array Format:: * Words of Wisdom:: Multi-dimensional Array Format * Row-major Format:: * Column-major Format:: * Static Arrays in C:: * Dynamic Arrays in C:: * Dynamic Arrays in C-The Wrong Way:: Words of Wisdom * Caveats in Using Wisdom:: What you should worry about in using wisdom * Importing and Exporting Wisdom:: I/O of wisdom to disk and other media FFTW Reference * Data Types:: real, complex, and halfcomplex numbers * One-dimensional Transforms Reference:: * Multi-dimensional Transforms Reference:: * Real One-dimensional Transforms Reference:: * Real Multi-dimensional Transforms Reference:: * Wisdom Reference:: * Memory Allocator Reference:: * Thread safety:: One-dimensional Transforms Reference * fftw_create_plan:: Plan Creation * Discussion on Specific Plans:: * fftw:: Plan Execution * fftw_destroy_plan:: Plan Destruction * What FFTW Really Computes:: Definition of the DFT. Multi-dimensional Transforms Reference * fftwnd_create_plan:: Plan Creation * fftwnd:: Plan Execution * fftwnd_destroy_plan:: Plan Destruction * What FFTWND Really Computes:: Real One-dimensional Transforms Reference * rfftw_create_plan:: Plan Creation * rfftw:: Plan Execution * rfftw_destroy_plan:: Plan Destruction * What RFFTW Really Computes:: Real Multi-dimensional Transforms Reference * rfftwnd_create_plan:: Plan Creation * rfftwnd:: Plan Execution * Array Dimensions for Real Multi-dimensional Transforms:: * Strides in In-place RFFTWND:: * rfftwnd_destroy_plan:: Plan Destruction * What RFFTWND Really Computes:: Wisdom Reference * fftw_export_wisdom:: * fftw_import_wisdom:: * fftw_forget_wisdom:: Parallel FFTW * Multi-threaded FFTW:: * MPI FFTW:: Multi-threaded FFTW * Installation and Supported Hardware/Software:: * Usage of Multi-threaded FFTW:: * How Many Threads to Use?:: * Using Multi-threaded FFTW in a Multi-threaded Program:: * Tips for Optimal Threading:: MPI FFTW * MPI FFTW Installation:: * Usage of MPI FFTW for Complex Multi-dimensional Transforms:: * MPI Data Layout:: * Usage of MPI FFTW for Real Multi-dimensional Transforms:: * Usage of MPI FFTW for Complex One-dimensional Transforms:: * MPI Tips:: Calling FFTW from Fortran * Wrapper Routines:: * FFTW Constants in Fortran:: * Fortran Examples:: Installation and Customization * Installation on Unix:: * Installation on non-Unix Systems:: * Installing FFTW in both single and double precision:: * gcc and Pentium hacks:: * Customizing the timer:: * Generating your own code::  File: fftw.info, Node: Introduction, Next: Tutorial, Prev: Top, Up: Top Introduction ************ This manual documents version 2.1.5 of FFTW, the _Fastest Fourier Transform in the West_. FFTW is a comprehensive collection of fast C routines for computing the discrete Fourier transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size. FFTW also includes parallel transforms for both shared- and distributed-memory systems. We assume herein that the reader is already familiar with the properties and uses of the DFT that are relevant to her application. Otherwise, see e.g. `The Fast Fourier Transform' by E. O. Brigham (Prentice-Hall, Englewood Cliffs, NJ, 1974). Our web page (http://www.fftw.org) also has links to FFT-related information online. FFTW is usually faster (and sometimes much faster) than all other freely-available Fourier transform programs found on the Net. For transforms whose size is a power of two, it compares favorably with the FFT codes in Sun's Performance Library and IBM's ESSL library, which are targeted at specific machines. Moreover, FFTW's performance is _portable_. Indeed, FFTW is unique in that it automatically adapts itself to your machine, your cache, the size of your memory, the number of registers, and all the other factors that normally make it impossible to optimize a program for more than one machine. An extensive comparison of FFTW's performance with that of other Fourier transform codes has been made. The results are available on the Web at the benchFFT home page (http://theory.lcs.mit.edu/~benchfft). In order to use FFTW effectively, you need to understand one basic concept of FFTW's internal structure. FFTW does not used a fixed algorithm for computing the transform, but it can adapt the DFT algorithm to details of the underlying hardware in order to achieve best performance. Hence, the computation of the transform is split into two phases. First, FFTW's "planner" is called, which "learns" the fastest way to compute the transform on your machine. The planner produces a data structure called a "plan" that contains this information. Subsequently, the plan is passed to FFTW's "executor", along with an array of input data. The executor computes the actual transform, as dictated by the plan. The plan can be reused as many times as needed. In typical high-performance applications, many transforms of the same size are computed, and consequently a relatively-expensive initialization of this sort is acceptable. On the other hand, if you need a single transform of a given size, the one-time cost of the planner becomes significant. For this case, FFTW provides fast planners based on heuristics or on previously computed plans. The pattern of planning/execution applies to all four operation modes of FFTW, that is, I) one-dimensional complex transforms (FFTW), II) multi-dimensional complex transforms (FFTWND), III) one-dimensional transforms of real data (RFFTW), IV) multi-dimensional transforms of real data (RFFTWND). Each mode comes with its own planner and executor. Besides the automatic performance adaptation performed by the planner, it is also possible for advanced users to customize FFTW for their special needs. As distributed, FFTW works most efficiently for arrays whose size can be factored into small primes (2, 3, 5, and 7), and uses a slower general-purpose routine for other factors. FFTW, however, comes with a code generator that can produce fast C programs for any particular array size you may care about. For example, if you need transforms of size 513 = 19 x 3^3, you can customize FFTW to support the factor 19 efficiently. FFTW can exploit multiple processors if you have them. FFTW comes with a shared-memory implementation on top of POSIX (and similar) threads, as well as a distributed-memory implementation based on MPI. We also provide an experimental parallel implementation written in Cilk, _the superior programming tool of choice for discriminating hackers_ (Olin Shivers). (See the Cilk home page (http://supertech.lcs.mit.edu/cilk).) For more information regarding FFTW, see the paper, "The Fastest Fourier Transform in the West," by M. Frigo and S. G. Johnson, which is the technical report MIT-LCS-TR-728 (Sep. '97). See also, "FFTW: An Adaptive Software Architecture for the FFT," by M. Frigo and S. G. Johnson, which appeared in the 23rd International Conference on Acoustics, Speech, and Signal Processing (`Proc. ICASSP 1998' 3, p. 1381). The code generator is described in the paper "A Fast Fourier Transform Compiler", by M. Frigo, to appear in the `Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Atlanta, Georgia, May 1999'. These papers, along with the latest version of FFTW, the FAQ, benchmarks, and other links, are available at the FFTW home page (http://www.fftw.org). The current version of FFTW incorporates many good ideas from the past thirty years of FFT literature. In one way or another, FFTW uses the Cooley-Tukey algorithm, the Prime Factor algorithm, Rader's algorithm for prime sizes, and the split-radix algorithm (with a variation due to Dan Bernstein). Our code generator also produces new algorithms that we do not yet completely understand. The reader is referred to the cited papers for the appropriate references. The rest of this manual is organized as follows. We first discuss the sequential (one-processor) implementation. We start by describing the basic features of FFTW in *Note Tutorial::. This discussion includes the storage scheme of multi-dimensional arrays (*Note Multi-dimensional Array Format::) and FFTW's mechanisms for storing plans on disk (*Note Words of Wisdom::). Next, *Note FFTW Reference:: provides comprehensive documentation of all FFTW's features. Parallel transforms are discussed in their own chapter *Note Parallel FFTW::. Fortran programmers can also use FFTW, as described in *Note Calling FFTW from Fortran::. *Note Installation and Customization:: explains how to install FFTW in your computer system and how to adapt FFTW to your needs. License and copyright information is given in *Note License and Copyright::. Finally, we thank all the people who helped us in *Note Acknowledgments::.  File: fftw.info, Node: Tutorial, Next: FFTW Reference, Prev: Introduction, Up: Top Tutorial ******** This chapter describes the basic usage of FFTW, i.e., how to compute the Fourier transform of a single array. This chapter tells the truth, but not the _whole_ truth. Specifically, FFTW implements additional routines and flags, providing extra functionality, that are not documented here. *Note FFTW Reference::, for more complete information. (Note that you need to compile and install FFTW before you can use it in a program. *Note Installation and Customization::, for the details of the installation.) Here, we assume a default installation of FFTW. In some installations (particulary from binary packages), the FFTW header files and libraries are prefixed with ``d'' or ``s'' to indicate versions in double or single precision, respectively. The usage of FFTW in that case is the same, except that `#include' directives and link commands must use the appropriate prefix. *Note Installing FFTW in both single and double precision::, for more information. This tutorial chapter is structured as follows. *Note Complex One-dimensional Transforms Tutorial:: describes the basic usage of the one-dimensional transform of complex data. *Note Complex Multi-dimensional Transforms Tutorial:: describes the basic usage of the multi-dimensional transform of complex data. *Note Real One-dimensional Transforms Tutorial:: describes the one-dimensional transform of real data and its inverse. Finally, *Note Real Multi-dimensional Transforms Tutorial:: describes the multi-dimensional transform of real data and its inverse. We recommend that you read these sections in the order that they are presented. We then discuss two topics in detail. In *Note Multi-dimensional Array Format::, we discuss the various alternatives for storing multi-dimensional arrays in memory. *Note Words of Wisdom:: shows how you can save FFTW's plans for future use. * Menu: * Complex One-dimensional Transforms Tutorial:: * Complex Multi-dimensional Transforms Tutorial:: * Real One-dimensional Transforms Tutorial:: * Real Multi-dimensional Transforms Tutorial:: * Multi-dimensional Array Format:: * Words of Wisdom::  File: fftw.info, Node: Complex One-dimensional Transforms Tutorial, Next: Complex Multi-dimensional Transforms Tutorial, Prev: Tutorial, Up: Tutorial Complex One-dimensional Transforms Tutorial =========================================== The basic usage of FFTW is simple. A typical call to FFTW looks like: #include ... { fftw_complex in[N], out[N]; fftw_plan p; ... p = fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE); ... fftw_one(p, in, out); ... fftw_destroy_plan(p); } The first thing we do is to create a "plan", which is an object that contains all the data that FFTW needs to compute the FFT, using the following function: fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); The first argument, `n', is the size of the transform you are trying to compute. The size `n' can be any positive integer, but sizes that are products of small factors are transformed most efficiently. The second argument, `dir', can be either `FFTW_FORWARD' or `FFTW_BACKWARD', and indicates the direction of the transform you are interested in. Alternatively, you can use the sign of the exponent in the transform, -1 or +1, which corresponds to `FFTW_FORWARD' or `FFTW_BACKWARD' respectively. The `flags' argument is either `FFTW_MEASURE' or `FFTW_ESTIMATE'. `FFTW_MEASURE' means that FFTW actually runs and measures the execution time of several FFTs in order to find the best way to compute the transform of size `n'. This may take some time, depending on your installation and on the precision of the timer in your machine. `FFTW_ESTIMATE', on the contrary, does not run any computation, and just builds a reasonable plan, which may be sub-optimal. In other words, if your program performs many transforms of the same size and initialization time is not important, use `FFTW_MEASURE'; otherwise use the estimate. (A compromise between these two extremes exists. *Note Words of Wisdom::.) Once the plan has been created, you can use it as many times as you like for transforms on arrays of the same size. When you are done with the plan, you deallocate it by calling `fftw_destroy_plan(plan)'. The transform itself is computed by passing the plan along with the input and output arrays to `fftw_one': void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); Note that the transform is out of place: `in' and `out' must point to distinct arrays. It operates on data of type `fftw_complex', a data structure with real (`in[i].re') and imaginary (`in[i].im') floating-point components. The `in' and `out' arrays should have the length specified when the plan was created. An alternative function, `fftw', allows you to efficiently perform multiple and/or strided transforms (*note FFTW Reference::). The DFT results are stored in-order in the array `out', with the zero-frequency (DC) component in `out[0]'. The array `in' is not modified. Users should note that FFTW computes an unnormalized DFT, the sign of whose exponent is given by the `dir' parameter of `fftw_create_plan'. Thus, computing a forward followed by a backward transform (or vice versa) results in the original array scaled by `n'. *Note What FFTW Really Computes::, for the definition of DFT. A program using FFTW should be linked with `-lfftw -lm' on Unix systems, or with the FFTW and standard math libraries in general.  File: fftw.info, Node: Complex Multi-dimensional Transforms Tutorial, Next: Real One-dimensional Transforms Tutorial, Prev: Complex One-dimensional Transforms Tutorial, Up: Tutorial Complex Multi-dimensional Transforms Tutorial ============================================= FFTW can also compute transforms of any number of dimensions ("rank"). The syntax is similar to that for the one-dimensional transforms, with `fftw_' replaced by `fftwnd_' (which stands for "`fftw' in `N' dimensions"). As before, we `#include ' and create a plan for the transforms, this time of type `fftwnd_plan': fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); `rank' is the dimensionality of the array, and can be any non-negative integer. The next argument, `n', is a pointer to an integer array of length `rank' containing the (positive) sizes of each dimension of the array. (Note that the array will be stored in row-major order. *Note Multi-dimensional Array Format::, for information on row-major order.) The last two parameters are the same as in `fftw_create_plan'. We now, however, have an additional possible flag, `FFTW_IN_PLACE', since `fftwnd' supports true in-place transforms. Multiple flags are combined using a bitwise "or" (`|'). (An "in-place" transform is one in which the output data overwrite the input data. It thus requires half as much memory as--and is often faster than--its opposite, an "out-of-place" transform.) For two- and three-dimensional transforms, FFTWND provides alternative routines that accept the sizes of each dimension directly, rather than indirectly through a rank and an array of sizes. These are otherwise identical to `fftwnd_create_plan', and are sometimes more convenient: fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); Once the plan has been created, you can use it any number of times for transforms of the same size. When you do not need a plan anymore, you can deallocate the plan by calling `fftwnd_destroy_plan(plan)'. Given a plan, you can compute the transform of an array of data by calling: void fftwnd_one(fftwnd_plan plan, fftw_complex *in, fftw_complex *out); Here, `in' and `out' point to multi-dimensional arrays in row-major order, of the size specified when the plan was created. In the case of an in-place transform, the `out' parameter is ignored and the output data are stored in the `in' array. The results are stored in-order, unnormalized, with the zero-frequency component in `out[0]'. A forward followed by a backward transform (or vice-versa) yields the original data multiplied by the size of the array (i.e. the product of the dimensions). *Note What FFTWND Really Computes::, for a discussion of what FFTWND computes. For example, code to perform an in-place FFT of a three-dimensional array might look like: #include ... { fftw_complex in[L][M][N]; fftwnd_plan p; ... p = fftw3d_create_plan(L, M, N, FFTW_FORWARD, FFTW_MEASURE | FFTW_IN_PLACE); ... fftwnd_one(p, &in[0][0][0], NULL); ... fftwnd_destroy_plan(p); } Note that `in' is a statically-declared array, which is automatically in row-major order, but we must take the address of the first element in order to fit the type expected by `fftwnd_one'. (*Note Multi-dimensional Array Format::.)  File: fftw.info, Node: Real One-dimensional Transforms Tutorial, Next: Real Multi-dimensional Transforms Tutorial, Prev: Complex Multi-dimensional Transforms Tutorial, Up: Tutorial Real One-dimensional Transforms Tutorial ======================================== If the input data are purely real, you can save roughly a factor of two in both time and storage by using the "rfftw" transforms, which are FFTs specialized for real data. The output of a such a transform is a "halfcomplex" array, which consists of only half of the complex DFT amplitudes (since the negative-frequency amplitudes for real data are the complex conjugate of the positive-frequency amplitudes). In exchange for these speed and space advantages, the user sacrifices some of the simplicity of FFTW's complex transforms. First of all, to allow maximum performance, the output format of the one-dimensional real transforms is different from that used by the multi-dimensional transforms. Second, the inverse transform (halfcomplex to real) has the side-effect of destroying its input array. Neither of these inconveniences should pose a serious problem for users, but it is important to be aware of them. (Both the inconvenient output format and the side-effect of the inverse transform can be ameliorated for one-dimensional transforms, at the expense of some performance, by using instead the multi-dimensional transform routines with a rank of one.) The computation of the plan is similar to that for the complex transforms. First, you `#include '. Then, you create a plan (of type `rfftw_plan') by calling: rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); `n' is the length of the _real_ array in the transform (even for halfcomplex-to-real transforms), and can be any positive integer (although sizes with small factors are transformed more efficiently). `dir' is either `FFTW_REAL_TO_COMPLEX' or `FFTW_COMPLEX_TO_REAL'. The `flags' parameter is the same as in `fftw_create_plan'. Once created, a plan can be used for any number of transforms, and is deallocated when you are done with it by calling `rfftw_destroy_plan(plan)'. Given a plan, a real-to-complex or complex-to-real transform is computed by calling: void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); (Note that `fftw_real' is an alias for the floating-point type for which FFTW was compiled.) Depending upon the direction of the plan, either the input or the output array is halfcomplex, and is stored in the following format: r0, r1, r2, r(n/2), i((n+1)/2-1), ..., i2, i1 Here, rk is the real part of the kth output, and ik is the imaginary part. (We follow here the C convention that integer division is rounded down, e.g. 7 / 2 = 3.) For a halfcomplex array `hc[]', the kth component has its real part in `hc[k]' and its imaginary part in `hc[n-k]', with the exception of `k' `==' `0' or `n/2' (the latter only if n is even)--in these two cases, the imaginary part is zero due to symmetries of the real-complex transform, and is not stored. Thus, the transform of `n' real values is a halfcomplex array of length `n', and vice versa. (1) This is actually only half of the DFT spectrum of the data. Although the other half can be obtained by complex conjugation, it is not required by many applications such as convolution and filtering. Like the complex transforms, the RFFTW transforms are unnormalized, so a forward followed by a backward transform (or vice-versa) yields the original data scaled by the length of the array, `n'. Let us reiterate here our warning that an `FFTW_COMPLEX_TO_REAL' transform has the side-effect of destroying its (halfcomplex) input. The `FFTW_REAL_TO_COMPLEX' transform, however, leaves its (real) input untouched, just as you would hope. As an example, here is an outline of how you might use RFFTW to compute the power spectrum of a real array (i.e. the squares of the absolute values of the DFT amplitudes): #include ... { fftw_real in[N], out[N], power_spectrum[N/2+1]; rfftw_plan p; int k; ... p = rfftw_create_plan(N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); ... rfftw_one(p, in, out); power_spectrum[0] = out[0]*out[0]; /* DC component */ for (k = 1; k < (N+1)/2; ++k) /* (k < N/2 rounded up) */ power_spectrum[k] = out[k]*out[k] + out[N-k]*out[N-k]; if (N % 2 == 0) /* N is even */ power_spectrum[N/2] = out[N/2]*out[N/2]; /* Nyquist freq. */ ... rfftw_destroy_plan(p); } Programs using RFFTW should link with `-lrfftw -lfftw -lm' on Unix, or with the FFTW, RFFTW, and math libraries in general. ---------- Footnotes ---------- (1) The output for the multi-dimensional rfftw is a more-conventional array of `fftw_complex' values, but the format here permitted us greater efficiency in one dimension.  File: fftw.info, Node: Real Multi-dimensional Transforms Tutorial, Next: Multi-dimensional Array Format, Prev: Real One-dimensional Transforms Tutorial, Up: Tutorial Real Multi-dimensional Transforms Tutorial ========================================== FFTW includes multi-dimensional transforms for real data of any rank. As with the one-dimensional real transforms, they save roughly a factor of two in time and storage over complex transforms of the same size. Also as in one dimension, these gains come at the expense of some increase in complexity--the output format is different from the one-dimensional RFFTW (and is more similar to that of the complex FFTW) and the inverse (complex to real) transforms have the side-effect of overwriting their input data. To use the real multi-dimensional transforms, you first `#include ' and then create a plan for the size and direction of transform that you are interested in: rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); The first two parameters describe the size of the real data (not the halfcomplex data, which will have different dimensions). The last two parameters are the same as those for `rfftw_create_plan'. Just as for fftwnd, there are two alternate versions of this routine, `rfftw2d_create_plan' and `rfftw3d_create_plan', that are sometimes more convenient for two- and three-dimensional transforms. Also as in fftwnd, rfftwnd supports true in-place transforms, specified by including `FFTW_IN_PLACE' in the flags. Once created, a plan can be used for any number of transforms, and is deallocated by calling `rfftwnd_destroy_plan(plan)'. Given a plan, the transform is computed by calling one of the following two routines: void rfftwnd_one_real_to_complex(rfftwnd_plan plan, fftw_real *in, fftw_complex *out); void rfftwnd_one_complex_to_real(rfftwnd_plan plan, fftw_complex *in, fftw_real *out); As is clear from their names and parameter types, the former function is for `FFTW_REAL_TO_COMPLEX' transforms and the latter is for `FFTW_COMPLEX_TO_REAL' transforms. (We could have used only a single routine, since the direction of the transform is encoded in the plan, but we wanted to correctly express the datatypes of the parameters.) The latter routine, as we discuss elsewhere, has the side-effect of overwriting its input (except when the rank of the array is one). In both cases, the `out' parameter is ignored for in-place transforms. The format of the complex arrays deserves careful attention. Suppose that the real data has dimensions n1 x n2 x ... x nd (in row-major order). Then, after a real-to-complex transform, the output is an n1 x n2 x ... x (nd/2+1) array of `fftw_complex' values in row-major order, corresponding to slightly over half of the output of the corresponding complex transform. (Note that the division is rounded down.) The ordering of the data is otherwise exactly the same as in the complex case. (In principle, the output could be exactly half the size of the complex transform output, but in more than one dimension this requires too complicated a format to be practical.) Note that, unlike the one-dimensional RFFTW, the real and imaginary parts of the DFT amplitudes are here stored together in the natural way. Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data--two extra if the last dimension is even and one if it is odd. That is, the last dimension of the real data must physically contain 2 * (nd/2+1) `fftw_real' values (exactly enough to hold the complex data). This physical array size does not, however, change the _logical_ array size--only nd values are actually stored in the last dimension, and nd is the last dimension passed to `rfftwnd_create_plan'. For example, consider the transform of a two-dimensional real array of size `nx' by `ny'. The output of the `rfftwnd' transform is a two-dimensional complex array of size `nx' by `ny/2+1', where the `y' dimension has been cut nearly in half because of redundancies in the output. Because `fftw_complex' is twice the size of `fftw_real', the output array is slightly bigger than the input array. Thus, if we want to compute the transform in place, we must _pad_ the input array so that it is of size `nx' by `2*(ny/2+1)'. If `ny' is even, then there are two padding elements at the end of each row (which need not be initialized, as they are only used for output). The RFFTWND transforms are unnormalized, so a forward followed by a backward transform will result in the original data scaled by the number of real data elements--that is, the product of the (logical) dimensions of the real data. Below, we illustrate the use of RFFTWND by showing how you might use it to compute the (cyclic) convolution of two-dimensional real arrays `a' and `b' (using the identity that a convolution corresponds to a pointwise product of the Fourier transforms). For variety, in-place transforms are used for the forward FFTs and an out-of-place transform is used for the inverse transform. #include ... { fftw_real a[M][2*(N/2+1)], b[M][2*(N/2+1)], c[M][N]; fftw_complex *A, *B, C[M][N/2+1]; rfftwnd_plan p, pinv; fftw_real scale = 1.0 / (M * N); int i, j; ... p = rfftw2d_create_plan(M, N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE | FFTW_IN_PLACE); pinv = rfftw2d_create_plan(M, N, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); /* aliases for accessing complex transform outputs: */ A = (fftw_complex*) &a[0][0]; B = (fftw_complex*) &b[0][0]; ... for (i = 0; i < M; ++i) for (j = 0; j < N; ++j) { a[i][j] = ... ; b[i][j] = ... ; } ... rfftwnd_one_real_to_complex(p, &a[0][0], NULL); rfftwnd_one_real_to_complex(p, &b[0][0], NULL); for (i = 0; i < M; ++i) for (j = 0; j < N/2+1; ++j) { int ij = i*(N/2+1) + j; C[i][j].re = (A[ij].re * B[ij].re - A[ij].im * B[ij].im) * scale; C[i][j].im = (A[ij].re * B[ij].im + A[ij].im * B[ij].re) * scale; } /* inverse transform to get c, the convolution of a and b; this has the side effect of overwriting C */ rfftwnd_one_complex_to_real(pinv, &C[0][0], &c[0][0]); ... rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(pinv); } We access the complex outputs of the in-place transforms by casting each real array to a `fftw_complex' pointer. Because this is a "flat" pointer, we have to compute the row-major index `ij' explicitly in the convolution product loop. In order to normalize the convolution, we must multiply by a scale factor--we can do so either before or after the inverse transform, and choose the former because it obviates the necessity of an additional loop. Notice the limits of the loops and the dimensions of the various arrays. As with the one-dimensional RFFTW, an out-of-place `FFTW_COMPLEX_TO_REAL' transform has the side-effect of overwriting its input array. (The real-to-complex transform, on the other hand, leaves its input array untouched.) If you use RFFTWND for a rank-one transform, however, this side-effect does not occur. Because of this fact (and the simpler output format), users may find the RFFTWND interface more convenient than RFFTW for one-dimensional transforms. However, RFFTWND in one dimension is slightly slower than RFFTW because RFFTWND uses an extra buffer array internally.  File: fftw.info, Node: Multi-dimensional Array Format, Next: Words of Wisdom, Prev: Real Multi-dimensional Transforms Tutorial, Up: Tutorial Multi-dimensional Array Format ============================== This section describes the format in which multi-dimensional arrays are stored. We felt that a detailed discussion of this topic was necessary, since it is often a source of confusion among users and several different formats are common. Although the comments below refer to `fftwnd', they are also applicable to the `rfftwnd' routines. * Menu: * Row-major Format:: * Column-major Format:: * Static Arrays in C:: * Dynamic Arrays in C:: * Dynamic Arrays in C-The Wrong Way::  File: fftw.info, Node: Row-major Format, Next: Column-major Format, Prev: Multi-dimensional Array Format, Up: Multi-dimensional Array Format Row-major Format ---------------- The multi-dimensional arrays passed to `fftwnd' are expected to be stored as a single contiguous block in "row-major" order (sometimes called "C order"). Basically, this means that as you step through adjacent memory locations, the first dimension's index varies most slowly and the last dimension's index varies most quickly. To be more explicit, let us consider an array of rank d whose dimensions are n1 x n2 x n3 x ... x nd. Now, we specify a location in the array by a sequence of (zero-based) indices, one for each dimension: (i1, i2, ..., id). If the array is stored in row-major order, then this element is located at the position id + nd * (id-1 + nd-1 * (... + n2 * i1)). Note that each element of the array must be of type `fftw_complex'; i.e. a (real, imaginary) pair of (double-precision) numbers. Note also that, in `fftwnd', the expression above is multiplied by the stride to get the actual array index--this is useful in situations where each element of the multi-dimensional array is actually a data structure or another array, and you just want to transform a single field. In most cases, however, you use a stride of 1.  File: fftw.info, Node: Column-major Format, Next: Static Arrays in C, Prev: Row-major Format, Up: Multi-dimensional Array Format Column-major Format ------------------- Readers from the Fortran world are used to arrays stored in "column-major" order (sometimes called "Fortran order"). This is essentially the exact opposite of row-major order in that, here, the _first_ dimension's index varies most quickly. If you have an array stored in column-major order and wish to transform it using `fftwnd', it is quite easy to do. When creating the plan, simply pass the dimensions of the array to `fftwnd_create_plan' in _reverse order_. For example, if your array is a rank three `N x M x L' matrix in column-major order, you should pass the dimensions of the array as if it were an `L x M x N' matrix (which it is, from the perspective of `fftwnd'). This is done for you automatically by the FFTW Fortran wrapper routines (*note Calling FFTW from Fortran::).  File: fftw.info, Node: Static Arrays in C, Next: Dynamic Arrays in C, Prev: Column-major Format, Up: Multi-dimensional Array Format Static Arrays in C ------------------ Multi-dimensional arrays declared statically (that is, at compile time, not necessarily with the `static' keyword) in C are _already_ in row-major order. You don't have to do anything special to transform them. (*Note Complex Multi-dimensional Transforms Tutorial::, for an example of this sort of code.)  File: fftw.info, Node: Dynamic Arrays in C, Next: Dynamic Arrays in C-The Wrong Way, Prev: Static Arrays in C, Up: Multi-dimensional Array Format Dynamic Arrays in C ------------------- Often, especially for large arrays, it is desirable to allocate the arrays dynamically, at runtime. This isn't too hard to do, although it is not as straightforward for multi-dimensional arrays as it is for one-dimensional arrays. Creating the array is simple: using a dynamic-allocation routine like `malloc', allocate an array big enough to store N `fftw_complex' values, where N is the product of the sizes of the array dimensions (i.e. the total number of complex values in the array). For example, here is code to allocate a 5x12x27 rank 3 array: fftw_complex *an_array; an_array = (fftw_complex *) malloc(5 * 12 * 27 * sizeof(fftw_complex)); Accessing the array elements, however, is more tricky--you can't simply use multiple applications of the `[]' operator like you could for static arrays. Instead, you have to explicitly compute the offset into the array using the formula given earlier for row-major arrays. For example, to reference the (i,j,k)-th element of the array allocated above, you would use the expression `an_array[k + 27 * (j + 12 * i)]'. This pain can be alleviated somewhat by defining appropriate macros, or, in C++, creating a class and overloading the `()' operator.  File: fftw.info, Node: Dynamic Arrays in C-The Wrong Way, Prev: Dynamic Arrays in C, Up: Multi-dimensional Array Format Dynamic Arrays in C--The Wrong Way ---------------------------------- A different method for allocating multi-dimensional arrays in C is often suggested that is incompatible with `fftwnd': _using it will cause FFTW to die a painful death_. We discuss the technique here, however, because it is so commonly known and used. This method is to create arrays of pointers of arrays of pointers of ...etcetera. For example, the analogue in this method to the example above is: int i,j; fftw_complex ***a_bad_array; /* another way to make a 5x12x27 array */ a_bad_array = (fftw_complex ***) malloc(5 * sizeof(fftw_complex **)); for (i = 0; i < 5; ++i) { a_bad_array[i] = (fftw_complex **) malloc(12 * sizeof(fftw_complex *)); for (j = 0; j < 12; ++j) a_bad_array[i][j] = (fftw_complex *) malloc(27 * sizeof(fftw_complex)); } As you can see, this sort of array is inconvenient to allocate (and deallocate). On the other hand, it has the advantage that the (i,j,k)-th element can be referenced simply by `a_bad_array[i][j][k]'. If you like this technique and want to maximize convenience in accessing the array, but still want to pass the array to FFTW, you can use a hybrid method. Allocate the array as one contiguous block, but also declare an array of arrays of pointers that point to appropriate places in the block. That sort of trick is beyond the scope of this documentation; for more information on multi-dimensional arrays in C, see the `comp.lang.c' FAQ (http://www.eskimo.com/~scs/C-faq/s6.html).  File: fftw.info, Node: Words of Wisdom, Prev: Multi-dimensional Array Format, Up: Tutorial Words of Wisdom =============== FFTW implements a method for saving plans to disk and restoring them. In fact, what FFTW does is more general than just saving and loading plans. The mechanism is called "`wisdom'". Here, we describe this feature at a high level. *Note FFTW Reference::, for a less casual (but more complete) discussion of how to use `wisdom' in FFTW. Plans created with the `FFTW_MEASURE' option produce near-optimal FFT performance, but it can take a long time to compute a plan because FFTW must actually measure the runtime of many possible plans and select the best one. This is designed for the situations where so many transforms of the same size must be computed that the start-up time is irrelevant. For short initialization times but slightly slower transforms, we have provided `FFTW_ESTIMATE'. The `wisdom' mechanism is a way to get the best of both worlds. There are, however, certain caveats that the user must be aware of in using `wisdom'. For this reason, `wisdom' is an optional feature which is not enabled by default. At its simplest, `wisdom' provides a way of saving plans to disk so that they can be reused in other program runs. You create a plan with the flags `FFTW_MEASURE' and `FFTW_USE_WISDOM', and then save the `wisdom' using `fftw_export_wisdom': plan = fftw_create_plan(..., ... | FFTW_MEASURE | FFTW_USE_WISDOM); fftw_export_wisdom(...); The next time you run the program, you can restore the `wisdom' with `fftw_import_wisdom', and then recreate the plan using the same flags as before. This time, however, the same optimal plan will be created very quickly without measurements. (FFTW still needs some time to compute trigonometric tables, however.) The basic outline is: fftw_import_wisdom(...); plan = fftw_create_plan(..., ... | FFTW_USE_WISDOM); Wisdom is more than mere rote memorization, however. FFTW's `wisdom' encompasses all of the knowledge and measurements that were used to create the plan for a given size. Therefore, existing `wisdom' is also applied to the creation of other plans of different sizes. Whenever a plan is created with the `FFTW_MEASURE' and `FFTW_USE_WISDOM' flags, `wisdom' is generated. Thereafter, plans for any transform with a similar factorization will be computed more quickly, so long as they use the `FFTW_USE_WISDOM' flag. In fact, for transforms with the same factors and of equal or lesser size, no measurements at all need to be made and an optimal plan can be created with negligible delay! For example, suppose that you create a plan for N = 2^16. Then, for any equal or smaller power of two, FFTW can create a plan (with the same direction and flags) quickly, using the precomputed `wisdom'. Even for larger powers of two, or sizes that are a power of two times some other prime factors, plans will be computed more quickly than they would otherwise (although some measurements still have to be made). The `wisdom' is cumulative, and is stored in a global, private data structure managed internally by FFTW. The storage space required is minimal, proportional to the logarithm of the sizes the `wisdom' was generated from. The `wisdom' can be forgotten (and its associated memory freed) by a call to `fftw_forget_wisdom()'; otherwise, it is remembered until the program terminates. It can also be exported to a file, a string, or any other medium using `fftw_export_wisdom' and restored during a subsequent execution of the program (or a different program) using `fftw_import_wisdom' (these functions are described below). Because `wisdom' is incorporated into FFTW at a very low level, the same `wisdom' can be used for one-dimensional transforms, multi-dimensional transforms, and even the parallel extensions to FFTW. Just include `FFTW_USE_WISDOM' in the flags for whatever plans you create (i.e., always plan wisely). Plans created with the `FFTW_ESTIMATE' plan can use `wisdom', but cannot generate it; only `FFTW_MEASURE' plans actually produce `wisdom'. Also, plans can only use `wisdom' generated from plans created with the same direction and flags. For example, a size `42' `FFTW_BACKWARD' transform will not use `wisdom' produced by a size `42' `FFTW_FORWARD' transform. The only exception to this rule is that `FFTW_ESTIMATE' plans can use `wisdom' from `FFTW_MEASURE' plans. * Menu: * Caveats in Using Wisdom:: What you should worry about in using wisdom * Importing and Exporting Wisdom:: I/O of wisdom to disk and other media  File: fftw.info, Node: Caveats in Using Wisdom, Next: Importing and Exporting Wisdom, Prev: Words of Wisdom, Up: Words of Wisdom Caveats in Using Wisdom ----------------------- For in much wisdom is much grief, and he that increaseth knowledge increaseth sorrow. [Ecclesiastes 1:18] There are pitfalls to using `wisdom', in that it can negate FFTW's ability to adapt to changing hardware and other conditions. For example, it would be perfectly possible to export `wisdom' from a program running on one processor and import it into a program running on another processor. Doing so, however, would mean that the second program would use plans optimized for the first processor, instead of the one it is running on. It should be safe to reuse `wisdom' as long as the hardware and program binaries remain unchanged. (Actually, the optimal plan may change even between runs of the same binary on identical hardware, due to differences in the virtual memory environment, etcetera. Users seriously interested in performance should worry about this problem, too.) It is likely that, if the same `wisdom' is used for two different program binaries, even running on the same machine, the plans may be sub-optimal because of differing code alignments. It is therefore wise to recreate `wisdom' every time an application is recompiled. The more the underlying hardware and software changes between the creation of `wisdom' and its use, the greater grows the risk of sub-optimal plans.  File: fftw.info, Node: Importing and Exporting Wisdom, Prev: Caveats in Using Wisdom, Up: Words of Wisdom Importing and Exporting Wisdom ------------------------------ void fftw_export_wisdom_to_file(FILE *output_file); fftw_status fftw_import_wisdom_from_file(FILE *input_file); `fftw_export_wisdom_to_file' writes the `wisdom' to `output_file', which must be a file open for writing. `fftw_import_wisdom_from_file' reads the `wisdom' from `input_file', which must be a file open for reading, and returns `FFTW_SUCCESS' if successful and `FFTW_FAILURE' otherwise. In both cases, the file is left open and must be closed by the caller. It is perfectly fine if other data lie before or after the `wisdom' in the file, as long as the file is positioned at the beginning of the `wisdom' data before import. char *fftw_export_wisdom_to_string(void); fftw_status fftw_import_wisdom_from_string(const char *input_string) `fftw_export_wisdom_to_string' allocates a string, exports the `wisdom' to it in `NULL'-terminated format, and returns a pointer to the string. If there is an error in allocating or writing the data, it returns `NULL'. The caller is responsible for deallocating the string (with `fftw_free') when she is done with it. `fftw_import_wisdom_from_string' imports the `wisdom' from `input_string', returning `FFTW_SUCCESS' if successful and `FFTW_FAILURE' otherwise. Exporting `wisdom' does not affect the store of `wisdom'. Imported `wisdom' supplements the current store rather than replacing it (except when there is conflicting `wisdom', in which case the older `wisdom' is discarded). The format of the exported `wisdom' is "nerd-readable" LISP-like ASCII text; we will not document it here except to note that it is insensitive to white space (interested users can contact us for more details). *Note FFTW Reference::, for more information, and for a description of how you can implement `wisdom' import/export for other media besides files and strings. The following is a brief example in which the `wisdom' is read from a file, a plan is created (possibly generating more `wisdom'), and then the `wisdom' is exported to a string and printed to `stdout'. { fftw_plan plan; char *wisdom_string; FILE *input_file; /* open file to read wisdom from */ input_file = fopen("sample.wisdom", "r"); if (FFTW_FAILURE == fftw_import_wisdom_from_file(input_file)) printf("Error reading wisdom!\n"); fclose(input_file); /* be sure to close the file! */ /* create a plan for N=64, possibly creating and/or using wisdom */ plan = fftw_create_plan(64,FFTW_FORWARD, FFTW_MEASURE | FFTW_USE_WISDOM); /* ... do some computations with the plan ... */ /* always destroy plans when you are done */ fftw_destroy_plan(plan); /* write the wisdom to a string */ wisdom_string = fftw_export_wisdom_to_string(); if (wisdom_string != NULL) { printf("Accumulated wisdom: %s\n",wisdom_string); /* Just for fun, destroy and restore the wisdom */ fftw_forget_wisdom(); /* all gone! */ fftw_import_wisdom_from_string(wisdom_string); /* wisdom is back! */ fftw_free(wisdom_string); /* deallocate it since we're done */ } } fftw-2.1.5/doc/fftw.info-20000644000175400001440000014106107637527602010716 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: fftw.info, Node: FFTW Reference, Next: Parallel FFTW, Prev: Tutorial, Up: Top FFTW Reference ************** This chapter provides a complete reference for all sequential (i.e., one-processor) FFTW functions. We first define the data types upon which FFTW operates, that is, real, complex, and "halfcomplex" numbers (*note Data Types::). Then, in four sections, we explain the FFTW program interface for complex one-dimensional transforms (*note One-dimensional Transforms Reference::), complex multi-dimensional transforms (*note Multi-dimensional Transforms Reference::), and real one-dimensional transforms (*note Real One-dimensional Transforms Reference::), real multi-dimensional transforms (*note Real Multi-dimensional Transforms Reference::). *Note Wisdom Reference:: describes the `wisdom' mechanism for exporting and importing plans. Finally, *Note Memory Allocator Reference:: describes how to change FFTW's default memory allocator. For parallel transforms, *Note Parallel FFTW::. * Menu: * Data Types:: real, complex, and halfcomplex numbers * One-dimensional Transforms Reference:: * Multi-dimensional Transforms Reference:: * Real One-dimensional Transforms Reference:: * Real Multi-dimensional Transforms Reference:: * Wisdom Reference:: * Memory Allocator Reference:: * Thread safety::  File: fftw.info, Node: Data Types, Next: One-dimensional Transforms Reference, Prev: FFTW Reference, Up: FFTW Reference Data Types ========== The routines in the FFTW package use three main kinds of data types. "Real" and "complex" numbers should be already known to the reader. We also use the term "halfcomplex" to describe complex arrays in a special packed format used by the one-dimensional real transforms (taking advantage of the "hermitian" symmetry that arises in those cases). By including `' or `', you will have access to the following definitions: typedef double fftw_real; typedef struct { fftw_real re, im; } fftw_complex; #define c_re(c) ((c).re) #define c_im(c) ((c).im) All FFTW operations are performed on the `fftw_real' and `fftw_complex' data types. For `fftw_complex' numbers, the two macros `c_re' and `c_im' retrieve, respectively, the real and imaginary parts of the number. A "real array" is an array of real numbers. A "complex array" is an array of complex numbers. A one-dimensional array X of n complex numbers is "hermitian" if the following property holds: for all 0 <= i < n, we have X[i] = conj(X[n-i]). Hermitian arrays are relevant to FFTW because the Fourier transform of a real array is hermitian. Because of its symmetry, a hermitian array can be stored in half the space of a complex array of the same size. FFTW's one-dimensional real transforms store hermitian arrays as "halfcomplex" arrays. A halfcomplex array of size n is a one-dimensional array of n `fftw_real' numbers. A hermitian array X in stored into a halfcomplex array Y as follows. For all integers i such that 0 <= i <= n / 2, we have Y[i] = Re(X[i]). For all integers i such that 0 < i < n / 2, we have Y[n-i] = Im(X[i]). We now illustrate halfcomplex storage for n = 4 and n = 5, since the scheme depends on the parity of n. Let n = 4. In this case, we have Y[0] = Re(X[0]), Y[1] = Re(X[1]), Y[2] = Re(X[2]), and Y[3] = Im(X[1]). Let now n = 5. In this case, we have Y[0] = Re(X[0]), Y[1] = Re(X[1]), Y[2] = Re(X[2]), Y[3] = Im(X[2]), and Y[4] = Im(X[1]). By default, the type `fftw_real' equals the C type `double'. To work in single precision rather than double precision, `#define' the symbol `FFTW_ENABLE_FLOAT' in `fftw.h' and then recompile the library. On Unix systems, you can instead use `configure --enable-float' at installation time (*note Installation and Customization::). In version 1 of FFTW, the data types were called `FFTW_REAL' and `FFTW_COMPLEX'. We changed the capitalization for consistency with the rest of FFTW's conventions. The old names are still supported, but their use is deprecated.  File: fftw.info, Node: One-dimensional Transforms Reference, Next: Multi-dimensional Transforms Reference, Prev: Data Types, Up: FFTW Reference One-dimensional Transforms Reference ==================================== The one-dimensional complex routines are generally prefixed with `fftw_'. Programs using FFTW should be linked with `-lfftw -lm' on Unix systems, or with the FFTW and standard math libraries in general. * Menu: * fftw_create_plan:: Plan Creation * Discussion on Specific Plans:: * fftw:: Plan Execution * fftw_destroy_plan:: Plan Destruction * What FFTW Really Computes:: Definition of the DFT.  File: fftw.info, Node: fftw_create_plan, Next: Discussion on Specific Plans, Prev: One-dimensional Transforms Reference, Up: One-dimensional Transforms Reference Plan Creation for One-dimensional Transforms -------------------------------------------- #include fftw_plan fftw_create_plan(int n, fftw_direction dir, int flags); fftw_plan fftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); The function `fftw_create_plan' creates a plan, which is a data structure containing all the information that `fftw' needs in order to compute the 1D Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). `fftw_create_plan' returns a valid plan, or `NULL' if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure FFTW in such a way that some input sizes are forbidden, and FFTW cannot create a plan. The `fftw_create_plan_specific' variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to `fftw'. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are _destroyed_ by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). Arguments ......... * `n' is the size of the transform. It can be any positive integer. - FFTW is best at handling sizes of the form 2^a 3^b 5^c 7^d 11^e 13^f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (which nevertheless retains O(n lg n) performance, even for prime sizes). (It is possible to customize FFTW for different array sizes. *Note Installation and Customization::, for more information.) Transforms whose sizes are powers of 2 are especially fast. * `dir' is the sign of the exponent in the formula that defines the Fourier transform. It can be -1 or +1. The aliases `FFTW_FORWARD' and `FFTW_BACKWARD' are provided, where `FFTW_FORWARD' stands for -1. * `flags' is a boolean OR (`|') of zero or more of the following: - `FFTW_MEASURE': this flag tells FFTW to find the optimal plan by actually _computing_ several FFTs and measuring their execution time. Depending on the installation, this can take some time. (1) - `FFTW_ESTIMATE': do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither `FFTW_ESTIMATE' nor `FFTW_MEASURE' is provided, the default is `FFTW_ESTIMATE'. - `FFTW_OUT_OF_PLACE': produce a plan assuming that the input and output arrays will be distinct (this is the default). - `FFTW_IN_PLACE': produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: FFTW is able to compute true in-place transforms only for small values of `n'. If FFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. _Warning: This option changes the meaning of some parameters of `fftw'_ (*note Computing the One-dimensional Transform: fftw.). The in-place option is mainly provided for people who want to write their own in-place multi-dimensional Fourier transform, using FFTW as a base. For example, consider a three-dimensional `n * n * n' transform. An out-of-place algorithm will need another array (which may be huge). However, FFTW can compute the in-place transform along each dimension using only a temporary array of size `n'. Moreover, if FFTW happens to be able to compute the transform truly in-place, no temporary array and no copying are needed. As distributed, FFTW `knows' how to compute in-place transforms of size 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32 and 64. The default mode of operation is `FFTW_OUT_OF_PLACE'. - `FFTW_USE_WISDOM': use any `wisdom' that is available to help in the creation of the plan. (*Note Words of Wisdom::.) This can greatly speed the creation of plans, especially with the `FFTW_MEASURE' option. `FFTW_ESTIMATE' plans can also take advantage of `wisdom' to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the `FFTW_MEASURE' option is used, new `wisdom' will also be generated if the current transform size is not completely understood by existing `wisdom'. * `in', `out', `istride', `ostride' (only for `fftw_create_plan_specific'): see corresponding arguments in the description of `fftw'. (*Note Computing the One-dimensional Transform: fftw.) In particular, the `out' and `ostride' parameters have the same special meaning for `FFTW_IN_PLACE' transforms as they have for `fftw'. ---------- Footnotes ---------- (1) The basic problem is the resolution of the clock: FFTW needs to run for a certain time for the clock to be reliable.  File: fftw.info, Node: Discussion on Specific Plans, Next: fftw, Prev: fftw_create_plan, Up: One-dimensional Transforms Reference Discussion on Specific Plans ---------------------------- We recommend the use of the specific planners, even in cases where you will be transforming arrays different from those passed to the specific planners, as they confer the following advantages: * The resulting plans will be optimized for your specific arrays and strides. This may or may not make a significant difference, but it certainly doesn't hurt. (The ordinary planner does its planning based upon a stride-one temporary array that it allocates.) * Less intermediate storage is required during the planning process. (The ordinary planner uses O(`N') temporary storage, where `N' is the maximum dimension, while it is creating the plan.) * For multi-dimensional transforms, new parameters become accessible for optimization by the planner. (Since multi-dimensional arrays can be very large, we don't dare to allocate one in the ordinary planner for experimentation. This prevents us from doing certain optimizations that can yield dramatic improvements in some cases.) On the other hand, note that _the specific planner destroys the contents of the `in' and `out' arrays_.  File: fftw.info, Node: fftw, Next: fftw_destroy_plan, Prev: Discussion on Specific Plans, Up: One-dimensional Transforms Reference Computing the One-dimensional Transform --------------------------------------- #include void fftw(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void fftw_one(fftw_plan plan, fftw_complex *in, fftw_complex *out); The function `fftw' computes the one-dimensional Fourier transform, using a plan created by `fftw_create_plan' (*Note Plan Creation for One-dimensional Transforms: fftw_create_plan.) The function `fftw_one' provides a simplified interface for the common case of single input array of stride 1. Arguments ......... * `plan' is the plan created by `fftw_create_plan' (*note Plan Creation for One-dimensional Transforms: fftw_create_plan.). * `howmany' is the number of transforms `fftw' will compute. It is faster to tell FFTW to compute many transforms, instead of simply calling `fftw' many times. * `in', `istride' and `idist' describe the input array(s). There are `howmany' input arrays; the first one is pointed to by `in', the second one is pointed to by `in + idist', and so on, up to `in + (howmany - 1) * idist'. Each input array consists of complex numbers (*note Data Types::), which are not necessarily contiguous in memory. Specifically, `in[0]' is the first element of the first array, `in[istride]' is the second element of the first array, and so on. In general, the `i'-th element of the `j'-th input array will be in position `in[i * istride + j * idist]'. * `out', `ostride' and `odist' describe the output array(s). The format is the same as for the input array. - _In-place transforms_: If the `plan' specifies an in-place transform, `ostride' and `odist' are always ignored. If `out' is `NULL', `out' is ignored, too. Otherwise, `out' is interpreted as a pointer to an array of `n' complex numbers, that FFTW will use as temporary space to perform the in-place computation. `out' is used as scratch space and its contents destroyed. In this case, `out' must be an ordinary array whose elements are contiguous in memory (no striding). The function `fftw_one' transforms a single, contiguous input array to a contiguous output array. By definition, the call fftw_one(plan, in, out) is equivalent to fftw(plan, 1, in, 1, 0, out, 1, 0)  File: fftw.info, Node: fftw_destroy_plan, Next: What FFTW Really Computes, Prev: fftw, Up: One-dimensional Transforms Reference Destroying a One-dimensional Plan --------------------------------- #include void fftw_destroy_plan(fftw_plan plan); The function `fftw_destroy_plan' frees the plan `plan' and releases all the memory associated with it. After destruction, a plan is no longer valid.  File: fftw.info, Node: What FFTW Really Computes, Prev: fftw_destroy_plan, Up: One-dimensional Transforms Reference What FFTW Really Computes ------------------------- In this section, we define precisely what FFTW computes. Please be warned that different authors and software packages might employ different conventions than FFTW does. The forward transform of a complex array X of size n computes an array Y, where Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(-2 pi i j sqrt(-1)/n) . The backward transform computes Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(2 pi i j sqrt(-1)/n) . FFTW computes an unnormalized transform, that is, the equation IFFT(FFT(X)) = n X holds. In other words, applying the forward and then the backward transform will multiply the input by n. An `FFTW_FORWARD' transform corresponds to a sign of -1 in the exponent of the DFT. Note also that we use the standard "in-order" output ordering--the k-th output corresponds to the frequency k/n (or k/T, where T is your total sampling period). For those who like to think in terms of positive and negative frequencies, this means that the positive frequencies are stored in the first half of the output and the negative frequencies are stored in backwards order in the second half of the output. (The frequency -k/n is the same as the frequency (n-k)/n.)  File: fftw.info, Node: Multi-dimensional Transforms Reference, Next: Real One-dimensional Transforms Reference, Prev: One-dimensional Transforms Reference, Up: FFTW Reference Multi-dimensional Transforms Reference ====================================== The multi-dimensional complex routines are generally prefixed with `fftwnd_'. Programs using FFTWND should be linked with `-lfftw -lm' on Unix systems, or with the FFTW and standard math libraries in general. * Menu: * fftwnd_create_plan:: Plan Creation * fftwnd:: Plan Execution * fftwnd_destroy_plan:: Plan Destruction * What FFTWND Really Computes::  File: fftw.info, Node: fftwnd_create_plan, Next: fftwnd, Prev: Multi-dimensional Transforms Reference, Up: Multi-dimensional Transforms Reference Plan Creation for Multi-dimensional Transforms ---------------------------------------------- #include fftwnd_plan fftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); fftwnd_plan fftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); fftwnd_plan fftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); fftwnd_plan fftwnd_create_plan_specific(int rank, const int *n, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); fftwnd_plan fftw2d_create_plan_specific(int nx, int ny, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); fftwnd_plan fftw3d_create_plan_specific(int nx, int ny, int nz, fftw_direction dir, int flags, fftw_complex *in, int istride, fftw_complex *out, int ostride); The function `fftwnd_create_plan' creates a plan, which is a data structure containing all the information that `fftwnd' needs in order to compute a multi-dimensional Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions `fftw2d_create_plan' and `fftw3d_create_plan' are optional, alternative interfaces to `fftwnd_create_plan' for two and three dimensions, respectively. `fftwnd_create_plan' returns a valid plan, or `NULL' if, for some reason, the plan can't be created. This can happen if memory runs out or if the arguments are invalid in some way (e.g. if `rank' < 0). The `create_plan_specific' variants take as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to `fftwnd'. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are _destroyed_ by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). *Note Discussion on Specific Plans::, for a discussion on specific plans. Arguments ......... * `rank' is the dimensionality of the arrays to be transformed. It can be any non-negative integer. * `n' is a pointer to an array of `rank' integers, giving the size of each dimension of the arrays to be transformed. These sizes, which must be positive integers, correspond to the dimensions of row-major arrays--i.e. `n[0]' is the size of the dimension whose indices vary most slowly, and so on. (*Note Multi-dimensional Array Format::, for more information on row-major storage.) *Note Plan Creation for One-dimensional Transforms: fftw_create_plan, for more information regarding optimal array sizes. * `nx' and `ny' in `fftw2d_create_plan' are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on `nx x ny' arrays in row-major order, where `nx' is the number of rows and `ny' is the number of columns. * `nx', `ny' and `nz' in `fftw3d_create_plan' are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on `nx x ny x nz' arrays in row-major order. * `dir' is the sign of the exponent in the formula that defines the Fourier transform. It can be -1 or +1. The aliases `FFTW_FORWARD' and `FFTW_BACKWARD' are provided, where `FFTW_FORWARD' stands for -1. * `flags' is a boolean OR (`|') of zero or more of the following: - `FFTW_MEASURE': this flag tells FFTW to find the optimal plan by actually _computing_ several FFTs and measuring their execution time. - `FFTW_ESTIMATE': do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither `FFTW_ESTIMATE' nor `FFTW_MEASURE' is provided, the default is `FFTW_ESTIMATE'. - `FFTW_OUT_OF_PLACE': produce a plan assuming that the input and output arrays will be distinct (this is the default). - `FFTW_IN_PLACE': produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this "really" (1) performs the transform in-place.) Note that, if you want to perform in-place transforms, you _must_ use a plan created with this option. The default mode of operation is `FFTW_OUT_OF_PLACE'. - `FFTW_USE_WISDOM': use any `wisdom' that is available to help in the creation of the plan. (*Note Words of Wisdom::.) This can greatly speed the creation of plans, especially with the `FFTW_MEASURE' option. `FFTW_ESTIMATE' plans can also take advantage of `wisdom' to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the `FFTW_MEASURE' option is used, new `wisdom' will also be generated if the current transform size is not completely understood by existing `wisdom'. Note that the same `wisdom' is shared between one-dimensional and multi-dimensional transforms. * `in', `out', `istride', `ostride' (only for the `_create_plan_specific' variants): see corresponding arguments in the description of `fftwnd'. (*Note Computing the Multi-dimensional Transform: fftwnd.) ---------- Footnotes ---------- (1) `fftwnd' actually may use some temporary storage (hidden in the plan), but this storage space is only the size of the largest dimension of the array, rather than being as big as the entire array. (Unless you use `fftwnd' to perform one-dimensional transforms, in which case the temporary storage required for in-place transforms _is_ as big as the entire array.)  File: fftw.info, Node: fftwnd, Next: fftwnd_destroy_plan, Prev: fftwnd_create_plan, Up: Multi-dimensional Transforms Reference Computing the Multi-dimensional Transform ----------------------------------------- #include void fftwnd(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void fftwnd_one(fftwnd_plan p, fftw_complex *in, fftw_complex *out); The function `fftwnd' computes one or more multi-dimensional Fourier Transforms, using a plan created by `fftwnd_create_plan' (*note Plan Creation for Multi-dimensional Transforms: fftwnd_create_plan.). (Note that the plan determines the rank and dimensions of the array to be transformed.) The function `fftwnd_one' provides a simplified interface for the common case of single input array of stride 1. Arguments ......... * `plan' is the plan created by `fftwnd_create_plan'. (*note Plan Creation for Multi-dimensional Transforms: fftwnd_create_plan.). In the case of two and three-dimensional transforms, it could also have been created by `fftw2d_create_plan' or `fftw3d_create_plan', respectively. * `howmany' is the number of multi-dimensional transforms `fftwnd' will compute. * `in', `istride' and `idist' describe the input array(s). There are `howmany' multi-dimensional input arrays; the first one is pointed to by `in', the second one is pointed to by `in + idist', and so on, up to `in + (howmany - 1) * idist'. Each multi-dimensional input array consists of complex numbers (*note Data Types::), stored in row-major format (*note Multi-dimensional Array Format::), which are not necessarily contiguous in memory. Specifically, `in[0]' is the first element of the first array, `in[istride]' is the second element of the first array, and so on. In general, the `i'-th element of the `j'-th input array will be in position `in[i * istride + j * idist]'. Note that, here, `i' refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension. - _In-place transforms_: For plans created with the `FFTW_IN_PLACE' option, the transform is computed in-place--the output is returned in the `in' array, using the same strides, etcetera, as were used in the input. * `out', `ostride' and `odist' describe the output array(s). The format is the same as for the input array. - _In-place transforms_: These parameters are ignored for plans created with the `FFTW_IN_PLACE' option. The function `fftwnd_one' transforms a single, contiguous input array to a contiguous output array. By definition, the call fftwnd_one(plan, in, out) is equivalent to fftwnd(plan, 1, in, 1, 0, out, 1, 0)  File: fftw.info, Node: fftwnd_destroy_plan, Next: What FFTWND Really Computes, Prev: fftwnd, Up: Multi-dimensional Transforms Reference Destroying a Multi-dimensional Plan ----------------------------------- #include void fftwnd_destroy_plan(fftwnd_plan plan); The function `fftwnd_destroy_plan' frees the plan `plan' and releases all the memory associated with it. After destruction, a plan is no longer valid.  File: fftw.info, Node: What FFTWND Really Computes, Prev: fftwnd_destroy_plan, Up: Multi-dimensional Transforms Reference What FFTWND Really Computes --------------------------- The conventions that we follow for the multi-dimensional transform are analogous to those for the one-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions. The output is in-order, and the zeroth element of the output is the amplitude of the zero frequency component. The TeX version of this manual contains the exact definition of the n-dimensional transform FFTW uses. It is not possible to display the definition on a ASCII terminal properly.  File: fftw.info, Node: Real One-dimensional Transforms Reference, Next: Real Multi-dimensional Transforms Reference, Prev: Multi-dimensional Transforms Reference, Up: FFTW Reference Real One-dimensional Transforms Reference ========================================= The one-dimensional real routines are generally prefixed with `rfftw_'. (1) Programs using RFFTW should be linked with `-lrfftw -lfftw -lm' on Unix systems, or with the RFFTW, the FFTW, and the standard math libraries in general. * Menu: * rfftw_create_plan:: Plan Creation * rfftw:: Plan Execution * rfftw_destroy_plan:: Plan Destruction * What RFFTW Really Computes:: ---------- Footnotes ---------- (1) The etymologically-correct spelling would be `frftw_', but it is hard to remember.  File: fftw.info, Node: rfftw_create_plan, Next: rfftw, Prev: Real One-dimensional Transforms Reference, Up: Real One-dimensional Transforms Reference Plan Creation for Real One-dimensional Transforms ------------------------------------------------- #include rfftw_plan rfftw_create_plan(int n, fftw_direction dir, int flags); rfftw_plan rfftw_create_plan_specific(int n, fftw_direction dir, int flags, fftw_real *in, int istride, fftw_real *out, int ostride); The function `rfftw_create_plan' creates a plan, which is a data structure containing all the information that `rfftw' needs in order to compute the 1D real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). `rfftw_create_plan' returns a valid plan, or `NULL' if, for some reason, the plan can't be created. In the default installation, this cannot happen, but it is possible to configure RFFTW in such a way that some input sizes are forbidden, and RFFTW cannot create a plan. The `rfftw_create_plan_specific' variant takes as additional arguments specific input/output arrays and their strides. For the last four arguments, you should pass the arrays and strides that you will eventually be passing to `rfftw'. The resulting plans will be optimized for those arrays and strides, although they may be used on other arrays as well. Note: the contents of the in and out arrays are _destroyed_ by the specific planner (the initial contents are ignored, so the arrays need not have been initialized). *Note Discussion on Specific Plans::, for a discussion on specific plans. Arguments ......... * `n' is the size of the transform. It can be any positive integer. - RFFTW is best at handling sizes of the form 2^a 3^b 5^c 7^d 11^e 13^f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine (reducing to O(n^2) performance for prime sizes). (It is possible to customize RFFTW for different array sizes. *Note Installation and Customization::, for more information.) Transforms whose sizes are powers of 2 are especially fast. If you have large prime factors, it may be faster to switch over to the complex FFTW routines, which have O(n lg n) performance even for prime sizes (we don't know of a similar algorithm specialized for real data, unfortunately). * `dir' is the direction of the desired transform, either `FFTW_REAL_TO_COMPLEX' or `FFTW_COMPLEX_TO_REAL', corresponding to `FFTW_FORWARD' or `FFTW_BACKWARD', respectively. * `flags' is a boolean OR (`|') of zero or more of the following: - `FFTW_MEASURE': this flag tells RFFTW to find the optimal plan by actually _computing_ several FFTs and measuring their execution time. Depending on the installation, this can take some time. - `FFTW_ESTIMATE': do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither `FFTW_ESTIMATE' nor `FFTW_MEASURE' is provided, the default is `FFTW_ESTIMATE'. - `FFTW_OUT_OF_PLACE': produce a plan assuming that the input and output arrays will be distinct (this is the default). - `FFTW_IN_PLACE': produce a plan assuming that you want the output in the input array. The algorithm used is not necessarily in place: RFFTW is able to compute true in-place transforms only for small values of `n'. If RFFTW is not able to compute the transform in-place, it will allocate a temporary array (unless you provide one yourself), compute the transform out of place, and copy the result back. _Warning: This option changes the meaning of some parameters of `rfftw'_ (*note Computing the Real One-dimensional Transform: rfftw.). The default mode of operation is `FFTW_OUT_OF_PLACE'. - `FFTW_USE_WISDOM': use any `wisdom' that is available to help in the creation of the plan. (*Note Words of Wisdom::.) This can greatly speed the creation of plans, especially with the `FFTW_MEASURE' option. `FFTW_ESTIMATE' plans can also take advantage of `wisdom' to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the `FFTW_MEASURE' option is used, new `wisdom' will also be generated if the current transform size is not completely understood by existing `wisdom'. * `in', `out', `istride', `ostride' (only for `rfftw_create_plan_specific'): see corresponding arguments in the description of `rfftw'. (*Note Computing the Real One-dimensional Transform: rfftw.) In particular, the `out' and `ostride' parameters have the same special meaning for `FFTW_IN_PLACE' transforms as they have for `rfftw'.  File: fftw.info, Node: rfftw, Next: rfftw_destroy_plan, Prev: rfftw_create_plan, Up: Real One-dimensional Transforms Reference Computing the Real One-dimensional Transform -------------------------------------------- #include void rfftw(rfftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist); void rfftw_one(rfftw_plan plan, fftw_real *in, fftw_real *out); The function `rfftw' computes the Real One-dimensional Fourier Transform, using a plan created by `rfftw_create_plan' (*note Plan Creation for Real One-dimensional Transforms: rfftw_create_plan.). The function `rfftw_one' provides a simplified interface for the common case of single input array of stride 1. _Important:_ When invoked for an out-of-place, `FFTW_COMPLEX_TO_REAL' transform, the input array is overwritten with scratch values by these routines. The input array is not modified for `FFTW_REAL_TO_COMPLEX' transforms. Arguments ......... * `plan' is the plan created by `rfftw_create_plan' (*note Plan Creation for Real One-dimensional Transforms: rfftw_create_plan.). * `howmany' is the number of transforms `rfftw' will compute. It is faster to tell RFFTW to compute many transforms, instead of simply calling `rfftw' many times. * `in', `istride' and `idist' describe the input array(s). There are two cases. If the `plan' defines a `FFTW_REAL_TO_COMPLEX' transform, `in' is a real array. Otherwise, for `FFTW_COMPLEX_TO_REAL' transforms, `in' is a halfcomplex array _whose contents will be destroyed_. * `out', `ostride' and `odist' describe the output array(s), and have the same meaning as the corresponding parameters for the input array. - _In-place transforms_: If the `plan' specifies an in-place transform, `ostride' and `odist' are always ignored. If `out' is `NULL', `out' is ignored, too. Otherwise, `out' is interpreted as a pointer to an array of `n' complex numbers, that FFTW will use as temporary space to perform the in-place computation. `out' is used as scratch space and its contents destroyed. In this case, `out' must be an ordinary array whose elements are contiguous in memory (no striding). The function `rfftw_one' transforms a single, contiguous input array to a contiguous output array. By definition, the call rfftw_one(plan, in, out) is equivalent to rfftw(plan, 1, in, 1, 0, out, 1, 0)  File: fftw.info, Node: rfftw_destroy_plan, Next: What RFFTW Really Computes, Prev: rfftw, Up: Real One-dimensional Transforms Reference Destroying a Real One-dimensional Plan -------------------------------------- #include void rfftw_destroy_plan(rfftw_plan plan); The function `rfftw_destroy_plan' frees the plan `plan' and releases all the memory associated with it. After destruction, a plan is no longer valid.  File: fftw.info, Node: What RFFTW Really Computes, Prev: rfftw_destroy_plan, Up: Real One-dimensional Transforms Reference What RFFTW Really Computes -------------------------- In this section, we define precisely what RFFTW computes. The real to complex (`FFTW_REAL_TO_COMPLEX') transform of a real array X of size n computes an hermitian array Y, where Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(-2 pi i j sqrt(-1)/n) (That Y is a hermitian array is not intended to be obvious, although the proof is easy.) The hermitian array Y is stored in halfcomplex order (*note Data Types::). Currently, RFFTW provides no way to compute a real to complex transform with a positive sign in the exponent. The complex to real (`FFTW_COMPLEX_TO_REAL') transform of a hermitian array X of size n computes a real array Y, where Y[i] = sum for j = 0 to (n - 1) of X[j] * exp(2 pi i j sqrt(-1)/n) (That Y is a real array is not intended to be obvious, although the proof is easy.) The hermitian input array X is stored in halfcomplex order (*note Data Types::). Currently, RFFTW provides no way to compute a complex to real transform with a negative sign in the exponent. Like FFTW, RFFTW computes an unnormalized transform. In other words, applying the real to complex (forward) and then the complex to real (backward) transform will multiply the input by n.  File: fftw.info, Node: Real Multi-dimensional Transforms Reference, Next: Wisdom Reference, Prev: Real One-dimensional Transforms Reference, Up: FFTW Reference Real Multi-dimensional Transforms Reference =========================================== The multi-dimensional real routines are generally prefixed with `rfftwnd_'. Programs using RFFTWND should be linked with `-lrfftw -lfftw -lm' on Unix systems, or with the FFTW, RFFTW, and standard math libraries in general. * Menu: * rfftwnd_create_plan:: Plan Creation * rfftwnd:: Plan Execution * Array Dimensions for Real Multi-dimensional Transforms:: * Strides in In-place RFFTWND:: * rfftwnd_destroy_plan:: Plan Destruction * What RFFTWND Really Computes::  File: fftw.info, Node: rfftwnd_create_plan, Next: rfftwnd, Prev: Real Multi-dimensional Transforms Reference, Up: Real Multi-dimensional Transforms Reference Plan Creation for Real Multi-dimensional Transforms --------------------------------------------------- #include rfftwnd_plan rfftwnd_create_plan(int rank, const int *n, fftw_direction dir, int flags); rfftwnd_plan rfftw2d_create_plan(int nx, int ny, fftw_direction dir, int flags); rfftwnd_plan rfftw3d_create_plan(int nx, int ny, int nz, fftw_direction dir, int flags); The function `rfftwnd_create_plan' creates a plan, which is a data structure containing all the information that `rfftwnd' needs in order to compute a multi-dimensional real Fourier transform. You can create as many plans as you need, but only one plan for a given array size is required (a plan can be reused many times). The functions `rfftw2d_create_plan' and `rfftw3d_create_plan' are optional, alternative interfaces to `rfftwnd_create_plan' for two and three dimensions, respectively. `rfftwnd_create_plan' returns a valid plan, or `NULL' if, for some reason, the plan can't be created. This can happen if the arguments are invalid in some way (e.g. if `rank' < 0). Arguments ......... * `rank' is the dimensionality of the arrays to be transformed. It can be any non-negative integer. * `n' is a pointer to an array of `rank' integers, giving the size of each dimension of the arrays to be transformed. Note that these are always the dimensions of the _real_ arrays; the complex arrays have different dimensions (*note Array Dimensions for Real Multi-dimensional Transforms::). These sizes, which must be positive integers, correspond to the dimensions of row-major arrays--i.e. `n[0]' is the size of the dimension whose indices vary most slowly, and so on. (*Note Multi-dimensional Array Format::, for more information.) - *Note Plan Creation for Real One-dimensional Transforms: rfftw_create_plan, for more information regarding optimal array sizes. * `nx' and `ny' in `rfftw2d_create_plan' are positive integers specifying the dimensions of the rank 2 array to be transformed. i.e. they specify that the transform will operate on `nx x ny' arrays in row-major order, where `nx' is the number of rows and `ny' is the number of columns. * `nx', `ny' and `nz' in `rfftw3d_create_plan' are positive integers specifying the dimensions of the rank 3 array to be transformed. i.e. they specify that the transform will operate on `nx x ny x nz' arrays in row-major order. * `dir' is the direction of the desired transform, either `FFTW_REAL_TO_COMPLEX' or `FFTW_COMPLEX_TO_REAL', corresponding to `FFTW_FORWARD' or `FFTW_BACKWARD', respectively. * `flags' is a boolean OR (`|') of zero or more of the following: - `FFTW_MEASURE': this flag tells FFTW to find the optimal plan by actually _computing_ several FFTs and measuring their execution time. - `FFTW_ESTIMATE': do not run any FFT and provide a "reasonable" plan (for a RISC processor with many registers). If neither `FFTW_ESTIMATE' nor `FFTW_MEASURE' is provided, the default is `FFTW_ESTIMATE'. - `FFTW_OUT_OF_PLACE': produce a plan assuming that the input and output arrays will be distinct (this is the default). - `FFTW_IN_PLACE': produce a plan assuming that you want to perform the transform in-place. (Unlike the one-dimensional transform, this "really" performs the transform in-place.) Note that, if you want to perform in-place transforms, you _must_ use a plan created with this option. The use of this option has important implications for the size of the input/output array (*note Computing the Real Multi-dimensional Transform: rfftwnd.). The default mode of operation is `FFTW_OUT_OF_PLACE'. - `FFTW_USE_WISDOM': use any `wisdom' that is available to help in the creation of the plan. (*Note Words of Wisdom::.) This can greatly speed the creation of plans, especially with the `FFTW_MEASURE' option. `FFTW_ESTIMATE' plans can also take advantage of `wisdom' to produce a more optimal plan (based on past measurements) than the estimation heuristic would normally generate. When the `FFTW_MEASURE' option is used, new `wisdom' will also be generated if the current transform size is not completely understood by existing `wisdom'. Note that the same `wisdom' is shared between one-dimensional and multi-dimensional transforms.  File: fftw.info, Node: rfftwnd, Next: Array Dimensions for Real Multi-dimensional Transforms, Prev: rfftwnd_create_plan, Up: Real Multi-dimensional Transforms Reference Computing the Real Multi-dimensional Transform ---------------------------------------------- #include void rfftwnd_real_to_complex(rfftwnd_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist); void rfftwnd_complex_to_real(rfftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist); void rfftwnd_one_real_to_complex(rfftwnd_plan p, fftw_real *in, fftw_complex *out); void rfftwnd_one_complex_to_real(rfftwnd_plan p, fftw_complex *in, fftw_real *out); These functions compute the real multi-dimensional Fourier Transform, using a plan created by `rfftwnd_create_plan' (*note Plan Creation for Real Multi-dimensional Transforms: rfftwnd_create_plan.). (Note that the plan determines the rank and dimensions of the array to be transformed.) The ``rfftwnd_one_'' functions provide a simplified interface for the common case of single input array of stride 1. Unlike other transform routines in FFTW, we here use separate functions for the two directions of the transform in order to correctly express the datatypes of the parameters. _Important:_ When invoked for an out-of-place, `FFTW_COMPLEX_TO_REAL' transform with `rank > 1', the input array is overwritten with scratch values by these routines. The input array is not modified for `FFTW_REAL_TO_COMPLEX' transforms or for `FFTW_COMPLEX_TO_REAL' with `rank == 1'. Arguments ......... * `plan' is the plan created by `rfftwnd_create_plan'. (*note Plan Creation for Real Multi-dimensional Transforms: rfftwnd_create_plan.). In the case of two and three-dimensional transforms, it could also have been created by `rfftw2d_create_plan' or `rfftw3d_create_plan', respectively. `FFTW_REAL_TO_COMPLEX' plans must be used with the ``real_to_complex'' functions, and `FFTW_COMPLEX_TO_REAL' plans must be used with the ``complex_to_real'' functions. It is an error to mismatch the plan direction and the transform function. * `howmany' is the number of transforms to be computed. * `in', `istride' and `idist' describe the input array(s). There are `howmany' input arrays; the first one is pointed to by `in', the second one is pointed to by `in + idist', and so on, up to `in + (howmany - 1) * idist'. Each input array is stored in row-major format (*note Multi-dimensional Array Format::), and is not necessarily contiguous in memory. Specifically, `in[0]' is the first element of the first array, `in[istride]' is the second element of the first array, and so on. In general, the `i'-th element of the `j'-th input array will be in position `in[i * istride + j * idist]'. Note that, here, `i' refers to an index into the row-major format for the multi-dimensional array, rather than an index in any particular dimension. The dimensions of the arrays are different for real and complex data, and are discussed in more detail below (*note Array Dimensions for Real Multi-dimensional Transforms::). - _In-place transforms_: For plans created with the `FFTW_IN_PLACE' option, the transform is computed in-place--the output is returned in the `in' array. The meaning of the `stride' and `dist' parameters in this case is subtle and is discussed below (*note Strides in In-place RFFTWND::). * `out', `ostride' and `odist' describe the output array(s). The format is the same as that for the input array. See below for a discussion of the dimensions of the output array for real and complex data. - _In-place transforms_: These parameters are ignored for plans created with the `FFTW_IN_PLACE' option. The function `rfftwnd_one' transforms a single, contiguous input array to a contiguous output array. By definition, the call rfftwnd_one_...(plan, in, out) is equivalent to rfftwnd_...(plan, 1, in, 1, 0, out, 1, 0) fftw-2.1.5/doc/fftw.info-30000644000175400001440000014313107637527602010717 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: fftw.info, Node: Array Dimensions for Real Multi-dimensional Transforms, Next: Strides in In-place RFFTWND, Prev: rfftwnd, Up: Real Multi-dimensional Transforms Reference Array Dimensions for Real Multi-dimensional Transforms ------------------------------------------------------ The output of a multi-dimensional transform of real data contains symmetries that, in principle, make half of the outputs redundant (*note What RFFTWND Really Computes::). In practice, it is not possible to entirely realize these savings in an efficient and understandable format. Instead, the output of the rfftwnd transforms is _slightly_ over half of the output of the corresponding complex transform. We do not "pack" the data in any way, but store it as an ordinary array of `fftw_complex' values. In fact, this data is simply a subsection of what would be the array in the corresponding complex transform. Specifically, for a real transform of dimensions n1 x n2 x ... x nd, the complex data is an n1 x n2 x ... x (nd/2+1) array of `fftw_complex' values in row-major order (with the division rounded down). That is, we only store the lower half (plus one element) of the last dimension of the data from the ordinary complex transform. (We could have instead taken half of any other dimension, but implementation turns out to be simpler if the last, contiguous, dimension is used.) Since the complex data is slightly larger than the real data, some complications arise for in-place transforms. In this case, the final dimension of the real data must be padded with extra values to accommodate the size of the complex data--two extra if the last dimension is even and one if it is odd. That is, the last dimension of the real data must physically contain 2 * (nd/2+1) `fftw_real' values (exactly enough to hold the complex data). This physical array size does not, however, change the _logical_ array size--only nd values are actually stored in the last dimension, and nd is the last dimension passed to `rfftwnd_create_plan'.  File: fftw.info, Node: Strides in In-place RFFTWND, Next: rfftwnd_destroy_plan, Prev: Array Dimensions for Real Multi-dimensional Transforms, Up: Real Multi-dimensional Transforms Reference Strides in In-place RFFTWND --------------------------- The fact that the input and output datatypes are different for rfftwnd complicates the meaning of the `stride' and `dist' parameters of in-place transforms--are they in units of `fftw_real' or `fftw_complex' elements? When reading the input, they are interpreted in units of the datatype of the input data. When writing the output, the `istride' and `idist' are translated to the output datatype's "units" in one of two ways, corresponding to the two most common situations in which `stride' and `dist' parameters are useful. Below, we refer to these "translated" parameters as `ostride_t' and `odist_t'. (Note that these are computed internally by rfftwnd; the actual `ostride' and `odist' parameters are ignored for in-place transforms.) First, there is the case where you are transforming a number of contiguous arrays located one after another in memory. In this situation, `istride' is `1' and `idist' is the product of the physical dimensions of the array. `ostride_t' and `odist_t' are then chosen so that the output arrays are contiguous and lie on top of the input arrays. `ostride_t' is therefore `1'. For a real-to-complex transform, `odist_t' is `idist/2'; for a complex-to-real transform, `odist_t' is `idist*2'. The second case is when you have an array in which each element has `nc' components (e.g. a structure with `nc' numeric fields), and you want to transform all of the components at once. Here, `istride' is `nc' and `idist' is `1'. For this case, it is natural to want the output to also have `nc' consecutive components, now of the output data type; this is exactly what rfftwnd does. Specifically, it uses an `ostride_t' equal to `istride', and an `odist_t' of `1'. (Astute readers will realize that some extra buffer space is required in order to perform such a transform; this is handled automatically by rfftwnd.) The general rule is as follows. `ostride_t' equals `istride'. If `idist' is `1' and `idist' is less than `istride', then `odist_t' is `1'. Otherwise, for a real-to-complex transform `odist_t' is `idist/2' and for a complex-to-real transform `odist_t' is `idist*2'.  File: fftw.info, Node: rfftwnd_destroy_plan, Next: What RFFTWND Really Computes, Prev: Strides in In-place RFFTWND, Up: Real Multi-dimensional Transforms Reference Destroying a Multi-dimensional Plan ----------------------------------- #include void rfftwnd_destroy_plan(rfftwnd_plan plan); The function `rfftwnd_destroy_plan' frees the plan `plan' and releases all the memory associated with it. After destruction, a plan is no longer valid.  File: fftw.info, Node: What RFFTWND Really Computes, Prev: rfftwnd_destroy_plan, Up: Real Multi-dimensional Transforms Reference What RFFTWND Really Computes ---------------------------- The conventions that we follow for the real multi-dimensional transform are analogous to those for the complex multi-dimensional transform. In particular, the forward transform has a negative sign in the exponent and neither the forward nor the backward transforms will perform any normalization. Computing the backward transform of the forward transform will multiply the array by the product of its dimensions (that is, the logical dimensions of the real data). The forward transform is real-to-complex and the backward transform is complex-to-real. The TeX version of this manual contains the exact definition of the n-dimensional transform RFFTWND uses. It is not possible to display the definition on a ASCII terminal properly.  File: fftw.info, Node: Wisdom Reference, Next: Memory Allocator Reference, Prev: Real Multi-dimensional Transforms Reference, Up: FFTW Reference Wisdom Reference ================ * Menu: * fftw_export_wisdom:: * fftw_import_wisdom:: * fftw_forget_wisdom::  File: fftw.info, Node: fftw_export_wisdom, Next: fftw_import_wisdom, Prev: Wisdom Reference, Up: Wisdom Reference Exporting Wisdom ---------------- #include void fftw_export_wisdom(void (*emitter)(char c, void *), void *data); void fftw_export_wisdom_to_file(FILE *output_file); char *fftw_export_wisdom_to_string(void); These functions allow you to export all currently accumulated `wisdom' in a form from which it can be later imported and restored, even during a separate run of the program. (*Note Words of Wisdom::.) The current store of `wisdom' is not affected by calling any of these routines. `fftw_export_wisdom' exports the `wisdom' to any output medium, as specified by the callback function `emitter'. `emitter' is a `putc'-like function that writes the character `c' to some output; its second parameter is the `data' pointer passed to `fftw_export_wisdom'. For convenience, the following two "wrapper" routines are provided: `fftw_export_wisdom_to_file' writes the `wisdom' to the current position in `output_file', which should be open with write permission. Upon exit, the file remains open and is positioned at the end of the `wisdom' data. `fftw_export_wisdom_to_string' returns a pointer to a `NULL'-terminated string holding the `wisdom' data. This string is dynamically allocated, and it is the responsibility of the caller to deallocate it with `fftw_free' when it is no longer needed. All of these routines export the wisdom in the same format, which we will not document here except to say that it is LISP-like ASCII text that is insensitive to white space.  File: fftw.info, Node: fftw_import_wisdom, Next: fftw_forget_wisdom, Prev: fftw_export_wisdom, Up: Wisdom Reference Importing Wisdom ---------------- #include fftw_status fftw_import_wisdom(int (*get_input)(void *), void *data); fftw_status fftw_import_wisdom_from_file(FILE *input_file); fftw_status fftw_import_wisdom_from_string(const char *input_string); These functions import `wisdom' into a program from data stored by the `fftw_export_wisdom' functions above. (*Note Words of Wisdom::.) The imported `wisdom' supplements rather than replaces any `wisdom' already accumulated by the running program (except when there is conflicting `wisdom', in which case the existing wisdom is replaced). `fftw_import_wisdom' imports `wisdom' from any input medium, as specified by the callback function `get_input'. `get_input' is a `getc'-like function that returns the next character in the input; its parameter is the `data' pointer passed to `fftw_import_wisdom'. If the end of the input data is reached (which should never happen for valid data), it may return either `NULL' (ASCII 0) or `EOF' (as defined in `'). For convenience, the following two "wrapper" routines are provided: `fftw_import_wisdom_from_file' reads `wisdom' from the current position in `input_file', which should be open with read permission. Upon exit, the file remains open and is positioned at the end of the `wisdom' data. `fftw_import_wisdom_from_string' reads `wisdom' from the `NULL'-terminated string `input_string'. The return value of these routines is `FFTW_SUCCESS' if the wisdom was read successfully, and `FFTW_FAILURE' otherwise. Note that, in all of these functions, any data in the input stream past the end of the `wisdom' data is simply ignored (it is not even read if the `wisdom' data is well-formed).  File: fftw.info, Node: fftw_forget_wisdom, Prev: fftw_import_wisdom, Up: Wisdom Reference Forgetting Wisdom ----------------- #include void fftw_forget_wisdom(void); Calling `fftw_forget_wisdom' causes all accumulated `wisdom' to be discarded and its associated memory to be freed. (New `wisdom' can still be gathered subsequently, however.)  File: fftw.info, Node: Memory Allocator Reference, Next: Thread safety, Prev: Wisdom Reference, Up: FFTW Reference Memory Allocator Reference ========================== #include void *(*fftw_malloc_hook) (size_t n); void (*fftw_free_hook) (void *p); Whenever it has to allocate and release memory, FFTW ordinarily calls `malloc' and `free'. If `malloc' fails, FFTW prints an error message and exits. This behavior may be undesirable in some applications. Also, special memory-handling functions may be necessary in certain environments. Consequently, FFTW provides means by which you can install your own memory allocator and take whatever error-correcting action you find appropriate. The variables `fftw_malloc_hook' and `fftw_free_hook' are pointers to functions, and they are normally `NULL'. If you set those variables to point to other functions, then FFTW will use your routines instead of `malloc' and `free'. `fftw_malloc_hook' must point to a `malloc'-like function, and `fftw_free_hook' must point to a `free'-like function.  File: fftw.info, Node: Thread safety, Prev: Memory Allocator Reference, Up: FFTW Reference Thread safety ============= Users writing multi-threaded programs must concern themselves with the "thread safety" of the libraries they use--that is, whether it is safe to call routines in parallel from multiple threads. FFTW can be used in such an environment, but some care must be taken because certain parts of FFTW use private global variables to share data between calls. In particular, the plan-creation functions share trigonometric tables and accumulated `wisdom'. (Users should note that these comments only apply to programs using shared-memory threads. Parallelism using MPI or forked processes involves a separate address-space and global variables for each process, and is not susceptible to problems of this sort.) The central restriction of FFTW is that it is not safe to create multiple plans in parallel. You must either create all of your plans from a single thread, or instead use a semaphore, mutex, or other mechanism to ensure that different threads don't attempt to create plans at the same time. The same restriction also holds for destruction of plans and importing/forgetting `wisdom'. Once created, a plan may safely be used in any thread. The actual transform routines in FFTW (`fftw_one', etcetera) are re-entrant and thread-safe, so it is fine to call them simultaneously from multiple threads. Another question arises, however--is it safe to use the _same plan_ for multiple transforms in parallel? (It would be unsafe if, for example, the plan were modified in some way by the transform.) We address this question by defining an additional planner flag, `FFTW_THREADSAFE'. When included in the flags for any of the plan-creation routines, `FFTW_THREADSAFE' guarantees that the resulting plan will be read-only and safe to use in parallel by multiple threads.  File: fftw.info, Node: Parallel FFTW, Next: Calling FFTW from Fortran, Prev: FFTW Reference, Up: Top Parallel FFTW ************* In this chapter we discuss the use of FFTW in a parallel environment, documenting the different parallel libraries that we have provided. (Users calling FFTW from a multi-threaded program should also consult *Note Thread safety::.) The FFTW package currently contains three parallel transform implementations that leverage the uniprocessor FFTW code: * The first set of routines utilizes shared-memory threads for parallel one- and multi-dimensional transforms of both real and complex data. Any program using FFTW can be trivially modified to use the multi-threaded routines. This code can use any common threads implementation, including POSIX threads. (POSIX threads are available on most Unix variants, including Linux.) These routines are located in the `threads' directory, and are documented in *Note Multi-threaded FFTW::. * The `mpi' directory contains multi-dimensional transforms of real and complex data for parallel machines supporting MPI. It also includes parallel one-dimensional transforms for complex data. The main feature of this code is that it supports distributed-memory transforms, so it runs on everything from workstation clusters to massively-parallel supercomputers. More information on MPI can be found at the MPI home page (http://www.mcs.anl.gov/mpi). The FFTW MPI routines are documented in *Note MPI FFTW::. * We also have an experimental parallel implementation written in Cilk, a C-like parallel language developed at MIT and currently available for several SMP platforms. For more information on Cilk see the Cilk home page (http://supertech.lcs.mit.edu/cilk). The FFTW Cilk code can be found in the `cilk' directory, with parallelized one- and multi-dimensional transforms of complex data. The Cilk FFTW routines are documented in `cilk/README'. * Menu: * Multi-threaded FFTW:: * MPI FFTW::  File: fftw.info, Node: Multi-threaded FFTW, Next: MPI FFTW, Prev: Parallel FFTW, Up: Parallel FFTW Multi-threaded FFTW =================== In this section we document the parallel FFTW routines for shared-memory threads on SMP hardware. These routines, which support parallel one- and multi-dimensional transforms of both real and complex data, are the easiest way to take advantage of multiple processors with FFTW. They work just like the corresponding uniprocessor transform routines, except that they take the number of parallel threads to use as an extra parameter. Any program that uses the uniprocessor FFTW can be trivially modified to use the multi-threaded FFTW. * Menu: * Installation and Supported Hardware/Software:: * Usage of Multi-threaded FFTW:: * How Many Threads to Use?:: * Using Multi-threaded FFTW in a Multi-threaded Program:: * Tips for Optimal Threading::  File: fftw.info, Node: Installation and Supported Hardware/Software, Next: Usage of Multi-threaded FFTW, Prev: Multi-threaded FFTW, Up: Multi-threaded FFTW Installation and Supported Hardware/Software -------------------------------------------- All of the FFTW threads code is located in the `threads' subdirectory of the FFTW package. On Unix systems, the FFTW threads libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including `--enable-threads' in the flags to the `configure' script (*note Installation on Unix::). (Note also that the threads routines, when enabled, are automatically tested by the ``make check'' self-tests.) The threads routines require your operating system to have some sort of shared-memory threads support. Specifically, the FFTW threads package works with POSIX threads (available on most Unix variants, including Linux), Solaris threads, BeOS (http://www.be.com) threads (tested on BeOS DR8.2), Mach C threads (reported to work by users), and Win32 threads (reported to work by users). (There is also untested code to use MacOS MP threads.) We also support using OpenMP (http://www.openmp.org) or SGI MP compiler directives to launch threads, enabled by using `--with-openmp' or `--with-sgimp' in addition to `--enable-threads'. This is especially useful if you are employing that sort of directive in your own code, in order to minimize conflicts. If you have a shared-memory machine that uses a different threads API, it should be a simple matter of programming to include support for it; see the file `fftw_threads-int.h' for more detail. SMP hardware is not required, although of course you need multiple processors to get any benefit from the multithreaded transforms.  File: fftw.info, Node: Usage of Multi-threaded FFTW, Next: How Many Threads to Use?, Prev: Installation and Supported Hardware/Software, Up: Multi-threaded FFTW Usage of Multi-threaded FFTW ---------------------------- Here, it is assumed that the reader is already familiar with the usage of the uniprocessor FFTW routines, described elsewhere in this manual. We only describe what one has to change in order to use the multi-threaded routines. First, instead of including `' or `', you should include the files `' or `', respectively. Second, before calling any FFTW routines, you should call the function: int fftw_threads_init(void); This function, which should only be called once (probably in your `main()' function), performs any one-time initialization required to use threads on your system. It returns zero if successful, and a non-zero value if there was an error (in which case, something is seriously wrong and you should probably exit the program). Third, when you want to actually compute the transform, you should use one of the following transform routines instead of the ordinary FFTW functions: fftw_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); fftw_threads_one(nthreads, plan, in, out); fftwnd_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); fftwnd_threads_one(nthreads, plan, in, out); rfftw_threads(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); rfftw_threads_one(nthreads, plan, in, out); rfftwnd_threads_real_to_complex(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out); rfftwnd_threads_complex_to_real(nthreads, plan, howmany, in, istride, idist, out, ostride, odist); rfftwnd_threads_one_real_to_complex(nthreads, plan, in, out); rfftwnd_threads_one_complex_to_real(nthreads, plan, in, out); All of these routines take exactly the same arguments and have exactly the same effects as their uniprocessor counterparts (i.e. without the ``_threads'') _except_ that they take one extra parameter, `nthreads' (of type `int'), before the normal parameters.(1) The `nthreads' parameter specifies the number of threads of execution to use when performing the transform (actually, the maximum number of threads). For example, to parallelize a single one-dimensional transform of complex data, instead of calling the uniprocessor `fftw_one(plan, in, out)', you would call `fftw_threads_one(nthreads, plan, in, out)'. Passing an `nthreads' of `1' means to use only one thread (the main thread), and is equivalent to calling the uniprocessor routine. Passing an `nthreads' of `2' means that the transform is potentially parallelized over two threads (and two processors, if you have them), and so on. These are the only changes you need to make to your source code. Calls to all other FFTW routines (plan creation, destruction, wisdom, etcetera) are not parallelized and remain the same. (The same plans and wisdom are used by both uniprocessor and multi-threaded transforms.) Your arrays are allocated and formatted in the same way, and so on. Programs using the parallel complex transforms should be linked with `-lfftw_threads -lfftw -lm' on Unix. Programs using the parallel real transforms should be linked with `-lrfftw_threads -lfftw_threads -lrfftw -lfftw -lm'. You will also need to link with whatever library is responsible for threads on your system (e.g. `-lpthread' on Linux). ---------- Footnotes ---------- (1) There is one exception: when performing one-dimensional in-place transforms, the `out' parameter is always ignored by the multi-threaded routines, instead of being used as a workspace if it is non-`NULL' as in the uniprocessor routines. The multi-threaded routines always allocate their own workspace (the size of which depends upon the number of threads).  File: fftw.info, Node: How Many Threads to Use?, Next: Using Multi-threaded FFTW in a Multi-threaded Program, Prev: Usage of Multi-threaded FFTW, Up: Multi-threaded FFTW How Many Threads to Use? ------------------------ There is a fair amount of overhead involved in spawning and synchronizing threads, so the optimal number of threads to use depends upon the size of the transform as well as on the number of processors you have. As a general rule, you don't want to use more threads than you have processors. (Using more threads will work, but there will be extra overhead with no benefit.) In fact, if the problem size is too small, you may want to use fewer threads than you have processors. You will have to experiment with your system to see what level of parallelization is best for your problem size. Useful tools to help you do this are the test programs that are automatically compiled along with the threads libraries, `fftw_threads_test' and `rfftw_threads_test' (in the `threads' subdirectory). These take the same arguments as the other FFTW test programs (see `tests/README'), except that they also take the number of threads to use as a first argument, and report the parallel speedup in speed tests. For example, fftw_threads_test 2 -s 128x128 will benchmark complex 128x128 transforms using two threads and report the speedup relative to the uniprocessor transform. For instance, on a 4-processor 200MHz Pentium Pro system running Linux 2.2.0, we found that the "crossover" point at which 2 threads became beneficial for complex transforms was about 4k points, while 4 threads became beneficial at 8k points.  File: fftw.info, Node: Using Multi-threaded FFTW in a Multi-threaded Program, Next: Tips for Optimal Threading, Prev: How Many Threads to Use?, Up: Multi-threaded FFTW Using Multi-threaded FFTW in a Multi-threaded Program ----------------------------------------------------- It is perfectly possible to use the multi-threaded FFTW routines from a multi-threaded program (e.g. have multiple threads computing multi-threaded transforms simultaneously). If you have the processors, more power to you! However, the same restrictions apply as for the uniprocessor FFTW routines (*note Thread safety::). In particular, you should recall that you may not create or destroy plans in parallel.  File: fftw.info, Node: Tips for Optimal Threading, Prev: Using Multi-threaded FFTW in a Multi-threaded Program, Up: Multi-threaded FFTW Tips for Optimal Threading -------------------------- Not all transforms are equally well-parallelized by the multi-threaded FFTW routines. (This is merely a consequence of laziness on the part of the implementors, and is not inherent to the algorithms employed.) Mainly, the limitations are in the parallel one-dimensional transforms. The things to avoid if you want optimal parallelization are as follows: Parallelization deficiencies in one-dimensional transforms ---------------------------------------------------------- * Large prime factors can sometimes parallelize poorly. Of course, you should avoid these anyway if you want high performance. * Single in-place transforms don't parallelize completely. (Multiple in-place transforms, i.e. `howmany > 1', are fine.) Again, you should avoid these in any case if you want high performance, as they require transforming to a scratch array and copying back. * Single real-complex (`rfftw') transforms don't parallelize completely. This is unfortunate, but parallelizing this correctly would have involved a lot of extra code (and a much larger library). You still get some benefit from additional processors, but if you have a very large number of processors you will probably be better off using the parallel complex (`fftw') transforms. Note that multi-dimensional real transforms or multiple one-dimensional real transforms are fine.  File: fftw.info, Node: MPI FFTW, Prev: Multi-threaded FFTW, Up: Parallel FFTW MPI FFTW ======== This section describes the MPI FFTW routines for distributed-memory (and shared-memory) machines supporting MPI (Message Passing Interface). The MPI routines are significantly different from the ordinary FFTW because the transform data here are _distributed_ over multiple processes, so that each process gets only a portion of the array. Currently, multi-dimensional transforms of both real and complex data, as well as one-dimensional transforms of complex data, are supported. * Menu: * MPI FFTW Installation:: * Usage of MPI FFTW for Complex Multi-dimensional Transforms:: * MPI Data Layout:: * Usage of MPI FFTW for Real Multi-dimensional Transforms:: * Usage of MPI FFTW for Complex One-dimensional Transforms:: * MPI Tips::  File: fftw.info, Node: MPI FFTW Installation, Next: Usage of MPI FFTW for Complex Multi-dimensional Transforms, Prev: MPI FFTW, Up: MPI FFTW MPI FFTW Installation --------------------- The FFTW MPI library code is all located in the `mpi' subdirectoy of the FFTW package (along with source code for test programs). On Unix systems, the FFTW MPI libraries and header files can be automatically configured, compiled, and installed along with the uniprocessor FFTW libraries simply by including `--enable-mpi' in the flags to the `configure' script (*note Installation on Unix::). The only requirement of the FFTW MPI code is that you have the standard MPI 1.1 (or later) libraries and header files installed on your system. A free implementation of MPI is available from the MPICH home page (http://www-unix.mcs.anl.gov/mpi/mpich/). Previous versions of the FFTW MPI routines have had an unfortunate tendency to expose bugs in MPI implementations. The current version has been largely rewritten, and hopefully avoids some of the problems. If you run into difficulties, try passing the optional workspace to `(r)fftwnd_mpi' (see below), as this allows us to use the standard (and hopefully well-tested) `MPI_Alltoall' primitive for communications. Please let us know () how things work out. Several test programs are included in the `mpi' directory. The ones most useful to you are probably the `fftw_mpi_test' and `rfftw_mpi_test' programs, which are run just like an ordinary MPI program and accept the same parameters as the other FFTW test programs (c.f. `tests/README'). For example, `mpirun ...params... fftw_mpi_test -r 0' will run non-terminating complex-transform correctness tests of random dimensions. They can also do performance benchmarks.  File: fftw.info, Node: Usage of MPI FFTW for Complex Multi-dimensional Transforms, Next: MPI Data Layout, Prev: MPI FFTW Installation, Up: MPI FFTW Usage of MPI FFTW for Complex Multi-dimensional Transforms ---------------------------------------------------------- Usage of the MPI FFTW routines is similar to that of the uniprocessor FFTW. We assume that the reader already understands the usage of the uniprocessor FFTW routines, described elsewhere in this manual. Some familiarity with MPI is also helpful. A typical program performing a complex two-dimensional MPI transform might look something like: #include int main(int argc, char **argv) { const int NX = ..., NY = ...; fftwnd_mpi_plan plan; fftw_complex *data; MPI_Init(&argc,&argv); plan = fftw2d_mpi_create_plan(MPI_COMM_WORLD, NX, NY, FFTW_FORWARD, FFTW_ESTIMATE); ...allocate and initialize data... fftwnd_mpi(p, 1, data, NULL, FFTW_NORMAL_ORDER); ... fftwnd_mpi_destroy_plan(plan); MPI_Finalize(); } The calls to `MPI_Init' and `MPI_Finalize' are required in all MPI programs; see the MPI home page (http://www.mcs.anl.gov/mpi/) for more information. Note that all of your processes run the program in parallel, as a group; there is no explicit launching of threads/processes in an MPI program. As in the ordinary FFTW, the first thing we do is to create a plan (of type `fftwnd_mpi_plan'), using: fftwnd_mpi_plan fftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags); Except for the first argument, the parameters are identical to those of `fftw2d_create_plan'. (There are also analogous `fftwnd_mpi_create_plan' and `fftw3d_mpi_create_plan' functions. Transforms of any rank greater than one are supported.) The first argument is an MPI "communicator", which specifies the group of processes that are to be involved in the transform; the standard constant `MPI_COMM_WORLD' indicates all available processes. Next, one has to allocate and initialize the data. This is somewhat tricky, because the transform data is distributed across the processes involved in the transform. It is discussed in detail by the next section (*note MPI Data Layout::). The actual computation of the transform is performed by the function `fftwnd_mpi', which differs somewhat from its uniprocessor equivalent and is described by: void fftwnd_mpi(fftwnd_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work, fftwnd_mpi_output_order output_order); There are several things to notice here: * First of all, all `fftw_mpi' transforms are in-place: the output is in the `local_data' parameter, and there is no need to specify `FFTW_IN_PLACE' in the plan flags. * The MPI transforms also only support a limited subset of the `howmany'/`stride'/`dist' functionality of the uniprocessor routines: the `n_fields' parameter is equivalent to `howmany=n_fields', `stride=n_fields', and `dist=1'. (Conceptually, the `n_fields' parameter allows you to transform an array of contiguous vectors, each with length `n_fields'.) `n_fields' is `1' if you are only transforming a single, ordinary array. * The `work' parameter is an optional workspace. If it is not `NULL', it should be exactly the same size as the `local_data' array. If it is provided, FFTW is able to use the built-in `MPI_Alltoall' primitive for (often) greater efficiency at the expense of extra storage space. * Finally, the last parameter specifies whether the output data has the same ordering as the input data (`FFTW_NORMAL_ORDER'), or if it is transposed (`FFTW_TRANSPOSED_ORDER'). Leaving the data transposed results in significant performance improvements due to a saved communication step (needed to un-transpose the data). Specifically, the first two dimensions of the array are transposed, as is described in more detail by the next section. The output of `fftwnd_mpi' is identical to that of the corresponding uniprocessor transform. In particular, you should recall our conventions for normalization and the sign of the transform exponent. The same plan can be used to compute many transforms of the same size. After you are done with it, you should deallocate it by calling `fftwnd_mpi_destroy_plan'. Important: The FFTW MPI routines must be called in the same order by all processes involved in the transform. You should assume that they all are blocking, as if each contained a call to `MPI_Barrier'. Programs using the FFTW MPI routines should be linked with `-lfftw_mpi -lfftw -lm' on Unix, in addition to whatever libraries are required for MPI.  File: fftw.info, Node: MPI Data Layout, Next: Usage of MPI FFTW for Real Multi-dimensional Transforms, Prev: Usage of MPI FFTW for Complex Multi-dimensional Transforms, Up: MPI FFTW MPI Data Layout --------------- The transform data used by the MPI FFTW routines is "distributed": a distinct portion of it resides with each process involved in the transform. This allows the transform to be parallelized, for example, over a cluster of workstations, each with its own separate memory, so that you can take advantage of the total memory of all the processors you are parallelizing over. In particular, the array is divided according to the rows (first dimension) of the data: each process gets a subset of the rows of the data. (This is sometimes called a "slab decomposition.") One consequence of this is that you can't take advantage of more processors than you have rows (e.g. `64x64x64' matrix can at most use 64 processors). This isn't usually much of a limitation, however, as each processor needs a fair amount of data in order for the parallel-computation benefits to outweight the communications costs. Below, the first dimension of the data will be referred to as ``x'' and the second dimension as ``y''. FFTW supplies a routine to tell you exactly how much data resides on the current process: void fftwnd_mpi_local_sizes(fftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size); Given a plan `p', the other parameters of this routine are set to values describing the required data layout, described below. `total_local_size' is the number of `fftw_complex' elements that you must allocate for your local data (and workspace, if you choose). (This value should, of course, be multiplied by `n_fields' if that parameter to `fftwnd_mpi' is not `1'.) The data on the current process has `local_nx' rows, starting at row `local_x_start'. If `fftwnd_mpi' is called with `FFTW_TRANSPOSED_ORDER' output, then `y' will be the first dimension of the output, and the local `y' extent will be given by `local_ny_after_transpose' and `local_y_start_after_transpose'. Otherwise, the output has the same dimensions and layout as the input. For instance, suppose you want to transform three-dimensional data of size `nx x ny x nz'. Then, the current process will store a subset of this data, of size `local_nx x ny x nz', where the `x' indices correspond to the range `local_x_start' to `local_x_start+local_nx-1' in the "real" (i.e. logical) array. If `fftwnd_mpi' is called with `FFTW_TRANSPOSED_ORDER' output, then the result will be a `ny x nx x nz' array, of which a `local_ny_after_transpose x nx x nz' subset is stored on the current process (corresponding to `y' values starting at `local_y_start_after_transpose'). The following is an example of allocating such a three-dimensional array array (`local_data') before the transform and initializing it to some function `f(x,y,z)': fftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); local_data = (fftw_complex*) malloc(sizeof(fftw_complex) * total_local_size); for (x = 0; x < local_nx; ++x) for (y = 0; y < ny; ++y) for (z = 0; z < nz; ++z) local_data[(x*ny + y)*nz + z] = f(x + local_x_start, y, z); Some important things to remember: * Although the local data is of dimensions `local_nx x ny x nz' in the above example, do _not_ allocate the array to be of size `local_nx*ny*nz'. Use `total_local_size' instead. * The amount of data on each process will not necessarily be the same; in fact, `local_nx' may even be zero for some processes. (For example, suppose you are doing a `6x6' transform on four processors. There is no way to effectively use the fourth processor in a slab decomposition, so we leave it empty. Proof left as an exercise for the reader.) * All arrays are, of course, in row-major order (*note Multi-dimensional Array Format::). * If you want to compute the inverse transform of the output of `fftwnd_mpi', the dimensions of the inverse transform are given by the dimensions of the output of the forward transform. For example, if you are using `FFTW_TRANSPOSED_ORDER' output in the above example, then the inverse plan should be created with dimensions `ny x nx x nz'. * The data layout only depends upon the dimensions of the array, not on the plan, so you are guaranteed that different plans for the same size (or inverse plans) will use the same (consistent) data layouts.  File: fftw.info, Node: Usage of MPI FFTW for Real Multi-dimensional Transforms, Next: Usage of MPI FFTW for Complex One-dimensional Transforms, Prev: MPI Data Layout, Up: MPI FFTW Usage of MPI FFTW for Real Multi-dimensional Transforms ------------------------------------------------------- MPI transforms specialized for real data are also available, similiar to the uniprocessor `rfftwnd' transforms. Just as in the uniprocessor case, the real-data MPI functions gain roughly a factor of two in speed (and save a factor of two in space) at the expense of more complicated data formats in the calling program. Before reading this section, you should definitely understand how to call the uniprocessor `rfftwnd' functions and also the complex MPI FFTW functions. The following is an example of a program using `rfftwnd_mpi'. It computes the size `nx x ny x nz' transform of a real function `f(x,y,z)', multiplies the imaginary part by `2' for fun, then computes the inverse transform. (We'll also use `FFTW_TRANSPOSED_ORDER' output for the transform, and additionally supply the optional workspace parameter to `rfftwnd_mpi', just to add a little spice.) #include int main(int argc, char **argv) { const int nx = ..., ny = ..., nz = ...; int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; int x, y, z; rfftwnd_mpi_plan plan, iplan; fftw_real *data, *work; fftw_complex *cdata; MPI_Init(&argc,&argv); /* create the forward and backward plans: */ plan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, nx, ny, nz, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE); iplan = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, /* dim.'s of REAL data --> */ nx, ny, nz, FFTW_COMPLEX_TO_REAL, FFTW_ESTIMATE); rfftwnd_mpi_local_sizes(plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); data = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size); /* workspace is the same size as the data: */ work = (fftw_real*) malloc(sizeof(fftw_real) * total_local_size); /* initialize data to f(x,y,z): */ for (x = 0; x < local_nx; ++x) for (y = 0; y < ny; ++y) for (z = 0; z < nz; ++z) data[(x*ny + y) * (2*(nz/2+1)) + z] = f(x + local_x_start, y, z); /* Now, compute the forward transform: */ rfftwnd_mpi(plan, 1, data, work, FFTW_TRANSPOSED_ORDER); /* the data is now complex, so typecast a pointer: */ cdata = (fftw_complex*) data; /* multiply imaginary part by 2, for fun: (note that the data is transposed) */ for (y = 0; y < local_ny_after_transpose; ++y) for (x = 0; x < nx; ++x) for (z = 0; z < (nz/2+1); ++z) cdata[(y*nx + x) * (nz/2+1) + z].im *= 2.0; /* Finally, compute the inverse transform; the result is transposed back to the original data layout: */ rfftwnd_mpi(iplan, 1, data, work, FFTW_TRANSPOSED_ORDER); free(data); free(work); rfftwnd_mpi_destroy_plan(plan); rfftwnd_mpi_destroy_plan(iplan); MPI_Finalize(); } There's a lot of stuff in this example, but it's all just what you would have guessed, right? We replaced all the `fftwnd_mpi*' functions by `rfftwnd_mpi*', but otherwise the parameters were pretty much the same. The data layout distributed among the processes just like for the complex transforms (*note MPI Data Layout::), but in addition the final dimension is padded just like it is for the uniprocessor in-place real transforms (*note Array Dimensions for Real Multi-dimensional Transforms::). In particular, the `z' dimension of the real input data is padded to a size `2*(nz/2+1)', and after the transform it contains `nz/2+1' complex values. Some other important things to know about the real MPI transforms: * As for the uniprocessor `rfftwnd_create_plan', the dimensions passed for the `FFTW_COMPLEX_TO_REAL' plan are those of the _real_ data. In particular, even when `FFTW_TRANSPOSED_ORDER' is used as in this case, the dimensions are those of the (untransposed) real output, not the (transposed) complex input. (For the complex MPI transforms, on the other hand, the dimensions are always those of the input array.) * The output ordering of the transform (`FFTW_TRANSPOSED_ORDER' or `FFTW_TRANSPOSED_ORDER') _must_ be the same for both forward and backward transforms. (This is not required in the complex case.) * `total_local_size' is the required size in `fftw_real' values, not `fftw_complex' values as it is for the complex transforms. * `local_ny_after_transpose' and `local_y_start_after_transpose' describe the portion of the array after the transform; that is, they are indices in the complex array for an `FFTW_REAL_TO_COMPLEX' transform and in the real array for an `FFTW_COMPLEX_TO_REAL' transform. * `rfftwnd_mpi' always expects `fftw_real*' array arguments, but of course these pointers can refer to either real or complex arrays, depending upon which side of the transform you are on. Just as for in-place uniprocessor real transforms (and also in the example above), this is most easily handled by typecasting to a complex pointer when handling the complex data. * As with the complex transforms, there are also `rfftwnd_create_plan' and `rfftw2d_create_plan' functions, and any rank greater than one is supported. Programs using the MPI FFTW real transforms should link with `-lrfftw_mpi -lfftw_mpi -lrfftw -lfftw -lm' on Unix.  File: fftw.info, Node: Usage of MPI FFTW for Complex One-dimensional Transforms, Next: MPI Tips, Prev: Usage of MPI FFTW for Real Multi-dimensional Transforms, Up: MPI FFTW Usage of MPI FFTW for Complex One-dimensional Transforms -------------------------------------------------------- The MPI FFTW also includes routines for parallel one-dimensional transforms of complex data (only). Although the speedup is generally worse than it is for the multi-dimensional routines,(1) these distributed-memory one-dimensional transforms are especially useful for performing one-dimensional transforms that don't fit into the memory of a single machine. The usage of these routines is straightforward, and is similar to that of the multi-dimensional MPI transform functions. You first include the header `' and then create a plan by calling: fftw_mpi_plan fftw_mpi_create_plan(MPI_Comm comm, int n, fftw_direction dir, int flags); The last three arguments are the same as for `fftw_create_plan' (except that all MPI transforms are automatically `FFTW_IN_PLACE'). The first argument specifies the group of processes you are using, and is usually `MPI_COMM_WORLD' (all processes). A plan can be used for many transforms of the same size, and is destroyed when you are done with it by calling `fftw_mpi_destroy_plan(plan)'. If you don't care about the ordering of the input or output data of the transform, you can include `FFTW_SCRAMBLED_INPUT' and/or `FFTW_SCRAMBLED_OUTPUT' in the `flags'. These save some communications at the expense of having the input and/or output reordered in an undocumented way. For example, if you are performing an FFT-based convolution, you might use `FFTW_SCRAMBLED_OUTPUT' for the forward transform and `FFTW_SCRAMBLED_INPUT' for the inverse transform. The transform itself is computed by: void fftw_mpi(fftw_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work); `n_fields', as in `fftwnd_mpi', is equivalent to `howmany=n_fields', `stride=n_fields', and `dist=1', and should be `1' when you are computing the transform of a single array. `local_data' contains the portion of the array local to the current process, described below. `work' is either `NULL' or an array exactly the same size as `local_data'; in the latter case, FFTW can use the `MPI_Alltoall' communications primitive which is (usually) faster at the expense of extra storage. Upon return, `local_data' contains the portion of the output local to the current process (see below). To find out what portion of the array is stored local to the current process, you call the following routine: void fftw_mpi_local_sizes(fftw_mpi_plan p, int *local_n, int *local_start, int *local_n_after_transform, int *local_start_after_transform, int *total_local_size); `total_local_size' is the number of `fftw_complex' elements you should actually allocate for `local_data' (and `work'). `local_n' and `local_start' indicate that the current process stores `local_n' elements corresponding to the indices `local_start' to `local_start+local_n-1' in the "real" array. _After the transform, the process may store a different portion of the array._ The portion of the data stored on the process after the transform is given by `local_n_after_transform' and `local_start_after_transform'. This data is exactly the same as a contiguous segment of the corresponding uniprocessor transform output (i.e. an in-order sequence of sequential frequency bins). Note that, if you compute both a forward and a backward transform of the same size, the local sizes are guaranteed to be consistent. That is, the local size after the forward transform will be the same as the local size before the backward transform, and vice versa. Programs using the FFTW MPI routines should be linked with `-lfftw_mpi -lfftw -lm' on Unix, in addition to whatever libraries are required for MPI. ---------- Footnotes ---------- (1) The 1D transforms require much more communication. All the communication in our FFT routines takes the form of an all-to-all communication: the multi-dimensional transforms require two all-to-all communications (or one, if you use `FFTW_TRANSPOSED_ORDER'), while the one-dimensional transforms require _three_ (or two, if you use scrambled input or output). fftw-2.1.5/doc/fftw.info-40000644000175400001440000013514307637527602010724 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: fftw.info, Node: MPI Tips, Prev: Usage of MPI FFTW for Complex One-dimensional Transforms, Up: MPI FFTW MPI Tips -------- There are several things you should consider in order to get the best performance out of the MPI FFTW routines. First, if possible, the first and second dimensions of your data should be divisible by the number of processes you are using. (If only one can be divisible, then you should choose the first dimension.) This allows the computational load to be spread evenly among the processes, and also reduces the communications complexity and overhead. In the one-dimensional transform case, the size of the transform should ideally be divisible by the _square_ of the number of processors. Second, you should consider using the `FFTW_TRANSPOSED_ORDER' output format if it is not too burdensome. The speed gains from communications savings are usually substantial. Third, you should consider allocating a workspace for `(r)fftw(nd)_mpi', as this can often (but not always) improve performance (at the cost of extra storage). Fourth, you should experiment with the best number of processors to use for your problem. (There comes a point of diminishing returns, when the communications costs outweigh the computational benefits.(1)) The `fftw_mpi_test' program can output helpful performance benchmarks. It accepts the same parameters as the uniprocessor test programs (c.f. `tests/README') and is run like an ordinary MPI program. For example, `mpirun -np 4 fftw_mpi_test -s 128x128x128' will benchmark a `128x128x128' transform on four processors, reporting timings and parallel speedups for all variants of `fftwnd_mpi' (transposed, with workspace, etcetera). (Note also that there is the `rfftw_mpi_test' program for the real transforms.) ---------- Footnotes ---------- (1) An FFT is particularly hard on communications systems, as it requires an "all-to-all" communication, which is more or less the worst possible case.  File: fftw.info, Node: Calling FFTW from Fortran, Next: Installation and Customization, Prev: Parallel FFTW, Up: Top Calling FFTW from Fortran ************************* The standard FFTW libraries include special wrapper functions that allow Fortran programs to call FFTW subroutines. This chapter describes how those functions may be employed to use FFTW from Fortran. We assume here that the reader is already familiar with the usage of FFTW in C, as described elsewhere in this manual. In general, it is not possible to call C functions directly from Fortran, due to Fortran's inability to pass arguments by value and also because Fortran compilers typically expect identifiers to be mangled somehow for linking. However, if C functions are written in a special way, they _are_ callable from Fortran, and we have employed this technique to create Fortran-callable "wrapper" functions around the main FFTW routines. These wrapper functions are included in the FFTW libraries by default, unless a Fortran compiler isn't found on your system or `--disable-fortran' is included in the `configure' flags. As a result, calling FFTW from Fortran requires little more than appending ``_f77'' to the function names and then linking normally with the FFTW libraries. There are a few wrinkles, however, as we shall discuss below. * Menu: * Wrapper Routines:: * FFTW Constants in Fortran:: * Fortran Examples::  File: fftw.info, Node: Wrapper Routines, Next: FFTW Constants in Fortran, Prev: Calling FFTW from Fortran, Up: Calling FFTW from Fortran Wrapper Routines ================ All of the uniprocessor and multi-threaded transform routines have Fortran-callable wrappers, except for the wisdom import/export functions (since it is not possible to exchange string and file arguments portably with Fortran) and the specific planner routines (*note Discussion on Specific Plans::). The name of the wrapper routine is the same as that of the corresponding C routine, but with `fftw/fftwnd/rfftw/rfftwnd' replaced by `fftw_f77/fftwnd_f77/rfftw_f77/rfftwnd_f77'. For example, in Fortran, instead of calling `fftw_one' you would call `fftw_f77_one'.(1) For the most part, all of the arguments to the functions are the same, with the following exceptions: * `plan' variables (what would be of type `fftw_plan', `rfftwnd_plan', etcetera, in C), must be declared as a type that is the same size as a pointer (address) on your machine. (Fortran has no generic pointer type.) The Fortran `integer' type is usually the same size as a pointer, but you need to be wary (especially on 64-bit machines). (You could also use `integer*4' on a 32-bit machine and `integer*8' on a 64-bit machine.) Ugh. (`g77' has a special type, `integer(kind=7)', that is defined to be the same size as a pointer.) * Any function that returns a value (e.g. `fftw_create_plan') is converted into a subroutine. The return value is converted into an additional (first) parameter of the wrapper subroutine. (The reason for this is that some Fortran implementations seem to have trouble with C function return values.) * When performing one-dimensional `FFTW_IN_PLACE' transforms, you don't have the option of passing `NULL' for the `out' argument (since there is no way to pass `NULL' from Fortran). Therefore, when performing such transforms, you _must_ allocate and pass a contiguous scratch array of the same size as the transform. Note that for in-place multi-dimensional (`(r)fftwnd') transforms, the `out' argument is ignored, so you can pass anything for that parameter. * The wrapper routines expect multi-dimensional arrays to be in column-major order, which is the ordinary format of Fortran arrays. They do this transparently and costlessly simply by reversing the order of the dimensions passed to FFTW, but this has one important consequence for multi-dimensional real-complex transforms, discussed below. In general, you should take care to use Fortran data types that correspond to (i.e. are the same size as) the C types used by FFTW. If your C and Fortran compilers are made by the same vendor, the correspondence is usually straightforward (i.e. `integer' corresponds to `int', `real' corresponds to `float', etcetera). Such simple correspondences are assumed in the examples below. The examples also assume that FFTW was compiled in double precision (the default). ---------- Footnotes ---------- (1) Technically, Fortran 77 identifiers are not allowed to have more than 6 characters, nor may they contain underscores. Any compiler that enforces this limitation doesn't deserve to link to FFTW.  File: fftw.info, Node: FFTW Constants in Fortran, Next: Fortran Examples, Prev: Wrapper Routines, Up: Calling FFTW from Fortran FFTW Constants in Fortran ========================= When creating plans in FFTW, a number of constants are used to specify options, such as `FFTW_FORWARD' or `FFTW_USE_WISDOM'. The same constants must be used with the wrapper routines, but of course the C header files where the constants are defined can't be incorporated directly into Fortran code. Instead, we have placed Fortran equivalents of the FFTW constant definitions in the file `fortran/fftw_f77.i' of the FFTW package. If your Fortran compiler supports a preprocessor, you can use that to incorporate this file into your code whenever you need to call FFTW. Otherwise, you will have to paste the constant definitions in directly. They are: integer FFTW_FORWARD,FFTW_BACKWARD parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) integer FFTW_ESTIMATE,FFTW_MEASURE parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM parameter (FFTW_OUT_OF_PLACE=0) parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) integer FFTW_THREADSAFE parameter (FFTW_THREADSAFE=128) In C, you combine different flags (like `FFTW_USE_WISDOM' and `FFTW_MEASURE') using the ``|'' operator; in Fortran you should just use ``+''.  File: fftw.info, Node: Fortran Examples, Prev: FFTW Constants in Fortran, Up: Calling FFTW from Fortran Fortran Examples ================ In C you might have something like the following to transform a one-dimensional complex array: fftw_complex in[N], *out[N]; fftw_plan plan; plan = fftw_create_plan(N,FFTW_FORWARD,FFTW_ESTIMATE); fftw_one(plan,in,out); fftw_destroy_plan(plan); In Fortran, you use the following to accomplish the same thing: double complex in, out dimension in(N), out(N) integer plan call fftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE) call fftw_f77_one(plan,in,out) call fftw_f77_destroy_plan(plan) Notice how all routines are called as Fortran subroutines, and the plan is returned via the first argument to `fftw_f77_create_plan'. _Important:_ these examples assume that `integer' is the same size as a pointer, and may need modification on a 64-bit machine. *Note Wrapper Routines::, above. To do the same thing, but using 8 threads in parallel (*note Multi-threaded FFTW::), you would simply replace the call to `fftw_f77_one' with: call fftw_f77_threads_one(8,plan,in,out) To transform a three-dimensional array in-place with C, you might do: fftw_complex arr[L][M][N]; fftwnd_plan plan; int n[3] = {L,M,N}; plan = fftwnd_create_plan(3,n,FFTW_FORWARD, FFTW_ESTIMATE | FFTW_IN_PLACE); fftwnd_one(plan, arr, 0); fftwnd_destroy_plan(plan); In Fortran, you would use this instead: double complex arr dimension arr(L,M,N) integer n dimension n(3) integer plan n(1) = L n(2) = M n(3) = N call fftwnd_f77_create_plan(plan,3,n,FFTW_FORWARD, + FFTW_ESTIMATE + FFTW_IN_PLACE) call fftwnd_f77_one(plan, arr, 0) call fftwnd_f77_destroy_plan(plan) Instead of calling `fftwnd_f77_create_plan(plan,3,n,...)', we could also have called `fftw3d_f77_create_plan(plan,L,M,N,...)'. Note that we pass the array dimensions in the "natural" order; also note that the last argument to `fftwnd_f77' is ignored since the transform is `FFTW_IN_PLACE'. To transform a one-dimensional real array in Fortran, you might do: double precision in, out dimension in(N), out(N) integer plan call rfftw_f77_create_plan(plan,N,FFTW_REAL_TO_COMPLEX, + FFTW_ESTIMATE) call rfftw_f77_one(plan,in,out) call rfftw_f77_destroy_plan(plan) To transform a two-dimensional real array, out of place, you might use the following: double precision in double complex out dimension in(M,N), out(M/2 + 1, N) integer plan call rfftw2d_f77_create_plan(plan,M,N,FFTW_REAL_TO_COMPLEX, + FFTW_ESTIMATE) call rfftwnd_f77_one_real_to_complex(plan, in, out) call rfftwnd_f77_destroy_plan(plan) Important: Notice that it is the _first_ dimension of the complex output array that is cut in half in Fortran, rather than the last dimension as in C. This is a consequence of the wrapper routines reversing the order of the array dimensions passed to FFTW so that the Fortran program can use its ordinary column-major order.  File: fftw.info, Node: Installation and Customization, Next: Acknowledgments, Prev: Calling FFTW from Fortran, Up: Top Installation and Customization ****************************** This chapter describes the installation and customization of FFTW, the latest version of which may be downloaded from the FFTW home page (http://www.fftw.org). As distributed, FFTW makes very few assumptions about your system. All you need is an ANSI C compiler (`gcc' is fine, although vendor-provided compilers often produce faster code). However, installation of FFTW is somewhat simpler if you have a Unix or a GNU system, such as Linux. In this chapter, we first describe the installation of FFTW on Unix and non-Unix systems. We then describe how you can customize FFTW to achieve better performance. Specifically, you can I) enable `gcc'/x86-specific hacks that improve performance on Pentia and PentiumPro's; II) adapt FFTW to use the high-resolution clock of your machine, if any; III) produce code (_codelets_) to support fast transforms of sizes that are not supported efficiently by the standard FFTW distribution. * Menu: * Installation on Unix:: * Installation on non-Unix Systems:: * Installing FFTW in both single and double precision:: * gcc and Pentium hacks:: * Customizing the timer:: * Generating your own code::  File: fftw.info, Node: Installation on Unix, Next: Installation on non-Unix Systems, Prev: Installation and Customization, Up: Installation and Customization Installation on Unix ==================== FFTW comes with a `configure' program in the GNU style. Installation can be as simple as: ./configure make make install This will build the uniprocessor complex and real transform libraries along with the test programs. We strongly recommend that you use GNU `make' if it is available; on some systems it is called `gmake'. The "`make install'" command installs the fftw and rfftw libraries in standard places, and typically requires root privileges (unless you specify a different install directory with the `--prefix' flag to `configure'). You can also type "`make check'" to put the FFTW test programs through their paces. If you have problems during configuration or compilation, you may want to run "`make distclean'" before trying again; this ensures that you don't have any stale files left over from previous compilation attempts. The `configure' script knows good `CFLAGS' (C compiler flags) for a few systems. If your system is not known, the `configure' script will print out a warning. (1) In this case, you can compile FFTW with the command make CFLAGS="" If you do find an optimal set of `CFLAGS' for your system, please let us know what they are (along with the output of `config.guess') so that we can include them in future releases. The `configure' program supports all the standard flags defined by the GNU Coding Standards; see the `INSTALL' file in FFTW or the GNU web page (http://www.gnu.org/prep/standards_toc.html). Note especially `--help' to list all flags and `--enable-shared' to create shared, rather than static, libraries. `configure' also accepts a few FFTW-specific flags, particularly: * `--enable-float' Produces a single-precision version of FFTW (`float') instead of the default double-precision (`double'). *Note Installing FFTW in both single and double precision::. * `--enable-type-prefix' Adds a `d' or `s' prefix to all installed libraries and header files to indicate the floating-point precision. *Note Installing FFTW in both single and double precision::. (`--enable-type-prefix=' lets you add an arbitrary prefix.) By default, no prefix is used. * `--enable-threads' Enables compilation and installation of the FFTW threads library (*note Multi-threaded FFTW::), which provides a simple interface to parallel transforms for SMP systems. (By default, the threads routines are not compiled.) * `--with-openmp', `--with-sgimp' In conjunction with `--enable-threads', causes the multi-threaded FFTW library to use OpenMP or SGI MP compiler directives in order to induce parallelism, rather than spawning its own threads directly. (Useful especially for programs already employing such directives, in order to minimize conflicts between different parallelization mechanisms.) * `--enable-mpi' Enables compilation and installation of the FFTW MPI library (*note MPI FFTW::), which provides parallel transforms for distributed-memory systems with MPI. (By default, the MPI routines are not compiled.) * `--disable-fortran' Disables inclusion of Fortran-callable wrapper routines (*note Calling FFTW from Fortran::) in the standard FFTW libraries. These wrapper routines increase the library size by only a negligible amount, so they are included by default as long as the `configure' script finds a Fortran compiler on your system. * `--with-gcc' Enables the use of `gcc'. By default, FFTW uses the vendor-supplied `cc' compiler if present. Unfortunately, `gcc' produces slower code than `cc' on many systems. * `--enable-i386-hacks' *Note gcc and Pentium hacks::, below. * `--enable-pentium-timer' *Note gcc and Pentium hacks::, below. To force `configure' to use a particular C compiler (instead of the default, usually `cc'), set the environment variable `CC' to the name of the desired compiler before running `configure'; you may also need to set the flags via the variable `CFLAGS'. ---------- Footnotes ---------- (1) Each version of `cc' seems to have its own magic incantation to get the fastest code most of the time--you'd think that people would have agreed upon some convention, e.g. "`-Omax'", by now.  File: fftw.info, Node: Installation on non-Unix Systems, Next: Installing FFTW in both single and double precision, Prev: Installation on Unix, Up: Installation and Customization Installation on non-Unix Systems ================================ It is quite straightforward to install FFTW even on non-Unix systems lacking the niceties of the `configure' script. The FFTW Home Page may include some FFTW packages preconfigured for particular systems/compilers, and also contains installation notes sent in by users. All you really need to do, though, is to compile all of the `.c' files in the appropriate directories of the FFTW package. (You needn't worry about the many extraneous files lying around.) For the complex transforms, compile all of the `.c' files in the `fftw' directory and link them into a library. Similarly, for the real transforms, compile all of the `.c' files in the `rfftw' directory into a library. Note that these sources `#include' various files in the `fftw' and `rfftw' directories, so you may need to set up the `#include' paths for your compiler appropriately. Be sure to enable the highest-possible level of optimization in your compiler. By default, FFTW is compiled for double-precision transforms. To work in single precision rather than double precision, `#define' the symbol `FFTW_ENABLE_FLOAT' in `fftw.h' (in the `fftw' directory) and (re)compile FFTW. These libraries should be linked with any program that uses the corresponding transforms. The required header files, `fftw.h' and `rfftw.h', are located in the `fftw' and `rfftw' directories respectively; you may want to put them with the libraries, or wherever header files normally go on your system. FFTW includes test programs, `fftw_test' and `rfftw_test', in the `tests' directory. These are compiled and linked like any program using FFTW, except that they use additional header files located in the `fftw' and `rfftw' directories, so you will need to set your compiler `#include' paths appropriately. `fftw_test' is compiled from `fftw_test.c' and `test_main.c', while `rfftw_test' is compiled from `rfftw_test.c' and `test_main.c'. When you run these programs, you will be prompted interactively for various possible tests to perform; see also `tests/README' for more information.  File: fftw.info, Node: Installing FFTW in both single and double precision, Next: gcc and Pentium hacks, Prev: Installation on non-Unix Systems, Up: Installation and Customization Installing FFTW in both single and double precision =================================================== It is often useful to install both single- and double-precision versions of the FFTW libraries on the same machine, and we provide a convenient mechanism for achieving this on Unix systems. When the `--enable-type-prefix' option of configure is used, the FFTW libraries and header files are installed with a prefix of `d' or `s', depending upon whether you compiled in double or single precision. Then, instead of linking your program with `-lrfftw -lfftw', for example, you would link with `-ldrfftw -ldfftw' to use the double-precision version or with `-lsrfftw -lsfftw' to use the single-precision version. Also, you would `#include' `' or `' instead of `', and so on. _The names of FFTW functions, data types, and constants remain unchanged!_ You still call, for instance, `fftw_one' and not `dfftw_one'. Only the names of header files and libraries are modified. One consequence of this is that _you cannot use both the single- and double-precision FFTW libraries in the same program, simultaneously,_ as the function names would conflict. So, to install both the single- and double-precision libraries on the same machine, you would do: ./configure --enable-type-prefix [ other options ] make make install make clean ./configure --enable-float --enable-type-prefix [ other options ] make make install  File: fftw.info, Node: gcc and Pentium hacks, Next: Customizing the timer, Prev: Installing FFTW in both single and double precision, Up: Installation and Customization `gcc' and Pentium hacks ======================= The `configure' option `--enable-i386-hacks' enables specific optimizations for the Pentium and later x86 CPUs under gcc, which can significantly improve performance of double-precision transforms. Specifically, we have tested these hacks on Linux with `gcc' 2.[789] and versions of `egcs' since 1.0.3. These optimizations affect only the performance and not the correctness of FFTW (i.e. it is always safe to try them out). These hacks provide a workaround to the incorrect alignment of local `double' variables in `gcc'. The compiler aligns these variables to multiples of 4 bytes, but execution is much faster (on Pentium and PentiumPro) if `double's are aligned to a multiple of 8 bytes. By carefully counting the number of variables allocated by the compiler in performance-critical regions of the code, we have been able to introduce dummy allocations (using `alloca') that align the stack properly. The hack depends crucially on the compiler flags that are used. For example, it won't work without `-fomit-frame-pointer'. In principle, these hacks are no longer required under `gcc' versions 2.95 and later, which automatically align the stack correctly (see `-mpreferred-stack-boundary' in the `gcc' manual). However, we have encountered a bug (http://egcs.cygnus.com/ml/gcc-bugs/1999-11/msg00259.html) in the stack alignment of versions 2.95.[012] that causes FFTW's stack to be misaligned under some circumstances. The `configure' script automatically detects this bug and disables `gcc''s stack alignment in favor of our own hacks when `--enable-i386-hacks' is used. The `fftw_test' program outputs speed measurements that you can use to see if these hacks are beneficial. The `configure' option `--enable-pentium-timer' enables the use of the Pentium and PentiumPro cycle counter for timing purposes. In order to get correct results, you must define `FFTW_CYCLES_PER_SEC' in `fftw/config.h' to be the clock speed of your processor; the resulting FFTW library will be nonportable. The use of this option is deprecated. On serious operating systems (such as Linux), FFTW uses `gettimeofday()', which has enough resolution and is portable. (Note that Win32 has its own high-resolution timing routines as well. FFTW contains unsupported code to use these routines.)  File: fftw.info, Node: Customizing the timer, Next: Generating your own code, Prev: gcc and Pentium hacks, Up: Installation and Customization Customizing the timer ===================== FFTW needs a reasonably-precise clock in order to find the optimal way to compute a transform. On Unix systems, `configure' looks for `gettimeofday' and other system-specific timers. If it does not find any high resolution clock, it defaults to using the `clock()' function, which is very portable, but forces FFTW to run for a long time in order to get reliable measurements. If your machine supports a high-resolution clock not recognized by FFTW, it is therefore advisable to use it. You must edit `fftw/fftw-int.h'. There are a few macros you must redefine. The code is documented and should be self-explanatory. (By the way, `fftw-int' stands for `fftw-internal', but for some inexplicable reason people are still using primitive systems with 8.3 filenames.) Even if you don't install high-resolution timing code, we still recommend that you look at the `FFTW_TIME_MIN' constant in `fftw/fftw-int.h'. This constant holds the minimum time interval (in seconds) required to get accurate timing measurements, and should be (at least) several hundred times the resolution of your clock. The default constants are on the conservative side, and may cause FFTW to take longer than necessary when you create a plan. Set `FFTW_TIME_MIN' to whatever is appropriate on your system (be sure to set the _right_ `FFTW_TIME_MIN'...there are several definitions in `fftw-int.h', corresponding to different platforms and timers). As an aid in checking the resolution of your clock, you can use the `tests/fftw_test' program with the `-t' option (c.f. `tests/README'). Remember, the mere fact that your clock reports times in, say, picoseconds, does not mean that it is actually _accurate_ to that resolution.  File: fftw.info, Node: Generating your own code, Prev: Customizing the timer, Up: Installation and Customization Generating your own code ======================== If you know that you will only use transforms of a certain size (say, powers of 2) and want to reduce the size of the library, you can reconfigure FFTW to support only those sizes you are interested in. You may even generate code to enable efficient transforms of a size not supported by the default distribution. The default distribution supports transforms of any size, but not all sizes are equally fast. The default installation of FFTW is best at handling sizes of the form 2^a 3^b 5^c 7^d 11^e 13^f, where e+f is either 0 or 1, and the other exponents are arbitrary. Other sizes are computed by means of a slow, general-purpose routine. However, if you have an application that requires fast transforms of size, say, `17', there is a way to generate specialized code to handle that. The directory `gensrc' contains all the programs and scripts that were used to generate FFTW. In particular, the program `gensrc/genfft.ml' was used to generate the code that FFTW uses to compute the transforms. We do not expect casual users to use it. `genfft' is a rather sophisticated program that generates directed acyclic graphs of FFT algorithms and performs algebraic simplifications on them. `genfft' is written in Objective Caml, a dialect of ML. Objective Caml is described at `http://pauillac.inria.fr/ocaml/' and can be downloaded from from `ftp://ftp.inria.fr/lang/caml-light'. If you have Objective Caml installed, you can type `sh bootstrap.sh' in the top-level directory to re-generate the files. If you change the `gensrc/config' file, you can optimize FFTW for sizes that are not currently supported efficiently (say, 17 or 19). We do not provide more details about the code-generation process, since we do not expect that users will need to generate their own code. However, feel free to contact us at if you are interested in the subject. You might find it interesting to learn Caml and/or some modern programming techniques that we used in the generator (including monadic programming), especially if you heard the rumor that Java and object-oriented programming are the latest advancement in the field. The internal operation of the codelet generator is described in the paper, "A Fast Fourier Transform Compiler," by M. Frigo, which is available from the FFTW home page (http://www.fftw.org) and will appear in the `Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)'.  File: fftw.info, Node: Acknowledgments, Next: License and Copyright, Prev: Installation and Customization, Up: Top Acknowledgments *************** Matteo Frigo was supported in part by the Defense Advanced Research Projects Agency (DARPA) under Grants N00014-94-1-0985 and F30602-97-1-0270, and by a Digital Equipment Corporation Fellowship. Steven G. Johnson was supported in part by a DoD NDSEG Fellowship, an MIT Karl Taylor Compton Fellowship, and by the Materials Research Science and Engineering Center program of the National Science Foundation under award DMR-9400334. Both authors were also supported in part by their respective girlfriends, by the letters "Q" and "R", and by the number 12. We are grateful to SUN Microsystems Inc. for its donation of a cluster of 9 8-processor Ultra HPC 5000 SMPs (24 Gflops peak). These machines served as the primary platform for the development of earlier versions of FFTW. We thank Intel Corporation for donating a four-processor Pentium Pro machine. We thank the Linux community for giving us a decent OS to run on that machine. The `genfft' program was written using Objective Caml, a dialect of ML. Objective Caml is a small and elegant language developed by Xavier Leroy. The implementation is available from `ftp.inria.fr' in the directory `lang/caml-light'. We used versions 1.07 and 2.00 of the software. In previous releases of FFTW, `genfft' was written in Caml Light, by the same authors. An even earlier implementation of `genfft' was written in Scheme, but Caml is definitely better for this kind of application. FFTW uses many tools from the GNU project, including `automake', `texinfo', and `libtool'. Prof. Charles E. Leiserson of MIT provided continuous support and encouragement. This program would not exist without him. Charles also proposed the name "codelets" for the basic FFT blocks. Prof. John D. Joannopoulos of MIT demonstrated continuing tolerance of Steven's "extra-curricular" computer-science activities. Steven's chances at a physics degree would not exist without him. Andrew Sterian contributed the Windows timing code. Didier Miras reported a bug in the test procedure used in FFTW 1.2. We now use a completely different test algorithm by Funda Ergun that does not require a separate FFT program to compare against. Wolfgang Reimer contributed the Pentium cycle counter and a few fixes that help portability. Ming-Chang Liu uncovered a well-hidden bug in the complex transforms of FFTW 2.0 and supplied a patch to correct it. The FFTW FAQ was written in `bfnn' (Bizarre Format With No Name) and formatted using the tools developed by Ian Jackson for the Linux FAQ. _We are especially thankful to all of our users for their continuing support, feedback, and interest during our development of FFTW._  File: fftw.info, Node: License and Copyright, Next: Concept Index, Prev: Acknowledgments, Up: Top License and Copyright ********************* FFTW is copyright (C) 1997-1999 Massachusetts Institute of Technology. FFTW is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. You can also find the GPL on the GNU web site (http://www.gnu.org/copyleft/gpl.html). In addition, we kindly ask you to acknowledge FFTW and its authors in any program or publication in which you use FFTW. (You are not _required_ to do so; it is up to your common sense to decide whether you want to comply with this request or not.) Non-free versions of FFTW are available under terms different than the General Public License. (e.g. they do not require you to accompany any object code using FFTW with the corresponding source code.) For these alternate terms you must purchase a license from MIT's Technology Licensing Office. Users interested in such a license should contact us () for more information.  File: fftw.info, Node: Concept Index, Next: Library Index, Prev: License and Copyright, Up: Top Concept Index ************* * Menu: * algorithm: Introduction. * benchfft: Introduction. * benchmark <1>: gcc and Pentium hacks. * benchmark <2>: MPI Tips. * benchmark <3>: How Many Threads to Use?. * benchmark: Introduction. * blocking: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * C multi-dimensional arrays: Static Arrays in C. * Caml <1>: Acknowledgments. * Caml: Generating your own code. * Cilk <1>: Parallel FFTW. * Cilk: Introduction. * clock: Customizing the timer. * code generator <1>: Generating your own code. * code generator: Introduction. * column-major <1>: Fortran Examples. * column-major <2>: Wrapper Routines. * column-major: Column-major Format. * compiler <1>: gcc and Pentium hacks. * compiler <2>: Installation on non-Unix Systems. * compiler <3>: Installation on Unix. * compiler <4>: Installation and Customization. * compiler <5>: Calling FFTW from Fortran. * compiler: Introduction. * compiler flags: Installation on Unix. * complex multi-dimensional transform <1>: Multi-dimensional Transforms Reference. * complex multi-dimensional transform: Complex Multi-dimensional Transforms Tutorial. * complex number: Data Types. * complex one-dimensional transform: Complex One-dimensional Transforms Tutorial. * complex to real transform <1>: Real One-dimensional Transforms Reference. * complex to real transform: Real One-dimensional Transforms Tutorial. * complex transform: Complex One-dimensional Transforms Tutorial. * configure <1>: Installing FFTW in both single and double precision. * configure <2>: Installation on Unix. * configure <3>: MPI FFTW Installation. * configure <4>: Installation and Supported Hardware/Software. * configure: Data Types. * convolution: Real Multi-dimensional Transforms Tutorial. * cyclic convolution: Real Multi-dimensional Transforms Tutorial. * Discrete Fourier Transform <1>: What RFFTWND Really Computes. * Discrete Fourier Transform <2>: What RFFTW Really Computes. * Discrete Fourier Transform <3>: What FFTWND Really Computes. * Discrete Fourier Transform: What FFTW Really Computes. * distributed array format <1>: Usage of MPI FFTW for Complex One-dimensional Transforms. * distributed array format <2>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * distributed array format: MPI Data Layout. * distributed memory <1>: MPI Data Layout. * distributed memory <2>: MPI FFTW. * distributed memory: Parallel FFTW. * Ecclesiastes: Caveats in Using Wisdom. * executor: Introduction. * FFTW: Introduction. * FFTWND: Multi-dimensional Transforms Reference. * flags <1>: FFTW Constants in Fortran. * flags <2>: Usage of MPI FFTW for Complex One-dimensional Transforms. * flags <3>: rfftwnd_create_plan. * flags <4>: rfftw_create_plan. * flags <5>: fftwnd_create_plan. * flags <6>: fftw_create_plan. * flags <7>: Complex Multi-dimensional Transforms Tutorial. * flags: Complex One-dimensional Transforms Tutorial. * floating-point precision <1>: Installing FFTW in both single and double precision. * floating-point precision <2>: Installation on non-Unix Systems. * floating-point precision <3>: Installation on Unix. * floating-point precision <4>: Wrapper Routines. * floating-point precision: Data Types. * Fortran-callable wrappers <1>: Installation on Unix. * Fortran-callable wrappers <2>: Calling FFTW from Fortran. * Fortran-callable wrappers: Column-major Format. * frequency <1>: What FFTW Really Computes. * frequency <2>: Complex Multi-dimensional Transforms Tutorial. * frequency: Complex One-dimensional Transforms Tutorial. * gettimeofday: Customizing the timer. * girlfriends: Acknowledgments. * halfcomplex array <1>: Data Types. * halfcomplex array: Real One-dimensional Transforms Tutorial. * hermitian array <1>: What RFFTWND Really Computes. * hermitian array: Data Types. * in-place transform <1>: Wrapper Routines. * in-place transform <2>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * in-place transform <3>: Tips for Optimal Threading. * in-place transform <4>: Array Dimensions for Real Multi-dimensional Transforms. * in-place transform <5>: rfftwnd_create_plan. * in-place transform <6>: fftwnd. * in-place transform <7>: fftw. * in-place transform <8>: fftw_create_plan. * in-place transform: Complex Multi-dimensional Transforms Tutorial. * installation: Installation and Customization. * linking on Unix <1>: Usage of MPI FFTW for Complex One-dimensional Transforms. * linking on Unix <2>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * linking on Unix <3>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * linking on Unix <4>: Usage of Multi-threaded FFTW. * linking on Unix <5>: Real One-dimensional Transforms Tutorial. * linking on Unix: Complex One-dimensional Transforms Tutorial. * LISP <1>: Acknowledgments. * LISP: Importing and Exporting Wisdom. * load-balancing: MPI Tips. * malloc <1>: Memory Allocator Reference. * malloc: Dynamic Arrays in C. * ML: Generating your own code. * monadic programming: Generating your own code. * MPI <1>: Installation on Unix. * MPI <2>: MPI FFTW. * MPI <3>: Parallel FFTW. * MPI: Introduction. * MPI_Alltoall <1>: Usage of MPI FFTW for Complex One-dimensional Transforms. * MPI_Alltoall <2>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * MPI_Alltoall: MPI FFTW Installation. * MPI_Barrier: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * MPI_COMM_WORLD <1>: Usage of MPI FFTW for Complex One-dimensional Transforms. * MPI_COMM_WORLD: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * MPI_Finalize: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * MPI_Init: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * multi-dimensional transform <1>: Real Multi-dimensional Transforms Reference. * multi-dimensional transform <2>: Multi-dimensional Transforms Reference. * multi-dimensional transform: Complex Multi-dimensional Transforms Tutorial. * n_fields <1>: Usage of MPI FFTW for Complex One-dimensional Transforms. * n_fields: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * nerd-readable text: Importing and Exporting Wisdom. * normalization <1>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * normalization <2>: What RFFTW Really Computes. * normalization <3>: What FFTW Really Computes. * normalization <4>: Real Multi-dimensional Transforms Tutorial. * normalization <5>: Real One-dimensional Transforms Tutorial. * normalization <6>: Complex Multi-dimensional Transforms Tutorial. * normalization: Complex One-dimensional Transforms Tutorial. * number of threads <1>: How Many Threads to Use?. * number of threads: Usage of Multi-threaded FFTW. * out-of-place transform: Complex Multi-dimensional Transforms Tutorial. * padding <1>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * padding <2>: Array Dimensions for Real Multi-dimensional Transforms. * padding: Real Multi-dimensional Transforms Tutorial. * parallel transform <1>: Parallel FFTW. * parallel transform: Introduction. * Pentium hack: gcc and Pentium hacks. * plan <1>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * plan <2>: Complex One-dimensional Transforms Tutorial. * plan: Introduction. * planner: Introduction. * power spectrum: Real One-dimensional Transforms Tutorial. * rank: Complex Multi-dimensional Transforms Tutorial. * real multi-dimensional transform <1>: Real Multi-dimensional Transforms Reference. * real multi-dimensional transform: Real Multi-dimensional Transforms Tutorial. * real number: Data Types. * real transform <1>: Real One-dimensional Transforms Reference. * real transform: Real One-dimensional Transforms Tutorial. * RFFTW <1>: Real One-dimensional Transforms Reference. * RFFTW: Real One-dimensional Transforms Tutorial. * RFFTWND: Real Multi-dimensional Transforms Reference. * rfftwnd array format <1>: Fortran Examples. * rfftwnd array format <2>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftwnd array format <3>: Strides in In-place RFFTWND. * rfftwnd array format <4>: Array Dimensions for Real Multi-dimensional Transforms. * rfftwnd array format: Real Multi-dimensional Transforms Tutorial. * row-major <1>: MPI Data Layout. * row-major <2>: fftwnd_create_plan. * row-major <3>: Row-major Format. * row-major: Real Multi-dimensional Transforms Tutorial. * saving plans to disk: Words of Wisdom. * slab decomposition: MPI Data Layout. * specific planner: Discussion on Specific Plans. * stride <1>: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * stride <2>: Strides in In-place RFFTWND. * stride <3>: rfftwnd. * stride <4>: rfftw. * stride <5>: fftwnd. * stride <6>: fftw. * stride: Row-major Format. * thread safety <1>: Using Multi-threaded FFTW in a Multi-threaded Program. * thread safety: Thread safety. * threads <1>: Installation on Unix. * threads <2>: Multi-threaded FFTW. * threads <3>: Parallel FFTW. * threads <4>: Thread safety. * threads: Introduction. * timer, customization of: Customizing the timer. * Tutorial: Tutorial. * wisdom <1>: Wisdom Reference. * wisdom <2>: rfftwnd_create_plan. * wisdom <3>: fftwnd_create_plan. * wisdom <4>: fftw_create_plan. * wisdom: Words of Wisdom. * wisdom, import and export: Importing and Exporting Wisdom. * wisdom, problems with: Caveats in Using Wisdom. fftw-2.1.5/doc/fftw.info-50000644000175400001440000002754607637527602010734 This is fftw.info, produced by makeinfo version 4.2 from fftw.texi. This is the FFTW User's manual. Copyright (C) 1997-1999 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.  File: fftw.info, Node: Library Index, Prev: Concept Index, Up: Top Library Index ************* * Menu: * fftw: fftw. * fftw2d_create_plan <1>: fftwnd_create_plan. * fftw2d_create_plan: Complex Multi-dimensional Transforms Tutorial. * fftw2d_create_plan_specific: fftwnd_create_plan. * fftw2d_mpi_create_plan: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftw3d_create_plan <1>: fftwnd_create_plan. * fftw3d_create_plan: Complex Multi-dimensional Transforms Tutorial. * fftw3d_create_plan_specific: fftwnd_create_plan. * fftw3d_f77_create_plan: Fortran Examples. * fftw3d_mpi_create_plan: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * FFTW_BACKWARD: Complex One-dimensional Transforms Tutorial. * FFTW_COMPLEX: Data Types. * fftw_complex <1>: Data Types. * fftw_complex: Complex One-dimensional Transforms Tutorial. * FFTW_COMPLEX_TO_REAL <1>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * FFTW_COMPLEX_TO_REAL <2>: rfftw_create_plan. * FFTW_COMPLEX_TO_REAL: Real One-dimensional Transforms Tutorial. * fftw_create_plan <1>: fftw_create_plan. * fftw_create_plan: Complex One-dimensional Transforms Tutorial. * fftw_create_plan_specific: fftw_create_plan. * fftw_destroy_plan <1>: fftw_destroy_plan. * fftw_destroy_plan: Complex One-dimensional Transforms Tutorial. * fftw_direction <1>: rfftwnd_create_plan. * fftw_direction <2>: fftwnd_create_plan. * fftw_direction <3>: fftw_create_plan. * fftw_direction <4>: Real One-dimensional Transforms Tutorial. * fftw_direction <5>: Complex Multi-dimensional Transforms Tutorial. * fftw_direction: Complex One-dimensional Transforms Tutorial. * FFTW_ENABLE_FLOAT: Data Types. * FFTW_ESTIMATE: Complex One-dimensional Transforms Tutorial. * fftw_export_wisdom <1>: fftw_export_wisdom. * fftw_export_wisdom: Words of Wisdom. * fftw_export_wisdom_to_file <1>: fftw_export_wisdom. * fftw_export_wisdom_to_file: Importing and Exporting Wisdom. * fftw_export_wisdom_to_string <1>: fftw_export_wisdom. * fftw_export_wisdom_to_string: Importing and Exporting Wisdom. * fftw_f77_create_plan: Fortran Examples. * fftw_f77_destroy_plan: Fortran Examples. * fftw_f77_one <1>: Fortran Examples. * fftw_f77_one: Wrapper Routines. * fftw_f77_threads_one: Fortran Examples. * fftw_forget_wisdom: fftw_forget_wisdom. * FFTW_FORWARD: Complex One-dimensional Transforms Tutorial. * fftw_free_hook: Memory Allocator Reference. * fftw_import_wisdom <1>: fftw_import_wisdom. * fftw_import_wisdom: Words of Wisdom. * fftw_import_wisdom_from_file <1>: fftw_import_wisdom. * fftw_import_wisdom_from_file: Importing and Exporting Wisdom. * fftw_import_wisdom_from_string <1>: fftw_import_wisdom. * fftw_import_wisdom_from_string: Importing and Exporting Wisdom. * FFTW_IN_PLACE: Complex Multi-dimensional Transforms Tutorial. * fftw_malloc: Memory Allocator Reference. * fftw_malloc_hook: Memory Allocator Reference. * FFTW_MEASURE: Complex One-dimensional Transforms Tutorial. * fftw_mpi: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_mpi_create_plan: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_mpi_destroy_plan: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_mpi_local_sizes: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_mpi_plan: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_mpi_test <1>: MPI Tips. * fftw_mpi_test: MPI FFTW Installation. * FFTW_NORMAL_ORDER: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftw_one <1>: fftw. * fftw_one: Complex One-dimensional Transforms Tutorial. * FFTW_OUT_OF_PLACE: fftw_create_plan. * fftw_plan <1>: fftw_create_plan. * fftw_plan: Complex One-dimensional Transforms Tutorial. * FFTW_REAL: Data Types. * fftw_real: Data Types. * FFTW_REAL_TO_COMPLEX <1>: rfftw_create_plan. * FFTW_REAL_TO_COMPLEX: Real One-dimensional Transforms Tutorial. * FFTW_SCRAMBLED_INPUT: Usage of MPI FFTW for Complex One-dimensional Transforms. * FFTW_SCRAMBLED_OUTPUT: Usage of MPI FFTW for Complex One-dimensional Transforms. * fftw_test <1>: gcc and Pentium hacks. * fftw_test: Installation on non-Unix Systems. * fftw_threads: Usage of Multi-threaded FFTW. * fftw_threads_init: Usage of Multi-threaded FFTW. * fftw_threads_one: Usage of Multi-threaded FFTW. * fftw_threads_test: How Many Threads to Use?. * FFTW_THREADSAFE: Thread safety. * FFTW_TIME_MIN: Customizing the timer. * FFTW_TRANSPOSED_ORDER <1>: MPI Tips. * FFTW_TRANSPOSED_ORDER <2>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * FFTW_TRANSPOSED_ORDER <3>: MPI Data Layout. * FFTW_TRANSPOSED_ORDER: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * FFTW_USE_WISDOM: Words of Wisdom. * fftwnd <1>: fftwnd. * fftwnd: Complex Multi-dimensional Transforms Tutorial. * fftwnd_create_plan <1>: fftwnd_create_plan. * fftwnd_create_plan: Complex Multi-dimensional Transforms Tutorial. * fftwnd_create_plan_specific: fftwnd_create_plan. * fftwnd_destroy_plan <1>: fftwnd_destroy_plan. * fftwnd_destroy_plan: Complex Multi-dimensional Transforms Tutorial. * fftwnd_f77_create_plan: Fortran Examples. * fftwnd_f77_destroy_plan: Fortran Examples. * fftwnd_f77_one: Fortran Examples. * fftwnd_mpi: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftwnd_mpi_create_plan: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftwnd_mpi_destroy_plan: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftwnd_mpi_local_sizes: MPI Data Layout. * fftwnd_mpi_plan: Usage of MPI FFTW for Complex Multi-dimensional Transforms. * fftwnd_one <1>: fftwnd. * fftwnd_one: Complex Multi-dimensional Transforms Tutorial. * fftwnd_plan <1>: fftwnd_create_plan. * fftwnd_plan: Complex Multi-dimensional Transforms Tutorial. * fftwnd_threads: Usage of Multi-threaded FFTW. * fftwnd_threads_one: Usage of Multi-threaded FFTW. * genfft <1>: Acknowledgments. * genfft: Generating your own code. * rfftw: rfftw. * rfftw2d_create_plan <1>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftw2d_create_plan <2>: rfftwnd_create_plan. * rfftw2d_create_plan: Real Multi-dimensional Transforms Tutorial. * rfftw2d_f77_create_plan: Fortran Examples. * rfftw3d_create_plan <1>: rfftwnd_create_plan. * rfftw3d_create_plan: Real Multi-dimensional Transforms Tutorial. * rfftw3d_mpi_create_plan: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftw_create_plan <1>: rfftw_create_plan. * rfftw_create_plan: Real One-dimensional Transforms Tutorial. * rfftw_create_plan_specific: rfftw_create_plan. * rfftw_destroy_plan <1>: rfftw_destroy_plan. * rfftw_destroy_plan: Real One-dimensional Transforms Tutorial. * rfftw_f77_create_plan: Fortran Examples. * rfftw_f77_destroy_plan: Fortran Examples. * rfftw_f77_one: Fortran Examples. * rfftw_mpi_test <1>: MPI Tips. * rfftw_mpi_test: MPI FFTW Installation. * rfftw_one <1>: rfftw. * rfftw_one: Real One-dimensional Transforms Tutorial. * rfftw_plan <1>: rfftw_create_plan. * rfftw_plan: Real One-dimensional Transforms Tutorial. * rfftw_test: Installation on non-Unix Systems. * rfftw_threads: Usage of Multi-threaded FFTW. * rfftw_threads_one: Usage of Multi-threaded FFTW. * rfftw_threads_test: How Many Threads to Use?. * rfftwnd_complex_to_real: rfftwnd. * rfftwnd_create_plan <1>: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftwnd_create_plan <2>: rfftwnd_create_plan. * rfftwnd_create_plan: Real Multi-dimensional Transforms Tutorial. * rfftwnd_destroy_plan: rfftwnd_destroy_plan. * rfftwnd_f77_destroy_plan: Fortran Examples. * rfftwnd_f77_one_real_to_complex: Fortran Examples. * rfftwnd_mpi: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftwnd_mpi_destroy_plan: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftwnd_mpi_local_sizes: Usage of MPI FFTW for Real Multi-dimensional Transforms. * rfftwnd_one_complex_to_real <1>: rfftwnd. * rfftwnd_one_complex_to_real: Real Multi-dimensional Transforms Tutorial. * rfftwnd_one_real_to_complex <1>: rfftwnd. * rfftwnd_one_real_to_complex: Real Multi-dimensional Transforms Tutorial. * rfftwnd_plan <1>: rfftwnd_create_plan. * rfftwnd_plan: Real Multi-dimensional Transforms Tutorial. * rfftwnd_real_to_complex: rfftwnd. * rfftwnd_threads_complex_to_real: Usage of Multi-threaded FFTW. * rfftwnd_threads_one_complex_to_real: Usage of Multi-threaded FFTW. * rfftwnd_threads_one_real_to_complex: Usage of Multi-threaded FFTW. * rfftwnd_threads_real_to_complex: Usage of Multi-threaded FFTW. fftw-2.1.5/threads/0002777000175400001440000000000007637531661007704 5fftw-2.1.5/threads/Makefile.am0000644000175400001440000000765207635206027011655 # The threads stuff is only compiled if FFTW was configured with # the --enable-threads option. This requires us to use the combination # of foo_* and EXTRA_* variables below. lib_LTLIBRARIES = @FFTW_THREADS_LIBLIST@ include_HEADERS = @FFTW_THREADS_INCLUDELIST@ noinst_PROGRAMS = @FFTW_THREADS_PROGLIST@ EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_threads.la \ lib@FFTW_PREFIX@rfftw_threads.la EXTRA_HEADERS = @FFTW_PREFIX@fftw_threads.h \ @FFTW_PREFIX@rfftw_threads.h EXTRA_PROGRAMS = fftw_threads_test rfftw_threads_test FFTWDIR=../fftw RFFTWDIR=../rfftw INCLUDES = -I$(srcdir)/../tests \ -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) -I$(srcdir) lib@FFTW_PREFIX@fftw_threads_la_SOURCES = \ executor_threads.c fftw_threads.c \ fftwnd_threads.c \ fftw_f77_threads.c \ @FFTW_PREFIX@fftw_threads.h \ fftw_threads-int.h lib@FFTW_PREFIX@fftw_threads_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) @FFTW_PREFIX1@fftw_threads.h: fftw_threads.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_threads.h > $@ fftw_threads_test_SOURCES = fftw_threads_test.c fftw_threads_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_threads.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @THREADLIBS@ lib@FFTW_PREFIX@rfftw_threads_la_SOURCES = \ rexec_threads.c rexec2_threads.c \ rfftwnd_threads.c \ rfftw_f77_threads.c \ @FFTW_PREFIX@fftw_threads.h \ fftw_threads-int.h \ @FFTW_PREFIX@rfftw_threads.h lib@FFTW_PREFIX@rfftw_threads_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) @FFTW_PREFIX1@rfftw_threads.h: rfftw_threads.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_threads.h > $@ CLEANFILES = @FFTW_PREFIX1@fftw_threads.h \ @FFTW_PREFIX1@rfftw_threads.h rfftw_threads_test_SOURCES = rfftw_threads_test.c rfftw_threads_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_threads.la \ lib@FFTW_PREFIX@fftw_threads.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @THREADLIBS@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo check: @FFTW_THREADS_PROGLIST@ @set fnord $(MAKEFLAGS); amf=$$2; \ list='@FFTW_THREADS_PROGLIST@'; for prog in $$list; do \ target="$$prog""-check"; \ echo "Making $$target"; \ ($(MAKE) $$target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" fftw_threads_test-check: fftw_threads_test ./fftw_threads_test 1 -x 100 -r 0 ./fftw_threads_test 2 -x 100 -r 0 ./fftw_threads_test 3 -x 100 -r 0 ./fftw_threads_test 10 -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " FFTW complex-complex threads transforms passed tests!" @echo "--------------------------------------------------------------" rfftw_threads_test-check: rfftw_threads_test ./rfftw_threads_test 1 -x 100 -r 0 ./rfftw_threads_test 2 -x 100 -r 0 ./rfftw_threads_test 3 -x 100 -r 0 ./rfftw_threads_test 10 -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " RFFTW real-complex threads transforms passed tests!" @echo "--------------------------------------------------------------" fftw-2.1.5/threads/Makefile.in0000644000175400001440000005350507637527506011676 # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # The threads stuff is only compiled if FFTW was configured with # the --enable-threads option. This requires us to use the combination # of foo_* and EXTRA_* variables below. srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER = echo AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = @FFTW_THREADS_LIBLIST@ include_HEADERS = @FFTW_THREADS_INCLUDELIST@ noinst_PROGRAMS = @FFTW_THREADS_PROGLIST@ EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_threads.la \ lib@FFTW_PREFIX@rfftw_threads.la EXTRA_HEADERS = @FFTW_PREFIX@fftw_threads.h \ @FFTW_PREFIX@rfftw_threads.h EXTRA_PROGRAMS = fftw_threads_test rfftw_threads_test FFTWDIR = ../fftw RFFTWDIR = ../rfftw INCLUDES = -I$(srcdir)/../tests \ -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) -I$(srcdir) lib@FFTW_PREFIX@fftw_threads_la_SOURCES = \ executor_threads.c fftw_threads.c \ fftwnd_threads.c \ fftw_f77_threads.c \ @FFTW_PREFIX@fftw_threads.h \ fftw_threads-int.h lib@FFTW_PREFIX@fftw_threads_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) fftw_threads_test_SOURCES = fftw_threads_test.c fftw_threads_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_threads.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @THREADLIBS@ lib@FFTW_PREFIX@rfftw_threads_la_SOURCES = \ rexec_threads.c rexec2_threads.c \ rfftwnd_threads.c \ rfftw_f77_threads.c \ @FFTW_PREFIX@fftw_threads.h \ fftw_threads-int.h \ @FFTW_PREFIX@rfftw_threads.h lib@FFTW_PREFIX@rfftw_threads_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) CLEANFILES = @FFTW_PREFIX1@fftw_threads.h \ @FFTW_PREFIX1@rfftw_threads.h rfftw_threads_test_SOURCES = rfftw_threads_test.c rfftw_threads_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_threads.la \ lib@FFTW_PREFIX@fftw_threads.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @THREADLIBS@ subdir = threads mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) lib@FFTW_PREFIX@fftw_threads_la_LIBADD = am_lib@FFTW_PREFIX@fftw_threads_la_OBJECTS = executor_threads.lo \ fftw_threads.lo fftwnd_threads.lo fftw_f77_threads.lo lib@FFTW_PREFIX@fftw_threads_la_OBJECTS = \ $(am_lib@FFTW_PREFIX@fftw_threads_la_OBJECTS) lib@FFTW_PREFIX@rfftw_threads_la_LIBADD = am_lib@FFTW_PREFIX@rfftw_threads_la_OBJECTS = rexec_threads.lo \ rexec2_threads.lo rfftwnd_threads.lo rfftw_f77_threads.lo lib@FFTW_PREFIX@rfftw_threads_la_OBJECTS = \ $(am_lib@FFTW_PREFIX@rfftw_threads_la_OBJECTS) EXTRA_PROGRAMS = fftw_threads_test$(EXEEXT) rfftw_threads_test$(EXEEXT) noinst_PROGRAMS = @FFTW_THREADS_PROGLIST@ PROGRAMS = $(noinst_PROGRAMS) am_fftw_threads_test_OBJECTS = fftw_threads_test.$(OBJEXT) fftw_threads_test_OBJECTS = $(am_fftw_threads_test_OBJECTS) fftw_threads_test_DEPENDENCIES = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_threads.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la fftw_threads_test_LDFLAGS = am_rfftw_threads_test_OBJECTS = rfftw_threads_test.$(OBJEXT) rfftw_threads_test_OBJECTS = $(am_rfftw_threads_test_OBJECTS) rfftw_threads_test_DEPENDENCIES = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_threads.la \ lib@FFTW_PREFIX@fftw_threads.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la rfftw_threads_test_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/fftw -I$(top_builddir)/fftw depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/executor_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_f77_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_threads_test.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fftwnd_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rexec2_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rexec_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftw_f77_threads.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftw_threads_test.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftwnd_threads.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(lib@FFTW_PREFIX@fftw_threads_la_SOURCES) \ $(lib@FFTW_PREFIX@rfftw_threads_la_SOURCES) \ $(fftw_threads_test_SOURCES) $(rfftw_threads_test_SOURCES) HEADERS = $(include_HEADERS) DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in SOURCES = $(lib@FFTW_PREFIX@fftw_threads_la_SOURCES) $(lib@FFTW_PREFIX@rfftw_threads_la_SOURCES) $(fftw_threads_test_SOURCES) $(rfftw_threads_test_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu threads/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" = "$$p" && dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lib@FFTW_PREFIX@fftw_threads.la: $(lib@FFTW_PREFIX@fftw_threads_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_threads_la_DEPENDENCIES) $(LINK) $(lib@FFTW_PREFIX@fftw_threads_la_LDFLAGS) $(lib@FFTW_PREFIX@fftw_threads_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_threads_la_LIBADD) $(LIBS) lib@FFTW_PREFIX@rfftw_threads.la: $(lib@FFTW_PREFIX@rfftw_threads_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_threads_la_DEPENDENCIES) $(LINK) $(lib@FFTW_PREFIX@rfftw_threads_la_LDFLAGS) $(lib@FFTW_PREFIX@rfftw_threads_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_threads_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done fftw_threads_test$(EXEEXT): $(fftw_threads_test_OBJECTS) $(fftw_threads_test_DEPENDENCIES) @rm -f fftw_threads_test$(EXEEXT) $(LINK) $(fftw_threads_test_LDFLAGS) $(fftw_threads_test_OBJECTS) $(fftw_threads_test_LDADD) $(LIBS) rfftw_threads_test$(EXEEXT): $(rfftw_threads_test_OBJECTS) $(rfftw_threads_test_DEPENDENCIES) @rm -f rfftw_threads_test$(EXEEXT) $(LINK) $(rfftw_threads_test_LDFLAGS) $(rfftw_threads_test_OBJECTS) $(rfftw_threads_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/executor_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_f77_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_threads_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwnd_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rexec2_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rexec_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftw_f77_threads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftw_threads_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftwnd_threads.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: includeHEADERS_INSTALL = $(INSTALL_HEADER) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ rm -f $(DESTDIR)$(includedir)/$$f; \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-includeHEADERS \ install-info install-info-am install-libLTLIBRARIES install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES @FFTW_PREFIX1@fftw_threads.h: fftw_threads.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_threads.h > $@ @FFTW_PREFIX1@rfftw_threads.h: rfftw_threads.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_threads.h > $@ check: @FFTW_THREADS_PROGLIST@ @set fnord $(MAKEFLAGS); amf=$$2; \ list='@FFTW_THREADS_PROGLIST@'; for prog in $$list; do \ target="$$prog""-check"; \ echo "Making $$target"; \ ($(MAKE) $$target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" fftw_threads_test-check: fftw_threads_test ./fftw_threads_test 1 -x 100 -r 0 ./fftw_threads_test 2 -x 100 -r 0 ./fftw_threads_test 3 -x 100 -r 0 ./fftw_threads_test 10 -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " FFTW complex-complex threads transforms passed tests!" @echo "--------------------------------------------------------------" rfftw_threads_test-check: rfftw_threads_test ./rfftw_threads_test 1 -x 100 -r 0 ./rfftw_threads_test 2 -x 100 -r 0 ./rfftw_threads_test 3 -x 100 -r 0 ./rfftw_threads_test 10 -x 100 -r 0 @echo "--------------------------------------------------------------" @echo " RFFTW real-complex threads transforms passed tests!" @echo "--------------------------------------------------------------" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: fftw-2.1.5/threads/executor_threads.c0000644000175400001440000003262107635206027013327 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * executor_threads.c -- execute the fft in parallel using threads */ #include #include #include "fftw_threads-int.h" static void executor_simple_threads(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int nthreads); typedef struct { int m,r; const fftw_complex *in; fftw_complex *out; fftw_plan_node *p; int istride, ostride; int nthreads; } executor_simple_data; static void *executor_simple_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; executor_simple_data *d = (executor_simple_data *) loop_data->data; int m = d->m, r = d->r; const fftw_complex *in = d->in; fftw_complex *out = d->out; fftw_plan_node *p = d->p; int istride = d->istride, ostride = d->ostride; int nthreads = d->nthreads; for (; min < max; ++min) executor_simple_threads(m, in + min * istride, out + min * (m * ostride), p, istride * r, ostride, nthreads); return 0; } typedef struct { fftw_twiddle_codelet *codelet; int m, ntwiddle, ostride; fftw_complex *out, *W; } twiddle_thread_data; static void *twiddle_thread(fftw_loop_data *loop_data) { twiddle_thread_data *d = (twiddle_thread_data *) loop_data->data; HACK_ALIGN_STACK_EVEN; (d->codelet)(d->out + d->ostride * loop_data->min, d->W + d->ntwiddle * loop_data->min, d->m * d->ostride, loop_data->max - loop_data->min, d->ostride); return 0; } static void executor_simple_threads(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int nthreads) { switch (p->type) { case FFTW_NOTW: HACK_ALIGN_STACK_ODD; (p->nodeu.notw.codelet) (in, out, istride, ostride); break; case FFTW_TWIDDLE: { int r = p->nodeu.twiddle.size; int m = n / r; int i; if (nthreads <= 1) { fftw_twiddle_codelet *codelet; fftw_complex *W; for (i = 0; i < r; ++i) { fftw_executor_simple(m, in + i * istride, out + i * (m * ostride), p->nodeu.twiddle.recurse, istride * r, ostride, FFTW_NORMAL_RECURSE); } codelet = p->nodeu.twiddle.codelet; W = p->nodeu.twiddle.tw->twarray; HACK_ALIGN_STACK_EVEN; codelet(out, W, m * ostride, m, ostride); } else { { executor_simple_data d; d.m = m; d.r = r; d.in = in; d.out = out; d.p = p->nodeu.twiddle.recurse; d.istride = istride; d.ostride = ostride; d.nthreads = nthreads / r; fftw_thread_spawn_loop(r, nthreads, executor_simple_thread,&d); } { twiddle_thread_data d; d.codelet = p->nodeu.twiddle.codelet; d.m = m; d.ntwiddle = p->nodeu.twiddle.codelet_desc->ntwiddle; d.ostride = ostride; d.out = out; d.W = p->nodeu.twiddle.tw->twarray; fftw_thread_spawn_loop(m, nthreads, twiddle_thread, &d); } } break; } case FFTW_RADER: { int r = p->nodeu.twiddle.size; int m = n / r; int i; if (nthreads <= 1) { fftw_rader_codelet *codelet; fftw_complex *W; for (i = 0; i < r; ++i) { fftw_executor_simple(m, in + i * istride, out + i * (m * ostride), p->nodeu.rader.recurse, istride * r, ostride, FFTW_NORMAL_RECURSE); } codelet = p->nodeu.rader.codelet; W = p->nodeu.rader.tw->twarray; codelet(out, W, m, r, ostride, p->nodeu.rader.rader_data); } else { { executor_simple_data d; d.m = m; d.r = r; d.in = in; d.out = out; d.p = p->nodeu.rader.recurse; d.istride = istride; d.ostride = ostride; d.nthreads = nthreads / r; fftw_thread_spawn_loop(r, nthreads, executor_simple_thread,&d); } { fftw_rader_codelet *codelet; fftw_complex *W; codelet = p->nodeu.rader.codelet; W = p->nodeu.rader.tw->twarray; codelet(out, W, m, r, ostride, p->nodeu.rader.rader_data); } } break; } case FFTW_GENERIC: { int r = p->nodeu.generic.size; int m = n / r; int i; fftw_generic_codelet *codelet; fftw_complex *W; if (nthreads <= 1) for (i = 0; i < r; ++i) { fftw_executor_simple(m, in + i * istride, out + i * (m * ostride), p->nodeu.generic.recurse, istride * r, ostride, FFTW_NORMAL_RECURSE); } else { executor_simple_data d; d.m = m; d.r = r; d.in = in; d.out = out; d.p = p->nodeu.generic.recurse; d.istride = istride; d.ostride = ostride; d.nthreads = nthreads / r; fftw_thread_spawn_loop(r, nthreads, executor_simple_thread, &d); } codelet = p->nodeu.generic.codelet; W = p->nodeu.generic.tw->twarray; codelet(out, W, m, r, n, ostride); break; } default: fftw_die("BUG in executor: invalid plan\n"); break; } } static void executor_simple_inplace_threads(int n, fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int nthreads) { switch (p->type) { case FFTW_NOTW: HACK_ALIGN_STACK_ODD; (p->nodeu.notw.codelet) (in, in, istride, istride); break; default: { fftw_complex *tmp; if (out) tmp = out; else tmp = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); executor_simple_threads(n, in, tmp, p, istride, 1, nthreads); fftw_strided_copy(n, tmp, istride, in); if (!out) fftw_free(tmp); } } } typedef struct { union { fftw_notw_codelet *codelet; struct { int n; fftw_plan_node *p; } plan; } u; const fftw_complex *in; fftw_complex *out; int idist, odist, istride, ostride; } executor_many_data; static void *executor_many_codelet_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; executor_many_data *d = (executor_many_data *) loop_data->data; fftw_notw_codelet *codelet = d->u.codelet; const fftw_complex *in = d->in; fftw_complex *out = d->out; int idist = d->idist, odist = d->odist; int istride = d->istride, ostride = d->ostride; HACK_ALIGN_STACK_ODD; for (; min < max; ++min) codelet(in + min * idist, out + min * odist, istride, ostride); return 0; } static void *executor_many_simple_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; executor_many_data *d = (executor_many_data *) loop_data->data; int n = d->u.plan.n; fftw_plan_node *p = d->u.plan.p; const fftw_complex *in = d->in; fftw_complex *out = d->out; int idist = d->idist, odist = d->odist; int istride = d->istride, ostride = d->ostride; for (; min < max; ++min) fftw_executor_simple(n, in + min * idist, out + min * odist, p, istride, ostride, FFTW_NORMAL_RECURSE); return 0; } static void executor_many_threads(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist, int nthreads) { switch (p->type) { case FFTW_NOTW: { int s; if (nthreads <= 1) { fftw_notw_codelet *codelet = p->nodeu.notw.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, istride, ostride); } else { executor_many_data d; d.in = in; d.out = out; d.u.codelet = p->nodeu.notw.codelet; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; fftw_thread_spawn_loop(howmany, nthreads, executor_many_codelet_thread, &d); } break; } default: { int s; if (nthreads <= 1) for (s = 0; s < howmany; ++s) { fftw_executor_simple(n, in + s * idist, out + s * odist, p, istride, ostride, FFTW_NORMAL_RECURSE); } else { executor_many_data d; d.in = in; d.out = out; d.u.plan.n = n; d.u.plan.p = p; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; fftw_thread_spawn_loop(howmany, nthreads, executor_many_simple_thread, &d); } } } } typedef struct { union { fftw_notw_codelet *codelet; struct { int n; fftw_plan_node *p; fftw_complex *tmp; } plan; } u; fftw_complex *in; int idist, istride; } executor_many_inplace_data; static void *executor_many_inplace_codelet_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; executor_many_inplace_data *d = (executor_many_inplace_data *) loop_data->data; fftw_notw_codelet *codelet = d->u.codelet; fftw_complex *in = d->in; int idist = d->idist, istride = d->istride; HACK_ALIGN_STACK_ODD; for (; min < max; ++min) codelet(in + min * idist, in + min * idist, istride, istride); return 0; } static void *executor_many_inplace_simple_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; executor_many_inplace_data *d = (executor_many_inplace_data *) loop_data->data; int n = d->u.plan.n; fftw_plan_node *p = d->u.plan.p; fftw_complex *tmp = d->u.plan.tmp + n * loop_data->thread_num; fftw_complex *in = d->in; int idist = d->idist, istride = d->istride; for (; min < max; ++min) { fftw_executor_simple(n, in + min * idist, tmp, p, istride, 1, FFTW_NORMAL_RECURSE); fftw_strided_copy(n, tmp, istride, in + min * idist); } return 0; } void fftw_executor_many_inplace_threads(int n, fftw_complex *in, fftw_complex *work, fftw_plan_node *p, int istride, int howmany, int idist, int nthreads) { switch (p->type) { case FFTW_NOTW: { int s; if (nthreads <= 1) { fftw_notw_codelet *codelet = p->nodeu.notw.codelet; HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + s * idist, istride, istride); } else { executor_many_inplace_data d; d.in = in; d.u.codelet = p->nodeu.notw.codelet; d.istride = istride; d.idist = idist; fftw_thread_spawn_loop(howmany, nthreads, executor_many_inplace_codelet_thread, &d); } break; } default: { int s; fftw_complex *tmp; if (nthreads <= 1) { if (work) tmp = work; else tmp = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); for (s = 0; s < howmany; ++s) { fftw_executor_simple(n, in + s * idist, tmp, p, istride, 1, FFTW_NORMAL_RECURSE); fftw_strided_copy(n, tmp, istride, in + s * idist); } } else { executor_many_inplace_data d; if (work) tmp = work; else tmp = (fftw_complex *) fftw_malloc((nthreads > howmany ? howmany : nthreads) * n * sizeof(fftw_complex)); d.in = in; d.u.plan.n = n; d.u.plan.p = p; d.u.plan.tmp = tmp; d.istride = istride; d.idist = idist; fftw_thread_spawn_loop(howmany, nthreads, executor_many_inplace_simple_thread, &d); } if (!work) fftw_free(tmp); } } } /* user interface */ void fftw_threads(int nthreads, fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) { if (howmany == 1) { executor_simple_inplace_threads(n, in, out, plan->root, istride, nthreads); } else { fftw_executor_many_inplace_threads(n, in, NULL, plan->root, istride, howmany, idist, nthreads); } } else { if (howmany == 1) { executor_simple_threads(n, in, out, plan->root, istride, ostride, nthreads); } else { executor_many_threads(n, in, out, plan->root, istride, ostride, howmany, idist, odist, nthreads); } } } void fftw_threads_one(int nthreads, fftw_plan plan, fftw_complex *in, fftw_complex *out) { if (plan->flags & FFTW_IN_PLACE) executor_simple_inplace_threads(plan->n, in, out, plan->root, 1, nthreads); else executor_simple_threads(plan->n, in, out, plan->root, 1, 1, nthreads); } fftw-2.1.5/threads/fftw_threads.c0000644000175400001440000001321707635206027012437 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* Note: this header file *must* be the first thing in this file, due to AIX alloca lossage. */ #include "fftw_threads-int.h" /* Distribute a loop from 0 to loopmax-1 over nthreads threads. proc(d) is called to execute a block of iterations from d->min to d->max-1. d->thread_num indicate the number of the thread that is executing proc (from 0 to nthreads-1), and d->data is the same as the data parameter passed to fftw_thread_spawn_loop. This function returns only when all the threads have completed. */ void fftw_thread_spawn_loop(int loopmax, int nthreads, fftw_loop_function proc, void *data) { int block_size; if (!nthreads) nthreads = 1; /* Choose the block size and number of threads in order to (1) minimize the critical path and (2) use the fewest threads that achieve the same critical path (to minimize overhead). e.g. if loopmax is 5 and nthreads is 4, we should use only 3 threads with block sizes of 2, 2, and 1. */ block_size = (loopmax + nthreads - 1) / nthreads; nthreads = (loopmax + block_size - 1) / block_size; if (nthreads <= 1) { fftw_loop_data d; d.min = 0; d.max = loopmax; d.thread_num = 0; d.data = data; proc(&d); } else { #ifdef FFTW_USING_COMPILER_THREADS fftw_loop_data d; #else fftw_loop_data *d; fftw_thread_id *tid; #endif int i; #ifdef FFTW_USING_COMPILER_THREADS #if defined(FFTW_USING_SGIMP_THREADS) #pragma parallel local(d,i) { #pragma pfor iterate(i=0; nthreads; 1) #elif defined(FFTW_USING_OPENMP_THREADS) #pragma omp parallel for private(d) #endif for (i = 0; i < nthreads; ++i) { d.max = (d.min = i * block_size) + block_size; if (d.max > loopmax) d.max = loopmax; d.thread_num = i; d.data = data; proc(&d); } #if defined(FFTW_USING_SGIMP_THREADS) } #endif #else /* ! FFTW_USING_COMPILER_THREADS, i.e. explicit thread spawning: */ d = (fftw_loop_data *) ALLOCA(sizeof(fftw_loop_data) * nthreads); tid = (fftw_thread_id *) ALLOCA(sizeof(fftw_thread_id) * (--nthreads)); for (i = 0; i < nthreads; ++i) { d[i].max = (d[i].min = i * block_size) + block_size; d[i].thread_num = i; d[i].data = data; fftw_thread_spawn(&tid[i], (fftw_thread_function) proc, (void *) &d[i]); } d[i].min = i * block_size; d[i].max = loopmax; d[i].thread_num = i; d[i].data = data; proc(&d[i]); for (i = 0; i < nthreads; ++i) fftw_thread_wait(tid[i]); ALLOCA_CLEANUP(tid); ALLOCA_CLEANUP(d); #endif /* ! FFTW_USING_COMPILER_THREADS */ } } #ifdef FFTW_USING_POSIX_THREADS static pthread_attr_t fftw_pthread_attributes; /* attrs for POSIX threads */ pthread_attr_t *fftw_pthread_attributes_p = NULL; #endif /* FFTW_USING_POSIX_THREADS */ /* fftw_threads_init does any initialization that is necessary to use threads. It must be called before calling fftw_threads or fftwnd_threads. Returns 0 if successful, and non-zero if there is an error. Do not call any fftw_threads routines if fftw_threads_init is not successful! */ int fftw_threads_init(void) { #ifdef FFTW_USING_POSIX_THREADS /* Set the thread creation attributes as necessary. If we don't change anything, just use the default attributes (NULL). */ int err, attr, attr_changed = 0; err = pthread_attr_init(&fftw_pthread_attributes); /* set to defaults */ if (err) return err; /* Make sure that threads are joinable! (they aren't on AIX) */ err = pthread_attr_getdetachstate(&fftw_pthread_attributes, &attr); if (err) return err; if (attr != PTHREAD_CREATE_JOINABLE) { err = pthread_attr_setdetachstate(&fftw_pthread_attributes, PTHREAD_CREATE_JOINABLE); if (err) return err; attr_changed = 1; } /* Make sure threads parallelize (they don't by default on Solaris) */ err = pthread_attr_getscope(&fftw_pthread_attributes, &attr); if (err) return err; if (attr != PTHREAD_SCOPE_SYSTEM) { err = pthread_attr_setscope(&fftw_pthread_attributes, PTHREAD_SCOPE_SYSTEM); if (err) return err; attr_changed = 1; } if (attr_changed) /* we aren't using the defaults */ fftw_pthread_attributes_p = &fftw_pthread_attributes; else { fftw_pthread_attributes_p = NULL; /* use default attributes */ err = pthread_attr_destroy(&fftw_pthread_attributes); if (err) return err; } #endif /* FFTW_USING_POSIX_THREADS */ #ifdef FFTW_USING_MACOS_THREADS /* Must use MPAllocate and MPFree instead of malloc and free: */ if (MPLibraryIsLoaded()) { fftw_malloc_hook = MPAllocate; fftw_free_hook = MPFree; } #endif /* FFTW_USING_MACOS_THREADS */ #if defined(FFTW_USING_OPENMP_THREADS) && ! defined(_OPENMP) #error OpenMP enabled but not using an OpenMP compiler #endif return 0; /* no error */ } fftw-2.1.5/threads/fftwnd_threads.c0000644000175400001440000001056307635206027012762 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include "fftw_threads-int.h" #include "fftw_threads.h" typedef struct { fftwnd_plan plan; int cur_dim; int distance; fftw_complex *in, *out; int istride, ostride; fftw_complex *work; } fftwnd_aux_many_data; static void *fftwnd_aux_many_thread(fftw_loop_data *loop_data) { int min = loop_data->min, max = loop_data->max; fftwnd_aux_many_data *d = (fftwnd_aux_many_data *) loop_data->data; int distance = d->distance, cur_dim = d->cur_dim; fftwnd_plan plan = d->plan; fftw_complex *in = d->in, *out = d->out; int istride = d->istride, ostride = d->ostride; fftw_complex *work = d->work + loop_data->thread_num * plan->nwork; for (; min < max; ++min) fftwnd_aux(plan,cur_dim, in + min*istride*distance,istride, out + min*ostride*distance,ostride, work); return 0; } static void fftwnd_aux_many_threads(int nthreads, int n, int n_after, fftwnd_plan plan, int cur_dim, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_complex *tmp; fftwnd_aux_many_data d; if (nthreads > n) nthreads = n; tmp = (fftw_complex *) fftw_malloc(nthreads * plan->nwork * sizeof(fftw_complex)); d.plan = plan; d.cur_dim = cur_dim; d.distance = n_after; d.in = in; d.out = out; d.istride = istride; d.ostride = ostride; d.work = tmp; fftw_thread_spawn_loop(n, nthreads, fftwnd_aux_many_thread, &d); fftw_free(tmp); } static void fftwnd_threads_aux(int nthreads, fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_complex *out, int ostride) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) fftw_threads(nthreads, p->plans[p->rank - 1], n, in, istride, n_after * istride, (fftw_complex*)NULL, 0, 0); else fftw_threads(nthreads, p->plans[p->rank - 1], n, in, istride, n_after * istride, out, ostride, n_after * ostride); } else { /* we have at least two dimensions to go */ /* process the subsequent dimensions recursively, in hyperslabs, to get maximum locality: */ fftwnd_aux_many_threads(nthreads, n, n_after, p, cur_dim + 1, in, istride, out, ostride); } /* do the current dimension (in-place): */ fftw_threads(nthreads, p->plans[cur_dim], n_after, out, n_after * ostride, ostride, (fftw_complex*)NULL, 0, 0); } void fftwnd_threads(int nthreads, fftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { switch (p->rank) { case 0: break; case 1: if (p->is_in_place) /* fft is in-place */ fftw_threads(nthreads, p->plans[0], howmany, in, istride, idist, (fftw_complex*) NULL, 0, 0); else fftw_threads(nthreads, p->plans[0], howmany, in, istride, idist, out, ostride, odist); break; default: /* rank >= 2 */ { int i; if (p->is_in_place) { out = in; ostride = istride; odist = idist; } if (nthreads <= 1) fftwnd(p, howmany, in, istride, idist, out, ostride, odist); else for (i = 0; i < howmany; ++i) fftwnd_threads_aux(nthreads, p, 0, in + i*idist, istride, out + i*odist, ostride); } } } void fftwnd_threads_one(int nthreads, fftwnd_plan p, fftw_complex *in, fftw_complex *out) { fftwnd_threads(nthreads, p, 1, in, 1, 0, out, 1, 0); } fftw-2.1.5/threads/fftw_f77_threads.c0000644000175400001440000000444307635543240013124 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw_threads.h" #include "config.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ void F77_FUNC_(fftw_f77_threads_init,FFTW_F77_THREADS_INIT) (int *ierr) { *ierr = fftw_threads_init(); } void F77_FUNC_(fftw_f77_threads,FFTW_F77_THREADS) (int *nthreads, fftw_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { fftw_threads(*nthreads,*p, *howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(fftw_f77_threads_one,FFTW_F77_THREADS_ONE) (int *nthreads, fftw_plan *p, fftw_complex *in, fftw_complex *out) { fftw_threads_one(*nthreads,*p,in,out); } void F77_FUNC_(fftwnd_f77_threads,FFTWND_F77_THREADS) (int *nthreads, fftwnd_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { fftwnd_threads(*nthreads,*p, *howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(fftwnd_f77_threads_one,FFTWND_F77_THREADS_ONE) (int *nthreads, fftwnd_plan *p, fftw_complex *in, fftw_complex *out) { fftwnd_threads_one(*nthreads,*p,in,out); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ fftw-2.1.5/threads/fftw_threads.h0000644000175400001440000000322607635206027012443 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef FFTW_THREADS_H #define FFTW_THREADS_H #include "fftw.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /******************** User Interface *********************/ extern void fftw_threads(int nthreads, fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftwnd_threads(int nthreads, fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void fftw_threads_one(int nthreads, fftw_plan plan, fftw_complex *in, fftw_complex *out); extern void fftwnd_threads_one(int nthreads, fftwnd_plan plan, fftw_complex *in, fftw_complex *out); extern int fftw_threads_init(void); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_THREADS_H */ fftw-2.1.5/threads/fftw_threads-int.h0000644000175400001440000002434207635206027013235 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef FFTW_THREADS_INT_H #define FFTW_THREADS_INT_H /***** alloca declarations, as recommended by the autoconf manual: *****/ /* We have to include config.h here for the alloca stuff, which (due to AIX lossage) must be the first thing in the file) */ #include "config.h" /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ # ifdef __cplusplus extern "C" # endif /* __cplusplus */ char *alloca (); # endif # endif # endif #endif /***********************************************************************/ #include "fftw-int.h" #include "fftw_threads.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************* Thread Glue *************************/ /* Adding support for a new shared memory thread API should be easy. You simply do the following things (look at the POSIX and Solaris threads code for examples): * Invent a symbol of the form FFTW_USING_FOO_THREADS to denote the use of your thread API, and add an #elif defined(FFTW_USING_FOO_THREADS) before the #else clause below. This is where you will put your thread definitions. In this #elif, insert the following: -- #include any header files needed to use the thread API. -- Typedef fftw_thread_function to be a function pointer of the type used as a argument to fftw_thread_spawn (i.e. the entry function for a thread). -- Define fftw_thread_id, via a typedef, to be the type that is used for thread identifiers. -- #define fftw_thread_spawn(tid_ptr, proc, data) to call whatever function to spawn a new thread. The new thread should call proc(data) as its starting point, and tid_ptr is a pointer to a fftw_thread_id that is set to an identifier for the thread. You can also define this as a subroutine (put it in fftw_threads.c) if it is too complicated for a macro. The prototype should be: void fftw_thread_spawn(fftw_thread_id *tid_ptr, fftw_thread_function proc, void *data); -- #define fftw_thread_wait(tid) to block until the thread whose identifier is tid has terminated. You can also define this as a subroutine (put it in fftw_threads.c) if it is too complicated for a macro. The prototype should be: void fftw_thread_wait(fftw_thread_id tid); * If you need to perform any initialization before using threads, put your initialization code in the fftw_threads_init() function in fftw_threads.c, bracketed by the appropriate #ifdef of course. * Also, of course, you should modify fftw/config.h to #define FFTW_USING_FOO_THREADS, or better yet modify config.h.in and configure.in so that autoconf can automatically detect your threads library. * Finally, if you do implement support for a new threads API, be sure to let us know at fftw@fftw.org so that we can distribute your code to others! */ /************************** Solaris Threads ****************************/ #if defined(FFTW_USING_SOLARIS_THREADS) /* Solaris threads glue. Tested. */ /* link with -lthread */ #include /* Thread entry point: */ typedef void * (*fftw_thread_function) (void *); typedef thread_t fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) \ thr_create(0,0,proc,data,THR_BOUND,tid_ptr) #define fftw_thread_wait(tid) thr_join(tid,0,0) /************************** BeOS Threads ****************************/ #elif defined(FFTW_USING_BEOS_THREADS) /* BeOS threads glue. Tested for DR8.2. */ #include /* Thread entry point: */ typedef thread_entry fftw_thread_function; typedef thread_id fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) { \ *(tid_ptr) = spawn_thread(proc,"FFTW",B_NORMAL_PRIORITY,data); \ resume_thread(*(tid_ptr)); \ } /* wait_for_thread requires that we pass a valid pointer as the second argument, even if we're not interested in the result. */ #define fftw_thread_wait(tid) {long exit_val;wait_for_thread(tid, &exit_val);} /************************** MacOS Threads ****************************/ #elif defined(FFTW_USING_MACOS_THREADS) /* MacOS MP threads glue. Experimental, untested! I do not have an MP MacOS system available to me...I just read the documentation. There is actually a good chance that this will work (since the code below is so short), but I make no guarantees. Consider it to be a starting point for your own implementation. I also had to insert some code in fftw_threads.c. MacOS X will have real SMP support, thank goodness. */ /* Using this code in the MacOS: (See the README file for general documenation on the FFTW threads code.) To use this code, you have to do two things. First of all, you have to #define the symbol FFTW_USING_MACOS_THREADS. This can be done at the top of this file or perhaps in your compiler options. Second, you have to weak-link your project to the MP library. In your code, you should check at run-time with MPLibraryIsLoaded() to see if the MP library is available. If it is not, it is still safe to call the fftw_threads routines...in this case, however, you must always pass 1 for the nthreads parameter! (Otherwise, you will probably want to pass the value of MPProcessors() for the nthreads parameter.) */ #include typedef TaskProc fftw_thread_function; typedef MPQueueID fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) { \ MPTaskID task; \ MPCreateQueue(tid_ptr); \ MPCreateTask(proc,data,kMPUseDefaultStackSize,*(tid_ptr),0,0, \ kMPNormalTaskOptions,&task); \ } #define fftw_thread_wait(tid) { \ void *param1,*param2,*param3; \ MPWaitOnQueue(tid,¶m1,¶m2,¶m3,kDurationForever); \ MPDeleteQueue(tid); \ } /************************** Win32 Threads ****************************/ #elif defined(FFTW_USING_WIN32_THREADS) /* Win32 threads glue. We have not tested this code! (I just implemented it by looking at a Win32 threads manual.) Users have reported that this code works under NT using Microsoft compilers. To use it, you should #define the symbol FFTW_USING_WIN32_THREADS. */ #include typedef LPTHREAD_START_ROUTINE fftw_thread_function; typedef HANDLE fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) { \ DWORD thrid; \ *(tid_ptr) = CreateThread((LPSECURITY_ATTRIBUTES) NULL, 0, \ (fftw_thread_function) proc, (LPVOID) data, \ 0, &thrid); \ } #define fftw_thread_wait(tid) { \ WaitForSingleObject(tid, INFINITE); \ CloseHandle(tid); \ } /************************** Mach cthreads ****************************/ #elif defined(FFTW_USING_MACH_THREADS) #ifdef HAVE_MACH_CTHREADS_H #include #elif defined(HAVE_CTHREADS_H) #include #elif defined(HAVE_CTHREAD_H) #include #endif typedef cthread_fn_t fftw_thread_function; typedef cthread_t fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) \ *(tid_ptr) = cthread_fork(proc, (any_t) (data)) #define fftw_thread_wait(tid) cthread_join(tid) /************************** MP directive Threads ****************************/ #elif defined(FFTW_USING_OPENMP_THREADS) || defined(FFTW_USING_SGIMP_THREADS) /* Use MP compiler directives to induce parallelism, in which case we don't need any of the thread spawning/waiting macros: */ typedef void * (*fftw_thread_function) (void *); typedef char fftw_thread_id; /* dummy */ #define fftw_thread_spawn(tid_ptr, proc, data) ((proc)(data)) #define fftw_thread_wait(tid) (0) /* do nothing */ #define FFTW_USING_COMPILER_THREADS 1 /************************** POSIX Threads ****************************/ #else /* use the default, POSIX threads: */ /* POSIX threads glue. Tested. */ #ifndef FFTW_USING_POSIX_THREADS #define FFTW_USING_POSIX_THREADS #endif /* link with -lpthread */ #include /* Thread entry point: */ typedef void * (*fftw_thread_function) (void *); extern pthread_attr_t *fftw_pthread_attributes_p; typedef pthread_t fftw_thread_id; #define fftw_thread_spawn(tid_ptr, proc, data) { \ if (pthread_create(tid_ptr,fftw_pthread_attributes_p,proc,data)) \ fftw_die("error in pthread_create"); \ } #define fftw_thread_wait(tid) { \ if (pthread_join(tid,0)) \ fftw_die("error in pthread_join"); \ } #endif /************************ Function prototypes ***********************/ /* Use alloca instead of malloc, if possible, in the hope that alloca will be faster at allocating the small blocks we need. (In principle, alloca just needs to increment the stack pointer.) */ #ifdef HAVE_ALLOCA # define ALLOCA(n) alloca(n) # define ALLOCA_CLEANUP(p) ; #else # define ALLOCA(n) fftw_malloc(n) # define ALLOCA_CLEANUP(p) fftw_free(p); #endif typedef struct { int min, max, thread_num; void *data; } fftw_loop_data; typedef void *(*fftw_loop_function) (fftw_loop_data *); extern void fftw_thread_spawn_loop(int loopmax, int nthreads, fftw_loop_function proc, void *data); extern void fftw_executor_many_inplace_threads(int n, fftw_complex *in, fftw_complex *work, fftw_plan_node *p, int istride, int howmany, int idist, int nthreads); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_THREADS_INT_H */ fftw-2.1.5/threads/rexec_threads.c0000644000175400001440000003763707635206027012613 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * rexec_threads.c -- execute the fft in parallel */ #include #include #include "fftw_threads-int.h" #include "rfftw_threads.h" extern void rfftw_strided_copy(int n, fftw_real *in, int ostride, fftw_real *out); static void rexec_simple_threads(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int nthreads); typedef struct { int m,r; fftw_real *in; fftw_real *out; fftw_plan_node *p; int istride, ostride; int nthreads; } rexec_simple_data; static void *rexec_simple_thread_r2c(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_simple_data *d = (rexec_simple_data *) ldata->data; int m = d->m, r = d->r; fftw_real *in = d->in; fftw_real *out = d->out; fftw_plan_node *p = d->p; int istride = d->istride, ostride = d->ostride; int nthreads = d->nthreads; for (; min < max; ++min) rexec_simple_threads(m, in + min * istride, out + min * (m * ostride), p, istride * r, ostride, nthreads); return 0; } static void *rexec_simple_thread_c2r(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_simple_data *d = (rexec_simple_data *) ldata->data; int m = d->m, r = d->r; fftw_real *in = d->in; fftw_real *out = d->out; fftw_plan_node *p = d->p; int istride = d->istride, ostride = d->ostride; int nthreads = d->nthreads; for (; min < max; ++min) rexec_simple_threads(m, in + min * (m * istride), out + min * ostride, p, istride, ostride * r, nthreads); return 0; } static void spawn_h2hc_recurse_threads(int m, int r, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int nthreads) { rexec_simple_data d; d.m = m; d.r = r; d.in = in; d.out = out; d.p = p->nodeu.hc2hc.recurse; d.istride = istride; d.ostride = ostride; d.nthreads = nthreads / r; switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: fftw_thread_spawn_loop(r, nthreads, rexec_simple_thread_r2c, &d); break; case FFTW_COMPLEX_TO_REAL: fftw_thread_spawn_loop(r, nthreads, rexec_simple_thread_c2r, &d); break; } } static void rexec_simple_threads(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int nthreads) { switch (p->type) { case FFTW_REAL2HC: HACK_ALIGN_STACK_ODD; (p->nodeu.real2hc.codelet) (in, out, out + n * ostride, istride, ostride, -ostride); break; case FFTW_HC2REAL: HACK_ALIGN_STACK_ODD; (p->nodeu.hc2real.codelet) (in, in + n * istride, out, istride, -istride, ostride); break; case FFTW_HC2HC: { int r = p->nodeu.hc2hc.size; int m = n / r; int i; fftw_hc2hc_codelet *codelet; fftw_complex *W; if (nthreads <= 1) { switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: for (i = 0; i < r; ++i) rfftw_executor_simple(m, in + i * istride, out + i * (m * ostride), p->nodeu.hc2hc.recurse, istride * r, ostride, FFTW_NORMAL_RECURSE); W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(out, W, m * ostride, m, ostride); break; case FFTW_COMPLEX_TO_REAL: W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(in, W, m * istride, m, istride); for (i = 0; i < r; ++i) rfftw_executor_simple(m, in + i * (m * istride), out + i * ostride, p->nodeu.hc2hc.recurse, istride, ostride * r, FFTW_NORMAL_RECURSE); break; default: goto bug; } } else switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: spawn_h2hc_recurse_threads(m, r, in, out, p, istride, ostride, nthreads); W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(out, W, m * ostride, m, ostride); break; case FFTW_COMPLEX_TO_REAL: W = p->nodeu.hc2hc.tw->twarray; codelet = p->nodeu.hc2hc.codelet; HACK_ALIGN_STACK_EVEN; codelet(in, W, m * istride, m, istride); spawn_h2hc_recurse_threads(m, r, in, out, p, istride, ostride, nthreads); break; } break; } case FFTW_RGENERIC: { int r = p->nodeu.rgeneric.size; int m = n / r; int i; fftw_rgeneric_codelet *codelet = p->nodeu.rgeneric.codelet; fftw_complex *W = p->nodeu.rgeneric.tw->twarray; if (nthreads <= 1) switch (p->nodeu.rgeneric.dir) { case FFTW_REAL_TO_COMPLEX: for (i = 0; i < r; ++i) rfftw_executor_simple(m, in + i * istride, out + i * (m * ostride), p->nodeu.rgeneric.recurse, istride * r, ostride, FFTW_NORMAL_RECURSE); codelet(out, W, m, r, n, ostride); break; case FFTW_COMPLEX_TO_REAL: codelet(in, W, m, r, n, istride); for (i = 0; i < r; ++i) rfftw_executor_simple(m, in + i * m * istride, out + i * ostride, p->nodeu.rgeneric.recurse, istride, ostride * r, FFTW_NORMAL_RECURSE); break; default: goto bug; } else switch (p->nodeu.hc2hc.dir) { case FFTW_REAL_TO_COMPLEX: spawn_h2hc_recurse_threads(m, r, in, out, p, istride, ostride, nthreads); codelet(out, W, m, r, n, ostride); break; case FFTW_COMPLEX_TO_REAL: codelet(in, W, m, r, n, istride); spawn_h2hc_recurse_threads(m, r, in, out, p, istride, ostride, nthreads); break; } break; } default: bug: fftw_die("BUG in rexecutor: invalid plan\n"); break; } } static void rexecutor_simple_inplace_threads(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int nthreads) { switch (p->type) { case FFTW_REAL2HC: HACK_ALIGN_STACK_ODD; (p->nodeu.real2hc.codelet) (in, in, in + n * istride, istride, istride, -istride); break; case FFTW_HC2REAL: HACK_ALIGN_STACK_ODD; (p->nodeu.hc2real.codelet) (in, in + n * istride, in, istride, -istride, istride); break; default: { fftw_real *tmp; if (out) tmp = out; else tmp = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); rexec_simple_threads(n, in, tmp, p, istride, 1, nthreads); rfftw_strided_copy(n, tmp, istride, in); if (!out) fftw_free(tmp); } } } typedef struct { union { fftw_real2hc_codelet *r2c_codelet; fftw_hc2real_codelet *c2r_codelet; fftw_plan_node *p; } u; int n; fftw_real *in; fftw_real *out; int idist, odist, istride, ostride; } rexec_many_data; static void *rexec_many_r2c_codelet_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_many_data *d = (rexec_many_data *) ldata->data; fftw_real2hc_codelet *r2c_codelet = d->u.r2c_codelet; int n = d->n; fftw_real *in = d->in; fftw_real *out = d->out; int idist = d->idist, odist = d->odist; int istride = d->istride, ostride = d->ostride; HACK_ALIGN_STACK_ODD; for (; min < max; ++min) r2c_codelet(in + min * idist, out + min * odist, out + n * ostride + min * odist, istride, ostride, -ostride); return 0; } static void *rexec_many_c2r_codelet_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_many_data *d = (rexec_many_data *) ldata->data; fftw_hc2real_codelet *c2r_codelet = d->u.c2r_codelet; int n = d->n; fftw_real *in = d->in; fftw_real *out = d->out; int idist = d->idist, odist = d->odist; int istride = d->istride, ostride = d->ostride; HACK_ALIGN_STACK_ODD; for (; min < max; ++min) c2r_codelet(in + min * idist, in + n * istride + min * idist, out + min * odist, istride, -istride, ostride); return 0; } static void *rexec_many_simple_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_many_data *d = (rexec_many_data *) ldata->data; fftw_plan_node *p = d->u.p; int n = d->n; fftw_real *in = d->in; fftw_real *out = d->out; int idist = d->idist, odist = d->odist; int istride = d->istride, ostride = d->ostride; for (; min < max; ++min) rfftw_executor_simple(n, in + min * idist, out + min * odist, p, istride, ostride, FFTW_NORMAL_RECURSE); return 0; } static void rexecutor_many_threads(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist, int nthreads) { if (nthreads > howmany) nthreads = howmany; switch (p->type) { case FFTW_REAL2HC: { int s; fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; if (nthreads <= 1) { HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, out + s * odist, out + n * ostride + s * odist, istride, ostride, -ostride); } else { rexec_many_data d; d.n = n; d.in = in; d.out = out; d.u.r2c_codelet = codelet; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_r2c_codelet_thread, &d); } break; } case FFTW_HC2REAL: { int s; fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; if (nthreads <= 1) { HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + n * istride + s * idist, out + s * odist, istride, -istride, ostride); } else { rexec_many_data d; d.n = n; d.in = in; d.out = out; d.u.c2r_codelet = codelet; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_c2r_codelet_thread, &d); } break; } default: { int s; if (nthreads <= 1) for (s = 0; s < howmany; ++s) { rfftw_executor_simple(n, in + s * idist, out + s * odist, p, istride, ostride, FFTW_NORMAL_RECURSE); } else { rexec_many_data d; d.in = in; d.out = out; d.n = n; d.u.p = p; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_simple_thread, &d); } } } } static void *rexec_many_simple_inplace_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; rexec_many_data *d = (rexec_many_data *) ldata->data; fftw_plan_node *p = d->u.p; int n = d->n; fftw_real *in = d->in; fftw_real *out = d->out + n * ldata->thread_num; int idist = d->idist; int istride = d->istride; for (; min < max; ++min) { rfftw_executor_simple(n, in + min * idist, out, p, istride, 1, FFTW_NORMAL_RECURSE); rfftw_strided_copy(n, out, istride, in + min * idist); } return 0; } static void rexecutor_many_inplace_threads(int n, fftw_real *in, fftw_real *out, fftw_plan_node *p, int istride, int howmany, int idist, int nthreads) { switch (p->type) { case FFTW_REAL2HC: { int s; fftw_real2hc_codelet *codelet = p->nodeu.real2hc.codelet; if (nthreads <= 1) { HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + s * idist, in + n * istride + s * idist, istride, istride, -istride); } else { rexec_many_data d; d.n = n; d.in = in; d.out = in; d.u.r2c_codelet = codelet; d.istride = istride; d.ostride = istride; d.idist = idist; d.odist = idist; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_r2c_codelet_thread, &d); } break; } case FFTW_HC2REAL: { int s; fftw_hc2real_codelet *codelet = p->nodeu.hc2real.codelet; if (nthreads <= 1) { HACK_ALIGN_STACK_ODD; for (s = 0; s < howmany; ++s) codelet(in + s * idist, in + n * istride + s * idist, in + s * idist, istride, -istride, istride); } else { rexec_many_data d; d.n = n; d.in = in; d.out = in; d.u.c2r_codelet = codelet; d.istride = istride; d.ostride = istride; d.idist = idist; d.odist = idist; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_c2r_codelet_thread, &d); } break; } default: { int s; fftw_real *tmp; if (nthreads > howmany) nthreads = howmany; if (nthreads <= 1) { if (out) tmp = out; else tmp =(fftw_real *) fftw_malloc(n * sizeof(fftw_real)); for (s = 0; s < howmany; ++s) { rfftw_executor_simple(n, in + s * idist, tmp, p, istride, 1, FFTW_NORMAL_RECURSE); rfftw_strided_copy(n, tmp, istride, in + s * idist); } if (!out) fftw_free(tmp); } else { rexec_many_data d; tmp = (fftw_real *) fftw_malloc(nthreads * n * sizeof(fftw_real)); d.in = in; d.out = tmp; d.n = n; d.u.p = p; d.istride = istride; d.ostride = 1; d.idist = idist; d.odist = 0; fftw_thread_spawn_loop(howmany, nthreads, rexec_many_simple_inplace_thread,&d); fftw_free(tmp); } } } } /* user interface */ void rfftw_threads(int nthreads, fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) { if (howmany == 1) { rexecutor_simple_inplace_threads(n, in, out, plan->root, istride, nthreads); } else { rexecutor_many_inplace_threads(n, in, out, plan->root, istride, howmany, idist, nthreads); } } else { if (howmany == 1) { rexec_simple_threads(n, in, out, plan->root, istride, ostride, nthreads); } else { rexecutor_many_threads(n, in, out, plan->root, istride, ostride, howmany, idist, odist, nthreads); } } } void rfftw_threads_one(int nthreads, fftw_plan plan, fftw_real *in, fftw_real *out) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) rexecutor_simple_inplace_threads(n, in, out, plan->root, 1, nthreads); else rexec_simple_threads(n, in, out, plan->root, 1, 1, nthreads); } fftw-2.1.5/threads/rexec2_threads.c0000644000175400001440000001470707635206027012666 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw_threads-int.h" #include "rfftw_threads.h" /********************** prototypes for rexec2 routines **********************/ extern void rfftw_hc2c(int n, fftw_real *in, fftw_complex *out, int ostride); extern void rfftw_c2hc(int n, fftw_complex *in, int istride, fftw_real *out); extern void rfftw_real2c_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); extern void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); /***************************************************************************/ typedef struct { fftw_plan plan; void *in; int istride, idist; void *out; int ostride, odist; fftw_real *work; } rexec2_thread_data; static void *real2c_aux_thread(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; rfftw_real2c_aux(d->plan, ldata->max - ldata->min, ldata->min * d->idist + (fftw_real *) d->in, d->istride, d->idist, ldata->min * d->odist + (fftw_complex *) d->out, d->ostride, d->odist, d->work + d->plan->n * ldata->thread_num); return 0; } static void *c2real_aux_thread(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; rfftw_c2real_aux(d->plan, ldata->max - ldata->min, ldata->min * d->idist + (fftw_complex *) d->in, d->istride, d->idist, ldata->min * d->odist + (fftw_real *) d->out, d->ostride, d->odist, d->work + d->plan->n * ldata->thread_num); return 0; } static void *real2c_overlap_aux_thread1(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; int n = d->plan->n; rfftw(d->plan, ldata->max - ldata->min, ldata->min * d->idist + (fftw_real *) d->in, d->istride, d->idist, d->work + n * ldata->min, 1, n); return 0; } static void *real2c_overlap_aux_thread2(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; int min = ldata->min, max = ldata->max; int n = d->plan->n; fftw_complex *out = (fftw_complex *) d->out; int ostride = d->ostride, odist = d->odist; fftw_real *work = d->work; for (; min < max; ++min) rfftw_hc2c(n, work + min*n, out + min*odist, ostride); return 0; } static void *c2real_overlap_aux_thread2(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; int n = d->plan->n; rfftw(d->plan, ldata->max - ldata->min, d->work + n * ldata->min, 1, n, ldata->min * d->odist + (fftw_real *) d->out, d->ostride, d->odist); return 0; } static void *c2real_overlap_aux_thread1(fftw_loop_data *ldata) { rexec2_thread_data *d = (rexec2_thread_data *) ldata->data; int min = ldata->min, max = ldata->max; int n = d->plan->n; fftw_complex *in = (fftw_complex *) d->in; int istride = d->istride, idist = d->idist; fftw_real *work = d->work; for (; min < max; ++min) rfftw_c2hc(n, in + min*idist, istride, work + min*n); return 0; } void rfftw_real2c_threads_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work, int nthreads) { rexec2_thread_data d; d.plan = plan; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = work; fftw_thread_spawn_loop(howmany, nthreads, real2c_aux_thread, &d); } void rfftw_c2real_threads_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work, int nthreads) { rexec2_thread_data d; d.plan = plan; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = work; fftw_thread_spawn_loop(howmany, nthreads, c2real_aux_thread, &d); } void rfftw_real2c_overlap_threads_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work, int nthreads) { rexec2_thread_data d; d.plan = plan; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = work; fftw_thread_spawn_loop(howmany, nthreads, real2c_overlap_aux_thread1, &d); fftw_thread_spawn_loop(howmany, nthreads, real2c_overlap_aux_thread2, &d); } void rfftw_c2real_overlap_threads_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work, int nthreads) { rexec2_thread_data d; d.plan = plan; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = work; fftw_thread_spawn_loop(howmany, nthreads, c2real_overlap_aux_thread1, &d); fftw_thread_spawn_loop(howmany, nthreads, c2real_overlap_aux_thread2, &d); } fftw-2.1.5/threads/rfftwnd_threads.c0000644000175400001440000005627407635206027013155 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw_threads-int.h" #include "rfftw_threads.h" /****************** prototypes for rexec2_threads routines *****************/ extern void rfftw_real2c_threads_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work, int nthreads); extern void rfftw_c2real_threads_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work, int nthreads); extern void rfftw_real2c_overlap_threads_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work, int nthreads); extern void rfftw_c2real_overlap_threads_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work, int nthreads); /********************** prototypes for rexec2 routines **********************/ extern void rfftw_real2c_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); extern void rfftw_real2c_overlap_aux(fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_real *work); extern void rfftw_c2real_overlap_aux(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_real *work); /****************** prototypes for rfftwnd routines *****************/ extern void rfftwnd_real2c_aux(fftwnd_plan p, int cur_dim, fftw_real *in, int istride, fftw_complex *out, int ostride, fftw_real *work); extern void rfftwnd_c2real_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_real *out, int ostride, fftw_real *work); extern void rfftwnd_real2c_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work); extern void rfftwnd_c2real_aux_howmany(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_complex *work); /*********** Computing the N-Dimensional FFT: Auxiliary Routines ************/ typedef struct { fftwnd_plan p; int cur_dim; void *in; int istride, idist; void *out; int ostride, odist; fftw_complex *work; } aux_data; static void *real2c_aux_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; aux_data *d = (aux_data *) ldata->data; fftwnd_plan p = d->p; int cur_dim = d->cur_dim; fftw_real *in = (fftw_real *) d->in; int istride = d->istride, idist = d->idist; fftw_complex *out = (fftw_complex *) d->out; int ostride = d->ostride, odist = d->odist; fftw_real *work = (fftw_real*) (d->work + p->nwork * ldata->thread_num); for (; min < max; ++min) rfftwnd_real2c_aux(p, cur_dim, in + idist * min, istride, out + odist * min, ostride, work); return 0; } void rfftwnd_real2c_threads_aux(fftwnd_plan p, int cur_dim, fftw_real *in, int istride, fftw_complex *out, int ostride, fftw_complex *work, int nthreads) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) rfftw_real2c_threads_aux(p->plans[p->rank - 1], n, in, istride, (n_after * istride) * 2, out, istride, n_after * istride, (fftw_real *) work, nthreads); else rfftw_real2c_threads_aux(p->plans[p->rank - 1], n, in, istride, p->plans[p->rank - 1]->n * istride, out, ostride, n_after * ostride, (fftw_real *) work, nthreads); } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; aux_data d; d.p = p; d.cur_dim = cur_dim + 1; d.in = in; d.istride = istride; d.idist = istride * (p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1))); d.out = out; d.ostride = ostride; d.odist = ostride * n_after; d.work = work; fftw_thread_spawn_loop(n, nthreads, real2c_aux_thread, &d); } /* do the current dimension (in-place): */ /* (Use internal function instead of fftw_threads so that we can pass our workspace array.) */ fftw_executor_many_inplace_threads(p->plans[cur_dim]->n, out, work, p->plans[cur_dim]->root, n_after * ostride, n_after, ostride, nthreads); } static void *c2real_aux_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; aux_data *d = (aux_data *) ldata->data; fftwnd_plan p = d->p; int cur_dim = d->cur_dim; fftw_complex *in = (fftw_complex *) d->in; int istride = d->istride, idist = d->idist; fftw_real *out = (fftw_real *) d->out; int ostride = d->ostride, odist = d->odist; fftw_real *work = (fftw_real*) (d->work + p->nwork * ldata->thread_num); for (; min < max; ++min) rfftwnd_c2real_aux(p, cur_dim, in + idist * min, istride, out + odist * min, ostride, work); return 0; } void rfftwnd_c2real_threads_aux(fftwnd_plan p, int cur_dim, fftw_complex *in, int istride, fftw_real *out, int ostride, fftw_complex *work, int nthreads) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; /* do the current dimension (in-place): */ /* (Use internal function instead of fftw_threads so that we can pass our workspace array.) */ fftw_executor_many_inplace_threads(p->plans[cur_dim]->n, in, work, p->plans[cur_dim]->root, n_after * istride, n_after, istride, nthreads); if (cur_dim == p->rank - 2) { /* just do the last dimension directly: */ if (p->is_in_place) rfftw_c2real_threads_aux(p->plans[p->rank - 1], n, in, istride, n_after * istride, out, istride, (n_after * istride) * 2, (fftw_real *) work, nthreads); else rfftw_c2real_threads_aux(p->plans[p->rank - 1], n, in, istride, n_after * istride, out, ostride, p->plans[p->rank - 1]->n * ostride, (fftw_real *) work, nthreads); } else { /* we have at least two dimensions to go */ int nr = p->plans[p->rank - 1]->n; aux_data d; d.p = p; d.cur_dim = cur_dim + 1; d.in = in; d.istride = istride; d.odist = ostride * (p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1))); d.out = out; d.ostride = ostride; d.idist = istride * n_after; d.work = work; fftw_thread_spawn_loop(n, nthreads, c2real_aux_thread, &d); } } typedef struct { fftw_plan p; int howmany; void *in; int istride, idist, idist0; void *out; int ostride, odist, odist0; fftw_real *work; int wdist; } howmany_aux_data; static void *r2c_overlap_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_aux_data *d = (howmany_aux_data *) ldata->data; fftw_plan p = d->p; int howmany = d->howmany; fftw_real *in = (fftw_real *) d->in; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *out = (fftw_complex *) d->out; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_real *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftw_real2c_overlap_aux(p, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } static void *c2r_overlap_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_aux_data *d = (howmany_aux_data *) ldata->data; fftw_plan p = d->p; int howmany = d->howmany; fftw_real *out = (fftw_real *) d->out; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *in = (fftw_complex *) d->in; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_real *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftw_c2real_overlap_aux(p, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } static void *r2c_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_aux_data *d = (howmany_aux_data *) ldata->data; fftw_plan p = d->p; int howmany = d->howmany; fftw_real *in = (fftw_real *) d->in; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *out = (fftw_complex *) d->out; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_real *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftw_real2c_aux(p, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } static void *c2r_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_aux_data *d = (howmany_aux_data *) ldata->data; fftw_plan p = d->p; int howmany = d->howmany; fftw_real *out = (fftw_real *) d->out; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *in = (fftw_complex *) d->in; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_real *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftw_c2real_aux(p, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } typedef struct { fftwnd_plan p; int cur_dim; int howmany; void *in; int istride, idist, idist0; void *out; int ostride, odist, odist0; fftw_complex *work; int wdist; } howmany_hyperslab_aux_data; static void *r2c_hyperslab_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_hyperslab_aux_data *d = (howmany_hyperslab_aux_data*) ldata->data; fftwnd_plan p = d->p; int cur_dim = d->cur_dim; int howmany = d->howmany; fftw_real *in = (fftw_real *) d->in; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *out = (fftw_complex *) d->out; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_complex *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftwnd_real2c_aux_howmany(p, cur_dim, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } static void *c2r_hyperslab_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; howmany_hyperslab_aux_data *d = (howmany_hyperslab_aux_data*) ldata->data; fftwnd_plan p = d->p; int cur_dim = d->cur_dim; int howmany = d->howmany; fftw_real *out = (fftw_real *) d->out; int istride = d->istride, idist = d->idist, idist0 = d->idist0; fftw_complex *in = (fftw_complex *) d->in; int ostride = d->ostride, odist = d->odist, odist0 = d->odist0; fftw_complex *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) rfftwnd_c2real_aux_howmany(p, cur_dim, howmany, in + min * idist0, istride, idist, out + min * odist0, ostride, odist, work); return 0; } typedef struct { fftw_plan p; int howmany; fftw_complex *io_data; int iostride, iodist, iodist0; fftw_complex *work; int wdist; } fftw_howmany_data; static void *fftw_howmany_thread(fftw_loop_data *ldata) { int min = ldata->min, max = ldata->max; fftw_howmany_data *d = (fftw_howmany_data*) ldata->data; fftw_plan p = d->p; int howmany = d->howmany; fftw_complex *io_data = d->io_data; int iostride = d->iostride, iodist = d->iodist, iodist0 = d->iodist0; fftw_complex *work = d->work + d->wdist * ldata->thread_num; for (; min < max; ++min) fftw(p, howmany, io_data + min*iodist0, iostride, iodist, work,1,0); return 0; } /* * alternate version of rfftwnd_aux -- this version pushes the howmany * loop down to the leaves of the computation, for greater locality * in cases where dist < stride. It is also required for correctness * if in==out, and we must call a special version of the executor. * Note that work must point to 'howmany' copies of its data * if in == out. */ void rfftwnd_real2c_aux_howmany_threads(fftwnd_plan p, int cur_dim, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, fftw_complex *work, int nwork, int nthreads) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; if (cur_dim == p->rank - 2) { howmany_aux_data d; d.p = p->plans[p->rank - 1]; d.howmany = howmany; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = (fftw_real *) work; d.wdist = nwork * 2; /* just do the last dimension directly: */ if (p->is_in_place) { d.idist0 = n_after * istride * 2; d.odist0 = n_after * ostride; fftw_thread_spawn_loop(n, nthreads, r2c_overlap_howmany_thread, &d); } else { d.idist0 = p->plans[p->rank - 1]->n * istride; d.odist0 = n_after * ostride; fftw_thread_spawn_loop(n, nthreads, r2c_howmany_thread, &d); } } else { /* we have at least two dimensions to go */ /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); howmany_hyperslab_aux_data d; d.p = p; d.cur_dim = cur_dim + 1; d.howmany = howmany; d.in = in; d.istride = istride; d.idist = idist; d.idist0 = n_after_r * istride; d.out = out; d.ostride = ostride; d.odist = odist; d.odist0 = n_after * ostride; d.work = work; d.wdist = nwork; fftw_thread_spawn_loop(n, nthreads, r2c_hyperslab_howmany_thread, &d); } /* do the current dimension (in-place): */ { fftw_howmany_data d; d.p = p->plans[cur_dim]; d.howmany = howmany; d.io_data = out; d.iostride = n_after * ostride; d.iodist = odist; d.iodist0 = ostride; d.work = work; d.wdist = nwork; fftw_thread_spawn_loop(n_after, nthreads, fftw_howmany_thread, &d); } } void rfftwnd_c2real_aux_howmany_threads(fftwnd_plan p, int cur_dim, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, fftw_complex *work, int nwork, int nthreads) { int n_after = p->n_after[cur_dim], n = p->n[cur_dim]; /* do the current dimension (in-place): */ { fftw_howmany_data d; d.p = p->plans[cur_dim]; d.howmany = howmany; d.io_data = in; d.iostride = n_after * istride; d.iodist = idist; d.iodist0 = istride; d.work = work; d.wdist = nwork; fftw_thread_spawn_loop(n_after, nthreads, fftw_howmany_thread, &d); } if (cur_dim == p->rank - 2) { howmany_aux_data d; d.p = p->plans[p->rank - 1]; d.howmany = howmany; d.in = in; d.istride = istride; d.idist = idist; d.out = out; d.ostride = ostride; d.odist = odist; d.work = (fftw_real *) work; d.wdist = nwork * 2; /* just do the last dimension directly: */ if (p->is_in_place) { d.idist0 = n_after * istride; d.odist0 = n_after * ostride * 2; fftw_thread_spawn_loop(n, nthreads, c2r_overlap_howmany_thread, &d); } else { d.odist0 = p->plans[p->rank - 1]->n * ostride; d.idist0 = n_after * istride; fftw_thread_spawn_loop(n, nthreads, c2r_howmany_thread, &d); } } else { /* we have at least two dimensions to go */ /* * process the subsequent dimensions recursively, in hyperslabs, * to get maximum locality: */ int nr = p->plans[p->rank - 1]->n; int n_after_r = p->is_in_place ? n_after * 2 : nr * (n_after / (nr/2 + 1)); howmany_hyperslab_aux_data d; d.p = p; d.cur_dim = cur_dim + 1; d.howmany = howmany; d.in = in; d.istride = istride; d.idist = idist; d.idist0 = n_after * istride; d.out = out; d.ostride = ostride; d.odist = odist; d.odist0 = n_after_r * ostride; d.work = work; d.wdist = nwork; fftw_thread_spawn_loop(n, nthreads, c2r_hyperslab_howmany_thread, &d); } } /********** Computing the N-Dimensional FFT: User-Visible Routines **********/ void rfftwnd_threads_real_to_complex(int nthreads, fftwnd_plan p, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { fftw_complex *work = 0; int rank = p->rank; int nwork = p->nwork, size_work = nwork * nthreads; if (p->dir != FFTW_REAL_TO_COMPLEX) fftw_die("rfftwnd_real_to_complex with complex-to-real plan"); if (p->is_in_place) { ostride = istride; odist = (idist == 1) ? 1 : (idist / 2); /* ugh */ out = (fftw_complex *) in; if (howmany > 1 && istride > idist && rank > 0) { int new_nwork = p->n[rank - 1] * howmany; if (new_nwork > nwork) nwork = new_nwork; if (rank != 1) { if (nwork * nthreads > size_work) size_work = nwork * nthreads; } else size_work = nwork; } } work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * size_work); switch (rank) { case 0: break; case 1: if (p->is_in_place && howmany > 1 && istride > idist) rfftw_real2c_overlap_threads_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work, nthreads); else rfftw_real2c_threads_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work, nthreads); break; default: /* rank >= 2 */ { if (howmany > 1 && ostride > odist) rfftwnd_real2c_aux_howmany_threads(p, 0, howmany, in, istride, idist, out, ostride, odist, work, nwork, nthreads); else { int i; for (i = 0; i < howmany; ++i) rfftwnd_real2c_threads_aux(p, 0, in + i * idist, istride, out + i * odist, ostride, work, nthreads); } } } fftw_free(work); } void rfftwnd_threads_complex_to_real(int nthreads, fftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist) { fftw_complex *work = 0; int rank = p->rank; int nwork = p->nwork, size_work = nwork * nthreads; if (p->dir != FFTW_COMPLEX_TO_REAL) fftw_die("rfftwnd_complex_to_real with real-to-complex plan"); if (p->is_in_place) { ostride = istride; odist = idist; odist = (idist == 1) ? 1 : (idist * 2); /* ugh */ out = (fftw_real *) in; if (howmany > 1 && istride > idist && rank > 0) { int new_nwork = p->n[rank - 1] * howmany; if (new_nwork > nwork) nwork = new_nwork; if (rank != 1) { if (nwork * nthreads > size_work) size_work = nwork * nthreads; } else size_work = nwork; } } work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * size_work); switch (rank) { case 0: break; case 1: if (p->is_in_place && howmany > 1 && istride > idist) rfftw_c2real_overlap_threads_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work, nthreads); else rfftw_c2real_threads_aux(p->plans[0], howmany, in, istride, idist, out, ostride, odist, (fftw_real *) work, nthreads); break; default: /* rank >= 2 */ { if (howmany > 1 && ostride > odist) rfftwnd_c2real_aux_howmany_threads(p, 0, howmany, in, istride, idist, out, ostride, odist, work, nwork, nthreads); else { int i; for (i = 0; i < howmany; ++i) rfftwnd_c2real_threads_aux(p, 0, in + i * idist, istride, out + i * odist, ostride, work, nthreads); } } } fftw_free(work); } void rfftwnd_threads_one_real_to_complex(int nthreads, fftwnd_plan p, fftw_real *in, fftw_complex *out) { rfftwnd_threads_real_to_complex(nthreads, p, 1, in, 1, 1, out, 1, 1); } void rfftwnd_threads_one_complex_to_real(int nthreads, fftwnd_plan p, fftw_complex *in, fftw_real *out) { rfftwnd_threads_complex_to_real(nthreads, p, 1, in, 1, 1, out, 1, 1); } fftw-2.1.5/threads/rfftw_f77_threads.c0000644000175400001440000000551207635543244013310 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "rfftw_threads.h" #include "config.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ void F77_FUNC_(rfftw_f77_threads,RFFTW_F77_THREADS) (int *nthreads, fftw_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, fftw_real *out, int *ostride, int *odist) { rfftw_threads(*nthreads,*p, *howmany,in,*istride,*idist,out,*ostride,*odist); } void F77_FUNC_(rfftw_f77_threads_one,RFFTW_F77_THREADS_ONE) (int *nthreads, fftw_plan *p, fftw_real *in, fftw_real *out) { rfftw_threads_one(*nthreads,*p,in,out); } void F77_FUNC_(rfftwnd_f77_threads_real_to_complex,RFFTWND_F77_THREADS_REAL_TO_COMPLEX) (int *nthreads, fftwnd_plan *p, int *howmany, fftw_real *in, int *istride, int *idist, fftw_complex *out, int *ostride, int *odist) { rfftwnd_threads_real_to_complex(*nthreads,*p,*howmany,in,*istride,*idist, out,*ostride,*odist); } void F77_FUNC_(rfftwnd_f77_threads_one_real_to_complex,RFFTWND_F77_THREADS_ONE_REAL_TO_COMPLEX) (int *nthreads, fftwnd_plan *p, fftw_real *in, fftw_complex *out) { rfftwnd_threads_one_real_to_complex(*nthreads,*p,in,out); } void F77_FUNC_(rfftwnd_f77_threads_complex_to_real,RFFTWND_F77_THREADS_COMPLEX_TO_REAL) (int *nthreads, fftwnd_plan *p, int *howmany, fftw_complex *in, int *istride, int *idist, fftw_real *out, int *ostride, int *odist) { rfftwnd_threads_complex_to_real(*nthreads,*p,*howmany,in,*istride,*idist, out,*ostride,*odist); } void F77_FUNC_(rfftwnd_f77_threads_one_complex_to_real,RFFTWND_F77_THREADS_ONE_COMPLEX_TO_REAL) (int *nthreads, fftwnd_plan *p, fftw_complex *in, fftw_real *out) { rfftwnd_threads_one_complex_to_real(*nthreads,*p,in,out); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ fftw-2.1.5/threads/rfftw_threads.h0000644000175400001440000000402607635206027012624 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef RFFTW_THREADS_H #define RFFTW_THREADS_H #include "rfftw.h" #include "fftw_threads.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /******************** User Interface *********************/ extern void rfftw_threads(int nthreads, fftw_plan plan, int howmany, fftw_real *in, int istride, int idist, fftw_real *out, int ostride, int odist); extern void rfftw_threads_one(int nthread, fftw_plan plan, fftw_real *in, fftw_real *out); extern void rfftwnd_threads_real_to_complex(int nthreads, fftwnd_plan p, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern void rfftwnd_threads_complex_to_real(int nthreads, fftwnd_plan p, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist); extern void rfftwnd_threads_one_real_to_complex(int nthreads, fftwnd_plan p, fftw_real *in, fftw_complex *out); extern void rfftwnd_threads_one_complex_to_real(int nthreads, fftwnd_plan p, fftw_complex *in, fftw_real *out); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* RFFTW_THREADS_H */ fftw-2.1.5/threads/fftw_threads_test.c0000644000175400001440000004476307635206062013507 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * fftw_test.c : test program for complex-complex transforms */ /* $Id: fftw_threads_test.c,v 1.10 2003/03/16 23:43:46 stevenj Exp $ */ #include #include #include #include #include #include "fftw-int.h" #include "fftw_threads.h" #include "test_main.h" char fftw_prefix[] = "fftw_threads"; int nthreads = 1; /************************************************* * Speed tests *************************************************/ void zero_arr(int n, fftw_complex * a) { int i; for (i = 0; i < n; ++i) c_re(a[i]) = c_im(a[i]) = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { fftw_complex *in, *out; fftw_plan plan; double t, t0; fftw_time begin, end; in = (fftw_complex *) fftw_malloc(n * howmany_fields * sizeof(fftw_complex)); out = (fftw_complex *) fftw_malloc(n * howmany_fields * sizeof(fftw_complex)); if (specific) { begin = fftw_get_time(); plan = fftw_create_plan_specific(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, out, howmany_fields); end = fftw_get_time(); } else { begin = fftw_get_time(); plan = fftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); end = fftw_get_time(); } CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, fftw_print_plan(plan)); FFTW_TIME_FFT(fftw(plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t0); FFTW_TIME_FFT(fftw_threads(nthreads, plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t); fftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); WHEN_VERBOSE(1, printf("time for one fft (%d threads): %s", nthreads, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5 (n log2 n) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, n))); WHEN_VERBOSE(1, printf("parallel speedup: %f\n", t0 / t)); fftw_free(in); fftw_free(out); WHEN_VERBOSE(1, printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { fftw_complex *in; fftwnd_plan plan; double t, t0; fftw_time begin, end; int i, N; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank; ++i) N *= (sz.narray[i]); in = (fftw_complex *) fftw_malloc(N * howmany_fields * sizeof(fftw_complex)); if (specific) { begin = fftw_get_time(); plan = fftwnd_create_plan_specific(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, 0, 1); } else { begin = fftw_get_time(); plan = fftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } end = fftw_get_time(); CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, printf("\n")); WHEN_VERBOSE(2, (fftwnd_print_plan(plan))); WHEN_VERBOSE(2, printf("\n")); FFTW_TIME_FFT(fftwnd(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); FFTW_TIME_FFT(fftwnd_threads(nthreads, plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); fftwnd_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); WHEN_VERBOSE(1, printf("time for one fft (%d threads): %s", nthreads, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("\"mflops\" = 5 (N log2 N) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); WHEN_VERBOSE(1, printf("parallel speedup: %f\n", t0 / t)); fftw_free(in); WHEN_VERBOSE(1, printf("\n")); } /************************************************* * correctness tests *************************************************/ void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in1, *in2, *out1, *out2; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag | FFTW_OUT_OF_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_complex *) fftw_malloc(istride * n * sizeof(fftw_complex) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); out1 = (fftw_complex *) fftw_malloc(ostride * n * sizeof(fftw_complex) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); if (!specific) plan = fftw_create_plan(n, dir, flags); else plan = fftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); /* generate random inputs */ for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride]) = c_re(in2[i]) = DRAND(); c_im(in1[i * istride]) = c_im(in2[i]) = DRAND(); } /* * fill in other positions of the array, to make sure that * fftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride + j]) = i * istride + j; c_im(in1[i * istride + j]) = i * istride - j; } for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(out1[i * ostride + j]) = -i * ostride + j; c_im(out1[i * ostride + j]) = -i * ostride - j; } CHECK(plan != NULL, "can't create plan"); WHEN_VERBOSE(2, fftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) fftw_threads(nthreads, plan, howmany, in1, istride, n * istride, out1, ostride, n * ostride); else fftw_threads_one(nthreads, plan, in1, out1); fftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(in1[i * istride + j]) == i * istride + j && c_im(in1[i * istride + j]) == i * istride - j, "input has been overwritten"); for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(out1[i * ostride + j]) == -i * ostride + j && c_im(out1[i * ostride + j]) == -i * ostride - j, "output has been overwritten"); for (i = 0; i < howmany; ++i) { fftw(validated_plan, 1, in2 + n * i, 1, n, out2 + n * i, 1, n); } CHECK(compute_error_complex(out1, ostride, out2, 1, n * howmany) < TOLERANCE, "test_out_of_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out1); fftw_free(out2); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in1, *in2, *out2; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_complex *) fftw_malloc(istride * n * sizeof(fftw_complex) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); if (!specific) plan = fftw_create_plan(n, dir, flags); else plan = fftw_create_plan_specific(n, dir, flags, in1, istride, (fftw_complex *) NULL, 0); /* generate random inputs */ for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride]) = c_re(in2[i]) = DRAND(); c_im(in1[i * istride]) = c_im(in2[i]) = DRAND(); } /* * fill in other positions of the array, to make sure that * fftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) { c_re(in1[i * istride + j]) = i * istride + j; c_im(in1[i * istride + j]) = i * istride - j; } CHECK(plan != NULL, "can't create plan"); WHEN_VERBOSE(2, fftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || coinflip()) fftw_threads(nthreads, plan, howmany, in1, istride, n * istride, (fftw_complex *) NULL, 0, 0); else fftw_threads_one(nthreads, plan, in1, NULL); fftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(c_re(in1[i * istride + j]) == i * istride + j && c_im(in1[i * istride + j]) == i * istride - j, "input has been overwritten"); for (i = 0; i < howmany; ++i) { fftw(validated_plan, 1, in2 + n * i, 1, n, out2 + n * i, 1, n); } CHECK(compute_error_complex(in1, istride, out2, 1, n * howmany) < TOLERANCE, "test_in_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out2); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_FORWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_BACKWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_correctness(int n) { int istride, ostride, howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, printf("Testing correctness for n = %d...", n); fflush(stdout)); /* produce a good plan */ validated_plan_forward = fftw_create_plan(n, FFTW_FORWARD, measure_flag | wisdom_flag); validated_plan_backward = fftw_create_plan(n, FFTW_BACKWARD, measure_flag | wisdom_flag); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_out_of_place_both(n, istride, ostride, howmany, validated_plan_forward, validated_plan_backward); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_in_place_both(n, istride, howmany, validated_plan_forward, validated_plan_backward); fftw_destroy_plan(validated_plan_forward); fftw_destroy_plan(validated_plan_backward); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); WHEN_VERBOSE(1, printf("OK\n")); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan) { int istride, ostride; int N, dim, i; fftw_complex *in1, *in2, *out1, *out2; fftwnd_plan p; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; in1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); out1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); p = fftwnd_create_plan(rank, n, dir, flags); for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < N; ++i) { int j; c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); for (j = 0; j < istride; ++j) { c_re(in1[i * istride + j]) = c_re(in2[i]); c_im(in1[i * istride + j]) = c_im(in2[i]); } } for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) { int howmany = (istride < ostride) ? istride : ostride; if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) fftwnd_threads(nthreads, p, howmany, in1, istride, 1, out1, ostride, 1); else fftwnd_threads_one(nthreads, p, in1, out1); fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (i = 0; i < howmany; ++i) CHECK(compute_error_complex(out1 + i, ostride, out2, 1, N) < TOLERANCE, "testnd_out_of_place: wrong answer"); } } fftwnd_destroy_plan(p); fftw_free(out2); fftw_free(in2); fftw_free(out1); fftw_free(in1); } void testnd_in_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan, int alternate_api, int specific, int force_buffered) { int istride; int N, dim, i; fftw_complex *in1, *in2, *out2; fftwnd_plan p; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; if (force_buffered) flags |= FFTWND_FORCE_BUFFERED; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; in1 = (fftw_complex *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); if (!specific) { if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) p = fftw2d_create_plan(n[0], n[1], dir, flags); else p = fftw3d_create_plan(n[0], n[1], n[2], dir, flags); } else /* standard api */ p = fftwnd_create_plan(rank, n, dir, flags); } else { /* specific plan creation */ if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) p = fftw2d_create_plan_specific(n[0], n[1], dir, flags, in1, 1, (fftw_complex *) NULL, 1); else p = fftw3d_create_plan_specific(n[0], n[1], n[2], dir, flags, in1, 1, (fftw_complex *) NULL, 1); } else /* standard api */ p = fftwnd_create_plan_specific(rank, n, dir, flags, in1, 1, (fftw_complex *) NULL, 1); } for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* * generate random inputs */ for (i = 0; i < N; ++i) { int j; c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); for (j = 0; j < istride; ++j) { c_re(in1[i * istride + j]) = c_re(in2[i]); c_im(in1[i * istride + j]) = c_im(in2[i]); } } if (istride != 1 || istride != 1 || coinflip()) fftwnd_threads(nthreads, p, istride, in1, istride, 1, (fftw_complex *) NULL, 1, 1); else fftwnd_threads_one(nthreads, p, in1, NULL); fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (i = 0; i < istride; ++i) CHECK(compute_error_complex(in1 + i, istride, out2, 1, N) < TOLERANCE, "testnd_in_place: wrong answer"); } fftwnd_destroy_plan(p); fftw_free(out2); fftw_free(in2); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag); testnd_out_of_place(sz.rank, sz.narray, dir, validated_plan); testnd_in_place(sz.rank, sz.narray, dir, validated_plan, alt_api, specific, force_buf); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { WHEN_VERBOSE(1, printf("Use fftw_test to test the planner.\n");); } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { int i; if (*argc >= 2) nthreads = atoi((*argv)[1]); if (nthreads <= 0) { fprintf(stderr, "Usage: fftw_threads_test [ options ]\n"); exit(EXIT_FAILURE); } for (i = 2; i < *argc; ++i) (*argv)[i - 1] = (*argv)[i]; *argc -= 1; if (fftw_threads_init()) { fprintf(stderr, "Error initializing threads!\n"); exit(EXIT_FAILURE); } } void test_finish(void) { } void enter_paranoid_mode(void) { } int get_option(int argc, char **argv, char *argval, int argval_maxlen) { return default_get_option(argc,argv,argval,argval_maxlen); } fftw-2.1.5/threads/rfftw_threads_test.c0000644000175400001440000006120407635206027013657 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include #include "fftw_threads-int.h" #include "rfftw_threads.h" #include "test_main.h" char fftw_prefix[] = "rfftw_threads"; int nthreads = 1; /************************************************* * Speed tests *************************************************/ void zero_arr(int n, fftw_real * a) { int i; for (i = 0; i < n; ++i) a[i] = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { fftw_real *in, *out; fftw_plan plan; double t, t0; fftw_time begin, end; in = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); out = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); if (specific) { begin = fftw_get_time(); plan = rfftw_create_plan_specific(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, out, howmany_fields); end = fftw_get_time(); } else { begin = fftw_get_time(); plan = rfftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); end = fftw_get_time(); } CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, rfftw_print_plan(plan)); FFTW_TIME_FFT(rfftw(plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t0); FFTW_TIME_FFT(rfftw_threads(nthreads,plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t); rfftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); WHEN_VERBOSE(1, printf("time for one fft (%d threads): %s", nthreads, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5/2 (n log2 n) / (t in microseconds)" " = %f\n", 0.5 * howmany_fields * mflops(t, n))); WHEN_VERBOSE(1, printf("parallel speedup: %f\n", t0 / t)); fftw_free(in); fftw_free(out); WHEN_VERBOSE(1, printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { fftw_real *in; fftwnd_plan plan; double t, t0; fftw_time begin, end; int i, N; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank - 1; ++i) N *= sz.narray[i]; N *= (sz.narray[i] + 2); in = (fftw_real *) fftw_malloc(N * howmany_fields * sizeof(fftw_real)); if (specific) { begin = fftw_get_time(); plan = rfftwnd_create_plan_specific(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, 0, 1); } else { begin = fftw_get_time(); plan = rfftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } end = fftw_get_time(); CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, printf("\n")); WHEN_VERBOSE(2, (rfftwnd_print_plan(plan))); WHEN_VERBOSE(2, printf("\n")); if (dir == FFTW_REAL_TO_COMPLEX) { FFTW_TIME_FFT(rfftwnd_real_to_complex(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); FFTW_TIME_FFT(rfftwnd_threads_real_to_complex(nthreads, plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); } else { FFTW_TIME_FFT(rfftwnd_complex_to_real(plan, howmany_fields, (fftw_complex *) in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); FFTW_TIME_FFT(rfftwnd_threads_complex_to_real(nthreads, plan, howmany_fields, (fftw_complex *) in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t); } rfftwnd_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); WHEN_VERBOSE(1, printf("time for one fft (%d threads): %s", nthreads, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("\"mflops\" = 5/2 (N log2 N) / (t in microseconds)" " = %f\n", 0.5 * howmany_fields * mflops(t, N))); WHEN_VERBOSE(1, printf("parallel speedup: %f\n", t0 / t)); fftw_free(in); WHEN_VERBOSE(1, printf("\n")); } /************************************************* * correctness tests *************************************************/ void fill_random(fftw_real * a, int n, int stride) { int i; /* generate random inputs */ for (i = 0; i < n; ++i) a[i * stride] = DRAND(); } double compute_error(fftw_real * A, int astride, fftw_real * B, int bstride, int n) { /* compute the relative error */ double error = 0.0; int i; for (i = 0; i < n; ++i) { double a; double mag; a = fabs(A[i * astride] - B[i * bstride]); mag = 0.5 * (fabs(A[i * astride]) + fabs(B[i * bstride])) + TOLERANCE; a /= mag; if (a > error) error = a; #ifdef HAVE_ISNAN CHECK(!isnan(a), "NaN in answer"); #endif } return error; } void array_compare(fftw_real * A, fftw_real * B, int n) { CHECK(compute_error(A, 1, B, 1, n) < TOLERANCE, "failure in RFFTW verification"); } void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in2, *out2; fftw_real *in1, *out1, *out3; fftw_plan plan; int i, j; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_real *) fftw_malloc(istride * n * sizeof(fftw_real) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out1 = (fftw_real *) fftw_malloc(ostride * n * sizeof(fftw_real) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out3 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); if (!specific) plan = rfftw_create_plan(n, dir, flags); else plan = rfftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); CHECK(plan != NULL, "can't create plan"); /* generate random inputs */ fill_random(in1, n, istride); for (j = 1; j < howmany; ++j) for (i = 0; i < n; ++i) in1[(j * n + i) * istride] = in1[i * istride]; /* copy random inputs to complex array for comparison with fftw: */ if (dir == FFTW_REAL_TO_COMPLEX) for (i = 0; i < n; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = 0.0; } else { int n2 = (n + 1) / 2; c_re(in2[0]) = in1[0]; c_im(in2[0]) = 0.0; for (i = 1; i < n2; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = in1[(n - i) * istride]; } if (n2 * 2 == n) { c_re(in2[n2]) = in1[n2 * istride]; c_im(in2[n2]) = 0.0; ++i; } for (; i < n; ++i) { c_re(in2[i]) = c_re(in2[n - i]); c_im(in2[i]) = -c_im(in2[n - i]); } } /* * fill in other positions of the array, to make sure that * rfftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) in1[i * istride + j] = i * istride + j; for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) out1[i * ostride + j] = -i * ostride + j; WHEN_VERBOSE(2, rfftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftw_threads(nthreads, plan, howmany, in1, istride, n * istride, out1, ostride, n * ostride); else rfftw_threads_one(nthreads, plan, in1, out1); rfftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(in1[i * istride + j] == i * istride + j, "input has been overwritten"); for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(out1[i * ostride + j] == -i * ostride + j, "output has been overwritten"); fftw(validated_plan, 1, in2, 1, n, out2, 1, n); if (dir == FFTW_REAL_TO_COMPLEX) { int n2 = (n + 1) / 2; out3[0] = c_re(out2[0]); for (i = 1; i < n2; ++i) { out3[i] = c_re(out2[i]); out3[n - i] = c_im(out2[i]); } if (n2 * 2 == n) out3[n2] = c_re(out2[n2]); } else { for (i = 0; i < n; ++i) out3[i] = c_re(out2[i]); } for (j = 0; j < howmany; ++j) CHECK(compute_error(out1 + j * n * ostride, ostride, out3, 1, n) < TOLERANCE, "test_out_of_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out1); fftw_free(out2); fftw_free(out3); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { fftw_complex *in2, *out2; fftw_real *in1, *out1, *out3; fftw_plan plan; int i, j; int ostride = istride; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; in1 = (fftw_real *) fftw_malloc(istride * n * sizeof(fftw_real) * howmany); in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out1 = in1; out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex)); out3 = (fftw_real *) fftw_malloc(n * sizeof(fftw_real)); if (!specific) plan = rfftw_create_plan(n, dir, flags); else plan = rfftw_create_plan_specific(n, dir, flags, in1, istride, out1, ostride); CHECK(plan != NULL, "can't create plan"); /* generate random inputs */ fill_random(in1, n, istride); for (j = 1; j < howmany; ++j) for (i = 0; i < n; ++i) in1[(j * n + i) * istride] = in1[i * istride]; /* copy random inputs to complex array for comparison with fftw: */ if (dir == FFTW_REAL_TO_COMPLEX) for (i = 0; i < n; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = 0.0; } else { int n2 = (n + 1) / 2; c_re(in2[0]) = in1[0]; c_im(in2[0]) = 0.0; for (i = 1; i < n2; ++i) { c_re(in2[i]) = in1[i * istride]; c_im(in2[i]) = in1[(n - i) * istride]; } if (n2 * 2 == n) { c_re(in2[n2]) = in1[n2 * istride]; c_im(in2[n2]) = 0.0; ++i; } for (; i < n; ++i) { c_re(in2[i]) = c_re(in2[n - i]); c_im(in2[i]) = -c_im(in2[n - i]); } } /* * fill in other positions of the array, to make sure that * rfftw doesn't overwrite them */ for (j = 1; j < istride; ++j) for (i = 0; i < n * howmany; ++i) in1[i * istride + j] = i * istride + j; WHEN_VERBOSE(2, rfftw_print_plan(plan)); /* fft-ize */ if (howmany != 1 || istride != 1 || coinflip()) rfftw_threads(nthreads, plan, howmany, in1, istride, n * istride, 0, 0, 0); else rfftw_threads_one(nthreads, plan, in1, NULL); rfftw_destroy_plan(plan); /* check for overwriting */ for (j = 1; j < ostride; ++j) for (i = 0; i < n * howmany; ++i) CHECK(out1[i * ostride + j] == i * ostride + j, "output has been overwritten"); fftw(validated_plan, 1, in2, 1, n, out2, 1, n); if (dir == FFTW_REAL_TO_COMPLEX) { int n2 = (n + 1) / 2; out3[0] = c_re(out2[0]); for (i = 1; i < n2; ++i) { out3[i] = c_re(out2[i]); out3[n - i] = c_im(out2[i]); } if (n2 * 2 == n) out3[n2] = c_re(out2[n2]); } else { for (i = 0; i < n; ++i) out3[i] = c_re(out2[i]); } for (j = 0; j < howmany; ++j) CHECK(compute_error(out1 + j * n * ostride, ostride, out3, 1, n) < TOLERANCE, "test_in_place: wrong answer"); WHEN_VERBOSE(2, printf("OK\n")); fftw_free(in1); fftw_free(in2); fftw_free(out2); fftw_free(out3); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_FORWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (out of place, FFTW_BACKWARD, %s)" " n = %d istride = %d ostride = %d howmany = %d\n", SPECIFICP(specific), n, istride, ostride, howmany)); test_out_of_place(n, istride, ostride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { int specific; for (specific = 0; specific <= 1; ++specific) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, specific); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(specific), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, specific); } } void test_correctness(int n) { int istride, ostride, howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, printf("Testing correctness for n = %d...", n); fflush(stdout)); /* produce a *good* plan (validated by Ergun's test procedure) */ validated_plan_forward = fftw_create_plan(n, FFTW_FORWARD, measure_flag | wisdom_flag); validated_plan_backward = fftw_create_plan(n, FFTW_BACKWARD, measure_flag | wisdom_flag); CHECK(validated_plan_forward != NULL, "can't create plan"); CHECK(validated_plan_backward != NULL, "can't create plan"); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_out_of_place_both(n, istride, ostride, howmany, validated_plan_forward, validated_plan_backward); for (istride = 1; istride <= MAX_STRIDE; ++istride) for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_in_place_both(n, istride, howmany, validated_plan_forward, validated_plan_backward); fftw_destroy_plan(validated_plan_forward); fftw_destroy_plan(validated_plan_backward); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); WHEN_VERBOSE(1, printf("OK\n")); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftwnd_plan validated_plan) { int istride, ostride; int N, dim, i, j, k; int nc, nhc, nr; fftw_real *in1, *out3; fftw_complex *in2, *out1, *out2; fftwnd_plan p, ip; int flags = measure_flag | wisdom_flag; if (coinflip()) flags |= FFTW_THREADSAFE; N = nc = nr = nhc = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (rank > 0) { nr = n[rank - 1]; nc = N / nr; nhc = nr / 2 + 1; } in1 = (fftw_real *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_real)); out3 = (fftw_real *) fftw_malloc(N * MAX_STRIDE * sizeof(fftw_real)); out1 = (fftw_complex *) fftw_malloc(nhc * nc * MAX_STRIDE * sizeof(fftw_complex)); in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); p = rfftwnd_create_plan(rank, n, FFTW_REAL_TO_COMPLEX, flags); ip = rfftwnd_create_plan(rank, n, FFTW_COMPLEX_TO_REAL, flags); CHECK(p != NULL && ip != NULL, "can't create plan"); for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < nc; ++i) for (j = 0; j < nr; ++j) { c_re(in2[i * nr + j]) = DRAND(); c_im(in2[i * nr + j]) = 0.0; for (k = 0; k < istride; ++k) in1[(i * nr + j) * istride + k] = c_re(in2[i * nr + j]); } for (i = 0; i < N * istride; ++i) out3[i] = 0.0; fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); for (ostride = 1; ostride <= MAX_STRIDE; ++ostride) { int howmany = (istride < ostride) ? istride : ostride; WHEN_VERBOSE(2, printf("\n testing stride %d/%d...", istride, ostride)); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_threads_real_to_complex(nthreads, p, howmany, in1, istride, 1, out1, ostride, 1); else rfftwnd_threads_one_real_to_complex(nthreads, p, in1, out1); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error_complex(out1 + i * nhc * ostride + k, ostride, out2 + i * nr, 1, nhc) < TOLERANCE, "out-of-place (r2c): wrong answer"); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_threads_complex_to_real(nthreads, ip, howmany, out1, ostride, 1, out3, istride, 1); else rfftwnd_threads_one_complex_to_real(nthreads, ip, out1, out3); for (i = 0; i < N * istride; ++i) out3[i] *= 1.0 / N; if (istride == howmany) CHECK(compute_error(out3, 1, in1, 1, N * istride) < TOLERANCE, "out-of-place (c2r): wrong answer"); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error(out3 + i * nr * istride + k, istride, (fftw_real *) (in2 + i * nr), 2, nr) < TOLERANCE, "out-of-place (c2r): wrong answer (check 2)"); } } rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(ip); fftw_free(out3); fftw_free(out2); fftw_free(in2); fftw_free(out1); fftw_free(in1); } void testnd_in_place(int rank, int *n, fftwnd_plan validated_plan, int alternate_api, int specific) { int istride, ostride, howmany; int N, dim, i, j, k; int nc, nhc, nr; fftw_real *in1, *out3; fftw_complex *in2, *out1, *out2; fftwnd_plan p, ip; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (coinflip()) flags |= FFTW_THREADSAFE; N = nc = nr = nhc = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (rank > 0) { nr = n[rank - 1]; nc = N / nr; nhc = nr / 2 + 1; } in1 = (fftw_real *) fftw_malloc(2 * nhc * nc * MAX_STRIDE * sizeof(fftw_real)); out3 = in1; out1 = (fftw_complex *) in1; in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); if (alternate_api && specific && (rank == 2 || rank == 3)) { if (rank == 2) { p = rfftw2d_create_plan_specific(n[0], n[1], FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, 0, 0); ip = rfftw2d_create_plan_specific(n[0], n[1], FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, 0, 0); } else { p = rfftw3d_create_plan_specific(n[0], n[1], n[2], FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, 0, 0); ip = rfftw3d_create_plan_specific(n[0], n[1], n[2], FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, 0, 0); } } else if (specific) { p = rfftwnd_create_plan_specific(rank, n, FFTW_REAL_TO_COMPLEX, flags, in1, MAX_STRIDE, in1, MAX_STRIDE); ip = rfftwnd_create_plan_specific(rank, n, FFTW_COMPLEX_TO_REAL, flags, in1, MAX_STRIDE, in1, MAX_STRIDE); } else if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) { p = rfftw2d_create_plan(n[0], n[1], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw2d_create_plan(n[0], n[1], FFTW_COMPLEX_TO_REAL, flags); } else { p = rfftw3d_create_plan(n[0], n[1], n[2], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw3d_create_plan(n[0], n[1], n[2], FFTW_COMPLEX_TO_REAL, flags); } } else { p = rfftwnd_create_plan(rank, n, FFTW_REAL_TO_COMPLEX, flags); ip = rfftwnd_create_plan(rank, n, FFTW_COMPLEX_TO_REAL, flags); } CHECK(p != NULL && ip != NULL, "can't create plan"); for (i = 0; i < nc * nhc * 2 * MAX_STRIDE; ++i) out3[i] = 0; for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < nc; ++i) for (j = 0; j < nr; ++j) { c_re(in2[i * nr + j]) = DRAND(); c_im(in2[i * nr + j]) = 0.0; for (k = 0; k < istride; ++k) in1[(i * nhc * 2 + j) * istride + k] = c_re(in2[i * nr + j]); } fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); howmany = ostride = istride; WHEN_VERBOSE(2, printf("\n testing in-place stride %d...", istride); fflush(stdout);); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_threads_real_to_complex(nthreads, p, howmany, in1, istride, 1, out1, ostride, 1); else rfftwnd_threads_one_real_to_complex(nthreads, p, in1, NULL); for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error_complex(out1 + i * nhc * ostride + k, ostride, out2 + i * nr, 1, nhc) < TOLERANCE, "in-place (r2c): wrong answer"); if (howmany != 1 || istride != 1 || ostride != 1 || coinflip()) rfftwnd_threads_complex_to_real(nthreads, ip, howmany, out1, ostride, 1, out3, istride, 1); else rfftwnd_threads_one_complex_to_real(nthreads, ip, out1, NULL); for (i = 0; i < nc * nhc * 2 * istride; ++i) out3[i] *= 1.0 / N; for (i = 0; i < nc; ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error(out3 + i * nhc * 2 * istride + k, istride, (fftw_real *) (in2 + i * nr), 2, nr) < TOLERANCE, "in-place (c2r): wrong answer (check 2)"); } rfftwnd_destroy_plan(p); rfftwnd_destroy_plan(ip); fftw_free(out2); fftw_free(in2); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; if (dir != FFTW_FORWARD) return; if (force_buf) return; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag); CHECK(validated_plan != NULL, "can't create plan"); testnd_out_of_place(sz.rank, sz.narray, validated_plan); testnd_in_place(sz.rank, sz.narray, validated_plan, alt_api, specific); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { WHEN_VERBOSE(1, printf("Use rfftw_test to test the planner.\n");); } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { int i; if (*argc >= 2) nthreads = atoi((*argv)[1]); if (nthreads <= 0) { fprintf(stderr, "Usage: fftw_threads_test [ options ]\n"); exit(EXIT_FAILURE); } for (i = 2; i < *argc; ++i) (*argv)[i - 1] = (*argv)[i]; *argc -= 1; if (fftw_threads_init()) { fprintf(stderr, "Error initializing threads!"); exit(EXIT_FAILURE); } } void test_finish(void) { } void enter_paranoid_mode(void) { } int get_option(int argc, char **argv, char *argval, int argval_maxlen) { return default_get_option(argc,argv,argval,argval_maxlen); } fftw-2.1.5/mpi/0002777000175400001440000000000007637531661007037 5fftw-2.1.5/mpi/Makefile.am0000644000175400001440000000537007635206027011003 # The mpi stuff is only compiled if FFTW was configured with # the --enable-mpi option. This requires us to use the combination # of foo_* and EXTRA_* variables below. lib_LTLIBRARIES = @FFTW_MPI_LIBLIST@ include_HEADERS = @FFTW_MPI_INCLUDELIST@ noinst_PROGRAMS = @FFTW_MPI_PROGLIST@ EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_mpi.la \ lib@FFTW_PREFIX@rfftw_mpi.la EXTRA_HEADERS = @FFTW_PREFIX@fftw_mpi.h @FFTW_PREFIX@rfftw_mpi.h EXTRA_PROGRAMS = test_sched test_transpose_mpi fftw_mpi_test rfftw_mpi_test EXTRA_DIST = README.f77 CC=@MPICC@ FFTWDIR=../fftw RFFTWDIR=../rfftw INCLUDES = -I$(srcdir)/../tests \ -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) -I$(srcdir) lib@FFTW_PREFIX@fftw_mpi_la_SOURCES = \ sched.c sched.h TOMS_transpose.c TOMS_transpose.h \ transpose_mpi.c fftwnd_mpi.c fftw_mpi.c \ @FFTW_PREFIX@fftw_mpi.h \ fftw_f77_mpi.c fftw_f77_mpi.h lib@FFTW_PREFIX@fftw_mpi_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) @FFTW_PREFIX1@fftw_mpi.h: fftw_mpi.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_mpi.h > $@ lib@FFTW_PREFIX@rfftw_mpi_la_SOURCES = \ rfftwnd_mpi.c @FFTW_PREFIX@rfftw_mpi.h \ rfftw_f77_mpi.c lib@FFTW_PREFIX@rfftw_mpi_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) @FFTW_PREFIX1@rfftw_mpi.h: rfftw_mpi.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_mpi.h > $@ CLEANFILES = @FFTW_PREFIX1@fftw_mpi.h @FFTW_PREFIX1@rfftw_mpi.h test_sched_SOURCES = test_sched.c test_sched_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ test_transpose_mpi_SOURCES = test_transpose_mpi.c test_transpose_mpi_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ fftw_mpi_test_SOURCES = fftw_mpi_test.c fftw_mpi_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ rfftw_mpi_test_SOURCES = rfftw_mpi_test.c rfftw_mpi_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_mpi.la \ lib@FFTW_PREFIX@fftw_mpi.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @MPILIBS@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo fftw-2.1.5/mpi/Makefile.in0000644000175400001440000005301607637527505011025 # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # The mpi stuff is only compiled if FFTW was configured with # the --enable-mpi option. This requires us to use the combination # of foo_* and EXTRA_* variables below. srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER = echo AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @MPICC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ FFTW_MPI_INCLUDELIST = @FFTW_MPI_INCLUDELIST@ FFTW_MPI_LIBLIST = @FFTW_MPI_LIBLIST@ FFTW_MPI_PROGLIST = @FFTW_MPI_PROGLIST@ FFTW_PREFIX = @FFTW_PREFIX@ FFTW_PREFIX1 = @FFTW_PREFIX1@ FFTW_THREADS_INCLUDELIST = @FFTW_THREADS_INCLUDELIST@ FFTW_THREADS_LIBLIST = @FFTW_THREADS_LIBLIST@ FFTW_THREADS_PROGLIST = @FFTW_THREADS_PROGLIST@ FLIBS = @FLIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MPICC = @MPICC@ MPILIBS = @MPILIBS@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHARED_VERSION = @SHARED_VERSION@ SHARED_VERSION_INFO = @SHARED_VERSION_INFO@ SHELL = @SHELL@ STRIP = @STRIP@ THREADLIBS = @THREADLIBS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lib_LTLIBRARIES = @FFTW_MPI_LIBLIST@ include_HEADERS = @FFTW_MPI_INCLUDELIST@ noinst_PROGRAMS = @FFTW_MPI_PROGLIST@ EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_mpi.la \ lib@FFTW_PREFIX@rfftw_mpi.la EXTRA_HEADERS = @FFTW_PREFIX@fftw_mpi.h @FFTW_PREFIX@rfftw_mpi.h EXTRA_PROGRAMS = test_sched test_transpose_mpi fftw_mpi_test rfftw_mpi_test EXTRA_DIST = README.f77 FFTWDIR = ../fftw RFFTWDIR = ../rfftw INCLUDES = -I$(srcdir)/../tests \ -I$(srcdir)/$(FFTWDIR) -I$(srcdir)/$(RFFTWDIR) -I$(srcdir) lib@FFTW_PREFIX@fftw_mpi_la_SOURCES = \ sched.c sched.h TOMS_transpose.c TOMS_transpose.h \ transpose_mpi.c fftwnd_mpi.c fftw_mpi.c \ @FFTW_PREFIX@fftw_mpi.h \ fftw_f77_mpi.c fftw_f77_mpi.h lib@FFTW_PREFIX@fftw_mpi_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) lib@FFTW_PREFIX@rfftw_mpi_la_SOURCES = \ rfftwnd_mpi.c @FFTW_PREFIX@rfftw_mpi.h \ rfftw_f77_mpi.c lib@FFTW_PREFIX@rfftw_mpi_la_LDFLAGS = \ -version-info @SHARED_VERSION_INFO@ \ -rpath $(libdir) CLEANFILES = @FFTW_PREFIX1@fftw_mpi.h @FFTW_PREFIX1@rfftw_mpi.h test_sched_SOURCES = test_sched.c test_sched_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ test_transpose_mpi_SOURCES = test_transpose_mpi.c test_transpose_mpi_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ fftw_mpi_test_SOURCES = fftw_mpi_test.c fftw_mpi_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ rfftw_mpi_test_SOURCES = rfftw_mpi_test.c rfftw_mpi_test_LDADD = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_mpi.la \ lib@FFTW_PREFIX@fftw_mpi.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ @MPILIBS@ subdir = mpi mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/fftw/config.h \ $(top_builddir)/fftw/fftw.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) lib@FFTW_PREFIX@fftw_mpi_la_LIBADD = am_lib@FFTW_PREFIX@fftw_mpi_la_OBJECTS = sched.lo TOMS_transpose.lo \ transpose_mpi.lo fftwnd_mpi.lo fftw_mpi.lo fftw_f77_mpi.lo lib@FFTW_PREFIX@fftw_mpi_la_OBJECTS = \ $(am_lib@FFTW_PREFIX@fftw_mpi_la_OBJECTS) lib@FFTW_PREFIX@rfftw_mpi_la_LIBADD = am_lib@FFTW_PREFIX@rfftw_mpi_la_OBJECTS = rfftwnd_mpi.lo \ rfftw_f77_mpi.lo lib@FFTW_PREFIX@rfftw_mpi_la_OBJECTS = \ $(am_lib@FFTW_PREFIX@rfftw_mpi_la_OBJECTS) EXTRA_PROGRAMS = test_sched$(EXEEXT) test_transpose_mpi$(EXEEXT) \ fftw_mpi_test$(EXEEXT) rfftw_mpi_test$(EXEEXT) noinst_PROGRAMS = @FFTW_MPI_PROGLIST@ PROGRAMS = $(noinst_PROGRAMS) am_fftw_mpi_test_OBJECTS = fftw_mpi_test.$(OBJEXT) fftw_mpi_test_OBJECTS = $(am_fftw_mpi_test_OBJECTS) fftw_mpi_test_DEPENDENCIES = ../tests/test_main.o \ lib@FFTW_PREFIX@fftw_mpi.la $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la fftw_mpi_test_LDFLAGS = am_rfftw_mpi_test_OBJECTS = rfftw_mpi_test.$(OBJEXT) rfftw_mpi_test_OBJECTS = $(am_rfftw_mpi_test_OBJECTS) rfftw_mpi_test_DEPENDENCIES = ../tests/test_main.o \ lib@FFTW_PREFIX@rfftw_mpi.la lib@FFTW_PREFIX@fftw_mpi.la \ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la rfftw_mpi_test_LDFLAGS = am_test_sched_OBJECTS = test_sched.$(OBJEXT) test_sched_OBJECTS = $(am_test_sched_OBJECTS) test_sched_DEPENDENCIES = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la test_sched_LDFLAGS = am_test_transpose_mpi_OBJECTS = test_transpose_mpi.$(OBJEXT) test_transpose_mpi_OBJECTS = $(am_test_transpose_mpi_OBJECTS) test_transpose_mpi_DEPENDENCIES = lib@FFTW_PREFIX@fftw_mpi.la \ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la test_transpose_mpi_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/fftw -I$(top_builddir)/fftw depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/TOMS_transpose.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_f77_mpi.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_mpi.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/fftw_mpi_test.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fftwnd_mpi.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftw_f77_mpi.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftw_mpi_test.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/rfftwnd_mpi.Plo ./$(DEPDIR)/sched.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/test_sched.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test_transpose_mpi.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/transpose_mpi.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(lib@FFTW_PREFIX@fftw_mpi_la_SOURCES) \ $(lib@FFTW_PREFIX@rfftw_mpi_la_SOURCES) \ $(fftw_mpi_test_SOURCES) $(rfftw_mpi_test_SOURCES) \ $(test_sched_SOURCES) $(test_transpose_mpi_SOURCES) HEADERS = $(include_HEADERS) DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in SOURCES = $(lib@FFTW_PREFIX@fftw_mpi_la_SOURCES) $(lib@FFTW_PREFIX@rfftw_mpi_la_SOURCES) $(fftw_mpi_test_SOURCES) $(rfftw_mpi_test_SOURCES) $(test_sched_SOURCES) $(test_transpose_mpi_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu mpi/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libLTLIBRARIES_INSTALL = $(INSTALL) install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" = "$$p" && dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lib@FFTW_PREFIX@fftw_mpi.la: $(lib@FFTW_PREFIX@fftw_mpi_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_mpi_la_DEPENDENCIES) $(LINK) $(lib@FFTW_PREFIX@fftw_mpi_la_LDFLAGS) $(lib@FFTW_PREFIX@fftw_mpi_la_OBJECTS) $(lib@FFTW_PREFIX@fftw_mpi_la_LIBADD) $(LIBS) lib@FFTW_PREFIX@rfftw_mpi.la: $(lib@FFTW_PREFIX@rfftw_mpi_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_mpi_la_DEPENDENCIES) $(LINK) $(lib@FFTW_PREFIX@rfftw_mpi_la_LDFLAGS) $(lib@FFTW_PREFIX@rfftw_mpi_la_OBJECTS) $(lib@FFTW_PREFIX@rfftw_mpi_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done fftw_mpi_test$(EXEEXT): $(fftw_mpi_test_OBJECTS) $(fftw_mpi_test_DEPENDENCIES) @rm -f fftw_mpi_test$(EXEEXT) $(LINK) $(fftw_mpi_test_LDFLAGS) $(fftw_mpi_test_OBJECTS) $(fftw_mpi_test_LDADD) $(LIBS) rfftw_mpi_test$(EXEEXT): $(rfftw_mpi_test_OBJECTS) $(rfftw_mpi_test_DEPENDENCIES) @rm -f rfftw_mpi_test$(EXEEXT) $(LINK) $(rfftw_mpi_test_LDFLAGS) $(rfftw_mpi_test_OBJECTS) $(rfftw_mpi_test_LDADD) $(LIBS) test_sched$(EXEEXT): $(test_sched_OBJECTS) $(test_sched_DEPENDENCIES) @rm -f test_sched$(EXEEXT) $(LINK) $(test_sched_LDFLAGS) $(test_sched_OBJECTS) $(test_sched_LDADD) $(LIBS) test_transpose_mpi$(EXEEXT): $(test_transpose_mpi_OBJECTS) $(test_transpose_mpi_DEPENDENCIES) @rm -f test_transpose_mpi$(EXEEXT) $(LINK) $(test_transpose_mpi_LDFLAGS) $(test_transpose_mpi_OBJECTS) $(test_transpose_mpi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TOMS_transpose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_f77_mpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_mpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftw_mpi_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwnd_mpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftw_f77_mpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftw_mpi_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfftwnd_mpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sched.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_transpose_mpi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transpose_mpi.Plo@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: includeHEADERS_INSTALL = $(INSTALL_HEADER) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ rm -f $(DESTDIR)$(includedir)/$$f; \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-libtool distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-depend distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am info \ info-am install install-am install-data install-data-am \ install-exec install-exec-am install-includeHEADERS \ install-info install-info-am install-libLTLIBRARIES install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES @FFTW_PREFIX1@fftw_mpi.h: fftw_mpi.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_mpi.h > $@ @FFTW_PREFIX1@rfftw_mpi.h: rfftw_mpi.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_mpi.h > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: fftw-2.1.5/mpi/sched.c0000644000175400001440000003047007635206027010200 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include "fftw_mpi.h" #include "sched.h" /* This file contains routines to compute communications schedules for all-to-all communications (complete exchanges) that are performed in-place. (That is, the block that processor x sends to processor y gets replaced on processor x by a block received from processor y.) A schedule, int **sched, is a two-dimensional array where sched[pe][i] is the processor that pe expects to exchange a message with on the i-th step of the exchange. sched[pe][i] == -1 for the i after the last exchange scheduled on pe. Here, processors (pe's, for processing elements), are numbered from 0 to npes-1. There are a couple of constraints that a schedule should satisfy (besides the obvious one that every processor has to communicate with every other processor exactly once). * First, and most importantly, there must be no deadlocks. * Second, we would like to overlap communications as much as possible, so that all exchanges occur in parallel. It turns out that perfect overlap is possible if npes is even, and only a single extra step is required if npes is odd. It turns out that this scheduling problem is actually well-studied, and good solutions are known. The problem is known as a "time-tabling" problem, and is specifically the problem of scheduling a sports competition (where n teams must compete exactly once with every other team). The problem is discussed and algorithms are presented in: [1] J. A. M. Schreuder, "Constructing Timetables for Sport Competitions," Mathematical Programming Study 13, pp. 58-67 (1980). [2] A. Schaerf, "Scheduling Sport Tournaments using Constraint Logic Programming," Proc. of 12th Europ. Conf. on Artif. Intell. (ECAI-96), pp. 634-639 (Budapest 1996). http://hermes.dis.uniromal.it/~aschaerf/publications.html (These people actually impose a lot of additional constraints that we don't care about, so they are solving harder problems. [1] gives a simple enough algorithm for our purposes, though.) However, we have to do more: for a particular processor, the communications schedule must be sorted in ascending or descending order of processor index. (This is necessary so that the data coming in for the transpose does not overwrite data that will be sent later; for that processor the incoming and outgoing blocks are of different non-zero sizes.) Fortunately, it is possible to reorder the schedule to achieve any permutation on a given processor while maintaining the two required properties above. ...except, when npes is odd (when the schedule already contains a stall), our reordering introduces an extra stall due to the motion of the self-communication past a stall. We could fix this if it were really important, but it turns out that the extra stall is not introduced in the case that we care about (when the sorted processor is the first or last processor). */ /* Create a new communications schedule for a given number of processors. The schedule is initialized to a deadlock-free, maximum overlap schedule. Returns NULL on an error (may print a message to stderr if there is a program bug detected). */ int **make_comm_schedule(int npes) { int **sched; int i; sched = (int **) fftw_malloc(sizeof(int *) * npes); if (!sched) return NULL; for (i = 0; i < npes; ++i) sched[i] = NULL; for (i = 0; i < npes; ++i) { sched[i] = (int *) fftw_malloc(sizeof(int) * 10 * (npes + 1)); if (!sched[i]) { free_comm_schedule(sched,npes); return NULL; } } empty_comm_schedule(sched,npes); fill_comm_schedule(sched,npes); if (!check_comm_schedule(sched,npes)) { free_comm_schedule(sched,npes); return NULL; } return sched; } void free_comm_schedule(int **sched, int npes) { if (sched) { int i; for (i = 0; i < npes; ++i) fftw_free(sched[i]); fftw_free(sched); } } void empty_comm_schedule(int **sched, int npes) { int i; for (i = 0; i < npes; ++i) sched[i][0] = -1; } static void add_dest_to_comm_schedule(int **sched, int pe, int dest) { int i; for (i = 0; sched[pe][i] != -1; ++i) ; sched[pe][i] = dest; sched[pe][i+1] = -1; } static void add_pair_to_comm_schedule(int **sched, int pe1, int pe2) { add_dest_to_comm_schedule(sched, pe1, pe2); if (pe1 != pe2) add_dest_to_comm_schedule(sched, pe2, pe1); } /* Simplification of algorithm presented in [1] (we have fewer constraints). Produces a perfect schedule if npes is even; otherwise contains one unavoidable extra step. */ void fill_comm_schedule(int **sched, int npes) { int pe, i, n; for (pe = 0; pe < npes; ++pe) add_pair_to_comm_schedule(sched,pe,pe); if (npes % 2 == 0) n = npes; else n = npes + 1; for (pe = 0; pe < n - 1; ++pe) { if (pe != npes - 1) add_pair_to_comm_schedule(sched,pe,npes - 1); for (i = 1; i < n/2; ++i) { int pe_a, pe_b; pe_a = pe - i; if (pe_a < 0) pe_a += n - 1; pe_b = (pe + i) % (n - 1); if (pe_a != npes - 1 && pe_b != npes - 1) add_pair_to_comm_schedule(sched,pe_a,pe_b); } } } /* Below, we have various checks in case of bugs: */ /* check for deadlocks by simulating the schedule and looking for cycles in the dependency list; returns 0 if there are deadlocks (or other errors) */ static int check_schedule_deadlock(int **sched, int npes) { int *step, *depend, *visited, pe, pe2, period, done = 0; int counter = 0; /* step[pe] is the step in the schedule that a given pe is on */ step = (int *) fftw_malloc(sizeof(int) * npes); /* depend[pe] is the pe' that pe is currently waiting for a message from (-1 if none) */ depend = (int *) fftw_malloc(sizeof(int) * npes); /* visited[pe] tells whether we have visited the current pe already when we are looking for cycles. */ visited = (int *) fftw_malloc(sizeof(int) * npes); if (!step || !depend || !visited) { fftw_free(step); fftw_free(depend); fftw_free(visited); return 0; } for (pe = 0; pe < npes; ++pe) step[pe] = 0; while (!done) { ++counter; for (pe = 0; pe < npes; ++pe) depend[pe] = sched[pe][step[pe]]; /* now look for cycles in the dependencies with period > 2: */ for (pe = 0; pe < npes; ++pe) if (depend[pe] != -1) { for (pe2 = 0; pe2 < npes; ++pe2) visited[pe2] = 0; period = 0; pe2 = pe; do { visited[pe2] = period + 1; pe2 = depend[pe2]; period++; } while (pe2 != -1 && !visited[pe2]); if (pe2 == -1) { fprintf(stderr, "BUG: unterminated cycle in schedule!\n"); fftw_free(step); fftw_free(depend); fftw_free(visited); return 0; } if (period - (visited[pe2] - 1) > 2) { fprintf(stderr,"BUG: deadlock in schedule!\n"); fftw_free(step); fftw_free(depend); fftw_free(visited); return 0; } if (pe2 == pe) step[pe]++; } done = 1; for (pe = 0; pe < npes; ++pe) if (sched[pe][step[pe]] != -1) { done = 0; break; } } fftw_free(step); fftw_free(depend); fftw_free(visited); return (counter > 0 ? counter : 1); } /* sanity checks; prints message and returns 0 on failure. undocumented feature: the return value on success is actually the number of steps required for the schedule to complete, counting stalls. */ int check_comm_schedule(int **sched, int npes) { int pe, i, comm_pe; for (pe = 0; pe < npes; ++pe) { for (comm_pe = 0; comm_pe < npes; ++comm_pe) { for (i = 0; sched[pe][i] != -1 && sched[pe][i] != comm_pe; ++i) ; if (sched[pe][i] == -1) { fprintf(stderr,"BUG: schedule never sends message from " "%d to %d.\n",pe,comm_pe); return 0; /* never send message to comm_pe */ } } for (i = 0; sched[pe][i] != -1; ++i) ; if (i != npes) { fprintf(stderr,"BUG: schedule sends too many messages from " "%d\n",pe); return 0; } } return check_schedule_deadlock(sched,npes); } /* invert the order of all the schedules; this has no effect on its required properties. */ void invert_comm_schedule(int **sched, int npes) { int pe, i; for (pe = 0; pe < npes; ++pe) for (i = 0; i < npes/2; ++i) { int dummy = sched[pe][i]; sched[pe][i] = sched[pe][npes-1-i]; sched[pe][npes-1-i] = dummy; } } /* Relabel pe1 <-> pe2 in all the schedules. The required schedule properties are invariant under this operation. */ static void comm_schedule_swap(int **sched, int npes, int pe1, int pe2) { int pe, i, *dummy; for (pe = 0; pe < npes; ++pe) for (i = 0; sched[pe][i] != -1; ++i) { if (sched[pe][i] == pe1) sched[pe][i] = pe2; else if (sched[pe][i] == pe2) sched[pe][i] = pe1; } dummy = sched[pe1]; sched[pe1] = sched[pe2]; sched[pe2] = dummy; } /* Sort the schedule for sort_pe in ascending order of processor index. Unfortunately, for odd npes (when schedule has a stall to begin with) this will introduce an extra stall due to the motion of the self-communication past a stall. We could fix this if it were really important. Actually, we don't get an extra stall when sort_pe == 0 or npes-1, which is sufficient for our purposes. */ void sort_comm_schedule(int **sched, int npes, int sort_pe) { int i,j,pe; /* Note that we can do this sort in O(npes) swaps because we know that the numbers we are sorting are just 0...npes-1. */ /* find self-communication: */ for (i = 0; i < npes; ++i) if (sched[sort_pe][i] == sort_pe) break; if (i == npes) { fprintf(stderr,"BUG: missing self-communication for %d.",sort_pe); exit(1); } /* Note that, to maintain communications overlap, we perform the same shift on the self-communication for all pe's. The self-communication is always at the same step for all pe's (this invariant is maintained both by this operation and by comm_schedule_swap). */ /* shift self-communications to the correct place: -- this has to be done separately because we cannot perform simple swaps of the self-communication elements */ for (pe = 0; pe < npes; ++pe) { if (sched[pe][i] != pe) { fprintf(stderr, "BUG: self-communication isn't at fixed step."); exit(1); } for (j = i; j+1 < npes; ++j) sched[pe][j] = sched[pe][j+1]; for (j = npes - 2; j >= sort_pe; --j) sched[pe][j+1] = sched[pe][j]; sched[pe][sort_pe] = pe; } /* Move the remaining items to their sorted positions: */ for (pe = 0; pe < npes; ++pe) if (pe != sort_pe) { for (j = 0; j < npes; ++j) if (sched[sort_pe][j] == pe) break; if (j == npes) { fprintf(stderr,"BUG: missing %d in %d schedule.", pe, sort_pe); exit(1); } /* move communications with pe to correct position: */ comm_schedule_swap(sched,npes, sched[sort_pe][pe], sched[sort_pe][j]); } } /* print the schedule (for debugging purposes) */ void print_comm_schedule(int **sched, int npes) { int pe, i, width; if (npes < 10) width = 1; else if (npes < 100) width = 2; else width = 3; for (pe = 0; pe < npes; ++pe) { printf("pe %*d schedule:", width, pe); for (i = 0; sched[pe][i] != -1; ++i) printf(" %*d",width,sched[pe][i]); printf("\n"); } } fftw-2.1.5/mpi/sched.h0000644000175400001440000000261407635206027010204 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef SCHED_H #define SCHED_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern void free_comm_schedule(int **sched, int npes); extern void empty_comm_schedule(int **sched, int npes); extern int **make_comm_schedule(int npes); extern void fill_comm_schedule(int **sched, int npes); extern int check_comm_schedule(int **sched, int npes); extern void invert_comm_schedule(int **sched, int npes); extern void sort_comm_schedule(int **sched, int npes, int sort_pe); extern void print_comm_schedule(int **sched, int npes); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* SCHED_H */ fftw-2.1.5/mpi/TOMS_transpose.c0000644000175400001440000001636307635206027011777 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * TOMS Transpose. Revised version of algorithm 380. * * These routines do in-place transposes of arrays. * * [ Cate, E.G. and Twigg, D.W., ACM Transactions on Mathematical Software, * vol. 3, no. 1, 104-110 (1977) ] * * C version by Steven G. Johnson. February 1997. */ #include #include #include "TOMS_transpose.h" static int TOMS_gcd(int a, int b); /* * "a" is a 1D array of length ny*nx which constains the nx x ny matrix to be * transposed. "a" is stored in C order (last index varies fastest). move * is a 1D array of length move_size used to store information to speed up * the process. The value move_size=(ny+nx)/2 is recommended. * * The return value indicates the success or failure of the routine. Returns 0 * if okay, -1 if ny or nx < 0, and -2 if move_size < 1. The return value * should never be positive, but it it is, it is set to the final position in * a when the search is completed but some elements have not been moved. * * Note: move[i] will stay zero for fixed points. */ short TOMS_transpose_2d(TOMS_el_type * a, int nx, int ny, char *move, int move_size) { int i, j, im, mn; TOMS_el_type b, c, d; int ncount; int k; /* check arguments and initialize: */ if (ny < 0 || nx < 0) return -1; if (ny < 2 || nx < 2) return 0; if (move_size < 1) return -2; if (ny == nx) { /* * if matrix is square, exchange elements a(i,j) and a(j,i): */ for (i = 0; i < nx; ++i) for (j = i + 1; j < nx; ++j) { b = a[i + j * nx]; a[i + j * nx] = a[j + i * nx]; a[j + i * nx] = b; } return 0; } ncount = 2; /* always at least 2 fixed points */ k = (mn = ny * nx) - 1; for (i = 0; i < move_size; ++i) move[i] = 0; if (ny >= 3 && nx >= 3) ncount += TOMS_gcd(ny - 1, nx - 1) - 1; /* # fixed points */ i = 1; im = ny; while (1) { int i1, i2, i1c, i2c; int kmi; /** Rearrange the elements of a loop and its companion loop: **/ i1 = i; kmi = k - i; b = a[i1]; i1c = kmi; c = a[i1c]; while (1) { i2 = ny * i1 - k * (i1 / nx); i2c = k - i2; if (i1 < move_size) move[i1] = 1; if (i1c < move_size) move[i1c] = 1; ncount += 2; if (i2 == i) break; if (i2 == kmi) { d = b; b = c; c = d; break; } a[i1] = a[i2]; a[i1c] = a[i2c]; i1 = i2; i1c = i2c; } a[i1] = b; a[i1c] = c; if (ncount >= mn) break; /* we've moved all elements */ /** Search for loops to rearrange: **/ while (1) { int max; max = k - i; ++i; if (i > max) return i; im += ny; if (im > k) im -= k; i2 = im; if (i == i2) continue; if (i >= move_size) { while (i2 > i && i2 < max) { i1 = i2; i2 = ny * i1 - k * (i1 / nx); } if (i2 == i) break; } else if (!move[i]) break; } } return 0; } /* * "a" is a 1D array of length ny*nx which constains the nx x ny matrix to be * transposed. "a" is stored in C order (last index varies fastest). move * is a 1D array of length move_size used to store information to speed up * the process. The value move_size=(ny+nx)/2 is recommended. * * Here, instead of each element of "a" being a single value of type * TOMS_el_type, each element is el_size values of type TOMS_el_type. * * The return value indicates the success or failure of the routine. Returns 0 * if okay, -1 if ny or nx < 0, and -2 if move_size < 1. Also, returns -3 if * it ran out of memory. The return value should never be positive, but it * it is, it is set to the final position in a when the search is completed * but some elements have not been moved. * * Note: move[i] will stay zero for fixed points. */ short TOMS_transpose_2d_arbitrary(TOMS_el_type * a, int nx, int ny, int el_size, char *move, int move_size) { int i, j, im, mn; TOMS_el_type *b, *c, *d; int ncount; int k; /* check arguments and initialize: */ if (ny < 0 || nx < 0) return -1; if (ny < 2 || nx < 2 || el_size < 1) return 0; if (move_size < 1) return -2; b = (TOMS_el_type *) malloc(sizeof(TOMS_el_type) * el_size); if (!b) return -3; if (ny == nx) { /* * if matrix is square, exchange elements a(i,j) and a(j,i): */ for (i = 0; i < nx; ++i) for (j = i + 1; j < nx; ++j) { memcpy(b, &a[el_size * (i + j * nx)], el_size * sizeof(TOMS_el_type)); memcpy(&a[el_size * (i + j * nx)], &a[el_size * (j + i * nx)], el_size * sizeof(TOMS_el_type)); memcpy(&a[el_size * (j + i * nx)], b, el_size * sizeof(TOMS_el_type)); } free(b); return 0; } c = (TOMS_el_type *) malloc(sizeof(TOMS_el_type) * el_size); if (!c) { free(b); return -3; } ncount = 2; /* always at least 2 fixed points */ k = (mn = ny * nx) - 1; for (i = 0; i < move_size; ++i) move[i] = 0; if (ny >= 3 && nx >= 3) ncount += TOMS_gcd(ny - 1, nx - 1) - 1; /* # fixed points */ i = 1; im = ny; while (1) { int i1, i2, i1c, i2c; int kmi; /** Rearrange the elements of a loop and its companion loop: **/ i1 = i; kmi = k - i; memcpy(b, &a[el_size * i1], el_size * sizeof(TOMS_el_type)); i1c = kmi; memcpy(c, &a[el_size * i1c], el_size * sizeof(TOMS_el_type)); while (1) { i2 = ny * i1 - k * (i1 / nx); i2c = k - i2; if (i1 < move_size) move[i1] = 1; if (i1c < move_size) move[i1c] = 1; ncount += 2; if (i2 == i) break; if (i2 == kmi) { d = b; b = c; c = d; break; } memcpy(&a[el_size * i1], &a[el_size * i2], el_size * sizeof(TOMS_el_type)); memcpy(&a[el_size * i1c], &a[el_size * i2c], el_size * sizeof(TOMS_el_type)); i1 = i2; i1c = i2c; } memcpy(&a[el_size * i1], b, el_size * sizeof(TOMS_el_type)); memcpy(&a[el_size * i1c], c, el_size * sizeof(TOMS_el_type)); if (ncount >= mn) break; /* we've moved all elements */ /** Search for loops to rearrange: **/ while (1) { int max; max = k - i; ++i; if (i > max) { free(b); free(c); return i; } im += ny; if (im > k) im -= k; i2 = im; if (i == i2) continue; if (i >= move_size) { while (i2 > i && i2 < max) { i1 = i2; i2 = ny * i1 - k * (i1 / nx); } if (i2 == i) break; } else if (!move[i]) break; } } free(b); free(c); return 0; } static int TOMS_gcd(int a, int b) { int r; do { r = a % b; a = b; b = r; } while (r != 0); return a; } fftw-2.1.5/mpi/TOMS_transpose.h0000644000175400001440000000267607635206027012006 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef TOMS_TRANSPOSE_H #define TOMS_TRANSPOSE_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "fftw_mpi.h" typedef TRANSPOSE_EL_TYPE TOMS_el_type; short TOMS_transpose_2d(TOMS_el_type * a, int nx, int ny, char *move, int move_size); short TOMS_transpose_2d_arbitrary(TOMS_el_type * a, int nx, int ny, int el_size, char *move, int move_size); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* TOMS_TRANSPOSE_H */ fftw-2.1.5/mpi/transpose_mpi.c0000644000175400001440000004742507635206027012005 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include "fftw_mpi.h" #include "sched.h" #include "TOMS_transpose.h" /**************************************************************************/ static int transpose_mpi_get_block_size(int n, int n_pes) { return((n + n_pes - 1) / n_pes); } void transpose_mpi_get_local_size(int n, int my_pe, int n_pes, int *local_n, int *local_start) { int block_size; block_size = transpose_mpi_get_block_size(n,n_pes); n_pes = (n + block_size - 1) / block_size; if (my_pe >= n_pes) { *local_n = 0; *local_start = 0; } else { *local_start = my_pe * block_size; if (my_pe == n_pes - 1) *local_n = n - *local_start; else *local_n = block_size; } } #define MAX2(a,b) ((a) > (b) ? (a) : (b)) int transpose_mpi_get_local_storage_size(int nx, int ny, int my_pe, int n_pes) { int local_nx, local_ny, local_x_start, local_y_start; transpose_mpi_get_local_size(nx,my_pe,n_pes,&local_nx,&local_x_start); transpose_mpi_get_local_size(ny,my_pe,n_pes,&local_ny,&local_y_start); return MAX2(1, MAX2(local_nx*ny, nx*local_ny)); } static int gcd(int a, int b) { int r; do { r = a % b; a = b; b = r; } while (r != 0); return a; } /**************************************************************************/ transpose_mpi_plan transpose_mpi_create_plan(int nx, int ny, MPI_Comm transpose_comm) { transpose_mpi_plan p; int my_pe, n_pes, pe; int x_block_size, local_nx, local_x_start; int y_block_size, local_ny, local_y_start; transpose_mpi_exchange *exchange = 0; int step, send_block_size = 0, recv_block_size = 0, num_steps = 0; int **sched, sched_npes, sched_sortpe, sched_sort_ascending = 0; int *perm_block_dest = NULL; int num_perm_blocks = 0, perm_block_size = 0, perm_block; char *move = NULL; int move_size = 0; int *send_block_sizes = 0, *send_block_offsets = 0; int *recv_block_sizes = 0, *recv_block_offsets = 0; MPI_Comm comm; /* create a new "clone" communicator so that transpose communications do not interfere with caller communications. */ MPI_Comm_dup(transpose_comm, &comm); MPI_Comm_rank(comm,&my_pe); MPI_Comm_size(comm,&n_pes); /* work space for in-place transpose routine: */ move_size = (nx + ny) / 2; move = (char *) fftw_malloc(sizeof(char) * move_size); x_block_size = transpose_mpi_get_block_size(nx,n_pes); transpose_mpi_get_local_size(nx,my_pe,n_pes,&local_nx,&local_x_start); y_block_size = transpose_mpi_get_block_size(ny,n_pes); transpose_mpi_get_local_size(ny,my_pe,n_pes,&local_ny,&local_y_start); /* allocate pre-computed post-transpose permutation: */ perm_block_size = gcd(nx,x_block_size); num_perm_blocks = (nx / perm_block_size) * local_ny; perm_block_dest = (int *) fftw_malloc(sizeof(int) * num_perm_blocks); for (perm_block = 0; perm_block < num_perm_blocks; ++perm_block) perm_block_dest[perm_block] = num_perm_blocks; /* allocate block sizes/offsets arrays for out-of-place transpose: */ send_block_sizes = (int *) fftw_malloc(n_pes * sizeof(int)); send_block_offsets = (int *) fftw_malloc(n_pes * sizeof(int)); recv_block_sizes = (int *) fftw_malloc(n_pes * sizeof(int)); recv_block_offsets = (int *) fftw_malloc(n_pes * sizeof(int)); for (step = 0; step < n_pes; ++step) send_block_sizes[step] = send_block_offsets[step] = recv_block_sizes[step] = recv_block_offsets[step] = 0; if (local_nx > 0 || local_ny > 0) { sched_npes = n_pes; sched_sortpe = -1; for (pe = 0; pe < n_pes; ++pe) { int pe_nx, pe_x_start, pe_ny, pe_y_start; transpose_mpi_get_local_size(nx,pe,n_pes, &pe_nx,&pe_x_start); transpose_mpi_get_local_size(ny,pe,n_pes, &pe_ny,&pe_y_start); if (pe_nx == 0 && pe_ny == 0) { sched_npes = pe; break; } else if (pe_nx * y_block_size != pe_ny * x_block_size && pe_nx != 0 && pe_ny != 0) { if (sched_sortpe != -1) fftw_mpi_die("BUG: More than one PE needs sorting!\n"); sched_sortpe = pe; sched_sort_ascending = pe_nx * y_block_size > pe_ny * x_block_size; } } sched = make_comm_schedule(sched_npes); if (!sched) { MPI_Comm_free(&comm); return 0; } if (sched_sortpe != -1) { sort_comm_schedule(sched,sched_npes,sched_sortpe); if (!sched_sort_ascending) invert_comm_schedule(sched,sched_npes); } send_block_size = local_nx * y_block_size; recv_block_size = local_ny * x_block_size; num_steps = sched_npes; exchange = (transpose_mpi_exchange *) fftw_malloc(num_steps * sizeof(transpose_mpi_exchange)); if (!exchange) { free_comm_schedule(sched,sched_npes); MPI_Comm_free(&comm); return 0; } for (step = 0; step < sched_npes; ++step) { int dest_pe; int dest_nx, dest_x_start; int dest_ny, dest_y_start; int num_perm_blocks_received, num_perm_rows_received; exchange[step].dest_pe = dest_pe = exchange[step].block_num = sched[my_pe][step]; if (exchange[step].block_num == -1) fftw_mpi_die("BUG: schedule ended too early.\n"); transpose_mpi_get_local_size(nx,dest_pe,n_pes, &dest_nx,&dest_x_start); transpose_mpi_get_local_size(ny,dest_pe,n_pes, &dest_ny,&dest_y_start); exchange[step].send_size = local_nx * dest_ny; exchange[step].recv_size = dest_nx * local_ny; send_block_sizes[dest_pe] = exchange[step].send_size; send_block_offsets[dest_pe] = dest_pe * send_block_size; recv_block_sizes[dest_pe] = exchange[step].recv_size; recv_block_offsets[dest_pe] = dest_pe * recv_block_size; /* Precompute the post-transpose permutation (ugh): */ if (exchange[step].recv_size > 0) { num_perm_blocks_received = exchange[step].recv_size / perm_block_size; num_perm_rows_received = num_perm_blocks_received / local_ny; for (perm_block = 0; perm_block < num_perm_blocks_received; ++perm_block) { int old_block, new_block; old_block = perm_block + exchange[step].block_num * (recv_block_size / perm_block_size); new_block = perm_block % num_perm_rows_received + dest_x_start / perm_block_size + (perm_block / num_perm_rows_received) * (nx / perm_block_size); if (old_block >= num_perm_blocks || new_block >= num_perm_blocks) fftw_mpi_die("bad block index in permutation!"); perm_block_dest[old_block] = new_block; } } } free_comm_schedule(sched,sched_npes); } /* if (local_nx > 0 || local_ny > 0) */ p = (transpose_mpi_plan) fftw_malloc(sizeof(transpose_mpi_plan_struct)); if (!p) { fftw_free(exchange); MPI_Comm_free(&comm); return 0; } p->comm = comm; p->nx = nx; p->ny = ny; p->local_nx = local_nx; p->local_ny = local_ny; p->my_pe = my_pe; p->n_pes = n_pes; p->exchange = exchange; p->send_block_size = send_block_size; p->recv_block_size = recv_block_size; p->num_steps = num_steps; p->perm_block_dest = perm_block_dest; p->num_perm_blocks = num_perm_blocks; p->perm_block_size = perm_block_size; p->move = move; p->move_size = move_size; p->send_block_sizes = send_block_sizes; p->send_block_offsets = send_block_offsets; p->recv_block_sizes = recv_block_sizes; p->recv_block_offsets = recv_block_offsets; p->all_blocks_equal = send_block_size * n_pes * n_pes == nx * ny && recv_block_size * n_pes * n_pes == nx * ny; if (p->all_blocks_equal) for (step = 0; step < n_pes; ++step) if (send_block_sizes[step] != send_block_size || recv_block_sizes[step] != recv_block_size) { p->all_blocks_equal = 0; break; } if (nx % n_pes == 0 && ny % n_pes == 0 && !p->all_blocks_equal) fftw_mpi_die("n_pes divided dimensions but blocks are unequal!"); /* Set the type constant for passing to the MPI routines; here, we assume that TRANSPOSE_EL_TYPE is one of the floating-point types. */ if (sizeof(TRANSPOSE_EL_TYPE) == sizeof(double)) p->el_type = MPI_DOUBLE; else if (sizeof(TRANSPOSE_EL_TYPE) == sizeof(float)) p->el_type = MPI_FLOAT; else fftw_mpi_die("Unknown TRANSPOSE_EL_TYPE!\n"); return p; } /**************************************************************************/ void transpose_mpi_destroy_plan(transpose_mpi_plan p) { if (p) { if (p->exchange) fftw_free(p->exchange); if (p->perm_block_dest) fftw_free(p->perm_block_dest); if (p->move) fftw_free(p->move); if (p->send_block_sizes) fftw_free(p->send_block_sizes); if (p->send_block_offsets) fftw_free(p->send_block_offsets); if (p->recv_block_sizes) fftw_free(p->recv_block_sizes); if (p->recv_block_offsets) fftw_free(p->recv_block_offsets); MPI_Comm_free(&p->comm); fftw_free(p); } } /**************************************************************************/ static void exchange_elements(TRANSPOSE_EL_TYPE *buf1, TRANSPOSE_EL_TYPE *buf2, int n) { int i; TRANSPOSE_EL_TYPE t0,t1,t2,t3; for (i = 0; i < (n & 3); ++i) { t0 = buf1[i]; buf1[i] = buf2[i]; buf2[i] = t0; } for (; i < n; i += 4) { t0 = buf1[i]; t1 = buf1[i+1]; t2 = buf1[i+2]; t3 = buf1[i+3]; buf1[i] = buf2[i]; buf1[i+1] = buf2[i+1]; buf1[i+2] = buf2[i+2]; buf1[i+3] = buf2[i+3]; buf2[i] = t0; buf2[i+1] = t1; buf2[i+2] = t2; buf2[i+3] = t3; } } static void do_permutation(TRANSPOSE_EL_TYPE *data, int *perm_block_dest, int num_perm_blocks, int perm_block_size) { int start_block; /* Perform the permutation in the perm_block_dest array, following the cycles around and *changing* the perm_block_dest array to reflect the permutations that have already been performed. At the end of this routine, we change the perm_block_dest array back to its original state. (ugh) */ for (start_block = 0; start_block < num_perm_blocks; ++start_block) { int cur_block = start_block; int new_block = perm_block_dest[start_block]; while (new_block > 0 && new_block < num_perm_blocks && new_block != start_block) { exchange_elements(data + perm_block_size*start_block, data + perm_block_size*new_block, perm_block_size); perm_block_dest[cur_block] = -1 - new_block; cur_block = new_block; new_block = perm_block_dest[cur_block]; } if (new_block == start_block) perm_block_dest[cur_block] = -1 - new_block; } /* reset the permutation array (ugh): */ for (start_block = 0; start_block < num_perm_blocks; ++start_block) perm_block_dest[start_block] = -1 - perm_block_dest[start_block]; } TRANSPOSE_EL_TYPE *transpose_allocate_send_buf(transpose_mpi_plan p, int el_size) { TRANSPOSE_EL_TYPE *send_buf = 0; /* allocate the send buffer: */ if (p->send_block_size > 0) { send_buf = (TRANSPOSE_EL_TYPE *) fftw_malloc(p->send_block_size * el_size * sizeof(TRANSPOSE_EL_TYPE)); if (!send_buf) fftw_mpi_die("Out of memory!\n"); } return send_buf; } void transpose_in_place_local(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, transpose_in_place_which which) { switch (which) { case BEFORE_TRANSPOSE: if (el_size == 1) TOMS_transpose_2d(local_data, p->local_nx, p->ny, p->move, p->move_size); else TOMS_transpose_2d_arbitrary(local_data, p->local_nx, p->ny, el_size, p->move, p->move_size); break; case AFTER_TRANSPOSE: do_permutation(local_data, p->perm_block_dest, p->num_perm_blocks, p->perm_block_size * el_size); break; } } /**************************************************************************/ static void local_transpose_copy(TRANSPOSE_EL_TYPE *src, TRANSPOSE_EL_TYPE *dest, int el_size, int nx, int ny) { int x, y; if (el_size == 1) for (x = 0; x < nx; ++x) for (y = 0; y < ny; ++y) dest[y * nx + x] = src[x * ny + y]; else if (el_size == 2) for (x = 0; x < nx; ++x) for (y = 0; y < ny; ++y) { dest[y * (2 * nx) + 2*x] = src[x * (2 * ny) + 2*y]; dest[y * (2 * nx) + 2*x + 1] = src[x * (2 * ny) + 2*y + 1]; } else for (x = 0; x < nx; ++x) for (y = 0; y < ny; ++y) memcpy(&dest[y * (el_size*nx) + (el_size*x)], &src[x * (el_size*ny) + (el_size*y)], el_size * sizeof(TRANSPOSE_EL_TYPE)); } /* Out-of-place version of transpose_mpi (or rather, in place using a scratch array): */ static void transpose_mpi_out_of_place(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, TRANSPOSE_EL_TYPE *work) { local_transpose_copy(local_data, work, el_size, p->local_nx, p->ny); if (p->all_blocks_equal) MPI_Alltoall(work, p->send_block_size * el_size, p->el_type, local_data, p->recv_block_size * el_size, p->el_type, p->comm); else { int i, n_pes = p->n_pes; for (i = 0; i < n_pes; ++i) { p->send_block_sizes[i] *= el_size; p->recv_block_sizes[i] *= el_size; p->send_block_offsets[i] *= el_size; p->recv_block_offsets[i] *= el_size; } MPI_Alltoallv(work, p->send_block_sizes, p->send_block_offsets, p->el_type, local_data, p->recv_block_sizes, p->recv_block_offsets, p->el_type, p->comm); for (i = 0; i < n_pes; ++i) { p->send_block_sizes[i] /= el_size; p->recv_block_sizes[i] /= el_size; p->send_block_offsets[i] /= el_size; p->recv_block_offsets[i] /= el_size; } } do_permutation(local_data, p->perm_block_dest, p->num_perm_blocks, p->perm_block_size * el_size); } /**************************************************************************/ void transpose_mpi(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, TRANSPOSE_EL_TYPE *work) { /* if local_data and work are both NULL, we have no way of knowing whether we should use in-place or out-of-place transpose routine; if we guess wrong, MPI_Alltoall will block. We prevent this by making sure that transpose_mpi_get_local_storage_size returns at least 1. */ if (!local_data && !work) fftw_mpi_die("local_data and work are both NULL!"); if (work) transpose_mpi_out_of_place(p, el_size, local_data, work); else if (p->local_nx > 0 || p->local_ny > 0) { int step; TRANSPOSE_EL_TYPE *send_buf = transpose_allocate_send_buf(p,el_size); transpose_in_place_local(p, el_size, local_data, BEFORE_TRANSPOSE); for (step = 0; step < p->num_steps; ++step) { transpose_finish_exchange_step(p, step - 1); transpose_start_exchange_step(p, el_size, local_data, send_buf, step, TRANSPOSE_SYNC); } transpose_finish_exchange_step(p, step - 1); transpose_in_place_local(p, el_size, local_data, AFTER_TRANSPOSE); if (send_buf) fftw_free(send_buf); } /* if (local_nx > 0 || local_ny > 0) */ } /**************************************************************************/ /* non-blocking routines for overlapping communication and computation: */ #define USE_SYNCHRONOUS_ISEND 1 #if USE_SYNCHRONOUS_ISEND #define ISEND MPI_Issend #else #define ISEND MPI_Isend #endif void transpose_get_send_block(transpose_mpi_plan p, int step, int *block_y_start, int *block_ny) { if (p->local_nx > 0) { *block_y_start = p->send_block_size / p->local_nx * p->exchange[step].block_num; *block_ny = p->exchange[step].send_size / p->local_nx; } else { *block_y_start = 0; *block_ny = 0; } } void transpose_start_exchange_step(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, TRANSPOSE_EL_TYPE *send_buf, int step, transpose_sync_type sync_type) { if (p->local_nx > 0 || p->local_ny > 0) { transpose_mpi_exchange *exchange = p->exchange; int block = exchange[step].block_num; int send_block_size = p->send_block_size; int recv_block_size = p->recv_block_size; if (exchange[step].dest_pe != p->my_pe) { /* first, copy to send buffer: */ if (exchange[step].send_size > 0) memcpy(send_buf, local_data + el_size*send_block_size*block, el_size * exchange[step].send_size * sizeof(TRANSPOSE_EL_TYPE)); #define DO_ISEND \ if (exchange[step].send_size > 0) { \ ISEND(send_buf, \ exchange[step].send_size * el_size, \ p->el_type, \ exchange[step].dest_pe, 0, \ p->comm, \ &p->request[0]); \ } p->request[0] = MPI_REQUEST_NULL; p->request[1] = MPI_REQUEST_NULL; if (sync_type == TRANSPOSE_ASYNC) { /* Note that we impose an ordering on the sends and receives (lower pe sends first) so that we won't have deadlock if Isend & Irecv are blocking in some MPI implementation: */ if (p->my_pe < exchange[step].dest_pe) DO_ISEND; if (exchange[step].recv_size > 0) { MPI_Irecv(local_data + el_size*recv_block_size*block, exchange[step].recv_size * el_size, p->el_type, exchange[step].dest_pe, MPI_ANY_TAG, p->comm, &p->request[1]); } if (p->my_pe > exchange[step].dest_pe) DO_ISEND; } else /* (sync_type == TRANSPOSE_SYNC) */ { MPI_Status status; MPI_Sendrecv(send_buf, exchange[step].send_size * el_size, p->el_type, exchange[step].dest_pe, 0, local_data + el_size*recv_block_size*block, exchange[step].recv_size * el_size, p->el_type, exchange[step].dest_pe, MPI_ANY_TAG, p->comm, &status); } } else if (exchange[step].recv_size > 0 && recv_block_size != send_block_size) memmove(local_data + el_size*recv_block_size*block, local_data + el_size*send_block_size*block, exchange[step].recv_size * el_size * sizeof(TRANSPOSE_EL_TYPE)); } } void transpose_finish_exchange_step(transpose_mpi_plan p, int step) { if ((p->local_nx > 0 || p->local_ny > 0) && step >= 0 && p->exchange[step].dest_pe != p->my_pe) { MPI_Status status[2]; MPI_Waitall(2,p->request,status); } } fftw-2.1.5/mpi/fftwnd_mpi.c0000644000175400001440000001356407635206027011254 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include "fftw_mpi.h" /***************************** Plan Creation ****************************/ fftwnd_mpi_plan fftwnd_mpi_create_plan(MPI_Comm comm, int rank, const int *n, fftw_direction dir, int flags) { fftwnd_mpi_plan p; if (rank < 2) return 0; p = (fftwnd_mpi_plan) fftw_malloc(sizeof(fftwnd_mpi_plan_data)); p->p_fft_x = 0; p->p_fft = 0; p->p_transpose = 0; p->p_transpose_inv = 0; p->work = 0; p->p_fft_x = fftw_create_plan(n[0], dir, flags | FFTW_IN_PLACE); p->p_fft = fftwnd_create_plan(rank - 1, n + 1, dir, flags | FFTW_IN_PLACE); if (!p->p_fft) fftwnd_mpi_destroy_plan(p); p->p_transpose = transpose_mpi_create_plan(n[0], n[1], comm); if (!p->p_transpose) fftwnd_mpi_destroy_plan(p); p->p_transpose_inv = transpose_mpi_create_plan(n[1], n[0], comm); if (!p->p_transpose_inv) fftwnd_mpi_destroy_plan(p); if (n[0] > p->p_fft->nwork) p->work = (fftw_complex *) fftw_malloc(n[0] * sizeof(fftw_complex)); return p; } fftwnd_mpi_plan fftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags) { int n[2]; n[0] = nx; n[1] = ny; return fftwnd_mpi_create_plan(comm, 2, n, dir, flags); } fftwnd_mpi_plan fftw3d_mpi_create_plan(MPI_Comm comm, int nx, int ny, int nz, fftw_direction dir, int flags) { int n[3]; n[0] = nx; n[1] = ny; n[2] = nz; return fftwnd_mpi_create_plan(comm, 3, n, dir, flags); } /********************** Plan Destruction ************************/ void fftwnd_mpi_destroy_plan(fftwnd_mpi_plan p) { if (p) { if (p->p_fft_x) fftw_destroy_plan(p->p_fft_x); if (p->p_fft) fftwnd_destroy_plan(p->p_fft); if (p->p_transpose) transpose_mpi_destroy_plan(p->p_transpose); if (p->p_transpose_inv) transpose_mpi_destroy_plan(p->p_transpose_inv); if (p->work) fftw_free(p->work); fftw_free(p); } } void fftw_mpi_die(const char *error_string) { int my_pe; MPI_Comm_rank(MPI_COMM_WORLD, &my_pe); fprintf(stderr, "fftw process %d: %s", my_pe, error_string); MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE); } /********************* Getting Local Size ***********************/ void fftwnd_mpi_local_sizes(fftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size) { if (p) { transpose_mpi_get_local_size(p->p_transpose->nx, p->p_transpose->my_pe, p->p_transpose->n_pes, local_nx, local_x_start); transpose_mpi_get_local_size(p->p_transpose->ny, p->p_transpose->my_pe, p->p_transpose->n_pes, local_ny_after_transpose, local_y_start_after_transpose); *total_local_size = transpose_mpi_get_local_storage_size(p->p_transpose->nx, p->p_transpose->ny, p->p_transpose->my_pe, p->p_transpose->n_pes); *total_local_size *= p->p_fft->n_after[0]; } } /******************** Computing the Transform *******************/ void fftwnd_mpi(fftwnd_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work, fftwnd_mpi_output_order output_order) { int el_size = (sizeof(fftw_complex) / sizeof(TRANSPOSE_EL_TYPE)) * n_fields * p->p_fft->n_after[0]; if (n_fields <= 0) return; /* First, transform dimensions after the first, which are local to this process: */ { int local_nx = p->p_transpose->local_nx; int n_after_x = p->p_fft->n[0] * p->p_fft->n_after[0]; if (n_fields > 1) { fftwnd_plan p_fft = p->p_fft; int fft_iter; for (fft_iter = 0; fft_iter < local_nx; ++fft_iter) fftwnd(p_fft, n_fields, local_data + (n_after_x * n_fields) * fft_iter, n_fields, 1, NULL, 0, 0); } else fftwnd(p->p_fft, local_nx, local_data, 1, n_after_x, NULL, 0, 0); } /* Second, transpose the first dimension with the second dimension to bring the x dimension local to this process: */ transpose_mpi(p->p_transpose, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); /* Third, transform the x dimension, which is now local and contiguous: */ n_fields *= p->p_fft->n_after[0]; /* dimensions after y no longer need be considered separately from n_fields */ { int local_ny = p->p_transpose->local_ny; int nx = p->p_fft_x->n; fftw_complex *work_1d = p->work ? p->work : p->p_fft->work; if (n_fields > 1) { fftw_plan p_fft_x = p->p_fft_x; int fft_iter; for (fft_iter = 0; fft_iter < local_ny; ++fft_iter) fftw(p_fft_x, n_fields, local_data + (nx * n_fields) * fft_iter, n_fields, 1, work_1d, 1, 0); } else fftw(p->p_fft_x, local_ny, local_data, 1, nx, work_1d, 1, 0); } /* transpose back, if desired: */ if (output_order == FFTW_NORMAL_ORDER) transpose_mpi(p->p_transpose_inv, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); } fftw-2.1.5/mpi/fftw_mpi.c0000644000175400001440000002733507635206027010733 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include "fftw_mpi.h" #include "fftw-int.h" /************************** Twiddle Factors *****************************/ /* To conserve space, we share twiddle factor arrays between forward and backward plans and plans of the same size (just as in the uniprocessor transforms). */ static fftw_mpi_twiddle *fftw_mpi_twiddles = NULL; static fftw_mpi_twiddle *fftw_mpi_create_twiddle(int rows, int rowstart, int cols, int n) { fftw_mpi_twiddle *tw = fftw_mpi_twiddles; while (tw && (tw->rows != rows || tw->rowstart != rowstart || tw->cols != cols || tw->n != n)) tw = tw->next; if (tw) { tw->refcount++; return tw; } tw = (fftw_mpi_twiddle *) fftw_malloc(sizeof(fftw_mpi_twiddle)); tw->rows = rows; tw->rowstart = rowstart; tw->cols = cols; tw->n = n; tw->refcount = 1; tw->next = fftw_mpi_twiddles; { fftw_complex *W = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * rows * (cols - 1)); int j, i; FFTW_TRIG_REAL twoPiOverN = FFTW_K2PI / (FFTW_TRIG_REAL) n; for (j = 0; j < rows; ++j) for (i = 1; i < cols; ++i) { int k = (j * (cols - 1) - 1) + i; FFTW_TRIG_REAL ij = (FFTW_TRIG_REAL) (i * (j + rowstart)); c_re(W[k]) = FFTW_TRIG_COS(twoPiOverN * ij); c_im(W[k]) = FFTW_FORWARD * FFTW_TRIG_SIN(twoPiOverN * ij); } tw->W = W; } fftw_mpi_twiddles = tw; return tw; } static void fftw_mpi_destroy_twiddle(fftw_mpi_twiddle *tw) { if (tw) { tw->refcount--; if (tw->refcount == 0) { /* delete tw from fftw_mpi_twiddles list: */ if (fftw_mpi_twiddles == tw) fftw_mpi_twiddles = tw->next; else { fftw_mpi_twiddle *prev = fftw_mpi_twiddles; if (!prev) fftw_mpi_die("unexpected empty MPI twiddle list"); while (prev->next && prev->next != tw) prev = prev->next; if (prev->next != tw) fftw_mpi_die("tried to destroy unknown MPI twiddle"); prev->next = tw->next; } fftw_free(tw->W); fftw_free(tw); } } } /* multiply the array in d (of size tw->cols * n_fields) by the row cur_row of the twiddle factors pointed to by tw, given the transform direction. */ static void fftw_mpi_mult_twiddles(fftw_complex *d, int n_fields, int cur_row, fftw_mpi_twiddle *tw, fftw_direction dir) { int cols = tw->cols; fftw_complex *W = tw->W + cur_row * (cols - 1); int j; if (dir == FFTW_FORWARD) { if (n_fields > 1) for (j = 1; j < cols; ++j) { fftw_real w_re = c_re(W[j-1]), w_im = c_im(W[j-1]); int f; for (f = 0; f < n_fields; ++f) { fftw_real d_re = c_re(d[j*n_fields + f]), d_im = c_im(d[j*n_fields + f]); c_re(d[j*n_fields + f]) = w_re * d_re - w_im * d_im; c_im(d[j*n_fields + f]) = w_re * d_im + w_im * d_re; } } else for (j = 1; j < cols; ++j) { fftw_real w_re = c_re(W[j-1]), w_im = c_im(W[j-1]), d_re = c_re(d[j]), d_im = c_im(d[j]); c_re(d[j]) = w_re * d_re - w_im * d_im; c_im(d[j]) = w_re * d_im + w_im * d_re; } } else { /* FFTW_BACKWARDS */ /* same as above, except that W is complex-conjugated: */ if (n_fields > 1) for (j = 1; j < cols; ++j) { fftw_real w_re = c_re(W[j-1]), w_im = c_im(W[j-1]); int f; for (f = 0; f < n_fields; ++f) { fftw_real d_re = c_re(d[j*n_fields + f]), d_im = c_im(d[j*n_fields + f]); c_re(d[j*n_fields + f]) = w_re * d_re + w_im * d_im; c_im(d[j*n_fields + f]) = w_re * d_im - w_im * d_re; } } else for (j = 1; j < cols; ++j) { fftw_real w_re = c_re(W[j-1]), w_im = c_im(W[j-1]), d_re = c_re(d[j]), d_im = c_im(d[j]); c_re(d[j]) = w_re * d_re + w_im * d_im; c_im(d[j]) = w_re * d_im - w_im * d_re; } } } /***************************** Plan Creation ****************************/ /* return the factor of n closest to sqrt(n): */ static int find_sqrt_factor(int n) { int i = sqrt(n) + 0.5; int i2 = i - 1; while (i2 > 0) { if (n % i2 == 0) return i2; if (n % i == 0) return i; ++i; --i2; } return 1; /* n <= 1 */ } /* find the "best" r to divide n by for the FFT decomposition. Ideally, we would like both r and n/r to be divisible by the number of processes (for optimum load-balancing). Also, pick r to be close to sqrt(n) if possible. */ static int find_best_r(int n, MPI_Comm comm) { int n_pes; MPI_Comm_size(comm, &n_pes); if (n % n_pes == 0) { n /= n_pes; if (n % n_pes == 0) return (n_pes * find_sqrt_factor(n / n_pes)); else return (n_pes * find_sqrt_factor(n)); } else return find_sqrt_factor(n); } #define MAX2(a,b) ((a) > (b) ? (a) : (b)) fftw_mpi_plan fftw_mpi_create_plan(MPI_Comm comm, int n, fftw_direction dir, int flags) { fftw_mpi_plan p; int i, r, m; p = (fftw_mpi_plan) fftw_malloc(sizeof(struct fftw_mpi_plan_struct)); i = find_best_r(n, comm); if (dir == FFTW_FORWARD) m = n / (r = i); else r = n / (m = i); p->n = n; p->r = r; p->m = m; flags |= FFTW_IN_PLACE; p->flags = flags; p->dir = dir; p->pr = fftw_create_plan(r, dir, flags); p->pm = fftw_create_plan(m, dir, flags); p->p_transpose = transpose_mpi_create_plan(m, r, comm); p->p_transpose_inv = transpose_mpi_create_plan(r, m, comm); transpose_mpi_get_local_size(r, p->p_transpose_inv->my_pe, p->p_transpose_inv->n_pes, &p->local_r, &p->local_r_start); transpose_mpi_get_local_size(m, p->p_transpose->my_pe, p->p_transpose->n_pes, &p->local_m, &p->local_m_start); if (dir == FFTW_FORWARD) p->tw = fftw_mpi_create_twiddle(p->local_r, p->local_r_start, m, n); else p->tw = fftw_mpi_create_twiddle(p->local_m, p->local_m_start, r, n); p->fft_work = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * MAX2(m, r)); return p; } /********************* Getting Local Size ***********************/ void fftw_mpi_local_sizes(fftw_mpi_plan p, int *local_n, int *local_start, int *local_n_after_transform, int *local_start_after_transform, int *total_local_size) { if (p) { if (p->flags & FFTW_SCRAMBLED_INPUT) { *local_n = p->local_r * p->m; *local_start = p->local_r_start * p->m; } else { *local_n = p->local_m * p->r; *local_start = p->local_m_start * p->r; } if (p->flags & FFTW_SCRAMBLED_OUTPUT) { *local_n_after_transform = p->local_m * p->r; *local_start_after_transform = p->local_m_start * p->r; } else { *local_n_after_transform = p->local_r * p->m; *local_start_after_transform = p->local_r_start * p->m; } *total_local_size = transpose_mpi_get_local_storage_size(p->p_transpose->nx, p->p_transpose->ny, p->p_transpose->my_pe, p->p_transpose->n_pes); } } static void fftw_mpi_fprint_plan(FILE *f, fftw_mpi_plan p) { fprintf(f, "mpi plan:\n"); fprintf(f, "m = %d plan:\n", p->m); fftw_fprint_plan(f, p->pm); fprintf(f, "r = %d plan:\n", p->r); fftw_fprint_plan(f, p->pr); } void fftw_mpi_print_plan(fftw_mpi_plan p) { fftw_mpi_fprint_plan(stdout, p); } /********************** Plan Destruction ************************/ void fftw_mpi_destroy_plan(fftw_mpi_plan p) { if (p) { fftw_destroy_plan(p->pr); fftw_destroy_plan(p->pm); transpose_mpi_destroy_plan(p->p_transpose); transpose_mpi_destroy_plan(p->p_transpose_inv); fftw_mpi_destroy_twiddle(p->tw); fftw_free(p->fft_work); fftw_free(p); } } /******************** Computing the Transform *******************/ void fftw_mpi(fftw_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work) { int i; int el_size = (sizeof(fftw_complex) / sizeof(TRANSPOSE_EL_TYPE)) * n_fields; fftw_complex *fft_work; fftw_direction dir; fftw_mpi_twiddle *tw; if (n_fields < 1) return; if (!(p->flags & FFTW_SCRAMBLED_INPUT)) transpose_mpi(p->p_transpose, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); tw = p->tw; dir = p->dir; fft_work = work ? work : p->fft_work; /* For forward plans, we multiply by the twiddle factors here, before the second transpose. For backward plans, we multiply by the twiddle factors after the second transpose. We do this so that forward and backward transforms can share the same twiddle factor array (noting that m and r are swapped for the two directions so that the local sizes will be compatible). */ { int rows = p->local_r, cols = p->m; fftw_plan p_fft = p->pm; if (dir == FFTW_FORWARD) { for (i = 0; i < rows; ++i) { fftw_complex *d = local_data + i * (cols * n_fields); fftw(p_fft, n_fields, d, n_fields, 1, fft_work, 1, 0); fftw_mpi_mult_twiddles(d, n_fields, i, tw, FFTW_FORWARD); } } else { if (n_fields > 1) for (i = 0; i < rows; ++i) fftw(p_fft, n_fields, local_data + i*(cols*n_fields), n_fields, 1, fft_work, 1, 0); else fftw(p_fft, rows, local_data, 1, cols, fft_work, 1, 0); } } transpose_mpi(p->p_transpose_inv, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); { int rows = p->local_m, cols = p->r; fftw_plan p_fft = p->pr; if (dir == FFTW_BACKWARD) { for (i = 0; i < rows; ++i) { fftw_complex *d = local_data + i * (cols * n_fields); fftw_mpi_mult_twiddles(d, n_fields, i, tw, FFTW_BACKWARD); fftw(p_fft, n_fields, d, n_fields, 1, fft_work, 1, 0); } } else { if (n_fields > 1) for (i = 0; i < rows; ++i) fftw(p_fft, n_fields, local_data + i*(cols*n_fields), n_fields, 1, fft_work, 1, 0); else fftw(p_fft, rows, local_data, 1, cols, fft_work, 1, 0); } } if (!(p->flags & FFTW_SCRAMBLED_OUTPUT)) transpose_mpi(p->p_transpose, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); /* Yes, we really had to do three transposes...sigh. */ } fftw-2.1.5/mpi/fftw_mpi.h0000644000175400001440000001332007635206027010725 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef FFTW_MPI_H #define FFTW_MPI_H #include "fftw.h" #include /* need access to the MPI type definitions */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /***********************************************************************/ typedef fftw_real TRANSPOSE_EL_TYPE; typedef struct { int block_num, dest_pe, send_size, recv_size; } transpose_mpi_exchange; typedef struct { MPI_Comm comm; int n_pes, my_pe; int nx,ny,local_nx,local_ny; transpose_mpi_exchange *exchange; int num_steps, send_block_size, recv_block_size; MPI_Datatype el_type; MPI_Request request[2]; int *perm_block_dest; int num_perm_blocks, perm_block_size; int all_blocks_equal; int *send_block_sizes, *send_block_offsets; int *recv_block_sizes, *recv_block_offsets; char *move; int move_size; } transpose_mpi_plan_struct; typedef transpose_mpi_plan_struct *transpose_mpi_plan; extern void transpose_mpi_get_local_size(int n, int my_pe, int n_pes, int *local_n, int *local_start); extern int transpose_mpi_get_local_storage_size(int nx, int ny, int my_pe, int n_pes); extern transpose_mpi_plan transpose_mpi_create_plan(int nx, int ny, MPI_Comm comm); extern void transpose_mpi_destroy_plan(transpose_mpi_plan p); extern void transpose_mpi(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, TRANSPOSE_EL_TYPE *work); typedef enum { BEFORE_TRANSPOSE, AFTER_TRANSPOSE } transpose_in_place_which; typedef enum { TRANSPOSE_SYNC, TRANSPOSE_ASYNC } transpose_sync_type; extern void transpose_in_place_local(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, transpose_in_place_which which); extern TRANSPOSE_EL_TYPE *transpose_allocate_send_buf(transpose_mpi_plan p, int el_size); extern void transpose_get_send_block(transpose_mpi_plan p, int step, int *block_y_start, int *block_ny); extern void transpose_start_exchange_step(transpose_mpi_plan p, int el_size, TRANSPOSE_EL_TYPE *local_data, TRANSPOSE_EL_TYPE *send_buf, int step, transpose_sync_type sync_type); extern void transpose_finish_exchange_step(transpose_mpi_plan p, int step); /***********************************************************************/ typedef struct { fftw_plan p_fft_x; /* plan for first dimension */ fftwnd_plan p_fft; /* plan for subsequent dimensions */ transpose_mpi_plan p_transpose, p_transpose_inv; fftw_complex *work; /* extra workspace, if needed */ } fftwnd_mpi_plan_data; typedef fftwnd_mpi_plan_data *fftwnd_mpi_plan; typedef enum { FFTW_NORMAL_ORDER, FFTW_TRANSPOSED_ORDER } fftwnd_mpi_output_order; extern fftwnd_mpi_plan fftwnd_mpi_create_plan(MPI_Comm comm, int rank, const int *n, fftw_direction dir, int flags); extern fftwnd_mpi_plan fftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags); extern fftwnd_mpi_plan fftw3d_mpi_create_plan(MPI_Comm comm, int nx, int ny, int nz, fftw_direction dir, int flags); extern void fftwnd_mpi_destroy_plan(fftwnd_mpi_plan p); extern void fftwnd_mpi_local_sizes(fftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size); extern void fftwnd_mpi(fftwnd_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work, fftwnd_mpi_output_order output_order); extern void fftw_mpi_die(const char *error_string); /***********************************************************************/ typedef struct fftw_mpi_twiddle_struct { int rows, rowstart, cols, n; fftw_complex *W; int refcount; struct fftw_mpi_twiddle_struct *next; } fftw_mpi_twiddle; typedef struct fftw_mpi_plan_struct { int n, m, r, local_m, local_m_start, local_r, local_r_start; fftw_complex *fft_work; fftw_mpi_twiddle *tw; transpose_mpi_plan p_transpose, p_transpose_inv; fftw_plan pm, pr; int flags; fftw_direction dir; } *fftw_mpi_plan; /* new flags for the MPI planner: */ #define FFTW_SCRAMBLED_INPUT (8192) #define FFTW_SCRAMBLED_OUTPUT (16384) extern void fftw_mpi_local_sizes(fftw_mpi_plan p, int *local_n, int *local_start, int *local_n_after_transform, int *local_start_after_transform, int *total_local_size); extern fftw_mpi_plan fftw_mpi_create_plan(MPI_Comm comm, int n, fftw_direction dir, int flags); extern void fftw_mpi_destroy_plan(fftw_mpi_plan p); extern void fftw_mpi(fftw_mpi_plan p, int n_fields, fftw_complex *local_data, fftw_complex *work); extern void fftw_mpi_print_plan(fftw_mpi_plan p); /***********************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_MPI_H */ fftw-2.1.5/mpi/fftw_f77_mpi.c0000644000175400001440000001020107635543402011377 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw_f77_mpi.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ void F77_FUNC_(fftw_f77_mpi_create_plan,FFTW_F77_MPI_CREATE_PLAN) (fftw_mpi_plan *p, void *comm, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *n,dir,*flags); } void F77_FUNC_(fftw_f77_mpi_destroy_plan,FFTW_F77_MPI_DESTROY_PLAN) (fftw_mpi_plan *p) { fftw_mpi_destroy_plan(*p); } void F77_FUNC_(fftw_f77_mpi,FFTW_F77_MPI) (fftw_mpi_plan *p, int *n_fields, fftw_complex *local_data, fftw_complex *work, int *use_work) { fftw_mpi(*p, *n_fields, local_data, *use_work ? work : NULL); } void F77_FUNC_(fftw_f77_mpi_local_sizes,FFTW_F77_MPI_LOCAL_SIZES) (fftw_mpi_plan *p, int *local_n, int *local_start, int *local_n_after_transform, int *local_start_after_transform, int *total_local_size) { fftw_mpi_local_sizes(*p, local_n, local_start, local_n_after_transform, local_start_after_transform, total_local_size); } extern void fftw_reverse_int_array(int *a, int n); void F77_FUNC_(fftwnd_f77_mpi_create_plan,FFTWND_F77_MPI_CREATE_PLAN) (fftwnd_mpi_plan *p, void *comm, int *rank, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; fftw_reverse_int_array(n,*rank); /* column-major -> row-major */ *p = fftwnd_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *rank, n, dir, *flags); fftw_reverse_int_array(n,*rank); /* reverse back */ } void F77_FUNC_(fftw2d_f77_mpi_create_plan,FFTW2D_F77_MPI_CREATE_PLAN) (fftwnd_mpi_plan *p, void *comm, int *nx, int *ny, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw2d_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *ny,*nx,dir,*flags); } void F77_FUNC_(fftw3d_f77_mpi_create_plan,FFTW3D_F77_MPI_CREATE_PLAN) (fftwnd_mpi_plan *p, void *comm, int *nx, int *ny, int *nz, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = fftw3d_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *nz,*ny,*nx,dir,*flags); } void F77_FUNC_(fftwnd_f77_mpi_destroy_plan,FFTWND_F77_MPI_DESTROY_PLAN) (fftwnd_mpi_plan *p) { fftwnd_mpi_destroy_plan(*p); } void F77_FUNC_(fftwnd_f77_mpi,FFTWND_F77_MPI) (fftwnd_mpi_plan *p, int *n_fields, fftw_complex *local_data, fftw_complex *work, int *use_work, int *ioutput_order) { fftwnd_mpi_output_order output_order = *ioutput_order ? FFTW_TRANSPOSED_ORDER : FFTW_NORMAL_ORDER; fftwnd_mpi(*p, *n_fields, local_data, *use_work ? work : NULL, output_order); } void F77_FUNC_(fftwnd_f77_mpi_local_sizes,FFTWND_F77_MPI_LOCAL_SIZES) (fftwnd_mpi_plan *p, int *local_nx, int *local_x_start, int *local_ny_after_transform, int *local_y_start_after_transform, int *total_local_size) { fftwnd_mpi_local_sizes(*p, local_nx, local_x_start, local_ny_after_transform, local_y_start_after_transform, total_local_size); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ fftw-2.1.5/mpi/fftw_f77_mpi.h0000644000175400001440000000430607635206027011414 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef FFTW_F77_MPI_H #define FFTW_F77_MPI_H #include "fftw_mpi.h" #include "fftw-int.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /***********************************************************************/ /* How do we pass MPI_Comm data types from Fortran? Here are three possibilities, selected among by defining the appropriate cpp symbol (in fftw/config.h, preferably using the configure script): HAVE_MPI_COMM_F2C -- the MPI_Comm_f2c function is available (this function is supplied e.g. by MPICH) FFTW_USE_F77_MPI_COMM -- Fortran gives us an (MPI_Comm *) FFTW_USE_F77_MPI_COMM_P -- MPI_Comm is a pointer, and Fortran passes it to us directly by value (seems unlikely). [default] -- ignore the comm parameter, and just use MPI_COMM_WORLD (this at least will always work, at the expense of flexibility) */ #if defined(HAVE_MPI_COMM_F2C) # define FFTW_MPI_COMM_F2C(comm) MPI_Comm_f2c(*((MPI_Comm *) comm)) #elif defined(FFTW_USE_F77_MPI_COMM) # define FFTW_MPI_COMM_F2C(comm) (* ((MPI_Comm *) comm)) #elif defined(FFTW_USE_F77_MPI_COMM_P) # define FFTW_MPI_COMM_F2C(comm) ((MPI_Comm) comm) #else # define FFTW_MPI_COMM_F2C(comm) MPI_COMM_WORLD #endif /***********************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW_F77_MPI_H */ fftw-2.1.5/mpi/rfftwnd_mpi.c0000644000175400001440000001726607635206027011441 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "rfftw_mpi.h" /***************************** Plan Creation ****************************/ rfftwnd_mpi_plan rfftwnd_mpi_create_plan(MPI_Comm comm, int rank, const int *n, fftw_direction dir, int flags) { rfftwnd_mpi_plan p; if (rank < 2) return 0; p = (rfftwnd_mpi_plan) fftw_malloc(sizeof(rfftwnd_mpi_plan_data)); p->p_fft_x = 0; p->p_fft = 0; p->p_transpose = 0; p->p_transpose_inv = 0; p->work = 0; p->p_fft_x = fftw_create_plan(n[0], dir, flags | FFTW_IN_PLACE); p->p_fft = rfftwnd_create_plan(rank-1, n+1, dir, flags | FFTW_IN_PLACE); if (!p->p_fft) rfftwnd_mpi_destroy_plan(p); p->p_transpose = transpose_mpi_create_plan(n[0], p->p_fft->n[0], comm); if (!p->p_transpose) rfftwnd_mpi_destroy_plan(p); p->p_transpose_inv = transpose_mpi_create_plan(p->p_fft->n[0], n[0], comm); if (!p->p_transpose_inv) rfftwnd_mpi_destroy_plan(p); if (n[0] > p->p_fft->nwork) p->work = (fftw_complex *) fftw_malloc(n[0] * sizeof(fftw_complex)); return p; } rfftwnd_mpi_plan rfftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags) { int n[2]; n[0] = nx; n[1] = ny; return rfftwnd_mpi_create_plan(comm, 2, n, dir, flags); } rfftwnd_mpi_plan rfftw3d_mpi_create_plan(MPI_Comm comm, int nx, int ny, int nz, fftw_direction dir, int flags) { int n[3]; n[0] = nx; n[1] = ny; n[2] = nz; return rfftwnd_mpi_create_plan(comm, 3, n, dir, flags); } /********************** Plan Destruction ************************/ void rfftwnd_mpi_destroy_plan(rfftwnd_mpi_plan p) { if (p) { if (p->p_fft_x) fftw_destroy_plan(p->p_fft_x); if (p->p_fft) rfftwnd_destroy_plan(p->p_fft); if (p->p_transpose) transpose_mpi_destroy_plan(p->p_transpose); if (p->p_transpose_inv) transpose_mpi_destroy_plan(p->p_transpose_inv); if (p->work) fftw_free(p->work); fftw_free(p); } } /********************* Getting Local Size ***********************/ void rfftwnd_mpi_local_sizes(rfftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size) { if (p) { transpose_mpi_get_local_size(p->p_transpose->nx, p->p_transpose->my_pe, p->p_transpose->n_pes, local_nx, local_x_start); transpose_mpi_get_local_size(p->p_transpose->ny, p->p_transpose->my_pe, p->p_transpose->n_pes, local_ny_after_transpose, local_y_start_after_transpose); *total_local_size = transpose_mpi_get_local_storage_size(p->p_transpose->nx, p->p_transpose->ny, p->p_transpose->my_pe, p->p_transpose->n_pes); *total_local_size *= p->p_fft->n_after[0]; *total_local_size *= 2; /* return size in fftw_real's */ if (p->p_fft->rank == 1 && p->p_fft->dir == FFTW_COMPLEX_TO_REAL) { *local_ny_after_transpose *= 2; *local_y_start_after_transpose *= 2; } } } /******************** Computing the Transform *******************/ static void first_dim_aux(rfftwnd_mpi_plan p, int n_fields, fftw_real *local_data) { int local_ny = p->p_transpose->local_ny; int nx = p->p_fft_x->n; fftw_complex *work_1d = p->work ? p->work : p->p_fft->work; n_fields *= p->p_fft->n_after[0]; /* dimensions after y no longer need be considered separately from n_fields */ if (n_fields > 1) { fftw_plan p_fft_x = p->p_fft_x; int fft_iter; for (fft_iter = 0; fft_iter < local_ny; ++fft_iter) fftw(p_fft_x, n_fields, ((fftw_complex *) local_data) + (nx * n_fields) * fft_iter, n_fields, 1, work_1d, 1, 0); } else fftw(p->p_fft_x, local_ny, (fftw_complex *) local_data, 1, nx, work_1d, 1, 0); } static void other_dims_aux(rfftwnd_mpi_plan p, int n_fields, fftw_real *local_data) { int local_nx = p->p_transpose->local_nx; int n_after_x = p->p_fft->n[0] * p->p_fft->n_after[0]; if (n_fields > 1) { rfftwnd_plan p_fft = p->p_fft; int fft_iter; if (p_fft->dir == FFTW_REAL_TO_COMPLEX) for (fft_iter = 0; fft_iter < local_nx; ++fft_iter) rfftwnd_real_to_complex(p_fft, n_fields, local_data + (2 * n_after_x * n_fields) * fft_iter, n_fields, 1, NULL, 0, 0); else for (fft_iter = 0; fft_iter < local_nx; ++fft_iter) rfftwnd_complex_to_real(p_fft, n_fields, ((fftw_complex *) local_data) + (n_after_x * n_fields) * fft_iter, n_fields, 1, NULL, 0, 0); } else { if (p->p_fft->dir == FFTW_REAL_TO_COMPLEX) rfftwnd_real_to_complex(p->p_fft, local_nx, local_data, 1, 2*n_after_x, NULL, 0, 0); else rfftwnd_complex_to_real(p->p_fft, local_nx, (fftw_complex *) local_data, 1, n_after_x, NULL, 0, 0); } } void rfftwnd_mpi(rfftwnd_mpi_plan p, int n_fields, fftw_real *local_data, fftw_real *work, fftwnd_mpi_output_order output_order) { int el_size = (sizeof(fftw_complex) / sizeof(TRANSPOSE_EL_TYPE)) * n_fields * p->p_fft->n_after[0]; if (n_fields <= 0) return; if (p->p_fft->dir == FFTW_REAL_TO_COMPLEX) { /* First, transform dimensions after the first, which are local to this process: */ other_dims_aux(p, n_fields, local_data); /* Second, transpose the first dimension with the second dimension to bring the x dimension local to this process: */ transpose_mpi(p->p_transpose, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); /* Third, transform the x dimension, which is now local and contiguous: */ first_dim_aux(p, n_fields, local_data); /* transpose back, if desired: */ if (output_order == FFTW_NORMAL_ORDER) transpose_mpi(p->p_transpose_inv, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); } else { /* we have to do the steps in reverse order for c2r transform: */ /* NOTE: we assume that the same output_order is used for both the forward and backward transforms: */ /* First, if necessary, transpose to get x dimension local: */ if (output_order == FFTW_NORMAL_ORDER) transpose_mpi(p->p_transpose, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); /* Second, transform the x dimension, which is now local and contiguous: */ first_dim_aux(p, n_fields, local_data); /* Third, transpose the first dimension with the second dimension to bring the others dimensions local to this process: */ transpose_mpi(p->p_transpose_inv, el_size, (TRANSPOSE_EL_TYPE *) local_data, (TRANSPOSE_EL_TYPE *) work); /* last, transform dimensions after the first, which are local to this process: */ other_dims_aux(p, n_fields, local_data); } } fftw-2.1.5/mpi/rfftw_mpi.h0000644000175400001440000000447307635206027011120 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef RFFTW_MPI_H #define RFFTW_MPI_H #include "fftw_mpi.h" #include "rfftw.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /***********************************************************************/ typedef struct { fftw_plan p_fft_x; /* plan for first dimension */ rfftwnd_plan p_fft; /* plan for subsequent dimensions */ transpose_mpi_plan p_transpose, p_transpose_inv; fftw_complex *work; /* extra workspace, if needed */ } rfftwnd_mpi_plan_data; typedef rfftwnd_mpi_plan_data *rfftwnd_mpi_plan; extern rfftwnd_mpi_plan rfftwnd_mpi_create_plan(MPI_Comm comm, int rank, const int *n, fftw_direction dir, int flags); extern rfftwnd_mpi_plan rfftw2d_mpi_create_plan(MPI_Comm comm, int nx, int ny, fftw_direction dir, int flags); extern rfftwnd_mpi_plan rfftw3d_mpi_create_plan(MPI_Comm comm, int nx, int ny, int nz, fftw_direction dir, int flags); extern void rfftwnd_mpi_destroy_plan(rfftwnd_mpi_plan p); extern void rfftwnd_mpi_local_sizes(rfftwnd_mpi_plan p, int *local_nx, int *local_x_start, int *local_ny_after_transpose, int *local_y_start_after_transpose, int *total_local_size); extern void rfftwnd_mpi(rfftwnd_mpi_plan p, int n_fields, fftw_real *local_data, fftw_real *work, fftwnd_mpi_output_order output_order); /***********************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* RFFTW_MPI_H */ fftw-2.1.5/mpi/rfftw_f77_mpi.c0000644000175400001440000000636207635543376011610 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "fftw_f77_mpi.h" #include "rfftw_mpi.h" #ifdef F77_FUNC_ /* only compile wrappers if fortran mangling is known */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /************************************************************************/ extern void fftw_reverse_int_array(int *a, int n); void F77_FUNC_(rfftwnd_f77_mpi_create_plan,RFFTWND_F77_MPI_CREATE_PLAN) (rfftwnd_mpi_plan *p, void *comm, int *rank, int *n, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; fftw_reverse_int_array(n,*rank); /* column-major -> row-major */ *p = rfftwnd_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *rank, n, dir, *flags); fftw_reverse_int_array(n,*rank); /* reverse back */ } void F77_FUNC_(rfftw2d_f77_mpi_create_plan,RFFTW2D_F77_MPI_CREATE_PLAN) (rfftwnd_mpi_plan *p, void *comm, int *nx, int *ny, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = rfftw2d_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *ny,*nx,dir,*flags); } void F77_FUNC_(rfftw3d_f77_mpi_create_plan,RFFTW3D_F77_MPI_CREATE_PLAN) (rfftwnd_mpi_plan *p, void *comm, int *nx, int *ny, int *nz, int *idir, int *flags) { fftw_direction dir = *idir < 0 ? FFTW_FORWARD : FFTW_BACKWARD; *p = rfftw3d_mpi_create_plan(FFTW_MPI_COMM_F2C(comm), *nz,*ny,*nx,dir,*flags); } void F77_FUNC_(rfftwnd_f77_mpi_destroy_plan,RFFTWND_F77_MPI_DESTROY_PLAN) (rfftwnd_mpi_plan *p) { rfftwnd_mpi_destroy_plan(*p); } void F77_FUNC_(rfftwnd_f77_mpi,RFFTWND_F77_MPI) (rfftwnd_mpi_plan *p, int *n_fields, fftw_real *local_data, fftw_real *work, int *use_work, int *ioutput_order) { fftwnd_mpi_output_order output_order = *ioutput_order ? FFTW_TRANSPOSED_ORDER : FFTW_NORMAL_ORDER; rfftwnd_mpi(*p, *n_fields, local_data, *use_work ? work : NULL, output_order); } void F77_FUNC_(rfftwnd_f77_mpi_local_sizes,RFFTWND_F77_MPI_LOCAL_SIZES) (rfftwnd_mpi_plan *p, int *local_nx, int *local_x_start, int *local_ny_after_transform, int *local_y_start_after_transform, int *total_local_size) { rfftwnd_mpi_local_sizes(*p, local_nx, local_x_start, local_ny_after_transform, local_y_start_after_transform, total_local_size); } /****************************************************************************/ #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* defined(F77_FUNC_) */ fftw-2.1.5/mpi/fftw_mpi_test.c0000644000175400001440000004753407635206027011775 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include #include "fftw-int.h" #include "fftw_mpi.h" #include "test_main.h" #define my_printf if (io_okay) printf #define my_fprintf if (io_okay) fprintf #define my_fflush if (io_okay) fflush int ncpus = 1; int my_cpu = 0; int only_parallel = 0; char fftw_prefix[] = "fftw_mpi"; /************************************************* * Speed tests *************************************************/ #define MPI_TIME_FFT(fft,a,n,t) \ { \ double ts,te; \ double total_t; \ int iters = 1,iter; \ zero_arr((n), (a)); \ do { \ MPI_Barrier(MPI_COMM_WORLD); \ ts = MPI_Wtime(); \ for (iter = 0; iter < iters; ++iter) fft; \ te = MPI_Wtime(); \ t = (total_t = (te - ts)) / iters; \ iters *= 2; \ } while (total_t < 2.0); \ } void zero_arr(int n, fftw_complex * a) { int i; for (i = 0; i < n; ++i) c_re(a[i]) = c_im(a[i]) = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { int local_n, local_start, local_n_after_transform, local_start_after_transform, total_local_size, nalloc; fftw_complex *in, *work; fftw_plan plan = 0; fftw_mpi_plan mpi_plan; double t, t0 = 0.0; if (specific || !(flags & FFTW_IN_PLACE)) return; if (io_okay && !only_parallel) plan = fftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); mpi_plan = fftw_mpi_create_plan(MPI_COMM_WORLD, n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); CHECK(mpi_plan, "failed to create plan!"); fftw_mpi_local_sizes(mpi_plan, &local_n, &local_start, &local_n_after_transform, &local_start_after_transform, &total_local_size); if (io_okay && !only_parallel) nalloc = n; else nalloc = total_local_size; in = (fftw_complex *) fftw_malloc(nalloc * howmany_fields * sizeof(fftw_complex)); work = (fftw_complex *) fftw_malloc(nalloc * howmany_fields * sizeof(fftw_complex)); if (io_okay) { WHEN_VERBOSE(2, fftw_mpi_print_plan(mpi_plan)); } if (io_okay && !only_parallel) { FFTW_TIME_FFT(fftw(plan, howmany_fields, in, howmany_fields, 1, work, 1, 0), in, n * howmany_fields, t0); fftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); } MPI_TIME_FFT(fftw_mpi(mpi_plan, howmany_fields, in, NULL), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5 (n log2 n) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, n))); if (!only_parallel) WHEN_VERBOSE(1, printf("parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(fftw_mpi(mpi_plan, howmany_fields, in, work), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("w/WORK: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("w/WORK: \"mflops\" = 5 (n log2 n) / (t in microseconds)" " = %f\n", howmany_fields * mflops(t, n))); if (!only_parallel) WHEN_VERBOSE(1, printf("w/WORK: parallel speedup: %f\n", t0 / t)); } fftw_free(in); fftw_free(work); fftw_mpi_destroy_plan(mpi_plan); WHEN_VERBOSE(1, my_printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; fftw_complex *in, *work; fftwnd_plan plan = 0; fftwnd_mpi_plan mpi_plan; double t, t0 = 0.0; int i, N; if (sz.rank < 2) return; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank; ++i) N *= (sz.narray[i]); if (specific) { return; } else { if (io_okay && !only_parallel) plan = fftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); mpi_plan = fftwnd_mpi_create_plan(MPI_COMM_WORLD, sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } CHECK(mpi_plan != NULL, "can't create plan"); fftwnd_mpi_local_sizes(mpi_plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); if (io_okay && !only_parallel) in = (fftw_complex *) fftw_malloc(N * howmany_fields * sizeof(fftw_complex)); else in = (fftw_complex *) fftw_malloc(total_local_size * howmany_fields * sizeof(fftw_complex)); work = (fftw_complex *) fftw_malloc(total_local_size * howmany_fields * sizeof(fftw_complex)); if (io_okay && !only_parallel) { FFTW_TIME_FFT(fftwnd(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); fftwnd_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); } MPI_TIME_FFT(fftwnd_mpi(mpi_plan, howmany_fields, in, NULL, FFTW_NORMAL_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("NORMAL: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("NORMAL: \"mflops\" = 5 (N log2 N) / " "(t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); if (!only_parallel) WHEN_VERBOSE(1, printf("NORMAL: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(fftwnd_mpi(mpi_plan, howmany_fields, in, NULL, FFTW_TRANSPOSED_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("TRANSP.: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("TRANSP.: \"mflops\" = 5 (N log2 N) / " "(t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); if (!only_parallel) WHEN_VERBOSE(1, printf("TRANSP.: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(fftwnd_mpi(mpi_plan, howmany_fields, in, work, FFTW_NORMAL_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("NORMAL,w/WORK: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("NORMAL,w/WORK: \"mflops\" = 5 (N log2 N) / " "(t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); if (!only_parallel) WHEN_VERBOSE(1, printf("NORMAL,w/WORK: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(fftwnd_mpi(mpi_plan, howmany_fields, in, work, FFTW_TRANSPOSED_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: \"mflops\" = 5 (N log2 N) / " "(t in microseconds)" " = %f\n", howmany_fields * mflops(t, N))); if (!only_parallel) WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: parallel speedup: %f\n", t0 / t)); } fftwnd_mpi_destroy_plan(mpi_plan); fftw_free(in); fftw_free(work); WHEN_VERBOSE(1, my_printf("\n")); } /************************************************* * correctness tests *************************************************/ void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { /* one-dim. out-of-place transforms will never be supported in MPI */ WHEN_VERBOSE(2, my_printf("N/A\n")); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { int local_n, local_start, local_n_after_transform, local_start_after_transform, total_local_size; fftw_complex *in1, *work = NULL, *in2, *out2; fftw_mpi_plan plan; int i; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (specific) { WHEN_VERBOSE(2, my_printf("N/A\n")); return; } if (coinflip()) flags |= FFTW_THREADSAFE; plan = fftw_mpi_create_plan(MPI_COMM_WORLD, n, dir, flags); fftw_mpi_local_sizes(plan, &local_n, &local_start, &local_n_after_transform, &local_start_after_transform, &total_local_size); in1 = (fftw_complex *) fftw_malloc(total_local_size * sizeof(fftw_complex) * howmany); if (coinflip()) { WHEN_VERBOSE(2, my_printf("w/work...")); work = (fftw_complex *) fftw_malloc(total_local_size * sizeof(fftw_complex) * howmany); } in2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); out2 = (fftw_complex *) fftw_malloc(n * sizeof(fftw_complex) * howmany); /* generate random inputs */ for (i = 0; i < n * howmany; ++i) { c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); } for (i = 0; i < local_n * howmany; ++i) { c_re(in1[i]) = c_re(in2[i + local_start*howmany]); c_im(in1[i]) = c_im(in2[i + local_start*howmany]); } /* fft-ize */ fftw_mpi(plan, howmany, in1, work); fftw_mpi_destroy_plan(plan); fftw(validated_plan, howmany, in2, howmany, 1, out2, howmany, 1); CHECK(compute_error_complex(in1, 1, out2 + local_start_after_transform*howmany, 1, howmany*local_n_after_transform) < TOLERANCE, "test_in_place: wrong answer"); WHEN_VERBOSE(2, my_printf("OK\n")); fftw_free(in1); fftw_free(work); fftw_free(in2); fftw_free(out2); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { WHEN_VERBOSE(2, my_printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(0), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, 0); WHEN_VERBOSE(2, my_printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(0), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, 0); } void test_correctness(int n) { int howmany; fftw_plan validated_plan_forward, validated_plan_backward; WHEN_VERBOSE(1, my_printf("Testing correctness for n = %d...", n); my_fflush(stdout)); /* produce a good plan */ validated_plan_forward = fftw_create_plan(n, FFTW_FORWARD, measure_flag | wisdom_flag); validated_plan_backward = fftw_create_plan(n, FFTW_BACKWARD, measure_flag | wisdom_flag); for (howmany = 1; howmany <= MAX_HOWMANY; ++howmany) test_in_place_both(n, howmany, howmany, validated_plan_forward, validated_plan_backward); fftw_destroy_plan(validated_plan_forward); fftw_destroy_plan(validated_plan_backward); if (!(wisdom_flag & FFTW_USE_WISDOM) && chk_mem_leak) fftw_check_memory_leaks(); WHEN_VERBOSE(1, my_printf("OK\n")); } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan) { } void testnd_in_place(int rank, int *n, fftw_direction dir, fftwnd_plan validated_plan, int alternate_api, int specific, int force_buffered) { int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; int istride; int N, dim, i; fftw_complex *in1, *work = 0, *in2; fftwnd_mpi_plan p = 0; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (specific || rank < 2) return; if (coinflip()) flags |= FFTW_THREADSAFE; if (force_buffered) flags |= FFTWND_FORCE_BUFFERED; N = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) p = fftw2d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], dir, flags); else p = fftw3d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], n[2], dir, flags); } else /* standard api */ p = fftwnd_mpi_create_plan(MPI_COMM_WORLD, rank, n, dir, flags); fftwnd_mpi_local_sizes(p, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); in1 = (fftw_complex *) fftw_malloc(total_local_size * MAX_STRIDE * sizeof(fftw_complex)); if (coinflip()) { WHEN_VERBOSE(1, my_printf("w/work...")); work = (fftw_complex *) fftw_malloc(total_local_size * MAX_STRIDE * sizeof(fftw_complex)); } in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < N; ++i) { c_re(in2[i]) = DRAND(); c_im(in2[i]) = DRAND(); } for (i = 0; i < local_nx * (N/n[0]); ++i) { int j; for (j = 0; j < istride; ++j) { c_re(in1[i * istride + j]) = c_re((in2 + local_x_start * (N/n[0])) [i]); c_im(in1[i * istride + j]) = c_im((in2 + local_x_start * (N/n[0])) [i]); } } fftwnd_mpi(p, istride, in1, work, FFTW_NORMAL_ORDER); fftwnd(validated_plan, 1, in2, 1, 1, NULL, 0, 0); for (i = 0; i < istride; ++i) CHECK(compute_error_complex(in1 + i, istride, in2 + local_x_start * (N/n[0]), 1, local_nx * (N/n[0])) < TOLERANCE, "testnd_in_place: wrong answer"); } fftwnd_mpi_destroy_plan(p); fftw_free(in2); fftw_free(work); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag | FFTW_IN_PLACE); testnd_in_place(sz.rank, sz.narray, dir, validated_plan, alt_api, specific, force_buf); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { /* * create and destroy many plans, at random. Check the * garbage-collecting allocator of twiddle factors */ int i, dim; int r, s; fftw_mpi_plan p[PLANNER_TEST_SIZE]; fftwnd_mpi_plan pnd[PLANNER_TEST_SIZE]; int *narr, maxdim; chk_mem_leak = 0; verbose--; please_wait(); if (rank < 1) rank = 1; narr = (int *) fftw_malloc(rank * sizeof(int)); for (i = 0; i < PLANNER_TEST_SIZE; ++i) { p[i] = (fftw_mpi_plan) 0; pnd[i] = (fftwnd_mpi_plan) 0; } if (PLANNER_TEST_SIZE >= 8) { p[0] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_FORWARD, 0); p[1] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_FORWARD, 0); p[2] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_BACKWARD, 0); p[3] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_BACKWARD, 0); p[4] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_FORWARD, 0); p[5] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_FORWARD, 0); p[6] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_BACKWARD, 0); p[7] = fftw_mpi_create_plan(MPI_COMM_WORLD, 1024, FFTW_BACKWARD, 0); } maxdim = (int) pow(8192, 1.0/rank); for (i = 0; i < PLANNER_TEST_SIZE * PLANNER_TEST_SIZE; ++i) { r = rand(); if (r < 0) r = -r; r = r % PLANNER_TEST_SIZE; for (dim = 0; dim < rank; ++dim) { do { s = rand(); if (s < 0) s = -s; s = s % maxdim + 1; } while (s == 0); narr[dim] = s; } if (rank == 1) { if (p[r]) fftw_mpi_destroy_plan(p[r]); p[r] = fftw_mpi_create_plan(MPI_COMM_WORLD, narr[0], random_dir(), measure_flag | wisdom_flag); } if (rank > 1) { if (pnd[r]) fftwnd_mpi_destroy_plan(pnd[r]); pnd[r] = fftwnd_mpi_create_plan(MPI_COMM_WORLD, rank, narr, random_dir(), measure_flag | wisdom_flag); } if (i % (PLANNER_TEST_SIZE * PLANNER_TEST_SIZE / 20) == 0) { WHEN_VERBOSE(0, my_printf("test planner: so far so good\n")); WHEN_VERBOSE(0, my_printf("test planner: iteration %d" " out of %d\n", i, PLANNER_TEST_SIZE * PLANNER_TEST_SIZE)); } } for (i = 0; i < PLANNER_TEST_SIZE; ++i) { if (p[i]) fftw_mpi_destroy_plan(p[i]); if (pnd[i]) fftwnd_mpi_destroy_plan(pnd[i]); } fftw_free(narr); verbose++; chk_mem_leak = 1; } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { int i; unsigned int seed; MPI_Init(argc,argv); MPI_Comm_size(MPI_COMM_WORLD,&ncpus); MPI_Comm_rank(MPI_COMM_WORLD,&my_cpu); /* Only process 0 gets to do I/O: */ io_okay = my_cpu == 0; if (io_okay) for (i = 1; i < *argc; ++i) if (!strcmp((*argv)[i], "--only-parallel")) { only_parallel = 1; strcpy((*argv)[i], ""); } MPI_Bcast(&only_parallel, 1, MPI_INT, 0, MPI_COMM_WORLD); /* Make sure all processes use the same seed for random numbers: */ seed = time(NULL); MPI_Bcast(&seed, 1, MPI_INT, 0, MPI_COMM_WORLD); srand(seed); fftw_die_hook = fftw_mpi_die; /* call MPI_Abort on failure */ } void test_finish(void) { MPI_Finalize(); } void enter_paranoid_mode(void) { } /* in MPI, only process 0 is guaranteed to have access to the argument list */ int get_option(int argc, char **argv, char *argval, int argval_maxlen) { int c; int arglen; if (io_okay) { c = default_get_option(argc,argv,argval,argval_maxlen); arglen = strlen(argval) + 1; } MPI_Bcast(&c, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&arglen, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(argval, arglen, MPI_CHAR, 0, MPI_COMM_WORLD); return c; } fftw-2.1.5/mpi/rfftw_mpi_test.c0000644000175400001440000004342707635206027012154 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include #include "fftw-int.h" #include "rfftw_mpi.h" #include "test_main.h" #define my_printf if (io_okay) printf #define my_fprintf if (io_okay) fprintf #define my_fflush if (io_okay) fflush int ncpus = 1; int my_cpu = 0; char fftw_prefix[] = "rfftw_mpi"; /************************************************* * Speed tests *************************************************/ #define MPI_TIME_FFT(fft,a,n,t) \ { \ double ts,te; \ double total_t; \ int iters = 1,iter; \ zero_arr((n), (a)); \ do { \ MPI_Barrier(MPI_COMM_WORLD); \ ts = MPI_Wtime(); \ for (iter = 0; iter < iters; ++iter) fft; \ te = MPI_Wtime(); \ t = (total_t = (te - ts)) / iters; \ iters *= 2; \ } while (total_t < 2.0); \ } void zero_arr(int n, fftw_real * a) { int i; for (i = 0; i < n; ++i) a[i] = 0.0; } void test_speed_aux(int n, fftw_direction dir, int flags, int specific) { fftw_real *in, *out; fftw_plan plan; double t; fftw_time begin, end; return; /* one-dim transforms not supported yet in MPI */ in = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); out = (fftw_real *) fftw_malloc(n * howmany_fields * sizeof(fftw_real)); if (specific) { begin = fftw_get_time(); plan = rfftw_create_plan_specific(n, dir,speed_flag | flags | wisdom_flag | no_vector_flag, in, howmany_fields, out, howmany_fields); end = fftw_get_time(); } else { begin = fftw_get_time(); plan = rfftw_create_plan(n, dir, speed_flag | flags | wisdom_flag | no_vector_flag); end = fftw_get_time(); } CHECK(plan != NULL, "can't create plan"); t = fftw_time_to_sec(fftw_time_diff(end, begin)); WHEN_VERBOSE(2, printf("time for planner: %f s\n", t)); WHEN_VERBOSE(2, rfftw_print_plan(plan)); FFTW_TIME_FFT(rfftw(plan, howmany_fields, in, howmany_fields, 1, out, howmany_fields, 1), in, n * howmany_fields, t); rfftw_destroy_plan(plan); WHEN_VERBOSE(1, printf("time for one fft: %s", smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / n))); WHEN_VERBOSE(1, printf("\"mflops\" = 5/2 (n log2 n) / (t in microseconds)" " = %f\n", 0.5 * howmany_fields * mflops(t, n))); fftw_free(in); fftw_free(out); WHEN_VERBOSE(1, printf("\n")); } void test_speed_nd_aux(struct size sz, fftw_direction dir, int flags, int specific) { int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; fftw_real *in, *work; rfftwnd_plan plan = 0; rfftwnd_mpi_plan mpi_plan; double t, t0 = 0.0; int i, N; if (sz.rank < 2) return; /* only bench in-place multi-dim transforms */ flags |= FFTW_IN_PLACE; N = 1; for (i = 0; i < sz.rank - 1; ++i) N *= sz.narray[i]; N *= (sz.narray[i] + 2); if (specific) { return; } else { if (io_okay) plan = rfftwnd_create_plan(sz.rank, sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); mpi_plan = rfftwnd_mpi_create_plan(MPI_COMM_WORLD, sz.rank,sz.narray, dir, speed_flag | flags | wisdom_flag | no_vector_flag); } CHECK(mpi_plan != NULL, "can't create plan"); rfftwnd_mpi_local_sizes(mpi_plan, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); if (io_okay) in = (fftw_real *) fftw_malloc(N * howmany_fields * sizeof(fftw_real)); else in = (fftw_real *) fftw_malloc(total_local_size * howmany_fields * sizeof(fftw_real)); work = (fftw_real *) fftw_malloc(total_local_size * howmany_fields * sizeof(fftw_real)); if (io_okay) { if (dir == FFTW_REAL_TO_COMPLEX) { FFTW_TIME_FFT(rfftwnd_real_to_complex(plan, howmany_fields, in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); } else { FFTW_TIME_FFT(rfftwnd_complex_to_real(plan, howmany_fields, (fftw_complex *) in, howmany_fields, 1, 0, 0, 0), in, N * howmany_fields, t0); } } rfftwnd_destroy_plan(plan); WHEN_VERBOSE(1, my_printf("time for one fft (uniprocessor): %s\n", smart_sprint_time(t0))); MPI_TIME_FFT(rfftwnd_mpi(mpi_plan, howmany_fields, in, NULL, FFTW_NORMAL_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("NORMAL: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("NORMAL: \"mflops\" = 5/2 (N log2 N) / " "(t in microseconds)" " = %f\n", 0.5*howmany_fields*mflops(t, N))); WHEN_VERBOSE(1, printf("NORMAL: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(rfftwnd_mpi(mpi_plan, howmany_fields, in, NULL, FFTW_TRANSPOSED_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("TRANSP.: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("TRANSP.: \"mflops\" = 5/2 (N log2 N) / " "(t in microseconds)" " = %f\n", 0.5*howmany_fields*mflops(t, N))); WHEN_VERBOSE(1, printf("TRANSP.: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(rfftwnd_mpi(mpi_plan, howmany_fields, in, work, FFTW_NORMAL_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("NORMAL,w/WORK: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("NORMAL,w/WORK: \"mflops\" = 5/2 (N log2 N) / " "(t in microseconds)" " = %f\n", 0.5*howmany_fields*mflops(t, N))); WHEN_VERBOSE(1, printf("NORMAL,w/WORK: parallel speedup: %f\n", t0 / t)); } MPI_TIME_FFT(rfftwnd_mpi(mpi_plan, howmany_fields, in, work, FFTW_TRANSPOSED_ORDER), in, total_local_size * howmany_fields, t); if (io_okay) { WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: time for one fft (%d cpus): %s", ncpus, smart_sprint_time(t))); WHEN_VERBOSE(1, printf(" (%s/point)\n", smart_sprint_time(t / N))); WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: \"mflops\" = 5/2 (N log2 N) / " "(t in microseconds)" " = %f\n", 0.5*howmany_fields*mflops(t, N))); WHEN_VERBOSE(1, printf("TRANSP.,w/WORK: parallel speedup: %f\n", t0 / t)); } rfftwnd_mpi_destroy_plan(mpi_plan); fftw_free(in); fftw_free(work); WHEN_VERBOSE(1, my_printf("\n")); } /************************************************* * correctness tests *************************************************/ double compute_error(fftw_real * A, int astride, fftw_real * B, int bstride, int n) { /* compute the relative error */ double error = 0.0; int i; for (i = 0; i < n; ++i) { double a; double mag; a = fabs(A[i * astride] - B[i * bstride]); mag = 0.5 * (fabs(A[i * astride]) + fabs(B[i * bstride]))+TOLERANCE; a /= mag; if (a > error) error = a; #ifdef HAVE_ISNAN CHECK(!isnan(a), "NaN in answer"); #endif } return error; } void test_out_of_place(int n, int istride, int ostride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { /* one-dim. out-of-place transforms will never be supported in MPI */ WHEN_VERBOSE(2, my_printf("N/A\n")); } void test_in_place(int n, int istride, int howmany, fftw_direction dir, fftw_plan validated_plan, int specific) { /* one-dim. transforms are not supported yet in MPI */ WHEN_VERBOSE(2, my_printf("N/A\n")); } void test_out_of_place_both(int n, int istride, int ostride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { } void test_in_place_both(int n, int istride, int howmany, fftw_plan validated_plan_forward, fftw_plan validated_plan_backward) { WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_FORWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(0), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_FORWARD, validated_plan_forward, 0); WHEN_VERBOSE(2, printf("TEST CORRECTNESS (in place, FFTW_BACKWARD, %s) " "n = %d istride = %d howmany = %d\n", SPECIFICP(0), n, istride, howmany)); test_in_place(n, istride, howmany, FFTW_BACKWARD, validated_plan_backward, 0); } void test_correctness(int n) { } /************************************************* * multi-dimensional correctness tests *************************************************/ void testnd_out_of_place(int rank, int *n, fftwnd_plan validated_plan) { } void testnd_in_place(int rank, int *n, fftwnd_plan validated_plan, int alternate_api, int specific) { int local_nx, local_x_start, local_ny_after_transpose, local_y_start_after_transpose, total_local_size; int istride, ostride, howmany; int N, dim, i, j, k; int nc, nhc, nr; fftw_real *in1, *out3, *work = 0; fftw_complex *in2, *out1, *out2; rfftwnd_mpi_plan p = 0, ip = 0; int flags = measure_flag | wisdom_flag | FFTW_IN_PLACE; if (specific || rank < 2) return; if (coinflip()) flags |= FFTW_THREADSAFE; N = nc = nr = nhc = 1; for (dim = 0; dim < rank; ++dim) N *= n[dim]; if (rank > 0) { nr = n[rank - 1]; nc = N / nr; nhc = nr / 2 + 1; } if (alternate_api && (rank == 2 || rank == 3)) { if (rank == 2) { p = rfftw2d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw2d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], FFTW_COMPLEX_TO_REAL, flags); } else { p = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], n[2], FFTW_REAL_TO_COMPLEX, flags); ip = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, n[0], n[1], n[2], FFTW_COMPLEX_TO_REAL, flags); } } else { p = rfftwnd_mpi_create_plan(MPI_COMM_WORLD, rank, n, FFTW_REAL_TO_COMPLEX, flags); ip = rfftwnd_mpi_create_plan(MPI_COMM_WORLD, rank, n, FFTW_COMPLEX_TO_REAL, flags); } CHECK(p != NULL && ip != NULL, "can't create plan"); rfftwnd_mpi_local_sizes(p, &local_nx, &local_x_start, &local_ny_after_transpose, &local_y_start_after_transpose, &total_local_size); in1 = (fftw_real *) fftw_malloc(total_local_size * MAX_STRIDE * sizeof(fftw_real)); if (coinflip()) { WHEN_VERBOSE(1, my_printf("w/work...")); work = (fftw_real *) fftw_malloc(total_local_size * MAX_STRIDE * sizeof(fftw_real)); } out3 = in1; out1 = (fftw_complex *) in1; in2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); out2 = (fftw_complex *) fftw_malloc(N * sizeof(fftw_complex)); for (i = 0; i < total_local_size * MAX_STRIDE; ++i) out3[i] = 0; for (istride = 1; istride <= MAX_STRIDE; ++istride) { /* generate random inputs */ for (i = 0; i < nc; ++i) for (j = 0; j < nr; ++j) { c_re(in2[i * nr + j]) = DRAND(); c_im(in2[i * nr + j]) = 0.0; } for (i = 0; i < local_nx * (nc / n[0]); ++i) for (j = 0; j < nr; ++j) { for (k = 0; k < istride; ++k) in1[(i * nhc * 2 + j) * istride + k] = c_re((in2 + local_x_start * (N/n[0])) [i * nr + j]); } fftwnd(validated_plan, 1, in2, 1, 1, out2, 1, 1); howmany = ostride = istride; WHEN_VERBOSE(2, printf("\n testing in-place stride %d...", istride)); rfftwnd_mpi(p, howmany, in1, work, FFTW_NORMAL_ORDER); for (i = 0; i < local_nx * (nc / n[0]); ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error_complex(out1 + i * nhc * ostride + k, ostride, out2 + local_x_start*(N/n[0]) + i * nr, 1, nhc) < TOLERANCE, "in-place (r2c): wrong answer"); rfftwnd_mpi(ip, howmany, in1, work, FFTW_NORMAL_ORDER); for (i = 0; i < total_local_size * istride; ++i) out3[i] *= 1.0 / N; for (i = 0; i < local_nx * (nc / n[0]); ++i) for (k = 0; k < howmany; ++k) CHECK(compute_error(out3 + i * nhc * 2 * istride + k, istride, (fftw_real *) (in2 + local_x_start*(N/n[0]) + i * nr), 2, nr) < TOLERANCE, "in-place (c2r): wrong answer (check 2)"); } rfftwnd_mpi_destroy_plan(p); rfftwnd_mpi_destroy_plan(ip); fftw_free(work); fftw_free(out2); fftw_free(in2); fftw_free(in1); } void testnd_correctness(struct size sz, fftw_direction dir, int alt_api, int specific, int force_buf) { fftwnd_plan validated_plan; if (dir != FFTW_FORWARD) return; if (force_buf) return; validated_plan = fftwnd_create_plan(sz.rank, sz.narray, dir, measure_flag | wisdom_flag); CHECK(validated_plan != NULL, "can't create plan"); testnd_in_place(sz.rank, sz.narray, validated_plan, alt_api, specific); fftwnd_destroy_plan(validated_plan); } /************************************************* * planner tests *************************************************/ void test_planner(int rank) { /* * create and destroy many plans, at random. Check the * garbage-collecting allocator of twiddle factors */ int i, dim; int r, s; rfftwnd_mpi_plan pnd[PLANNER_TEST_SIZE]; int *narr, maxdim; chk_mem_leak = 0; verbose--; please_wait(); if (rank < 2) rank = 2; narr = (int *) fftw_malloc(rank * sizeof(int)); for (i = 0; i < PLANNER_TEST_SIZE; ++i) { pnd[i] = (rfftwnd_mpi_plan) 0; } maxdim = (int) pow(8192, 1.0/rank); for (i = 0; i < PLANNER_TEST_SIZE * PLANNER_TEST_SIZE; ++i) { r = rand(); if (r < 0) r = -r; r = r % PLANNER_TEST_SIZE; for (dim = 0; dim < rank; ++dim) { do { s = rand(); if (s < 0) s = -s; s = s % maxdim + 1; } while (s == 0); narr[dim] = s; } if (rank > 1) { if (pnd[r]) rfftwnd_mpi_destroy_plan(pnd[r]); pnd[r] = rfftwnd_mpi_create_plan(MPI_COMM_WORLD, rank, narr, random_dir(), measure_flag | wisdom_flag); } if (i % (PLANNER_TEST_SIZE * PLANNER_TEST_SIZE / 20) == 0) { WHEN_VERBOSE(0, my_printf("test planner: so far so good\n")); WHEN_VERBOSE(0, my_printf("test planner: iteration %d" " out of %d\n", i, PLANNER_TEST_SIZE * PLANNER_TEST_SIZE)); } } for (i = 0; i < PLANNER_TEST_SIZE; ++i) { if (pnd[i]) rfftwnd_mpi_destroy_plan(pnd[i]); } fftw_free(narr); verbose++; chk_mem_leak = 1; } /************************************************* * test initialization *************************************************/ void test_init(int *argc, char ***argv) { unsigned int seed; MPI_Init(argc,argv); MPI_Comm_size(MPI_COMM_WORLD,&ncpus); MPI_Comm_rank(MPI_COMM_WORLD,&my_cpu); /* Only process 0 gets to do I/O: */ io_okay = my_cpu == 0; /* Make sure all processes use the same seed for random numbers: */ seed = time(NULL); MPI_Bcast(&seed, 1, MPI_INT, 0, MPI_COMM_WORLD); srand(seed); fftw_die_hook = fftw_mpi_die; /* call MPI_Abort on failure */ } void test_finish(void) { MPI_Finalize(); } void enter_paranoid_mode(void) { } /* in MPI, only process 0 is guaranteed to have access to the argument list */ int get_option(int argc, char **argv, char *argval, int argval_maxlen) { int c; int arglen; if (io_okay) { c = default_get_option(argc,argv,argval,argval_maxlen); arglen = strlen(argval) + 1; } MPI_Bcast(&c, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&arglen, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(argval, arglen, MPI_CHAR, 0, MPI_COMM_WORLD); return c; } fftw-2.1.5/mpi/test_sched.c0000644000175400001440000000667107635206027011245 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include "sched.h" int main(int argc, char **argv) { int **sched; int npes = -1, sortpe = -1, steps; if (argc >= 2) { npes = atoi(argv[1]); if (npes <= 0) { fprintf(stderr,"npes must be positive!"); return 1; } } if (argc >= 3) { sortpe = atoi(argv[2]); if (sortpe < 0 || sortpe >= npes) { fprintf(stderr,"sortpe must be between 0 and npes-1.\n"); return 1; } } if (npes != -1) { printf("Computing schedule for npes = %d:\n",npes); sched = make_comm_schedule(npes); if (!sched) { fprintf(stderr,"Out of memory!"); return 6; } if (steps = check_comm_schedule(sched,npes)) printf("schedule OK (takes %d steps to complete).\n", steps); else printf("schedule not OK.\n"); print_comm_schedule(sched, npes); if (sortpe != -1) { printf("\nSorting schedule for sortpe = %d...\n", sortpe); sort_comm_schedule(sched,npes,sortpe); if (steps = check_comm_schedule(sched,npes)) printf("schedule OK (takes %d steps to complete).\n", steps); else printf("schedule not OK.\n"); print_comm_schedule(sched, npes); printf("\nInverting schedule...\n"); invert_comm_schedule(sched,npes); if (steps = check_comm_schedule(sched,npes)) printf("schedule OK (takes %d steps to complete).\n", steps); else printf("schedule not OK.\n"); print_comm_schedule(sched, npes); free_comm_schedule(sched,npes); } } else { printf("Doing infinite tests...\n"); for (npes = 1; ; ++npes) { printf("npes = %d...",npes); sched = make_comm_schedule(npes); if (!sched) { fprintf(stderr,"Out of memory!\n"); return 5; } for (sortpe = 0; sortpe < npes; ++sortpe) { empty_comm_schedule(sched,npes); fill_comm_schedule(sched,npes); if (!check_comm_schedule(sched,npes)) { fprintf(stderr, "\n -- fill error for sortpe = %d!\n",sortpe); return 2; } sort_comm_schedule(sched,npes,sortpe); if (!check_comm_schedule(sched,npes)) { fprintf(stderr, "\n -- sort error for sortpe = %d!\n",sortpe); return 3; } invert_comm_schedule(sched,npes); if (!check_comm_schedule(sched,npes)) { fprintf(stderr, "\n -- invert error for sortpe = %d!\n", sortpe); return 4; } } free_comm_schedule(sched,npes); printf("OK\n"); if (npes % 50 == 0) printf("(...Hit Ctrl-C to stop...)\n"); } } return 0; } fftw-2.1.5/mpi/test_transpose_mpi.c0000644000175400001440000002177607635206027013045 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include "fftw_mpi.h" #define NX 14 #define NY 10 void perform_transpose_async(transpose_mpi_plan tp, int el_size, TRANSPOSE_EL_TYPE *data, int local_nx, int local_x_start, int ny) { int i,j,el; TRANSPOSE_EL_TYPE *send_buf; int step; for (i = 0; i < local_nx * ny * el_size; ++i) data[i] = 0.0; send_buf = transpose_allocate_send_buf(tp,el_size); transpose_in_place_local(tp, el_size, data, BEFORE_TRANSPOSE); for (step = 0; step < tp->num_steps; ++step) { int block_y_start, block_ny; /* initialize block for step here (overlap initialization and communication): */ transpose_get_send_block(tp, step, &block_y_start, &block_ny); for (i = 0; i < local_nx; ++i) for (j = block_y_start; j < block_y_start + block_ny; ++j) for (el = 0; el < el_size; ++el) data[el+el_size*(i+j*local_nx)] = ny * (i + local_x_start) + j; transpose_finish_exchange_step(tp, step - 1); transpose_start_exchange_step(tp,el_size,data,send_buf,step, TRANSPOSE_ASYNC); } transpose_finish_exchange_step(tp, step - 1); transpose_in_place_local(tp, el_size, data, AFTER_TRANSPOSE); if (send_buf) fftw_free(send_buf); } void test_transpose_plan(int nx, int ny, int el_size, int verbose, transpose_mpi_plan tp, TRANSPOSE_EL_TYPE *data, TRANSPOSE_EL_TYPE *work, int async) { int i,j,el; int my_pe,n_pes; int local_x_start,local_nx,local_y_start,local_ny; MPI_Comm_rank(MPI_COMM_WORLD,&my_pe); MPI_Comm_size(MPI_COMM_WORLD,&n_pes); transpose_mpi_get_local_size(nx,my_pe,n_pes, &local_nx,&local_x_start); transpose_mpi_get_local_size(ny,my_pe,n_pes, &local_ny,&local_y_start); if (async) { perform_transpose_async(tp,el_size,data,local_nx,local_x_start,ny); } else { for (i = 0; i < local_nx; ++i) for (j = 0; j < ny; ++j) for (el = 0; el < el_size; ++el) data[el+el_size*(i*ny+j)] = ny * (i + local_x_start) + j; transpose_mpi(tp,el_size,data,work); } /* print out result matrix if it is small: */ if (verbose && local_ny < 16 && nx < 16) { int pe; for (pe = 0; pe < n_pes; ++pe) { MPI_Barrier(MPI_COMM_WORLD); if (pe == my_pe) { printf("\nprocess %d result: \n", my_pe); for (j = 0; j < nx; ++j) { for (i = 0; i < local_ny; ++i) printf("%4.0f",data[el_size*(i*nx + j)]); printf("\n"); } } } MPI_Barrier(MPI_COMM_WORLD); } if (verbose) printf("Checking result on process %d...\n",my_pe); for (i = 0; i < local_ny; ++i) for (j = 0; j < nx; ++j) for (el = 0; el < el_size; ++el) { if (data[el+el_size*(i*nx + j)] != (TRANSPOSE_EL_TYPE) (j*ny + i+local_y_start)) { fprintf(stderr, "Error with x=%d, y=%d on process %d!\n" " -- is %g rather than %g\n", j,i+local_y_start,my_pe, data[el+el_size*(i*nx + j)], (TRANSPOSE_EL_TYPE) (j*ny + i+local_y_start)); fftw_die("incorrect result.\n"); } } if (verbose) printf("Process %d okay!\n",my_pe); } void test_transpose(int nx, int ny, int el_size, int verbose) { int my_pe,n_pes; int i,j; int local_x_start,local_nx,local_y_start,local_ny; int total_local_size; TRANSPOSE_EL_TYPE *data, *work; transpose_mpi_plan tp; MPI_Comm_rank(MPI_COMM_WORLD,&my_pe); MPI_Comm_size(MPI_COMM_WORLD,&n_pes); if (my_pe == 0) printf("\nTesting transpose of %dx%d matrix (%d elements)...\n", nx,ny,el_size); transpose_mpi_get_local_size(nx,my_pe,n_pes, &local_nx,&local_x_start); transpose_mpi_get_local_size(ny,my_pe,n_pes, &local_ny,&local_y_start); total_local_size = transpose_mpi_get_local_storage_size(nx,ny, my_pe,n_pes); if (total_local_size == 0) data = work = 0; else { data = (TRANSPOSE_EL_TYPE *) fftw_malloc(total_local_size*el_size*sizeof(TRANSPOSE_EL_TYPE)); work = (TRANSPOSE_EL_TYPE *) fftw_malloc(total_local_size*el_size*sizeof(TRANSPOSE_EL_TYPE)); } tp = transpose_mpi_create_plan(nx,ny,MPI_COMM_WORLD); /* output plan data, one process at a time: */ if (verbose) for (j = 0; j < n_pes; ++j) { if (j == my_pe) { printf("Plan for process %d:\n",j); printf(" nx = %d, ny = %d\n",tp->nx,tp->ny); printf(" local_nx = %d, local_ny = %d\n", tp->local_nx,tp->local_ny); if (local_nx > 0 || local_ny > 0) { printf(" send/recv block_size = %d/%d, " "num_steps = %d\n", tp->send_block_size, tp->recv_block_size, tp->num_steps); for (i = 0; i < tp->num_steps; ++i) printf(" exchange[%d]: block = %d, dest_pe = %d, " "send_size = %d, recv_size = %d\n", i,tp->exchange[i].block_num, tp->exchange[i].dest_pe, tp->exchange[i].send_size, tp->exchange[i].recv_size); printf(" perm_block_size = %d, num_perm_blocks = %d\n", tp->perm_block_size, tp->num_perm_blocks); #if 0 for (i = 0; i < tp->num_perm_blocks; ++i) printf(" perm_block_dest[%d] = %d\n", i,tp->perm_block_dest[i]); #endif } printf("\n"); } MPI_Barrier(MPI_COMM_WORLD); } /* testing blocking, in-place transpose */ if (verbose && my_pe == 0) printf("\nTesting blocking in-place transpose:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,NULL,0); MPI_Barrier(MPI_COMM_WORLD); /* Initialize data and check a second time, to make sure that we can reuse plans:*/ if (verbose && my_pe == 0) printf("\nTesting again:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,NULL,0); /* testing blocking, out-of-place transpose */ if (verbose && my_pe == 0) printf("\nTesting blocking out-of-place transpose:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,work,0); MPI_Barrier(MPI_COMM_WORLD); /* Initialize data and check a second time, to make sure that we can reuse plans:*/ if (verbose && my_pe == 0) printf("\nTesting again:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,work,0); /* Test non-blocking (asynchronous) transpose calls: */ if (verbose && my_pe == 0) printf("\nTesting non-blocking transpose:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,NULL,1); MPI_Barrier(MPI_COMM_WORLD); /* Initialize data and check a second time, to make sure that we can reuse plans:*/ if (verbose && my_pe == 0) printf("\nTesting again:\n"); test_transpose_plan(nx,ny,el_size,verbose,tp,data,NULL,1); transpose_mpi_destroy_plan(tp); if (data) fftw_free(data); if (work) fftw_free(work); if (verbose) printf("Process %d okay!\n",my_pe); fftw_check_memory_leaks(); if (my_pe == 0) printf("okay!\n"); } int main(int argc, char **argv) { int my_pe; int nx = -1,ny = -1; int el_size = 1; int seed; MPI_Init(&argc,&argv); fftw_die_hook = fftw_mpi_die; seed = time(NULL); MPI_Bcast(&seed, 1, MPI_INT, 0, MPI_COMM_WORLD); srand(seed); MPI_Comm_rank(MPI_COMM_WORLD,&my_pe); /* only process 0 is guaranteed to have the correct args */ if (my_pe == 0) { if (argc >= 3) { nx = atoi(argv[1]); ny = atoi(argv[2]); } if (argc >= 4) el_size = atoi(argv[3]); } /* broadcast args to other processes: */ MPI_Bcast(&nx, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&ny, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&el_size, 1, MPI_INT, 0, MPI_COMM_WORLD); if (nx > 0 && ny > 0 && el_size > 0) test_transpose(nx,ny,el_size,1); else { if (my_pe == 0) printf("Doing random tests (does not terminate)...\n"); while (1) { test_transpose(rand() % 10 + 1, rand() % 10 + 1, rand() % 10 + 1, 0); test_transpose(rand() % 100 + 1, rand() % 100 + 1, rand() % 10 + 1, 0); test_transpose(rand() % 1000 + 1, rand() % 1000 + 1, rand() % 10 + 1, 0); } } MPI_Finalize(); return 0; } fftw-2.1.5/mpi/README.f770000644000175400001440000001041507635206027010225 Using MPI FFTW from Fortran FFTW 2.1.3 contains *experimental* wrapper functions for calling the MPI FFTW routines from Fortran. We are interested in feedback on the wrapper interface, as well as on whether or not these routines work for you. The interface may change in future releases. You should first read the "Calling FFTW from Fortran" section of the FFTW manual, as most of what is said there also applies here. You should also read the "MPI FFTW" section of the manual. Wrapper routines: The wrapper routines have the same names as the corresponding FFTW routines, but prefixed with "fftw_f77" or "rfftw_f77" (e.g. fftw_f77_mpi_create_plan). The parameters are the same, with the following exceptions: 1) The caveats described in "Calling FFTW from Fortran" hold here as well; e.g. function return values become the first parameter. 2) The MPI transform routines take a "work" parameter, which can be NULL in C. Since there is no way to pass NULL from Fortran, the work parameter is followed by an *extra* parameter, use_work, which should be either 0 or 1. If use_work is 0, then the work parameter is ignored (just like passing NULL in C), and if use_work is 1, the work parameter should be an array of the same size as the local data (just like when work is non-NULL in C). 3) Use the following definitions: integer FFTW_TRANSPOSED_ORDER, FFTW_NORMAL_ORDER parameter(FFTW_TRANSPOSED_ORDER=1, FFTW_NORMAL_ORDER=0) integer FFTW_SCRAMBLED_INPUT, FFTW_SCRAMBLED_OUTPUT parameter(FFTW_SCRAMBLED_INPUT=8192) parameter(FFTW_SCRAMBLED_OUTPUT=16384) 4) The array is divided among the processors for fftwnd in the last dimension, not the first. See below. MPI Communicator Parameters: It's not clear how one passes MPI_Comm parameters from Fortran to C. Your feedback on how this can be done in various MPI implementations would be appreciated--especially ways for the configure script to automatically detect how it is being done. MPICH, for example, has an MPI_Comm_f2c macro that is used to convert between the two representations--the configure script detects this and uses it if available. Otherwise, we currently ignore the comm parameter and use a default of MPI_COMM_WORLD. Allocating Arrays: Just as in C, you have to call FFTW at runtime to find out the portion of the array local to each process (using fftw_f77_mpi_local_sizes, etcetera). This means, however, that you have to allocate your data (and work) arrays dynamically. There are a few options for doing this: 1) Use Fortran 90, which allows dynamically-allocated arrays. 2) Use a "compile-twice" scheme: Run the program once to get & output the local size by calling the *_mpi_local_sizes routine. Then, substitute this value into the array declaration and recompile. Since the local size may be different on different processors, and you only compile one executable, you will need to take the maximum of the local sizes when declaring the array. 3) Use C. The arguments to fftwnd_f77_mpi_local_sizes are interpreted as follows: call fftwnd_f77_mpi_local_sizes(plan, local_nlast, local_last_start, local_nlast2_after_transform, local_last2_start_after_transform, total_local_size) As in C, your array must contain at least total_local_size elements (which may be slightly larger than you expect). "last" refers to the last dimension of your data and "last2" refers to the second-to-last dimension (for when you do the transform with transposed-order output)--this it the opposite of C, where those arguments refer to the first and second dimensions, respectively. For example, if you are doing a 3d nx x ny x nz transform, your array will be declared as data(total_local_size) and should be interpreted as a Fortran (column-major) array data(0:nx-1, 0:ny-1, 0:local_nlast-1), where the last dimension corresponds to the nz indices starting at local_last_start. Note that the indices are zero-based. If you transform the array with transposed-order output, the array should then be interpreted as data(0:nx-1, 0:nz-1, 0:local_nlast2_after_transform-1), where the last dimension corresponds to the ny indices starting at local_last2_start_after_transform. fftw-2.1.5/fortran/0002777000175400001440000000000007637531662007726 5fftw-2.1.5/fortran/f77_test.F0000644000175400001440000000354307637531662011416 * * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * c Simple program to demonstrate calling the wrapper routines c to perform 1D transforms in Fortran. This program should be c linked with -lfftw -lm (assuming double-precision FFTW). Note c also that the plan should be integer*8 on a 64-bit machine. program test implicit none #include "fftw_f77.i" integer N parameter(N=4) double complex in, out dimension in(N),out(N) integer i integer plan write(*,*) 'Input array:' do i = 1,N,1 in(i) = dcmplx(float(i),float(i+1)) write(*,*) ' in(',i,') = ',in(i) enddo call fftw_f77_create_plan(plan,N,FFTW_FORWARD,FFTW_ESTIMATE) call fftw_f77(plan,1,in,1,0,out,1,0) write(*,*) 'Output array:' do i = 1,N,1 write(*,*) ' out(',i,') = ',out(i) enddo call fftw_f77_destroy_plan(plan) call fftw_f77_create_plan(plan,N,FFTW_BACKWARD,FFTW_ESTIMATE) call fftw_f77(plan,1,out,1,0,in,1,0) write(*,*) 'Output array after inverse FFT:' do i = 1,N,1 write(*,*) ' ',N,' * in(',i,') = ',in(i) enddo call fftw_f77_destroy_plan(plan) end fftw-2.1.5/fortran/fftw_f77.i0000644000175400001440000000214407637531662011444 ! This file contains PARAMETER statements for various constants ! that can be passed to FFTW routines. You should include ! this file in any FORTRAN program that calls the fftw_f77 ! routines (either directly or with an #include statement ! if you use the C preprocessor). integer FFTW_FORWARD,FFTW_BACKWARD parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) integer FFTW_ESTIMATE,FFTW_MEASURE parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM parameter (FFTW_OUT_OF_PLACE=0) parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) integer FFTW_THREADSAFE parameter (FFTW_THREADSAFE=128) ! Constants for the MPI wrappers: integer FFTW_TRANSPOSED_ORDER, FFTW_NORMAL_ORDER integer FFTW_SCRAMBLED_INPUT, FFTW_SCRAMBLED_OUTPUT parameter(FFTW_TRANSPOSED_ORDER=1, FFTW_NORMAL_ORDER=0) parameter(FFTW_SCRAMBLED_INPUT=8192) parameter(FFTW_SCRAMBLED_OUTPUT=16384) fftw-2.1.5/gensrc/0002777000175400001440000000000007637531662007534 5fftw-2.1.5/gensrc/.indent.pro0000644000175400001440000000051607637531662011531 -kr -cs -i5 -fca -nfc1 -sc -sob -cli4 -TFFTW_COMPLEX -TFFTW_REAL -Tfftw_plan -Tnotw_codelet -Ttwiddle_codelet -Tgeneric_codelet -Trgeneric_codelet -Tfftw_plan_node -Tfftwnd_plan -TFILE -Tfftw_complex -Tfftw_real -Trfftw_plan -Treal2hc_codelet -Thc2real_codelet -Thc2hc_codelet -Trfftw_plan_node -Trfftwnd_plan -Tfftw_codelet_desc fftw-2.1.5/gensrc/Makefile0000644000175400001440000000074207637531662011111 # Makefile for the generation of FFTW sources/Makefile install: allfiles sh install.sh make clean allfiles: Makefile.fftw sources config.c rconfig.c config.c: sh makeconfig.sh | indent >$@ rconfig.c: sh makerconfig.sh | indent >$@ sources: sh makesources.sh gen: make -f Makefile.genfft Makefile.fftw: sh makemakefile.sh distclean: clean clean: rm -f *~ a.out core *.c genfft *.zi *.zo nohup.out rm -f *.cm[xio] *.o rm -f Makefile.fftw Makefile.rfftw rm -f *.c fftw-2.1.5/gensrc/Makefile.fftw.am0000644000175400001440000000223107637531662012445 # This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@fftw.la include_HEADERS = @FFTW_PREFIX@fftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS=@NOTW_CODELETS@ TWID_CODELETS=@TWID_CODELETS@ NOTWI_CODELETS=@NOTWI_CODELETS@ TWIDI_CODELETS=@TWIDI_CODELETS@ CODELETS=$(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = timer.c config.c planner.c twiddle.c executor.c \ generic.c fftwnd.c malloc.c wisdom.c wisdomio.c putils.c rader.c \ fftwf77.c lib@FFTW_PREFIX@fftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ fftw.h fftw-int.h lib@FFTW_PREFIX@fftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) config.c DISTCLEANFILES = fftw.h sfftw.h dfftw.h @FFTW_PREFIX1@fftw.h: fftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw.h > $@ CLEANFILES = @FFTW_PREFIX1@fftw.h # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo fftw-2.1.5/gensrc/Makefile.genfft0000644000175400001440000000542107637531662012360 # debugging -*- Makefile -*- OCAMLC = ocamlcp -g OCAMLCI = ocamlc -g OCAMLLINK = ocamlcp -custom -g O= cmo A= cma # non debugging OCAMLC = ocamlopt OCAMLCI = ocamlopt OCAMLLINK = ocamlopt O= cmx A= cmxa all: genfft .SUFFIXES: .$(O) .cmi .ml .mli # order is important here OBJS = \ magic.$(O) \ util.$(O) \ number.$(O) \ variable.$(O) \ expr.$(O) \ dag.$(O) \ exprdag.$(O) \ complex.$(O) \ schedule.$(O) \ asched.$(O) \ twiddle.$(O) \ symmetry.$(O) \ fft.$(O) \ to_c.$(O) \ genfft.$(O) genfft: $(OBJS) rm -f genfft $(OCAMLLINK) nums.$(A) unix.$(A) -o genfft $(OBJS) -cclib -lnums \ -cclib -lunix %.$(O): %.ml $(OCAMLC) -c $< %.cmi: %.mli $(OCAMLCI) -c $< # dependency list generated by ocamldep asched.cmo: expr.cmi magic.cmo schedule.cmi util.cmi variable.cmi asched.cmi asched.cmx: expr.cmx magic.cmx schedule.cmx util.cmx variable.cmx asched.cmi ast.cmo: asched.cmi ast.cmx: asched.cmx complex.cmo: exprdag.cmi number.cmi variable.cmi complex.cmi complex.cmx: exprdag.cmx number.cmx variable.cmx complex.cmi dag.cmo: expr.cmi util.cmi variable.cmi dag.cmi dag.cmx: expr.cmx util.cmx variable.cmx dag.cmi expr.cmo: number.cmi variable.cmi expr.cmi expr.cmx: number.cmx variable.cmx expr.cmi exprdag.cmo: expr.cmi magic.cmo number.cmi util.cmi variable.cmi exprdag.cmi exprdag.cmx: expr.cmx magic.cmx number.cmx util.cmx variable.cmx exprdag.cmi fft.cmo: complex.cmi exprdag.cmi magic.cmo symmetry.cmo twiddle.cmo util.cmi fft.cmx: complex.cmx exprdag.cmx magic.cmx symmetry.cmx twiddle.cmx util.cmx genfft.cmo: asched.cmi expr.cmi exprdag.cmi fft.cmo magic.cmo schedule.cmi \ symmetry.cmo to_c.cmi twiddle.cmo util.cmi variable.cmi genfft.cmx: asched.cmx expr.cmx exprdag.cmx fft.cmx magic.cmx schedule.cmx \ symmetry.cmx to_c.cmx twiddle.cmx util.cmx variable.cmx number.cmo: util.cmi number.cmi number.cmx: util.cmx number.cmi schedule.cmo: dag.cmi expr.cmi magic.cmo util.cmi variable.cmi schedule.cmi schedule.cmx: dag.cmx expr.cmx magic.cmx util.cmx variable.cmx schedule.cmi symmetry.cmo: complex.cmi exprdag.cmi util.cmi symmetry.cmx: complex.cmx exprdag.cmx util.cmx to_c.cmo: asched.cmi expr.cmi exprdag.cmi fft.cmo magic.cmo number.cmi \ util.cmi variable.cmi to_c.cmi to_c.cmx: asched.cmx expr.cmx exprdag.cmx fft.cmx magic.cmx number.cmx \ util.cmx variable.cmx to_c.cmi twiddle.cmo: complex.cmi magic.cmo util.cmi twiddle.cmx: complex.cmx magic.cmx util.cmx util.cmo: magic.cmo util.cmi util.cmx: magic.cmx util.cmi variable.cmo: variable.cmi variable.cmx: variable.cmi asched.cmi: expr.cmi schedule.cmi variable.cmi complex.cmi: exprdag.cmi dag.cmi: expr.cmi util.cmi variable.cmi expr.cmi: number.cmi variable.cmi exprdag.cmi: expr.cmi number.cmi variable.cmi schedule.cmi: expr.cmi to_c.cmi: asched.cmi expr.cmi variable.cmi fftw-2.1.5/gensrc/Makefile.rfftw.am0000644000175400001440000000210007637531662012622 # This file was automatically generated # DO NOT EDIT! # lib_LTLIBRARIES = lib@FFTW_PREFIX@rfftw.la include_HEADERS = @FFTW_PREFIX@rfftw.h INCLUDES = -I$(srcdir)/../fftw -I$(srcdir) NOTW_CODELETS=@NOTW_CODELETS@ TWID_CODELETS=@TWID_CODELETS@ NOTWI_CODELETS=@NOTWI_CODELETS@ TWIDI_CODELETS=@TWIDI_CODELETS@ CODELETS=$(NOTW_CODELETS) $(TWID_CODELETS) $(NOTWI_CODELETS) $(TWIDI_CODELETS) OTHERSRC = rconfig.c rplanner.c rexec.c rexec2.c rfftwnd.c rgeneric.c \ rfftwf77.c lib@FFTW_PREFIX@rfftw_la_SOURCES = $(CODELETS) $(OTHERSRC) \ rfftw.h lib@FFTW_PREFIX@rfftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ MAINTAINERCLEANFILES = $(CODELETS) rconfig.c DISTCLEANFILES = srfftw.h drfftw.h @FFTW_PREFIX1@rfftw.h: rfftw.h rm -f $@ sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw.h > $@ CLEANFILES = @FFTW_PREFIX1@rfftw.h # for some reason, automake tries to use autoheader in order to # generate config.h.in, and fails because config.h.in is GNU-lly # incorrect. Just disable autoheader AUTOHEADER=echo fftw-2.1.5/gensrc/Makefile.sources0000644000175400001440000000321507637531662012571 INDENT = indent -i5 # if you don't have indent: INDENT = cat GENFFT = ./genfft GOPTS = -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi #-magic-use-wsquare -magic-enable-fma -magic-enable-fma-expansion PRELUDE = ./codelet_prelude ADD_DATE = sed -e s/@DATE@/"`date`"/ $(NOTW_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -notwiddle $*) | $(ADD_DATE) | $(INDENT) >$@ $(NOTWI_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -notwiddleinv $*) | $(ADD_DATE) | $(INDENT) >$@ $(TWID_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -twiddle $*) | $(ADD_DATE) | $(INDENT) >$@ $(TWIDI_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -twiddleinv $*) | $(ADD_DATE) | $(INDENT) >$@ $(REAL2HC_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -real2hc $*) | $(ADD_DATE) | $(INDENT) >$@ $(HC2REAL_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -hc2real $*) | $(ADD_DATE) | $(INDENT) >$@ $(HC2HC_FORWARD_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -hc2hc-forward $*) | $(ADD_DATE) | $(INDENT) >$@ $(HC2HC_BACKWARD_PREFIX)%.c: $(GENFFT) $(COPYRIGHT) $(PRELUDE) (cat $(COPYRIGHT) $(PRELUDE); $(GENFFT) $(GOPTS) -hc2hc-backward $*) | $(ADD_DATE) | $(INDENT) >$@ .PHONY: $(GENFFT) $(GENFFT): make -f Makefile.genfft clean: rm -f *~ a.out core *.c $(GENFFT) *.zi *.zo nohup.out rm -f *.cm[xio] *.o fftw-2.1.5/gensrc/README0000644000175400001440000000411007637531662010322 The FFTW Codelet Generator In this directory you can find the program that generates the FFTW codelets. You do not need to concern yourself with the codelet generator unless you wish to; the FFTW package is preconfigured with a standard set of codelets covering most practical problems. The codelets are optimized blocks of C code implementing transforms of small sizes, which we compose to compute DFTs of general sizes. There are a large number of advantages to generating the codelets rather than writing them by hand, many of which are described in our papers (available on the FFTW web page). Suffice it to say that code generation allows us to use long, unrolled blocks of code containing many optimizations that would be too tedious to apply by hand. For examples of what the codelets look like, look at the fn*.c and ftw*.c files in the fftw/ directory. The codelet generator is written in the Objective Caml language, and before you can do anything with it you must install the Objective Caml compilers. You can download compilers and interpreters, and also read about this elegant and powerful language, at: http://pauillac.inria.fr/ocaml/ Once you have installed Objective Caml, you can alter the set of codelets (hard-coded transforms) that FFTW has to work with by editing the file "config" and then running 'make'. This is also described in the FFTW manual. If you are curious and/or ambitious, you may also want to look at the codelet generator itself (the *.ml files). Some documentation is included in the source files, and we encourage you to contact us (fftw@fftw.org) if you have any questions. The files that you are most likely to want to edit are: fft.ml: if you want to modify the FFT algorithms that the generator uses. to_c.ml: if you want to change how the C source code is produced ("unparsed") from the symbolic expressions used internally by the generator. For example, if you wanted to alter FFTW to use high-precision arithmetic routines, you would modify to_c.ml (and possibly also number.ml, which controls how constants are expressed). fftw-2.1.5/gensrc/asched.ml0000644000175400001440000001271107637531662011231 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* Here, we take a schedule (produced by schedule.ml) ordering a sequence of instructions, and produce an annotated schedule. The annotated schedule has the same ordering as the original schedule, but is additionally partitioned into nested blocks of temporary variables. The partitioning is computed via a heuristic algorithm. The blocking allows the C code that we generate to consist of nested blocks that help communicate variable lifetimes to the compiler. *) (* $Id: asched.ml,v 1.15 2003/03/16 23:43:46 stevenj Exp $ *) open Schedule open Expr open Variable type annotated_schedule = Annotate of variable list * variable list * variable list * int * aschedule and aschedule = ADone | AInstr of assignment | ASeq of (annotated_schedule * annotated_schedule) let addelem a set = if not (List.mem a set) then a :: set else set let union l = let f x = addelem x (* let is source of polymorphism *) in List.fold_right f l (* set difference a - b *) let diff a b = Util.filter (fun x -> not (List.mem x b)) a let rec minimize f = function [] -> failwith "minimize" | [n] -> n | n :: rest -> let x = minimize f rest in if (f x) >= (f n) then n else x (* find all variables used inside a scheduling unit *) let rec find_block_vars = function Done -> [] | (Instr (Assign (_, x))) -> find_vars x | Par a -> List.flatten (List.map find_block_vars a) | Seq (a, b) -> (find_block_vars a) @ (find_block_vars b) let uniq l = List.fold_right (fun a b -> if List.mem a b then b else a :: b) l [] let rec has_similar x = function [] -> false | a::l -> Variable.similar a x or has_similar x l let rec overlap a b = Util.count (fun y -> has_similar y b) a (* reorder a list of schedules so as to maximize overlap of variables *) let reorder l = let rec loop = function [] -> [] | (a, va) :: b -> let c = List.map (fun (a, x) -> ((a, x), overlap va x)) b in let c' = Sort.list (fun (_, a) (_, b) -> a > b) c in let b' = List.map (fun (a, _) -> a) c' in a :: (loop b') in let l' = List.map (fun x -> x, uniq (find_block_vars x)) l in (* start with smallest block --- does this matter ? *) match l' with [] -> [] | _ -> let m = minimize (fun (_, x) -> List.length x) l' in let l'' = Util.remove m l' in loop (m :: l'') let rec rewrite_declarations force_declarations (Annotate (_, _, declared, _, what)) = let m = !Magic.number_of_variables in let declare_it declared = if (force_declarations or List.length declared >= m) then ([], declared) else (declared, []) in match what with ADone -> Annotate ([], [], [], 0, what) | AInstr i -> let (u, d) = declare_it declared in Annotate ([], u, d, 0, what) | ASeq (a, b) -> let ma = rewrite_declarations false a and mb = rewrite_declarations false b in let Annotate (_, ua, _, _, _) = ma and Annotate (_, ub, _, _, _) = mb in let (u, d) = declare_it (declared @ ua @ ub) in Annotate ([], u, d, 0, ASeq (ma, mb)) let annotate schedule = let m = !Magic.number_of_variables in let rec really_analyze live_at_end = function Done -> Annotate (live_at_end, [], [], 0, ADone) | Instr i -> (match i with Assign (v, x) -> let vars = (find_vars x) in Annotate (Util.remove v (union live_at_end vars), [v], [], 0, AInstr i)) | Seq (a, b) -> let ab = analyze live_at_end b in let Annotate (live_at_begin_b, defined_b, _, depth_a, _) = ab in let aa = analyze live_at_begin_b a in let Annotate (live_at_begin_a, defined_a, _, depth_b, _) = aa in let defined = Util.filter is_temporary (defined_a @ defined_b) in let declarable = diff defined live_at_end in let undeclarable = diff defined declarable and maxdepth = max depth_a depth_b in Annotate (live_at_begin_a, undeclarable, declarable, List.length declarable + maxdepth, ASeq (aa, ab)) | _ -> failwith "really_analyze" (* the pick_best machinery is currently unused. Too slow, and I don't know what `best' means *) and analyze l = let pick_best w = minimize (function Annotate (_, _, _, depth, _) -> depth) (List.map (really_analyze l) w) in function | Seq (a, Done) -> analyze l a | Seq (Done, a) -> analyze l a (* try to balance nested Par blocks *) | Par [a] -> pick_best [a] | Par l -> let n2 = (List.length l) / 2 in let rec loop n a b = if n = 0 then (List.rev b, a) else match a with [] -> failwith "loop" | x :: y -> loop (n - 1) y (x :: b) in let (a, b) = loop n2 (reorder l) [] in pick_best [Seq (Par a, Par b)] | x -> pick_best [x] in rewrite_declarations true (analyze [] schedule) fftw-2.1.5/gensrc/asched.mli0000644000175400001440000000220707637531662011401 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: asched.mli,v 1.7 2003/03/16 23:43:46 stevenj Exp $ *) open Variable open Expr type annotated_schedule = Annotate of variable list * variable list * variable list * int * aschedule and aschedule = ADone | AInstr of assignment | ASeq of (annotated_schedule * annotated_schedule) val annotate : Schedule.schedule -> annotated_schedule fftw-2.1.5/gensrc/codelet_prelude0000644000175400001440000000020307637531662012523 /* This file was automatically generated --- DO NOT EDIT */ /* Generated on @DATE@ */ #include "fftw-int.h" #include "fftw.h" fftw-2.1.5/gensrc/complex.ml0000644000175400001440000001074007637531662011451 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: complex.ml,v 1.23 2003/03/16 23:43:46 stevenj Exp $ *) (* abstraction layer for complex operations *) (* type of complex expressions *) open Exprdag open Exprdag.LittleSimplifier type expr = CE of node * node let two = CE (makeNum Number.two, makeNum Number.zero) let one = CE (makeNum Number.one, makeNum Number.zero) let zero = CE (makeNum Number.zero, makeNum Number.zero) let inverse_int n = CE (makeNum (Number.div Number.one (Number.of_int n)), makeNum Number.zero) let times_4_2 (CE (a, b)) (CE (c, d)) = CE (makePlus [makeTimes (a, c); makeUminus (makeTimes (b, d))], makePlus [makeTimes (a, d); makeTimes (b, c)]) let simple = function Num a -> Number.is_zero a or Number.is_one a or Number.is_mone a | _ -> false let rec times_3_3 (CE (a, b)) (CE (c, d)) = (* refuse to do the 3-3 algorithm if a=1, i, -i, -1, etc. *) if simple a or simple b or simple c or simple d then times_4_2 (CE (c, d)) (CE (a, b)) else match a with Num _ -> let amb = makePlus [a; makeUminus b] and cpd = makePlus [c; d] and apb = makePlus [a; b] in let apbc = makeTimes (apb, c) and bcpd = makeTimes (b, cpd) and ambd = makeTimes (amb, d) in CE (makePlus [apbc; makeUminus bcpd], makePlus [bcpd; ambd]) | _ -> match c with Num _ -> times_3_3 (CE (c, d)) (CE (a, b)) | _ -> times_4_2 (CE (a, b)) (CE (c, d)) let times a b = if !Magic.times_3_3 then times_3_3 a b else times_4_2 a b let uminus (CE (a, b)) = CE (makeUminus a, makeUminus b) (* hack to swap real<->imaginary. Used by hc2hc codelets *) let swap_re_im (CE (r, i)) = CE (i, r) (* complex exponential (of root of unity); returns exp(2*pi*i/n * m) *) let exp n i = let (c, s) = Number.cexp n i in CE (makeNum c, makeNum s) (* complex sum *) let plus a = let rec unzip_complex = function [] -> ([], []) | ((CE (a, b)) :: s) -> let (r,i) = unzip_complex s in (a::r), (b::i) in let (c, d) = unzip_complex a in CE (makePlus c, makePlus d) (* extract real/imaginary *) let real (CE (a, b)) = CE (a, makeNum Number.zero) let imag (CE (a, b)) = CE (makeNum Number.zero, b) let conj (CE (a, b)) = CE (a, makeUminus b) let abs_sqr (CE (a, b)) = makePlus [makeTimes (a, a); makeTimes (b, b)] (* * special cases for complex numbers w where |w| = 1 *) (* (a + bi)^2 = (2a^2 - 1) + 2abi *) let wsquare (CE (a, b)) = let twoa = makeTimes (makeNum Number.two, a) in let twoasq = makeTimes (twoa, a) and twoab = makeTimes (twoa, b) in CE (makePlus [twoasq; makeUminus (makeNum Number.one)], twoab) (* * compute w^n given w^{n-1}, w^{n-2}, and w, using the identity * * w^n + w^{n-2} = w^{n-1} (w + w^{-1}) = 2 w^{n-1} Re(w) *) let wthree (CE (an1, bn1)) wn2 (CE (a, b)) = let twoa = makeTimes (makeNum Number.two, a) in let twoa_wn1 = CE (makeTimes (twoa, an1), makeTimes (twoa, bn1)) in plus [twoa_wn1; (uminus wn2)] (* abstraction of sum_{i=0}^{n-1} *) (* let sigma a b f = plus (Util.forall :: a b f) *) let sigma a b f = let rec loop a = if (a >= b) then [] else (f a) :: (loop (a + 1)) in plus (loop a) (* complex variables *) type variable = CV of Variable.variable * Variable.variable let load_var (CV (vr, vi)) = CE (Load vr, Load vi) let store_var (CV (vr, vi)) (CE (xr, xi)) = [Store (vr, xr); Store (vi, xi)] let store_real (CV (vr, vi)) (CE (xr, xi)) = [Store (vr, xr)] let store_imag (CV (vr, vi)) (CE (xr, xi)) = [Store (vi, xi)] let access what k = let (r, i) = what k in CV (r, i) let access_input = access Variable.access_input let access_output = access Variable.access_output let access_twiddle = access Variable.access_twiddle fftw-2.1.5/gensrc/complex.mli0000644000175400001440000000310307637531662011615 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: complex.mli,v 1.19 2003/03/16 23:43:46 stevenj Exp $ *) type expr val two : expr val one : expr val zero : expr val inverse_int : int -> expr val times : expr -> expr -> expr val uminus : expr -> expr val swap_re_im : expr -> expr val exp : int -> int -> expr val plus : expr list -> expr val real : expr -> expr val imag : expr -> expr val conj : expr -> expr val sigma : int -> int -> (int -> expr) -> expr val wsquare : expr -> expr val wthree : expr -> expr -> expr -> expr type variable val load_var : variable -> expr val store_var : variable -> expr -> Exprdag.node list val store_real : variable -> expr -> Exprdag.node list val store_imag : variable -> expr -> Exprdag.node list val access_input : int -> variable val access_output : int -> variable val access_twiddle : int -> variable fftw-2.1.5/gensrc/config0000755000175400001440000000244007637531662010641 # This file contains a description of the codelets that compose fftw. # NOTW is a list of the sizes that FFTW contains hard-coded transforms for # (the "base cases" of the FFT recursion): NOTW="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64" # TWIDDLE is a list of the sizes that FFTW can "recurse by" using # hard-coded codelets. These are the "radices" that FFTW can handle # with optimal speed. (e.g. Suppose you include a size r in TWIDDLE. # Then, for any N divisible by r, FFTW can break a transform of size # N into r transforms of size N/r using an optimized codelet.) TWIDDLE="2 3 4 5 6 7 8 9 10 16 32 64" # same as NOTW and TWIDDLE, but for real->complex transforms NOTW_REAL="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 32 64 128" TWIDDLE_REAL="2 3 4 5 6 7 8 9 10 16 32" # FFTW & RFFTW source directories FFTW_SRCDIR=../fftw RFFTW_SRCDIR=../rfftw # Prefixes of file names NOTW_PREFIX=fn_ TWID_PREFIX=ftw_ NOTWI_PREFIX=fni_ TWIDI_PREFIX=ftwi_ REAL2HC_PREFIX=frc_ HC2REAL_PREFIX=fcr_ HC2HC_FORWARD_PREFIX=fhf_ HC2HC_BACKWARD_PREFIX=fhb_ # To keep the lawyers happy COPYRIGHT=../COPYRIGHT export NOTW TWIDDLE FFTW_SRCDIR NOTW_PREFIX TWID_PREFIX export NOTWI_PREFIX TWIDI_PREFIX COPYRIGHT NOTW_REAL TWIDDLE_REAL export REAL2HC_PREFIX HC2REAL_PREFIX HC2HC_FORWARD_PREFIX export HC2HC_BACKWARD_PREFIX fftw-2.1.5/gensrc/config_prelude0000644000175400001440000000101607637531662012354 /* config.c -- this file contains all the codelets the system knows about */ /* $Id: config_prelude,v 1.7 2000/03/02 21:58:53 stevenj Exp $ */ #include "fftw-int.h" /* the signature is the same as the size, for now */ #define NOTW_CODELET(x) \ &fftw_no_twiddle_##x##_desc #define NOTWI_CODELET(x) \ &fftwi_no_twiddle_##x##_desc #define TWIDDLE_CODELET(x) \ &fftw_twiddle_##x##_desc #define TWIDDLEI_CODELET(x) \ &fftwi_twiddle_##x##_desc /* automatically-generated list of codelets */ fftw-2.1.5/gensrc/dag.ml0000644000175400001440000000640607637531662010541 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: dag.ml,v 1.17 2003/03/16 23:43:46 stevenj Exp $ *) open Util (* Here, we have functions to transform a sequence of assignments (variable = expression) into a DAG (a directed, acyclic graph). The nodes of the DAG are the assignments, and the edges indicate dependencies. (The DAG is analyzed in the scheduler to find an efficient ordering of the assignments.) This file also contains utilities to manipulate the DAG in various ways. *) (******************************************** * Dag structure ********************************************) type color = RED | BLUE | BLACK | YELLOW type dagnode = { assigned: Variable.variable; mutable expression: Expr.expr; input_variables: Variable.variable list; mutable successors: dagnode list; mutable predecessors: dagnode list; mutable label: int; mutable color: color} type dag = Dag of (dagnode list) (* true if node uses v *) let node_uses v node = List.exists (Variable.same v) node.input_variables (* true if assignment of v clobbers any input of node *) let node_clobbers node v = List.exists (Variable.clobbers v) node.input_variables (* true if nodeb depends on nodea *) let depends_on nodea nodeb = node_uses nodea.assigned nodeb or node_clobbers nodea nodeb.assigned (* transform an assignment list into a dag *) let makedag alist = let dag = List.map (fun assignment -> let (v, x) = assignment in { assigned = v; expression = x; input_variables = Expr.find_vars x; successors = []; predecessors = []; label = 0; color = BLACK }) alist in begin for_list dag (fun i -> for_list dag (fun j -> if depends_on i j then begin i.successors <- j :: i.successors; j.predecessors <- i :: j.predecessors; end)); Dag dag; end let map f (Dag dag) = Dag (List.map f dag) let for_all (Dag dag) f = (* type system loophole *) let make_unit _ = () in make_unit (List.map f dag) let to_list (Dag dag) = dag let find_node f (Dag dag) = Util.find_elem f dag (* breadth-first search *) let rec bfs (Dag dag) node init_label = let _ = node.label <- init_label in let rec loop = function [] -> () | node :: rest -> let neighbors = node.predecessors @ node.successors in let m = min_list (List.map (fun node -> node.label) neighbors) in if (node.label > m + 1) then begin node.label <- m + 1; loop (rest @ neighbors); end else loop rest in let neighbors = node.predecessors @ node.successors in loop neighbors fftw-2.1.5/gensrc/dag.mli0000644000175400001440000000271107637531662010705 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: dag.mli,v 1.12 2003/03/16 23:43:46 stevenj Exp $ *) open Util type color = | RED | BLUE | BLACK | YELLOW type dagnode = { assigned: Variable.variable; mutable expression: Expr.expr; input_variables: Variable.variable list; mutable successors: dagnode list; mutable predecessors: dagnode list; mutable label: int; mutable color: color} type dag val makedag : (Variable.variable * Expr.expr) list -> dag val map : (dagnode -> dagnode) -> dag -> dag val for_all : dag -> (dagnode -> unit) -> unit val to_list : dag -> (dagnode list) val bfs : dag -> dagnode -> int -> unit val find_node : (dagnode -> bool) -> dag -> dagnode option fftw-2.1.5/gensrc/expr.ml0000644000175400001440000000267307637531662010766 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: expr.ml,v 1.14 2003/03/16 23:43:46 stevenj Exp $ *) (* Here, we define the data type encapsulating a symbolic arithmetic expression, and provide some routines for manipulating it. (See also simplify.ml for functions to do symbolic simplifications.) *) type expr = Num of Number.number | Var of Variable.variable | Plus of expr list | Times of expr * expr | Uminus of expr | Integer of int type assignment = Assign of Variable.variable * expr let rec find_vars x = match x with | Var y -> [y] | Plus l -> List.flatten (List.map find_vars l) | Times (a, b) -> (find_vars a) @ (find_vars b) | Uminus a -> find_vars a | _ -> [] fftw-2.1.5/gensrc/expr.mli0000644000175400001440000000212707637531662011131 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: expr.mli,v 1.11 2003/03/16 23:43:46 stevenj Exp $ *) type expr = | Num of Number.number | Var of Variable.variable | Plus of expr list | Times of expr * expr | Uminus of expr | Integer of int val find_vars : expr -> Variable.variable list type assignment = Assign of Variable.variable * expr fftw-2.1.5/gensrc/exprdag.ml0000644000175400001440000006716707637531662011453 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $ *) let cvsid = "$Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $" open Util type node = | Num of Number.number | Load of Variable.variable | Store of Variable.variable * node | Plus of node list | Times of node * node | Uminus of node (* a dag is represented by the list of its roots *) type dag = Dag of (node list) module Hash = struct (* various hash functions *) let hash_float x = let (mantissa, exponent) = frexp x in truncate (mantissa *. 10000.0) let hash_variable = Variable.hash let rec hash_node = function Num x -> hash_float (Number.to_float x) | Load v -> 1 + 1237 * hash_variable v | Store (v, x) -> 2 * hash_variable v - 2345 * hash_node x | Plus l -> 5 + 23451 * sum_list (List.map Hashtbl.hash l) | Times (a, b) -> 31415 * Hashtbl.hash a + 2718 * Hashtbl.hash b | Uminus x -> 42 + 12345 * (hash_node x) end open Hash module LittleSimplifier = struct (* * The LittleSimplifier module implements a subset of the simplifications * of the AlgSimp module. These simplifications can be executed * quickly here, while they would take a long time using the heavy * machinery of AlgSimp. * * For example, 0 * x is simplified to 0 tout court by the LittleSimplifier. * On the other hand, AlgSimp would first simplify x, generating lots * of common subexpressions, storing them in a table etc, just to * discard all the work later. Similarly, the LittleSimplifier * reduces the constant FFT in Rader's algorithm to a constant sequence. *) let rec makeNum = function | n -> Num n and makeUminus = function | Uminus a -> a | Num a -> makeNum (Number.negate a) | a -> Uminus a and makeTimes = function | (Num a, Num b) -> makeNum (Number.mul a b) | (Num a, Times (Num b, c)) -> makeTimes (makeNum (Number.mul a b), c) | (Num a, b) when Number.is_zero a -> makeNum (Number.zero) | (Num a, b) when Number.is_one a -> b | (Num a, b) when Number.is_mone a -> makeUminus b | (Num a, Uminus b) -> Times (makeUminus (Num a), b) | (a, (Num b as b')) -> makeTimes (b', a) | (a, b) -> Times (a, b) and makePlus l = let rec reduceSum x = match x with [] -> [] | [Num a] -> if Number.is_zero a then [] else x | (Num a) :: (Num b) :: c -> reduceSum ((makeNum (Number.add a b)) :: c) | ((Num _) as a') :: b :: c -> b :: reduceSum (a' :: c) | a :: s -> a :: reduceSum s in match reduceSum l with [] -> makeNum (Number.zero) | [a] -> a | [a; b] when a == b -> makeTimes (Num Number.two, a) | [Times (Num a, b); Times (Num c, d)] when b == d -> makeTimes (makePlus [Num a; Num c], b) | a -> Plus a end (************************************************************* * Functional associative table *************************************************************) (* * this module implements a functional associative table. * The table is parametrized by an equality predicate and * a hash function, with the restriction that (equal a b) ==> * hash a == hash b. * The table is purely functional and implemented using a binary * search tree (not balanced for now) *) module AssocTable : sig type ('a, 'b) elem = | Leaf | Node of int * ('a, 'b) elem * ('a, 'b) elem * ('a * 'b) list val empty : ('a, 'b) elem val lookup : ('a -> int) -> ('a -> 'b -> bool) -> 'a -> ('b, 'c) elem -> 'c option val insert : ('a -> int) -> 'a -> 'c -> ('a, 'c) elem -> ('a, 'c) elem end = struct type ('a, 'b) elem = Leaf | Node of int * ('a, 'b) elem * ('a, 'b) elem * ('a * 'b) list let empty = Leaf let lookup hash equal key table = let h = hash key in let rec look = function Leaf -> None | Node (hash_key, left, right, this_list) -> if (hash_key < h) then look left else if (hash_key > h) then look right else let rec loop = function [] -> None | (a, b) :: rest -> if (equal key a) then Some b else loop rest in loop this_list in look table let insert hash key value table = let h = hash key in let rec ins = function Leaf -> Node (h, Leaf, Leaf, [(key, value)]) | Node (hash_key, left, right, this_list) -> if (hash_key < h) then Node (hash_key, ins left, right, this_list) else if (hash_key > h) then Node (hash_key, left, ins right, this_list) else Node (hash_key, left, right, (key, value) :: this_list) in ins table end let node_insert = AssocTable.insert hash_node let node_lookup = AssocTable.lookup hash_node (==) (************************************************************* * Monads *************************************************************) (* * Phil Wadler has many well written papers about monads. See * http://cm.bell-labs.com/cm/cs/who/wadler/ *) (* vanilla state monad *) module StateMonad = struct let returnM x = fun s -> (x, s) let (>>=) = fun m k -> fun s -> let (a', s') = m s in let (a'', s'') = k a' s' in (a'', s'') let (>>) = fun m k -> m >>= fun _ -> k let rec mapM f = function [] -> returnM [] | a :: b -> f a >>= fun a' -> mapM f b >>= fun b' -> returnM (a' :: b') let runM m x initial_state = let (a, _) = m x initial_state in a let fetchState = fun s -> s, s let storeState newState = fun _ -> (), newState end (* monad with built-in memoizing capabilities *) module MemoMonad = struct open StateMonad let memoizing lookupM insertM f k = lookupM k >>= fun vMaybe -> match vMaybe with Some value -> returnM value | None -> f k >>= fun value -> insertM k value >> returnM value let runM initial_state m x = StateMonad.runM m x initial_state end module Oracle : sig val should_flip_sign : node -> bool end = struct open AssocTable let make_memoizer hash equal = let table = ref empty in fun f k -> match lookup hash equal k !table with Some value -> value | None -> let value = f k in begin table := insert hash k value !table; value end let almost_equal x y = let epsilon = 1.0E-8 in (abs_float (x -. y) < epsilon) or (abs_float (x -. y) < epsilon *. (abs_float x +. abs_float y)) let memoizing_numbers = make_memoizer (fun x -> hash_float (abs_float x)) (fun a b -> almost_equal a b or almost_equal (-. a) b) let absid = memoizing_numbers (fun x -> x) let memoizing_variables = make_memoizer hash_variable Variable.same let memoizing_nodes = make_memoizer hash_node (==) let random_oracle = memoizing_variables (fun _ -> (float (Random.bits())) /. 1073741824.0) let sum_list l = List.fold_right (+.) l 0.0 let rec eval x = memoizing_nodes (function Num x -> Number.to_float x | Load v -> random_oracle v | Store (v, x) -> random_oracle v | Plus l -> sum_list (List.map eval l) | Times (a, b) -> (eval a) *. (eval b) | Uminus x -> -. (eval x) ) x let should_flip_sign node = let v = eval node in let v' = absid v in not (almost_equal v v') end module Reverse = struct open StateMonad open MemoMonad open AssocTable open LittleSimplifier let fetchDuals = fetchState let storeDuals = storeState let lookupDualsM key = fetchDuals >>= fun table -> returnM (node_lookup key table) let insertDualsM key value = fetchDuals >>= fun table -> storeDuals (node_insert key value table) let rec visit visited vtable parent_table = function [] -> (visited, parent_table) | node :: rest -> match AssocTable.lookup hash_node (==) node vtable with Some _ -> visit visited vtable parent_table rest | None -> let children = match node with Store (v, n) -> [n] | Plus l -> l | Times (a, b) -> [a; b] | Uminus x -> [x] | _ -> [] in let rec loop t = function [] -> t | a :: rest -> (match AssocTable.lookup hash_node (==) a t with None -> loop (AssocTable.insert hash_node a [node] t) rest | Some c -> loop (AssocTable.insert hash_node a (node :: c) t) rest) in visit (node :: visited) (AssocTable.insert hash_node node () vtable) (loop parent_table children) (children @ rest) let make_reverser parent_table = let rec termM node candidate_parent = match candidate_parent with Store (_, n) when n == node -> dualM candidate_parent >>= fun x' -> returnM [x'] | Plus (l) when List.memq node l -> dualM candidate_parent >>= fun x' -> returnM [x'] | Times (a, b) when b == node -> dualM candidate_parent >>= fun x' -> returnM [makeTimes (a, x')] | Uminus n when n == node -> dualM candidate_parent >>= fun x' -> returnM [makeUminus x'] | _ -> returnM [] and dualExpressionM this_node = mapM (termM this_node) (match AssocTable.lookup hash_node (==) this_node parent_table with Some a -> a | None -> failwith "bug in dualExpressionM" ) >>= fun l -> returnM (makePlus (List.flatten l)) and dualM this_node = memoizing lookupDualsM insertDualsM (function Load v as x -> if (Variable.is_twiddle v) then returnM (Load v) else (dualExpressionM x >>= fun d -> returnM (Store (v, d))) | Store (v, x) -> returnM (Load v) | x -> dualExpressionM x) this_node in dualM let is_store = function Store _ -> true | _ -> false let reverse (Dag dag) = let (all_nodes, parent_table) = visit [] empty empty dag in let reverserM = make_reverser parent_table in let mapReverserM = mapM reverserM in let duals = runM empty mapReverserM all_nodes in let roots = filter is_store duals in Dag roots end (************************************************************* * Various dag statistics *************************************************************) module Stats : sig type complexity val complexity : dag -> complexity val same_complexity : complexity -> complexity -> bool end = struct type complexity = int * int * int * int * int * int let rec visit visited vtable = function [] -> visited | node :: rest -> match AssocTable.lookup hash_node (==) node vtable with Some _ -> visit visited vtable rest | None -> let children = match node with Store (v, n) -> [n] | Plus l -> l | Times (a, b) -> [a; b] | Uminus x -> [x] | _ -> [] in visit (node :: visited) (AssocTable.insert hash_node node () vtable) (children @ rest) let complexity (Dag dag) = let rec loop (load, store, plus, times, uminus, num) = function [] -> (load, store, plus, times, uminus, num) | node :: rest -> loop (match node with Load _ -> (load + 1, store, plus, times, uminus, num) | Store _ -> (load, store + 1, plus, times, uminus, num) | Plus _ -> (load, store, plus + 1, times, uminus, num) | Times _ -> (load, store, plus, times + 1, uminus, num) | Uminus _ -> (load, store, plus, times, uminus + 1, num) | Num _ -> (load, store, plus, times, uminus, num + 1)) rest in let (l, s, p, t, u, n) = loop (0, 0, 0, 0, 0, 0) (visit [] AssocTable.empty dag) in (l, s, p, t, u, n) let same_complexity a b = (a = b) end (************************************************************* * Algebraic simplifier/elimination of common subexpressions *************************************************************) module AlgSimp : sig val algsimp : dag -> dag end = struct open StateMonad open MemoMonad open AssocTable let fetchSimp = fetchState >>= fun (s, _) -> returnM s let storeSimp s = fetchState >>= (fun (_, c) -> storeState (s, c)) let lookupSimpM key = fetchSimp >>= fun table -> returnM (node_lookup key table) let insertSimpM key value = fetchSimp >>= fun table -> storeSimp (node_insert key value table) let subset a b = List.for_all (fun x -> List.exists (fun y -> x == y) b) a let equalCSE a b = match (a, b) with (Num a, Num b) -> Number.equal a b | (Load a, Load b) -> Variable.same a b && (!Magic.collect_common_twiddle or not (Variable.is_twiddle a)) && (!Magic.collect_common_inputs or not (Variable.is_input a)) | (Times (a, a'), Times (b, b')) -> ((a == b) && (a' == b')) or ((a == b') && (a' == b)) | (Plus a, Plus b) -> subset a b && subset b a | (Uminus a, Uminus b) -> (a == b) | _ -> false let fetchCSE = fetchState >>= fun (_, c) -> returnM c let storeCSE c = fetchState >>= (fun (s, _) -> storeState (s, c)) let lookupCSEM key = fetchCSE >>= fun table -> returnM (AssocTable.lookup hash_node equalCSE key table) let insertCSEM key value = fetchCSE >>= fun table -> storeCSE (AssocTable.insert hash_node key value table) (* memoize both x and Uminus x (unless x is already negated) *) let identityM x = let memo x = memoizing lookupCSEM insertCSEM returnM x in match x with Uminus _ -> memo x | _ -> memo x >>= fun x' -> memo (Uminus x') >> returnM x' let makeNode = identityM (* simplifiers for various kinds of nodes *) let rec snumM = function n when Number.is_zero n -> makeNode (Num (Number.zero)) | n when Number.negative n -> makeNode (Num (Number.negate n)) >>= suminusM | n -> makeNode (Num n) and suminusM = function Uminus x -> makeNode x | Num a when (Number.is_zero a) -> snumM Number.zero | a -> makeNode (Uminus a) and stimesM = function | (Uminus a, b) -> stimesM (a, b) >>= suminusM | (a, Uminus b) -> stimesM (a, b) >>= suminusM | (Num a, Num b) -> snumM (Number.mul a b) | (Num a, Times (Num b, c)) -> snumM (Number.mul a b) >>= fun x -> stimesM (x, c) | (Num a, b) when Number.is_zero a -> snumM Number.zero | (Num a, b) when Number.is_one a -> makeNode b | (Num a, b) when Number.is_mone a -> suminusM b | (a, (Num _ as b')) -> stimesM (b', a) | (a, b) -> makeNode (Times (a, b)) and reduce_sumM x = match x with [] -> returnM [] | [Num a] -> if (Number.is_zero a) then returnM [] else returnM x | [Uminus (Num a)] -> if (Number.is_zero a) then returnM [] else returnM x | (Num a) :: (Num b) :: s -> snumM (Number.add a b) >>= fun x -> reduce_sumM (x :: s) | (Num a) :: (Uminus (Num b)) :: s -> snumM (Number.sub a b) >>= fun x -> reduce_sumM (x :: s) | (Uminus (Num a)) :: (Num b) :: s -> snumM (Number.sub b a) >>= fun x -> reduce_sumM (x :: s) | (Uminus (Num a)) :: (Uminus (Num b)) :: s -> snumM (Number.add a b) >>= suminusM >>= fun x -> reduce_sumM (x :: s) | ((Num _) as a) :: b :: s -> reduce_sumM (b :: a :: s) | ((Uminus (Num _)) as a) :: b :: s -> reduce_sumM (b :: a :: s) | a :: s -> reduce_sumM s >>= fun s' -> returnM (a :: s') (* collectCoeffM transforms * n x + n y => n (x + y) * where n is a number *) and collectCoeffM x = let rec filterM coeff = function Times (Num a, b) as y :: rest -> filterM coeff rest >>= fun (w, wo) -> if (Number.equal a coeff) then returnM (b :: w, wo) else returnM (w, y :: wo) | Uminus (Times (Num a, b)) as y :: rest -> filterM coeff rest >>= fun (w, wo) -> if (Number.equal a coeff) then suminusM b >>= fun b' -> returnM (b' :: w, wo) else returnM (w, y :: wo) | y :: rest -> filterM coeff rest >>= fun (w, wo) -> returnM (w, y :: wo) | [] -> returnM ([], []) and foundCoeffM a x = filterM a x >>= fun (w, wo) -> collectCoeffM wo >>= fun wo' -> (match w with [d] -> makeNode d | _ -> splusM w) >>= fun p -> snumM a >>= fun a' -> stimesM (a', p) >>= fun ap -> returnM (ap :: wo') in match x with [] -> returnM [] | Times (Num a, _) :: _ -> foundCoeffM a x | (Uminus (Times (Num a, b))) :: _ -> foundCoeffM a x | (a :: c) -> collectCoeffM c >>= fun c' -> returnM (a :: c') (* transform n1 * x + n2 * x ==> (n1 + n2) * x *) and collectExprM x = let rec findCoeffM = function Times (Num a as a', b) -> returnM (a', b) | Uminus (Times (Num a as a', b)) -> suminusM a' >>= fun a'' -> returnM (a'', b) | Uminus x -> snumM Number.one >>= suminusM >>= fun mone -> returnM (mone, x) | x -> snumM Number.one >>= fun one -> returnM (one, x) and filterM xpr = function [] -> returnM ([], []) | a :: b -> filterM xpr b >>= fun (w, wo) -> findCoeffM a >>= fun (c, x) -> if (xpr == x) then returnM (c :: w, wo) else returnM (w, a :: wo) in match x with [] -> returnM x | [a] -> returnM x | a :: b -> findCoeffM a >>= fun (_, xpr) -> filterM xpr x >>= fun (w, wo) -> collectExprM wo >>= fun wo' -> splusM w >>= fun w' -> stimesM (w', xpr) >>= fun t' -> returnM (t':: wo') and mangleSumM x = returnM x >>= reduce_sumM >>= collectExprM >>= collectCoeffM >>= reduce_sumM >>= eliminateButterflyishPatternsM >>= reduce_sumM and reorder_uminus = function (* push all Uminuses to the end *) [] -> [] | ((Uminus a) as a' :: b) -> (reorder_uminus b) @ [a'] | (a :: b) -> a :: (reorder_uminus b) and canonicalizeM = function [] -> snumM Number.zero | [a] -> makeNode a (* one term *) | a -> makeNode (Plus (reorder_uminus a)) >>= generateFusedMultAddM and negative = function Uminus _ -> true | _ -> false (* * simplify patterns of the form * * (c_1 * a + ...) + (c_2 * a + ...) * * The pattern includes arbitrary coefficients and minus signs. * A common case of this pattern is the butterfly * (a + b) + (a - b) * (a + b) - (a - b) *) and eliminateButterflyishPatternsM l = let rec findTerms depth x = match x with | Uminus x -> findTerms depth x | Times (Num a, b) -> findTerms (depth - 1) b | Plus l when depth > 0 -> x :: List.flatten (List.map (findTerms (depth - 1)) l) | x -> [x] and duplicates = function [] -> [] | a :: b -> if List.memq a b then a :: duplicates b else duplicates b in let rec flattenPlusM d coef x = if (List.memq x d) then snumM coef >>= fun coef' -> stimesM (coef', x) >>= fun x' -> returnM [x'] else match x with | Times (Num a, b) -> flattenPlusM d (Number.mul a coef) b | Uminus x -> flattenPlusM d (Number.negate coef) x | Plus l -> snumM coef >>= fun coef' -> mapM (fun x -> stimesM (coef', x)) l | x -> snumM coef >>= fun coef' -> stimesM (coef', x) >>= fun x' -> returnM [x'] in let l' = List.flatten (List.map (findTerms 1) l) in let d = duplicates l' in if (List.length d) > 0 then mapM (flattenPlusM d Number.one) l >>= fun a -> collectExprM (List.flatten a) >>= mangleSumM else returnM l and splusM l = mangleSumM l >>= fun l' -> (* no terms are negative. Don't do anything *) if not (List.exists negative l') then canonicalizeM l' (* all terms are negative. Negate all of them and collect the minus sign *) else if List.for_all negative l' then mapM suminusM l' >>= splusM >>= suminusM (* some terms are positive and some are negative. We are in trouble. Ask the Oracle *) else if Oracle.should_flip_sign (Plus l') then mapM suminusM l' >>= splusM >>= suminusM else canonicalizeM l' and generateFusedMultAddM = let rec is_multiplication = function | Times (Num a, b) -> true | Uminus (Times (Num a, b)) -> true | _ -> false and separate = function [] -> ([], [], Number.zero) | (Times (Num a, b)) as this :: c -> let (x, y, max) = separate c in let newmax = if (Number.greater a max) then a else max in (this :: x, y, newmax) | (Uminus (Times (Num a, b))) as this :: c -> let (x, y, max) = separate c in let newmax = if (Number.greater a max) then a else max in (this :: x, y, newmax) | this :: c -> let (x, y, max) = separate c in (x, this :: y, max) in function Plus l when (count is_multiplication l >= 2) && !Magic.enable_fma -> let (w, wo, max) = separate l in snumM (Number.div Number.one max) >>= fun invmax' -> snumM max >>= fun max' -> mapM (fun x -> stimesM (invmax', x)) w >>= splusM >>= fun pw' -> stimesM (max', pw') >>= fun mw' -> splusM (wo @ [mw']) | x -> returnM x (* monadic style algebraic simplifier for the dag *) let rec algsimpM x = memoizing lookupSimpM insertSimpM (function Num a -> snumM a | Plus a -> mapM algsimpM a >>= splusM | Times (a, b) -> algsimpM a >>= fun a' -> algsimpM b >>= fun b' -> stimesM (a', b') | Uminus a -> algsimpM a >>= suminusM | Store (v, a) -> algsimpM a >>= fun a' -> makeNode (Store (v, a')) | x -> makeNode x) x let initialTable = (empty, empty) let simp_roots = mapM algsimpM let algsimp (Dag dag) = Dag (runM initialTable simp_roots dag) end (* simplify the dag *) let rec simplification_loop v = let complexity = Stats.complexity v in let v = Reverse.reverse v in let v = AlgSimp.algsimp v in let v = Reverse.reverse v in let v = AlgSimp.algsimp v in let complexity' = Stats.complexity v in if (Stats.same_complexity complexity complexity') then v else simplification_loop v let algsimp v = let v = AlgSimp.algsimp v in simplification_loop v let make nodes = Dag nodes (************************************************************* * Conversion of the dag to an assignment list *************************************************************) (* * This function is messy. The main problem is that we want to * inline dag nodes conditionally, depending on how many times they * are used. The Right Thing to do would be to modify the * state monad to propagate some of the state backwards, so that * we know whether a given node will be used again in the future. * This modification is trivial in a lazy language, but it is * messy in a strict language like ML. * * In this implementation, we just do the obvious thing, i.e., visit * the dag twice, the first to count the node usages, and the second to * produce the output. *) module Destructor : sig val to_assignments : dag -> (Variable.variable * Expr.expr) list end = struct open StateMonad open MemoMonad open AssocTable let fresh = Variable.make_temporary let fetchAl = fetchState >>= (fun (al, _, _) -> returnM al) let storeAl al = fetchState >>= (fun (_, visited, visited') -> storeState (al, visited, visited')) let fetchVisited = fetchState >>= (fun (_, v, _) -> returnM v) let storeVisited visited = fetchState >>= (fun (al, _, visited') -> storeState (al, visited, visited')) let fetchVisited' = fetchState >>= (fun (_, _, v') -> returnM v') let storeVisited' visited' = fetchState >>= (fun (al, visited, _) -> storeState (al, visited, visited')) let lookupVisitedM' key = fetchVisited' >>= fun table -> returnM (AssocTable.lookup hash_node (==) key table) let insertVisitedM' key value = fetchVisited' >>= fun table -> storeVisited' (AssocTable.insert hash_node key value table) let counting f x = fetchVisited >>= (fun v -> match AssocTable.lookup hash_node (==) x v with Some count -> fetchVisited >>= (fun v' -> storeVisited (AssocTable.insert hash_node x (count + 1) v')) | None -> f x >>= fun () -> fetchVisited >>= (fun v' -> storeVisited (AssocTable.insert hash_node x 1 v'))) let with_varM v x = fetchAl >>= (fun al -> storeAl ((v, x) :: al)) >> returnM (Expr.Var v) let inlineM = returnM let with_tempM x = with_varM (fresh ()) x (* declare a temporary only if node is used more than once *) let with_temp_maybeM node x = fetchVisited >>= (fun v -> match AssocTable.lookup hash_node (==) node v with Some count -> if (count = 1 && !Magic.inline_single) then inlineM x else with_tempM x | None -> failwith "with_temp_maybeM") type fma = NO_FMA | FMA of node * node * node (* FMA (a, b, c) => a + b * c *) | FMS of node * node * node (* FMS (a, b, c) => -a + b * c *) | FNMS of node * node * node (* FNMS (a, b, c) => a - b * c *) let build_fma l = if (not !Magic.enable_fma_expansion) then NO_FMA else match l with | [Uminus a; Times (b, c)] -> FMS (a, b, c) | [Times (b, c); Uminus a] -> FMS (a, b, c) | [a; Uminus (Times (b, c))] -> FNMS (a, b, c) | [Uminus (Times (b, c)); a] -> FNMS (a, b, c) | [a; Times (b, c)] -> FMA (a, b, c) | [Times (b, c); a] -> FMA (a, b, c) | _ -> NO_FMA let children_fma l = match build_fma l with FMA (a, b, c) -> Some (a, b, c) | FMS (a, b, c) -> Some (a, b, c) | FNMS (a, b, c) -> Some (a, b, c) | NO_FMA -> None let rec visitM x = counting (function Load v -> returnM () | Num a -> returnM () | Store (v, x) -> visitM x | Plus a -> (match children_fma a with None -> mapM visitM a >> returnM () | Some (a, b, c) -> (* visit fma's arguments twice to make sure they get a variable *) visitM a >> visitM a >> visitM b >> visitM b >> visitM c >> visitM c) | Times (a, b) -> visitM a >> visitM b | Uminus a -> visitM a) x let visit_rootsM = mapM visitM let rec expr_of_nodeM x = memoizing lookupVisitedM' insertVisitedM' (function x -> match x with Load v -> if (!Magic.inline_loads) then inlineM (Expr.Var v) else with_tempM (Expr.Var v) | Num a -> inlineM (Expr.Num a) | Store (v, x) -> expr_of_nodeM x >>= with_varM v | Plus a -> (match build_fma a with FMA (a, b, c) -> expr_of_nodeM a >>= fun a' -> expr_of_nodeM b >>= fun b' -> expr_of_nodeM c >>= fun c' -> with_temp_maybeM x (Expr.Plus [a'; Expr.Times (b', c')]) | FMS (a, b, c) -> expr_of_nodeM a >>= fun a' -> expr_of_nodeM b >>= fun b' -> expr_of_nodeM c >>= fun c' -> with_temp_maybeM x (Expr.Plus [Expr.Times (b', c'); Expr.Uminus a']) | FNMS (a, b, c) -> expr_of_nodeM a >>= fun a' -> expr_of_nodeM b >>= fun b' -> expr_of_nodeM c >>= fun c' -> with_temp_maybeM x (Expr.Plus [a'; Expr.Uminus (Expr.Times (b', c'))]) | NO_FMA -> mapM expr_of_nodeM a >>= fun a' -> with_temp_maybeM x (Expr.Plus a')) | Times (a, b) -> expr_of_nodeM a >>= fun a' -> expr_of_nodeM b >>= fun b' -> with_temp_maybeM x (Expr.Times (a', b')) | Uminus a -> expr_of_nodeM a >>= fun a' -> inlineM (Expr.Uminus a')) x let expr_of_rootsM = mapM expr_of_nodeM let peek_alistM roots = visit_rootsM roots >> expr_of_rootsM roots >> fetchAl let to_assignments (Dag dag) = List.rev (runM ([], empty, empty) peek_alistM dag) end let to_assignments = Destructor.to_assignments let wrap_assign (a, b) = Expr.Assign (a, b) let simplify_to_alist dag = let d1 = algsimp dag in List.map wrap_assign (to_assignments d1) fftw-2.1.5/gensrc/exprdag.mli0000644000175400001440000000251707637531662011610 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) type node = | Num of Number.number | Load of Variable.variable | Store of Variable.variable * node | Plus of node list | Times of node * node | Uminus of node type dag val algsimp : dag -> dag val to_assignments : dag -> (Variable.variable * Expr.expr) list val simplify_to_alist : dag -> Expr.assignment list val make : node list -> dag val cvsid : string module LittleSimplifier : sig val makeNum : Number.number -> node val makeUminus : node -> node val makeTimes : node * node -> node val makePlus : node list -> node end fftw-2.1.5/gensrc/fft.ml0000644000175400001440000002363607637531662010571 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $ *) let cvsid = "$Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $" (* This is the part of the generator that actually computes the FFT, in symbolic form, and outputs the assignment lists (which assign the DFT of the input array to the output array). *) open Complex open Util open Lazy open Twiddle open Symmetry let (@*) = times let (@+) a b = plus [a; b] let (@-) a b = plus [a; uminus b] (* choose a suitable factor of n *) let choose_factor n = (* first choice: i such that gcd(i, n / i) = 1, i as big as possible *) let choose1 n = let rec loop i f = if (i * i > n) then f else if ((n mod i) == 0 && gcd i (n / i) == 1) then loop (i + 1) i else loop (i + 1) f in loop 1 1 (* second choice: the biggest factor i of n, where i < sqrt(n) *) and choose2 n = let rec loop i f = if (i * i > n) then f else if ((n mod i) == 0) then loop (i + 1) i else loop (i + 1) f in loop 1 1 in let i = choose1 n in if (i > 1) then i else choose2 n let freeze n f = let a = Array.init n (fun i -> lazy (f i)) in fun i -> force a.(i) let rec fftgen_prime n input sign = let sum filter i = sigma 0 n (fun j -> let coeff = filter (exp n (sign * i * j)) in coeff @* (input j)) in let computation_even = freeze n (sum identity) and computation_odd = let sumr = freeze n (sum real) and sumi = freeze n (sum imag) in freeze n (fun i -> if (i = 0) then (* expose some common subexpressions *) input 0 @+ sigma 1 ((n + 1) / 2) (fun j -> input j @+ input (n - j)) else let i' = min i (n - i) in if (i < n - i) then sumr i' @+ sumi i' else sumr i' @- sumi i') in if (n >= !Magic.rader_min) then fftgen_rader n input sign else if (n == 2) then computation_even else computation_odd and fftgen_rader p input sign = let half = let one_half = inverse_int 2 in times one_half and make_product n a b = let scale_factor = inverse_int n in freeze n (fun i -> a i @* (scale_factor @* b i)) in (* generates a convolution using ffts. (all arguments are the same as to gen_convolution, below) *) let gen_convolution_by_fft n a b addtoall = let fft_a = fftgen n no_sym a 1 and fft_b = fftgen n no_sym b 1 in let fft_ab = make_product n fft_a fft_b and dc_term i = if (i == 0) then addtoall else zero in let fft_ab1 = freeze n (fun i -> fft_ab i @+ dc_term i) and sum = (fft_a 0) in let conv = fftgen n no_sym fft_ab1 (-1) in (sum, conv) (* alternate routine for convolution. Seems to work better for small sizes. I have no idea why. *) and gen_convolution_by_fft_alt n a b addtoall = let ap = freeze n (fun i -> half (a i @+ a ((n - i) mod n))) and am = freeze n (fun i -> half (a i @- a ((n - i) mod n))) and bp = freeze n (fun i -> half (b i @+ b ((n - i) mod n))) and bm = freeze n (fun i -> half (b i @- b ((n - i) mod n))) in let fft_ap = fftgen n symmetric_sym ap 1 and fft_am = fftgen n anti_symmetric_sym am 1 and fft_bp = fftgen n symmetric_sym bp 1 and fft_bm = fftgen n anti_symmetric_sym bm 1 in let fft_abpp = make_product n fft_ap fft_bp and fft_abpm = make_product n fft_ap fft_bm and fft_abmp = make_product n fft_am fft_bp and fft_abmm = make_product n fft_am fft_bm and sum = fft_ap 0 @+ fft_am 0 and dc_term i = if (i == 0) then addtoall else zero in let fft_ab1 = freeze n (fun i -> (fft_abpp i @+ fft_abmm i) @+ dc_term i) and fft_ab2 = freeze n (fun i -> fft_abpm i @+ fft_abmp i) in let conv1 = fftgen n symmetric_sym fft_ab1 (-1) and conv2 = fftgen n anti_symmetric_sym fft_ab2 (-1) in let conv = freeze n (fun i -> conv1 i @+ conv2 i) in (sum, conv) (* generator of assignment list assigning conv to the convolution of a and b, all of which are of length n. addtoall is added to all of the elements of the result. Returns (sum, convolution) pair where sum is the sum of the elements of a. *) in let gen_convolution = if (p <= !Magic.alternate_convolution) then gen_convolution_by_fft_alt else gen_convolution_by_fft (* fft generator for prime n = p using Rader's algorithm for turning the fft into a convolution, which then can be performed in a variety of ways *) in let g = find_generator p in let ginv = pow_mod g (p - 2) p in let input_perm = freeze p (fun i -> input (pow_mod g i p)) and omega_perm = freeze p (fun i -> exp p (sign * (pow_mod ginv i p))) and output_perm = freeze p (fun i -> pow_mod ginv i p) in let (sum, conv) = (gen_convolution (p - 1) input_perm omega_perm (input 0)) in freeze p (fun i -> if (i = 0) then input 0 @+ sum else let i' = suchthat 0 (fun i' -> i = output_perm i') in conv i') and fftgen n sym = let rec cooley_tukey n1 n2 input sign = let tmp1 = freeze n2 (fun i2 -> fftgen n1 sym.isym1 (fun i1 -> input (i1 * n2 + i2)) sign) in let tmp2 = freeze n1 (fun i1 -> freeze n2 (fun i2 -> exp n (sign * i1 * i2) @* tmp1 i2 i1)) in let tmp3 = freeze n1 (fun i1 -> fftgen n2 sym.isym2 (tmp2 i1) sign) in (fun i -> tmp3 (i mod n1) (i / n1)) (* This is "exponent -1" split-radix by Dan Bernstein *) and split_radix_dit n input sign = let f0 = fftgen (n / 2) sym.isym1 (fun i -> input (i * 2)) sign and f10 = fftgen (n / 4) sym.isym1 (fun i -> input (i * 4 + 1)) sign and f11 = fftgen (n / 4) sym.isym1 (fun i -> input ((n + i * 4 - 1) mod n)) sign in let g10 = freeze n (fun k -> exp n (sign * k) @* f10 (k mod (n / 4))) and g11 = freeze n (fun k -> exp n (- sign * k) @* f11 (k mod (n / 4))) in let g1 = freeze n (fun k -> g10 k @+ g11 k) in freeze n (fun k -> f0 (k mod (n / 2)) @+ g1 k) and split_radix_dif n input sign = let n2 = n / 2 and n4 = n / 4 in let x0 = freeze n2 (fun i -> input i @+ input (i + n2)) and x10 = freeze n4 (fun i -> input i @- input (i + n2)) and x11 = freeze n4 (fun i -> input (i + n4) @- input (i + n2 + n4)) in let x1 k i = exp n (k * i * sign) @* (x10 i @+ exp 4 (k * sign) @* x11 i) in let f0 = fftgen n2 sym.isym2 x0 sign and f1 = freeze 4 (fun k -> fftgen n4 sym.isym2 (x1 k) sign) in freeze n (fun k -> if k mod 2 = 0 then f0 (k / 2) else let k' = k mod 4 in f1 k' ((k - k') / 4)) and prime_factor n1 n2 input sign = let tmp1 = freeze n2 (fun i2 -> fftgen n1 sym.isym1 (fun i1 -> input ((i1 * n2 + i2 * n1) mod n)) sign) in let tmp2 = freeze n1 (fun i1 -> fftgen n2 sym.isym2 (fun k2 -> tmp1 k2 i1) sign) in fun i -> tmp2 (i mod n1) (i mod n2) in let r = choose_factor n in let fft = if List.mem n !Magic.rader_list then (* special cases *) fftgen_rader n else if (r == 1) then (* n is prime *) fftgen_prime n else if (gcd r (n / r)) == 1 then prime_factor r (n / r) else if (n mod 4 = 0 && n > 4) then (if sym == hermitian_sym then split_radix_dif n else split_radix_dit n) else cooley_tukey r (n / r) in fun input sign -> freeze n (sym.osym.apply n (fft (sym.apply n input) sign)) type direction = FORWARD | BACKWARD let sign_of_dir = function FORWARD -> (-1) | BACKWARD -> 1 let conj_of_dir = function FORWARD -> identity | BACKWARD -> conj let dagify n sym f = let a = Array.init n (sym.osym.store n f) in Exprdag.make (List.flatten (Array.to_list a)) let no_twiddle_gen_expr n sym dir = let sign = sign_of_dir dir in let fft = fftgen n sym (fun i -> (load_var (access_input i))) sign in dagify n sym fft let twiddle_dit_gen_expr n sym_before_twiddle sym_after_twiddle dir = let sign = sign_of_dir dir in let conj_maybe = conj_of_dir dir in let loaded_input = freeze n (fun i -> (load_var (access_input i))) in let symmetrized_input = sym_before_twiddle.apply n loaded_input in (* The eta-expansion `let rec f i = g i' instead of `let rec f = g' is a way to get around ocaml's limitations in handling let rec *) let rec twiddle_expression i = freeze n (fun i -> (let (t, _, _) = twiddle_policy () in t n i twiddle_expression)) i in let input_by_twiddle = freeze n (fun i -> if (i == 0) then symmetrized_input 0 else conj_maybe (twiddle_expression i) @* (symmetrized_input i)) in let fft = fftgen n sym_after_twiddle input_by_twiddle sign in dagify n sym_after_twiddle fft let twiddle_dif_gen_expr n sym_input sym_after_twiddle dir = let sign = sign_of_dir dir in let conj_maybe = conj_of_dir dir in let loaded_input = freeze n (fun i -> (load_var (access_input i))) in let fft = fftgen n sym_input loaded_input sign in (* The eta-expansion `let rec f i = g i' instead of `let rec f = g' is a way to get around ocaml's limitations in handling let rec *) let rec twiddle_expression i = freeze n (fun i -> (let (t, _, _) = twiddle_policy () in t n i twiddle_expression)) i in let fft_by_twiddle = freeze n (fun i -> if (i == 0) then fft 0 else conj_maybe (twiddle_expression i) @* (fft i)) in dagify n sym_after_twiddle fft_by_twiddle fftw-2.1.5/gensrc/genfft.ml0000644000175400001440000005511407637531662011257 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: genfft.ml,v 1.79 2003/03/16 23:43:46 stevenj Exp $ *) (* This file contains the entry point for the genfft program: it parses the command-line parameters and calls the rest of the program as needed to generate the requested code. *) open Util open To_c open Expr let optimize expr = let _ = info "simplifiying..." in let simple = Exprdag.simplify_to_alist expr in let _ = info "scheduling..." in let scheduled = Schedule.schedule simple in let _ = info "annotating..." in let annotated = Asched.annotate scheduled in let _ = info "unparsing..." in annotated let make_expr name = Var (Variable.make_named name) let iarray = "input" let oarray = "output" let istride = "istride" let ostride = "ostride" let twiddle_order = "twiddle_order" type codelet_type = TWIDDLE | NO_TWIDDLE | REAL2HC | HC2HC | HC2REAL | REALEVEN | REALODD | REALEVEN2 | REALODD2 | REALEVEN_TWIDDLE | REALODD_TWIDDLE | MP3MDCT (* mdct used in mp3 encoding *) let rec list_to_c = function [] -> "" | [a] -> (string_of_int a) | a :: b -> (string_of_int a) ^ ", " ^ (list_to_c b) let codelet_description n dir ty f = let Fcn (_, name, _, _) = f and (ctype, itype) = match ty with TWIDDLE -> "FFTW_TWIDDLE", 0 | NO_TWIDDLE -> "FFTW_NOTW", 1 | REAL2HC -> "FFTW_REAL2HC", 2 | HC2HC -> "FFTW_HC2HC", 3 | HC2REAL -> "FFTW_HC2REAL", 4 | REALEVEN -> "FFTW_REALEVEN", 5 | REALODD -> "FFTW_REALODD", 6 | REALEVEN2 -> "FFTW_REALEVEN2", 7 | REALODD2 -> "FFTW_REALODD2", 8 | REALEVEN_TWIDDLE -> "FFTW_REALEVEN_TWIDDLE", 9 | REALODD_TWIDDLE -> "FFTW_REALODD_TWIDDLE", 10 | MP3MDCT -> "FFTW_MP3MDCT", 11 and (cdir, idir) = match dir with Fft.FORWARD -> "FFTW_FORWARD", 0 | Fft.BACKWARD -> "FFTW_BACKWARD", 1 and (_, num_twiddle, tw_o) = Twiddle.twiddle_policy () in let (declare_order, order, nt) = match ty with TWIDDLE -> ("static const int " ^ twiddle_order ^ "[] = {" ^ (list_to_c (tw_o n)) ^ "};\n"), twiddle_order, num_twiddle n | NO_TWIDDLE -> "", "(const int *) 0", 0 | REAL2HC -> "", "(const int *) 0", 0 | HC2HC -> ("static const int " ^ twiddle_order ^ "[] = {" ^ (list_to_c (tw_o n)) ^ "};\n"), twiddle_order, num_twiddle n | HC2REAL -> "", "(const int *) 0", 0 | REALEVEN -> "", "(const int *) 0", 0 | REALODD -> "", "(const int *) 0", 0 | REALEVEN2 -> "", "(const int *) 0", 0 | REALODD2 -> "", "(const int *) 0", 0 | REALEVEN_TWIDDLE -> ("static const int " ^ twiddle_order ^ "[] = {" ^ (list_to_c (tw_o n)) ^ "};\n"), twiddle_order, num_twiddle n | REALODD_TWIDDLE -> ("static const int " ^ twiddle_order ^ "[] = {" ^ (list_to_c (tw_o n)) ^ "};\n"), twiddle_order, num_twiddle n | MP3MDCT -> "", "(const int *) 0", 0 (* this should be replaced by CRC/MD5 of the codelet *) and signature = 11 * (2 * n + idir) + itype in "\n\n" ^ declare_order ^ "fftw_codelet_desc " ^ name ^ "_desc = {\n" ^ "\"" ^ name ^ "\",\n" ^ "(void (*)()) " ^ name ^ ",\n" ^ (string_of_int n) ^ ",\n" ^ cdir ^ ",\n" ^ ctype ^ ",\n" ^ (string_of_int signature) ^ ",\n" ^ (string_of_int nt) ^ ",\n" ^ order ^ ",\n" ^ "};\n" let fftw_no_twiddle_gen n dir = let _ = info "generating..." in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.no_sym dir) and ns = string_of_int n and (name, sign) = match dir with Fft.FORWARD -> "fftw_no_twiddle_", (-1) | Fft.BACKWARD -> "fftwi_no_twiddle_", 1 and unparse_var = Variable.make_unparser (iarray, Some istride) (oarray, Some ostride) ("BUG", None) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_complex *", iarray); Decl ("fftw_complex *", oarray); Decl ("int", istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir NO_TWIDDLE tree in ((make_c_unparser unparse_var) tree) ^ desc let athena_no_twiddle_gen n dir = let _ = info "generating..." in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.no_sym dir) and ns = string_of_int n and (name, sign) = match dir with Fft.FORWARD -> "athfft_", (-1) | Fft.BACKWARD -> "athffti_", 1 and unparse_var = Variable.make_unparser (iarray, None) (iarray, None) ("BUG", None) in let tree = Fcn ("void", name ^ ns, [Decl ("fftw_complex *", iarray)], Asch asch) and prologue = "#include \"athfft.h\"\n\n" ^ (if dir == Fft.FORWARD then "int ath_permutation_" ^ ns ^ "(int i) { return i; }\n\n\n" else "") in prologue ^ ((make_c_unparser unparse_var) tree) let no_twiddle_gen n dir = if (!Magic.athenafft) then athena_no_twiddle_gen n dir else fftw_no_twiddle_gen n dir let real_oarray = "real_output" let imag_oarray = "imag_output" let real_ostride = "real_ostride" let imag_ostride = "imag_ostride" let real2hc_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.real_sym dir) and ns = string_of_int n and (name, sign) = "fftw_real2hc_", (-1) and unparse_var = Variable.make_real2hc_unparser (iarray, Some istride) (real_oarray, Some real_ostride) (imag_oarray, Some imag_ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", real_oarray); Decl ("fftw_real *", imag_oarray); Decl ("int", istride); Decl ("int", real_ostride); Decl ("int", imag_ostride)], Asch asch) in let desc = codelet_description n dir REAL2HC tree in ((make_c_unparser unparse_var) tree) ^ desc let real_iarray = "real_input" let imag_iarray = "imag_input" let real_istride = "real_istride" let imag_istride = "imag_istride" let hc2real_gen n = let _ = info "generating..." in let dir = Fft.BACKWARD in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.hermitian_sym dir) and ns = string_of_int n and (name, sign) = "fftw_hc2real_", 1 and unparse_var = Variable.make_hc2real_unparser (real_iarray, Some real_istride) (imag_iarray, Some imag_istride) (oarray, Some ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", real_iarray); Decl ("const fftw_real *", imag_iarray); Decl ("fftw_real *", oarray); Decl ("int", real_istride); Decl ("int", imag_istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir HC2REAL tree in ((make_c_unparser unparse_var) tree) ^ desc let realeven_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.realeven_sym dir) and ns = string_of_int n and (name, sign) = "fftw_realeven_", (-1) and unparse_var = Variable.make_realeven_unparser (iarray, Some istride) (oarray, Some ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", oarray); Decl ("int", istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir REALEVEN tree in ((make_c_unparser unparse_var) tree) ^ desc let realodd_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr n Symmetry.realodd_sym dir) and ns = string_of_int n and (name, sign) = "fftw_realodd_", (-1) and unparse_var = Variable.make_realodd_unparser (iarray, Some istride) (oarray, Some ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", oarray); Decl ("int", istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir REALODD tree in ((make_c_unparser unparse_var) tree) ^ desc let realeven2_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr (2 * n) Symmetry.realeven2_input_sym dir) and ns = string_of_int n and (name, sign) = "fftw_realeven2_", (-1) and unparse_var = Variable.make_realeven_unparser (iarray, Some istride) (oarray, Some ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", oarray); Decl ("int", istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir REALEVEN2 tree in ((make_c_unparser unparse_var) tree) ^ desc let realodd2_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr (2 * n) Symmetry.realodd2_input_sym dir) and ns = string_of_int n and (name, sign) = "fftw_realodd2_", (-1) and unparse_var = Variable.make_realodd2_unparser (iarray, Some istride) (oarray, Some ostride) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", oarray); Decl ("int", istride); Decl ("int", ostride)], Asch asch) in let desc = codelet_description n dir REALODD2 tree in ((make_c_unparser unparse_var) tree) ^ desc let mp3mdct_gen n = let _ = info "generating..." in let dir = Fft.FORWARD in let asch = optimize (Fft.no_twiddle_gen_expr (4 * n) Symmetry.mp3mdct_input_sym dir) and ns = string_of_int n and (name, sign) = "fftw_mp3mdct_", (-1) and unparse_var = Variable.make_realeven_unparser (iarray, None) (oarray, None) in let tree = Fcn ("void", name ^ ns, [Decl ("const fftw_real *", iarray); Decl ("fftw_real *", oarray)], Asch asch) in let desc = codelet_description n dir MP3MDCT tree in ((make_c_unparser unparse_var) tree) ^ desc let ioarray = "inout" let iostride = "iostride" let twarray = "W" let fftw_twiddle_gen n dir = let _ = info "generating..." in let asch = optimize (Fft.twiddle_dit_gen_expr n Symmetry.no_sym Symmetry.no_sym dir) and ns = string_of_int n and m = "m" and dist = "dist" and a = "A" and i = "i" in let me = make_expr m and diste = make_expr dist and ae = make_expr a and ie = make_expr i and ioarraye = make_expr ioarray and twarraye = make_expr twarray and (name, sign) = match dir with Fft.FORWARD -> "fftw_twiddle_", (-1) | Fft.BACKWARD -> "fftwi_twiddle_", 1 and unparse_var = Variable.make_unparser (ioarray, Some iostride) (ioarray, Some iostride) (twarray, None) and (_, num_twiddles, _) = Twiddle.twiddle_policy () in let body = Block ( [Decl ("int", i); Decl ("fftw_complex *", ioarray)], [Stmt_assign (ioarraye, ae); For (Expr_assign (ie, me), Binop (" > ", ie, Integer 0), Comma (Expr_assign (ie, Plus [ie; Uminus (Integer 1)]), (Comma (Expr_assign (ioarraye, Plus [ioarraye; diste]), (Expr_assign (twarraye, Plus [twarraye; Integer (num_twiddles n)]))))), Asch asch)]) in let fcnname = name ^ ns in let tree = Fcn ("void", fcnname, [Decl ("fftw_complex *", a); Decl ("const fftw_complex *", twarray); Decl ("int", iostride); Decl ("int", m); Decl ("int", dist)], body) in let desc = codelet_description n dir TWIDDLE tree in ((make_c_unparser unparse_var) tree) ^ desc let athena_twiddle_gen n dir = let _ = info "generating..." and (name, sign, generator) = match dir with Fft.FORWARD -> "athfft_twiddle_", (-1), Fft.twiddle_dif_gen_expr | Fft.BACKWARD -> "athffti_twiddle_", 1, Fft.twiddle_dit_gen_expr in let asch = optimize (generator n Symmetry.no_sym Symmetry.no_sym dir) and ns = string_of_int n and a = "A" and i = "i" in let ae = make_expr a and ie = make_expr i and ioarraye = make_expr ioarray and twarraye = make_expr twarray and unparse_var = Variable.make_unparser (ioarray, Some iostride) (ioarray, Some iostride) (twarray, None) and (_, num_twiddles, _) = Twiddle.twiddle_policy () in let body = Block ( [Decl ("int", i); Decl ("fftw_complex *", ioarray)], [Stmt_assign (ioarraye, ae); For (Expr_assign (ie, make_expr iostride), Binop (" > ", ie, Integer 0), Comma (Expr_assign (ie, Plus [ie; Uminus (Integer 1)]), (Comma (Expr_assign (ioarraye, Plus [ioarraye; Integer 1]), (Expr_assign (twarraye, Plus [twarraye; Integer (num_twiddles n)]))))), Asch asch)]) in let fcnname = name ^ ns in let tree = Fcn ("void", fcnname, [Decl ("fftw_complex *", a); Decl ("const fftw_complex *", twarray); Decl ("int", iostride)], body) and prologue = "#include \"athfft.h\"\n\n" in prologue ^ ((make_c_unparser unparse_var) tree) let twiddle_gen n dir = if (!Magic.athenafft) then athena_twiddle_gen n dir else fftw_twiddle_gen n dir let arrayX = "X" let arrayY = "Y" let hc2hc_gen n dir = let _ = info "generating..." in let (zeroth_elements, middle_elements, final_elements, name, sign, make_variable_unparser) = match dir with Fft.FORWARD -> ( optimize (Fft.no_twiddle_gen_expr n Symmetry.real_sym dir), optimize (Fft.twiddle_dit_gen_expr n Symmetry.no_sym Symmetry.middle_hc2hc_forward_sym dir), optimize (Fft.no_twiddle_gen_expr (2 * n) Symmetry.final_hc2hc_forward_sym dir), "fftw_hc2hc_forward_", (-1), Variable.make_hc2hc_forward_unparser) | Fft.BACKWARD -> ( optimize (Fft.no_twiddle_gen_expr n Symmetry.hermitian_sym dir), optimize (Fft.twiddle_dif_gen_expr n Symmetry.middle_hc2hc_backward_sym Symmetry.no_sym dir), optimize (Fft.no_twiddle_gen_expr (2 * n) Symmetry.final_hc2hc_backward_sym dir), "fftw_hc2hc_backward_", 1, Variable.make_hc2hc_backward_unparser) and ns = string_of_int n and m = "m" and dist = "dist" and a = "A" and i = "i" in let me = make_expr m and diste = make_expr dist and iostridee = make_expr iostride and ae = make_expr a and ie = make_expr i and arrayXe = make_expr arrayX and arrayYe = make_expr arrayY and twarraye = make_expr twarray and unparse_var = make_variable_unparser n (arrayX, Some iostride) (arrayY, Some iostride) (twarray, None) and (_, num_twiddles, _) = Twiddle.twiddle_policy () in let body = Block ( [ Decl ("int", i); Decl ("fftw_real *", arrayX); Decl ("fftw_real *", arrayY)], [ Stmt_assign (arrayXe, ae); Stmt_assign (arrayYe, Plus [ae; Times (Integer n, iostridee)]); Asch zeroth_elements; Stmt_assign (arrayXe, Plus [arrayXe; diste]); Stmt_assign (arrayYe, Plus [arrayYe; Uminus diste]); For (Expr_assign (ie, Integer 2), Binop (" < ", ie, me), Comma (Expr_assign (ie, Plus [ie; Integer 2]), (Comma (Comma (Expr_assign (arrayXe, Plus [arrayXe; diste]), Expr_assign (arrayYe, Plus [arrayYe; Uminus diste])), (Expr_assign (twarraye, Plus [twarraye; Integer (num_twiddles n)]))))), Asch middle_elements); If (Binop (" == ", ie, me), Asch final_elements)]) in let fcnname = name ^ ns in let tree = Fcn ("void", fcnname, [Decl ("fftw_real *", a); Decl ("const fftw_complex *", twarray); Decl ("int", iostride); Decl ("int", m); Decl ("int", dist)], body) in let desc = codelet_description n dir HC2HC tree in ((make_c_unparser unparse_var) tree) ^ desc let usage = "Usage: genfft [-notwiddle | -notwiddleinv | -twiddle | -twiddleinv| -real2hc | -hc2hc-forward | -hc2hc-backward ] " type mode = | GEN_NOTHING | GEN_TWIDDLE of int | GEN_NOTWID of int | GEN_TWIDDLEI of int | GEN_NOTWIDI of int | GEN_REAL2HC of int | GEN_HC2REAL of int | GEN_HC2HC_FORWARD of int | GEN_HC2HC_BACKWARD of int | GEN_REAL_EVEN of int | GEN_REAL_ODD of int | GEN_REAL_EVEN2 of int | GEN_REAL_ODD2 of int | GEN_REAL_EVEN_TWIDDLE of int | GEN_REAL_ODD_TWIDDLE of int | GEN_MP3MDCT of int let mode = ref GEN_NOTHING let undocumented = " Undocumented voodoo parameter" let main () = Arg.parse [ "-notwiddle", Arg.Int(fun i -> mode := GEN_NOTWID i), " : Generate a no twiddle codelet of size "; "-notwiddleinv", Arg.Int(fun i -> mode := GEN_NOTWIDI i), " : Generate a no twiddle inverse codelet of size "; "-twiddle", Arg.Int(fun i -> mode := GEN_TWIDDLE i), " : Generate a twiddle codelet of size "; "-twiddleinv", Arg.Int(fun i -> mode := GEN_TWIDDLEI i), " : Generate a twiddle inverse codelet of size "; "-real2hc", Arg.Int(fun i -> mode := GEN_REAL2HC i), " : Generate a real to halfcomplex codelet of size "; "-hc2hc-forward", Arg.Int(fun i -> mode := GEN_HC2HC_FORWARD i), " : Generate a forward halfcomplex to halfcomplex codelet of size "; "-hc2hc-backward", Arg.Int(fun i -> mode := GEN_HC2HC_BACKWARD i), " : Generate a backward halfcomplex to halfcomplex codelet of size "; "-hc2real", Arg.Int(fun i -> mode := GEN_HC2REAL i), " : Generate a halfcomplex to real codelet of size "; "-realeven", Arg.Int(fun i -> mode := GEN_REAL_EVEN i), " : Generate a real even codelet of size "; "-realodd", Arg.Int(fun i -> mode := GEN_REAL_ODD i), " : Generate a real odd codelet of size "; "-realeven2", Arg.Int(fun i -> mode := GEN_REAL_EVEN2 i), " : Generate a real even-2 codelet of size "; "-realodd2", Arg.Int(fun i -> mode := GEN_REAL_ODD2 i), " : Generate a real odd-2 codelet of size "; "-realeventwiddle", Arg.Int(fun i -> mode := GEN_REAL_EVEN_TWIDDLE i), " : Generate a real even twiddle codelet of size "; "-realoddtwiddle", Arg.Int(fun i -> mode := GEN_REAL_ODD_TWIDDLE i), " : Generate a real odd twiddle codelet of size "; "-mp3mdct", Arg.Int(fun i -> mode := GEN_MP3MDCT i), " : Generate a MPEG3 MDCT codelet of size "; "-verbose", Arg.Unit(fun () -> Magic.verbose := true), " Enable verbose logging messages to stderr"; "-inline-konstants", Arg.Unit(fun () -> Magic.inline_konstants := true), " Inline floating point constants"; "-no-inline-konstants", Arg.Unit(fun () -> Magic.inline_konstants := false), " Do not inline floating point constants"; "-rader-min", Arg.Int(fun i -> Magic.rader_min := i), " : Use Rader's algorithm for prime sizes >= "; "-magic-alternate-convolution", Arg.Int(fun i -> Magic.alternate_convolution := i), undocumented; "-magic-athenafft", Arg.Unit(fun () -> Magic.athenafft := true), undocumented; "-magic-window", Arg.Int(fun i -> Magic.window := i), undocumented; "-magic-variables", Arg.Int(fun i -> Magic.number_of_variables := i), undocumented; "-magic-loopo", Arg.Unit(fun () -> Magic.loopo := true), undocumented; "-magic-loopi", Arg.Unit(fun () -> Magic.loopo := false), undocumented; "-magic-times-3-3", Arg.Unit(fun () -> Magic.times_3_3 := true), undocumented; "-magic-times-4-2", Arg.Unit(fun () -> Magic.times_3_3 := false), undocumented; "-magic-inline-single", Arg.Unit(fun () -> Magic.inline_single := true), undocumented; "-magic-no-inline-single", Arg.Unit(fun () -> Magic.inline_single := false), undocumented; "-magic-inline-loads", Arg.Unit(fun () -> Magic.inline_loads := true), undocumented; "-magic-no-inline-loads", Arg.Unit(fun () -> Magic.inline_loads := false), undocumented; "-magic-enable-fma", Arg.Unit(fun () -> Magic.enable_fma := true), undocumented; "-magic-disable-fma", Arg.Unit(fun () -> Magic.enable_fma := false), undocumented; "-magic-enable-fma-expansion", Arg.Unit(fun () -> Magic.enable_fma_expansion := true), undocumented; "-magic-disable-fma-expansion", Arg.Unit(fun () -> Magic.enable_fma_expansion := false), undocumented; "-magic-collect-common-twiddle", Arg.Unit(fun () -> Magic.collect_common_twiddle := true), undocumented; "-magic-no-collect-common-twiddle", Arg.Unit(fun () -> Magic.collect_common_twiddle := false), undocumented; "-magic-collect-common-inputs", Arg.Unit(fun () -> Magic.collect_common_inputs := true), undocumented; "-magic-no-collect-common-inputs", Arg.Unit(fun () -> Magic.collect_common_inputs := false), undocumented; "-magic-alignment-check", Arg.Unit(fun () -> Magic.alignment_check := true), undocumented; "-magic-use-wsquare", Arg.Unit(fun () -> Magic.use_wsquare := true), undocumented; "-magic-no-wsquare", Arg.Unit(fun () -> Magic.use_wsquare := false), undocumented; "-magic-twiddle-load-all", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_LOAD_ALL), undocumented; "-magic-twiddle-iter", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_ITER), undocumented; "-magic-twiddle-load-odd", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_LOAD_ODD), undocumented; "-magic-twiddle-square1", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_SQUARE1), undocumented; "-magic-twiddle-square2", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_SQUARE2), undocumented; "-magic-twiddle-square3", Arg.Unit(fun () -> Magic.twiddle_policy := Magic.TWIDDLE_SQUARE3), undocumented; ] (fun _ -> failwith "too many arguments") usage; let out = match !mode with | GEN_TWIDDLE i -> (twiddle_gen i Fft.FORWARD) | GEN_TWIDDLEI i -> (twiddle_gen i Fft.BACKWARD) | GEN_NOTWID i -> (no_twiddle_gen i Fft.FORWARD) | GEN_NOTWIDI i -> (no_twiddle_gen i Fft.BACKWARD) | GEN_REAL2HC i -> (real2hc_gen i) | GEN_MP3MDCT i -> (mp3mdct_gen i) | GEN_HC2HC_FORWARD i -> (hc2hc_gen i Fft.FORWARD) | GEN_HC2REAL i -> (hc2real_gen i) | GEN_HC2HC_BACKWARD i -> (hc2hc_gen i Fft.BACKWARD) | GEN_REAL_EVEN i -> (realeven_gen i) | GEN_REAL_ODD i -> (realodd_gen i) | GEN_REAL_EVEN2 i -> (realeven2_gen i) | GEN_REAL_ODD2 i -> (realodd2_gen i) | _ -> failwith "one of -notwiddle, -notwiddleinv, -twiddle, -twiddleinv, -real2hc, -hc2real, -hc2hc-forward, or -hc2hc-forward must be specified" in begin print_string out; exit 0; end let _ = main() fftw-2.1.5/gensrc/install.sh0000755000175400001440000000041307637531662011451 #! /bin/sh . ./config mv Makefile.fftw ${FFTW_SRCDIR}/Makefile.am mv Makefile.rfftw ${RFFTW_SRCDIR}/Makefile.am mv ${REAL2HC_PREFIX}*.c ${HC2REAL_PREFIX}*.c ${HC2HC_FORWARD_PREFIX}*.c \ ${HC2HC_BACKWARD_PREFIX}*.c rconfig.c ${RFFTW_SRCDIR} mv *.c ${FFTW_SRCDIR} fftw-2.1.5/gensrc/magic.ml0000644000175400001440000000310207637531662011054 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: magic.ml,v 1.30 2003/03/16 23:43:46 stevenj Exp $ *) (* magic parameters *) let window = ref 5 let number_of_variables = ref 4 let use_wsquare = ref false let inline_single = ref true type twiddle_policy = TWIDDLE_LOAD_ALL | TWIDDLE_ITER | TWIDDLE_LOAD_ODD | TWIDDLE_SQUARE1 | TWIDDLE_SQUARE2 | TWIDDLE_SQUARE3 let twiddle_policy = ref TWIDDLE_LOAD_ALL let inline_konstants = ref false let inline_loads = ref false let loopo = ref false let rader_min = ref 13 let rader_list = ref [5] let alternate_convolution = ref 17 let alignment_check = ref false let times_3_3 = ref false let enable_fma = ref false let enable_fma_expansion = ref false let collect_common_twiddle = ref true let collect_common_inputs = ref true let verbose = ref false let athenafft = ref false fftw-2.1.5/gensrc/makeconfig.sh0000755000175400001440000000137707637531662012120 #! /bin/sh # This shell script generates the file config.c containing a table # of the codelets . ./config cat $COPYRIGHT echo cat config_prelude echo # declare the external variables for i in $NOTW do echo "extern fftw_codelet_desc fftw_no_twiddle_${i}_desc;" echo "extern fftw_codelet_desc fftwi_no_twiddle_${i}_desc;" done for i in $TWIDDLE do echo "extern fftw_codelet_desc fftw_twiddle_${i}_desc;" echo "extern fftw_codelet_desc fftwi_twiddle_${i}_desc;" done echo echo echo "fftw_codelet_desc *fftw_config[] = {" for i in $NOTW do echo "NOTW_CODELET(${i})," echo "NOTWI_CODELET(${i})," done for i in $TWIDDLE do echo "TWIDDLE_CODELET(${i})," echo "TWIDDLEI_CODELET(${i})," done echo "(fftw_codelet_desc *) 0 " echo "};" fftw-2.1.5/gensrc/makemakefile.sh0000755000175400001440000000356007637531662012424 #! /bin/sh # This file generates the FFTW makefile, starting from Makefile.fftw.am. # It also generates the rfftw makefile. . ./config ########################################################################### # Compute the list of file names notw_codelets="" notwi_codelets="" for i in $NOTW do notw_codelets="$notw_codelets ${NOTW_PREFIX}${i}.c" notwi_codelets="$notwi_codelets ${NOTWI_PREFIX}${i}.c" done twiddle_codelets="" twiddlei_codelets="" for i in $TWIDDLE do twiddle_codelets="$twiddle_codelets ${TWID_PREFIX}${i}.c" twiddlei_codelets="$twiddlei_codelets ${TWIDI_PREFIX}${i}.c" done # now substitute list in Makefile.fftw.am, to get Makefile.fftw # (the two cats are redundant, but the script is clearer this way) cat Makefile.fftw.am | sed -e "s/@NOTW_CODELETS@/$notw_codelets/g" | sed -e "s/@NOTWI_CODELETS@/$notwi_codelets/g" | sed -e "s/@TWID_CODELETS@/$twiddle_codelets/g" | sed -e "s/@TWIDI_CODELETS@/$twiddlei_codelets/g" | cat >Makefile.fftw ########################################################################### # Compute the list of file names notw_codelets="" notwi_codelets="" for i in $NOTW_REAL do notw_codelets="$notw_codelets ${REAL2HC_PREFIX}${i}.c" notwi_codelets="$notwi_codelets ${HC2REAL_PREFIX}${i}.c" done twiddle_codelets="" twiddlei_codelets="" for i in $TWIDDLE_REAL do twiddle_codelets="$twiddle_codelets ${HC2HC_FORWARD_PREFIX}${i}.c" twiddlei_codelets="$twiddlei_codelets ${HC2HC_BACKWARD_PREFIX}${i}.c" done # now substitute list in Makefile.rfftw.am, to get Makefile.rfftw # (the two cats are redundant, but the script is clearer this way) cat Makefile.rfftw.am | sed -e "s/@NOTW_CODELETS@/$notw_codelets/g" | sed -e "s/@NOTWI_CODELETS@/$notwi_codelets/g" | sed -e "s/@TWID_CODELETS@/$twiddle_codelets/g" | sed -e "s/@TWIDI_CODELETS@/$twiddlei_codelets/g" | cat >Makefile.rfftw fftw-2.1.5/gensrc/makerconfig.sh0000755000175400001440000000144107637531662012272 #! /bin/sh # This shell script generates the file rconfig.c containing a table # of the rfftw codelets . ./config cat $COPYRIGHT echo cat rconfig_prelude echo # declare the external variables for i in $NOTW_REAL do echo "extern fftw_codelet_desc fftw_real2hc_${i}_desc;" echo "extern fftw_codelet_desc fftw_hc2real_${i}_desc;" done for i in $TWIDDLE_REAL do echo "extern fftw_codelet_desc fftw_hc2hc_forward_${i}_desc;" echo "extern fftw_codelet_desc fftw_hc2hc_backward_${i}_desc;" done echo echo echo "fftw_codelet_desc *rfftw_config[] = {" for i in $NOTW_REAL do echo "NOTW_CODELET(${i})," echo "NOTWI_CODELET(${i})," done for i in $TWIDDLE_REAL do echo "TWIDDLE_CODELET(${i})," echo "TWIDDLEI_CODELET(${i})," done echo "(fftw_codelet_desc *) 0 " echo "};" fftw-2.1.5/gensrc/makesources.sh0000755000175400001440000000162407637531662012331 #! /bin/sh # This file generates all the FFTW sources . ./config # Compute the list of file names PARALLEL="-j 4" notw_codelets="" notwi_codelets="" for i in $NOTW do notw_codelets="$notw_codelets ${NOTW_PREFIX}${i}.c" notwi_codelets="$notwi_codelets ${NOTWI_PREFIX}${i}.c" done for i in $NOTW_REAL do notw_codelets="$notw_codelets ${REAL2HC_PREFIX}${i}.c" notwi_codelets="$notwi_codelets ${HC2REAL_PREFIX}${i}.c" done twiddle_codelets="" twiddlei_codelets="" for i in $TWIDDLE do twiddle_codelets="$twiddle_codelets ${TWID_PREFIX}${i}.c" twiddlei_codelets="$twiddlei_codelets ${TWIDI_PREFIX}${i}.c" done for i in $TWIDDLE_REAL do twiddle_codelets="$twiddle_codelets ${HC2HC_FORWARD_PREFIX}${i}.c" twiddlei_codelets="$twiddlei_codelets ${HC2HC_BACKWARD_PREFIX}${i}.c" done make $PARALLEL -f Makefile.sources $notw_codelets $notwi_codelets $twiddle_codelets $twiddlei_codelets fftw-2.1.5/gensrc/number.ml0000644000175400001440000001221207637531662011266 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: number.ml,v 1.24 2003/03/16 23:43:46 stevenj Exp $ *) (* The generator keeps track of numeric constants in symbolic expressions using the abstract number type, defined in this file. Our implementation of the number type uses arbitrary-precision arithmetic from the built-in Num package in order to maintain an accurate representation of constants. This allows us to output constants with many decimal places in the generated C code, ensuring that we will take advantage of the full precision available on current and future machines. Note that we have to write our own routine to compute roots of unity, since the Num package only supplies simple arithmetic. The arbitrary-precision operations in Num look like the normal operations except that they have an appended slash (e.g. +/ -/ */ // etcetera). *) open Num type number = N of num let makeNum n = N n (* decimal digits of precision to maintain internally, and to print out: *) let precision = 50 let print_precision = 45 let inveps = (Int 10) **/ (Int precision) let epsilon = (Int 1) // inveps let pinveps = (Int 10) **/ (Int print_precision) let pepsilon = (Int 1) // pinveps let round x = epsilon */ (round_num (x */ inveps)) let of_int n = N (Int n) let zero = of_int 0 let one = of_int 1 let two = of_int 2 let mone = of_int (-1) (* comparison predicate for real numbers *) let equal (N x) (N y) = (* use both relative and absolute error *) let absdiff = abs_num (x -/ y) in absdiff <=/ pepsilon or absdiff <=/ pepsilon */ (abs_num x +/ abs_num y) let is_zero = equal zero let is_one = equal one let is_mone = equal mone let is_two = equal two (* Note that, in the following computations, it is important to round to precision epsilon after each operation. Otherwise, since the Num package uses exact rational arithmetic, the number of digits quickly blows up. *) let mul (N a) (N b) = makeNum (round (a */ b)) let div (N a) (N b) = makeNum (round (a // b)) let add (N a) (N b) = makeNum (round (a +/ b)) let sub (N a) (N b) = makeNum (round (a -/ b)) let negative (N a) = (a = 1.0) then (f -. (float (truncate f))) else f in let q = string_of_int (truncate(f2 *. 1.0E9)) in let r = "0000000000" ^ q in let l = String.length r in if (f >= 1.0) then ("K" ^ (string_of_int (truncate f)) ^ "_" ^ (String.sub r (l - 9) 9)) else ("K" ^ (String.sub r (l - 9) 9)) let to_string (N n) = approx_num_fix print_precision n let to_float (N n) = float_of_num n fftw-2.1.5/gensrc/number.mli0000644000175400001440000000304307637531662011441 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: number.mli,v 1.9 2003/03/16 23:43:46 stevenj Exp $ *) type number val equal : number -> number -> bool val of_int : int -> number val zero : number val one : number val two : number val mone : number val is_zero : number -> bool val is_one : number -> bool val is_mone : number -> bool val is_two : number -> bool val mul : number -> number -> number val div : number -> number -> number val add : number -> number -> number val sub : number -> number -> number val negative : number -> bool val greater : number -> number -> bool val negate : number -> number (* cexp n i = (cos (2 * pi * i / n), sin (2 * pi * i / n)) *) val cexp : int -> int -> (number * number) val unparse : number -> string val to_string : number -> string val to_float : number -> float fftw-2.1.5/gensrc/rconfig_prelude0000644000175400001440000000066107637531662012543 /* rconfig.c -- this file contains all the real-complex codelets the system knows about */ #include "fftw-int.h" #include "rfftw.h" #define NOTW_CODELET(x) \ &fftw_real2hc_##x##_desc #define NOTWI_CODELET(x) \ &fftw_hc2real_##x##_desc #define TWIDDLE_CODELET(x) \ &fftw_hc2hc_forward_##x##_desc #define TWIDDLEI_CODELET(x) \ &fftw_hc2hc_backward_##x##_desc /* automatically-generated list of codelets */ fftw-2.1.5/gensrc/schedule.ml0000644000175400001440000001227507637531662011603 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: schedule.ml,v 1.17 2003/03/16 23:43:46 stevenj Exp $ *) (* This file contains the instruction scheduler, which finds an efficient ordering for a given list of instructions. The scheduler analyzes the DAG (Directed, Acyclic Graph) formed by the instruction dependencies, and recursively partitions it. The resulting schedule data structure expresses a "good" ordering and structure for the computation. The scheduler makes use of utilties in Dag and other packages to manipulate the Dag and the instruction list. *) open Dag (************************************************* * Dag scheduler *************************************************) let to_assignment node = (Expr.Assign (node.assigned, node.expression)) let makedag l = Dag.makedag (List.map (function Expr.Assign (v, x) -> (v, x)) l) let return x = x let has_color c n = (n.color = c) let set_color c n = (n.color <- c) let has_either_color c1 c2 n = (n.color = c1 || n.color = c2) let infinity = 100000 let cc dag inputs = begin Dag.for_all dag (fun node -> node.label <- infinity); (match inputs with a :: _ -> bfs dag a 0 | _ -> failwith "connected"); return ((List.map to_assignment (Util.filter (fun n -> n.label < infinity) (Dag.to_list dag))), (List.map to_assignment (Util.filter (fun n -> n.label == infinity) (Dag.to_list dag)))) end let rec connected_components alist = let dag = makedag alist in let inputs = Util.filter (fun node -> Util.null node.predecessors) (Dag.to_list dag) in match cc dag inputs with (a, []) -> [a] | (a, b) -> a :: connected_components b let loads_twiddle node = match (node.input_variables, node.predecessors) with ([x], []) -> Variable.is_twiddle x | _ -> false let partition alist = let dag = makedag alist in let dag' = Dag.to_list dag in let inputs = Util.filter (fun node -> Util.null node.predecessors) dag' and outputs = Util.filter (fun node -> Util.null node.successors) dag' and special_inputs = Util.filter loads_twiddle dag' in begin Dag.for_all dag (fun node -> begin node.color <- BLACK; end); Util.for_list inputs (set_color RED); (* The special inputs are input that read a twiddle factor. They can end up either in the blue or in the red part. If a red node needs a special input, the special input becomes red. If all successors of a special input are blue, it becomes blue. Outputs are always blue. As a consequence, however, the final partition might be composed only of blue nodes (which is incorrect). In this case we manually reset all inputs (whether special or not) to be red. *) Util.for_list special_inputs (set_color YELLOW); Util.for_list outputs (set_color BLUE); let rec loopi donep = match (Util.filter (fun node -> (has_color BLACK node) && List.for_all (has_either_color RED YELLOW) node.predecessors) dag') with [] -> if (donep) then () else loopo true | i -> begin Util.for_list i (fun node -> begin set_color RED node; Util.for_list node.predecessors (set_color RED); end); loopo false; end and loopo donep = match (Util.filter (fun node -> (has_either_color BLACK YELLOW node) && List.for_all (has_color BLUE) node.successors) dag') with [] -> if (donep) then () else loopi true | o -> begin Util.for_list o (set_color BLUE); loopi false; end (* among the magic parameters, this is the most obscure *) in if !Magic.loopo then loopo false else loopi false; (* fix the partition if it is incorrect *) if not (List.exists (has_color RED) dag') then Util.for_list inputs (set_color RED); return ((List.map to_assignment (Util.filter (has_color RED) dag')), (List.map to_assignment (Util.filter (has_color BLUE) dag'))) end type schedule = Done | Instr of Expr.assignment | Seq of (schedule * schedule) | Par of schedule list let schedule = let rec schedule_alist = function [] -> Done | [a] -> Instr a | alist -> match connected_components alist with ([a]) -> schedule_connected a | l -> Par (List.map schedule_alist l) and schedule_connected alist = match partition alist with | (a, b) -> Seq (schedule_alist a, schedule_alist b) in schedule_alist fftw-2.1.5/gensrc/schedule.mli0000644000175400001440000000177707637531662011761 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: schedule.mli,v 1.7 2003/03/16 23:43:46 stevenj Exp $ *) type schedule = | Done | Instr of Expr.assignment | Seq of (schedule * schedule) | Par of schedule list val schedule : Expr.assignment list -> schedule fftw-2.1.5/gensrc/symmetry.ml0000644000175400001440000002230107637531662011667 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: symmetry.ml,v 1.15 2003/03/16 23:43:46 stevenj Exp $ *) (* various kinds of symmetries *) open Complex open Util (* * symmetries are encoded as symmetries of the *input*. A symmetry * determines * 1) the symmetry of the output (osym) * 2) symmetries at intermediate stages of divide and conquer or Rader * (isym1 and isym2) *) type symmetry = { apply: int -> (int -> Complex.expr) -> int -> Complex.expr; store: int -> (int -> Complex.expr) -> int -> Exprdag.node list; osym: symmetry; isym1: symmetry; isym2: symmetry} (* no symmetry *) let rec no_sym = { isym1 = no_sym; isym2 = no_sym; osym = no_sym; store = (fun _ f i -> store_var (access_output i) (f i)); apply = fun _ f -> f } (* the crazy symmetry of the intermediate elements of the hc2hc_forward transform. *) and middle_hc2hc_forward_sym = { osym = middle_hc2hc_forward_sym; isym1 = no_sym; isym2 = no_sym; store = (fun n f i -> if (i < n - i) then store_var (access_output i) (f i) else store_var (access_output i) (swap_re_im (conj (f i)))); apply = fun _ f -> f } (* the crazy symmetry of the intermediate elements of the hc2hc_backward transform. *) and middle_hc2hc_backward_sym = { osym = no_sym; isym1 = no_sym; isym2 = no_sym; store = (fun _ -> failwith "middle_hc2hc_backward_sym"); apply = fun n f i -> if (i < n - i) then (f i) else conj (swap_re_im (f i)) } (* the crazy symmetry of the n/2-th element of the hc2hc_forward transform. *) and final_hc2hc_forward_sym = { osym = final_hc2hc_forward_output_sym; isym1 = real_sym; isym2 = no_sym; store = (fun n f i -> if (2 * i < n) then store_real (access_output i) (f i) else []); apply = fun n f i -> if (2 * i < n) then real (f i) else uminus (real (f (i - n/2))) } and final_hc2hc_backward_sym = { osym = final_hc2hc_forward_sym; isym1 = no_sym; isym2 = no_sym; store = (fun _ -> failwith "final_hc2hc_backward_sym"); apply = (fun n f i -> if (i mod 2 == 0) then zero else ( let i' = (i - 1) / 2 and n' = n / 2 in if (2 * i' < n' - 1) then (f i') else if (2 * i' == n' - 1) then real (f i') else conj (f (n' - 1 - i')) )) } and final_hc2hc_forward_output_sym = { osym = final_hc2hc_forward_sym; isym1 = no_sym; isym2 = no_sym; store = (fun n f i -> if (i mod 2 == 0) then [] else ( let i' = (i - 1) / 2 and n' = n / 2 in if (2 * i' < n' - 1) then store_var (access_output i') (times (inverse_int 2) (f i)) else if (2 * i' == n' - 1) then store_real (access_output i') (times (inverse_int 2) (f i)) else [] )); apply = fun _ f -> f } (* real input data *) and real_sym = { osym = hermitian_sym; isym1 = real_sym; isym2 = no_sym; store = (fun _ f i -> store_real (access_output i) (f i)); apply = fun _ f -> real @@ f } (* imaginary input data *) and imag_sym = { osym = antihermitian_sym; isym1 = imag_sym; isym2 = no_sym; store = (fun _ f i -> store_imag (access_output i) (f i)); apply = fun _ f -> imag @@ f } (* real, even input data *) and realeven_sym = { osym = realeven_sym; isym1 = real_sym; isym2 = hermitian_sym; store = (fun n f i -> if (i <= n - i) then store_real (access_output i) (f i) else []); apply = fun n f i -> if (i <= n - i) then real (f i) else real (f (n - i)) } (* imaginary, even input data *) and imageven_sym = { osym = imageven_sym; isym1 = imag_sym; isym2 = antihermitian_sym; store = (fun n f i -> if (i <= n - i) then store_imag (access_output i) (f i) else []); apply = fun n f i -> if (i <= n - i) then imag (f i) else imag (f (n - i)) } (* real, odd input data *) and realodd_sym = { osym = imagodd_sym; isym1 = real_sym; isym2 = antihermitian_sym; store = (fun n f i -> if ((i > 0) && (i < n - i)) then store_real (access_output i) (f i) else []); apply = fun n f i -> if (i == 0) then zero else if (i < n - i) then real (f i) else if (i > n - i) then real (uminus (f (n - i))) else zero } (* imaginary, odd input data *) and imagodd_sym = { osym = realodd_sym; isym1 = imag_sym; isym2 = hermitian_sym; store = (fun n f i -> if ((i > 0) && (i < n - i)) then store_imag (access_output i) (f i) else []); apply = fun n f i -> if (i == 0) then zero else if (i < n - i) then imag (f i) else if (i > n - i) then imag (uminus (f (n - i))) else zero } (* halfcomplex/anti-hermitian input data *) and antihermitian_sym = { osym = imag_sym; isym1 = no_sym; isym2 = antihermitian_sym; apply = (fun n f i -> if (i = 0) then imag (f 0) else if (i < n - i) then (f i) else if (i > n - i) then uminus (conj (f (n - i))) else imag (f i)); store = fun n f i -> if (i = 0) then store_imag (access_output i) (f i) else if (i < n - i) then store_var (access_output i) (f i) else if (i == n - i) then store_imag (access_output i) (f i) else [] } (* halfcomplex/hermitian input data *) and hermitian_sym = { osym = real_sym; isym1 = no_sym; isym2 = hermitian_sym; apply = (fun n f i -> if (i = 0) then real (f 0) else if (i < n - i) then (f i) else if (i > n - i) then conj (f (n - i)) else real (f i)); store = fun n f i -> if (i = 0) then store_real (access_output i) (f i) else if (i < n - i) then store_var (access_output i) (f i) else if (i == n - i) then store_real (access_output i) (f i) else [] } (* symmetric input data, used by rader *) and symmetric_sym = { osym = symmetric_sym; isym1 = no_sym; isym2 = no_sym; apply = (fun n f i -> if (i < n - i) then (f i) else (f (n - i))); store = (fun _ -> failwith "symmetric_sym") } (* anti-symmetric input data, used by rader *) and anti_symmetric_sym = { osym = anti_symmetric_sym; isym1 = no_sym; isym2 = no_sym; apply = (fun n f i -> if (i == 0) then zero else if (i < n - i) then (f i) else if (i > n - i) then uminus (f (n - i)) else zero); store = (fun _ -> failwith "anti_symmetric_sym") } (* real, even-2 input data (even about n=-1/2, not n=0). *) and realeven2_input_sym = { osym = realeven2_output_sym; isym1 = real_sym; isym2 = hermitian_sym; store = (fun _ -> failwith "realeven2_input_sym"); apply = fun n f i -> if ((i mod 2) == 0) then zero else if (i <= n - i) then real (f ((i - 1) / 2)) else real (f (n/2 - 1 - (i - 1)/2)) } (* real, even-2 output data (even about n=-1/2, not n=0). We have multiplied output[k] by omega^(k/2); the result is real, odd, and anti-periodic. *) and realeven2_output_sym = { osym = no_sym; isym1 = no_sym; isym2 = no_sym; store = (fun n f i -> if (4 * i < n) then store_real (access_output i) (f i) else []); apply = (fun n f i -> f i) } (* real, odd-2 input data (odd about n=-1/2, not n=0). *) and realodd2_input_sym = { osym = realodd2_output_sym; isym1 = real_sym; isym2 = antihermitian_sym; store = (fun _ -> failwith "realodd2_input_sym"); apply = fun n f i -> if ((i mod 2) == 0) then zero else if (i < n - i) then real (f ((i - 1) / 2)) else if (i == n - i) then zero else uminus (real (f (n/2 - 1 - (i - 1)/2))) } (* real, odd-2 output data (odd about n=-1/2, not n=0). We have multiplied output[k] by omega^(k/2); the result is imaginary, even, and anti-periodic. *) and realodd2_output_sym = { osym = no_sym; isym1 = no_sym; isym2 = no_sym; store = (fun n f i -> if (i > 0 && 4 * i <= n) then store_imag (access_output i) (f i) else []); apply = (fun n f i -> f i) } (* mp3 mdct symmetries *) and mp3mdct_input_sym = { osym = mp3mdct_output_sym; isym1 = real_sym; isym2 = hermitian_sym; store = (fun _ -> failwith "mp3mdct_input_sym"); apply = fun n f i -> let coef = times two (inverse_int (n / 4)) in (* this is the `normal' mp3 mdcd window. I have not implemented the `start' and `stop' windows yet *) let w i = let s = swap_re_im (imag (exp n (2 * i + 1))) in times (times coef s) (f (i mod (n / 4))) in let g i = if (i mod 2) == 0 then zero else w (((i - 1 - n / 8) / 2 + n) mod (n / 2)) in if (i <= n - i) then g i else g (n - i) } and mp3mdct_output_sym = { osym = no_sym; isym1 = no_sym; isym2 = no_sym; store = (fun n f i -> if ((i mod 2) == 1 && 4 * i < n) then store_real (access_output ((i-1) / 2)) (f i) else []); apply = (fun n f i -> f i) } fftw-2.1.5/gensrc/to_c.ml0000644000175400001440000002405507637531662010732 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $ *) let cvsid = "$Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $" open Expr open Asched open List (* Here, we have routines for outputting the C source code for FFTW using the abstract syntax tree (AST), symbolic expressions, etcetera, produced by the rest of the generator. *) let foldr_string_concat l = fold_right (^) l "" (* output the command line *) let cmdline () = fold_right (fun a b -> a ^ " " ^ b) (Array.to_list Sys.argv) "" let paranoid_alignment_check () = if !Magic.alignment_check then "ASSERT_ALIGNED_DOUBLE;\n" else "" (*********************************** * C program structure ***********************************) type c_decl = Decl of string * string type c_ast = Asch of annotated_schedule | For of c_ast * c_ast * c_ast * c_ast | If of c_ast * c_ast | Block of (c_decl list) * (c_ast list) | Binop of string * expr * expr | Expr_assign of expr * expr | Stmt_assign of expr * expr | Comma of c_ast * c_ast type c_fcn = Fcn of string * string * (c_decl list) * c_ast let real = "fftw_real" (* * traverse a a function and return a list of all expressions, * in the execution order *) let rec fcn_to_expr_list = let rec acode_to_expr_list = function AInstr (Assign (_, x)) -> [x] | ASeq (a, b) -> (asched_to_expr_list a) @ (asched_to_expr_list b) | _ -> [] and asched_to_expr_list (Annotate (_, _, _, _, code)) = acode_to_expr_list code and ast_to_expr_list = function Asch a -> asched_to_expr_list a | Block (_, a) -> flatten (map ast_to_expr_list a) | For (_, _, _, body) -> ast_to_expr_list body | If (_, body) -> ast_to_expr_list body | _ -> [] in fun (Fcn (_, _, _, body)) -> ast_to_expr_list body (***************** Extracting Operation Counts ***************) let count_stack_vars = let rec count_acode = function | ASeq (a, b) -> max (count_asched a) (count_asched b) | _ -> 0 and count_asched (Annotate (_, _, decl, _, code)) = (length decl) + (count_acode code) and count_ast = function | Asch a -> count_asched a | Block (d, a) -> (length d) + (Util.max_list (map count_ast a)) | For (_, _, _, body) -> count_ast body | If (_, body) -> count_ast body | _ -> 0 in function (Fcn (_, _, _, body)) -> count_ast body let count_memory_acc f = let rec count_var v = if (Variable.is_input v) or (Variable.is_output v) then 1 else 0 and count_acode = function | AInstr (Assign (v, _)) -> count_var v | ASeq (a, b) -> (count_asched a) + (count_asched b) | _ -> 0 and count_asched = function Annotate (_, _, _, _, code) -> count_acode code and count_ast = function | Asch a -> count_asched a | Block (_, a) -> (Util.sum_list (map count_ast a)) | Comma (a, b) -> (count_ast a) + (count_ast b) | For (_, _, _, body) -> count_ast body | If (_, body) -> count_ast body | _ -> 0 and count_acc_expr_func acc = function | Var v -> acc + (count_var v) | Plus a -> fold_left count_acc_expr_func acc a | Times (a, b) -> fold_left count_acc_expr_func acc [a; b] | Uminus a -> count_acc_expr_func acc a | _ -> acc in let (Fcn (typ, name, args, body)) = f in (count_ast body) + fold_left count_acc_expr_func 0 (fcn_to_expr_list f) let build_fma = function | [a; Times (b, c)] -> Some (a, b, c) | [Times (b, c); a] -> Some (a, b, c) | [a; Uminus (Times (b, c))] -> Some (a, b, c) | [Uminus (Times (b, c)); a] -> Some (a, b, c) | _ -> None let rec count_flops_expr_func (adds, mults, fmas) = function | Plus [] -> (adds, mults, fmas) | Plus a -> (match build_fma a with None -> let (newadds, newmults, newfmas) = fold_left count_flops_expr_func (adds, mults, fmas) a in (newadds + (length a) - 1, newmults, newfmas) | Some (a, b, c) -> let (newadds, newmults, newfmas) = fold_left count_flops_expr_func (adds, mults, fmas) [a; b; c] in (newadds, newmults, newfmas + 1)) | Times (a,b) -> let (newadds, newmults, newfmas) = fold_left count_flops_expr_func (adds, mults, fmas) [a; b] in (newadds, newmults + 1, newfmas) | Uminus a -> count_flops_expr_func (adds, mults, fmas) a | _ -> (adds, mults, fmas) let count_flops f = fold_left count_flops_expr_func (0, 0, 0) (fcn_to_expr_list f) let arith_complexity f = let (a, m, fmas) = count_flops f and v = count_stack_vars f and mem = count_memory_acc f in (a, m, fmas, v, mem) (* print the operation costs *) let print_cost f = let Fcn (_, name, _, _) = f and (a, m, fmas, v, mem) = arith_complexity f in "/*\n"^ " * This function contains " ^ (string_of_int (a + fmas)) ^ " FP additions, " ^ (string_of_int (m + fmas)) ^ " FP multiplications,\n" ^ " * (or, " ^ (string_of_int a) ^ " additions, " ^ (string_of_int m) ^ " multiplications, " ^ (string_of_int fmas) ^ " fused multiply/add),\n" ^ " * " ^ (string_of_int v) ^ " stack variables, and " ^ (string_of_int mem) ^ " memory accesses\n" ^ " */\n" (***************** Extracting Constants ***************) (* add a new key & value to a list of (key,value) pairs, where the keys are floats and each key is unique up to almost_equal *) let add_float_key_value list_so_far k = if exists (fun k2 -> Number.equal k k2) list_so_far then list_so_far else k :: list_so_far (* find all constants in a given expression *) let rec expr_to_constants = function | Num n -> [n] | Plus a -> flatten (map expr_to_constants a) | Times (a, b) -> (expr_to_constants a) @ (expr_to_constants b) | Uminus a -> expr_to_constants a | _ -> [] let extract_constants f = let constlist = flatten (map expr_to_constants (fcn_to_expr_list f)) in let unique_constants = fold_left add_float_key_value [] constlist in let use_define () = foldr_string_concat (map (function n -> "#define " ^ (Number.unparse n) ^ " " ^ "FFTW_KONST(" ^ (Number.to_string n) ^ ")\n") unique_constants) and use_const () = foldr_string_concat (map (function n -> "static const " ^ real ^ " " ^ (Number.unparse n) ^ " = " ^ "FFTW_KONST(" ^ (Number.to_string n) ^ ");\n") unique_constants) in if !Magic.inline_konstants then use_define () ^ "\n\n" else use_const () ^ "\n\n" (******************* Unparsing the Abstract Syntax Tree *******************) (* make an unparser, given a variable unparser *) let make_c_unparser unparse_var = let rec unparse_expr = let rec unparse_plus = function [] -> "" | (Uminus a :: b) -> " - " ^ (parenthesize a) ^ (unparse_plus b) | (a :: b) -> " + " ^ (parenthesize a) ^ (unparse_plus b) and parenthesize x = match x with | (Var _) -> unparse_expr x | (Integer _) -> unparse_expr x | (Num _) -> unparse_expr x | _ -> "(" ^ (unparse_expr x) ^ ")" in function Var x -> unparse_var x | Num n -> Number.unparse n | Integer n -> (string_of_int n) | Plus [] -> "0.0 /* bug */" | Plus [a] -> " /* bug */ " ^ (unparse_expr a) | Plus (a::b) -> (parenthesize a) ^ (unparse_plus b) | Times (a, b) -> (parenthesize a) ^ " * " ^ (parenthesize b) | Uminus a -> "- " ^ (parenthesize a) and unparse_decl = function Decl (a, b) -> a ^ " " ^ b ^ ";\n" and unparse_assignment (Assign (v, x)) = (unparse_var v) ^ " = " ^ (unparse_expr x) ^ ";\n" and unparse_annotated force_bracket = let rec unparse_code = function ADone -> "" | AInstr i -> unparse_assignment i | ASeq (a, b) -> (unparse_annotated false a) ^ (unparse_annotated false b) and declare_variables = function [] -> "" | v :: l when Variable.is_temporary v -> (real ^ " " ^ (unparse_var v) ^ ";\n") ^ (declare_variables l) | s :: l -> (declare_variables l) in function Annotate (_, _, decl, _, code) -> if (not force_bracket) && (Util.null decl) then unparse_code code else "{\n" ^ (declare_variables decl) ^ paranoid_alignment_check() ^ (unparse_code code) ^ "}\n" and unparse_ast = function Asch a -> (unparse_annotated true a) | For (a, b, c, d) -> "for (" ^ unparse_ast a ^ "; " ^ unparse_ast b ^ "; " ^ unparse_ast c ^ ")" ^ unparse_ast d | If (a, d) -> "if (" ^ unparse_ast a ^ ")" ^ unparse_ast d | Block (d, s) -> if (s == []) then "" else "{\n" ^ foldr_string_concat (map unparse_decl d) ^ foldr_string_concat (map unparse_ast s) ^ "}\n" | Binop (op, a, b) -> (unparse_expr a) ^ op ^ (unparse_expr b) | Expr_assign (a, b) -> (unparse_expr a) ^ " = " ^ (unparse_expr b) | Stmt_assign (a, b) -> (unparse_expr a) ^ " = " ^ (unparse_expr b) ^ ";\n" | Comma (a, b) -> (unparse_ast a) ^ ", " ^ (unparse_ast b) and unparse_function = function Fcn (typ, name, args, body) -> let rec unparse_args = function [Decl (a, b)] -> a ^ " " ^ b | (Decl (a, b)) :: s -> a ^ " " ^ b ^ ", " ^ unparse_args s | [] -> "" in (typ ^ " " ^ name ^ "(" ^ unparse_args args ^ ")\n" ^ unparse_ast body) in function tree -> "/* Generated by: " ^ (cmdline ()) ^ "*/\n\n" ^ (print_cost tree) ^ (extract_constants tree) ^ "/*\n" ^ " * Generator Id's : \n" ^ " * " ^ Exprdag.cvsid ^ "\n" ^ " * " ^ Fft.cvsid ^ "\n" ^ " * " ^ cvsid ^ "\n" ^ " */\n\n" ^ (unparse_function tree) fftw-2.1.5/gensrc/to_c.mli0000644000175400001440000000247207637531662011102 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: to_c.mli,v 1.9 2003/03/16 23:43:46 stevenj Exp $ *) type c_decl = | Decl of string * string type c_ast = | Asch of Asched.annotated_schedule | For of c_ast * c_ast * c_ast * c_ast | If of c_ast * c_ast | Block of c_decl list * c_ast list | Binop of string * Expr.expr * Expr.expr | Expr_assign of Expr.expr * Expr.expr | Stmt_assign of Expr.expr * Expr.expr | Comma of c_ast * c_ast type c_fcn = | Fcn of string * string * c_decl list * c_ast val make_c_unparser : (Variable.variable -> string) -> c_fcn -> string fftw-2.1.5/gensrc/twiddle.ml0000644000175400001440000000741307637531662011441 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: twiddle.ml,v 1.3 2003/03/16 23:43:46 stevenj Exp $ *) (* This file implements various policies for either loading the twiddle * factors according to various algorithms. *) open Complex open Util let square x = if (!Magic.use_wsquare) then wsquare x else times x x (* various policies for computing/loading twiddle factors *) (* load all twiddle factors *) let twiddle_policy_load_all = let twiddle_expression n i _ = load_var (access_twiddle (i - 1)) and num_twiddle n = (n - 1) and twiddle_order n = forall_flat 1 n (fun i -> [i]) in twiddle_expression, num_twiddle, twiddle_order (* * if n is even, compute w^n = (w^{n/2})^2, else * load it *) let twiddle_policy_load_odd = let twiddle_expression n i twiddles = if ((i mod 2) == 0) then square (twiddles (i / 2)) else load_var (access_twiddle ((i - 1) / 2)) and num_twiddle n = (n / 2) and twiddle_order n = forall_flat 1 n (fun i -> if ((i mod 2) == 1) then [i] else []) in twiddle_expression, num_twiddle, twiddle_order (* compute w^n = w w^{n-1} *) let twiddle_policy_iter = let twiddle_expression n i twiddles = if (i == 1) then load_var (access_twiddle (i - 1)) else times (twiddles (i - 1)) (twiddles 1) and num_twiddle n = 1 and twiddle_order n = [1] in twiddle_expression, num_twiddle, twiddle_order (* * if n is even, compute w^n = (w^{n/2})^2, else * w^n = w w^{n-1} *) let twiddle_policy_square1 = let twiddle_expression n i twiddles = if (i == 1) then load_var (access_twiddle (i - 1)) else if ((i mod 2) == 0) then square (twiddles (i / 2)) else times (twiddles (i - 1)) (twiddles 1) and num_twiddle n = 1 and twiddle_order n = [1] in twiddle_expression, num_twiddle, twiddle_order (* * if n is even, compute w^n = (w^{n/2})^2, else * compute w^n from w^{n-1}, w^{n-2}, and w *) let twiddle_policy_square2 = let twiddle_expression n i twiddles = if (i == 1) then load_var (access_twiddle (i - 1)) else if ((i mod 2) == 0) then square (twiddles (i / 2)) else wthree (twiddles (i - 1)) (twiddles (i - 2)) (twiddles 1) and num_twiddle n = 1 and twiddle_order n = [1] in twiddle_expression, num_twiddle, twiddle_order (* * if n is even, compute w^n = (w^{n/2})^2, else * w^n = w^{floor(n/2)} w^{ceil(n/2)} *) let twiddle_policy_square3 = let twiddle_expression n i twiddles = if (i == 1) then load_var (access_twiddle (i - 1)) else if ((i mod 2) == 0) then square (twiddles (i / 2)) else times (twiddles (i / 2)) (twiddles (i - i / 2)) and num_twiddle n = 1 and twiddle_order n = [1] in twiddle_expression, num_twiddle, twiddle_order let twiddle_policy () = match !Magic.twiddle_policy with Magic.TWIDDLE_LOAD_ALL -> twiddle_policy_load_all | Magic.TWIDDLE_ITER -> twiddle_policy_iter | Magic.TWIDDLE_LOAD_ODD -> twiddle_policy_load_odd | Magic.TWIDDLE_SQUARE1 -> twiddle_policy_square1 | Magic.TWIDDLE_SQUARE2 -> twiddle_policy_square2 | Magic.TWIDDLE_SQUARE3 -> twiddle_policy_square3 fftw-2.1.5/gensrc/util.ml0000644000175400001440000001032107637531662010752 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: util.ml,v 1.14 2003/03/16 23:43:46 stevenj Exp $ *) (* various utility functions *) open List open Unix (***************************************** * Integer operations *****************************************) (* fint the inverse of n modulo m *) let invmod n m = let rec loop i = if ((i * n) mod m == 1) then i else loop (i + 1) in loop 1 (* Yooklid's algorithm *) let rec gcd n m = if (n > m) then gcd m n else let r = m mod n in if (r == 0) then n else gcd r n (* reduce the fraction m/n to lowest terms, modulo factors of n/n *) let lowest_terms n m = if (m mod n == 0) then (1,0) else let nn = (abs n) in let mm = m * (n / nn) in let mpos = if (mm > 0) then (mm mod nn) else (mm + (1 + (abs mm) / nn) * nn) mod nn and d = gcd nn (abs mm) in (nn / d, mpos / d) (* find a generator for the multiplicative group mod p (where p must be prime for a generator to exist!!) *) exception No_Generator let find_generator p = let rec period x prod = if (prod == 1) then 1 else 1 + (period x (prod * x mod p)) in let rec findgen x = if (x == 0) then raise No_Generator else if ((period x x) == (p - 1)) then x else findgen ((x + 1) mod p) in findgen 1 (* raise x to a power n modulo p (requires n > 0) (in principle, negative powers would be fine, provided that x and p are relatively prime...we don't need this functionality, though) *) exception Negative_Power let rec pow_mod x n p = if (n == 0) then 1 else if (n < 0) then raise Negative_Power else if (n mod 2 == 0) then pow_mod (x * x mod p) (n / 2) p else x * (pow_mod x (n - 1) p) mod p (****************************************** * auxiliary functions ******************************************) let rec forall combiner a b f = if (a >= b) then [] else combiner (f a) (forall combiner (a + 1) b f) let sum_list l = fold_right (+) l 0 let max_list l = fold_right (max) l (-999999) let min_list l = fold_right (min) l 999999 let count pred = fold_left (fun a elem -> if (pred elem) then 1 + a else a) 0 let filter pred l = fold_right (fun elem a -> if (pred elem) then elem :: a else a) l [] let remove elem = filter (fun e -> (e != elem)) let cons a b = a :: b let null = function [] -> true | _ -> false (* functional composition *) let (@@) f g x = f (g x) (* Hmm... CAML won't allow second-order polymorphism. Oh well.. *) (* let forall_flat = forall (@);; *) let rec forall_flat a b f = if (a >= b) then [] else (f a) @ (forall_flat (a + 1) b f) let identity x = x let for_list l f = let rec loop = function [] -> () | s::r -> begin f s; loop r; end in loop l let rec minimize f = function [] -> None | elem :: rest -> match minimize f rest with None -> Some elem | Some x -> if (f x) >= (f elem) then Some elem else Some x let rec find_elem condition = function [] -> None | elem :: rest -> if condition elem then Some elem else find_elem condition rest (* find x, x >= a, such that (p x) is true *) let rec suchthat a pred = if (pred a) then a else suchthat (a + 1) pred (* print an information message *) let info string = if !Magic.verbose then begin let now = Unix.times () and pid = Unix.getpid () in prerr_string ((string_of_int pid) ^ ": " ^ "at t = " ^ (string_of_float now.tms_utime) ^ " : "); prerr_string (string ^ "\n"); flush Pervasives.stderr; end fftw-2.1.5/gensrc/util.mli0000644000175400001440000000332407637531662011130 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: util.mli,v 1.12 2003/03/16 23:43:46 stevenj Exp $ *) val invmod : int -> int -> int val gcd : int -> int -> int val lowest_terms : int -> int -> int * int val find_generator : int -> int val pow_mod : int -> int -> int -> int val forall : ('a -> 'b list -> 'b list) -> int -> int -> (int -> 'a) -> 'b list val sum_list : int list -> int val max_list : int list -> int val min_list : int list -> int val count : ('a -> bool) -> 'a list -> int val filter : ('a -> bool) -> 'a list -> 'a list val remove : 'a -> 'a list -> 'a list val cons : 'a -> 'a list -> 'a list val null : 'a list -> bool val (@@) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b val forall_flat : int -> int -> (int -> 'a list) -> 'a list val identity : 'a -> 'a val for_list : 'a list -> ('a -> 'b) -> unit val minimize : ('a -> 'b) -> 'a list -> 'a option val find_elem : ('a -> bool) -> 'a list -> 'a option val suchthat : int -> (int -> bool) -> int val info : string -> unit fftw-2.1.5/gensrc/variable.ml0000644000175400001440000002163007637531662011567 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: variable.ml,v 1.21 2003/03/16 23:43:46 stevenj Exp $ *) (* Data types and functions for dealing with variables in symbolic * expressions and the abstract syntax tree. *) (* Variables fall into one of four categories: temporary variables * (which the generator can add or delete at will), named (fixed) * variables, and the real/imaginary parts of complex arrays. Arrays * can be either input arrays, output arrays, or arrays of precomputed * twiddle factors (roots of unity). *) type array = Input | Output | Twiddle type variable = Temporary of int | Named of string | RealArrayElem of (array * int) | ImagArrayElem of (array * int) let make_temporary = let tmp_count = ref 0 in fun () -> begin tmp_count := !tmp_count + 1; Temporary !tmp_count end let is_temporary = function Temporary _ -> true | _ -> false let is_output = function RealArrayElem (Output, _) -> true | ImagArrayElem (Output, _) -> true | _ -> false let is_input = function RealArrayElem (Input, _) -> true | ImagArrayElem (Input, _) -> true | _ -> false let is_twiddle = function RealArrayElem (Twiddle, _) -> true | ImagArrayElem (Twiddle, _) -> true | _ -> false let same = (=) let hash = function | RealArrayElem (Input, i) -> i * 8 | ImagArrayElem (Input, i) -> -i * 8 + 1 | RealArrayElem (Output, i) -> i * 8 + 2 | ImagArrayElem (Output, i) -> -i * 8 + 3 | RealArrayElem (Twiddle, i) -> i * 8 + 4 | ImagArrayElem (Twiddle, i) -> -i * 8 + 5 | _ -> 0 let similar a b = same a b or (match (a, b) with (RealArrayElem (a1, k1), ImagArrayElem (a2, k2)) -> a1 = a2 && k1 = k2 | (ImagArrayElem (a1, k1), RealArrayElem (a2, k2)) -> a1 = a2 && k1 = k2 | _ -> false) (* true if assignment of a clobbers variable b *) let clobbers a b = match (a, b) with (RealArrayElem (Output, k1), RealArrayElem (Input, k2)) -> k1 = k2 | (ImagArrayElem (Output, k1), ImagArrayElem (Input, k2)) -> k1 = k2 | _ -> false (* true if a is the real part and b the imaginary of the same array *) let real_imag a b = match (a, b) with (RealArrayElem (a1, k1), ImagArrayElem (a2, k2)) -> a1 = a2 && k1 = k2 | _ -> false (* true if a and b are elements of the same array, and a has smaller index *) let increasing_indices a b = match (a, b) with (RealArrayElem (a1, k1), RealArrayElem (a2, k2)) -> a1 = a2 && k1 < k2 | (RealArrayElem (a1, k1), ImagArrayElem (a2, k2)) -> a1 = a2 && k1 < k2 | (ImagArrayElem (a1, k1), RealArrayElem (a2, k2)) -> a1 = a2 && k1 < k2 | (ImagArrayElem (a1, k1), ImagArrayElem (a2, k2)) -> a1 = a2 && k1 < k2 | _ -> false let access array k = (RealArrayElem (array, k), ImagArrayElem (array, k)) let access_input = access Input let access_output = access Output let access_twiddle = access Twiddle let make_named name = Named name let unparse_index name stride k = let index = match (stride, k) with (_, 0) -> "0" | (Some s, 1) -> s | (Some s, (-1)) -> "-" ^ s | (None, k) -> (string_of_int k) | (Some s, k) -> (string_of_int k) ^ " * " ^ s in name ^ "[" ^ index ^ "]" let default_unparser = function Temporary k -> "tmp" ^ (string_of_int k) | Named s -> s | _ -> failwith "attempt to unparse unknown variable" let make_unparser (input_name, input_stride) (output_name, output_stride) (twiddle_name, twiddle_stride) = let rec unparse_var = function | RealArrayElem (array, k) -> "c_re(" ^ (unparse_array array k) ^ ")" | ImagArrayElem (array, k) -> "c_im(" ^ (unparse_array array k) ^ ")" | x -> default_unparser x and unparse_array = function Input -> unparse_index input_name input_stride | Output -> unparse_index output_name output_stride | Twiddle -> unparse_index twiddle_name twiddle_stride in unparse_var let make_real2hc_unparser (input_name, input_stride) (real_output_name, real_output_stride) (imag_output_name, imag_output_stride) = function | RealArrayElem (Input, k) -> unparse_index input_name input_stride k | ImagArrayElem (Input, _) -> failwith "trying to access imaginary part of real input" | RealArrayElem (Output, k) -> unparse_index real_output_name real_output_stride k | ImagArrayElem (Output, k) -> unparse_index imag_output_name imag_output_stride k | x -> default_unparser x let make_hc2real_unparser (real_input_name, real_input_stride) (imag_input_name, imag_input_stride) (output_name, output_stride) = function | RealArrayElem (Input, k) -> unparse_index real_input_name real_input_stride k | ImagArrayElem (Input, k) -> unparse_index imag_input_name imag_input_stride k | RealArrayElem (Output, k) -> unparse_index output_name output_stride k | ImagArrayElem (Output, _) -> failwith "trying to access imaginary part of real output" | x -> default_unparser x let make_hc2hc_forward_unparser n (first_name, first_stride) (second_name, second_stride) (twiddle_name, twiddle_stride) = function | RealArrayElem (Input, k) -> unparse_index first_name first_stride k | ImagArrayElem (Input, k) -> unparse_index second_name second_stride (k - n + 1) | RealArrayElem (Output, k) -> unparse_index first_name first_stride k | ImagArrayElem (Output, k) -> unparse_index second_name second_stride (- k) | RealArrayElem (Twiddle, k) -> "c_re(" ^ (unparse_index twiddle_name twiddle_stride k) ^ ")" | ImagArrayElem (Twiddle, k) -> "c_im(" ^ (unparse_index twiddle_name twiddle_stride k) ^ ")" | x -> default_unparser x let make_hc2hc_backward_unparser n (first_name, first_stride) (second_name, second_stride) (twiddle_name, twiddle_stride) = function | RealArrayElem (Input, k) -> unparse_index first_name first_stride k | ImagArrayElem (Input, k) -> unparse_index second_name second_stride (- k) | RealArrayElem (Output, k) -> unparse_index first_name first_stride k | ImagArrayElem (Output, k) -> unparse_index second_name second_stride (k - n + 1) | RealArrayElem (Twiddle, k) -> "c_re(" ^ (unparse_index twiddle_name twiddle_stride k) ^ ")" | ImagArrayElem (Twiddle, k) -> "c_im(" ^ (unparse_index twiddle_name twiddle_stride k) ^ ")" | x -> default_unparser x let make_realeven_unparser (input_name, input_stride) (real_output_name, real_output_stride) = function | RealArrayElem (Input, k) -> unparse_index input_name input_stride k | ImagArrayElem (Input, _) -> failwith "trying to access imaginary part of real input" | RealArrayElem (Output, k) -> unparse_index real_output_name real_output_stride k | ImagArrayElem (Output, k) -> failwith "trying to access imaginary part of real output" | x -> default_unparser x let make_realodd_unparser (input_name, input_stride) (imag_output_name, imag_output_stride) = function | RealArrayElem (Input, k) -> unparse_index input_name input_stride (k - 1) | ImagArrayElem (Input, _) -> failwith "trying to access imaginary part of real input" | RealArrayElem (Output, k) -> failwith "trying to access real part of imaginary output" | ImagArrayElem (Output, k) -> unparse_index imag_output_name imag_output_stride (k - 1) | x -> default_unparser x let make_realodd2_unparser (input_name, input_stride) (imag_output_name, imag_output_stride) = function | RealArrayElem (Input, k) -> unparse_index input_name input_stride k | ImagArrayElem (Input, _) -> failwith "trying to access imaginary part of real input" | RealArrayElem (Output, k) -> failwith "trying to access real part of imaginary output" | ImagArrayElem (Output, k) -> unparse_index imag_output_name imag_output_stride (k - 1) | x -> default_unparser x let make_mp3dct_unparser (input_name, input_stride) (real_output_name, real_output_stride) = function | RealArrayElem (Input, k) -> unparse_index input_name input_stride k | ImagArrayElem (Input, _) -> failwith "trying to access imaginary part of real input" | RealArrayElem (Output, k) -> unparse_index real_output_name real_output_stride k | ImagArrayElem (Output, k) -> failwith "trying to access imaginary part of real output" | x -> default_unparser x fftw-2.1.5/gensrc/variable.mli0000644000175400001440000000500507637531662011736 (* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *) (* $Id: variable.mli,v 1.20 2003/03/16 23:43:46 stevenj Exp $ *) type variable val make_temporary : unit -> variable val clobbers : variable -> variable -> bool val real_imag : variable -> variable -> bool val increasing_indices : variable -> variable -> bool val access_input : int -> variable * variable val access_output : int -> variable * variable val access_twiddle : int -> variable * variable val same : 'a -> 'a -> bool val similar : variable -> variable -> bool val hash : variable -> int val is_temporary : variable -> bool val is_output : variable -> bool val is_input : variable -> bool val is_twiddle : variable -> bool val make_named : string -> variable val make_unparser : string * string option -> string * string option -> string * string option -> variable -> string val make_real2hc_unparser : string * string option -> string * string option -> string * string option -> variable -> string val make_realeven_unparser : string * string option -> string * string option -> variable -> string val make_realodd_unparser : string * string option -> string * string option -> variable -> string val make_realodd2_unparser : string * string option -> string * string option -> variable -> string val make_hc2real_unparser : string * string option -> string * string option -> string * string option -> variable -> string val make_hc2hc_forward_unparser : int -> string * string option -> string * string option -> string * string option -> variable -> string val make_hc2hc_backward_unparser : int -> string * string option -> string * string option -> string * string option -> variable -> string fftw-2.1.5/gensrc/.#rconfig_prelude.1.30000644000175400001440000000231707637531662013164 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* rconfig.c -- this file contains all the real-complex codelets the system knows about */ #include "fftw-int.h" #include "rfftw.h" #define NOTW_CODELET(x) \ &fftw_real2hc_##x##_desc #define NOTWI_CODELET(x) \ &fftw_hc2real_##x##_desc #define TWIDDLE_CODELET(x) \ &fftw_hc2hc_forward_##x##_desc #define TWIDDLEI_CODELET(x) \ &fftw_hc2hc_backward_##x##_desc /* automatically-generated list of codelets */ fftw-2.1.5/matlab/0002777000175400001440000000000007637531662007513 5fftw-2.1.5/matlab/Makefile0000644000175400001440000000026107637531662011064 all: fftw.mex # This variable should be set to the directory containing # libfftw.a and fftw.h: FFTWDIR = ../fftw fftw.mex: mex fftw.c -I${FFTWDIR} -L${FFTWDIR}/.libs -lfftw fftw-2.1.5/matlab/README0000644000175400001440000000707307637531662010314 FFTW for MATLAB http://www.fftw.org This directory contains files that allow you to call FFTW from MATLAB (instead of MATLAB's own FFT functions). This is accomplished by means of a "MEX" program--a MATLAB external function--that wraps around the FFTW library. NOTE: you must have MATLAB 5.0 or later to use these routines. Once you have compiled and installed the MEX (see below), using FFTW from within MATLAB is simple: The forward transform: b = fftw(a,-1) The backwards transform: c = fftw(b,+1) Note that FFTW computes the unnormalized DFT, so "c" in the above code is a scaled version of the original "a". (To get back the original "a", you would compute: c / prod(size(c)).) To get help on using FFTW in MATLAB, simply type "help fftw" at the MATLAB prompt. There are a few points that you should be aware of: * The first call is expensive: The first time you call FFTW from within MATLAB, it performs expensive one-time computations. (It is figuring out a "plan"--see the FFTW manual for more information on what is happening.) So, the first FFT you compute is slow (it probably takes several seconds). However, subsequent transforms of the same size will reuse the initial computations, and will be quite fast (often 2-3 times as fast as MATLAB's built-in FFT). So, you should use FFTW within MATLAB when you are computing many FFTs of the same size and the initial cost is unimportant. If you just need a single FFT, use MATLAB's built-in routines. To reduce the startup cost, at some slight penalty in performance, replace FFTW_MEASURE in fftw.c with FFTW_ESTIMATE. * Small transforms are inefficient: There is a certain amount of overhead involved in calling FFTW from MATLAB, and this makes small transforms relatively inefficient. So, if you are doing very small transforms in MATLAB, you might be better off with the built-in routines. (The exact point at which FFTW begins to win will depend upon your machine. It is simple for you to use MATLAB's timing routines to find out what is best in your application.) (One of the major costs is in translating the array from MATLAB's representation, in which real and imaginary parts are stored separately, to FFTW's representation, in which complex numbers are stored as adjacent real/imaginary pairs.) * FFTW computes multi-dimensional transforms: The FFTW call in MATLAB computes a transform of the same dimensionality as the matrix that you give it. Thus, it is analogous to the "fftn" routine in MATLAB, rather than the "fft" routine. * All transforms are out-of-place: Although the FFTW library is capable of performing in-place multi-dimensional transforms, the MATLAB routine is out-of-place. This is simply a restriction of the environment--as far as we can tell, we are not allowed to modify the inputs that are passed to us, and must return our results in a separate array. ********************************************************************** Installation Installation of the FFTW MEX routines is straightforward. First, you have to compile the FFTW library (see the FFTW manual). Then, you must compile the file fftw.c in this directory using the MEX compilation procedure on your machine. Finally, you take the MEX file that is produced, along with the fftw.m file in this directory, and install them wherever you typically put your MATLAB scripts. The method for compiling MEX files should be described in your MATLAB manual. (You will need to link with the FFTW library that you had compiled earlier.) On UNIX systems, you can simply type "make", and the Makefile in this directory should do the right thing. fftw-2.1.5/matlab/fftw.c0000644000175400001440000002463507637531662010551 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include "fftw.h" #include "mex.h" /**************************************************************************/ /* MEX programs need to use special memory allocation routines, so we use the hooks provided by FFTW to ensure that MEX allocation is used: */ void *fftw_mex_malloc_hook(size_t n) { void *buf; buf = mxMalloc(n); /* Call this routine so that we can retain allocations and data between calls to the FFTW MEX: */ mexMakeMemoryPersistent(buf); return buf; } void fftw_mex_free_hook(void *buf) { mxFree(buf); } void install_fftw_hooks(void) { fftw_malloc_hook = fftw_mex_malloc_hook; fftw_free_hook = fftw_mex_free_hook; } /**************************************************************************/ /* We retain various information between calls to the FFTW MEX in order to maximize performance. (Reusing plans, data, and allocated blocks where possible.) This information is referenced by the following variables, which are initialized in the function initialize_fftw_mex_data. */ #define MAX_RANK 10 int first_call = 1; /* 1 if this is the first call to the FFTW MEX, and nothing has been initialized yet. 0 otherwise. */ /* Keep track of the array dimensions that stored data (below) is for. When these dimensions changed, we have to recompute the plans, work arrays, etc. */ int cur_rank = 0, /* rank of the array */ cur_dims[MAX_RANK], /* dimensions */ cur_N; /* product of the dimensions */ /* Work arrays. MATLAB stores complex numbers as separate real/imag. arrays, so we have to translate into our format before the FFT. In case allocation is slow, we retain these work arrays between calls so that they can be reused. */ fftw_complex *input_work = 0, *output_work = 0; /* The number of floating point operations required for the FFT. (Starting with FFTW 1.3, an exact count is computed by the planner.) This is used to update MATLAB's flops count. */ int fftw_mex_flops = 0, ifftw_mex_flops = 0; /* Plans. These are computed once and then reused as long as the dimensions of the array don't changed. At any point in time, at most two plans are cached: a forward and backwards plan, either for one- or multi-dimensional transforms. */ fftw_plan p = 0, ip = 0; fftwnd_plan pnd = 0, ipnd = 0; /**************************************************************************/ int compute_fftw_mex_flops(fftw_direction dir) { #ifdef FFTW_HAS_COUNT_PLAN_OPS /* this feature will be in FFTW 1.3 */ fftw_op_count ops; if (dir == FFTW_FORWARD) { if (cur_rank == 1) fftw_count_plan_ops(p,&ops); else fftwnd_count_plan_ops(pnd,&ops); } else { if (cur_rank == 1) fftw_count_plan_ops(ip,&ops); else fftwnd_count_plan_ops(ipnd,&ops); } return (ops.fp_additions + ops.fp_multiplications); #else return 0; #endif } /**************************************************************************/ /* The following functions destroy and/or initialize the data that FFTW-MEX caches between calls. */ void destroy_fftw_mex_data(void) { if (output_work != input_work) fftw_free(output_work); if (input_work) fftw_free(input_work); if (p) fftw_destroy_plan(p); if (pnd) fftwnd_destroy_plan(pnd); if (ip) fftw_destroy_plan(ip); if (ipnd) fftwnd_destroy_plan(ipnd); cur_rank = 0; input_work = output_work = 0; ip = p = 0; ipnd = pnd = 0; } /* This function is called when MATLAB exits or the MEX file is cleared, in which case we want to dispose of all data and free any allocated blocks. */ void fftw_mex_exit_function(void) { if (!first_call) { destroy_fftw_mex_data(); fftw_forget_wisdom(); first_call = 1; } } #define MAGIC(x) #x #define STRINGIZE(x) MAGIC(x) /* Initialize the cached data each time the MEX file is called. First, we check if we have previously computed plans and data for these array dimensions. Only if the dimensions have changed since the last call must we recompute the plans, etc. */ void initialize_fftw_mex_data(int rank, const int *dims, fftw_direction dir) { int new_plan = 0; if (first_call) { /* The following things need only be done once: */ install_fftw_hooks(); mexAtExit(fftw_mex_exit_function); first_call = 0; } if (rank == 1) { if (cur_rank != 1 || cur_dims[0] != dims[0]) { destroy_fftw_mex_data(); cur_rank = 1; cur_dims[0] = cur_N = dims[0]; input_work = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * cur_N); output_work = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * cur_N); new_plan = 1; } else if (dir == FFTW_FORWARD && !p || dir == FFTW_BACKWARD && !ip) new_plan = 1; if (new_plan) { if (dir == FFTW_FORWARD) { p = fftw_create_plan(cur_N,dir, FFTW_MEASURE | FFTW_USE_WISDOM); fftw_mex_flops = compute_fftw_mex_flops(dir); } else { ip = fftw_create_plan(cur_N,dir, FFTW_MEASURE | FFTW_USE_WISDOM); ifftw_mex_flops = compute_fftw_mex_flops(dir); } } } else { int same_dims = 1, dim; if (cur_rank == rank) for (dim = 0; dim < rank && same_dims; ++dim) same_dims = (cur_dims[dim] == dims[rank-1-dim]); else same_dims = 0; if (!same_dims) { if (rank > MAX_RANK) mexErrMsgTxt("Sorry, dimensionality > " STRINGIZE(MAX_RANK) " is not supported."); destroy_fftw_mex_data(); cur_rank = rank; cur_N = 1; for (dim = 0; dim < rank; ++dim) cur_N *= (cur_dims[dim] = dims[rank-1-dim]); input_work = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * cur_N); output_work = input_work; new_plan = 1; } else if (dir == FFTW_FORWARD && !pnd || dir == FFTW_BACKWARD && !ipnd) new_plan = 1; if (new_plan) { if (dir == FFTW_FORWARD) { pnd = fftwnd_create_plan(rank,cur_dims,dir, FFTW_IN_PLACE | FFTW_MEASURE | FFTW_USE_WISDOM); fftw_mex_flops = compute_fftw_mex_flops(dir); } else { ipnd = fftwnd_create_plan(rank,cur_dims,dir, FFTW_IN_PLACE | FFTW_MEASURE | FFTW_USE_WISDOM); ifftw_mex_flops = compute_fftw_mex_flops(dir); } } } } /**************************************************************************/ /* MATLAB stores complex numbers as separate arrays for real and imaginary parts. The following functions take the data in this format and pack it into a fftw_complex work array, or unpack it, respectively. The globals input_work and output_work are used as the arrays to pack to/unpack from.*/ void pack_input_work(double *input_re, double *input_im) { int i; if (input_im) for (i = 0; i < cur_N; ++i) { c_re(input_work[i]) = input_re[i]; c_im(input_work[i]) = input_im[i]; } else for (i = 0; i < cur_N; ++i) { c_re(input_work[i]) = input_re[i]; c_im(input_work[i]) = 0.0; } } void unpack_output_work(double *output_re, double *output_im) { int i; for (i = 0; i < cur_N; ++i) { output_re[i] = c_re(output_work[i]); output_im[i] = c_im(output_work[i]); } } /**************************************************************************/ /* The following function is called by MATLAB when the FFTW MEX is invoked from within the program. The rhs parameters are the list of arrays on the right-hand-side (rhs) of the MATLAB command--the arguments to FFTW. The lhs parameters are the list of arrays on the left-hand-side (lhs) of the MATLAB command--these are what the output(s) of FFTW are assigned to. The syntax for the FFTW call in MATLAB is fftw(array,sign), as described in fftw.m */ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { int rank; const int *dims; int m, n; /* Array is m x n, C-ordered */ fftw_direction dir; if (nrhs != 2) mexErrMsgTxt("Two input arguments are expected."); if (!mxIsDouble(prhs[0])) mexErrMsgTxt("First input must be a double precision matrix."); if (mxIsSparse(prhs[0])) mexErrMsgTxt("Sorry, sparse matrices are not currently supported."); if (mxGetM(prhs[1]) * mxGetN(prhs[1]) != 1) mexErrMsgTxt("Second input must be a scalar (+/- 1)."); if (mxGetScalar(prhs[1]) > 0.0) dir = FFTW_BACKWARD; else dir = FFTW_FORWARD; if ((rank = mxGetNumberOfDimensions(prhs[0])) == 2) { int dims2[2]; m = mxGetM(prhs[0]); n = mxGetN(prhs[0]); if (m == 1 || n == 1) { dims2[0] = m * n; initialize_fftw_mex_data(1,dims2,dir); } else { dims2[0] = m; dims2[1] = n; initialize_fftw_mex_data(2,dims2,dir); } } else initialize_fftw_mex_data(rank,dims = mxGetDimensions(prhs[0]),dir); pack_input_work(mxGetPr(prhs[0]),mxGetPi(prhs[0])); if (dir == FFTW_FORWARD) { if (cur_rank == 1) fftw(p,1, input_work,1,0, output_work,1,0); else fftwnd(pnd,1, input_work,1,0, 0,0,0); mexAddFlops(fftw_mex_flops); } else { if (cur_rank == 1) fftw(ip,1, input_work,1,0, output_work,1,0); else fftwnd(ipnd,1, input_work,1,0, 0,0,0); mexAddFlops(ifftw_mex_flops); } /* Create a matrix for the return argument. */ if (cur_rank <= 2) plhs[0] = mxCreateDoubleMatrix(m, n, mxCOMPLEX); else plhs[0] = mxCreateNumericArray(rank,dims, mxDOUBLE_CLASS,mxCOMPLEX); unpack_output_work(mxGetPr(plhs[0]),mxGetPi(plhs[0])); } fftw-2.1.5/matlab/fftw.m0000644000175400001440000000200007637531662010541 function y = fftw(x,sign) %FFTW Discrete Fourier transform (DFT) % Y = FFTW(X,SIGN) sets Y to the DFT of X, computed via a % fast Fourier transform algorithm. SIGN is the sign of the % exponent in the definition of the DFT, and should be +1 or -1. % % FFTW is designed for circumstances where repeated transforms % of the same size are required. The first call will incur a % substantial startup cost (several seconds), but subsequent % calls will execute very quickly. % % Using SIGN = -1 corresponds to MATLAB's FFTN function. % Using SIGN = +1 corresponds to an unnormalized IFFTN: % % FFTW(X,+1) is the same as IFFTN(X) * PROD(SIZE(X)) % % Thus, FFTW(FFTW(X,-1),+1) / PROD(SIZE(X)) equals X. % % The input array X may have any dimensionality. If X % is multi-dimensional, then a true multi-dimensional DFT % will be computed. % % This is an interface to the FFTW C library, which is % described at: http://www.fftw.org % % See also: FFT, IFFT, FFT2, IFFT2, FFTN, IFFTN, FFTSHIFT fftw-2.1.5/cilk/0002777000175400001440000000000007637531662007175 5fftw-2.1.5/cilk/Makefile0000644000175400001440000000273007637531662010551 FFTWDIR = ../fftw FFTW_INCLUDE = -I$(FFTWDIR) FFTW_CILK_OBJ = executor_cilk.o fftwnd_cilk.o LIBFFTW_CILK = libfftw_cilk.a CILK = cilk LIBS = -L../fftw/.libs -lfftw -lm # Set where you want to install the library for "make install" prefix = /usr/local LIBDIR = $(prefix)/lib INCLUDEDIR = $(prefix)/include # On systems that have ranlib: RANLIB = ranlib # On systems that don't have ranlib # RANLIB = echo ranlib all: $(LIBFFTW_CILK) tests: test_cilk time_cilk RM = rm clean: $(RM) -f *.o core a.out *~ *.s *.bak distclean: clean $(RM) -f $(LIBFFTW_CILK) test_cilk time_cilk *.out ####################### Cilk Libraries, etc. #################### HEADERS = $(FFTWDIR)/fftw.h fftw_cilk.cilkh CILKCFLAGS = $(FFTW_INCLUDE) $(CFLAGS) -O6 -DFFTW_USING_CILK ###################### Building fftw_cilk ####################### AR = ar %.o: %.cilk $(HEADERS) Makefile $(CILK) $(CILKCFLAGS) -c $< -o $@ %.s: %.c $(HEADERS) Makefile $(CILK) $(CILKCFLAGS) -S $< -o $@ $(LIBFFTW_CILK): $(FFTW_CILK_OBJ) $(RM) -f $(LIBFFTW_CILK) $(AR) rv $(LIBFFTW_CILK) $(FFTW_CILK_OBJ) $(RANLIB) $(LIBFFTW_CILK) install: $(LIBFFTW_CILK) $(CP) $(LIBFFTW_CILK) $(LIBDIR) $(RANLIB) $(LIBDIR)/$(LIBFFTW_CILK) $(CP) fftw_cilk.cilkh $(INCLUDEDIR) test_cilk: test_cilk.o $(LIBFFTW_CILK) $(CILK) $(LDFLAGS) test_cilk.o \ $(LIBFFTW_CILK) $(LIBS) -o test_cilk time_cilk: time_cilk.o $(LIBFFTW_CILK) $(CILK) $(LDFLAGS) time_cilk.o \ $(LIBFFTW_CILK) $(LIBS) -o time_cilk fftw-2.1.5/cilk/README0000644000175400001440000000573007637531662007774 Parallel FFTW for Cilk This directory contains routines for doing parallel transforms in one or more dimensions on machines with the Cilk language and runtime. Cilk is a superset of C that allows easy creation of efficient parallel programs. More information on Cilk can be found at the Cilk homepage: http://supertech.lcs.mit.edu/cilk ----------------------------------------------------------------------- Installation: Typing "make" will create the libfftw_cilk.a library. Before doing this, you must have built the libfftw.a library in the fftw/ directory, and all the object files must still be in that directory! "make tests" will generate two programs, test_cilk and time_cilk, which test the subroutines for correctness and benchmark them against the uniprocessor versions, respectively. The outputs of time_cilk are the times in microseconds / n lg n for a single transform. "make install" will install the libfftw_cilk.a library and the fftw_cilk.cilh header file in the locations specified by the prefix, LIBDIR, and INCLUDEDIR Makefile variables. You will probably have to modify the Makefile to reflect the location of Cilk on your machine. The software was developed under Cilk-5. It may work under Cilk-4, but no guarantees are provided. ----------------------------------------------------------------------- Usage: The usage is nearly identical to that of the uniprocessor FFTW. * Before doing any transforms, you must create plans via fftw_create_plan or fftwnd_create_plan. (The plans are of the same type as the uniprocessor plans, and are created by the same routines. In fact, you can use the same plan for both the uniprocessor FFTW and the Cilk FFTW.) * To perform a parallel 1D transform you call the fftw_cilk procedure, which has identical arguments to the fftw subroutine. It is a Cilk procedure, so you have to call it using spawn: spawn fftw_cilk(plan,howmany,in,istride,idist,out,ostride,odist); Be sure to perform a sync before you try to make use of the results of this procedure. * Parallel 1D transforms use the fftwnd_cilk procedure, which has the same arguments as the fftwnd subroutine: spawn fftwnd_cilk(plan,howmany,in,istride,idist,out,ostride,odist); Again, be sure to sync before using the results. ----------------------------------------------------------------------- Notes: * It is safe to spawn fftw_cilk or fftwnd_cilk multiple times in parallel using the same plan. Spawn away! * It is *not* safe to call the uniprocessor fftwnd in parallel with itself using the same plan. You have been warned. * If you use howmany > 1, fftw_cilk and fftwnd_cilk will perform the howmany transforms in parallel. It is the caller's responsibility to insure that the outputs don't overlap each other or any of the inputs, lest race conditions result. * For in-place transforms using fftw_cilk, the out parameter is ignored. (Unlike the uniprocessor case, where the out parameter can be used to specify a temporary work array.) fftw-2.1.5/cilk/executor_cilk.cilk0000644000175400001440000003065107637531662012620 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * executor_cilk.cilk -- execute the fft on a parallel machine with Cilk */ #include #include #include #include "fftw_cilk.cilkh" static cilk void parallel_twiddle_codelet(int a, int b, fftw_twiddle_codelet *codelet, fftw_complex *W, fftw_complex *out, int ostride, int dist, int ntwiddle) { if (b - a < 32) { (*codelet)(out + dist * a, W + ntwiddle * a, ostride, b - a, dist); } else { int ab = (a + b) / 2; spawn parallel_twiddle_codelet(a, ab, codelet, W, out, ostride, dist, ntwiddle); spawn parallel_twiddle_codelet(ab, b, codelet, W, out, ostride, dist, ntwiddle); sync; } } static cilk void executor_simple_cilk(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride) { switch (p->type) { case FFTW_NOTW: (*p->nodeu.notw.codelet)(in, out, istride, ostride); break; case FFTW_TWIDDLE: { int r = p->nodeu.twiddle.size; int m = n / r; int i; fftw_twiddle_codelet *codelet; fftw_complex *W; if (n < 128) { fftw_executor_simple(n, in, out, p, istride, ostride, FFTW_NORMAL_RECURSE); break; } for (i = 0; i < r; ++i) spawn executor_simple_cilk(m, in + i * istride, out + i * (m * ostride), p->nodeu.twiddle.recurse, istride * r, ostride); sync; codelet = p->nodeu.twiddle.codelet; W = p->nodeu.twiddle.tw->twarray; spawn parallel_twiddle_codelet(0, m, codelet, W, out, m * ostride, ostride, p->nodeu.twiddle.codelet_desc->ntwiddle); sync; break; } case FFTW_GENERIC: { int r = p->nodeu.generic.size; int m = n / r; int i; fftw_generic_codelet *codelet; fftw_complex *W; for (i = 0; i < r; ++i) spawn executor_simple_cilk(m, in + i * istride, out + i * (m * ostride), p->nodeu.generic.recurse, istride * r, ostride); sync; codelet = p->nodeu.generic.codelet; W = p->nodeu.generic.tw->twarray; (*codelet)(out, W, m, r, n, ostride); break; } case FFTW_RADER: { int r = p->nodeu.rader.size; int m = n / r; int i; fftw_rader_codelet *codelet; fftw_complex *W; for (i = 0; i < r; ++i) { spawn executor_simple_cilk(m, in + i * istride, out + i * (m * ostride), p->nodeu.rader.recurse, istride * r, ostride); } sync; codelet = p->nodeu.rader.codelet; W = p->nodeu.rader.tw->twarray; (*codelet)(out, W, m, r, ostride, p->nodeu.rader.rader_data); break; } default: fftw_die("BUG in executor: illegal plan\n"); break; } } static cilk void executor_simple_inplace_cilk(int n, fftw_complex *in, fftw_plan_node *p, int istride) { switch (p->type) { case FFTW_NOTW: (*p->nodeu.notw.codelet) (in, in, istride, istride); break; default: { fftw_complex *tmp; tmp = (fftw_complex *) Cilk_alloca(n * sizeof(fftw_complex)); spawn executor_simple_cilk(n, in, tmp, p, istride, 1); sync; fftw_strided_copy(n, tmp, istride, in); } } } #define FFTW_CILK_HOWMANY_CODELET_THRESHOLD 16 #define FFTW_CILK_HOWMANY_SIMPLE_THRESHOLD 16 typedef struct { int n; fftw_plan_node *p; fftw_notw_codelet *codelet; const fftw_complex *in; fftw_complex *out; int istride, ostride, idist, odist; } execute_howmany_data; static cilk void execute_howmany_codelets( execute_howmany_data *d, int min, int max) { if (max - min > FFTW_CILK_HOWMANY_CODELET_THRESHOLD) { spawn execute_howmany_codelets(d, min,(min+max)/2); spawn execute_howmany_codelets(d, (min+max)/2+1,max); } else { fftw_notw_codelet *codelet; const fftw_complex *in; fftw_complex *out; int istride, ostride, idist, odist; codelet = d->codelet; in = d->in; out = d->out; istride = d->istride; ostride = d->ostride; idist = d->idist; odist = d->odist; for (; min <= max; ++min) (*codelet)(in + min * idist, out + min * odist, istride, ostride); } } static cilk void execute_howmany_simple( execute_howmany_data *d, int min, int max) { if (max - min > FFTW_CILK_HOWMANY_SIMPLE_THRESHOLD) { spawn execute_howmany_simple(d, min,(min+max)/2); spawn execute_howmany_simple(d, (min+max)/2+1,max); } else { int n; const fftw_complex *in; fftw_complex *out; fftw_plan_node *p; int idist, odist, istride, ostride; n = d->n; p = d->p; in = d->in; out = d->out; istride = d->istride; ostride = d->ostride; idist = d->idist; odist = d->odist; for (; min <= max; ++min) fftw_executor_simple(n, in + min*idist, out + min*odist, p, istride, ostride, FFTW_NORMAL_RECURSE); } } static cilk void executor_many_cilk(int n, const fftw_complex *in, fftw_complex *out, fftw_plan_node *p, int istride, int ostride, int howmany, int idist, int odist) { switch (p->type) { case FFTW_NOTW: { execute_howmany_data d; d.codelet = p->nodeu.notw.codelet; d.in = in; d.out = out; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; spawn execute_howmany_codelets(&d,0,howmany-1); break; } default: { execute_howmany_data d; d.n = n; d.p = p; d.in = in; d.out = out; d.istride = istride; d.ostride = ostride; d.idist = idist; d.odist = odist; spawn execute_howmany_simple(&d,0,howmany-1); } } } static cilk void execute_howmany_codelets_in_place( execute_howmany_data *d, int min, int max) { if (max - min > FFTW_CILK_HOWMANY_CODELET_THRESHOLD) { spawn execute_howmany_codelets_in_place(d, min,(min+max)/2); spawn execute_howmany_codelets_in_place(d, (min+max)/2+1,max); } else { fftw_notw_codelet *codelet; const fftw_complex *in; int istride, idist; codelet = d->codelet; in = d->in; istride = d->istride; idist = d->idist; for (; min <= max; ++min) (*codelet)(in + min * idist, (fftw_complex *)in + min * idist, istride, istride); } } static cilk void execute_howmany_simple_in_place( execute_howmany_data *d, int min, int max) { if (max - min > FFTW_CILK_HOWMANY_SIMPLE_THRESHOLD) { spawn execute_howmany_simple_in_place(d, min,(min+max)/2); spawn execute_howmany_simple_in_place(d, (min+max)/2+1,max); } else { int n; fftw_complex *in; fftw_complex *tmp; int istride, idist; fftw_plan_node *p; n = d->n; p = d->p; in = (fftw_complex *)d->in + min * (idist = d->idist); istride = d->istride; tmp = d->out + n * Self; for (; min <= max; ++min) { fftw_executor_simple(n, in, tmp, p, istride, 1, FFTW_NORMAL_RECURSE); fftw_strided_copy(n, tmp, istride, in); in += idist; } } } static cilk void executor_many_inplace_cilk(int n, fftw_complex *in, fftw_plan_node *p, int istride, int howmany, int idist) { switch (p->type) { case FFTW_NOTW: { execute_howmany_data d; d.codelet = p->nodeu.notw.codelet; d.in = in; d.istride = istride; d.idist = idist; spawn execute_howmany_codelets_in_place(&d,0,howmany-1); break; } default: { execute_howmany_data d; d.n = n; d.p = p; d.in = in; d.istride = istride; d.idist = idist; d.out = (fftw_complex *) Cilk_alloca(Cilk_active_size * n * sizeof(fftw_complex)); spawn execute_howmany_simple_in_place(&d,0,howmany-1); } } } /* user interface */ cilk void fftw_cilk(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { int n = plan->n; if (plan->flags & FFTW_IN_PLACE) { if (howmany == 1) { spawn executor_simple_inplace_cilk(n, in, plan->root, istride); } else { spawn executor_many_inplace_cilk(n, in, plan->root, istride, howmany, idist); } } else { if (howmany == 1) { spawn executor_simple_cilk(n, in, out, plan->root, istride, ostride); } else { spawn executor_many_cilk(n, in, out, plan->root, istride, ostride, howmany, idist, odist); } } } fftw-2.1.5/cilk/fftw_cilk.cilkh0000644000175400001440000000232707637531662012077 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include extern cilk void fftw_cilk(fftw_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); extern cilk void fftwnd_cilk(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist); fftw-2.1.5/cilk/fftwnd_cilk.cilk0000644000175400001440000002451107637531662012250 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* fftwnd_cilk.cilk: ND transform on parallel machines with Cilk */ #include #include #include "fftw_cilk.cilkh" /* Prototypes for functions used internally in this file: */ static cilk void fftw2d_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride); static cilk void fftw3d_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride); static cilk void fftwnd_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride); static cilk void fftw2d_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride); static cilk void fftw3d_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride); static cilk void fftwnd_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride); /************** Computing the N-Dimensional FFT in Parallel **************/ cilk void fftwnd_cilk(fftwnd_plan plan, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist) { int fft_iter; /* Put the howmany loop here. Yes, this has more overhead than moving it farther down would be, but for N-dimensional transforms this shouldn't matter too much (since each transform should be much more expensive than these little switch statements and subroutine calls). */ /* Nota bene: This assumes that the outputs of the different FFT's in the howmany loop are non-overlapping! (ergo they can be done in parallel). */ /* PS. I didn't use divide & conquer for this loop; it may result in a long critical path if howmany is large (in most cases, however, howmany will probably be small, unlike for the 1D transform which is used in the ND transform). */ for (fft_iter = 0; fft_iter < howmany; ++fft_iter) { if (plan->is_in_place) /* fft is in-place */ switch (plan->rank) { case 0: break; case 1: spawn fftw_cilk(plan->plans[0], 1, in, istride, 0, 0, 0, 0); break; case 2: spawn fftw2d_in_place_aux_cilk(plan, in, istride); break; case 3: spawn fftw3d_in_place_aux_cilk(plan, in, istride); break; default: spawn fftwnd_in_place_aux_cilk(plan, in, istride); } else { if (in == out || out == 0) fftw_die("Illegal attempt to perform in-place FFT!\n"); switch (plan->rank) { case 0: break; case 1: spawn fftw_cilk(plan->plans[0], 1, in, istride, 0, out, ostride, 0); break; case 2: spawn fftw2d_out_of_place_aux_cilk(plan, in, istride, out, ostride); break; case 3: spawn fftw3d_out_of_place_aux_cilk(plan, in, istride, out, ostride); break; default: spawn fftwnd_out_of_place_aux_cilk(plan, in, istride, out, ostride); } } in += idist; out += odist; } } typedef struct { fftw_plan p; int howmany; fftw_complex *in; int istride, idist; int aux_dist; } fftw_many_in_place_aux_data; static cilk void fftw_many_in_place_aux(fftw_many_in_place_aux_data *d, int min, int max) { if (max - min > 0) { spawn fftw_many_in_place_aux(d,min,(min+max)/2); spawn fftw_many_in_place_aux(d,(min+max)/2+1,max); } else if (max - min == 0) { spawn fftw_cilk(d->p, d->howmany, d->in + min * d->aux_dist, d->istride, d->idist, 0,0,0); } } static cilk void fftw2d_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan p0, p1; int n0, n1; p0 = p->plans[0]; p1 = p->plans[1]; n0 = p->n[0]; n1 = p->n[1]; /* FFT y dimension (out-of-place): */ spawn fftw_cilk(p1, n0, in, istride, n1 * istride, out, ostride, n1 * ostride); sync; /* FFT x dimension (in-place): */ spawn fftw_cilk(p0, n1, out, n1 * ostride, ostride, 0, 0, 0); } static cilk void fftw3d_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride) { fftw_plan p0, p1, p2; int n0, n1, n2; p0 = p->plans[0]; p1 = p->plans[1]; p2 = p->plans[2]; n0 = p->n[0]; n1 = p->n[1]; n2 = p->n[2]; /* FFT z dimension (out-of-place): */ spawn fftw_cilk(p2, n0 * n1, in, istride, n2 * istride, out, ostride, n2 * ostride); /* FFT y dimension (in-place): */ { fftw_many_in_place_aux_data d; sync; d.p = p1; d.howmany = n2; d.in = out; d.istride = n2*ostride; d.idist = ostride; d.aux_dist = n1*n2*ostride; spawn fftw_many_in_place_aux(&d,0,n0-1); } sync; /* FFT x dimension (in-place): */ spawn fftw_cilk(p0, n1 * n2, out, n1 * n2 * ostride, ostride, 0, 0, 0); } static cilk void fftwnd_out_of_place_aux_cilk(fftwnd_plan p, fftw_complex *in, int istride, fftw_complex *out, int ostride) { int j; /* Do FFT for rank > 3: */ /* do last dimension (out-of-place): */ spawn fftw_cilk(p->plans[p->rank - 1], p->n_before[p->rank - 1], in, istride, p->n[p->rank - 1] * istride, out, ostride, p->n[p->rank - 1] * ostride); sync; /* do first dimension (in-place): */ spawn fftw_cilk(p->plans[0], p->n_after[0], out, p->n_after[0] * ostride, ostride, 0, 0, 0); /* do other dimensions (in-place): */ for (j = 1; j < p->rank - 1; ++j) { fftw_many_in_place_aux_data d; sync; d.p = p->plans[j]; d.howmany = p->n_after[j]; d.in = out; d.istride = p->n_after[j]*ostride; d.idist = ostride; d.aux_dist = ostride * p->n[j] * p->n_after[j]; spawn fftw_many_in_place_aux(&d,0,p->n_before[j]-1); } } static cilk void fftw2d_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride) { fftw_plan p0, p1; int n0, n1; p0 = p->plans[0]; p1 = p->plans[1]; n0 = p->n[0]; n1 = p->n[1]; /* FFT y dimension: */ spawn fftw_cilk(p1, n0, in_out, istride, istride * n1, 0, 0, 0); sync; /* FFT x dimension: */ spawn fftw_cilk(p0, n1, in_out, istride * n1, istride, 0, 0, 0); } static cilk void fftw3d_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride) { fftw_plan p0, p1, p2; int n0, n1, n2; p0 = p->plans[0]; p1 = p->plans[1]; p2 = p->plans[2]; n0 = p->n[0]; n1 = p->n[1]; n2 = p->n[2]; /* FFT z dimension: */ spawn fftw_cilk(p2, n0 * n1, in_out, istride, n2 * istride, 0, 0, 0); /* FFT y dimension: */ { fftw_many_in_place_aux_data d; sync; d.p = p1; d.howmany = n2; d.in = in_out; d.istride = n2*istride; d.idist = istride; d.aux_dist = n1*n2*istride; spawn fftw_many_in_place_aux(&d,0,n0-1); } sync; /* FFT x dimension: */ spawn fftw_cilk(p0, n1 * n2, in_out, n1 * n2 * istride, istride, 0, 0, 0); } static cilk void fftwnd_in_place_aux_cilk(fftwnd_plan p, fftw_complex *in_out, int istride) /* Do FFT for rank > 3: */ { int j; /* do last dimension: */ spawn fftw_cilk(p->plans[p->rank - 1], p->n_before[p->rank - 1], in_out, istride, p->n[p->rank - 1] * istride, 0, 0, 0); sync; /* do first dimension: */ spawn fftw_cilk(p->plans[0], p->n_after[0], in_out, p->n_after[0] * istride, istride, 0, 0, 0); /* do other dimensions: */ for (j = 1; j < p->rank - 1; ++j) { fftw_many_in_place_aux_data d; sync; d.p = p->plans[j]; d.howmany = p->n_after[j]; d.in = in_out; d.istride = p->n_after[j]*istride; d.idist = istride; d.aux_dist = istride * p->n[j] * p->n_after[j]; spawn fftw_many_in_place_aux(&d,0,p->n_before[j]-1); } } fftw-2.1.5/cilk/test_cilk.cilk0000644000175400001440000003314607637531662011743 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* $Id: test_cilk.cilk,v 1.11 2003/03/16 23:43:46 stevenj Exp $ */ #include #include #include #include #include #include "fftw_cilk.cilkh" /* Maximum array sizes in test gets multiplied by this. Change it to a bigger number (e.g. 10) if you want to run bigger tests and have enough memory. */ #define SIZE_MULT 4 #ifndef RAND_MAX #define RAND_MAX 32767 #endif #define NUM_ITER 20 #define USE_RANDOM 1 /* use superior random() function instead of rand() */ #if USE_RANDOM #define rand random #define srand srandom #define RANDOM_MAX 2147483647 #else #define RANDOM_MAX RAND_MAX #endif extern cilk void test_fft(int rank, int istride, int ostride, long max_size, long num_iters, short in_place, fftw_direction dir); cilk int main(int argc, char **argv) { srand(clock()); /* Test forward transforms: */ sync; spawn test_fft(1, 1, 1, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(1, 1, 1, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(2, 1, 1, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(2, 1, 1, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(3, 1, 1, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(3, 1, 1, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(4, 1, 1, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(4, 1, 1, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(5, 1, 1, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(5, 1, 1, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(1, 2, 3, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(1, 2, 3, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(2, 2, 3, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(2, 2, 3, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(3, 2, 3, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(3, 2, 3, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(4, 2, 3, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(4, 2, 3, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(5, 2, 3, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(5, 2, 3, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(1, 3, 2, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(1, 3, 2, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(2, 3, 2, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(2, 3, 2, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(3, 3, 2, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(3, 3, 2, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(4, 3, 2, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(4, 3, 2, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(5, 3, 2, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(5, 3, 2, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(1, 3, 3, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(1, 3, 3, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(2, 3, 3, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(2, 3, 3, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(3, 3, 3, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(3, 3, 3, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(4, 3, 3, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(4, 3, 3, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); sync; spawn test_fft(5, 3, 3, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_FORWARD); sync; spawn test_fft(5, 3, 3, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_FORWARD); /* Test backward transforms */ sync; spawn test_fft(1, 1, 1, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(1, 1, 1, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(2, 1, 1, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(2, 1, 1, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(3, 1, 1, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(3, 1, 1, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(4, 1, 1, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(4, 1, 1, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(5, 1, 1, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(5, 1, 1, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(1, 2, 3, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(1, 2, 3, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(2, 2, 3, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(2, 2, 3, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(3, 2, 3, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(3, 2, 3, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(4, 2, 3, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(4, 2, 3, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(5, 2, 3, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(5, 2, 3, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(1, 3, 2, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(1, 3, 2, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(2, 3, 2, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(2, 3, 2, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(3, 3, 2, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(3, 3, 2, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(4, 3, 2, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(4, 3, 2, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(5, 3, 2, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(5, 3, 2, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(1, 3, 3, 64 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(1, 3, 3, 64 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(2, 3, 3, 32 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(2, 3, 3, 32 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(3, 3, 3, 10 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(3, 3, 3, 10 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(4, 3, 3, 4 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(4, 3, 3, 4 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); sync; spawn test_fft(5, 3, 3, 2 * SIZE_MULT, NUM_ITER, 0, FFTW_BACKWARD); sync; spawn test_fft(5, 3, 3, 2 * SIZE_MULT, NUM_ITER, 1, FFTW_BACKWARD); return 0; } #define MAX_RANK 10 #define CLOSE(a,b) (fabs((a) - (b))*2.0/(fabs(a)+fabs(b)+0.1) < 1e-3) int factors_ok(long num); cilk void test_fft(int rank, int istride, int ostride, long max_size, long num_iters, short in_place, fftw_direction dir) { int dims[MAX_RANK]; long dims_reverse[MAX_RANK]; fftw_real *a1, *a2, *a3; long i, j; int howmany; long n_total, iter; fftwnd_plan plan, seq_plan; if (rank > MAX_RANK || rank < 1) return; if (in_place) printf("TESTING RANK %d, stride %d/%d, sign %+d (in-place fftwnd)...\n", rank, istride, ostride, (int) dir); else printf("TESTING RANK %d, stride %d/%d, sign %+d (out-of-place fftwnd)...\n", rank, istride, ostride, (int) dir); for (iter = 0; iter < num_iters; ++iter) { printf(" Testing "); fflush(stdout); n_total = 1; for (i = 0; i < rank; ++i) { dims[i] = (rand() % max_size) + 1; if (i) printf("x%d", dims[i]); else printf("%d", dims[i]); dims_reverse[rank - 1 - i] = dims[i]; n_total *= dims[i]; } printf("..."); fflush(stdout); seq_plan = fftwnd_create_plan(rank,dims,dir,FFTW_ESTIMATE | FFTW_IN_PLACE); if ((rank != 2 && rank != 3) || (rand() & 1)) { if (in_place) plan = fftwnd_create_plan(rank, dims, dir, FFTW_ESTIMATE | FFTW_IN_PLACE); else plan = fftwnd_create_plan(rank, dims, dir, FFTW_ESTIMATE); } /* for rank 2 and 3 arrays, use the optional interface 1/2 the * time: */ else if (rank == 2) { printf("(opt. interface)..."); if (in_place) plan = fftw2d_create_plan(dims[0], dims[1], dir, FFTW_ESTIMATE | FFTW_IN_PLACE); else plan = fftw2d_create_plan(dims[0], dims[1], dir, FFTW_ESTIMATE); } else if (rank == 3) { printf("(opt. interface)..."); if (in_place) plan = fftw3d_create_plan(dims[0], dims[1], dims[2], dir, FFTW_ESTIMATE | FFTW_IN_PLACE); else plan = fftw3d_create_plan(dims[0], dims[1], dims[2], dir, FFTW_ESTIMATE); } if (!plan) { printf("\nError creating plan!\n"); exit(1); } a1 = malloc(n_total * 2 * sizeof(fftw_real)); a2 = malloc(n_total * 2 * sizeof(fftw_real) * istride); if (in_place) { a3 = a2; ostride = istride; } else a3 = malloc(n_total * 2 * sizeof(fftw_real) * ostride); if (!a1 || !a2 || !a3) { printf("\nERROR: Out of memory (need at least %ld bytes)\n", (n_total * 2 + n_total * 4) * sizeof(fftw_real)); exit(1); } for (i = 0; i < n_total; ++i) { a1[2 * i] = (rand() - (RANDOM_MAX >> 1)) * 2.0 / RANDOM_MAX; a1[2 * i + 1] = (rand() - (RANDOM_MAX >> 1)) * 2.0 / RANDOM_MAX; for (j = 0; j < istride; ++j) { a2[2 * (i * istride + j)] = a1[2 * i]; a2[2 * (i * istride + j) + 1] = a1[2 * i + 1]; } } howmany = istride; if (howmany > ostride) howmany = ostride; printf("fftwnd_cilk..."); fflush(stdout); /* FFT using parallelfftwnd_cilk */ spawn fftwnd_cilk(plan, howmany, (fftw_complex *) a2, istride, 1, (fftw_complex *) a3, ostride, 1); sync; printf("fftwnd..."); fflush(stdout); if (seq_plan->is_in_place != FFTW_IN_PLACE) { printf("\n\nCorrupted plan! (Illegal in-place flag.)\n"); exit(1); } /* FFT using sequential fftw */ fftwnd(seq_plan,1,(fftw_complex *) a1, 1, 1, 0, 0, 0); /* Check results: */ for (i = 0; i < n_total; ++i) for (j = 0; j < howmany; ++j) { if (!CLOSE(a1[2 * i], a3[2 * (i * ostride + j)])) { printf("error!\nFFT's different in real part at i=%ld: %g vs. %g\n", i, a1[2*i], a3[2*(i * ostride + j)]); exit(1); } if (!CLOSE(a1[2 * i + 1], a3[2 * (i * ostride + j) + 1])) { printf("error!\nFFT's different in imag. part at i=%ld: %g vs. %g\n", i, a1[2*i+1], a3[2*(i * ostride + j)+1]); exit(1); } } free(a1); free(a2); if (a3 != a2) free(a3); fftwnd_destroy_plan(plan); fftwnd_destroy_plan(seq_plan); printf("okay!\n"); fflush(stdout); fftw_check_memory_leaks(); } } fftw-2.1.5/cilk/time_cilk.cilk0000644000175400001440000001772707637531662011731 /* * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include #include #include #include #include "fftw_cilk.cilkh" #define NUM_ITER 5000000L #define N_TESTS_1D 16 #define N_TESTS_3D 9 extern void initialize_fft_data(fftw_complex * arr, long n); cilk int main(int argc, char **argv) { int n1[N_TESTS_1D] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288 }; int n3[N_TESTS_3D][3] = { { 16, 16, 16 }, { 24, 24, 24 }, { 32, 32, 32 }, { 49, 49, 49 }, { 64, 64, 64 }, { 80, 80, 80 }, {100,100,100 }, {128, 128, 128 }, {256, 256, 256 }, }; int i, test, iter, max_iter; Cilk_time start_t, end_t, init_t; fftw_complex *cin, *out; double time_scale, time1, time2; int max_size; fftw_plan plan; fftwnd_plan plan_nd; /*************** Benchmark fftw_cilk ****************/ max_size = 0; for (i = 0; i < N_TESTS_1D; ++i) if (n1[i] > max_size) max_size = n1[i]; cin = malloc(max_size * sizeof(fftw_complex)); out = malloc(max_size * sizeof(fftw_complex)); if (!cin || !out) { printf("Not enough memory! At least %d bytes needed.\n", max_size * sizeof(fftw_complex) * 2); exit(1); } printf("%15s%20s%20s%20s\n", "Array Size", "FFTW", "FFTW_CILK", "Speedup Factor"); for (test = 0; test < N_TESTS_1D; ++test) { printf("%15d", n1[test]); fflush(stdout); plan = fftw_create_plan(n1[test], FFTW_FORWARD, FFTW_MEASURE); max_iter = NUM_ITER / (n1[test] * log(2.0 * n1[test])); if (max_iter < 1) max_iter = 1; time_scale = 1.0e6 / (max_iter * (log(n1[test])/log(2.0) * n1[test])); initialize_fft_data(cin, n1[test]); start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) initialize_fft_data(cin, n1[test]); end_t = Cilk_get_wall_time(); init_t = end_t - start_t; /* Time FFTW: */ initialize_fft_data(cin, n1[test]); fftw(plan, 1, cin, 1, 0, out, 1, 0); start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) { initialize_fft_data(cin, n1[test]); fftw(plan, 1, cin, 1, 0, out, 1, 0); } end_t = Cilk_get_wall_time(); printf("%20g", time1 = Cilk_wall_time_to_sec(end_t - start_t - init_t) * time_scale); fflush(stdout); /* Time Cilk FFTW: */ initialize_fft_data(cin, n1[test]); spawn fftw_cilk(plan, 1, cin, 1, 0, out, 1, 0); sync; start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) { initialize_fft_data(cin, n1[test]); spawn fftw_cilk(plan, 1, cin, 1, 0, out, 1, 0); sync; } end_t = Cilk_get_wall_time(); printf("%20g", time2 = Cilk_wall_time_to_sec(end_t - start_t - init_t) * time_scale); printf("%20g\n",time1/time2); fflush(stdout); #if CILK_CRITICAL_PATH > 0 /* if critical path is measured */ { Cilk_time begin_work, end_work; Cilk_time begin_cp, end_cp; /* measure work and CP */ sync; begin_cp = Cilk_user_critical_path; begin_work = Cilk_user_work; spawn fftw_cilk(plan, 1, cin, 1, 0, out, 1, 0); sync; end_cp = Cilk_user_critical_path; end_work = Cilk_user_work; printf("Work = %f s\n", Cilk_time_to_sec(end_work - begin_work)); printf("Critical path = %f s\n", Cilk_time_to_sec(end_cp - begin_cp)); printf("Average parallelism = %f\n", Cilk_time_to_sec(end_work - begin_work) / Cilk_time_to_sec(end_cp - begin_cp)); } #endif /* Done. */ fftw_destroy_plan(plan); } free(cin); free(out); /*************** Benchmark fftwnd_cilk ****************/ printf("\n"); max_size = 0; for (i = 0; i < N_TESTS_3D; ++i) if (n3[i][0]*n3[i][1]*n3[i][2] > max_size) max_size = n3[i][0]*n3[i][1]*n3[i][2]; cin = malloc(max_size * sizeof(fftw_complex)); if (!cin) { printf("Not enough memory! At least %d bytes needed.\n", max_size * sizeof(fftw_complex)); exit(1); } printf("%15s%20s%20s%20s\n", "Array Size", "FFTWND", "FFTWND_CILK", "Speedup Factor"); for (test = 0; test < N_TESTS_3D; ++test) { int N; { char s[20]; sprintf(s,"%dx%dx%d",n3[test][0],n3[test][1],n3[test][2]); printf("%15s",s); } fflush(stdout); plan_nd = fftwnd_create_plan(3,n3[test], FFTW_FORWARD, FFTW_IN_PLACE | FFTW_MEASURE); N = n3[test][0]*n3[test][1]*n3[test][2]; max_iter = NUM_ITER / (N * log(2.0 * N)); if (max_iter < 1) max_iter = 1; time_scale = 1.0e6 / (max_iter * (log(N)/log(2.0) * N)); initialize_fft_data(cin, N); start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) initialize_fft_data(cin, N); end_t = Cilk_get_wall_time(); init_t = end_t - start_t; /* Time FFTW: */ initialize_fft_data(cin, N); fftwnd(plan_nd, 1, cin, 1, 0, out, 1, 0); start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) { initialize_fft_data(cin, N); fftwnd(plan_nd, 1, cin, 1, 0, out, 1, 0); } end_t = Cilk_get_wall_time(); printf("%20g", time1=Cilk_wall_time_to_sec(end_t - start_t - init_t) * time_scale); fflush(stdout); /* Time Cilk FFTW: */ initialize_fft_data(cin, N); spawn fftwnd_cilk(plan_nd, 1, cin, 1, 0, 0, 0, 0); sync; start_t = Cilk_get_wall_time(); for (iter = 0; iter < max_iter; ++iter) { initialize_fft_data(cin, N); spawn fftwnd_cilk(plan_nd, 1, cin, 1, 0, 0, 0, 0); sync; } end_t = Cilk_get_wall_time(); printf("%20g", time2=Cilk_wall_time_to_sec(end_t - start_t - init_t) * time_scale); /* Done. */ printf("%20g\n",time1/time2); fflush(stdout); fftwnd_destroy_plan(plan_nd); } free(cin); return 0; } void initialize_fft_data(fftw_complex * arr, long n) { long i; for (i = 0; i < n; i++) { /* initialize to some arbitrary values: */ c_re(arr[i]) = 0.56923456; c_im(arr[i]) = 0.23858572; } } fftw-2.1.5/FAQ/0002777000175400001440000000000007637531662006662 5fftw-2.1.5/FAQ/Makefile0000644000175400001440000000040407637531662010232 all: @echo converting 1 ... perl bfnnconv.pl fftw-faq.bfnn @echo converting 2 ... perl bfnnconv.pl fftw-faq.bfnn install-html: all cp fftw-faq.html/* $(HOME)/WWW/faq/ clean: rm -f *~ core a.out *.lout *.ps *.info *.ascii *.xrefdb *.post rm -rf *.html fftw-2.1.5/FAQ/bfnnconv.pl0000755000175400001440000002176007637531662010753 #!/usr/bin/perl -- # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) @outputs=('ascii','info','html'); while ($ARGV[0] =~ m/^\-/) { $_= shift(@ARGV); if (m/^-only/) { @outputs= (shift(@ARGV)); } else { warn "unknown option `$_' ignored"; } } $prefix= $ARGV[0]; $prefix= 'stdin' unless length($prefix); $prefix =~ s/\.bfnn$//; if (open(O,"$prefix.xrefdb")) { @xrefdb= ; close(O); } else { warn "no $prefix.xrefdb ($!)"; } $section= -1; for $thisxr (@xrefdb) { $_= $thisxr; chop; if (m/^Q (\w+) ((\d+)\.(\d+)) (.*)$/) { $qrefn{$1}= $2; $qreft{$1}= $5; $qn2ref{$3,$4}= $1; $maxsection= $3; $maxquestion[$3]= $4; } elsif (m/^S (\d+) /) { $maxsection= $1; $sn2title{$1}=$'; } } open(U,">$prefix.xrefdb-new"); for $x (@outputs) { require("m-$x.pl"); } &call('init'); while (<>) { chop; next if m/^\\comment\b/; if (!m/\S/) { &call('endpara'); next; } if (s/^\\section +//) { $line= $_; $section++; $question=0; print U "S $section $line\n"; $|=1; print "S$section",' 'x10,"\r"; $|=0; &call('endpara'); &call('startmajorheading',"$section", "Section $section", $section<$maxsection ? "Section ".($section+1) : '', $section>1 ? 'Section '.($section-1) : 'Top'); &text($line); &call('endmajorheading'); if ($section) { &call('endpara'); &call('startindex'); for $thisxr (@xrefdb) { $_= $thisxr; chop; if (m/^Q (\w+) (\d+)\.(\d+) (.*)$/) { $ref= $1; $num1= $2; $num2= $3; $text= $4; next unless $num1 == $section; &call('startindexitem',$ref,"Q$num1.$num2","Question $num1.$num2"); &text($text); &call('endindexitem'); } } &call('endindex'); } } elsif (s/^\\question \d{2}[a-z]{3}((:\w+)?) +//) { $line= $_; $question++; $qrefstring= $1; $qrefstring= "q_${section}_$question" unless $qrefstring =~ s/^://; print U "Q $qrefstring $section.$question $line\n"; $|=1; print "Q$section.$question",' 'x10,"\r"; $|=0; &call('endpara'); &call('startminorheading',$qrefstring, "Question $section.$question", $question < $maxquestion[$section] ? "Question $section.".($question+1) : $section < $maxsection ? "Question ".($section+1).".1" : '', $question > 1 ? "Question $section.".($question-1) : $section > 1 ? "Question ".($section-1).'.'.($maxquestion[$section-1]) : 'Top', "Section $section"); &text("Question $section.$question. $line"); &call('endminorheading'); } elsif (s/^\\only +//) { @saveoutputs= @outputs; @outputs=(); for $x (split(/\s+/,$_)) { push(@outputs,$x) if grep($x eq $_, @saveoutputs); } } elsif (s/^\\endonly$//) { @outputs= @saveoutputs; } elsif (s/^\\copyto +//) { $fh= $'; while(<>) { last if m/^\\endcopy$/; while (s/^([^\`]*)\`//) { print $fh $1; m/([^\\])\`/ || warn "`$_'"; $_= $'; $cmd= $`.$1; $it= `$cmd`; chop $it; print $fh $it; } print $fh $_; } } elsif (m/\\index$/) { &call('startindex'); for $thisxr (@xrefdb) { $_= $thisxr; chop; if (m/^Q (\w+) (\d+\.\d+) (.*)$/) { $ref= $1; $num= $2; $text= $3; &call('startindexitem',$ref,"Q$num","Question $num"); &text($text); &call('endindexitem'); } elsif (m/^S (\d+) (.*)$/) { $num= $1; $text= $2; next unless $num; &call('startindexmainitem',"s_$num", "Section $num.","Section $num"); &text($text); &call('endindexitem'); } else { warn $_; } } &call('endindex'); } elsif (m/^\\call-(\w+) +(\w+)\s*(.*)$/) { $fn= $1.'_'.$2; eval { &$fn($3); }; warn $@ if length($@); } elsif (m/^\\call +(\w+)\s*(.*)$/) { eval { &call($1,$2); }; warn $@ if length($@); } elsif (s/^\\set +(\w+)\s*//) { $svalue= $'; $svari= $1; eval("\$user_$svari=\$svalue"); $@ && warn "setting $svalue failed: $@\n"; } elsif (m/^\\verbatim$/) { &call('startverbatim'); while (<>) { chop; last if m/^\\endverbatim$/; &call('verbatim',$_); } &call('endverbatim'); } else { s/\.$/\. /; &text($_." "); } } print ' 'x25,"\r"; &call('finish'); rename("$prefix.xrefdb-new","$prefix.xrefdb") || warn "rename xrefdb: $!"; exit 0; sub text { local($in,$rhs,$word,$refn,$reft,$fn,$style); $in= "$holdover$_[0]"; $holdover= ''; while ($in =~ m/\\/) { #print STDERR ">$`##$'\n"; $rhs=$'; &call('text',$`); $_= $rhs; if (m/^\w+ $/) { $holdover= "\\$&"; $in= ''; } elsif (s/^fn\s+([^\s\\]*\w)//) { $in= $_; $word= $1; &call('courier'); &call('text',$word); &call('endcourier'); } elsif (s/^tab\s+(\d+)\s+//) { $in= $_; &call('tab',$1); } elsif (s/^nl\s+//) { $in= $_; &call('newline'); } elsif (s/^qref\s+(\w+)//) { $refn= $qrefn{$1}; $reft= $qreft{$1}; if (!length($refn)) { warn "unknown question `$1'"; } $in= "$`\\pageref:$1:$refn:$reft\\endpageref.$_"; } elsif (s/^pageref:(\w+):([^:\n]+)://) { $in= $_; &call('pageref',$1,$2); } elsif (s/^endpageref\.//) { $in= $_; &call('endpageref'); } elsif (s/^(\w+)\{//) { $in= $_; $fn= $1; eval { &call("$fn"); }; if (length($@)) { warn $@; $fn= 'x'; } push(@styles,$fn); } elsif (s/^\}//) { $in= $_; $fn= pop(@styles); if ($fn ne 'x') { &call("end$fn"); } } elsif (s/^\\//) { $in= $_; &call('text',"\\"); } elsif (s,^(\w+)\s+([-A-Za-z0-9.\@:/]*\w),,) { #print STDERR "**$&**$_\n"; $in= $_; $style=$1; $word= $2; &call($style); &call('text',$word); &call("end$style"); } else { warn "unknown control `\\$_'"; $in= $_; } } &call('text',$in); } sub call { local ($fnbase, @callargs) = @_; local ($coutput); for $coutput (@outputs) { if ($fnbase eq 'text' && eval("\@${coutput}_cmds")) { #print STDERR "special handling text (@callargs) for $coutput\n"; $evstrg= "\$${coutput}_args[\$#${coutput}_args].=\"\@callargs\""; eval($evstrg); length($@) && warn "call adding for $coutput (($evstrg)): $@"; } else { $fntc= $coutput.'_'.$fnbase; &$fntc(@callargs); } } } sub recurse { local (@outputs) = $coutput; local ($holdover); &text($_[0]); } sub arg { #print STDERR "arg($_[0]) from $coutput\n"; $cmd= $_[0]; eval("push(\@${coutput}_cmds,\$cmd); push(\@${coutput}_args,'')"); length($@) && warn "arg setting up for $coutput: $@"; } sub endarg { #print STDERR "endarg($_[0]) from $coutput\n"; $evstrg= "\$${coutput}_cmd= \$cmd= pop(\@${coutput}_cmds); ". "\$${coutput}_arg= \$arg= pop(\@${coutput}_args); "; eval($evstrg); length($@) && warn "endarg extracting for $coutput (($evstrg)): $@"; #print STDERR ">call $coutput $cmd $arg< (($evstrg))\n"; $evstrg= "&${coutput}_do_${cmd}(\$arg)"; eval($evstrg); length($@) && warn "endarg running ${coutput}_do_${cmd} (($evstrg)): $@"; } fftw-2.1.5/FAQ/fftw-faq.bfnn0000644000175400001440000004672407637531662011171 \comment This is the source for the FFTW FAQ list, in \comment the Bizarre Format With No Name. It is turned into Lout \comment input, HTML, plain ASCII and an Info document by a Perl script. \comment \comment The format and scripts come from the Linux FAQ, by \comment Ian Jackson. \set brieftitle FFTW FAQ \set author Matteo Frigo and Steven G. Johnson / fftw@fftw.org \set authormail fftw@fftw.org \set title FFTW Frequently Asked Questions with Answers \set copyholder Massachusetts Institute of Technology \call-html startup html.refs \copyto ASCII FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS `date '+%d %h %Y'` Matteo Frigo Steven G. Johnson \endcopy \copyto INFO START-INFO-DIR-ENTRY * FFTW FAQ: (fftw-faq). FFTW Frequently Asked Questions with Answers. END-INFO-DIR-ENTRY  File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir) FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS `date '+%d %h %Y'` Matteo Frigo Steven G. Johnson \endcopy This is the list of Frequently Asked Questions about FFTW, a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. \section Index \index \comment ###################################################################### \section Introduction and General Information \question 26aug:whatisfftw What is FFTW? FFTW is a free collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, real, and parallel transforms, and can handle arbitrary array sizes efficiently. FFTW is typically faster than other publically-available FFT implementations, and is even competitive with vendor-tuned libraries. (See our web page for extensive benchmarks.) To achieve this performance, FFTW uses novel code-generation and runtime self-optimization techniques (along with many other tricks). \question 26aug:whereisfftw How do I obtain FFTW? FFTW can be found at \docref{the FFTW web page\}. You can also retrieve it from \ftpon ftp.fftw.org in \ftpin /pub/fftw. \question 26aug:isfftwfree Is FFTW free software? Starting with version 1.3, FFTW is Free Software in the technical sense defined by the Free Software Foundation (see \docref{Categories of Free and Non-Free Software\}), and is distributed under the terms of the GNU General Public License. Previous versions of FFTW were distributed without fee for noncommercial use, but were not technically ``free.'' Non-free licenses for FFTW are also available that permit different terms of use than the GPL. \question 10apr:nonfree What is this about non-free licenses? The non-free licenses are for companies that wish to use FFTW in their products but are unwilling to release their software under the GPL (which would require them to release source code and allow free redistribution). Such users can purchase an unlimited-use license from MIT. Contact us for more details. We could instead have released FFTW under the LGPL, or even disallowed non-Free usage. Suffice it to say, however, that MIT owns the copyright to FFTW and they only let us GPL it because we convinced them that it would neither affect their licensing revenue nor irritate existing licensees. \comment ###################################################################### \section Installing FFTW \question 26aug:systems Which systems does FFTW run on? FFTW is written in ANSI C, and should work on any system with a decent C compiler. (See also \qref runOnDOS and \qref compilerCrashes.) \question 26aug:runOnDOS Does FFTW run on DOS/Windows? It should. FFTW was not developed on DOS or Windows, but the source code is straight ANSI C. Some users have reported using FFTW on DOS/Windows using various compilers. See also the \docref{FFTW Windows installation notes\} and \qref compilerCrashes \question 26aug:compilerCrashes My compiler has trouble with FFTW. Complain fiercely to the vendor of the compiler. FFTW is a heavily-optimized piece of software that is likely to push compilers to their limits. We had no problems with, for example, \courier{gcc 2.7.2\}, \courier{egcs 1.1.x\}, Sun's \courier{SC4.0\}, and IBM's \courier{XLC\}. Users have also reported successful compilations of FFTW using Borland's C/C++ compilers on Windows. The Portland Group PGCC compiler, version 4.0 for Linux/x86, reportedly produces incorrect code for FFTW 2.1.3. Visual C++ 4.0 crashes when compiling FFTW 1.2 with all optimizations turned on. Visual C++ 5.0 reportedly produces incorrect code for the real transforms in FFTW 2.x when the option "Maximize speed" is set. We are told that Service Pack 3 fixes the bug. Metrowerks CodeWarrior Pro 4 reportedly generates incorrect code for the PowerPC when compiling FFTW at optimization level 4. Supposedly, this bug is fixed in CW Pro 5 with all the latest updates applied. (No problems were reported for previous versions.) Various problems have also been observed with SGI's MIPSpro compilers, versions 7.2.0 and 7.2.1 (you may have to lower the optimization level for some files to get them to compile); the bug seems to be fixed in version 7.3. The test program in earlier versions of FFTW had problems with the \courier{-xO5\} option in Sun's \courier{SC4.0\} C compiler. \courier{egcs 1.0.2\} produced incorrect code for FFTW on the PowerPC (corrected in \courier{egcs 1.1\}). The DEC C compiler, V5.8-009 on Digital UNIX V4.0 (Rev. 1091) is known to have bugs with its EV6 tuning. Specifically, compiling FFTW with \courier{-arch host\} (the default) or \courier{-arch ev6\} on an Alpha EV6 can cause FFTW (e.g. \courier{fftw_test -s 256\}) to crash. \question 26aug:solarisSucks FFTW does not compile on Solaris, complaining about \courier{const\}. We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you might get error messages from \courier{make\} such as \courier{"./fftw.h", line 88: warning: const is a keyword in ANSI C\} This is the case when the \courier{configure\} script reports that \courier{const\} does not work: \courier{checking for working const... (cached) no\} You should be aware that Solaris comes with two compilers, namely, \courier{/opt/SUNWspro/SC4.2/bin/cc\} and \courier{/usr/ucb/cc\}. The latter compiler is non-ANSI. Indeed, it is a perverse shell script that calls the real compiler in non-ANSI mode. In order to compile FFTW, change your path so that the right \courier{cc\} is used. To know whether your compiler is the right one, type \courier{cc -V\}. If the compiler prints ``\courier{ucbcc\}'', as in \courier{ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2\} then the compiler is wrong. The right message is something like \courier{cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2\} \question 26aug:languages Which language is FFTW written in? FFTW is written in ANSI C. Most of the code, however, was automatically generated by a program called \courier{genfft\}, written in the Objective Caml dialect of ML. You do not need to know ML or to have an Objective Caml compiler in order to use FFTW. \courier{genfft\} is provided with the FFTW sources, which means that you can play with the code generator if you want. In this case, you need a working Objective Caml system. Objective Caml is available from \ftpon ftp.inria.fr in the directory \ftpin /lang/caml-light. \question 26aug:fortran Can I call FFTW from FORTRAN? Yes, but not directly. The main problem is that Fortran cannot pass parameters by value. However, FFTW can be called indirectly from Fortran through the use of special C "wrapper" routines. Appropriate wrapper code, documented in the FFTW manual, is included with FFTW (versions 1.3 and higher). By default, FFTW configures its wrapper routines to work with the first compiler it finds, e.g. \courier{g77\}. To configure for a different, incompatible Fortran compiler \courier{foobar\}, use \courier{./configure F77=foobar\} when installing FFTW. \question 26aug:cplusplus Can I call FFTW from C++? Most definitely. FFTW should compile and run under any C++ compiler. \question 26aug:whynotfortran Why isn't FFTW written in FORTRAN/C++? Because we don't like those languages, and neither approaches the portability of C. \question 29mar:singleprec How do I compile FFTW to run in single precision? On a Unix system: \courier{configure --enable-float\}. On a non-Unix system: edit \courier{fftw/fftw.h\} to \courier{#define\} the symbol \courier{FFTW_ENABLE_FLOAT\}. In both cases, you must then recompile FFTW. \comment ###################################################################### \section Using FFTW \question 25may:slow FFTW seems really slow. You are probably recreating the plan before every transform, rather than creating it once and reusing it for all transforms of the same size. FFTW is designed to be used in the following way: \call startlist \call item First, you create a plan. This will take several seconds. \call item Then, you reuse the plan many times to perform FFTs. These are fast. \call endlist If you don't need to compute many transforms and the time for the planner is significant, you have two options. First, you can use the \courier{FFTW_ESTIMATE\} option in the planner, which uses heuristics instead of runtime measurements and produces a good plan in a short time. Second, you can use the wisdom feature to precompute the plan; see \qref savePlans \question 22oct:slows FFTW slows down after repeated calls. Probably, NaNs or similar are creeping into your data, and the slowdown is due to the resulting floating-point exceptions. For example, be aware that repeatedly FFTing the same array is a diverging process (because FFTW computes the unnormalized transform). \question 22oct:segfault An FFTW routine is crashing when I call it. You almost certainly have a bug in your code. For example, you could be passing invalid arguments (such as wrongly-sized arrays) to FFTW, or you could simply have memory corruption elsewhere in your program that causes random crashes later on. Learn to debug, and don't complain to us unless you can come up with a minimal program (preferably under 30 lines) that illustrates the problem. \question 22oct:fortran64 My Fortran program crashes when calling FFTW. As described in the manual, on 64-bit machines you must store the plans in variables large enough to hold a pointer, for example \courier{integer*8\}. \question 24mar:conventions FFTW gives results different from my old FFT. People follow many different conventions for the DFT, and you should be sure to know the ones that we use (described in the FFTW manual). In particular, you should be aware that the \courier{FFTW_FORWARD\}/\courier{FFTW_BACKWARD\} directions correspond to signs of -1/+1 in the exponent of the DFT definition. (\italic{Numerical Recipes\} uses the opposite convention.) You should also know that we compute an unnormalized transform. In contrast, Matlab is an example of program that computes a normalized transform. See \qref whyscaled. Finally, note that floating-point arithmetic is not exact, so different FFT algorithms will give slightly different results (on the order of the numerical accuracy; typically a fractional difference of 1e-15 or so). \question 22oct:inplace Your in-place transform gives incorrect results. As described in the FFTW manual, the output array argument has a special meaning for \courier{FFTW_INPLACE\} transforms; you should not pass the input array for this argument. \question 26aug:savePlans Can I save FFTW's plans? Yes. Starting with version 1.2, FFTW provides the \courier{wisdom\} mechanism for saving plans. See \qref wisdom and the FFTW manual. \question 14sep:whyscaled Why does your inverse transform return a scaled result? Computing the forward transform followed by the backward transform (or vice versa) yields the original array scaled by the size of the array. (For multi-dimensional transforms, the size of the array is the product of the dimensions.) We could, instead, have chosen a normalization that would have returned the unscaled array. Or, to accomodate the many conventions in this matter, the transform routines could have accepted a "scale factor" parameter. We did not do this, however, for two reasons. First, we didn't want to sacrifice performance in the common case where the scale factor is 1. Second, in real applications the FFT is followed or preceded by some computation on the data, into which the scale factor can typically be absorbed at little or no cost. \question 02dec:centerorigin How can I make FFTW put the origin (zero frequency) at the center of its output? For human viewing of a spectrum, it is often convenient to put the origin in frequency space at the center of the output array, rather than in the zero-th element (the default in FFTW). If all of the dimensions of your array are even, you can accomplish this by simply multiplying each element of the input array by (-1)^(i + j + ...), where i, j, etcetera are the indices of the element. (This trick is a general property of the DFT, and is not specific to FFTW.) \question 08may:imageaudio How do I FFT an image/audio file in \italic{foobar\} format? FFTW performs an FFT on an array of floating-point values. You can certainly use it to compute the transform of an image or audio stream, but you are responsible for figuring out your data format and converting it to the form FFTW requires. \question 09apr:linkfails My program does not link (on Unix). Please use the exact order in which libraries are specified by the FFTW manual (e.g. \courier{-lrfftw -lfftw -lm\}). Also, note that the libraries must be listed after your program sources/objects. (The general rule is that if \italic{A\} uses \italic{B\}, then \italic{A\} must be listed before \italic{B\} in the link command.). For example, switching the order to \courier{-lfftw -lrfftw -lm\} will fail. \question 22oct:nostack My program crashes, complaining about stack space. You cannot declare large arrays statically; you should use \courier{malloc\} (or equivalent) to allocate the arrays you want to transform if they are larger than a few hundred elements. \comment ###################################################################### \section Internals of FFTW \question 26aug:howworks How does FFTW work? The innovation (if it can be so called) in FFTW consists in having an interpreter execute the transform. The program for the interpreter (the \italic{plan\}) is computed at runtime according to the characteristics of your machine/compiler. This peculiar software architecture allows FFTW to adapt itself to almost any machine. For more details, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at \docref{the FFTW web page\}. See also "FFTW: An Adaptive Software Architecture for the FFT", in ICASSP '98. \question 26aug:whyfast Why is FFTW so fast? This is a complex question, and there is no simple answer. In fact, the authors do not fully know the answer, either. In addition to many small performance hacks throughout FFTW, there are three general reasons for FFTW's speed. \call startlist \call item FFTW uses an internal interpreter to adapt itself to a machine. See \qref howworks. \call item FFTW uses a code generator to produce highly-optimized routines for computing small transforms. \call item FFTW uses explicit divide-and-conquer to take advantage of the memory hierarchy. \call endlist For more details on these three topics, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at \docref{the FFTW web page\}. \question 26aug:wisdom What is this \courier{wisdom\} thing? \courier{wisdom\} is the name of the mechanism that FFTW uses to save and restore plans. Rather than just saving plans, FFTW remembers what it learns about your machine, and becomes wiser and wiser as time passes by. You can save \courier{wisdom\} for later use. \question 26aug:whywisdom Why do you use \courier{wisdom\}? I just wanted to save a plan. \courier{wisdom\} could be implemented with less effort than a general plan-saving mechanism would have required. In addition, \courier{wisdom\} provides additional benefits. For example, if you are planning transforms of size 1024, and later you want a transform of size 2048, most of the calculations of the 1024 case can be reused. In short, \courier{wisdom\} does more things with less effort, and seemed like The Right Thing to do. \comment ###################################################################### \section Known bugs \question 27aug:rfftwndbug FFTW 1.1 crashes in rfftwnd on Linux. This bug was fixed in FFTW 1.2. There was a bug in \courier{rfftwnd\} causing an incorrect amount of memory to be allocated. The bug showed up in Linux with libc-5.3.12 (and nowhere else that we know of). \question 15oct:fftwmpibug The MPI transforms in FFTW 1.2 give incorrect results/leak memory. These bugs were corrected in FFTW 1.2.1. The MPI transforms (really, just the transpose routines) in FFTW 1.2 had bugs that could cause errors in some situations. \question 05nov:testsingbug The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. This bug was fixed in FFTW 1.3. (Older versions of FFTW did work in single precision, but the test programs didn't--the error tolerances in the tests were set for double precision.) \question 24mar:teststoobig The test program in FFTW 1.2.1 fails for n > 46340. This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer, but the test program was wrong. For large n, n*n in the naive transform that we used for comparison overflows 32 bit integer precision, breaking the test. \question 24aug:linuxthreads The threaded code fails on Linux Redhat 5.0 We had problems with glibc-2.0.5. The code should work with glibc-2.0.7. \question 26sep:bigrfftwnd FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow due to a poorly-parenthesized expression.) \question 26mar:primebug FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. There was a bug in the complex transforms that could cause incorrect results under (hopefully rare) circumstances for lengths with intermediate-size prime factors (17-97). This bug was fixed in FFTW 2.1.1. \question 05apr:mpichbug FFTW 2.1.1's MPI test programs crash with MPICH. This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed when using the MPICH implementation of MPI with the \courier{ch_p4\} device (TCP/IP); the transforms themselves worked fine. \question 25may:aixthreadbug FFTW 2.1.2's multi-threaded transforms don't work on AIX. This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in previous versions didn't work with AIX's \courier{pthreads\} implementation, which idiosyncratically creates threads in detached (non-joinable) mode by default. \question 27sep:bigprimebug FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow problem that caused incorrect results for many primes greater than 32768 (on 32-bit machines). (Sizes without large prime factors are not affected.) \question 03may:aixflags FFTW 2.1.3 crashes on AIX The FFTW 2.1.3 \courier{configure\} script picked incorrect compiler flags for the \courier{xlc\} compiler on newer IBM processors. This is fixed in FFTW 2.1.4. \comment Here it ends! fftw-2.1.5/FAQ/html.refs0000644000175400001440000000036507637531662010425 \ References for the FFTW FAQ \ the FFTW web page \ http://www.fftw.org FFTW Windows installation notes \ http://www.fftw.org/install/install-Windows.html Categories of Free and Non-Free Software \ http://www.gnu.org/philosophy/categories.html fftw-2.1.5/FAQ/m-ascii.pl0000644000175400001440000001115607637531662010457 ## ASCII output # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) sub ascii_init { open(ASCII,">$prefix.ascii"); } sub ascii_startmajorheading { print ASCII '='x79,"\n\n"; $ascii_status= 'h'; &ascii_text($_[0] ? "Section $_[0]. " : ''); } sub ascii_startminorheading { print ASCII '-'x79,"\n\n"; $ascii_status= 'h'; } sub ascii_italic { &ascii_text('*'); } sub ascii_enditalic { $ascii_para .= '*'; } sub ascii_email { &ascii_text('<'); } sub ascii_endemail { &ascii_text('>'); } sub ascii_ftpon { } sub ascii_endftpon { } sub ascii_ftpin { } sub ascii_endftpin { } sub ascii_docref { } sub ascii_enddocref { } sub ascii_courier { } sub ascii_endcourier { } sub ascii_newsgroup { } sub ascii_endnewsgroup { } sub ascii_ftpsilent { $ascii_ignore++; } sub ascii_endftpsilent { $ascii_ignore--; } sub ascii_text { return if $ascii_ignore; if ($ascii_status eq '') { $ascii_status= 'p'; } $ascii_para .= $_[0]; } sub ascii_tab { local ($n) = $_[0]-length($ascii_para); $ascii_para .= ' 'x$n if $n>0; } sub ascii_newline { return unless $ascii_status eq 'p'; &ascii_writepara; } sub ascii_writepara { local ($thisline, $thisword, $rest); for (;;) { last unless $ascii_para =~ m/\S/; $thisline= $ascii_indentstring; for (;;) { last unless $ascii_para =~ m/^(\s*\S+)/; unless (length($1) + length($thisline) < 75 || length($thisline) == length($ascii_indentstring)) { last; } $thisline .= $1; $ascii_para= $'; } $ascii_para =~ s/^\s*//; print ASCII $thisline,"\n"; $ascii_indentstring= $ascii_nextindent; last unless length($ascii_para); } $ascii_status= ''; $ascii_para= ''; } sub ascii_endpara { return unless $ascii_status eq 'p'; &ascii_writepara; print ASCII "\n"; } sub ascii_endheading { $ascii_para =~ s/\s*$//; print ASCII "$ascii_para\n\n"; $ascii_status= ''; $ascii_para= ''; } sub ascii_endmajorheading { &ascii_endheading(@_); } sub ascii_endminorheading { &ascii_endheading(@_); } sub ascii_startverbatim { $ascii_vstatus= $ascii_status; &ascii_writepara; } sub ascii_verbatim { print ASCII $_[0],"\n"; } sub ascii_endverbatim { $ascii_status= $ascii_vstatus; } sub ascii_finish { close(ASCII); } sub ascii_startindex { $ascii_status= ''; } sub ascii_endindex { $ascii_status= 'p'; } sub ascii_endindexitem { printf ASCII " %-11s %-.66s\n",$ascii_left,$ascii_para; $ascii_status= 'p'; $ascii_para= ''; } sub ascii_startindexitem { $ascii_left= $_[1]; } sub ascii_startindexmainitem { $ascii_left= $_[1]; print ASCII "\n" if $ascii_status eq 'p'; } sub ascii_startindent { $ascii_istatus= $ascii_status; &ascii_writepara; $ascii_indentstring= " $ascii_indentstring"; $ascii_nextindent= " $ascii_nextindent"; } sub ascii_endindent { $ascii_indentstring =~ s/^ //; $ascii_nextindent =~ s/^ //; $ascii_status= $ascii_istatus; } sub ascii_startpackedlist { $ascii_plc=0; } sub ascii_endpackedlist { &ascii_newline if !$ascii_plc; } sub ascii_packeditem { &ascii_newline if !$ascii_plc; &ascii_tab($ascii_plc*40+5); $ascii_plc= !$ascii_plc; } sub ascii_startlist { &ascii_endpara; $ascii_indentstring= " $ascii_indentstring"; $ascii_nextindent= " $ascii_nextindent"; } sub ascii_endlist { &ascii_endpara; $ascii_indentstring =~ s/^ //; $ascii_nextindent =~ s/^ //; } sub ascii_item { &ascii_newline; $ascii_indentstring =~ s/ $/* /; } sub ascii_pageref { &ascii_text("Q$_[1] \`"); } sub ascii_endpageref { &ascii_text("'"); } 1; fftw-2.1.5/FAQ/m-html.pl0000644000175400001440000002242107637531662010330 ## HTML output # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) %saniarray= ('<','lt', '>','gt', '&','amp', '"','quot'); sub html_init { $html_prefix = './'.$prefix; $html_prefix =~ s:^\.//:/:; system('rm','-r',"$html_prefix.html"); system('mkdir',"$html_prefix.html"); open(HTML,">$html_prefix.html/index.html"); print HTML "\n"; print HTML "\n"; $html_needpara= -1; $html_end=''; chop($html_date=`date '+%d %B %Y'`); chop($html_year=`date '+%Y'`); } sub html_startup { print HTML < $user_title

    $user_title

    END &html_readrefs($_[0]); if (length($user_copyrightref)) { local ($refn) = $qrefn{$user_copyrightref}; if (!length($refn)) { warn "unknown question (copyright) `$user_copyrightref'"; } $refn =~ m/(\d+)\.(\d+)/; local ($s,$n) = ($1,$2); $html_copyrighthref= ($s == $html_sectionn)?'':"section$s.html"; $html_copyrighthref.= "#$qn2ref{$s,$n}"; } } sub html_close { print HTML $html_end,"
    \n$user_author\n"; print HTML "- $html_date\n

    \n"; print HTML "Extracted from $user_title,\n"; print HTML "" if length($html_copyrighthref); print HTML "Copyright © $html_year $user_copyholder."; print HTML "" if length($html_copyrighthref); print HTML "\n\n"; close(HTML); } sub html_startmajorheading { local ($ref, $this,$next,$back) = @_; local ($nextt,$backt); $this =~ s/^Section /section/; $html_sectionn= $ref; $next =~ s/^Section /section/ && ($nextt= $sn2title{$'}); $back =~ s/^Section /section/ ? ($backt= $sn2title{$'}) : ($back=''); if ($html_sectionn) { &html_close; open(HTML,">$html_prefix.html/$this.html"); print HTML "\n"; print HTML "\n"; $html_end= "
    \n"; $html_end.= "Next: $nextt.
    \n" if $next; $html_end.= "Back: $backt.
    \n" if $back; $html_end.= ""; $html_end.= "Return to contents.

    \n"; print HTML < $user_brieftitle - Section $html_sectionn END print HTML "" if $next; print HTML "" if $back; print HTML <

    $user_brieftitle - Section $html_sectionn
    END $html_needpara= -1; } else { print HTML "\n

    \n"; $html_needpara=-1; } } sub html_endmajorheading { print HTML "\n

    \n\n"; $html_needpara=-1; } sub html_startminorheading { local ($ref, $this) = @_; $html_needpara=0; $this =~ m/^Question (\d+)\.(\d+)/; local ($s,$n) = ($1,$2); print HTML "\n

    \n"; } sub html_endminorheading { print HTML "\n

    \n\n"; $html_needpara=-1; } sub html_newsgroup { &arg('newsgroup'); } sub html_endnewsgroup { &endarg('newsgroup'); } sub html_do_newsgroup { print HTML "$_[0]"; } sub html_email { &arg('email'); } sub html_endemail { &endarg('email'); } sub html_do_email { print HTML "$_[0]"; } sub html_courier { print HTML "" ; } sub html_endcourier { print HTML ""; } sub html_italic { print HTML "" ; } sub html_enditalic { print HTML "" ; } sub html_docref { &arg('docref'); } sub html_enddocref { &endarg('docref'); } sub html_do_docref { if (!defined($html_refval{$_[0]})) { warn "undefined HTML reference $_[0]"; $html_refval{$n}='UNDEFINED'; } print HTML ""; &recurse($_[0]); print HTML ""; } sub html_readrefs { local ($p); open(HTMLREFS,"<$_[0]") || (warn("failed to open HTML refs $_[0]: $!"),return); while() { next if m/^\\\s/; s/\s*\n$//; if (s/^\\prefix\s*//) { $p= $'; next; } elsif (s/^\s*(\S.*\S)\s*\\\s*//) { $_=$1; $v=$'; s/\\\\/\\/g; $html_refval{$_}= $p.$v; } else { warn("ununderstood line in HTML refs >$_<"); } } close(HTMLREFS); } sub html_ftpsilent { &arg('ftpsilent'); } sub html_endftpsilent { &endarg('ftpsilent'); } sub html_do_ftpsilent { if ($_[0] =~ m/:/) { $html_ftpsite= $`; $html_ftpdir= $'.'/'; } else { $html_ftpsite= $_[0]; $html_ftpdir= ''; } } sub html_ftpon { &arg('ftpon'); } sub html_endftpon { &endarg('ftpon'); } sub html_do_ftpon { #print STDERR "ftpon($_[0])\n"; $html_ftpsite= $_[0]; $html_ftpdir= ''; print HTML ""; &recurse($_[0]); print HTML ""; } sub html_ftpin { &arg('ftpin'); } sub html_endftpin { &endarg('ftpin'); } sub html_do_ftpin { #print STDERR "ftpin($_[0])\n"; print HTML ""; &recurse($_[0]); print HTML ""; } sub html_text { print HTML "\n

    \n" if $html_needpara > 0; $html_needpara=0; $html_stuff= &html_sanitise($_[0]); while ($html_stuff =~ s/^(.{40,70}) //) { print HTML "$1\n"; } print HTML $html_stuff; } sub html_tab { $htmltabignore++ || warn "html tab ignored"; } sub html_newline { print HTML "
    \n" ; } sub html_startverbatim { print HTML "

    \n"   ;                       }
    sub html_verbatim      { print HTML &html_sanitise($_[0]),"\n";         }
    sub html_endverbatim   { print HTML "
    \n" ; $html_needpara= -1; } sub html_endpara { $html_needpara || $html_needpara++; } sub html_finish { &html_close; } sub html_startindex { print HTML "
      \n"; } sub html_endindex { print HTML "

    \n"; } sub html_startindexitem { local ($ref,$qval) = @_; $qval =~ m/Q(\d+)\.(\d+)/; local ($s,$n) = ($1,$2); print HTML "
  • Q$s.$n. "; $html_indexunhead=''; } sub html_startindexmainitem { local ($ref,$s) = @_; $s =~ m/\d+/; $s= $&; print HTML "

    " if ($s > 1); print HTML "
  • Section $s. "; $html_indexunhead=''; } sub html_endindexitem { print HTML "$html_indexunhead\n"; } sub html_startlist { print HTML "\n"; $html_itemend="
      "; } sub html_endlist { print HTML "$html_itemend\n
    \n"; $html_needpara=-1 } sub html_item { print HTML "$html_itemend\n
  • "; $html_itemend=""; $html_needpara=-1; } sub html_startpackedlist { print HTML "\n"; $html_itemend=""; } sub html_endpackedlist { print HTML "$html_itemend\n\n"; $html_needpara=-1; } sub html_packeditem { print HTML "$html_itemend\n
  • "; $html_itemend=""; $html_needpara=-1; } sub html_startindent { print HTML "
    \n"; } sub html_endindent { print HTML "
    \n"; } sub html_pageref { local ($ref,$sq) = @_; $sq =~ m/(\d+)\.(\d+)/; local ($s,$n) = ($1,$2); print HTML "Q$sq \`"; } sub html_endpageref { print HTML "'"; } sub html_sanitise { local ($in) = @_; local ($out); while ($in =~ m/[<>&"]/) { $out.= $`. '&'. $saniarray{$&}. ';'; $in=$'; } $out.= $in; $out; } 1; fftw-2.1.5/FAQ/m-info.pl0000644000175400001440000001277307637531662010330 ## Info output # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) sub info_init { open(INFO,">$prefix.info"); print INFO <'); } sub info_ftpon { } sub info_endftpon { } sub info_ftpin { } sub info_endftpin { } sub info_docref { } sub info_enddocref { } sub info_courier { } sub info_endcourier { } sub info_newsgroup { } sub info_endnewsgroup { } sub info_ftpsilent { $info_ignore++; } sub info_endftpsilent { $info_ignore--; } sub info_text { return if $info_ignore; if ($info_status eq '') { $info_status= 'p'; } $info_para .= $_[0]; } sub info_tab { local ($n) = $_[0]-length($info_para); $info_para .= ' 'x$n if $n>0; } sub info_newline { return unless $info_status eq 'p'; print INFO &info_writepara; } sub info_writepara { local ($thisline, $thisword, $rest, $output); for (;;) { last unless $info_para =~ m/\S/; $thisline= $info_indentstring; for (;;) { last unless $info_para =~ m/^(\s*\S+)/; unless (length($1) + length($thisline) < 75 || length($thisline) == length($info_indentstring)) { last; } $thisline .= $1; $info_para= $'; } $info_para =~ s/^\s*//; $output.= $thisline."\n"; $info_indentstring= $info_nextindent; last unless length($info_para); } $info_status= ''; $info_para= ''; return $output; } sub info_endpara { return unless $info_status eq 'p'; print INFO &info_writepara; print INFO "\n"; } sub info_endheading { $info_para =~ s/\s*$//; print INFO "$info_para\n\n"; $info_status= ''; $info_para= ''; } sub info_endmajorheading { &info_endheading(@_); } sub info_endminorheading { &info_endheading(@_); } sub info_startverbatim { print INFO &info_writepara; } sub info_verbatim { print INFO $_[0],"\n"; } sub info_endverbatim { $info_status= $info_vstatus; } sub info_finish { close(INFO); } sub info_startindex { &info_endpara; $info_moredetail= ''; $info_status= ''; } sub info_endindex { print INFO "$info_moredetail\n" if length($info_moredetail); } sub info_endindexitem { $info_indentstring= sprintf("* %-17s ",$info_label.'::'); $info_nextindent= ' 'x20; local ($txt); $txt= &info_writepara; if ($info_main) { print INFO $label.$txt; $txt =~ s/^.{20}//; $info_moredetail.= $txt; } else { $info_moredetail.= $label.$txt; } $info_indentstring= $info_nextindent= ''; $info_status='p'; } sub info_startindexitem { print INFO "* Menu:\n" if $info_status eq ''; $info_status= ''; $info_label= $_[2]; $info_main= 0; } sub info_startindexmainitem { print INFO "* Menu:\n" if $info_status eq ''; $info_label= $_[2]; $info_main= 1; $info_moredetail .= "\n$_[2], "; $info_status= ''; } sub info_startindent { $info_istatus= $info_status; print INFO &info_writepara; $info_indentstring= " $info_indentstring"; $info_nextindent= " $info_nextindent"; } sub info_endindent { $info_indentstring =~ s/^ //; $info_nextindent =~ s/^ //; $info_status= $info_istatus; } sub info_startpackedlist { $info_plc=0; } sub info_endpackedlist { &info_newline if !$info_plc; } sub info_packeditem { &info_newline if !$info_plc; &info_tab($info_plc*40+5); $info_plc= !$info_plc; } sub info_startlist { $info_istatus= $info_status; print INFO &info_writepara; $info_indentstring= " $info_indentstring"; $info_nextindent= " $info_nextindent"; } sub info_endlist { $info_indentstring =~ s/^ //; $info_nextindent =~ s/^ //; $info_status= $info_lstatus; } sub info_item { &info_newline; $info_indentstring =~ s/ $/* /; } sub info_pageref { &info_text("*Note Question $_[1]:: \`"); } sub info_endpageref { &info_text("'"); } 1; fftw-2.1.5/FAQ/m-lout.pl0000644000175400001440000001373007637531662010352 ## Lout output # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) sub lout_init { open(LOUT,">$prefix.lout"); chop($dprint= `date '+%d %B %Y'`); $dprint =~ s/^0//; } sub lout_startup { local ($lbs) = &lout_sanitise($user_brieftitle); print LOUT <0)*40+5); $lout_plc= !$lout_plc; } sub lout_startlist { &lout_endpara; print LOUT "\@RawIndentedList style {\@Bullet} indent {0.5i} gap {1.1vx}\n"; $lout_styles .= 'l'; $lout_status= ''; } sub lout_endlist { &lout_endpara; print LOUT "\@EndList\n\n"; $lout_styles =~ s/.$//; } sub lout_item { &lout_endpara; print LOUT "\@ListItem{"; $lout_styles.= 'I'; } sub lout_startindex { print LOUT "//0.0fe\n"; } sub lout_endindex { $lout_status='p'; } sub lout_startindexmainitem { $lout_marker= $_[0]; $lout_status= ''; print LOUT "//0.3vx Bold \@Font \@HAdjust { \@HContract { { $_[1] } |3cx {"; $lout_iiendheight= '1.00'; $lout_styles .= 'X'; } sub lout_startindexitem { $lout_marker= $_[0]; print LOUT "\@HAdjust { \@HContract { { $_[1] } |3cx {"; $lout_iiendheight= '0.95'; $lout_styles .= 'X'; } sub lout_endindexitem { print LOUT "} } |0c \@PageOf { $lout_marker } } //${lout_iiendheight}vx\n"; $lout_styles =~ s/.$//; } sub lout_email { &lout_courier; &lout_text('<'); } sub lout_endemail { &lout_text('>'); &lout_endcourier; } sub lout_ftpon { &lout_courier; } sub lout_endftpon { &lout_endcourier; } sub lout_ftpin { &lout_courier; } sub lout_endftpin { &lout_endcourier; } sub lout_docref { } sub lout_enddocref { } sub lout_ftpsilent { $lout_ignore++; } sub lout_endftpsilent { $lout_ignore--; } sub lout_newsgroup { &lout_courier; } sub lout_endnewsgroup { &lout_endcourier; } sub lout_text { return if $lout_ignore; $lout_status= 'p'; $_= &lout_sanitise($_[0]); s/ $/\n/ unless $lout_styles =~ m/[fhX]/; print LOUT $_; } sub lout_tab { local ($size) = $_[0]*0.5; print LOUT " |${size}ft "; } sub lout_newline { print LOUT " //1.0vx\n"; } sub lout_sanitise { local ($in) = @_; local ($out); $in= ' '.$in.' '; $out=''; while ($in =~ m/(\s)(\S*[\@\/|\\\"\^\&\{\}\#]\S*)(\s)/) { $out .= $`.$1; $in = $3.$'; $_= $2; s/[\\\"]/\\$&/g; $out .= '"'.$_.'"'; } $out .= $in; $out =~ s/^ //; $out =~ s/ $//; $out; } sub lout_endpara { return if $lout_status eq ''; if ($lout_styles eq '') { print LOUT "\@LP\n\n"; } elsif ($lout_styles =~ s/I$//) { print LOUT "}\n"; } $lout_status= ''; } sub lout_startverbatim { print LOUT "//0.4f\n\@RawIndentedDisplay lines \@Break". " { {0.7 1.0} \@Scale {Courier Bold} \@Font {\n"; } sub lout_verbatim { $_= $_[0]; s/^\s*//; print LOUT &lout_sanitise($_),"\n"; } sub lout_endverbatim { print LOUT "}\n}\n//0.4f\n"; } 1; fftw-2.1.5/FAQ/m-post.pl0000644000175400001440000001074207637531662010354 ## POST output # Copyright (C) 1993-1995 Ian Jackson. # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # It is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # (Note: I do not consider works produced using these BFNN processing # tools to be derivative works of the tools, so they are NOT covered # by the GPL. However, I would appreciate it if you credited me if # appropriate in any documents you format using BFNN.) sub post_init { open(POST,">$prefix.post"); } sub post_startmajorheading { print POST '='x79,"\n\n"; $post_status= 'h'; &post_text($_[0] ? "Section $_[0]. " : ''); } sub post_startminorheading { print POST '-'x77,"\n\n"; $post_status= 'h'; } sub post_italic { &post_text('*'); } sub post_enditalic { $post_para .= '*'; } sub post_email { &post_text('<'); } sub post_endemail { &post_text('>'); } sub post_ftpon { } sub post_endftpon { } sub post_ftpin { } sub post_endftpin { } sub post_docref { } sub post_enddocref { } sub post_courier { } sub post_endcourier { } sub post_newsgroup { } sub post_endnewsgroup { } sub post_ftpsilent { $post_ignore++; } sub post_endftpsilent { $post_ignore--; } sub post_text { return if $post_ignore; if ($post_status eq '') { $post_status= 'p'; } $post_para .= $_[0]; } sub post_tab { local ($n) = $_[0]-length($post_para); $post_para .= ' 'x$n if $n>0; } sub post_newline { return unless $post_status eq 'p'; &post_writepara; } sub post_writepara { local ($thisline, $thisword, $rest); for (;;) { last unless $post_para =~ m/\S/; $thisline= $post_indentstring; for (;;) { last unless $post_para =~ m/^(\s*\S+)/; unless (length($1) + length($thisline) < 75 || length($thisline) == length($post_indentstring)) { last; } $thisline .= $1; $post_para= $'; } $post_para =~ s/^\s*//; print POST $thisline,"\n"; $post_indentstring= $post_nextindent; last unless length($post_para); } $post_status= ''; $post_para= ''; } sub post_endpara { return unless $post_status eq 'p'; &post_writepara; print POST "\n"; } sub post_endheading { $post_para =~ s/\s*$//; print POST "$post_para\n\n"; $post_status= ''; $post_para= ''; } sub post_endmajorheading { &post_endheading(@_); } sub post_endminorheading { &post_endheading(@_); } sub post_startverbatim { $post_vstatus= $post_status; &post_writepara; } sub post_verbatim { print POST $_[0],"\n"; } sub post_endverbatim { $post_status= $post_vstatus; } sub post_finish { close(POST); } sub post_startindex { $post_status= ''; } sub post_endindex { $post_status= 'p'; } sub post_endindexitem { printf POST " %-11s %-.66s\n",$post_left,$post_para; $post_status= 'p'; $post_para= ''; } sub post_startindexitem { $post_left= $_[1]; } sub post_startindexmainitem { $post_left= $_[1]; print POST "\n" if $post_status eq 'p'; } sub post_startindent { $post_istatus= $post_status; &post_writepara; $post_indentstring= " $post_indentstring"; $post_nextindent= " $post_nextindent"; } sub post_endindent { $post_indentstring =~ s/^ //; $post_nextindent =~ s/^ //; $post_status= $post_istatus; } sub post_startpackedlist { $post_plc=0; } sub post_endpackedlist { &post_newline if !$post_plc; } sub post_packeditem { &post_newline if !$post_plc; &post_tab($post_plc*40+5); $post_plc= !$post_plc; } sub post_startlist { &post_endpara; $post_indentstring= " $post_indentstring"; $post_nextindent= " $post_nextindent"; } sub post_endlist { &post_endpara; $post_indentstring =~ s/^ //; $post_nextindent =~ s/^ //; } sub post_item { &post_newline; $post_indentstring =~ s/ $/* /; } sub post_pageref { &post_text("Q$_[1] \`"); } sub post_endpageref { &post_text("'"); } 1; fftw-2.1.5/FAQ/fftw-faq.ascii0000644000175400001440000006206407637531662011331 FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS 24 Mar 2003 Matteo Frigo Steven G. Johnson This is the list of Frequently Asked Questions about FFTW, a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. =============================================================================== Index Section 1. Introduction and General Information Q1.1 What is FFTW? Q1.2 How do I obtain FFTW? Q1.3 Is FFTW free software? Q1.4 What is this about non-free licenses? Section 2. Installing FFTW Q2.1 Which systems does FFTW run on? Q2.2 Does FFTW run on DOS/Windows? Q2.3 My compiler has trouble with FFTW. Q2.4 FFTW does not compile on Solaris, complaining about const. Q2.5 Which language is FFTW written in? Q2.6 Can I call FFTW from FORTRAN? Q2.7 Can I call FFTW from C++? Q2.8 Why isn't FFTW written in FORTRAN/C++? Q2.9 How do I compile FFTW to run in single precision? Section 3. Using FFTW Q3.1 FFTW seems really slow. Q3.2 FFTW slows down after repeated calls. Q3.3 An FFTW routine is crashing when I call it. Q3.4 My Fortran program crashes when calling FFTW. Q3.5 FFTW gives results different from my old FFT. Q3.6 Your in-place transform gives incorrect results. Q3.7 Can I save FFTW's plans? Q3.8 Why does your inverse transform return a scaled result? Q3.9 How can I make FFTW put the origin (zero frequency) at the center Q3.10 How do I FFT an image/audio file in *foobar* format? Q3.11 My program does not link (on Unix). Q3.12 My program crashes, complaining about stack space. Section 4. Internals of FFTW Q4.1 How does FFTW work? Q4.2 Why is FFTW so fast? Q4.3 What is this wisdom thing? Q4.4 Why do you use wisdom? I just wanted to save a plan. Section 5. Known bugs Q5.1 FFTW 1.1 crashes in rfftwnd on Linux. Q5.2 The MPI transforms in FFTW 1.2 give incorrect results/leak memory. Q5.3 The test programs in FFTW 1.2.1 fail when I change FFTW to use sin Q5.4 The test program in FFTW 1.2.1 fails for n > 46340. Q5.5 The threaded code fails on Linux Redhat 5.0 Q5.6 FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dime Q5.7 FFTW 2.0's complex transforms give the wrong results with prime fa Q5.8 FFTW 2.1.1's MPI test programs crash with MPICH. Q5.9 FFTW 2.1.2's multi-threaded transforms don't work on AIX. Q5.10 FFTW 2.1.2's complex transforms give incorrect results for large p Q5.11 FFTW 2.1.3 crashes on AIX =============================================================================== Section 1. Introduction and General Information Q1.1 What is FFTW? Q1.2 How do I obtain FFTW? Q1.3 Is FFTW free software? Q1.4 What is this about non-free licenses? ------------------------------------------------------------------------------- Question 1.1. What is FFTW? FFTW is a free collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, real, and parallel transforms, and can handle arbitrary array sizes efficiently. FFTW is typically faster than other publically-available FFT implementations, and is even competitive with vendor-tuned libraries. (See our web page for extensive benchmarks.) To achieve this performance, FFTW uses novel code-generation and runtime self-optimization techniques (along with many other tricks). ------------------------------------------------------------------------------- Question 1.2. How do I obtain FFTW? FFTW can be found at the FFTW web page. You can also retrieve it from ftp.fftw.org in /pub/fftw. ------------------------------------------------------------------------------- Question 1.3. Is FFTW free software? Starting with version 1.3, FFTW is Free Software in the technical sense defined by the Free Software Foundation (see Categories of Free and Non-Free Software), and is distributed under the terms of the GNU General Public License. Previous versions of FFTW were distributed without fee for noncommercial use, but were not technically ``free.'' Non-free licenses for FFTW are also available that permit different terms of use than the GPL. ------------------------------------------------------------------------------- Question 1.4. What is this about non-free licenses? The non-free licenses are for companies that wish to use FFTW in their products but are unwilling to release their software under the GPL (which would require them to release source code and allow free redistribution). Such users can purchase an unlimited-use license from MIT. Contact us for more details. We could instead have released FFTW under the LGPL, or even disallowed non-Free usage. Suffice it to say, however, that MIT owns the copyright to FFTW and they only let us GPL it because we convinced them that it would neither affect their licensing revenue nor irritate existing licensees. =============================================================================== Section 2. Installing FFTW Q2.1 Which systems does FFTW run on? Q2.2 Does FFTW run on DOS/Windows? Q2.3 My compiler has trouble with FFTW. Q2.4 FFTW does not compile on Solaris, complaining about const. Q2.5 Which language is FFTW written in? Q2.6 Can I call FFTW from FORTRAN? Q2.7 Can I call FFTW from C++? Q2.8 Why isn't FFTW written in FORTRAN/C++? Q2.9 How do I compile FFTW to run in single precision? ------------------------------------------------------------------------------- Question 2.1. Which systems does FFTW run on? FFTW is written in ANSI C, and should work on any system with a decent C compiler. (See also Q2.2 `Does FFTW run on DOS/Windows?' and Q2.3 `My compiler has trouble with FFTW.'.) ------------------------------------------------------------------------------- Question 2.2. Does FFTW run on DOS/Windows? It should. FFTW was not developed on DOS or Windows, but the source code is straight ANSI C. Some users have reported using FFTW on DOS/Windows using various compilers. See also the FFTW Windows installation notes and Q2.3 `My compiler has trouble with FFTW.' ------------------------------------------------------------------------------- Question 2.3. My compiler has trouble with FFTW. Complain fiercely to the vendor of the compiler. FFTW is a heavily-optimized piece of software that is likely to push compilers to their limits. We had no problems with, for example, gcc 2.7.2, egcs 1.1.x, Sun's SC4.0, and IBM's XLC. Users have also reported successful compilations of FFTW using Borland's C/C++ compilers on Windows. The Portland Group PGCC compiler, version 4.0 for Linux/x86, reportedly produces incorrect code for FFTW 2.1.3. Visual C++ 4.0 crashes when compiling FFTW 1.2 with all optimizations turned on. Visual C++ 5.0 reportedly produces incorrect code for the real transforms in FFTW 2.x when the option "Maximize speed" is set. We are told that Service Pack 3 fixes the bug. Metrowerks CodeWarrior Pro 4 reportedly generates incorrect code for the PowerPC when compiling FFTW at optimization level 4. Supposedly, this bug is fixed in CW Pro 5 with all the latest updates applied. (No problems were reported for previous versions.) Various problems have also been observed with SGI's MIPSpro compilers, versions 7.2.0 and 7.2.1 (you may have to lower the optimization level for some files to get them to compile); the bug seems to be fixed in version 7.3. The test program in earlier versions of FFTW had problems with the -xO5 option in Sun's SC4.0 C compiler. egcs 1.0.2 produced incorrect code for FFTW on the PowerPC (corrected in egcs 1.1). The DEC C compiler, V5.8-009 on Digital UNIX V4.0 (Rev. 1091) is known to have bugs with its EV6 tuning. Specifically, compiling FFTW with -arch host (the default) or -arch ev6 on an Alpha EV6 can cause FFTW (e.g. fftw_test -s 256) to crash. ------------------------------------------------------------------------------- Question 2.4. FFTW does not compile on Solaris, complaining about const. We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you might get error messages from make such as "./fftw.h", line 88: warning: const is a keyword in ANSI C This is the case when the configure script reports that const does not work: checking for working const... (cached) no You should be aware that Solaris comes with two compilers, namely, /opt/SUNWspro/SC4.2/bin/cc and /usr/ucb/cc. The latter compiler is non-ANSI. Indeed, it is a perverse shell script that calls the real compiler in non-ANSI mode. In order to compile FFTW, change your path so that the right cc is used. To know whether your compiler is the right one, type cc -V. If the compiler prints ``ucbcc'', as in ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2 then the compiler is wrong. The right message is something like cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2 ------------------------------------------------------------------------------- Question 2.5. Which language is FFTW written in? FFTW is written in ANSI C. Most of the code, however, was automatically generated by a program called genfft, written in the Objective Caml dialect of ML. You do not need to know ML or to have an Objective Caml compiler in order to use FFTW. genfft is provided with the FFTW sources, which means that you can play with the code generator if you want. In this case, you need a working Objective Caml system. Objective Caml is available from ftp.inria.fr in the directory /lang/caml-light. ------------------------------------------------------------------------------- Question 2.6. Can I call FFTW from FORTRAN? Yes, but not directly. The main problem is that Fortran cannot pass parameters by value. However, FFTW can be called indirectly from Fortran through the use of special C "wrapper" routines. Appropriate wrapper code, documented in the FFTW manual, is included with FFTW (versions 1.3 and higher). By default, FFTW configures its wrapper routines to work with the first compiler it finds, e.g. g77. To configure for a different, incompatible Fortran compiler foobar, use ./configure F77=foobar when installing FFTW. ------------------------------------------------------------------------------- Question 2.7. Can I call FFTW from C++? Most definitely. FFTW should compile and run under any C++ compiler. ------------------------------------------------------------------------------- Question 2.8. Why isn't FFTW written in FORTRAN/C++? Because we don't like those languages, and neither approaches the portability of C. ------------------------------------------------------------------------------- Question 2.9. How do I compile FFTW to run in single precision? On a Unix system: configure --enable-float. On a non-Unix system: edit fftw/fftw.h to #define the symbol FFTW_ENABLE_FLOAT. In both cases, you must then recompile FFTW. =============================================================================== Section 3. Using FFTW Q3.1 FFTW seems really slow. Q3.2 FFTW slows down after repeated calls. Q3.3 An FFTW routine is crashing when I call it. Q3.4 My Fortran program crashes when calling FFTW. Q3.5 FFTW gives results different from my old FFT. Q3.6 Your in-place transform gives incorrect results. Q3.7 Can I save FFTW's plans? Q3.8 Why does your inverse transform return a scaled result? Q3.9 How can I make FFTW put the origin (zero frequency) at the center Q3.10 How do I FFT an image/audio file in *foobar* format? Q3.11 My program does not link (on Unix). Q3.12 My program crashes, complaining about stack space. ------------------------------------------------------------------------------- Question 3.1. FFTW seems really slow. You are probably recreating the plan before every transform, rather than creating it once and reusing it for all transforms of the same size. FFTW is designed to be used in the following way: * First, you create a plan. This will take several seconds. * Then, you reuse the plan many times to perform FFTs. These are fast. If you don't need to compute many transforms and the time for the planner is significant, you have two options. First, you can use the FFTW_ESTIMATE option in the planner, which uses heuristics instead of runtime measurements and produces a good plan in a short time. Second, you can use the wisdom feature to precompute the plan; see Q3.7 `Can I save FFTW's plans?' ------------------------------------------------------------------------------- Question 3.2. FFTW slows down after repeated calls. Probably, NaNs or similar are creeping into your data, and the slowdown is due to the resulting floating-point exceptions. For example, be aware that repeatedly FFTing the same array is a diverging process (because FFTW computes the unnormalized transform). ------------------------------------------------------------------------------- Question 3.3. An FFTW routine is crashing when I call it. You almost certainly have a bug in your code. For example, you could be passing invalid arguments (such as wrongly-sized arrays) to FFTW, or you could simply have memory corruption elsewhere in your program that causes random crashes later on. Learn to debug, and don't complain to us unless you can come up with a minimal program (preferably under 30 lines) that illustrates the problem. ------------------------------------------------------------------------------- Question 3.4. My Fortran program crashes when calling FFTW. As described in the manual, on 64-bit machines you must store the plans in variables large enough to hold a pointer, for example integer*8. ------------------------------------------------------------------------------- Question 3.5. FFTW gives results different from my old FFT. People follow many different conventions for the DFT, and you should be sure to know the ones that we use (described in the FFTW manual). In particular, you should be aware that the FFTW_FORWARD/FFTW_BACKWARD directions correspond to signs of -1/+1 in the exponent of the DFT definition. (*Numerical Recipes* uses the opposite convention.) You should also know that we compute an unnormalized transform. In contrast, Matlab is an example of program that computes a normalized transform. See Q3.8 `Why does your inverse transform return a scaled result?'. Finally, note that floating-point arithmetic is not exact, so different FFT algorithms will give slightly different results (on the order of the numerical accuracy; typically a fractional difference of 1e-15 or so). ------------------------------------------------------------------------------- Question 3.6. Your in-place transform gives incorrect results. As described in the FFTW manual, the output array argument has a special meaning for FFTW_INPLACE transforms; you should not pass the input array for this argument. ------------------------------------------------------------------------------- Question 3.7. Can I save FFTW's plans? Yes. Starting with version 1.2, FFTW provides the wisdom mechanism for saving plans. See Q4.3 `What is this wisdom thing?' and the FFTW manual. ------------------------------------------------------------------------------- Question 3.8. Why does your inverse transform return a scaled result? Computing the forward transform followed by the backward transform (or vice versa) yields the original array scaled by the size of the array. (For multi-dimensional transforms, the size of the array is the product of the dimensions.) We could, instead, have chosen a normalization that would have returned the unscaled array. Or, to accomodate the many conventions in this matter, the transform routines could have accepted a "scale factor" parameter. We did not do this, however, for two reasons. First, we didn't want to sacrifice performance in the common case where the scale factor is 1. Second, in real applications the FFT is followed or preceded by some computation on the data, into which the scale factor can typically be absorbed at little or no cost. ------------------------------------------------------------------------------- Question 3.9. How can I make FFTW put the origin (zero frequency) at the center of its output? For human viewing of a spectrum, it is often convenient to put the origin in frequency space at the center of the output array, rather than in the zero-th element (the default in FFTW). If all of the dimensions of your array are even, you can accomplish this by simply multiplying each element of the input array by (-1)^(i + j + ...), where i, j, etcetera are the indices of the element. (This trick is a general property of the DFT, and is not specific to FFTW.) ------------------------------------------------------------------------------- Question 3.10. How do I FFT an image/audio file in *foobar* format? FFTW performs an FFT on an array of floating-point values. You can certainly use it to compute the transform of an image or audio stream, but you are responsible for figuring out your data format and converting it to the form FFTW requires. ------------------------------------------------------------------------------- Question 3.11. My program does not link (on Unix). Please use the exact order in which libraries are specified by the FFTW manual (e.g. -lrfftw -lfftw -lm). Also, note that the libraries must be listed after your program sources/objects. (The general rule is that if *A* uses *B*, then *A* must be listed before *B* in the link command.). For example, switching the order to -lfftw -lrfftw -lm will fail. ------------------------------------------------------------------------------- Question 3.12. My program crashes, complaining about stack space. You cannot declare large arrays statically; you should use malloc (or equivalent) to allocate the arrays you want to transform if they are larger than a few hundred elements. =============================================================================== Section 4. Internals of FFTW Q4.1 How does FFTW work? Q4.2 Why is FFTW so fast? Q4.3 What is this wisdom thing? Q4.4 Why do you use wisdom? I just wanted to save a plan. ------------------------------------------------------------------------------- Question 4.1. How does FFTW work? The innovation (if it can be so called) in FFTW consists in having an interpreter execute the transform. The program for the interpreter (the *plan*) is computed at runtime according to the characteristics of your machine/compiler. This peculiar software architecture allows FFTW to adapt itself to almost any machine. For more details, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page. See also "FFTW: An Adaptive Software Architecture for the FFT", in ICASSP '98. ------------------------------------------------------------------------------- Question 4.2. Why is FFTW so fast? This is a complex question, and there is no simple answer. In fact, the authors do not fully know the answer, either. In addition to many small performance hacks throughout FFTW, there are three general reasons for FFTW's speed. * FFTW uses an internal interpreter to adapt itself to a machine. See Q4.1 `How does FFTW work?'. * FFTW uses a code generator to produce highly-optimized routines for computing small transforms. * FFTW uses explicit divide-and-conquer to take advantage of the memory hierarchy. For more details on these three topics, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page. ------------------------------------------------------------------------------- Question 4.3. What is this wisdom thing? wisdom is the name of the mechanism that FFTW uses to save and restore plans. Rather than just saving plans, FFTW remembers what it learns about your machine, and becomes wiser and wiser as time passes by. You can save wisdom for later use. ------------------------------------------------------------------------------- Question 4.4. Why do you use wisdom? I just wanted to save a plan. wisdom could be implemented with less effort than a general plan-saving mechanism would have required. In addition, wisdom provides additional benefits. For example, if you are planning transforms of size 1024, and later you want a transform of size 2048, most of the calculations of the 1024 case can be reused. In short, wisdom does more things with less effort, and seemed like The Right Thing to do. =============================================================================== Section 5. Known bugs Q5.1 FFTW 1.1 crashes in rfftwnd on Linux. Q5.2 The MPI transforms in FFTW 1.2 give incorrect results/leak memory. Q5.3 The test programs in FFTW 1.2.1 fail when I change FFTW to use sin Q5.4 The test program in FFTW 1.2.1 fails for n > 46340. Q5.5 The threaded code fails on Linux Redhat 5.0 Q5.6 FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dime Q5.7 FFTW 2.0's complex transforms give the wrong results with prime fa Q5.8 FFTW 2.1.1's MPI test programs crash with MPICH. Q5.9 FFTW 2.1.2's multi-threaded transforms don't work on AIX. Q5.10 FFTW 2.1.2's complex transforms give incorrect results for large p Q5.11 FFTW 2.1.3 crashes on AIX ------------------------------------------------------------------------------- Question 5.1. FFTW 1.1 crashes in rfftwnd on Linux. This bug was fixed in FFTW 1.2. There was a bug in rfftwnd causing an incorrect amount of memory to be allocated. The bug showed up in Linux with libc-5.3.12 (and nowhere else that we know of). ------------------------------------------------------------------------------- Question 5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak memory. These bugs were corrected in FFTW 1.2.1. The MPI transforms (really, just the transpose routines) in FFTW 1.2 had bugs that could cause errors in some situations. ------------------------------------------------------------------------------- Question 5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. This bug was fixed in FFTW 1.3. (Older versions of FFTW did work in single precision, but the test programs didn't--the error tolerances in the tests were set for double precision.) ------------------------------------------------------------------------------- Question 5.4. The test program in FFTW 1.2.1 fails for n > 46340. This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer, but the test program was wrong. For large n, n*n in the naive transform that we used for comparison overflows 32 bit integer precision, breaking the test. ------------------------------------------------------------------------------- Question 5.5. The threaded code fails on Linux Redhat 5.0 We had problems with glibc-2.0.5. The code should work with glibc-2.0.7. ------------------------------------------------------------------------------- Question 5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow due to a poorly-parenthesized expression.) ------------------------------------------------------------------------------- Question 5.7. FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. There was a bug in the complex transforms that could cause incorrect results under (hopefully rare) circumstances for lengths with intermediate-size prime factors (17-97). This bug was fixed in FFTW 2.1.1. ------------------------------------------------------------------------------- Question 5.8. FFTW 2.1.1's MPI test programs crash with MPICH. This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed when using the MPICH implementation of MPI with the ch_p4 device (TCP/IP); the transforms themselves worked fine. ------------------------------------------------------------------------------- Question 5.9. FFTW 2.1.2's multi-threaded transforms don't work on AIX. This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in previous versions didn't work with AIX's pthreads implementation, which idiosyncratically creates threads in detached (non-joinable) mode by default. ------------------------------------------------------------------------------- Question 5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow problem that caused incorrect results for many primes greater than 32768 (on 32-bit machines). (Sizes without large prime factors are not affected.) ------------------------------------------------------------------------------- Question 5.11. FFTW 2.1.3 crashes on AIX The FFTW 2.1.3 configure script picked incorrect compiler flags for the xlc compiler on newer IBM processors. This is fixed in FFTW 2.1.4. fftw-2.1.5/FAQ/fftw-faq.info0000644000175400001440000006657107637531662011203 Info file: fftw-faq.info, -*-Text-*- produced by bfnnconv.pl from the Bizarre Format With No Name. START-INFO-DIR-ENTRY * FFTW FAQ: (fftw-faq). FFTW Frequently Asked Questions with Answers. END-INFO-DIR-ENTRY  File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir) FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS 24 Mar 2003 Matteo Frigo Steven G. Johnson This is the list of Frequently Asked Questions about FFTW, a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. Index * Menu: * Section 1:: Introduction and General Information * Section 2:: Installing FFTW * Section 3:: Using FFTW * Section 4:: Internals of FFTW * Section 5:: Known bugs Section 1, Introduction and General Information * Question 1.1:: What is FFTW? * Question 1.2:: How do I obtain FFTW? * Question 1.3:: Is FFTW free software? * Question 1.4:: What is this about non-free licenses? Section 2, Installing FFTW * Question 2.1:: Which systems does FFTW run on? * Question 2.2:: Does FFTW run on DOS/Windows? * Question 2.3:: My compiler has trouble with FFTW. * Question 2.4:: FFTW does not compile on Solaris, complaining about const. * Question 2.5:: Which language is FFTW written in? * Question 2.6:: Can I call FFTW from FORTRAN? * Question 2.7:: Can I call FFTW from C++? * Question 2.8:: Why isn't FFTW written in FORTRAN/C++? * Question 2.9:: How do I compile FFTW to run in single precision? Section 3, Using FFTW * Question 3.1:: FFTW seems really slow. * Question 3.2:: FFTW slows down after repeated calls. * Question 3.3:: An FFTW routine is crashing when I call it. * Question 3.4:: My Fortran program crashes when calling FFTW. * Question 3.5:: FFTW gives results different from my old FFT. * Question 3.6:: Your in-place transform gives incorrect results. * Question 3.7:: Can I save FFTW's plans? * Question 3.8:: Why does your inverse transform return a scaled result? * Question 3.9:: How can I make FFTW put the origin (zero frequency) at the center of its output? * Question 3.10:: How do I FFT an image/audio file in *foobar* format? * Question 3.11:: My program does not link (on Unix). * Question 3.12:: My program crashes, complaining about stack space. Section 4, Internals of FFTW * Question 4.1:: How does FFTW work? * Question 4.2:: Why is FFTW so fast? * Question 4.3:: What is this wisdom thing? * Question 4.4:: Why do you use wisdom? I just wanted to save a plan. Section 5, Known bugs * Question 5.1:: FFTW 1.1 crashes in rfftwnd on Linux. * Question 5.2:: The MPI transforms in FFTW 1.2 give incorrect results/leak memory. * Question 5.3:: The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. * Question 5.4:: The test program in FFTW 1.2.1 fails for n > 46340. * Question 5.5:: The threaded code fails on Linux Redhat 5.0 * Question 5.6:: FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. * Question 5.7:: FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. * Question 5.8:: FFTW 2.1.1's MPI test programs crash with MPICH. * Question 5.9:: FFTW 2.1.2's multi-threaded transforms don't work on AIX. * Question 5.10:: FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. * Question 5.11:: FFTW 2.1.3 crashes on AIX  File: fftw-faq.info, Node: Section 1, Next: Section 2, Previous: Top, Up: Top Introduction and General Information * Menu: * Question 1.1:: What is FFTW? * Question 1.2:: How do I obtain FFTW? * Question 1.3:: Is FFTW free software? * Question 1.4:: What is this about non-free licenses?  File: fftw-faq.info, Node: Question 1.1, Next: Question 1.2, Previous: Top, Up: Section 1 Question 1.1. What is FFTW? FFTW is a free collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, real, and parallel transforms, and can handle arbitrary array sizes efficiently. FFTW is typically faster than other publically-available FFT implementations, and is even competitive with vendor-tuned libraries. (See our web page for extensive benchmarks.) To achieve this performance, FFTW uses novel code-generation and runtime self-optimization techniques (along with many other tricks).  File: fftw-faq.info, Node: Question 1.2, Next: Question 1.3, Previous: Question 1.1, Up: Section 1 Question 1.2. How do I obtain FFTW? FFTW can be found at the FFTW web page. You can also retrieve it from ftp.fftw.org in /pub/fftw.  File: fftw-faq.info, Node: Question 1.3, Next: Question 1.4, Previous: Question 1.2, Up: Section 1 Question 1.3. Is FFTW free software? Starting with version 1.3, FFTW is Free Software in the technical sense defined by the Free Software Foundation (see Categories of Free and Non-Free Software), and is distributed under the terms of the GNU General Public License. Previous versions of FFTW were distributed without fee for noncommercial use, but were not technically ``free.'' Non-free licenses for FFTW are also available that permit different terms of use than the GPL.  File: fftw-faq.info, Node: Question 1.4, Next: Question 2.1, Previous: Question 1.3, Up: Section 1 Question 1.4. What is this about non-free licenses? The non-free licenses are for companies that wish to use FFTW in their products but are unwilling to release their software under the GPL (which would require them to release source code and allow free redistribution). Such users can purchase an unlimited-use license from MIT. Contact us for more details. We could instead have released FFTW under the LGPL, or even disallowed non-Free usage. Suffice it to say, however, that MIT owns the copyright to FFTW and they only let us GPL it because we convinced them that it would neither affect their licensing revenue nor irritate existing licensees.  File: fftw-faq.info, Node: Section 2, Next: Section 3, Previous: Section 1, Up: Top Installing FFTW * Menu: * Question 2.1:: Which systems does FFTW run on? * Question 2.2:: Does FFTW run on DOS/Windows? * Question 2.3:: My compiler has trouble with FFTW. * Question 2.4:: FFTW does not compile on Solaris, complaining about const. * Question 2.5:: Which language is FFTW written in? * Question 2.6:: Can I call FFTW from FORTRAN? * Question 2.7:: Can I call FFTW from C++? * Question 2.8:: Why isn't FFTW written in FORTRAN/C++? * Question 2.9:: How do I compile FFTW to run in single precision?  File: fftw-faq.info, Node: Question 2.1, Next: Question 2.2, Previous: Question 1.4, Up: Section 2 Question 2.1. Which systems does FFTW run on? FFTW is written in ANSI C, and should work on any system with a decent C compiler. (See also *Note Question 2.2:: `Does FFTW run on DOS/Windows?' and *Note Question 2.3:: `My compiler has trouble with FFTW.'.)  File: fftw-faq.info, Node: Question 2.2, Next: Question 2.3, Previous: Question 2.1, Up: Section 2 Question 2.2. Does FFTW run on DOS/Windows? It should. FFTW was not developed on DOS or Windows, but the source code is straight ANSI C. Some users have reported using FFTW on DOS/Windows using various compilers. See also the FFTW Windows installation notes and *Note Question 2.3:: `My compiler has trouble with FFTW.'  File: fftw-faq.info, Node: Question 2.3, Next: Question 2.4, Previous: Question 2.2, Up: Section 2 Question 2.3. My compiler has trouble with FFTW. Complain fiercely to the vendor of the compiler. FFTW is a heavily-optimized piece of software that is likely to push compilers to their limits. We had no problems with, for example, gcc 2.7.2, egcs 1.1.x, Sun's SC4.0, and IBM's XLC. Users have also reported successful compilations of FFTW using Borland's C/C++ compilers on Windows. The Portland Group PGCC compiler, version 4.0 for Linux/x86, reportedly produces incorrect code for FFTW 2.1.3. Visual C++ 4.0 crashes when compiling FFTW 1.2 with all optimizations turned on. Visual C++ 5.0 reportedly produces incorrect code for the real transforms in FFTW 2.x when the option "Maximize speed" is set. We are told that Service Pack 3 fixes the bug. Metrowerks CodeWarrior Pro 4 reportedly generates incorrect code for the PowerPC when compiling FFTW at optimization level 4. Supposedly, this bug is fixed in CW Pro 5 with all the latest updates applied. (No problems were reported for previous versions.) Various problems have also been observed with SGI's MIPSpro compilers, versions 7.2.0 and 7.2.1 (you may have to lower the optimization level for some files to get them to compile); the bug seems to be fixed in version 7.3. The test program in earlier versions of FFTW had problems with the -xO5 option in Sun's SC4.0 C compiler. egcs 1.0.2 produced incorrect code for FFTW on the PowerPC (corrected in egcs 1.1). The DEC C compiler, V5.8-009 on Digital UNIX V4.0 (Rev. 1091) is known to have bugs with its EV6 tuning. Specifically, compiling FFTW with -arch host (the default) or -arch ev6 on an Alpha EV6 can cause FFTW (e.g. fftw_test -s 256) to crash.  File: fftw-faq.info, Node: Question 2.4, Next: Question 2.5, Previous: Question 2.3, Up: Section 2 Question 2.4. FFTW does not compile on Solaris, complaining about const. We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you might get error messages from make such as "./fftw.h", line 88: warning: const is a keyword in ANSI C This is the case when the configure script reports that const does not work: checking for working const... (cached) no You should be aware that Solaris comes with two compilers, namely, /opt/SUNWspro/SC4.2/bin/cc and /usr/ucb/cc. The latter compiler is non-ANSI. Indeed, it is a perverse shell script that calls the real compiler in non-ANSI mode. In order to compile FFTW, change your path so that the right cc is used. To know whether your compiler is the right one, type cc -V. If the compiler prints ``ucbcc'', as in ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2 then the compiler is wrong. The right message is something like cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2  File: fftw-faq.info, Node: Question 2.5, Next: Question 2.6, Previous: Question 2.4, Up: Section 2 Question 2.5. Which language is FFTW written in? FFTW is written in ANSI C. Most of the code, however, was automatically generated by a program called genfft, written in the Objective Caml dialect of ML. You do not need to know ML or to have an Objective Caml compiler in order to use FFTW. genfft is provided with the FFTW sources, which means that you can play with the code generator if you want. In this case, you need a working Objective Caml system. Objective Caml is available from ftp.inria.fr in the directory /lang/caml-light.  File: fftw-faq.info, Node: Question 2.6, Next: Question 2.7, Previous: Question 2.5, Up: Section 2 Question 2.6. Can I call FFTW from FORTRAN? Yes, but not directly. The main problem is that Fortran cannot pass parameters by value. However, FFTW can be called indirectly from Fortran through the use of special C "wrapper" routines. Appropriate wrapper code, documented in the FFTW manual, is included with FFTW (versions 1.3 and higher). By default, FFTW configures its wrapper routines to work with the first compiler it finds, e.g. g77. To configure for a different, incompatible Fortran compiler foobar, use ./configure F77=foobar when installing FFTW.  File: fftw-faq.info, Node: Question 2.7, Next: Question 2.8, Previous: Question 2.6, Up: Section 2 Question 2.7. Can I call FFTW from C++? Most definitely. FFTW should compile and run under any C++ compiler.  File: fftw-faq.info, Node: Question 2.8, Next: Question 2.9, Previous: Question 2.7, Up: Section 2 Question 2.8. Why isn't FFTW written in FORTRAN/C++? Because we don't like those languages, and neither approaches the portability of C.  File: fftw-faq.info, Node: Question 2.9, Next: Question 3.1, Previous: Question 2.8, Up: Section 2 Question 2.9. How do I compile FFTW to run in single precision? On a Unix system: configure --enable-float. On a non-Unix system: edit fftw/fftw.h to #define the symbol FFTW_ENABLE_FLOAT. In both cases, you must then recompile FFTW.  File: fftw-faq.info, Node: Section 3, Next: Section 4, Previous: Section 2, Up: Top Using FFTW * Menu: * Question 3.1:: FFTW seems really slow. * Question 3.2:: FFTW slows down after repeated calls. * Question 3.3:: An FFTW routine is crashing when I call it. * Question 3.4:: My Fortran program crashes when calling FFTW. * Question 3.5:: FFTW gives results different from my old FFT. * Question 3.6:: Your in-place transform gives incorrect results. * Question 3.7:: Can I save FFTW's plans? * Question 3.8:: Why does your inverse transform return a scaled result? * Question 3.9:: How can I make FFTW put the origin (zero frequency) at the center of its output? * Question 3.10:: How do I FFT an image/audio file in *foobar* format? * Question 3.11:: My program does not link (on Unix). * Question 3.12:: My program crashes, complaining about stack space.  File: fftw-faq.info, Node: Question 3.1, Next: Question 3.2, Previous: Question 2.9, Up: Section 3 Question 3.1. FFTW seems really slow. You are probably recreating the plan before every transform, rather than creating it once and reusing it for all transforms of the same size. FFTW is designed to be used in the following way: * First, you create a plan. This will take several seconds. * Then, you reuse the plan many times to perform FFTs. These are fast. If you don't need to compute many transforms and the time for the planner is significant, you have two options. First, you can use the FFTW_ESTIMATE option in the planner, which uses heuristics instead of runtime measurements and produces a good plan in a short time. Second, you can use the wisdom feature to precompute the plan; see *Note Question 3.7:: `Can I save FFTW's plans?'  File: fftw-faq.info, Node: Question 3.2, Next: Question 3.3, Previous: Question 3.1, Up: Section 3 Question 3.2. FFTW slows down after repeated calls. Probably, NaNs or similar are creeping into your data, and the slowdown is due to the resulting floating-point exceptions. For example, be aware that repeatedly FFTing the same array is a diverging process (because FFTW computes the unnormalized transform).  File: fftw-faq.info, Node: Question 3.3, Next: Question 3.4, Previous: Question 3.2, Up: Section 3 Question 3.3. An FFTW routine is crashing when I call it. You almost certainly have a bug in your code. For example, you could be passing invalid arguments (such as wrongly-sized arrays) to FFTW, or you could simply have memory corruption elsewhere in your program that causes random crashes later on. Learn to debug, and don't complain to us unless you can come up with a minimal program (preferably under 30 lines) that illustrates the problem.  File: fftw-faq.info, Node: Question 3.4, Next: Question 3.5, Previous: Question 3.3, Up: Section 3 Question 3.4. My Fortran program crashes when calling FFTW. As described in the manual, on 64-bit machines you must store the plans in variables large enough to hold a pointer, for example integer*8.  File: fftw-faq.info, Node: Question 3.5, Next: Question 3.6, Previous: Question 3.4, Up: Section 3 Question 3.5. FFTW gives results different from my old FFT. People follow many different conventions for the DFT, and you should be sure to know the ones that we use (described in the FFTW manual). In particular, you should be aware that the FFTW_FORWARD/FFTW_BACKWARD directions correspond to signs of -1/+1 in the exponent of the DFT definition. (*Numerical Recipes* uses the opposite convention.) You should also know that we compute an unnormalized transform. In contrast, Matlab is an example of program that computes a normalized transform. See *Note Question 3.8:: `Why does your inverse transform return a scaled result?'. Finally, note that floating-point arithmetic is not exact, so different FFT algorithms will give slightly different results (on the order of the numerical accuracy; typically a fractional difference of 1e-15 or so).  File: fftw-faq.info, Node: Question 3.6, Next: Question 3.7, Previous: Question 3.5, Up: Section 3 Question 3.6. Your in-place transform gives incorrect results. As described in the FFTW manual, the output array argument has a special meaning for FFTW_INPLACE transforms; you should not pass the input array for this argument.  File: fftw-faq.info, Node: Question 3.7, Next: Question 3.8, Previous: Question 3.6, Up: Section 3 Question 3.7. Can I save FFTW's plans? Yes. Starting with version 1.2, FFTW provides the wisdom mechanism for saving plans. See *Note Question 4.3:: `What is this wisdom thing?' and the FFTW manual.  File: fftw-faq.info, Node: Question 3.8, Next: Question 3.9, Previous: Question 3.7, Up: Section 3 Question 3.8. Why does your inverse transform return a scaled result? Computing the forward transform followed by the backward transform (or vice versa) yields the original array scaled by the size of the array. (For multi-dimensional transforms, the size of the array is the product of the dimensions.) We could, instead, have chosen a normalization that would have returned the unscaled array. Or, to accomodate the many conventions in this matter, the transform routines could have accepted a "scale factor" parameter. We did not do this, however, for two reasons. First, we didn't want to sacrifice performance in the common case where the scale factor is 1. Second, in real applications the FFT is followed or preceded by some computation on the data, into which the scale factor can typically be absorbed at little or no cost.  File: fftw-faq.info, Node: Question 3.9, Next: Question 3.10, Previous: Question 3.8, Up: Section 3 Question 3.9. How can I make FFTW put the origin (zero frequency) at the center of its output? For human viewing of a spectrum, it is often convenient to put the origin in frequency space at the center of the output array, rather than in the zero-th element (the default in FFTW). If all of the dimensions of your array are even, you can accomplish this by simply multiplying each element of the input array by (-1)^(i + j + ...), where i, j, etcetera are the indices of the element. (This trick is a general property of the DFT, and is not specific to FFTW.)  File: fftw-faq.info, Node: Question 3.10, Next: Question 3.11, Previous: Question 3.9, Up: Section 3 Question 3.10. How do I FFT an image/audio file in *foobar* format? FFTW performs an FFT on an array of floating-point values. You can certainly use it to compute the transform of an image or audio stream, but you are responsible for figuring out your data format and converting it to the form FFTW requires.  File: fftw-faq.info, Node: Question 3.11, Next: Question 3.12, Previous: Question 3.10, Up: Section 3 Question 3.11. My program does not link (on Unix). Please use the exact order in which libraries are specified by the FFTW manual (e.g. -lrfftw -lfftw -lm). Also, note that the libraries must be listed after your program sources/objects. (The general rule is that if *A* uses *B*, then *A* must be listed before *B* in the link command.). For example, switching the order to -lfftw -lrfftw -lm will fail.  File: fftw-faq.info, Node: Question 3.12, Next: Question 4.1, Previous: Question 3.11, Up: Section 3 Question 3.12. My program crashes, complaining about stack space. You cannot declare large arrays statically; you should use malloc (or equivalent) to allocate the arrays you want to transform if they are larger than a few hundred elements.  File: fftw-faq.info, Node: Section 4, Next: Section 5, Previous: Section 3, Up: Top Internals of FFTW * Menu: * Question 4.1:: How does FFTW work? * Question 4.2:: Why is FFTW so fast? * Question 4.3:: What is this wisdom thing? * Question 4.4:: Why do you use wisdom? I just wanted to save a plan.  File: fftw-faq.info, Node: Question 4.1, Next: Question 4.2, Previous: Question 3.12, Up: Section 4 Question 4.1. How does FFTW work? The innovation (if it can be so called) in FFTW consists in having an interpreter execute the transform. The program for the interpreter (the *plan*) is computed at runtime according to the characteristics of your machine/compiler. This peculiar software architecture allows FFTW to adapt itself to almost any machine. For more details, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page. See also "FFTW: An Adaptive Software Architecture for the FFT", in ICASSP '98.  File: fftw-faq.info, Node: Question 4.2, Next: Question 4.3, Previous: Question 4.1, Up: Section 4 Question 4.2. Why is FFTW so fast? This is a complex question, and there is no simple answer. In fact, the authors do not fully know the answer, either. In addition to many small performance hacks throughout FFTW, there are three general reasons for FFTW's speed. * FFTW uses an internal interpreter to adapt itself to a machine. See *Note Question 4.1:: `How does FFTW work?'. * FFTW uses a code generator to produce highly-optimized routines for computing small transforms. * FFTW uses explicit divide-and-conquer to take advantage of the memory hierarchy. For more details on these three topics, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page.  File: fftw-faq.info, Node: Question 4.3, Next: Question 4.4, Previous: Question 4.2, Up: Section 4 Question 4.3. What is this wisdom thing? wisdom is the name of the mechanism that FFTW uses to save and restore plans. Rather than just saving plans, FFTW remembers what it learns about your machine, and becomes wiser and wiser as time passes by. You can save wisdom for later use.  File: fftw-faq.info, Node: Question 4.4, Next: Question 5.1, Previous: Question 4.3, Up: Section 4 Question 4.4. Why do you use wisdom? I just wanted to save a plan. wisdom could be implemented with less effort than a general plan-saving mechanism would have required. In addition, wisdom provides additional benefits. For example, if you are planning transforms of size 1024, and later you want a transform of size 2048, most of the calculations of the 1024 case can be reused. In short, wisdom does more things with less effort, and seemed like The Right Thing to do.  File: fftw-faq.info, Node: Section 5, Previous: Section 4, Up: Top Known bugs * Menu: * Question 5.1:: FFTW 1.1 crashes in rfftwnd on Linux. * Question 5.2:: The MPI transforms in FFTW 1.2 give incorrect results/leak memory. * Question 5.3:: The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. * Question 5.4:: The test program in FFTW 1.2.1 fails for n > 46340. * Question 5.5:: The threaded code fails on Linux Redhat 5.0 * Question 5.6:: FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. * Question 5.7:: FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. * Question 5.8:: FFTW 2.1.1's MPI test programs crash with MPICH. * Question 5.9:: FFTW 2.1.2's multi-threaded transforms don't work on AIX. * Question 5.10:: FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. * Question 5.11:: FFTW 2.1.3 crashes on AIX  File: fftw-faq.info, Node: Question 5.1, Next: Question 5.2, Previous: Question 4.4, Up: Section 5 Question 5.1. FFTW 1.1 crashes in rfftwnd on Linux. This bug was fixed in FFTW 1.2. There was a bug in rfftwnd causing an incorrect amount of memory to be allocated. The bug showed up in Linux with libc-5.3.12 (and nowhere else that we know of).  File: fftw-faq.info, Node: Question 5.2, Next: Question 5.3, Previous: Question 5.1, Up: Section 5 Question 5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak memory. These bugs were corrected in FFTW 1.2.1. The MPI transforms (really, just the transpose routines) in FFTW 1.2 had bugs that could cause errors in some situations.  File: fftw-faq.info, Node: Question 5.3, Next: Question 5.4, Previous: Question 5.2, Up: Section 5 Question 5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. This bug was fixed in FFTW 1.3. (Older versions of FFTW did work in single precision, but the test programs didn't--the error tolerances in the tests were set for double precision.)  File: fftw-faq.info, Node: Question 5.4, Next: Question 5.5, Previous: Question 5.3, Up: Section 5 Question 5.4. The test program in FFTW 1.2.1 fails for n > 46340. This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer, but the test program was wrong. For large n, n*n in the naive transform that we used for comparison overflows 32 bit integer precision, breaking the test.  File: fftw-faq.info, Node: Question 5.5, Next: Question 5.6, Previous: Question 5.4, Up: Section 5 Question 5.5. The threaded code fails on Linux Redhat 5.0 We had problems with glibc-2.0.5. The code should work with glibc-2.0.7.  File: fftw-faq.info, Node: Question 5.6, Next: Question 5.7, Previous: Question 5.5, Up: Section 5 Question 5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow due to a poorly-parenthesized expression.)  File: fftw-faq.info, Node: Question 5.7, Next: Question 5.8, Previous: Question 5.6, Up: Section 5 Question 5.7. FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. There was a bug in the complex transforms that could cause incorrect results under (hopefully rare) circumstances for lengths with intermediate-size prime factors (17-97). This bug was fixed in FFTW 2.1.1.  File: fftw-faq.info, Node: Question 5.8, Next: Question 5.9, Previous: Question 5.7, Up: Section 5 Question 5.8. FFTW 2.1.1's MPI test programs crash with MPICH. This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed when using the MPICH implementation of MPI with the ch_p4 device (TCP/IP); the transforms themselves worked fine.  File: fftw-faq.info, Node: Question 5.9, Next: Question 5.10, Previous: Question 5.8, Up: Section 5 Question 5.9. FFTW 2.1.2's multi-threaded transforms don't work on AIX. This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in previous versions didn't work with AIX's pthreads implementation, which idiosyncratically creates threads in detached (non-joinable) mode by default.  File: fftw-faq.info, Node: Question 5.10, Next: Question 5.11, Previous: Question 5.9, Up: Section 5 Question 5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow problem that caused incorrect results for many primes greater than 32768 (on 32-bit machines). (Sizes without large prime factors are not affected.)  File: fftw-faq.info, Node: Question 5.11, Previous: Question 5.10, Up: Section 5 Question 5.11. FFTW 2.1.3 crashes on AIX The FFTW 2.1.3 configure script picked incorrect compiler flags for the xlc compiler on newer IBM processors. This is fixed in FFTW 2.1.4. fftw-2.1.5/FAQ/fftw-faq.html/0002777000175400001440000000000007637531662011340 5fftw-2.1.5/FAQ/fftw-faq.html/index.html0000644000175400001440000001375007637531662013255 FFTW Frequently Asked Questions with Answers

    FFTW Frequently Asked Questions with Answers

    This is the list of Frequently Asked Questions about FFTW, a collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions.

    Index


    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.html/section1.html0000644000175400001440000000642307637531662013672 FFTW FAQ - Section 1

    FFTW FAQ - Section 1
    Introduction and General Information


    Question 1.1. What is FFTW?

    FFTW is a free collection of fast C routines for computing the Discrete Fourier Transform in one or more dimensions. It includes complex, real, and parallel transforms, and can handle arbitrary array sizes efficiently. FFTW is typically faster than other publically-available FFT implementations, and is even competitive with vendor-tuned libraries. (See our web page for extensive benchmarks.) To achieve this performance, FFTW uses novel code-generation and runtime self-optimization techniques (along with many other tricks).

    Question 1.2. How do I obtain FFTW?

    FFTW can be found at the FFTW web page. You can also retrieve it from ftp.fftw.org in /pub/fftw.

    Question 1.3. Is FFTW free software?

    Starting with version 1.3, FFTW is Free Software in the technical sense defined by the Free Software Foundation (see Categories of Free and Non-Free Software), and is distributed under the terms of the GNU General Public License. Previous versions of FFTW were distributed without fee for noncommercial use, but were not technically ``free.''

    Non-free licenses for FFTW are also available that permit different terms of use than the GPL.

    Question 1.4. What is this about non-free licenses?

    The non-free licenses are for companies that wish to use FFTW in their products but are unwilling to release their software under the GPL (which would require them to release source code and allow free redistribution). Such users can purchase an unlimited-use license from MIT. Contact us for more details.

    We could instead have released FFTW under the LGPL, or even disallowed non-Free usage. Suffice it to say, however, that MIT owns the copyright to FFTW and they only let us GPL it because we convinced them that it would neither affect their licensing revenue nor irritate existing licensees.


    Next: Installing FFTW.
    Return to contents.

    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.html/section2.html0000644000175400001440000001675207637531662013701 FFTW FAQ - Section 2

    FFTW FAQ - Section 2
    Installing FFTW


    Question 2.1. Which systems does FFTW run on?

    FFTW is written in ANSI C, and should work on any system with a decent C compiler. (See also Q2.2 `Does FFTW run on DOS/Windows?' and Q2.3 `My compiler has trouble with FFTW.'.)

    Question 2.2. Does FFTW run on DOS/Windows?

    It should. FFTW was not developed on DOS or Windows, but the source code is straight ANSI C. Some users have reported using FFTW on DOS/Windows using various compilers. See also the FFTW Windows installation notes and Q2.3 `My compiler has trouble with FFTW.'

    Question 2.3. My compiler has trouble with FFTW.

    Complain fiercely to the vendor of the compiler.

    FFTW is a heavily-optimized piece of software that is likely to push compilers to their limits. We had no problems with, for example, gcc 2.7.2, egcs 1.1.x, Sun's SC4.0, and IBM's XLC. Users have also reported successful compilations of FFTW using Borland's C/C++ compilers on Windows.

    The Portland Group PGCC compiler, version 4.0 for Linux/x86, reportedly produces incorrect code for FFTW 2.1.3.

    Visual C++ 4.0 crashes when compiling FFTW 1.2 with all optimizations turned on. Visual C++ 5.0 reportedly produces incorrect code for the real transforms in FFTW 2.x when the option "Maximize speed" is set. We are told that Service Pack 3 fixes the bug.

    Metrowerks CodeWarrior Pro 4 reportedly generates incorrect code for the PowerPC when compiling FFTW at optimization level 4. Supposedly, this bug is fixed in CW Pro 5 with all the latest updates applied. (No problems were reported for previous versions.)

    Various problems have also been observed with SGI's MIPSpro compilers, versions 7.2.0 and 7.2.1 (you may have to lower the optimization level for some files to get them to compile); the bug seems to be fixed in version 7.3. The test program in earlier versions of FFTW had problems with the -xO5 option in Sun's SC4.0 C compiler. egcs 1.0.2 produced incorrect code for FFTW on the PowerPC (corrected in egcs 1.1).

    The DEC C compiler, V5.8-009 on Digital UNIX V4.0 (Rev. 1091) is known to have bugs with its EV6 tuning. Specifically, compiling FFTW with -arch host (the default) or -arch ev6 on an Alpha EV6 can cause FFTW (e.g. fftw_test -s 256) to crash.

    Question 2.4. FFTW does not compile on Solaris, complaining about const.

    We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you might get error messages from make such as

    "./fftw.h", line 88: warning: const is a keyword in ANSI C

    This is the case when the configure script reports that const does not work:

    checking for working const... (cached) no

    You should be aware that Solaris comes with two compilers, namely, /opt/SUNWspro/SC4.2/bin/cc and /usr/ucb/cc. The latter compiler is non-ANSI. Indeed, it is a perverse shell script that calls the real compiler in non-ANSI mode. In order to compile FFTW, change your path so that the right cc is used.

    To know whether your compiler is the right one, type cc -V. If the compiler prints ``ucbcc'', as in

    ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2

    then the compiler is wrong. The right message is something like

    cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2

    Question 2.5. Which language is FFTW written in?

    FFTW is written in ANSI C. Most of the code, however, was automatically generated by a program called genfft, written in the Objective Caml dialect of ML. You do not need to know ML or to have an Objective Caml compiler in order to use FFTW.

    genfft is provided with the FFTW sources, which means that you can play with the code generator if you want. In this case, you need a working Objective Caml system. Objective Caml is available from ftp.inria.fr in the directory /lang/caml-light.

    Question 2.6. Can I call FFTW from FORTRAN?

    Yes, but not directly. The main problem is that Fortran cannot pass parameters by value. However, FFTW can be called indirectly from Fortran through the use of special C "wrapper" routines. Appropriate wrapper code, documented in the FFTW manual, is included with FFTW (versions 1.3 and higher).

    By default, FFTW configures its wrapper routines to work with the first compiler it finds, e.g. g77. To configure for a different, incompatible Fortran compiler foobar, use ./configure F77=foobar when installing FFTW.

    Question 2.7. Can I call FFTW from C++?

    Most definitely. FFTW should compile and run under any C++ compiler.

    Question 2.8. Why isn't FFTW written in FORTRAN/C++?

    Because we don't like those languages, and neither approaches the portability of C.

    Question 2.9. How do I compile FFTW to run in single precision?

    On a Unix system: configure --enable-float. On a non-Unix system: edit fftw/fftw.h to #define the symbol FFTW_ENABLE_FLOAT. In both cases, you must then recompile FFTW.
    Next: Using FFTW.
    Back: Introduction and General Information.
    Return to contents.

    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.html/section3.html0000644000175400001440000001776407637531662013706 FFTW FAQ - Section 3

    FFTW FAQ - Section 3
    Using FFTW


    Question 3.1. FFTW seems really slow.

    You are probably recreating the plan before every transform, rather than creating it once and reusing it for all transforms of the same size. FFTW is designed to be used in the following way:
    • First, you create a plan. This will take several seconds.
    • Then, you reuse the plan many times to perform FFTs. These are fast.
    If you don't need to compute many transforms and the time for the planner is significant, you have two options. First, you can use the FFTW_ESTIMATE option in the planner, which uses heuristics instead of runtime measurements and produces a good plan in a short time. Second, you can use the wisdom feature to precompute the plan; see Q3.7 `Can I save FFTW's plans?'

    Question 3.2. FFTW slows down after repeated calls.

    Probably, NaNs or similar are creeping into your data, and the slowdown is due to the resulting floating-point exceptions. For example, be aware that repeatedly FFTing the same array is a diverging process (because FFTW computes the unnormalized transform).

    Question 3.3. An FFTW routine is crashing when I call it.

    You almost certainly have a bug in your code. For example, you could be passing invalid arguments (such as wrongly-sized arrays) to FFTW, or you could simply have memory corruption elsewhere in your program that causes random crashes later on. Learn to debug, and don't complain to us unless you can come up with a minimal program (preferably under 30 lines) that illustrates the problem.

    Question 3.4. My Fortran program crashes when calling FFTW.

    As described in the manual, on 64-bit machines you must store the plans in variables large enough to hold a pointer, for example integer*8.

    Question 3.5. FFTW gives results different from my old FFT.

    People follow many different conventions for the DFT, and you should be sure to know the ones that we use (described in the FFTW manual). In particular, you should be aware that the FFTW_FORWARD/FFTW_BACKWARD directions correspond to signs of -1/+1 in the exponent of the DFT definition. (Numerical Recipes uses the opposite convention.)

    You should also know that we compute an unnormalized transform. In contrast, Matlab is an example of program that computes a normalized transform. See Q3.8 `Why does your inverse transform return a scaled result?'.

    Finally, note that floating-point arithmetic is not exact, so different FFT algorithms will give slightly different results (on the order of the numerical accuracy; typically a fractional difference of 1e-15 or so).

    Question 3.6. Your in-place transform gives incorrect results.

    As described in the FFTW manual, the output array argument has a special meaning for FFTW_INPLACE transforms; you should not pass the input array for this argument.

    Question 3.7. Can I save FFTW's plans?

    Yes. Starting with version 1.2, FFTW provides the wisdom mechanism for saving plans. See Q4.3 `What is this wisdom thing?' and the FFTW manual.

    Question 3.8. Why does your inverse transform return a scaled result?

    Computing the forward transform followed by the backward transform (or vice versa) yields the original array scaled by the size of the array. (For multi-dimensional transforms, the size of the array is the product of the dimensions.) We could, instead, have chosen a normalization that would have returned the unscaled array. Or, to accomodate the many conventions in this matter, the transform routines could have accepted a "scale factor" parameter. We did not do this, however, for two reasons. First, we didn't want to sacrifice performance in the common case where the scale factor is 1. Second, in real applications the FFT is followed or preceded by some computation on the data, into which the scale factor can typically be absorbed at little or no cost.

    Question 3.9. How can I make FFTW put the origin (zero frequency) at the center of its output?

    For human viewing of a spectrum, it is often convenient to put the origin in frequency space at the center of the output array, rather than in the zero-th element (the default in FFTW). If all of the dimensions of your array are even, you can accomplish this by simply multiplying each element of the input array by (-1)^(i + j + ...), where i, j, etcetera are the indices of the element. (This trick is a general property of the DFT, and is not specific to FFTW.)

    Question 3.10. How do I FFT an image/audio file in foobar format?

    FFTW performs an FFT on an array of floating-point values. You can certainly use it to compute the transform of an image or audio stream, but you are responsible for figuring out your data format and converting it to the form FFTW requires.

    Question 3.11. My program does not link (on Unix).

    Please use the exact order in which libraries are specified by the FFTW manual (e.g. -lrfftw -lfftw -lm). Also, note that the libraries must be listed after your program sources/objects. (The general rule is that if A uses B, then A must be listed before B in the link command.). For example, switching the order to -lfftw -lrfftw -lm will fail.

    Question 3.12. My program crashes, complaining about stack space.

    You cannot declare large arrays statically; you should use malloc (or equivalent) to allocate the arrays you want to transform if they are larger than a few hundred elements.
    Next: Internals of FFTW.
    Back: Installing FFTW.
    Return to contents.

    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.html/section4.html0000644000175400001440000000726407637531662013701 FFTW FAQ - Section 4

    FFTW FAQ - Section 4
    Internals of FFTW


    Question 4.1. How does FFTW work?

    The innovation (if it can be so called) in FFTW consists in having an interpreter execute the transform. The program for the interpreter (the plan) is computed at runtime according to the characteristics of your machine/compiler. This peculiar software architecture allows FFTW to adapt itself to almost any machine.

    For more details, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page. See also "FFTW: An Adaptive Software Architecture for the FFT", in ICASSP '98.

    Question 4.2. Why is FFTW so fast?

    This is a complex question, and there is no simple answer. In fact, the authors do not fully know the answer, either. In addition to many small performance hacks throughout FFTW, there are three general reasons for FFTW's speed.
    • FFTW uses an internal interpreter to adapt itself to a machine. See Q4.1 `How does FFTW work?'.
    • FFTW uses a code generator to produce highly-optimized routines for computing small transforms.
    • FFTW uses explicit divide-and-conquer to take advantage of the memory hierarchy.
    For more details on these three topics, see the paper "The Fastest Fourier Transform in the West", by M. Frigo and S. G. Johnson, available at the FFTW web page.

    Question 4.3. What is this wisdom thing?

    wisdom is the name of the mechanism that FFTW uses to save and restore plans. Rather than just saving plans, FFTW remembers what it learns about your machine, and becomes wiser and wiser as time passes by. You can save wisdom for later use.

    Question 4.4. Why do you use wisdom? I just wanted to save a plan.

    wisdom could be implemented with less effort than a general plan-saving mechanism would have required. In addition, wisdom provides additional benefits. For example, if you are planning transforms of size 1024, and later you want a transform of size 2048, most of the calculations of the 1024 case can be reused.

    In short, wisdom does more things with less effort, and seemed like The Right Thing to do.


    Next: Known bugs.
    Back: Using FFTW.
    Return to contents.

    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.html/section5.html0000644000175400001440000001247407637531662013701 FFTW FAQ - Section 5

    FFTW FAQ - Section 5
    Known bugs


    Question 5.1. FFTW 1.1 crashes in rfftwnd on Linux.

    This bug was fixed in FFTW 1.2. There was a bug in rfftwnd causing an incorrect amount of memory to be allocated. The bug showed up in Linux with libc-5.3.12 (and nowhere else that we know of).

    Question 5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak memory.

    These bugs were corrected in FFTW 1.2.1. The MPI transforms (really, just the transpose routines) in FFTW 1.2 had bugs that could cause errors in some situations.

    Question 5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision.

    This bug was fixed in FFTW 1.3. (Older versions of FFTW did work in single precision, but the test programs didn't--the error tolerances in the tests were set for double precision.)

    Question 5.4. The test program in FFTW 1.2.1 fails for n > 46340.

    This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer, but the test program was wrong. For large n, n*n in the naive transform that we used for comparison overflows 32 bit integer precision, breaking the test.

    Question 5.5. The threaded code fails on Linux Redhat 5.0

    We had problems with glibc-2.0.5. The code should work with glibc-2.0.7.

    Question 5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536.

    This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow due to a poorly-parenthesized expression.)

    Question 5.7. FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97.

    There was a bug in the complex transforms that could cause incorrect results under (hopefully rare) circumstances for lengths with intermediate-size prime factors (17-97). This bug was fixed in FFTW 2.1.1.

    Question 5.8. FFTW 2.1.1's MPI test programs crash with MPICH.

    This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed when using the MPICH implementation of MPI with the ch_p4 device (TCP/IP); the transforms themselves worked fine.

    Question 5.9. FFTW 2.1.2's multi-threaded transforms don't work on AIX.

    This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in previous versions didn't work with AIX's pthreads implementation, which idiosyncratically creates threads in detached (non-joinable) mode by default.

    Question 5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime sizes.

    This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow problem that caused incorrect results for many primes greater than 32768 (on 32-bit machines). (Sizes without large prime factors are not affected.)

    Question 5.11. FFTW 2.1.3 crashes on AIX

    The FFTW 2.1.3 configure script picked incorrect compiler flags for the xlc compiler on newer IBM processors. This is fixed in FFTW 2.1.4.
    Back: Internals of FFTW.
    Return to contents.

    Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 24 March 2003

    Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 2003 Massachusetts Institute of Technology. fftw-2.1.5/FAQ/fftw-faq.xrefdb0000644000175400001440000000502207637531662011502 S 0 Index S 1 Introduction and General Information Q whatisfftw 1.1 What is FFTW? Q whereisfftw 1.2 How do I obtain FFTW? Q isfftwfree 1.3 Is FFTW free software? Q nonfree 1.4 What is this about non-free licenses? S 2 Installing FFTW Q systems 2.1 Which systems does FFTW run on? Q runOnDOS 2.2 Does FFTW run on DOS/Windows? Q compilerCrashes 2.3 My compiler has trouble with FFTW. Q solarisSucks 2.4 FFTW does not compile on Solaris, complaining about \courier{const\}. Q languages 2.5 Which language is FFTW written in? Q fortran 2.6 Can I call FFTW from FORTRAN? Q cplusplus 2.7 Can I call FFTW from C++? Q whynotfortran 2.8 Why isn't FFTW written in FORTRAN/C++? Q singleprec 2.9 How do I compile FFTW to run in single precision? S 3 Using FFTW Q slow 3.1 FFTW seems really slow. Q slows 3.2 FFTW slows down after repeated calls. Q segfault 3.3 An FFTW routine is crashing when I call it. Q fortran64 3.4 My Fortran program crashes when calling FFTW. Q conventions 3.5 FFTW gives results different from my old FFT. Q inplace 3.6 Your in-place transform gives incorrect results. Q savePlans 3.7 Can I save FFTW's plans? Q whyscaled 3.8 Why does your inverse transform return a scaled result? Q centerorigin 3.9 How can I make FFTW put the origin (zero frequency) at the center of its output? Q imageaudio 3.10 How do I FFT an image/audio file in \italic{foobar\} format? Q linkfails 3.11 My program does not link (on Unix). Q nostack 3.12 My program crashes, complaining about stack space. S 4 Internals of FFTW Q howworks 4.1 How does FFTW work? Q whyfast 4.2 Why is FFTW so fast? Q wisdom 4.3 What is this \courier{wisdom\} thing? Q whywisdom 4.4 Why do you use \courier{wisdom\}? I just wanted to save a plan. S 5 Known bugs Q rfftwndbug 5.1 FFTW 1.1 crashes in rfftwnd on Linux. Q fftwmpibug 5.2 The MPI transforms in FFTW 1.2 give incorrect results/leak memory. Q testsingbug 5.3 The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision. Q teststoobig 5.4 The test program in FFTW 1.2.1 fails for n > 46340. Q linuxthreads 5.5 The threaded code fails on Linux Redhat 5.0 Q bigrfftwnd 5.6 FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536. Q primebug 5.7 FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97. Q mpichbug 5.8 FFTW 2.1.1's MPI test programs crash with MPICH. Q aixthreadbug 5.9 FFTW 2.1.2's multi-threaded transforms don't work on AIX. Q bigprimebug 5.10 FFTW 2.1.2's complex transforms give incorrect results for large prime sizes. Q aixflags 5.11 FFTW 2.1.3 crashes on AIX