?? install
字號:
/*************************************************************************** ************************************************************************** Spherical Harmonic Transform Kit 2.7 Contact: Peter Kostelec geelong@cs.dartmouth.edu Copyright 1997-2003 Sean Moore, Dennis Healy, Dan Rockmore, Peter Kostelec Copyright 2004 Peter Kostelec, Dan Rockmore SpharmonicKit 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. SpharmonicKit 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., 675 Mass Ave, Cambridge, MA 02139, USA. Commercial use is absolutely prohibited. See the accompanying LICENSE file for details. ************************************************************************ ************************************************************************/MAKEFILE/INSTALLATION/CONTENTS------------------------------The Makefile provides an easy way to compile the code. If you arenot familiar with Makefiles, either read the man pages on make, orget a copy of "The UNIX Programming Environment" by Kernighan and Pike,or talk to your local UNIX guru.By default, the transforms compiled here DO NOT make use of the fftpack-basedroutines. Use of the fftpack-based routines is encouraged -> the fftand dct in fftpack are faster than those we provide in this distribution.Before using the modified fftpack-library, it has to be made. See theREADME file included in our distribution of the modified fftpack-libraryfor instructions in making the library.To compile SpharmonicKit code to make use of the fftpack-based routines,define FFTPACK in the Makefile before compilation. See the filepurposes, along with other useful information, including discussionof how SpharmonicKit can be (relatively) easily modified to use other,optimized fft and dct routines.If you want to start compiling and testing quickly ... make legendre(for all flavours of algorithms); make spherewill compile all the spherical-related transform code inthe Kit; and make allwill compile everything; and make cleanwill remove all *.o files.One can also compile individual routines - see the Makefilefor a list.IMPORTANT NOTES: 1) Some of the executables expect to read data off the disk. One executable ( FST_precomp2disk ) writes data to disk. By default, all data is written to and read from the current directory. To change this default, change the setting of PRECOMP_DIR in config.h . 2) The timing routines, by default, reflect cpu times. If you want to time using walltime, define WALLCLOCK in the CFLAGS setting in the Makefile. 3) The Legendre transform routines: test_flt_classic, test_flt_dhmid, test_flt_hybrid and test_semi all read random data (used when timing and testing stability) from the file norm.dat . Another random data file, more_norm.dat, is also provided. If you want the routine to read this (or any other) data file, change the value of the DATAFILE variable which is located in each of the executable's "main" .c files, i.e. in test_flt_classic.c, test_flt_dhmid.c, test_flt_hybrid.c and test_semi.c .Code note: If the name of the executable ends in _MEMO : this function precomputes everything in memory before transforming _DISK : this functions reads precomputed data off disk _FLY : this functions computes precomputed data (sounds odd) on the fly, as needed.Why the differences? Precomputing everything prior totransforming takes a LOT of memory (e.g. see the two tablesabove), more than what most machines have. Reading off diskor computing on the fly are more memory friendly alternatives.Now for a little more description of the more major piecesin the Kit ...CONTENTS/SOURCE FILE DESCRIPTIONS---------------------------------FAST COSINE TRANSFORMS------------------------------------------------Many of the algorithms use fast cosine transform algorithms. As such,there is a collection of files for implementing them.newFCT.c - Source code for implementing fast cosine transforms (FCTs).Algorithm based on Steidl and Tasche description using a polynomialdivision model. Power of 2 only.OURperms.c - FCTs permute data. The permutation used is the OUR permutationdescribed by Moore and Wisniewski in Dartmouth College Department ofComputer Science technical report PCS-TR95-266. These are the permutationsfor various powers of 2.OURmods.c - This is the encoding of the supermoduli in the polynomialdivision tree for the FCTs.##################################################################################################################################################################################################################DISCRETE LEGENDRE TRANSFORMS--------------------------------------------------------Naive algorithm-----------------naive_synthesis.c - Source code to synthesize functions using a naive method based on recurrence. This is slow but does not require any precomputed functions, and is also stable. test_naive.c - sample main for naive transform. For bandwidths through 1024test_stability_naive.c - sample main for computing error datafor the Legendre transform using the naive algorithm. For bandwidthsthrough 1024Compile the code with the command make test_naive test_stabilitySemi-naive transform code---------------------------The seminaive algorithms use FCT code and some additional functions.cospmls.c - source code for generating cosine transforms of P(m,l) andG(m,l) functions.seminaive.c - source for functions implementing seminaive and inverseseminaive transforms.test_semi.c - sample main for computing Legendre transform using theseminaive algorithm; used for timing and stability-testing purposes.For bandwidths through 1024. Is stable!test_semi_roundtrip.c - sample main which reads in Legendrecoefficients, does inverse transform, does forward transform.Result should be same as input up to numerical errors. Forbandwidths through 1024.Compile the code with the command make test_semi test_semi_roundtrip(basic) Driscoll-Healy algorithm:--------------------------------precomp_flt_classic.c - source for precomputing data necessaryfor the forward DH Legendre transform algorithm.flt_classic.c - source for performing the slight variation ofthe forward DH Legendre transform algorithm. The slightvariation divides and conquers only so many levels (userinput), then applies a seminaive approach to the smallersubproblems.test_flt_classic.c - sample main for computing the forwardLegendre transform using variation of the basic DH algorithm;used for timing and stability-testing purposes. For bandwidthsthrough 1024. Unstable for large order m's!Compile the code with the command make test_flt_classicBounded DH-Mid--------------precomp_flt_dhmid.c - source for precomputing data necessaryfor the forward Bounded DH-Mid Legendre transform algorithm.flt_dhmid.c - source for performing the Bounded DH-Mid algorithm.Basically, this variation uses both the forward and reverseLegendre three-term recurrences for so many divides and conquers,then applies a seminaive approach to the remaining subproblems(has lower overhead than flt_classic).test_flt_dhmid.c - sample main for computing the forwardBounded DH-Mid Legendre transform; used for timing andstability-testing purposes. For bandwidths through 1024.Unstable for large order m's!Compile the code with the command make test_flt_dhmidSimple-Split/Hybrid-------------------precomp_flt_hybrid.c - source for precomputing data necessaryfor the forward simple-split/hybrid Legendre transform algorithm.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -