diff --git a/math/Makefile b/math/Makefile index 6b5dcf4c3f14..fc12adaaa554 100644 --- a/math/Makefile +++ b/math/Makefile @@ -1,671 +1,672 @@ # $FreeBSD$ # COMMENT = Mathematics SUBDIR += GiNaC SUBDIR += PDL SUBDIR += R SUBDIR += R-cran-ChangeAnomalyDetection SUBDIR += R-cran-Formula SUBDIR += R-cran-KFAS SUBDIR += R-cran-LearnBayes SUBDIR += R-cran-MCMCpack SUBDIR += R-cran-RHmm SUBDIR += R-cran-RSvgDevice SUBDIR += R-cran-RcppArmadillo SUBDIR += R-cran-SuppDists SUBDIR += R-cran-Zelig SUBDIR += R-cran-bdsmatrix SUBDIR += R-cran-car SUBDIR += R-cran-coda SUBDIR += R-cran-deldir SUBDIR += R-cran-dlmodeler SUBDIR += R-cran-forecast SUBDIR += R-cran-fracdiff SUBDIR += R-cran-gpclib SUBDIR += R-cran-gss SUBDIR += R-cran-gtable SUBDIR += R-cran-igraph SUBDIR += R-cran-inline SUBDIR += R-cran-labeling SUBDIR += R-cran-memisc SUBDIR += R-cran-mvtnorm SUBDIR += R-cran-nnls SUBDIR += R-cran-outliers SUBDIR += R-cran-psych SUBDIR += R-cran-quadprog SUBDIR += R-cran-sandwich SUBDIR += R-cran-sm SUBDIR += R-cran-sp SUBDIR += R-cran-spdep SUBDIR += R-cran-stabledist SUBDIR += R-cran-xts SUBDIR += R-cran-zoo SUBDIR += aamath SUBDIR += abakus SUBDIR += abs SUBDIR += add SUBDIR += algae SUBDIR += algotutor SUBDIR += alt-ergo SUBDIR += analitza SUBDIR += ann SUBDIR += apc SUBDIR += aribas SUBDIR += armadillo SUBDIR += arpack SUBDIR += arpack++ SUBDIR += arpack-ng SUBDIR += asir2000 SUBDIR += asymptote SUBDIR += atlas SUBDIR += atlas-devel SUBDIR += bamg SUBDIR += bargraph SUBDIR += biggles SUBDIR += bihar SUBDIR += blacs SUBDIR += blas SUBDIR += blitz++ SUBDIR += blocksolve95 SUBDIR += calc SUBDIR += calcoo SUBDIR += calctool SUBDIR += cantor SUBDIR += carve SUBDIR += cblas SUBDIR += ccmath SUBDIR += cgal SUBDIR += chaco SUBDIR += chryzodus SUBDIR += clarence SUBDIR += clipper SUBDIR += cln SUBDIR += cloog SUBDIR += clp SUBDIR += coinmp SUBDIR += concorde SUBDIR += convertall SUBDIR += coq SUBDIR += crlibm SUBDIR += cvc3 SUBDIR += dcdflib SUBDIR += diehard SUBDIR += dieharder SUBDIR += dislin SUBDIR += djbfft SUBDIR += drgeo SUBDIR += dynare SUBDIR += e SUBDIR += edenmath SUBDIR += eigen2 SUBDIR += eigen3 SUBDIR += eispack SUBDIR += elmer-umfpack SUBDIR += emacs-calc SUBDIR += emc2 SUBDIR += ent SUBDIR += entropy SUBDIR += ess SUBDIR += eukleides SUBDIR += eval SUBDIR += facile SUBDIR += fann SUBDIR += fbm SUBDIR += fflas-ffpack SUBDIR += fftw SUBDIR += fftw-float SUBDIR += fftw3 SUBDIR += fftw3-float SUBDIR += fftw3-long SUBDIR += fftw3-quad SUBDIR += fityk SUBDIR += fpc-fftw SUBDIR += fpc-gmp SUBDIR += fpc-numlib SUBDIR += freefem SUBDIR += freemat SUBDIR += freemat-mpi SUBDIR += fricas SUBDIR += fxt SUBDIR += galculator SUBDIR += gambit SUBDIR += gap SUBDIR += gcalctool SUBDIR += gdcalc SUBDIR += geg SUBDIR += geogebra-i18n SUBDIR += geonext SUBDIR += gexpr SUBDIR += ggobi SUBDIR += giacxcas SUBDIR += givaro SUBDIR += gkmap SUBDIR += glgraph SUBDIR += glm SUBDIR += glpk SUBDIR += gmm++ SUBDIR += gmp SUBDIR += gmp-ecm SUBDIR += gnubc SUBDIR += gnumeric SUBDIR += gnuplot SUBDIR += goblin SUBDIR += gotoblas SUBDIR += grace SUBDIR += gracetmpl SUBDIR += graphthing SUBDIR += gretl SUBDIR += gri SUBDIR += grpn SUBDIR += gsl SUBDIR += hs-Agda SUBDIR += hs-NumInstances SUBDIR += hs-categories SUBDIR += hs-comonad SUBDIR += hs-comonad-transformers SUBDIR += hs-comonads-fd SUBDIR += hs-contravariant SUBDIR += hs-data-lens SUBDIR += hs-data-lens-template SUBDIR += hs-distributive SUBDIR += hs-erf SUBDIR += hs-groupoids SUBDIR += hs-ieee754 SUBDIR += hs-math-functions SUBDIR += hs-mwc-random SUBDIR += hs-nats SUBDIR += hs-pointed SUBDIR += hs-probability SUBDIR += hs-semigroupoid-extras SUBDIR += hs-semigroupoids SUBDIR += hs-semigroups SUBDIR += hs-statistics SUBDIR += hs-vector-space SUBDIR += igraph SUBDIR += isabelle SUBDIR += ised SUBDIR += itl SUBDIR += jacal SUBDIR += jags SUBDIR += jakarta-commons-math SUBDIR += jakarta-commons-math3 SUBDIR += jama SUBDIR += javanns SUBDIR += javaview SUBDIR += jeuclid SUBDIR += jlatexmath SUBDIR += jsmath SUBDIR += jsmath-fonts SUBDIR += jsmath-fonts-sprite SUBDIR += jtransforms SUBDIR += jts SUBDIR += kalgebra SUBDIR += kash3 SUBDIR += kbruch SUBDIR += kcalc SUBDIR += kig SUBDIR += kktdirect SUBDIR += kmplot SUBDIR += labplot SUBDIR += lambda SUBDIR += lapack SUBDIR += lapack++ SUBDIR += lapack95 SUBDIR += lapacke SUBDIR += laspack SUBDIR += ldouble SUBDIR += levmar SUBDIR += libR SUBDIR += libRmath SUBDIR += libflame SUBDIR += libjbigi SUBDIR += liblbfgs SUBDIR += libmath++ SUBDIR += libmissing SUBDIR += libneural SUBDIR += libocas SUBDIR += liborigin SUBDIR += libqalculate SUBDIR += libranlip SUBDIR += libtommath SUBDIR += libtsnnls SUBDIR += linpack SUBDIR += linux-relview SUBDIR += lll_spect SUBDIR += lp_solve SUBDIR += lrng SUBDIR += ltl SUBDIR += ltl2ba SUBDIR += lybniz SUBDIR += matharray SUBDIR += mathomatic SUBDIR += matio SUBDIR += matlab-R2012a-installer SUBDIR += matrices SUBDIR += matrix SUBDIR += maxima SUBDIR += mbasecalc SUBDIR += metis SUBDIR += metis-edf SUBDIR += metis4 SUBDIR += mingw32-libgmp SUBDIR += miracl SUBDIR += moo SUBDIR += mpc SUBDIR += mpexpr SUBDIR += mpfr SUBDIR += mprime SUBDIR += msieve SUBDIR += mtl SUBDIR += mtrxmath SUBDIR += mumps SUBDIR += mumps-mpich SUBDIR += muparser SUBDIR += naturalmath SUBDIR += nauty SUBDIR += ndiff SUBDIR += newmat SUBDIR += ngraph SUBDIR += ntl SUBDIR += numdiff SUBDIR += nyh-hoc SUBDIR += ocaml-ocamlgraph SUBDIR += ocamlgsl SUBDIR += octave SUBDIR += octave-forge SUBDIR += octave-forge-actuarial SUBDIR += octave-forge-ad SUBDIR += octave-forge-audio SUBDIR += octave-forge-base SUBDIR += octave-forge-bim SUBDIR += octave-forge-bioinfo SUBDIR += octave-forge-cgi SUBDIR += octave-forge-civil-engineering SUBDIR += octave-forge-communications SUBDIR += octave-forge-control SUBDIR += octave-forge-data-smoothing SUBDIR += octave-forge-database SUBDIR += octave-forge-dataframe SUBDIR += octave-forge-dicom SUBDIR += octave-forge-econometrics SUBDIR += octave-forge-engine SUBDIR += octave-forge-es SUBDIR += octave-forge-fenv SUBDIR += octave-forge-financial SUBDIR += octave-forge-fits SUBDIR += octave-forge-fl-core SUBDIR += octave-forge-fpl SUBDIR += octave-forge-fuzzy-logic-toolkit SUBDIR += octave-forge-ga SUBDIR += octave-forge-general SUBDIR += octave-forge-generate_html SUBDIR += octave-forge-geometry SUBDIR += octave-forge-gnuplot SUBDIR += octave-forge-gsl SUBDIR += octave-forge-ident SUBDIR += octave-forge-image SUBDIR += octave-forge-informationtheory SUBDIR += octave-forge-integration SUBDIR += octave-forge-io SUBDIR += octave-forge-irsa SUBDIR += octave-forge-java SUBDIR += octave-forge-linear-algebra SUBDIR += octave-forge-lssa SUBDIR += octave-forge-mapping SUBDIR += octave-forge-mechanics SUBDIR += octave-forge-miscellaneous SUBDIR += octave-forge-missing-functions SUBDIR += octave-forge-msh SUBDIR += octave-forge-multicore SUBDIR += octave-forge-nan SUBDIR += octave-forge-ncarray SUBDIR += octave-forge-nlwing2 SUBDIR += octave-forge-nnet SUBDIR += octave-forge-nurbs SUBDIR += octave-forge-ocs SUBDIR += octave-forge-oct2mat SUBDIR += octave-forge-octcdf SUBDIR += octave-forge-octclip SUBDIR += octave-forge-octgpr SUBDIR += octave-forge-octproj SUBDIR += octave-forge-odebvp SUBDIR += octave-forge-odepkg SUBDIR += octave-forge-optim SUBDIR += octave-forge-optiminterp SUBDIR += octave-forge-outliers SUBDIR += octave-forge-parallel SUBDIR += octave-forge-pdb SUBDIR += octave-forge-plot SUBDIR += octave-forge-pt_br SUBDIR += octave-forge-quaternion SUBDIR += octave-forge-queueing SUBDIR += octave-forge-secs1d SUBDIR += octave-forge-secs2d SUBDIR += octave-forge-secs3d SUBDIR += octave-forge-signal SUBDIR += octave-forge-simp SUBDIR += octave-forge-sockets SUBDIR += octave-forge-specfun SUBDIR += octave-forge-special-matrix SUBDIR += octave-forge-spline-gcvspl SUBDIR += octave-forge-splines SUBDIR += octave-forge-statistics SUBDIR += octave-forge-strings SUBDIR += octave-forge-struct SUBDIR += octave-forge-symband SUBDIR += octave-forge-symbolic SUBDIR += octave-forge-tcl-octave SUBDIR += octave-forge-tsa SUBDIR += octave-forge-video SUBDIR += octave-forge-xraylib SUBDIR += octave-forge-zenity SUBDIR += oleo SUBDIR += open-axiom SUBDIR += openblas SUBDIR += orpie SUBDIR += p5-AI-DecisionTree SUBDIR += p5-AI-Genetic SUBDIR += p5-AI-NeuralNet-BackProp SUBDIR += p5-AI-Perceptron SUBDIR += p5-Algorithm-Combinatorics SUBDIR += p5-Algorithm-CurveFit SUBDIR += p5-Algorithm-KMeans SUBDIR += p5-Algorithm-Munkres SUBDIR += p5-Bit-ShiftReg SUBDIR += p5-Bit-Vector SUBDIR += p5-Bit-Vector-Minimal SUBDIR += p5-CAD-Calc SUBDIR += p5-Chart-Math-Axis SUBDIR += p5-Data-Float SUBDIR += p5-Date-Handler SUBDIR += p5-GIS-Distance SUBDIR += p5-GIS-Distance-Fast SUBDIR += p5-GIS-Distance-Lite SUBDIR += p5-Geo-Coordinates-UTM SUBDIR += p5-Geo-Distance SUBDIR += p5-Geo-Distance-XS SUBDIR += p5-Graph SUBDIR += p5-Math-Algebra-Symbols SUBDIR += p5-Math-Base36 SUBDIR += p5-Math-Base85 SUBDIR += p5-Math-BaseCalc SUBDIR += p5-Math-BaseCnv SUBDIR += p5-Math-Bezier SUBDIR += p5-Math-Bezier-Convert SUBDIR += p5-Math-BigInt SUBDIR += p5-Math-BigInt-FastCalc SUBDIR += p5-Math-BigInt-GMP SUBDIR += p5-Math-BigInt-Pari SUBDIR += p5-Math-BigRat SUBDIR += p5-Math-CDF SUBDIR += p5-Math-Calc-Units SUBDIR += p5-Math-Cephes SUBDIR += p5-Math-Combinatorics SUBDIR += p5-Math-Complex SUBDIR += p5-Math-ConvexHull SUBDIR += p5-Math-Currency SUBDIR += p5-Math-Derivative SUBDIR += p5-Math-Evol SUBDIR += p5-Math-Expr SUBDIR += p5-Math-FFT SUBDIR += p5-Math-FixedPrecision SUBDIR += p5-Math-GMP SUBDIR += p5-Math-GMPf SUBDIR += p5-Math-GMPq SUBDIR += p5-Math-GMPz SUBDIR += p5-Math-GSL SUBDIR += p5-Math-Geometry SUBDIR += p5-Math-Geometry-Planar SUBDIR += p5-Math-Geometry-Planar-GPC SUBDIR += p5-Math-Geometry-Planar-GPC-Polygon SUBDIR += p5-Math-Geometry-Planar-Offset SUBDIR += p5-Math-Geometry-Voronoi SUBDIR += p5-Math-Gradient SUBDIR += p5-Math-Int128 SUBDIR += p5-Math-Int64 SUBDIR += p5-Math-Interpolate SUBDIR += p5-Math-Intersection-StraightLine SUBDIR += p5-Math-Logic SUBDIR += p5-Math-MPC SUBDIR += p5-Math-MPFR SUBDIR += p5-Math-Matrix SUBDIR += p5-Math-NumberCruncher SUBDIR += p5-Math-Pari SUBDIR += p5-Math-Polygon SUBDIR += p5-Math-Polygon-Tree SUBDIR += p5-Math-Polynomial-Solve SUBDIR += p5-Math-Prime-XS SUBDIR += p5-Math-RPN SUBDIR += p5-Math-Random SUBDIR += p5-Math-Random-ISAAC SUBDIR += p5-Math-Random-ISAAC-XS SUBDIR += p5-Math-Random-MT SUBDIR += p5-Math-Random-MT-Auto SUBDIR += p5-Math-Random-OO SUBDIR += p5-Math-Random-Secure SUBDIR += p5-Math-RandomOrg SUBDIR += p5-Math-Round SUBDIR += p5-Math-Round-Var SUBDIR += p5-Math-Sequence SUBDIR += p5-Math-Series SUBDIR += p5-Math-SigFigs SUBDIR += p5-Math-SimpleVariable SUBDIR += p5-Math-Spline SUBDIR += p5-Math-String SUBDIR += p5-Math-Symbolic SUBDIR += p5-Math-Symbolic-Custom-CCompiler SUBDIR += p5-Math-Symbolic-Custom-Contains SUBDIR += p5-Math-Symbolic-Custom-ErrorPropagation SUBDIR += p5-Math-Symbolic-Custom-LaTeXDumper SUBDIR += p5-Math-Symbolic-Custom-Pattern SUBDIR += p5-Math-Symbolic-Custom-Simplification SUBDIR += p5-Math-Symbolic-Custom-Transformation SUBDIR += p5-Math-SymbolicX-BigNum SUBDIR += p5-Math-SymbolicX-Complex SUBDIR += p5-Math-SymbolicX-Error SUBDIR += p5-Math-SymbolicX-Inline SUBDIR += p5-Math-SymbolicX-NoSimplification SUBDIR += p5-Math-SymbolicX-ParserExtensionFactory SUBDIR += p5-Math-SymbolicX-Statistics-Distributions SUBDIR += p5-Math-TrulyRandom SUBDIR += p5-Math-Units SUBDIR += p5-Math-Vec SUBDIR += p5-Math-VecStat SUBDIR += p5-Math-VectorReal SUBDIR += p5-MatrixReal SUBDIR += p5-NetCDF SUBDIR += p5-Number-Compare SUBDIR += p5-Number-Fraction SUBDIR += p5-Number-Uncertainty SUBDIR += p5-Number-WithError SUBDIR += p5-Number-WithError-LaTeX SUBDIR += p5-Parse-Range SUBDIR += p5-Roman SUBDIR += p5-Set-IntSpan SUBDIR += p5-Set-IntSpan-Fast SUBDIR += p5-Set-IntSpan-Fast-XS SUBDIR += p5-Set-Partition SUBDIR += p5-Set-Window SUBDIR += p5-Statistics-Basic SUBDIR += p5-Statistics-Benford SUBDIR += p5-Statistics-ChiSquare SUBDIR += p5-Statistics-Contingency SUBDIR += p5-Statistics-Descriptive SUBDIR += p5-Statistics-Descriptive-Discrete SUBDIR += p5-Statistics-Distributions SUBDIR += p5-Statistics-Forecast SUBDIR += p5-Statistics-Frequency SUBDIR += p5-Statistics-LTU SUBDIR += p5-Statistics-LineFit SUBDIR += p5-Statistics-Lite SUBDIR += p5-Statistics-OLS SUBDIR += p5-Statistics-R SUBDIR += p5-Statistics-Regression SUBDIR += p5-Statistics-TTest SUBDIR += p5-Task-Math-Symbolic SUBDIR += p5-Text-AsciiTeX SUBDIR += p5-bignum SUBDIR += pari SUBDIR += parmetis SUBDIR += parmgridgen SUBDIR += pear-Math_BigInteger SUBDIR += pear-Math_Combinatorics SUBDIR += pecl-big_int SUBDIR += pecl-bitset SUBDIR += pecl-stats SUBDIR += petsc SUBDIR += php5-bcmath SUBDIR += php5-gmp SUBDIR += php52-bcmath SUBDIR += php52-gmp SUBDIR += php53-bcmath SUBDIR += php53-gmp SUBDIR += php55-bcmath SUBDIR += php55-gmp SUBDIR += physcalc SUBDIR += plman SUBDIR += ploticus SUBDIR += ploticus-nox11 SUBDIR += plplot SUBDIR += polymake SUBDIR += primegen SUBDIR += prng SUBDIR += proofgeneral SUBDIR += pspp SUBDIR += pure-mpfr SUBDIR += pure-rational SUBDIR += py-apgl SUBDIR += py-basemap SUBDIR += py-basemap-data SUBDIR += py-bitvector SUBDIR += py-ffc SUBDIR += py-fiat SUBDIR += py-fpconst SUBDIR += py-gato SUBDIR += py-gmpy SUBDIR += py-gnuplot SUBDIR += py-graphillion SUBDIR += py-graphtool SUBDIR += py-gsl SUBDIR += py-igraph SUBDIR += py-mathdom SUBDIR += py-matplotlib SUBDIR += py-mpmath SUBDIR += py-munkres SUBDIR += py-networkx SUBDIR += py-numarray SUBDIR += py-numeric SUBDIR += py-numexpr SUBDIR += py-numpy SUBDIR += py-nzmath SUBDIR += py-pandas SUBDIR += py-plastex SUBDIR += py-probstat SUBDIR += py-pybloom SUBDIR += py-pymc SUBDIR += py-roman SUBDIR += py-scientific SUBDIR += py-svgmath SUBDIR += py-symeig SUBDIR += py-sympy SUBDIR += py-ufl SUBDIR += py-viper SUBDIR += qalculate SUBDIR += qd SUBDIR += qhull SUBDIR += qhull5 SUBDIR += qrupdate SUBDIR += qtiplot SUBDIR += qtiplot-doc SUBDIR += qtoctave SUBDIR += qwtplot3d-qt4 SUBDIR += randlib SUBDIR += rapid SUBDIR += reed-solomon SUBDIR += rkward-kde4 SUBDIR += rngstreams SUBDIR += rocs SUBDIR += ros-geometry SUBDIR += rpcalc SUBDIR += rpy SUBDIR += rpy2 SUBDIR += ruby-algebra SUBDIR += ruby-fftw3 SUBDIR += ruby-gnuplot SUBDIR += ruby-gsl SUBDIR += ruby-narray SUBDIR += ruby-narray_miss SUBDIR += ruby-numru_misc SUBDIR += ruby-numru_units SUBDIR += saga SUBDIR += sage SUBDIR += sc SUBDIR += scalapack SUBDIR += scilab SUBDIR += scilab-toolbox-sivp SUBDIR += scilab-toolbox-swt SUBDIR += sdpa SUBDIR += sdpa-gmp SUBDIR += sdpara SUBDIR += sedumi + SUBDIR += sfft SUBDIR += simd-viterbi SUBDIR += slatec SUBDIR += slgrace SUBDIR += snns SUBDIR += solitaire SUBDIR += spar SUBDIR += spblas SUBDIR += speedcrunch SUBDIR += spooles SUBDIR += spooles-mpich SUBDIR += stp SUBDIR += suitesparse SUBDIR += superlu SUBDIR += superlu_mt SUBDIR += surf SUBDIR += tablix SUBDIR += taucs SUBDIR += testu01 SUBDIR += tetgen SUBDIR += timbl SUBDIR += tomsfastmath SUBDIR += topaz SUBDIR += triangle SUBDIR += trlan SUBDIR += truthtable SUBDIR += tvmet SUBDIR += ufc SUBDIR += umatrix SUBDIR += ump SUBDIR += units SUBDIR += unixstat SUBDIR += unuran SUBDIR += vtk SUBDIR += vtk-data SUBDIR += vtk-examples SUBDIR += vtk-headers SUBDIR += vtk-java SUBDIR += vtk-python SUBDIR += vtk-tcl SUBDIR += vtk5 SUBDIR += vtk5-data SUBDIR += wcalc SUBDIR += wfmath SUBDIR += wingz SUBDIR += wingz3 SUBDIR += wxMaxima SUBDIR += x12arima SUBDIR += xblas SUBDIR += xgobi SUBDIR += xgraph SUBDIR += xlapack SUBDIR += xldlas SUBDIR += xlispstat SUBDIR += xplot SUBDIR += xppaut SUBDIR += xspread SUBDIR += yacas .include diff --git a/math/sfft/Makefile b/math/sfft/Makefile new file mode 100644 index 000000000000..dd6cf86714ac --- /dev/null +++ b/math/sfft/Makefile @@ -0,0 +1,123 @@ +# Created by: bf@FreeBSD.org +# $FreeBSD$ + +PORTNAME= sfft +PORTVERSION= 0.1.0 +CATEGORIES= math +MASTER_SITES= http://spiral.net/software/sfft/ LOCAL/bf +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= bf@FreeBSD.org +COMMENT= Optimized Sparse Fast Fourier Transform + +LICENSE= GPLv2 + +LIB_DEPENDS= libfftw3.so:${PORTSDIR}/math/fftw3 + +USE_GCC= yes +USE_LDCONFIG= yes +USE_ZIP= yes + +OPTIONS_DEFINE= OPTIMIZED_CFLAGS PROFILE +OPTIONS_DEFAULT= OPTIMIZED_CFLAGS + +BUILD_WRKSRC= ${WRKSRC}/src +INSTALL_WRKSRC= ${BUILD_WRKSRC} +CFLAGS+= -fopenmp -msse2 -Iflopcount -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +HEADERS= sfft.h +HDIR= include/sfft +MAKE_ENV= LDADD="-lfftw3 ${LIBM}" LIB=sfft SHLIB_MAJOR="${SHLIB_MAJOR}" \ + SRCCONF=/dev/null SRCS="${SRCS}" + +PLIST_DIRS= ${HDIR} +PLIST_FILES= ${HEADERS:S|^|${HDIR}/|} lib/libsfft.a lib/libsfft.so \ + lib/libsfft.so.${SHLIB_MAJOR} + +SHLIB_MAJOR= 1 +SRCS= common.cc computefourier-1.0-2.0.cc \ + computefourier-3.0.cc fftw.cc filters.cc parameters.cc \ + sfft.cc simulation.cc timer.cc utils.cc + +.include + +.if !${ARCH:Mamd64} && !${MACHINE_CPU:Msse2} +IGNORE= this port requires SSE2, and benefits from SSE3 -- set CPUTYPE\ +appropriately +.endif + +LIBM= -lm +.if ${OSVERSION} < 1000034 +LIB_DEPENDS+= libmissing.so:${PORTSDIR}/math/libmissing +LIBM+= -lmissing +.endif + +.if ${PORT_OPTIONS:MDOCS} || make(makesum) +DISTFILES+= sfft-doc.pdf +PORTDOCS= sfft-doc.pdf +.endif + +.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} +CFLAGS+= -O3 -ffast-math +.endif + +.if ${PORT_OPTIONS:MPROFILE} +.if defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE) +IGNORE = you have defined WITH_PROFILE, but have also defined\ +WITHOUT_PROFILE, NOPROFILE, or NO_PROFILE +.elif !exists(/usr/lib/libc_p.a) +IGNORE = you have chosen WITH_PROFILE, but have not installed the\ +base system profiling libraries +.endif +PLIST_FILES+= lib/libsfft_p.a +.else +MAKE_ENV+= NO_PROFILE=yes +.endif + +post-extract: + @${CP} /usr/include/complex.h ${BUILD_WRKSRC}/sfftcomplex.h + @${PRINTF} "LIBDIR=\t${PREFIX}/lib\n.include \n" > \ + ${BUILD_WRKSRC}/Makefile + +post-patch: + @${REINPLACE_CMD} -e 's/string\.h/cstring/' \ + ${WRKSRC}/src/utils.cc +.if ${OSVERSION} < 1000034 + @${REINPLACE_CMD} -e '\||{x; \ + s|^.*$$|#include "missing_complex.h"|; H; x;}' \ + ${WRKSRC}/src/fft.h +.endif + @${REINPLACE_CMD} -E -e '// \ + {s// "sfftcomplex.h"/; x ; \ + s|^.*$$|#endif|; G; x; \ + s|^.*$$|extern "C" {|; G; x; \ + s|^.*$$|#ifdef __cplusplus|; G; x; \ + s|^.*$$|#ifdef __cplusplus|; H; \ + s|^.*$$|}|; H; \ + s|^.*$$|#endif|; H; x;}' \ + ${WRKSRC}/src/computefourier-1.0-2.0.h \ + ${WRKSRC}/src/computefourier-3.0.h \ + ${WRKSRC}/src/fft.h + +CORELIMIT?= /usr/bin/limits -Sc 0 + +check regression-test test: build + @cd ${BUILD_WRKSRC}; \ + ${CXX} ${CXXFLAGS} -o sfft-verification verification.cc \ + ${LDFLAGS} libsfft.a -lfftw3 ${LIBM} ; \ + for _v in 1 2 3 ; do \ + for _k in 5 10 50; do \ + echo "Checking sfft version $${_v} with $${_k} frequency components:"; \ + ${CORELIMIT} ./sfft-verification -k $${_k} -r 3 -v $${_v} || ${TRUE} ; \ + done ; done + +post-install: + @${MKDIR} ${PREFIX}/${HDIR} + @cd ${BUILD_WRKSRC}; ${INSTALL_DATA} ${HEADERS} ${PREFIX}/${HDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${_DISTDIR}/${PORTDOCS} ${DOCSDIR} +.endif + +.include diff --git a/math/sfft/distinfo b/math/sfft/distinfo new file mode 100644 index 000000000000..c0af74abb746 --- /dev/null +++ b/math/sfft/distinfo @@ -0,0 +1,4 @@ +SHA256 (sfft-0.1.0.zip) = b52d53f020e82f67cc7da2ad9cacb428752ec3229ce00f435a527d6180ddd494 +SIZE (sfft-0.1.0.zip) = 466599 +SHA256 (sfft-doc.pdf) = d9416944b2ca7bd068320a1b45ed0cc4a311b0bfbac5ed43e68f46bdc3a93454 +SIZE (sfft-doc.pdf) = 122378 diff --git a/math/sfft/files/patch-src__computefourier-1.0-2.0.cc b/math/sfft/files/patch-src__computefourier-1.0-2.0.cc new file mode 100644 index 000000000000..09b1e51d5b29 --- /dev/null +++ b/math/sfft/files/patch-src__computefourier-1.0-2.0.cc @@ -0,0 +1,55 @@ +--- src/computefourier-1.0-2.0.cc.orig 2013-06-13 08:12:25.000000000 -0400 ++++ src/computefourier-1.0-2.0.cc 2013-08-09 00:26:54.000000000 -0400 +@@ -248,8 +248,13 @@ + __m128d ad_bc = _mm_mul_pd(ab, dc); + __m128d ac_mbd = _mm_mul_pd(ac_bd, signs); + ++#ifdef __SSE3__ + __m128d ab_times_cd = _mm_hadd_pd(ac_mbd, ad_bc); +- ++#else ++ __m128d ab_times_cd_lo = _mm_shuffle_pd(ac_mbd, ad_bc, 0); ++ __m128d ab_times_cd_hi = _mm_shuffle_pd(ac_mbd, ad_bc, 3); ++ __m128d ab_times_cd = _mm_add_pd(ab_times_cd_lo, ab_times_cd_hi); ++#endif + unsigned int i_mod_B_p_offset = (i & B2_m_1) + offset; + __m128d xy = _mm_load_pd(d_x_sampt + i_mod_B_p_offset); + __m128d st = _mm_add_pd(xy, ab_times_cd); +@@ -283,7 +288,13 @@ + __m128d ab_square = _mm_mul_pd(ab, ab); + __m128d cd_square = _mm_mul_pd(cd, cd); + ++#ifdef __SSE3__ + __m128d r = _mm_hadd_pd(ab_square, cd_square); ++#else ++ __m128d r_lo = _mm_shuffle_pd(ab_square, cd_square, 0); ++ __m128d r_hi = _mm_shuffle_pd(ab_square, cd_square, 3); ++ __m128d r = _mm_add_pd(r_lo, r_hi); ++#endif + + _mm_store_pd(samples + j, r); + } +@@ -390,11 +401,23 @@ + __m128d ad_bc = _mm_mul_pd(ab, dc); + __m128d mad_bc = _mm_mul_pd(ad_bc, signs); + ++#ifdef __SSE3__ + __m128d acpbd_bcmad = _mm_hadd_pd(ac_bd, mad_bc); ++#else ++ __m128d acpbd_bcmad_lo = _mm_shuffle_pd(ac_bd, mad_bc, 0); ++ __m128d acpbd_bcmad_hi = _mm_shuffle_pd(ac_bd, mad_bc, 3); ++ __m128d acpbd_bcmad = _mm_add_pd(acpbd_bcmad_lo, acpbd_bcmad_hi); ++#endif + + __m128d cd_squares = _mm_mul_pd(cd, cd); ++ ++#ifdef __SSE3__ + __m128d cd_squares_sum = + _mm_hadd_pd(cd_squares, cd_squares); ++#else ++ __m128d cd_squares_flip = _mm_shuffle_pd(cd_squares, cd_squares, 1); ++ __m128d cd_squares_sum = _mm_add_pd(cd_squares, cd_squares_flip); ++#endif + + __m128d r = _mm_div_pd(acpbd_bcmad, cd_squares_sum); + diff --git a/math/sfft/files/patch-src__computefourier-3.0.cc b/math/sfft/files/patch-src__computefourier-3.0.cc new file mode 100644 index 000000000000..aba106fdd70a --- /dev/null +++ b/math/sfft/files/patch-src__computefourier-3.0.cc @@ -0,0 +1,132 @@ +--- src/computefourier-3.0.cc.orig 2013-06-13 08:12:26.000000000 -0400 ++++ src/computefourier-3.0.cc 2013-08-10 17:02:52.000000000 -0400 +@@ -416,27 +416,64 @@ + + __m128d t1r = _mm_mul_pd(v1r, ab31); + __m128d t1i = _mm_mul_pd(v1i, ba31); ++ ++#ifdef __SSE3__ + __m128d remove1 = _mm_addsub_pd(t1r, t1i); ++#else ++__m128i mask_fliplo = _mm_set_epi32(0, 0, 0x80000000, 0); ++__m128d t1i_fliplo = _mm_xor_pd(t1i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove1 = _mm_add_pd(t1r, t1i_fliplo); ++#endif + + __m128d t2r = _mm_mul_pd(v1r, ab32); + __m128d t2i = _mm_mul_pd(v1i, ba32); ++ ++#ifdef __SSE3__ + __m128d remove2 = _mm_addsub_pd(t2r, t2i); ++#else ++__m128d t2i_fliplo = _mm_xor_pd(t2i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove2 = _mm_add_pd(t2r, t2i_fliplo); ++#endif + + __m128d t3r = _mm_mul_pd(v1r, ab33); + __m128d t3i = _mm_mul_pd(v1i, ba33); ++ ++#ifdef __SSE3__ + __m128d remove3 = _mm_addsub_pd(t3r, t3i); ++#else ++__m128d t3i_fliplo = _mm_xor_pd(t3i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove3 = _mm_add_pd(t3r, t3i_fliplo); ++#endif + + __m128d t4r = _mm_mul_pd(v2r, ab31); + __m128d t4i = _mm_mul_pd(v2i, ba31); ++ ++#ifdef __SSE3__ + __m128d remove4 = _mm_addsub_pd(t4r, t4i); ++#else ++__m128d t4i_fliplo = _mm_xor_pd(t4i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove4 = _mm_add_pd(t4r, t4i_fliplo); ++#endif + + __m128d t5r = _mm_mul_pd(v2r, ab32); + __m128d t5i = _mm_mul_pd(v2i, ba32); ++ ++#ifdef __SSE3__ + __m128d remove5 = _mm_addsub_pd(t5r, t5i); ++#else ++__m128d t5i_fliplo = _mm_xor_pd(t5i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove5 = _mm_add_pd(t5r, t5i_fliplo); ++#endif + + __m128d t6r = _mm_mul_pd(v2r, ab33); + __m128d t6i = _mm_mul_pd(v2i, ba33); ++ ++#ifdef __SSE3__ + __m128d remove6 = _mm_addsub_pd(t6r, t6i); ++#else ++__m128d t6i_fliplo = _mm_xor_pd(t6i, _mm_castsi128_pd(mask_fliplo)); ++__m128d remove6 = _mm_add_pd(t6r, t6i_fliplo); ++#endif + + FLOPCOUNT_INCREMENT(6 * (4 + 2)); + +@@ -524,11 +561,28 @@ + __m128d a3b3_sq = _mm_mul_pd(a3b3, a3b3); + FLOPCOUNT_INCREMENT(8); + ++#ifdef __SSE3__ + __m128d c0c1 = _mm_hadd_pd(a0b0_sq, a1b1_sq); + __m128d c2c3 = _mm_hadd_pd(a2b2_sq, a3b3_sq); ++#else ++ __m128d c0c1_lo = _mm_shuffle_pd(a0b0_sq, a1b1_sq, 0); ++ __m128d c0c1_hi = _mm_shuffle_pd(a0b0_sq, a1b1_sq, 3); ++ __m128d c0c1 = _mm_add_pd(c0c1_lo, c0c1_hi); ++ __m128d c2c3_lo = _mm_shuffle_pd(a2b2_sq, a3b3_sq, 0); ++ __m128d c2c3_hi = _mm_shuffle_pd(a2b2_sq, a3b3_sq, 3); ++ __m128d c2c3 = _mm_add_pd(c2c3_lo, c2c3_hi); ++#endif ++ + FLOPCOUNT_INCREMENT(4); + ++#ifdef __SSE3__ + __m128d zbc = _mm_hadd_pd(c0c1, c2c3); ++#else ++ __m128d zbc_lo = _mm_shuffle_pd(c0c1, c2c3, 0); ++ __m128d zbc_hi = _mm_shuffle_pd(c0c1, c2c3, 3); ++ __m128d zbc = _mm_add_pd(zbc_lo, zbc_hi); ++#endif ++ + FLOPCOUNT_INCREMENT(1); + + _mm_store_pd(zero_buck_check, zbc); +@@ -681,13 +735,35 @@ + __m128d a3b3_sq = _mm_mul_pd(a3b3, a3b3); + FLOPCOUNT_INCREMENT(8); + ++#ifdef __SSE3__ + __m128d c0c1 = _mm_hadd_pd(a0b0_sq, a1b1_sq); ++#else ++ __m128d c0c1_lo = _mm_shuffle_pd(a0b0_sq, a1b1_sq, 0); ++ __m128d c0c1_hi = _mm_shuffle_pd(a0b0_sq, a1b1_sq, 3); ++ __m128d c0c1 = _mm_add_pd(c0c1_lo, c0c1_hi); ++#endif ++ + __m128d c0c1_normed = _mm_mul_pd(c0c1, norm2vec); ++ ++#ifdef __SSE3__ + __m128d c2c3 = _mm_hadd_pd(a2b2_sq, a3b3_sq); ++#else ++ __m128d c2c3_lo = _mm_shuffle_pd(a2b2_sq, a3b3_sq, 0); ++ __m128d c2c3_hi = _mm_shuffle_pd(a2b2_sq, a3b3_sq, 3); ++ __m128d c2c3 = _mm_add_pd(c2c3_lo, c2c3_hi); ++#endif ++ + __m128d c2c3_normed = _mm_mul_pd(c2c3, norm2vec); + FLOPCOUNT_INCREMENT(8); + ++#ifdef __SSE3__ + __m128d zbc = _mm_hadd_pd(c0c1_normed, c2c3_normed); ++#else ++ __m128d zbc_lo = _mm_shuffle_pd(c0c1_normed, c2c3_normed, 0); ++ __m128d zbc_hi = _mm_shuffle_pd(c0c1_normed, c2c3_normed, 3); ++ __m128d zbc = _mm_add_pd(zbc_lo, zbc_hi); ++#endif ++ + FLOPCOUNT_INCREMENT(1); + + _mm_store_pd(zero_buck_check, zbc); diff --git a/math/sfft/pkg-descr b/math/sfft/pkg-descr new file mode 100644 index 000000000000..7eaae7086b76 --- /dev/null +++ b/math/sfft/pkg-descr @@ -0,0 +1,8 @@ +sfft is a library to compute discrete Fourier transforms of signals with +a sparse frequency domain, using an algorithm that is more efficient than +other known FFT algorithms. It was developed by Haitham Hassanieh, Piotr +Indyk, Dina Katabi, and Eric Price at the Computer Science and Artifical +Intelligence Lab at MIT. Performance optimizations were developed by J. +Schumacher at the Computer Science Department of ETH Zurich in 2013. + +WWW: http://spiral.net/software/sfft.html