Skip to content

Commit b4addae

Browse files
committed
set threads
1 parent e5e8d00 commit b4addae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/c_tri2cheb.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ function c_tri2cheb end
88
function c_cheb2tri end
99

1010
if Libdl.find_library(libfasttransforms) libfasttransforms
11+
ft_set_threads(n::Int) = ccall((:omp_set_num_threads, libfasttransforms), Nothing, (Int, ), n)
12+
ft_set_threads(Sys.CPU_THREADS)
13+
1114
c_plan_sph2fourier(n::Int) = ccall((:plan_sph2fourier, libfasttransforms), PlanPtr, (Int64, ), n)
1215
fc_sph2fourier(P::PlanPtr, A::Matrix{Float64}) = ccall((:execute_sph2fourier, libfasttransforms), Nothing, (PlanPtr, Ptr{Float64}, Int64, Int64), P, A, size(A, 1), size(A, 2))
1316

0 commit comments

Comments
 (0)