Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chain rules for DCT #273

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
rm requires
  • Loading branch information
vpuri3 committed Jul 8, 2023
commit 74b8c75b606ca8f53d2f8f71258e0e1ac7140307
10 changes: 4 additions & 6 deletions src/FFTW.jl
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ using LinearAlgebra, Reexport, Preferences
@reexport using AbstractFFTs
using Base.Threads

@static if !isdefined(Base, :get_extension)
include("../ext/FFTWChainRulesCoreExt.jl")
end

import AbstractFFTs: Plan, ScaledPlan,
fft, ifft, bfft, fft!, ifft!, bfft!,
plan_fft, plan_ifft, plan_bfft, plan_fft!, plan_ifft!, plan_bfft!,
@@ -35,12 +39,6 @@ function __init__()
libfftw3[] = MKL_jll.libmkl_rt_path
libfftw3f[] = MKL_jll.libmkl_rt_path
end

@static if !isdefined(Base, :get_extension)
Requires.@require ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" begin
include("../ext/FFTWChainRulesCoreExt.jl")
end
end
end

# most FFTW calls other than fftw_execute should be protected by a lock to be thread-safe