Skip to content

Commit 91ac7a2

Browse files
committed
Split FFT abstractions into a separate package
1 parent 314815c commit 91ac7a2

File tree

11 files changed

+176
-180
lines changed

11 files changed

+176
-180
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.jl.cov
2+
*.jl.*.cov
3+
*.jl.mem
4+
deps/deps.jl
5+
deps/downloads
6+
deps/usr
7+
deps/src
8+
docs/build
9+
docs/site

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Documentation: http://docs.travis-ci.com/user/languages/julia/
2+
language: julia
3+
os:
4+
- linux
5+
julia:
6+
- 0.6
7+
- nightly
8+
notifications:
9+
email: false
10+
# uncomment the following lines to override the default test script
11+
#script:
12+
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
13+
# - julia -e 'Pkg.clone(pwd()); Pkg.build("AbstractFFTs"); Pkg.test("AbstractFFTs"; coverage=true)'
14+
after_success:
15+
# - julia -e 'Pkg.add("Coverage"); cd(Pkg.dir("AbstractFFTs")); using Coverage; Coveralls.submit(Coveralls.process_folder())'
16+
# - julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("AbstractFFTs")); include(joinpath("docs", "make.jl"))'

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Jeff Bezanson, Tony Kelman, Steven G. Johnson, et al.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AbstractFFTs.jl
2+
3+
A general framework for fast Fourier transforms (FFTs) in Julia.

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
julia 0.6-

docs/make.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Documenter, AbstractFFTs
2+
3+
makedocs(
4+
modules = [AbstractFFTs],
5+
clean = false,
6+
format = :html,
7+
sitename = "AbstractFFTs.jl",
8+
pages = Any[
9+
"Home" => "index.md",
10+
"API" => "api.md",
11+
"Implementations" => "implementations.md",
12+
],
13+
)
14+
15+
deploydocs(
16+
repo = "github.com/JuliaMath/AbstractFFTs.jl.git",
17+
target = "build",
18+
deps = nothing,
19+
make = nothing,
20+
)

docs/src/api.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Public Interface
2+
3+
```@docs
4+
AbstractFFTs.fft
5+
AbstractFFTs.fft!
6+
AbstractFFTs.ifft
7+
AbstractFFTs.ifft!
8+
AbstractFFTs.bfft
9+
AbstractFFTs.bfft!
10+
AbstractFFTs.plan_fft
11+
AbstractFFTs.plan_ifft
12+
AbstractFFTs.plan_bfft
13+
AbstractFFTs.plan_fft!
14+
AbstractFFTs.plan_ifft!
15+
AbstractFFTs.plan_bfft!
16+
AbstractFFTs.rfft
17+
AbstractFFTs.irfft
18+
AbstractFFTs.brfft
19+
AbstractFFTs.plan_rfft
20+
AbstractFFTs.plan_brfft
21+
AbstractFFTs.plan_irfft
22+
AbstractFFTs.fftshift(::Any)
23+
AbstractFFTs.fftshift(::Any, ::Any)
24+
AbstractFFTs.ifftshift
25+
```

docs/src/implementations.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# FFT Implementations
2+
3+
## Existing packages
4+
5+
The following packages extend the functionality provided by AbstractFFTs:
6+
7+
* [FFTW.jl](https://github.com/JuliaMath/FFTW.jl): Bindings for the
8+
[FFTW](http://www.fftw.org) library. This also used to be part of Base Julia.
9+
10+
## Defining a new implementation
11+
12+
Implementations should implement `Base.A_mul_B!(Y, plan, X)` so as to support
13+
pre-allocated output arrays.
14+
We don't define `*` in terms of `A_mul_B!` generically here, however, because
15+
of subtleties for in-place and real FFT plans.
16+
17+
To support `inv`, `\`, and `A_ldiv_B!(y, plan, x)`, we require `Plan` subtypes
18+
to have a `pinv::Plan` field, which caches the inverse plan, and which should be
19+
initially undefined.
20+
They should also implement `plan_inv(p)` to construct the inverse of a plan `p`.
21+
22+
Implementations only need to provide the unnormalized backwards FFT,
23+
similar to FFTW, and we do the scaling generically to get the inverse FFT.

docs/src/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AbstractFFTs.jl
2+
3+
This package provides a generic framework for defining
4+
[fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) (FFT)
5+
implementations in Julia.
6+
The code herein was part of Julia's Base library for Julia versions 0.6 and lower.
7+
8+
## Contents
9+
10+
```@contents
11+
Pages = ["api.md", "implementations.md"]
12+
```

0 commit comments

Comments
 (0)