Skip to content

Commit 7c82665

Browse files
Fix spin-weighted with |m| = 1
Close #139 and #136
1 parent 2ee166d commit 7c82665

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FastTransforms"
22
uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c"
3-
version = "0.12.1"
3+
version = "0.12.2"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
@@ -25,7 +25,7 @@ BinaryProvider = "0.5"
2525
DSP = "0.6"
2626
FFTW = "1"
2727
FastGaussQuadrature = "0.4"
28-
FastTransforms_jll = "0.5.0"
28+
FastTransforms_jll = "0.5.1"
2929
FillArrays = "0.9, 0.10, 0.11"
3030
Reexport = "0.2, 1.0"
3131
SpecialFunctions = "0.10, 1"

deps/build.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@ if ft_build_from_source == "true"
4242
print_error()
4343
end
4444
println("FastTransforms built from source.")
45+
else
46+
println("FastTransforms using precompiled binaries.")
4547
end

src/libfasttransforms.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ else
1010
using FastTransforms_jll
1111
end
1212

13-
function ft_fftw_plan_with_nthreads(n::Integer)
14-
ccall((:ft_fftw_plan_with_nthreads, libfasttransforms), Cvoid, (Cint, ), n)
15-
end
13+
ft_set_num_threads(n::Integer) = ccall((:ft_set_num_threads, libfasttransforms), Cvoid, (Cint, ), n)
14+
ft_fftw_plan_with_nthreads(n::Integer) = ccall((:ft_fftw_plan_with_nthreads, libfasttransforms), Cvoid, (Cint, ), n)
1615

1716
function __init__()
17+
n = ceil(Int, Sys.CPU_THREADS/2)
18+
ft_set_num_threads(n)
1819
ccall((:ft_fftw_init_threads, libfasttransforms), Cint, ())
19-
ft_fftw_plan_with_nthreads(ceil(Int, Sys.CPU_THREADS/2))
20+
ft_fftw_plan_with_nthreads(n)
2021
end
2122

2223

@@ -49,8 +50,6 @@ function renew!(x::Array{BigFloat})
4950
return x
5051
end
5152

52-
set_num_threads(n::Integer) = ccall((:ft_set_num_threads, libfasttransforms), Cvoid, (Cint, ), n)
53-
5453
function horner!(c::Vector{Float64}, x::Vector{Float64}, f::Vector{Float64})
5554
@assert length(x) == length(f)
5655
ccall((:ft_horner, libfasttransforms), Cvoid, (Cint, Ptr{Float64}, Cint, Cint, Ptr{Float64}, Ptr{Float64}), length(c), c, 1, length(x), x, f)

0 commit comments

Comments
 (0)