-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.jl.cov | ||
*.jl.*.cov | ||
*.jl.mem | ||
deps/deps.jl | ||
deps/downloads | ||
deps/usr | ||
deps/src | ||
docs/build | ||
docs/site |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Documentation: http:https://docs.travis-ci.com/user/languages/julia/ | ||
language: julia | ||
os: | ||
- linux | ||
- osx | ||
julia: | ||
- 0.6 | ||
- nightly | ||
notifications: | ||
email: false | ||
# uncomment the following lines to override the default test script | ||
#script: | ||
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | ||
# - julia -e 'Pkg.clone(pwd()); Pkg.build("FFTW"); Pkg.test("FFTW"; coverage=true)' | ||
after_success: | ||
- julia -e 'Pkg.add("Coverage"); cd(Pkg.dir("FFTW")); using Coverage; Coveralls.submit(Coveralls.process_folder())' | ||
- julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("FFTW")); include(joinpath("docs", "make.jl"))' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Steven G. Johnson, Jeff Bezanson, and other contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# FFTW.jl | ||
|
||
TODO |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
julia 0.6- | ||
BinDeps | ||
@osx Homebrew | ||
@windows WinRPM |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
environment: | ||
matrix: | ||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" | ||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" | ||
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" | ||
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
notifications: | ||
- provider: Email | ||
on_build_success: false | ||
on_build_failure: false | ||
on_build_status_changed: false | ||
|
||
install: | ||
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12" | ||
# If there's a newer build queued for the same PR, cancel this one | ||
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` | ||
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` | ||
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` | ||
throw "There are newer queued builds for this pull request, failing early." } | ||
# Download most recent Julia Windows binary | ||
- ps: (new-object net.webclient).DownloadFile( | ||
$env:JULIA_URL, | ||
"C:\projects\julia-binary.exe") | ||
# Run installer silently, output to C:\projects\julia | ||
- C:\projects\julia-binary.exe /S /D=C:\projects\julia | ||
|
||
build_script: | ||
# Need to convert from shallow to complete for Pkg.clone to work | ||
- IF EXIST .git\shallow (git fetch --unshallow) | ||
- C:\projects\julia\bin\julia -e "versioninfo(); | ||
Pkg.clone(pwd(), \"FFTW\"); Pkg.build(\"FFTW\")" | ||
|
||
test_script: | ||
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"FFTW\")" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
using BinDeps | ||
using BinDeps: builddir | ||
|
||
BinDeps.@setup | ||
|
||
const FFTW_VER = v"3.3.6-pl1" | ||
|
||
if is_windows() | ||
const libfftw_name = "libfftw3" | ||
const libfftwf_name = "libfftw3f" | ||
else | ||
const libfftw_name = "libfftw3_threads" | ||
const libfftwf_name = "libfftw3f_threads" | ||
end | ||
|
||
libfftw = library_dependency(libfftw_name, aliases=[replace(libfftw_name, "3", "")]) | ||
libfftwf = library_dependency(libfftwf_name, aliases=[replace(libfftwf_name, "3", "")]) | ||
|
||
provides(AptGet, "libfftw3", [libfftw, libfftwf], os=:Linux) | ||
provides(Pacman, "fftw", [libfftw, libfftwf], os=:Linux) | ||
provides(Zypper, "libfftw3", [libfftw, libfftwf], os=:Linux) | ||
provides(Yum, "fftw", [libfftw, libfftwf], os=:Linux) | ||
# provides(BSDPkg, "fftw3", [libfftw, libfftwf], os=:FreeBSD) | ||
|
||
if is_windows() | ||
using WinRPM | ||
provides(WinRPM.RPM, "fftw", [libfftw, libfftwf], os=:Windows) | ||
elseif is_apple() | ||
using Homebrew | ||
provides(Homebrew.HB, "fftw", [libfftw, libfftwf], os=:Darwin) | ||
end | ||
|
||
general_config = ["--prefix=" * abspath(builddir(libfftw)), | ||
"--libdir=" * abspath(libdir(libfftw)), | ||
"--bindir=" * abspath(bindir(libfftw))] | ||
|
||
try | ||
# There might not be a cc defined or available in the path | ||
machine = readchomp(`cc -dumpmachine`) | ||
push!(general_config, "--build=" * machine) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tkelman
Contributor
|
||
end | ||
|
||
fftw_config = ["--enabled-shared", "--disable-fortran", "--disable-mpi", "--enable-threads"] | ||
fftw_enable_single = "--enable-single" | ||
|
||
if Sys.ARCH === :ppc | ||
push!(fftw_config, "--enable-altivec") | ||
elseif Sys.ARCH === :x86_64 | ||
append!(fftw_config, ["--enable-sse2", "--enable-fma"]) | ||
end | ||
|
||
if is_windows() | ||
append!(fftw_config, ["--with-our-malloc", "--with-combined-threads"]) | ||
Sys.ARCH === :x86_64 || push!(fftw_config, "--with-incoming-stack-boundary=2") | ||
end | ||
|
||
const MAKE = is_bsd() && !is_apple() ? `gmake` : `make` | ||
|
||
provides(Sources, URI("http:https://www.fftw.org/fftw-$FFTW_VER.tar.gz"), [libfftw, libfftwf]) | ||
|
||
provides(BuildProcess, (@build_steps begin | ||
GetSources(libfftw) | ||
CreateDirectory(joinpath(builddir(libfftw), "libfftw")) | ||
@build_steps begin | ||
ChangeDirectory(joinpath(builddir(libfftw), "libfftw")) | ||
FileRule(joinpath(libdir(libfftw), "libfftw." * Libdl.dlext), @build_steps begin | ||
CreateDirectory(libdir(libfftw)) | ||
`$(joinpath(".", "configure")) $general_config $fftw_config $fftw_enable_single` | ||
`$MAKE` | ||
end) | ||
end | ||
end), libfftw) | ||
|
||
BinDeps.@install Dict([:libfftw => :libfftw, :libfftwf => :libfftwf]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Documenter, FFTW | ||
|
||
makedocs( | ||
modules = [FFTW], | ||
clean = false, | ||
format = :html, | ||
sitename = "FFTW.jl", | ||
pages = Any[ | ||
"Home" => "index.md", | ||
], | ||
) | ||
|
||
deploydocs( | ||
repo = "github.com/JuliaMath/FFTW.jl.git", | ||
target = "build", | ||
deps = nothing, | ||
make = nothing, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
__precompile__() | ||
|
||
module FFTW | ||
|
||
const depsfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl") | ||
if isfile(depsfile) | ||
include(depsfile) | ||
else | ||
error("FFTW is not properly installed. Please run Pkg.build(\"FFTW\") ", | ||
"and restart Julia.") | ||
end | ||
|
||
# MKL provides its own FFTW | ||
fftw_vendor() = Base.BLAS.vendor() === :mkl ? :mkl : :fftw | ||
|
||
if fftw_vendor() === :mkl | ||
const libfftw_name = "libmkl_rt" | ||
const libfftwf_name = "libmkl_rt" | ||
elseif is_windows() | ||
const libfftw_name = "libfftw3" | ||
const libfftwf_name = "libfftw3f" | ||
else | ||
const libfftw_name = "libfftw3_threads" | ||
const libfftwf_name = "libfftw3f_threads" | ||
end | ||
|
||
include("dft.jl") | ||
include("fft.jl") | ||
include("dct.jl") | ||
include("dsp.jl") # TODO: Move these functions to DSP.jl | ||
|
||
end # module |
why do you care about
--build
? that's the system where it gets built, not the system it's building for