Browse Source

Add functions for threads

pull/38/head
Olav Møyner 2 months ago
parent
commit
1a632f8b56
  1. 9
      src/LibHYPRE.jl

9
src/LibHYPRE.jl

@ -10,6 +10,15 @@ function HYPRE_Init()
return HYPRE_Initialize() return HYPRE_Initialize()
end end
# Threading utilities if built with OpenMP
function HYPRE_NumThreads()
return @ccall libHYPRE.hypre_NumThreads()::HYPRE_Int
end
function HYPRE_SetNumThreads(nt::HYPRE_Int)
return @ccall libHYPRE.hypre_SetNumThreads(nt::HYPRE_Int)::Ptr{Cvoid}
end
# Add manual methods for some ::Function signatures where the library wants function # Add manual methods for some ::Function signatures where the library wants function
# pointers. Instead of creating function pointers to the Julia wrappers we can just look # pointers. Instead of creating function pointers to the Julia wrappers we can just look
# up the pointer in the library and pass that. # up the pointer in the library and pass that.

Loading…
Cancel
Save