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

Manually added deflate/inflate methods to wrapper #13

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/bindings/p4est_api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -823,3 +823,32 @@ end
function p4est_vtk_write_footer(cont)
ccall((:p4est_vtk_write_footer, p4est_lib), Cint, (Ptr{p4est_vtk_context_t},), cont)
end

# Julia wrapper for header: p4est_io.h
# Generated manually
function p4est_deflate_quadrants(p4est, data)
ccall((:p4est_deflate_quadrants, p4est_lib),
Ptr{sc_array_t}, (Ptr{p4est_t}, Ptr{Ptr{sc_array_t}}), p4est, data)
end

function p4est_inflate(mpicomm, connectivity,
global_first_quadrant, pertree,
quadrants, data, user_pointer)
ccall((:p4est_inflate, p4est_lib),
Ptr{p4est_t},
(MPI_Comm, Ptr{p4est_connectivity_t},
Ptr{p4est_gloidx_t}, Ptr{p4est_gloidx_t},
Ptr{sc_array_t}, Ptr{sc_array_t}, Ptr{Cvoid}),
mpicomm, connectivity, global_first_quadrant, pertree, quadrants, data, user_pointer)
end

# Julia wrapper for header: p4est_communication.h
# Generated manually
# void p4est_comm_count_pertree (p4est_t * p4est,
# p4est_gloidx_t * pertree)
function p4est_comm_count_pertree(p4est, pertree)
ccall((:p4est_comm_count_pertree, p4est_lib),
Cvoid,
(Ptr{p4est_t}, Ptr{p4est_gloidx_t}),
p4est, pertree)
end
30 changes: 30 additions & 0 deletions src/bindings/p8est_api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -875,3 +875,33 @@ end
function p8est_vtk_write_footer(cont)
ccall((:p8est_vtk_write_footer, p4est_lib), Cint, (Ptr{p8est_vtk_context_t},), cont)
end

# Julia wrapper for header: p8est_io.h
# Generated manually
function p8est_deflate_quadrants(p4est, data)
ccall((:p8est_deflate_quadrants, p4est_lib),
Ptr{sc_array_t}, (Ptr{p8est_t}, Ptr{Ptr{sc_array_t}}), p4est, data)
end

function p8est_inflate(mpicomm, connectivity,
global_first_quadrant, pertree,
quadrants, data, user_pointer)

ccall((:p8est_inflate, p4est_lib),
Ptr{p8est_t},
(MPI_Comm, Ptr{p8est_connectivity_t},
Ptr{p4est_gloidx_t}, Ptr{p4est_gloidx_t},
Ptr{sc_array_t}, Ptr{sc_array_t}, Ptr{Cvoid}),
mpicomm, connectivity, global_first_quadrant, pertree, quadrants, data, user_pointer)
end

# Julia wrapper for header: p8est_communication.h
# Generated manually
# void p4est_comm_count_pertree (p4est_t * p4est,
# p4est_gloidx_t * pertree)
function p8est_comm_count_pertree(p4est, pertree)
ccall((:p8est_comm_count_pertree, p4est_lib),
Cvoid,
(Ptr{p8est_t}, Ptr{p4est_gloidx_t}),
p4est, pertree)
end