diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..433f715 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,6 @@ +# Runic formatting +# https://github.com/fredrikekre/HYPRE.jl/commit/640d77944e846a1f94e248bf2dea53310314f457 +640d77944e846a1f94e248bf2dea53310314f457 +# Switch from ccall() to @ccall in generated output +# https://github.com/fredrikekre/HYPRE.jl/commit/b4790048a7803298004bde24658ac90215a837a4 +b4790048a7803298004bde24658ac90215a837a4 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d60f070 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/Check.yml b/.github/workflows/Check.yml new file mode 100644 index 0000000..efb9eb5 --- /dev/null +++ b/.github/workflows/Check.yml @@ -0,0 +1,73 @@ +name: Code checks + +on: + pull_request: + push: + branches: ["master"] + +jobs: + + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + + explicit-imports: + runs-on: ubuntu-latest + name: "ExplicitImports.jl" + steps: + - uses: actions/checkout@v4 + # - uses: julia-actions/setup-julia@v2 + # with: + # version: '1' + - uses: julia-actions/cache@v2 + # - uses: julia-actions/julia-buildpkg@v1 + - name: Install dependencies + shell: julia --project=@explicit-imports {0} + run: | + # Add ExplicitImports.jl and packages that HYPRE has extensions for + using Pkg + Pkg.develop([ + PackageSpec(name = "HYPRE", path = pwd()), + ]) + Pkg.add([ + PackageSpec(name = "ExplicitImports", version = "1.9"), + PackageSpec(name = "PartitionedArrays"), + PackageSpec(name = "SparseArrays"), + PackageSpec(name = "SparseMatricesCSR"), + ]) + - name: ExplicitImports.jl code checks + shell: julia --project=@explicit-imports {0} + run: | + using HYPRE, ExplicitImports, PartitionedArrays, SparseArrays, SparseMatricesCSR + # Check HYPRE + check_no_implicit_imports(HYPRE) + check_no_stale_explicit_imports(HYPRE) + check_all_qualified_accesses_via_owners(HYPRE) + check_no_self_qualified_accesses(HYPRE) + # Check extension modules + for ext in (:HYPREPartitionedArrays, :HYPRESparseArrays, :HYPRESparseMatricesCSR) + extmod = Base.get_extension(HYPRE, ext) + if extmod !== nothing + check_no_implicit_imports(extmod) + check_no_stale_explicit_imports(extmod) + check_all_qualified_accesses_via_owners(extmod) + check_no_self_qualified_accesses(extmod) + else + @warn "$(ext) extension not available." + end + end + + runic: + name: Runic + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + - uses: julia-actions/cache@v2 + - uses: fredrikekre/runic-action@v1 + with: + version: '1' diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 0000000..df4d5b2 --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,27 @@ +--- +name: Documentation +on: + push: + branches: + - 'master' + - 'release-' + tags: ['*'] + pull_request: + +jobs: + docs: + name: Julia 1.11 - ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: '1.11' + - uses: julia-actions/cache@v2 + - name: Install dependencies + run: julia --project=docs -e 'using Pkg; Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + run: julia --project=docs --color=yes docs/make.jl diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml new file mode 100644 index 0000000..f8ec042 --- /dev/null +++ b/.github/workflows/Test.yml @@ -0,0 +1,41 @@ +name: Test + +on: + push: + branches: + - 'master' + - 'release-' + tags: ['*'] + pull_request: + +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + version: + - '1.10' + - '1' + - 'nightly' + os: + - ubuntu-latest + include: + - os: windows-latest + version: '1' + - os: macOS-latest + version: '1' + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v5 + with: + files: lcov.info + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e1a6213..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI - -on: - push: - branches: - - 'master' - - 'release-' - tags: '*' - pull_request: - -jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - version: - - '1.6' - - '1' - - 'nightly' - os: - - ubuntu-latest - include: - - os: windows-latest - version: '1' - - os: macOS-latest - version: '1' - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - - uses: julia-actions/cache@v1 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v2 - with: - files: ./lcov.info - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - uses: julia-actions/cache@v1 - - name: Install dependencies - run: julia --project=docs -e 'using Pkg; Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - run: julia --project=docs --color=yes docs/make.jl diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6c219d2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..011cf9f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,112 @@ +# HYPRE.jl changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.7.0] - 2024-10-09 +### Changed + - Support for Julia 1.6 have been dropped and for this and future releases Julia 1.10 or + later will be required. ([#27]) + - Constant struct fields of `HYPREMatrix` and `HYPREVector` are now marked with `const`. + ([#28]) + +## [v1.6.0] - 2024-09-29 +### Changed + - PartitionedArrays.jl dependency upgraded from release series 0.3.x to release series + 0.5.x. ([#17], [#18]) + - CEnum.jl dependency upgraded to release series 0.5.x (release series 0.4.x still + allowed). ([#17], [#18]) + - PartitionedArrays.jl support (`PSparseMatrix`, `PVector`) is now provided by a package + extension. ([#23]) + - SparseMatricesCSR.jl support (`SparseMatrixCSR`) is now provided by a package extension. + ([#24]) + - SparseArrays.jl support (`SparseMatrixCSC`) is now provided by a package extension. + ([#25]) + +## [v1.5.0] - 2023-05-26 +### Changed + - PartitionedArrays.jl dependency upgraded from version 0.2.x to version 0.3.x. + ([#16]) + +## [v1.4.0] - 2023-01-20 +### Added + - New function `HYPRE.GetFinalRelativeResidualNorm(s::HYPRESolver)` for getting the final + residual norm from a solver. This function dispatches on the solver to the corresponding + C API wrapper `LibHYPRE.HYPRE_${Solver}GetFinalRelativeResidualNorm`. ([#14]) + - New function `HYPRE.GetNumIterations(s::HYPRESolver)` for getting the number of + iterations from a solver. This function dispatches on the solver to the corresponding C + API wrapper `LibHYPRE.HYPRE_${Solver}GetNumIterations`. ([#14]) + +## [v1.3.1] - 2023-01-14 +### Fixed + - Solvers now keep an reference to the added preconditioner to make sure the preconditioner + is not finalized before the solver. This fixes crashes (segfaults) that could happen in + case no other reference to the preconditioner existed in the program. ([#12]) + - The proper conversion methods for `ccall` are now defined for `HYPREMatrix`, + `HYPREVector`, and `HYPRESolver` such that they can be passed direcly to `HYPRE_*` + functions and let `ccall` guarantee the GC preservation of these objects. Although not + observed in practice, this fixes a possible race condition where the matrix/vector/solver + could be finalized too early. ([#13]) + +## [v1.3.0] - 2022-12-30 +### Added + - Rectangular matrices can now be assembled by the new method + `HYPRE.assemble!(::HYPREMatrixAssembler, i::Vector, j::Vector, a::Matrix)` where `i` are + the rows and `j` the columns. ([#7]) +### Fixed + - All created HYPRE objects (`HYPREMatrix`, `HYPREVector`, and `HYPRESolver`s) are now kept + track of internally and explicitly `finalize`d (if they haven't been GC'd) before + finalizing HYPRE. This fixes a "race condition" where MPI and/or HYPRE would finalize + before these Julia objects are garbage collected and finalized. ([#8]) +### Deprecated + - The method `HYPRE.assemble!(A::HYPREMatrixAssembler, ij::Vector, a::Matrix)` have been + deprecated in favor of `HYPRE.assemble!(A::HYPREMatrixAssembler, i::Vector, j::Vector, + a::Matrix)`, i.e. it is now required to explicitly pass rows and column indices + individually. The motivation behind this is to support assembling of rectangular + matrices. Note that `HYPRE.assemble!(A::HYPREAssembler, ij::Vector, a::Matrix, + b::Vector)` is still supported, where `ij` are used as row and column indices for `a`, as + well as row indices for `b`. ([#6]) + +## [v1.2.0] - 2022-10-12 +### Added + - Added assembler interface to assemble `HYPREMatrix` and/or `HYPREVector` directly without + an intermediate sparse structure in Julia. ([#5]) + +## [v1.1.0] - 2022-10-05 +### Added + - Added support for MPI.jl version 0.20.x (in addition to the existing version 0.19.x + support). ([#2]) + +## [v1.0.0] - 2022-07-28 +Initial release of HYPRE.jl. + + + + +[v1.0.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.0.0 +[v1.1.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.1.0 +[v1.2.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.2.0 +[v1.3.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.3.0 +[v1.3.1]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.3.1 +[v1.4.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.4.0 +[v1.5.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.5.0 +[v1.6.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.6.0 +[v1.7.0]: https://github.com/fredrikekre/HYPRE.jl/releases/tag/v1.7.0 +[#2]: https://github.com/fredrikekre/HYPRE.jl/issues/2 +[#5]: https://github.com/fredrikekre/HYPRE.jl/issues/5 +[#6]: https://github.com/fredrikekre/HYPRE.jl/issues/6 +[#7]: https://github.com/fredrikekre/HYPRE.jl/issues/7 +[#8]: https://github.com/fredrikekre/HYPRE.jl/issues/8 +[#12]: https://github.com/fredrikekre/HYPRE.jl/issues/12 +[#13]: https://github.com/fredrikekre/HYPRE.jl/issues/13 +[#14]: https://github.com/fredrikekre/HYPRE.jl/issues/14 +[#16]: https://github.com/fredrikekre/HYPRE.jl/issues/16 +[#17]: https://github.com/fredrikekre/HYPRE.jl/issues/17 +[#18]: https://github.com/fredrikekre/HYPRE.jl/issues/18 +[#23]: https://github.com/fredrikekre/HYPRE.jl/issues/23 +[#24]: https://github.com/fredrikekre/HYPRE.jl/issues/24 +[#25]: https://github.com/fredrikekre/HYPRE.jl/issues/25 +[#27]: https://github.com/fredrikekre/HYPRE.jl/issues/27 +[#28]: https://github.com/fredrikekre/HYPRE.jl/issues/28 diff --git a/Project.toml b/Project.toml index 37f17e0..8540e52 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "HYPRE" uuid = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" -version = "1.1.0" +version = "1.7.0" [deps] CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" @@ -8,22 +8,33 @@ HYPRE_jll = "0a602bbd-b08b-5d75-8d32-0de6eef44785" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + +[weakdeps] PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" +[extensions] +HYPREPartitionedArrays = ["PartitionedArrays", "SparseArrays", "SparseMatricesCSR"] +HYPRESparseArrays = "SparseArrays" +HYPRESparseMatricesCSR = ["SparseArrays", "SparseMatricesCSR"] + [compat] -CEnum = "0.4" +CEnum = "0.4, 0.5" LinearAlgebra = "1" LinearSolve = "3" MPI = "0.19, 0.20" -PartitionedArrays = "0.2" +PartitionedArrays = "0.5" SparseMatricesCSR = "0.6" -julia = "1.6" +julia = "1.10" [extras] +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["LinearSolve", "Test"] +test = ["LinearSolve", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR", "Test"] diff --git a/README.md b/README.md index c0caa67..dbc6ec0 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,13 @@ # HYPRE.jl -| **Documentation** | **Build Status** | -|:------------------------- |:------------------------------------- | -| [![][docs-img]][docs-url] | [![][gh-actions-img]][gh-actions-url] | +[![Documentation](https://img.shields.io/badge/docs-latest%20release-blue.svg)](https://fredrikekre.github.io/HYPRE.jl/) +[![Test](https://github.com/fredrikekre/HYPRE.jl/actions/workflows/Test.yml/badge.svg?branch=master&event=push)](https://github.com/fredrikekre/HYPRE.jl/actions/workflows/Test.yml) +[![Codecov](https://codecov.io/github/fredrikekre/HYPRE.jl/graph/badge.svg)](https://codecov.io/github/fredrikekre/HYPRE.jl) +[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl) -[Julia][julia] interface to [HYPRE][hypre] ("high performance preconditioners and solvers -featuring multigrid methods for the solution of large, sparse linear systems of equations on -massively parallel computers"). +[Julia](https://julialang.org) interface to [HYPRE](https://github.com/hypre-space/hypre) +("high performance preconditioners and solvers featuring multigrid methods for the solution +of large, sparse linear systems of equations on massively parallel computers"). While the main purpose of HYPRE is to solve problems on multiple cores, it can also be used for single core problems. HYPRE.jl aims to make it easy to use both modes of operation, with @@ -14,12 +15,31 @@ an interface that should be familiar to Julia programmers. This README includes examples -- refer to the [documentation][docs-url] for more details, and for information about the included solvers and preconditioners and how to configure them. -## Example: Single-core solve with standard sparse matrices +## Installation + +HYPRE.jl can be installed from the Pkg REPL (press `]` in the Julia REPL to enter): + +``` +(@v1) pkg> add HYPRE +``` + +To configure MPI, see the [documentation for MPI.jl](https://juliaparallel.org/MPI.jl/). + +## Changes + +All notable changes are documented in [CHANGELOG.md](CHANGELOG.md). + +## Usage + +Some basic usage examples are shown below. See the [documentation][docs-url] for details. + +### Example: Single-core solve with standard sparse matrices It is possible to use Julia's standard sparse arrays (`SparseMatrixCSC` from the -[SparseArrays.jl][sparse-stdlib] standard library, and `SparseMatrixCSR` from the -[SparseMatricesCSR.jl][sparsecsr] package) directly in HYPRE.jl. For example, to solve -`Ax = b` with conjugate gradients: +[SparseArrays.jl](https://github.com/JuliaSparse/SparseArrays.jl) standard library, and +`SparseMatrixCSR` from the +[SparseMatricesCSR.jl](https://github.com/gridap/SparseMatricesCSR.jl) package) directly in +HYPRE.jl. For example, to solve `Ax = b` with conjugate gradients: ```julia # Initialize linear system @@ -33,12 +53,12 @@ cg = HYPRE.PCG() x = HYPRE.solve(cg, A, b) ``` -## Example: Multi-core solve using PartitionedArrays.jl +### Example: Multi-core solve using PartitionedArrays.jl -For multi-core problems it is possible to use [PartitionedArrays.jl][partarrays] directly -with HYPRE.jl. Once the linear system is setup the solver interface is identical. For -example, to solve `Ax = b` with bi-conjugate gradients and an algebraic multigrid -preconditioner: +For multi-core problems it is possible to use +[PartitionedArrays.jl](https://github.com/fverdugo/PartitionedArrays.jl) directly with +HYPRE.jl. Once the linear system is setup the solver interface is identical. For example, to +solve `Ax = b` with bi-conjugate gradients and an algebraic multigrid preconditioner: ```julia # Initialize linear system @@ -54,14 +74,3 @@ bicg = HYPRE.BiCGSTAB(; Precond = precond) # Compute the solution x = HYPRE.solve(bicg, A, b) ``` - - -[julia]: https://julialang.org/ -[hypre]: https://github.com/hypre-space/hypre -[sparse-stdlib]: https://github.com/JuliaSparse/SparseArrays.jl -[sparsecsr]: https://github.com/gridap/SparseMatricesCSR.jl -[partarrays]: https://github.com/fverdugo/PartitionedArrays.jl -[docs-img]: https://img.shields.io/badge/docs-stable%20release-blue.svg -[docs-url]: https://fredrikekre.github.io/HYPRE.jl/ -[gh-actions-img]: https://github.com/fredrikekre/HYPRE.jl/workflows/CI/badge.svg -[gh-actions-url]: https://github.com/fredrikekre/HYPRE.jl/actions?query=workflow%3ACI diff --git a/docs/Makefile b/docs/Makefile index 8dd5797..b44d74b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,11 +1,8 @@ SRCDIR:=$(shell dirname $(abspath $(firstword $(MAKEFILE_LIST)))) -default: livedocs +default: liveserver -instantiate: - julia --project=${SRCDIR} -e 'using Pkg; Pkg.instantiate()' +liveserver: + julia --project=${SRCDIR} ${SRCDIR}/liveserver.jl -livedocs: instantiate - julia --project=${SRCDIR} -e 'using LiveServer; LiveServer.servedocs(; foldername=pwd())' -- liveserver - -.PHONY: default instantiate livedocs +.PHONY: default liveserver diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 076b49f..089ea11 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.2" +julia_version = "1.11.0" manifest_format = "2.0" -project_hash = "7c98a97551e318432a6ba3bc3fd4758623a247ac" +project_hash = "59b08f4b60c862a102ba6a5a40dd11b11cb0ae51" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" @@ -10,71 +10,107 @@ uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" version = "0.0.1" [[deps.AbstractTrees]] -git-tree-sha1 = "5c0b629df8a5566a06f5fef5100b53ea56e465a0" +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" -version = "0.4.2" +version = "0.4.5" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" +version = "0.5.0" + +[[deps.Changelog]] +git-tree-sha1 = "e579c6157598169ad4ef17263bdf3452b4a3e316" +uuid = "5217a498-cd5d-4ec6-b8c2-9b85a09b6e3e" +version = "1.1.0" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.6" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "0.5.2+0" +version = "1.1.1+0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.Distances]] -deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.7" +version = "1.11.0" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" [[deps.DocStringExtensions]] deps = ["LibGit2"] -git-tree-sha1 = "5158c2b41018c5f7eb1470d558127ac274eca0c9" +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.1" +version = "0.9.3" [[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "REPL", "Test", "Unicode"] -git-tree-sha1 = "540cb30edf31561e99df05a502c1922107d50ae1" -repo-rev = "master" -repo-url = "https://github.com/JuliaDocs/Documenter.jl.git" +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"] +git-tree-sha1 = "5a1ee886566f2fa9318df1273d8b778b9d42712d" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.28.0-DEV" +version = "1.7.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.6.2+0" + [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" + +[[deps.Git]] +deps = ["Git_jll"] +git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" +uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" +version = "1.3.1" + +[[deps.Git_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "ea372033d09e4552a04fd38361cd019f9003f4f4" +uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" +version = "2.46.2+0" [[deps.HYPRE]] -deps = ["CEnum", "HYPRE_jll", "Libdl", "MPI", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR"] +deps = ["CEnum", "HYPRE_jll", "Libdl", "MPI"] path = ".." uuid = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" -version = "1.1.0" +version = "1.7.0" + + [deps.HYPRE.extensions] + HYPREPartitionedArrays = ["PartitionedArrays", "SparseArrays", "SparseMatricesCSR"] + HYPRESparseArrays = "SparseArrays" + HYPRESparseMatricesCSR = ["SparseArrays", "SparseMatricesCSR"] + + [deps.HYPRE.weakdeps] + PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" [[deps.HYPRE_jll]] deps = ["Artifacts", "JLLWrappers", "LAPACK_jll", "LazyArtifacts", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenBLAS_jll", "OpenMPI_jll", "Pkg", "TOML"] @@ -82,124 +118,151 @@ git-tree-sha1 = "b77d3eca75f8442e034ccf415c87405a49e77985" uuid = "0a602bbd-b08b-5d75-8d32-0de6eef44785" version = "2.23.1+1" +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "dd3b49277ec2bb2c6b94eb1604d4d0616016f7a6" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.11.2+0" + [[deps.IOCapture]] deps = ["Logging", "Random"] -git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a" +git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.2" +version = "0.2.5" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IterativeSolvers]] -deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] -git-tree-sha1 = "1169632f425f79429f245113b775a0e3d121457c" -uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" -version = "0.9.2" +version = "1.11.0" [[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "f389674c99bfcde17dc57454011aa44d5a260a40" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" +version = "1.6.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.3" +version = "0.21.4" [[deps.LAPACK_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg", "libblastrampoline_jll"] -git-tree-sha1 = "a539affa8228208f5a3396037165b04bff9a2ba6" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "libblastrampoline_jll"] +git-tree-sha1 = "1b25c30fa49db281be615793e0f85282a8f22822" uuid = "51474c39-65e3-53ba-86ba-03b1b862ec14" -version = "3.10.0+1" +version = "3.12.0+2" + +[[deps.LazilyInitializedFields]] +git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" +uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" +version = "1.2.2" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.6.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" -[[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.17.0+0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MPI]] -deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Requires", "Serialization", "Sockets"] -git-tree-sha1 = "97d9313b6bb7ac04f5b8cfb33569cd30d0441efe" +deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PkgVersion", "PrecompileTools", "Requires", "Serialization", "Sockets"] +git-tree-sha1 = "892676019c58f34e38743bc989b0eca5bce5edc5" uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" -version = "0.20.0" +version = "0.20.22" + + [deps.MPI.extensions] + AMDGPUExt = "AMDGPU" + CUDAExt = "CUDA" + + [deps.MPI.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" [[deps.MPICH_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "6d4fa43afab4611d090b11617ecea1a144b21d35" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "7715e65c47ba3941c502bffb7f266a41a7f54423" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.0.2+5" +version = "4.2.3+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] -git-tree-sha1 = "9959c42b41220206eeda9004f695d913e2245658" +git-tree-sha1 = "c105fe467859e7f6e9a852cb15cb4301126fac07" uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" -version = "0.1.5" +version = "0.1.11" [[deps.MPItrampoline_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "b3f9e42685b4ad614eca0b44bd863cd41b1c86ea" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "70e830dab5d0775183c99fc75e4c24c614ed7142" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.0.2+1" +version = "5.5.1+0" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MarkdownAST]] deps = ["AbstractTrees", "Markdown"] -git-tree-sha1 = "1dfa364acc47225afdc57c8998c988bc107ff0d2" +git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" -version = "0.1.0" +version = "0.1.2" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.6+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "a16aa086d335ed7e0170c5265247db29172af2f9" +git-tree-sha1 = "f12a29c4400ba812841c6ace3f4efbb6dbb3ba01" uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" -version = "10.1.3+2" +version = "10.1.4+2" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -208,54 +271,78 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.27+1" [[deps.OpenMPI_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "346d6b357a480300ed7854dbc70e746ac52e10fd" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] +git-tree-sha1 = "bfce6d523861a6c562721b262c0d1aaeead2647f" uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" -version = "4.1.3+3" +version = "5.0.5+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.0.15+1" + +[[deps.PCRE2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.42.0+1" [[deps.Parsers]] -deps = ["Dates"] -git-tree-sha1 = "3d5bf43e3e8b412656404ed9466f1dcbf7c50269" +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.4.0" - -[[deps.PartitionedArrays]] -deps = ["Distances", "IterativeSolvers", "LinearAlgebra", "MPI", "Printf", "SparseArrays", "SparseMatricesCSR"] -git-tree-sha1 = "94291b7ddeac39816572660383055870b41bca64" -uuid = "5a9dfac6-5c52-46f7-8278-5e2210713be9" -version = "0.2.11" +version = "2.8.1" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.11.0" +weakdeps = ["REPL"] + + [deps.Pkg.extensions] + REPLExt = "REPL" + +[[deps.PkgVersion]] +deps = ["Pkg"] +git-tree-sha1 = "f9501cc0430a26bc3d156ae1b5b0c1b47af4d6da" +uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688" +version = "0.3.3" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.3.0" +version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" -[[deps.RecipesBase]] -deps = ["SnoopPrecompile"] -git-tree-sha1 = "612a4d76ad98e9722c8ba387614539155a59e30c" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.0" +[[deps.RegistryInstances]] +deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] +git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" +uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" +version = "0.1.0" [[deps.Requires]] deps = ["UUIDs"] @@ -269,76 +356,61 @@ version = "0.7.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.SnoopPrecompile]] -git-tree-sha1 = "f604441450a3c0569830946e5b33b78c928e1a85" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.1" +version = "1.11.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" -[[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.SparseMatricesCSR]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "4870b3e7db7063927b163fb981bd579410b68b2d" -uuid = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" -version = "0.6.6" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.5.0" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" +[[deps.StyledStrings]] +uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" +version = "1.11.0" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" + +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.11.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" diff --git a/docs/Project.toml b/docs/Project.toml index 92f1f35..894ed74 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,4 @@ [deps] +Changelog = "5217a498-cd5d-4ec6-b8c2-9b85a09b6e3e" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" diff --git a/docs/liveserver.jl b/docs/liveserver.jl new file mode 100755 index 0000000..7d9c6fa --- /dev/null +++ b/docs/liveserver.jl @@ -0,0 +1,24 @@ +#!/usr/bin/env julia + +# Root of the repository +const repo_root = dirname(@__DIR__) + +# Make sure docs environment is active and instantiated +import Pkg +Pkg.activate(@__DIR__) +Pkg.instantiate() + +# Communicate with docs/make.jl that we are running in live mode +push!(ARGS, "liveserver") + +# Run LiveServer.servedocs(...) +import LiveServer +LiveServer.servedocs(; + # Documentation root where make.jl and src/ are located + foldername = joinpath(repo_root, "docs"), + # Extra source folder to watch for changes + include_dirs = [ + # Watch the src folder so docstrings can be Revise'd + joinpath(repo_root, "src"), + ], +) diff --git a/docs/make.jl b/docs/make.jl index 484f572..c42a801 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -7,6 +7,15 @@ end using Documenter using HYPRE +using Changelog + +# Changelog +Changelog.generate( + Changelog.Documenter(), + joinpath(@__DIR__, "..", "CHANGELOG.md"), + joinpath(@__DIR__, "src", "changelog.md"); + repo = "Ferrite-FEM/Ferrite.jl", +) makedocs( sitename = "HYPRE.jl", @@ -16,6 +25,7 @@ makedocs( modules = [HYPRE], pages = Any[ "Home" => "index.md", + hide("Changelog" => "changelog.md"), "matrix-vector.md", "solvers-preconditioners.md", "libhypre.md", diff --git a/docs/src/api.md b/docs/src/api.md index 41b50fa..ca6b8fb 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -6,6 +6,14 @@ HYPRE.Init ``` +## Matrix/vector creation + +```@docs +HYPRE.start_assemble! +HYPRE.assemble! +HYPRE.finish_assemble! +``` + ## Solvers and preconditioners ```@docs @@ -24,3 +32,8 @@ HYPRE.ILU HYPRE.PCG HYPRE.ParaSails ``` + +```@docs +HYPRE.GetNumIterations +HYPRE.GetFinalRelativeResidualNorm +``` diff --git a/docs/src/libhypre.md b/docs/src/libhypre.md index 802547d..161dc60 100644 --- a/docs/src/libhypre.md +++ b/docs/src/libhypre.md @@ -15,15 +15,13 @@ directly. Functions from the `LibHYPRE` submodule can be used together with the high level interface. This is useful when you need some functionality from the library which isn't exposed in the high level interface. Many functions require passing a reference to a matrix/vector or a -solver. These can be obtained as follows: - -| C type signature | Argument to pass | -|:---------------------|:-------------------------------------| -| `HYPRE_IJMatrix` | `A.ijmatrix` where `A::HYPREMatrix` | -| `HYPRE_ParCSRMatrix` | `A.parmatrix` where `A::HYPREMatrix` | -| `HYPRE_IJVector` | `b.ijvector` where `b::HYPREVector` | -| `HYPRE_ParVector` | `b.parvector` where `b::HYPREVector` | -| `HYPRE_Solver` | `s.solver` where `s::HYPRESolver` | +solver. HYPRE.jl defines the appropriate conversion methods used by `ccall` such that + - `A::HYPREMatrix` can be passed to `HYPRE_*` functions with `HYPRE_IJMatrix` or + `HYPRE_ParCSRMatrix` in the signature + - `b::HYPREVector` can be passed to `HYPRE_*` functions with `HYPRE_IJVector` or + `HYPRE_ParVector` in the signature + - `s::HYPRESolver` can be passed to `HYPRE_*` functions with `HYPRE_Solver` in the + signature [^1]: Bindings are generated using [Clang.jl](https://github.com/JuliaInterop/Clang.jl), see diff --git a/docs/src/matrix-vector.md b/docs/src/matrix-vector.md index c9ce5b0..bc148d7 100644 --- a/docs/src/matrix-vector.md +++ b/docs/src/matrix-vector.md @@ -5,15 +5,59 @@ datastructures. Specifically it uses the [IJ System Interface](https://hypre.readthedocs.io/en/latest/api-int-ij.html) which can be used for general sparse matrices. -HYPRE.jl defines conversion methods from standard Julia datastructures to `HYPREMatrix` and -`HYPREVector`, respectively. See the following sections for details: +`HYPREMatrix` and `HYPREVector` can be constructed either by assembling directly, or by +first assembling into a Julia datastructure and the converting it. These various methods are +outlined in the following sections: ```@contents -Pages = ["hypre-matrix-vector.md"] +Pages = ["matrix-vector.md"] Depth = 2:2 ``` -## PartitionedArrays.jl (multi-process) + +## Direct assembly (multi-/single-process) + +Creating `HYPREMatrix` and/or `HYPREVector` directly is possible by first creating an +assembler which is used to add all individual contributions to the matrix/vector. The +required steps are: + + 1. Create a new matrix and/or vector using the constructor. + 2. Create an assembler and initialize the assembling procedure using + [`HYPRE.start_assemble!`](@ref). + 3. Assemble all non-zero contributions (e.g. element matrix/vector in a finite element + simulation) using [`HYPRE.assemble!`](@ref). + 4. Finalize the assembly using [`HYPRE.finish_assemble!`](@ref). + +After these steps the matrix and vector are ready to pass to the solver. In case of multiple +consecutive solves with the same sparsity pattern (e.g. multiple Newton steps, multiple time +steps, ...) it is possible to reuse the same matrix by simply skipping the first step above. + +**Example pseudocode** + +```julia +# MPI communicator +comm = MPI.COMM_WORLD # MPI.COMM_SELF for single-process setups + +# Create empty matrix and vector -- this process owns rows ilower to iupper +A = HYPREMatrix(comm, ilower, iupper) +b = HYPREVector(comm, ilower, iupper) + +# Create assembler +assembler = HYPRE.start_assemble!(A, b) + +# Assemble contributions from all elements owned by this process +for element in owned_elements + Ae, be = compute_element_contribution(...) + global_indices = get_global_indices(...) + HYPRE.assemble!(assembler, global_indices, Ae, be) +end + +# Finalize the assembly +A, b = HYPRE.finish_assemble!(assembler) +``` + + +## Create from PartitionedArrays.jl (multi-process) HYPRE.jl integrates seemlessly with `PSparseMatrix` and `PVector` from the [PartitionedArrays.jl](https://github.com/fverdugo/PartitionedArrays.jl) package. These can @@ -71,7 +115,7 @@ copy!(x, x_h) ``` -## `SparseMatrixCSC` / `SparseMatrixCSR` (single-process) +## Create from `SparseMatrixCSC` / `SparseMatrixCSR` (single-process) HYPRE.jl also support working directly with `SparseMatrixCSC` (from the [SparseArrays.jl](https://github.com/JuliaSparse/SparseArrays.jl) standard library) and @@ -100,10 +144,3 @@ x = solve(solver, A, b) x = zeros(length(b)) solve!(solver, x, A, b) ``` - - -## `SparseMatrixCSC` / `SparseMatrixCSR` (multi-process) - -!!! warning - This interface isn't finalized yet and is therefore not documented since it - is subject to change. diff --git a/examples/ex5.jl b/examples/ex5.jl index 561842b..ec503d4 100644 --- a/examples/ex5.jl +++ b/examples/ex5.jl @@ -85,7 +85,9 @@ function main(argc, argv) end # Preliminaries: want at least one processor per row - if n * n < num_procs; n = trunc(Int, sqrt(n)) + 1; end + if n * n < num_procs + n = trunc(Int, sqrt(n)) + 1 + end N = n * n # global number of rows h = 1.0 / (n + 1) # mesh size h2 = h * h @@ -257,8 +259,7 @@ function main(argc, argv) num_iterations = Ref{Cint}() final_res_norm = Ref{Cdouble}() - # AMG - if solver_id == 0 + if solver_id == 0 # AMG # Create solver HYPRE_BoomerAMGCreate(solver_ref) solver = solver_ref[] @@ -270,7 +271,7 @@ function main(argc, argv) HYPRE_BoomerAMGSetRelaxOrder(solver, 1) # uses C/F relaxation HYPRE_BoomerAMGSetNumSweeps(solver, 1) # Sweeeps on each level HYPRE_BoomerAMGSetMaxLevels(solver, 20) # maximum number of levels - HYPRE_BoomerAMGSetTol(solver, 1e-7) # conv. tolerance + HYPRE_BoomerAMGSetTol(solver, 1.0e-7) # conv. tolerance # Now setup and solve! HYPRE_BoomerAMGSetup(solver, parcsr_A, par_b, par_x) @@ -289,15 +290,14 @@ function main(argc, argv) # Destroy solver HYPRE_BoomerAMGDestroy(solver) - # PCG - elseif solver_id == 50 + elseif solver_id == 50 # PCG # Create solver HYPRE_ParCSRPCGCreate(MPI_COMM_WORLD, solver_ref) solver = solver_ref[] # Set some parameters (See Reference Manual for more parameters) HYPRE_PCGSetMaxIter(solver, 1000) # max iterations - HYPRE_PCGSetTol(solver, 1e-7) # conv. tolerance + HYPRE_PCGSetTol(solver, 1.0e-7) # conv. tolerance HYPRE_PCGSetTwoNorm(solver, 1) # use the two norm as the stopping criteria HYPRE_PCGSetPrintLevel(solver, 2) # prints out the iteration info HYPRE_PCGSetLogging(solver, 1) # needed to get run info later @@ -319,15 +319,14 @@ function main(argc, argv) # Destroy solver HYPRE_ParCSRPCGDestroy(solver) - # PCG with AMG preconditioner - elseif solver_id == 1 + elseif solver_id == 1 # PCG with AMG preconditioner # Create solver HYPRE_ParCSRPCGCreate(MPI_COMM_WORLD, solver_ref) solver = solver_ref[] # Set some parameters (See Reference Manual for more parameters) HYPRE_PCGSetMaxIter(solver, 1000) # max iterations - HYPRE_PCGSetTol(solver, 1e-7) # conv. tolerance + HYPRE_PCGSetTol(solver, 1.0e-7) # conv. tolerance HYPRE_PCGSetTwoNorm(solver, 1) # use the two norm as the stopping criteria HYPRE_PCGSetPrintLevel(solver, 2) # print solve info HYPRE_PCGSetLogging(solver, 1) # needed to get run info later @@ -364,15 +363,14 @@ function main(argc, argv) HYPRE_ParCSRPCGDestroy(solver) HYPRE_BoomerAMGDestroy(precond) - # PCG with Parasails Preconditioner - elseif solver_id == 8 + elseif solver_id == 8 # PCG with Parasails Preconditioner # Create solver HYPRE_ParCSRPCGCreate(MPI_COMM_WORLD, solver_ref) solver = solver_ref[] # Set some parameters (See Reference Manual for more parameters) HYPRE_PCGSetMaxIter(solver, 1000) # max iterations - HYPRE_PCGSetTol(solver, 1e-7) # conv. tolerance + HYPRE_PCGSetTol(solver, 1.0e-7) # conv. tolerance HYPRE_PCGSetTwoNorm(solver, 1) # use the two norm as the stopping criteria HYPRE_PCGSetPrintLevel(solver, 2) # print solve info HYPRE_PCGSetLogging(solver, 1) # needed to get run info later @@ -412,8 +410,7 @@ function main(argc, argv) HYPRE_ParCSRPCGDestroy(solver) HYPRE_ParaSailsDestroy(precond) - # Flexible GMRES with AMG Preconditioner - elseif solver_id == 61 + elseif solver_id == 61 # Flexible GMRES with AMG Preconditioner # Create solver HYPRE_ParCSRFlexGMRESCreate(MPI_COMM_WORLD, solver_ref) @@ -422,7 +419,7 @@ function main(argc, argv) # Set some parameters (See Reference Manual for more parameters) HYPRE_FlexGMRESSetKDim(solver, 30) # restart HYPRE_FlexGMRESSetMaxIter(solver, 1000) # max iterations - HYPRE_FlexGMRESSetTol(solver, 1e-7) # conv. tolerance + HYPRE_FlexGMRESSetTol(solver, 1.0e-7) # conv. tolerance HYPRE_FlexGMRESSetPrintLevel(solver, 2) # print solve info HYPRE_FlexGMRESSetLogging(solver, 1) # needed to get run info later @@ -459,7 +456,9 @@ function main(argc, argv) HYPRE_BoomerAMGDestroy(precond) else - if myid == 0; println("Invalid solver id specified."); end + if myid == 0 + println("Invalid solver id specified.") + end end # Clean up diff --git a/ext/HYPREPartitionedArrays.jl b/ext/HYPREPartitionedArrays.jl new file mode 100644 index 0000000..6cdefd5 --- /dev/null +++ b/ext/HYPREPartitionedArrays.jl @@ -0,0 +1,300 @@ +module HYPREPartitionedArrays + +using HYPRE.LibHYPRE: @check, HYPRE_BigInt, HYPRE_Complex, HYPRE_IJMatrixSetValues, + HYPRE_IJVectorGetValues, HYPRE_IJVectorInitialize, HYPRE_IJVectorSetValues, HYPRE_Int +using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector, Internals +using MPI: MPI +using PartitionedArrays: PartitionedArrays, AbstractLocalIndices, MPIArray, PSparseMatrix, + PVector, SplitMatrix, ghost_to_global, local_values, own_to_global, own_values, + partition +using SparseArrays: SparseArrays, SparseMatrixCSC, nonzeros, nzrange, rowvals +using SparseMatricesCSR: SparseMatrixCSR, colvals + +################################################## +# PartitionedArrays.PSparseMatrix -> HYPREMatrix # +################################################## + +function Internals.to_hypre_data( + A::SplitMatrix{<:SparseMatrixCSC}, r::AbstractLocalIndices, c::AbstractLocalIndices + ) + # Own/ghost to global index mappings + own_to_global_row = own_to_global(r) + own_to_global_col = own_to_global(c) + ghost_to_global_col = ghost_to_global(c) + + # HYPRE requires contiguous row indices + ilower = own_to_global_row[1] + iupper = own_to_global_row[end] + @assert iupper - ilower + 1 == length(own_to_global_row) + + # Extract sparse matrices from the SplitMatrix. We are only interested in the owned + # rows, so only consider own-own and own-ghost blocks. + Aoo = A.blocks.own_own::SparseMatrixCSC + Aoo_rows = rowvals(Aoo) + Aoo_vals = nonzeros(Aoo) + Aog = A.blocks.own_ghost::SparseMatrixCSC + Aog_rows = rowvals(Aog) + Aog_vals = nonzeros(Aog) + @assert size(Aoo, 1) == size(Aog, 1) == length(own_to_global_row) + + # Initialize the data buffers HYPRE wants + nrows = HYPRE_Int(length(own_to_global_row)) # Total number of rows + ncols = zeros(HYPRE_Int, nrows) # Number of colums for each row + rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices + # cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices + # values = Vector{HYPRE_Complex}(undef, nnz) # The values + + # First pass to count nnz per row (note that global column indices and column + # permutation doesn't matter for this pass) + @inbounds for own_col in 1:size(Aoo, 2) + for k in nzrange(Aoo, own_col) + own_row = Aoo_rows[k] + ncols[own_row] += 1 + end + end + @inbounds for ghost_col in 1:size(Aog, 2) + for k in nzrange(Aog, ghost_col) + own_row = Aog_rows[k] + ncols[own_row] += 1 + end + end + + # Initialize remaining buffers now that nnz is known + nnz = sum(ncols) + cols = Vector{HYPRE_BigInt}(undef, nnz) + values = Vector{HYPRE_Complex}(undef, nnz) + + # Keep track of the last index used for every row + lastinds = zeros(Int, nrows) + cumsum!((@view lastinds[2:end]), (@view ncols[1:(end - 1)])) + + # Second pass to populate the output. Here we need to map column + # indices from own/ghost to global + @inbounds for own_col in 1:size(Aoo, 2) + for k in nzrange(Aoo, own_col) + own_row = Aoo_rows[k] + i = lastinds[own_row] += 1 + values[i] = Aoo_vals[k] + cols[i] = own_to_global_col[own_col] + end + end + @inbounds for ghost_col in 1:size(Aog, 2) + for k in nzrange(Aog, ghost_col) + own_row = Aog_rows[k] + i = lastinds[own_row] += 1 + values[i] = Aog_vals[k] + cols[i] = ghost_to_global_col[ghost_col] + end + end + + # Sanity checks and return + @assert nrows == length(ncols) == length(rows) + return nrows, ncols, rows, cols, values +end + +function Internals.to_hypre_data( + A::SplitMatrix{<:SparseMatrixCSR}, r::AbstractLocalIndices, c::AbstractLocalIndices + ) + # Own/ghost to global index mappings + own_to_global_row = own_to_global(r) + own_to_global_col = own_to_global(c) + ghost_to_global_col = ghost_to_global(c) + + # HYPRE requires contiguous row indices + ilower = own_to_global_row[1] + iupper = own_to_global_row[end] + @assert iupper - ilower + 1 == length(own_to_global_row) + + # Extract sparse matrices from the SplitMatrix. We are only interested in the owned + # rows, so only consider own-own and own-ghost blocks. + Aoo = A.blocks.own_own::SparseMatrixCSR + Aoo_cols = colvals(Aoo) + Aoo_vals = nonzeros(Aoo) + Aog = A.blocks.own_ghost::SparseMatrixCSR + Aog_cols = colvals(Aog) + Aog_vals = nonzeros(Aog) + @assert size(Aoo, 1) == size(Aog, 1) == length(own_to_global_row) + + # Initialize the data buffers HYPRE wants + nnz = SparseArrays.nnz(Aoo) + SparseArrays.nnz(Aog) + nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows + ncols = zeros(HYPRE_Int, nrows) # Number of columns for each row + rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices + cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices + values = Vector{HYPRE_Complex}(undef, nnz) # The values + + # For CSR we only need a single pass to over the owned rows to collect everything + i = 0 + for own_row in 1:size(Aoo, 1) + nzro = nzrange(Aoo, own_row) + nzrg = nzrange(Aog, own_row) + ncols[own_row] = length(nzro) + length(nzrg) + for k in nzro + i += 1 + own_col = Aoo_cols[k] + cols[i] = own_to_global_col[own_col] + values[i] = Aoo_vals[k] + end + for k in nzrg + i += 1 + ghost_col = Aog_cols[k] + cols[i] = ghost_to_global_col[ghost_col] + values[i] = Aog_vals[k] + end + end + + # Sanity checks and return + @assert nnz == i + @assert nrows == length(ncols) == length(rows) + return nrows, ncols, rows, cols, values +end + +function Internals.get_comm(A::Union{PSparseMatrix{<:Any, <:M}, PVector{<:Any, <:M}}) where {M <: MPIArray} + return partition(A).comm +end + +Internals.get_comm(_::Union{PSparseMatrix, PVector}) = MPI.COMM_SELF + +function Internals.get_proc_rows(A::Union{PSparseMatrix, PVector}) + ilower::HYPRE_BigInt = typemax(HYPRE_BigInt) + iupper::HYPRE_BigInt = typemin(HYPRE_BigInt) + map(partition(axes(A, 1))) do a + # This is a map over the local process' owned indices. For MPI it will + # be a single value but for DebugArray / Array it will have multiple + # values. + o_to_g = own_to_global(a) + ilower_part = o_to_g[1] + iupper_part = o_to_g[end] + ilower = min(ilower, convert(HYPRE_BigInt, ilower_part)) + iupper = max(iupper, convert(HYPRE_BigInt, iupper_part)) + end + return ilower, iupper +end + +function HYPRE.HYPREMatrix(B::PSparseMatrix) + # Use the same communicator as the matrix + comm = Internals.get_comm(B) + # Fetch rows owned by this process + ilower, iupper = Internals.get_proc_rows(B) + # Create the IJ matrix + A = HYPREMatrix(comm, ilower, iupper) + # Set all the values + map(local_values(B), partition(axes(B, 1)), partition(axes(B, 2))) do Bv, Br, Bc + nrows, ncols, rows, cols, values = Internals.to_hypre_data(Bv, Br, Bc) + @check HYPRE_IJMatrixSetValues(A, nrows, ncols, rows, cols, values) + return nothing + end + # Finalize + Internals.assemble_matrix(A) + return A +end + +############################################ +# PartitionedArrays.PVector -> HYPREVector # +############################################ + +function HYPRE.HYPREVector(v::PVector) + # Use the same communicator as the matrix + comm = Internals.get_comm(v) + # Fetch rows owned by this process + ilower, iupper = Internals.get_proc_rows(v) + # Create the IJ vector + b = HYPREVector(comm, ilower, iupper) + # Set all the values + map(own_values(v), partition(axes(v, 1))) do vo, vr + o_to_g = own_to_global(vr) + + ilower_part = o_to_g[1] + iupper_part = o_to_g[end] + + # Option 1: Set all values + nvalues = HYPRE_Int(iupper_part - ilower_part + 1) + indices = collect(HYPRE_BigInt, ilower_part:iupper_part) + # TODO: Could probably just pass the full vector even if it is too long + # values = convert(Vector{HYPRE_Complex}, vv) + values = collect(HYPRE_Complex, vo) + + # # Option 2: Set only non-zeros + # indices = HYPRE_BigInt[] + # values = HYPRE_Complex[] + # for (i, vi) in zip(ilower_part:iupper_part, vo) + # if !iszero(vi) + # push!(indices, i) + # push!(values, vi) + # end + # end + # nvalues = length(indices) + + @check HYPRE_IJVectorSetValues(b, nvalues, indices, values) + return nothing + end + # Finalize + Internals.assemble_vector(b) + return b +end + +function copy_check(dst::HYPREVector, src::PVector) + il_dst, iu_dst = Internals.get_proc_rows(dst) + il_src, iu_src = Internals.get_proc_rows(src) + if il_dst != il_src && iu_dst != iu_src + # TODO: Why require this? + msg = "row owner mismatch between dst ($(il_dst:iu_dst)) and src ($(il_src:iu_src))" + throw(ArgumentError(msg)) + end + return +end + +# TODO: Other eltypes could be support by using a intermediate buffer +function Base.copy!(dst::PVector{<:AbstractVector{HYPRE_Complex}}, src::HYPREVector) + copy_check(src, dst) + map(own_values(dst), partition(axes(dst, 1))) do ov, vr + o_to_g = own_to_global(vr) + il_src_part = o_to_g[1] + iu_src_part = o_to_g[end] + nvalues = HYPRE_Int(iu_src_part - il_src_part + 1) + indices = collect(HYPRE_BigInt, il_src_part:iu_src_part) + values = ov + @check HYPRE_IJVectorGetValues(src, nvalues, indices, values) + end + return dst +end + +function Base.copy!(dst::HYPREVector, src::PVector{<:AbstractVector{HYPRE_Complex}}) + copy_check(dst, src) + # Re-initialize the vector + @check HYPRE_IJVectorInitialize(dst) + map(own_values(src), partition(axes(src, 1))) do ov, vr + o_to_g = own_to_global(vr) + ilower_src_part = o_to_g[1] + iupper_src_part = o_to_g[end] + nvalues = HYPRE_Int(iupper_src_part - ilower_src_part + 1) + indices = collect(HYPRE_BigInt, ilower_src_part:iupper_src_part) + values = ov + @check HYPRE_IJVectorSetValues(dst, nvalues, indices, values) + end + # TODO: It shouldn't be necessary to assemble here since we only set owned rows (?) + # @check HYPRE_IJVectorAssemble(dst) + # TODO: Necessary to recreate the ParVector? Running some examples it seems like it is + # not needed. + return dst +end + +###################################### +# PartitionedArrays solver interface # +###################################### + +# TODO: Would it be useful with a method that copied the solution to b instead? + +function HYPRE.solve(solver::HYPRESolver, A::PSparseMatrix, b::PVector) + hypre_x = HYPRE.solve(solver, HYPREMatrix(A), HYPREVector(b)) + x = copy!(similar(b, HYPRE_Complex), hypre_x) + return x +end +function HYPRE.solve!(solver::HYPRESolver, x::PVector, A::PSparseMatrix, b::PVector) + hypre_x = HYPREVector(x) + HYPRE.solve!(solver, hypre_x, HYPREMatrix(A), HYPREVector(b)) + copy!(x, hypre_x) + return x +end + +end # module HYPREPartitionedArrays diff --git a/ext/HYPRESparseArrays.jl b/ext/HYPRESparseArrays.jl new file mode 100644 index 0000000..81f2a9a --- /dev/null +++ b/ext/HYPRESparseArrays.jl @@ -0,0 +1,86 @@ +module HYPRESparseArrays + +using HYPRE.LibHYPRE: @check, HYPRE_BigInt, HYPRE_Complex, HYPRE_Int +using HYPRE: + HYPRE, HYPREMatrix, HYPRESolver, HYPREVector, HYPRE_IJMatrixSetValues, Internals +using MPI: MPI +using SparseArrays: SparseArrays, SparseMatrixCSC, nonzeros, nzrange, rowvals + +################################## +# SparseMatrixCSC -> HYPREMatrix # +################################## + +function Internals.to_hypre_data(A::SparseMatrixCSC, ilower, iupper) + Internals.check_n_rows(A, ilower, iupper) + nnz = SparseArrays.nnz(A) + A_rows = rowvals(A) + A_vals = nonzeros(A) + + # Initialize the data buffers HYPRE wants + nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows + ncols = zeros(HYPRE_Int, nrows) # Number of colums for each row + rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices + cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices + values = Vector{HYPRE_Complex}(undef, nnz) # The values + + # First pass to count nnz per row + @inbounds for j in 1:size(A, 2) + for i in nzrange(A, j) + row = A_rows[i] + ncols[row] += 1 + end + end + + # Keep track of the last index used for every row + lastinds = zeros(Int, nrows) + cumsum!((@view lastinds[2:end]), (@view ncols[1:(end - 1)])) + + # Second pass to populate the output + @inbounds for j in 1:size(A, 2) + for i in nzrange(A, j) + row = A_rows[i] + k = lastinds[row] += 1 + val = A_vals[i] + cols[k] = j + values[k] = val + end + end + @assert nrows == length(ncols) == length(rows) + return nrows, ncols, rows, cols, values +end + +# Note: keep in sync with the SparseMatrixCSR method +function HYPRE.HYPREMatrix(comm::MPI.Comm, B::SparseMatrixCSC, ilower, iupper) + A = HYPREMatrix(comm, ilower, iupper) + nrows, ncols, rows, cols, values = Internals.to_hypre_data(B, ilower, iupper) + @check HYPRE_IJMatrixSetValues(A, nrows, ncols, rows, cols, values) + Internals.assemble_matrix(A) + return A +end + +# Note: keep in sync with the SparseMatrixCSC method +function HYPRE.HYPREMatrix(B::SparseMatrixCSC, ilower = 1, iupper = size(B, 1)) + return HYPREMatrix(MPI.COMM_SELF, B, ilower, iupper) +end + + +#################################### +# SparseMatrixCSC solver interface # +#################################### + +# Note: keep in sync with the SparseMatrixCSR method +function HYPRE.solve(solver::HYPRESolver, A::SparseMatrixCSC, b::Vector) + hypre_x = HYPRE.solve(solver, HYPREMatrix(A), HYPREVector(b)) + x = copy!(similar(b, HYPRE_Complex), hypre_x) + return x +end + +# Note: keep in sync with the SparseMatrixCSR method +function HYPRE.solve!(solver::HYPRESolver, x::Vector, A::SparseMatrixCSC, b::Vector) + hypre_x = HYPREVector(x) + HYPRE.solve!(solver, hypre_x, HYPREMatrix(A), HYPREVector(b)) + copy!(x, hypre_x) + return x +end + +end # module HYPRESparseMatricesCSR diff --git a/ext/HYPRESparseMatricesCSR.jl b/ext/HYPRESparseMatricesCSR.jl new file mode 100644 index 0000000..26eb835 --- /dev/null +++ b/ext/HYPRESparseMatricesCSR.jl @@ -0,0 +1,80 @@ +module HYPRESparseMatricesCSR + +using HYPRE.LibHYPRE: @check, HYPRE_BigInt, HYPRE_Complex, HYPRE_Int +using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector, HYPRE_IJMatrixSetValues, Internals +using MPI: MPI +using SparseArrays: SparseArrays, nonzeros, nzrange +using SparseMatricesCSR: SparseMatrixCSR, colvals + + +################################## +# SparseMatrixCSR -> HYPREMatrix # +################################## + +function Internals.to_hypre_data(A::SparseMatrixCSR, ilower, iupper) + Internals.check_n_rows(A, ilower, iupper) + nnz = SparseArrays.nnz(A) + A_cols = colvals(A) + A_vals = nonzeros(A) + + # Initialize the data buffers HYPRE wants + nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows + ncols = Vector{HYPRE_Int}(undef, nrows) # Number of colums for each row + rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices + cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices + values = Vector{HYPRE_Complex}(undef, nnz) # The values + + # Loop over the rows and collect all values + k = 0 + @inbounds for i in 1:size(A, 1) + nzr = nzrange(A, i) + ncols[i] = length(nzr) + for j in nzr + k += 1 + col = A_cols[j] + val = A_vals[j] + cols[k] = col + values[k] = val + end + end + @assert nnz == k + @assert nrows == length(ncols) == length(rows) + return nrows, ncols, rows, cols, values +end + + +# Note: keep in sync with the SparseMatrixCSC method +function HYPRE.HYPREMatrix(comm::MPI.Comm, B::SparseMatrixCSR, ilower, iupper) + A = HYPREMatrix(comm, ilower, iupper) + nrows, ncols, rows, cols, values = Internals.to_hypre_data(B, ilower, iupper) + @check HYPRE_IJMatrixSetValues(A, nrows, ncols, rows, cols, values) + Internals.assemble_matrix(A) + return A +end + +# Note: keep in sync with the SparseMatrixCSC method +function HYPRE.HYPREMatrix(B::SparseMatrixCSR, ilower = 1, iupper = size(B, 1)) + return HYPREMatrix(MPI.COMM_SELF, B, ilower, iupper) +end + + +#################################### +# SparseMatrixCSR solver interface # +#################################### + +# Note: keep in sync with the SparseMatrixCSC method +function HYPRE.solve(solver::HYPRESolver, A::SparseMatrixCSR, b::Vector) + hypre_x = HYPRE.solve(solver, HYPREMatrix(A), HYPREVector(b)) + x = copy!(similar(b, HYPRE_Complex), hypre_x) + return x +end + +# Note: keep in sync with the SparseMatrixCSC method +function HYPRE.solve!(solver::HYPRESolver, x::Vector, A::SparseMatrixCSR, b::Vector) + hypre_x = HYPREVector(x) + HYPRE.solve!(solver, hypre_x, HYPREMatrix(A), HYPREVector(b)) + copy!(x, hypre_x) + return x +end + +end # module HYPRESparseMatricesCSR diff --git a/gen/Makefile b/gen/Makefile index 04591d2..b5158a9 100644 --- a/gen/Makefile +++ b/gen/Makefile @@ -1,2 +1,14 @@ -default: - julia --project generator.jl +MAKEDIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +LIBHYPRE:=$(shell dirname $(MAKEDIR))/lib/LibHYPRE.jl + +generate: $(LIBHYPRE) + +clean: + rm -f $(LIBHYPRE) + +.PHONY: generate clean + +$(LIBHYPRE): Project.toml Manifest.toml $(MAKEDIR)/generator.toml $(MAKEDIR)/generator.jl + julia --project generator.jl && \ + sed -i -e '1s/^/local libHYPRE # Silence of the Langs(erver)\n\n/' -e 's/using HYPRE_jll/using HYPRE_jll: HYPRE_jll, libHYPRE/' -e 's/using CEnum/using CEnum: @cenum/' $(LIBHYPRE) && \ + julia-1.11 --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- -i $(LIBHYPRE) diff --git a/gen/Manifest.toml b/gen/Manifest.toml index cc66f94..9762bdc 100644 --- a/gen/Manifest.toml +++ b/gen/Manifest.toml @@ -1,44 +1,47 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.2" +julia_version = "1.11.2" manifest_format = "2.0" project_hash = "cc39013dba1e9068883c1b156d3b25864ebc62f8" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" +version = "1.1.2" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" [[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" +version = "0.5.0" [[deps.Clang]] deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"] -git-tree-sha1 = "b7e356adf44b1d4eb7aa2b0961ec130730fa208f" +git-tree-sha1 = "2397d5da17ba4970f772a9888b208a0a1d77eb5d" uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31" -version = "0.16.3" +version = "0.18.3" [[deps.Clang_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"] -git-tree-sha1 = "0dfffba1b32bb3e30cb0372bfe666a5ddffe37fb" +deps = ["Artifacts", "JLLWrappers", "Libdl", "TOML", "Zlib_jll", "libLLVM_jll"] +git-tree-sha1 = "0dc9bd89383fd6fffed127e03fc42ed409cc865b" uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100" -version = "13.0.1+3" +version = "16.0.6+4" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "0.5.2+0" +version = "1.1.1+0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -47,6 +50,7 @@ version = "1.6.0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" [[deps.HYPRE_jll]] deps = ["Artifacts", "JLLWrappers", "LAPACK_jll", "LazyArtifacts", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenBLAS_jll", "OpenMPI_jll", "Pkg", "TOML"] @@ -54,87 +58,99 @@ git-tree-sha1 = "b77d3eca75f8442e034ccf415c87405a49e77985" uuid = "0a602bbd-b08b-5d75-8d32-0de6eef44785" version = "2.23.1+1" -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "50aedf345a709ab75872f80a2779568dc0bb461b" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.11.2+3" [[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" +version = "1.7.0" [[deps.LAPACK_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg", "libblastrampoline_jll"] -git-tree-sha1 = "a539affa8228208f5a3396037165b04bff9a2ba6" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "libblastrampoline_jll"] +git-tree-sha1 = "47a6ccfc4b78494669cd7c502ba112ee2b24eb45" uuid = "51474c39-65e3-53ba-86ba-03b1b862ec14" -version = "3.10.0+1" +version = "3.12.0+3" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.6.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.7.2+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" [[deps.MPICH_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "6d4fa43afab4611d090b11617ecea1a144b21d35" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "7715e65c47ba3941c502bffb7f266a41a7f54423" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.0.2+5" +version = "4.2.3+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] -git-tree-sha1 = "9959c42b41220206eeda9004f695d913e2245658" +git-tree-sha1 = "c105fe467859e7f6e9a852cb15cb4301126fac07" uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" -version = "0.1.5" +version = "0.1.11" [[deps.MPItrampoline_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "b3f9e42685b4ad614eca0b44bd863cd41b1c86ea" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "70e830dab5d0775183c99fc75e4c24c614ed7142" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.0.2+1" +version = "5.5.1+2" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.6+0" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "a16aa086d335ed7e0170c5265247db29172af2f9" +git-tree-sha1 = "bc95bf4149bf535c09602e3acdf950d9b4376227" uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" -version = "10.1.3+2" +version = "10.1.4+3" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.12.12" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -143,85 +159,85 @@ version = "1.2.0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.27+1" [[deps.OpenMPI_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"] -git-tree-sha1 = "346d6b357a480300ed7854dbc70e746ac52e10fd" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] +git-tree-sha1 = "2dace87e14256edb1dd0724ab7ba831c779b96bd" uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" -version = "4.1.3+3" +version = "5.0.6+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.11.0" + + [deps.Pkg.extensions] + REPLExt = "REPL" + + [deps.Pkg.weakdeps] + REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.3.0" +version = "1.4.3" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.1" +version = "1.10.0" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.libLLVM_jll]] deps = ["Artifacts", "Libdl"] uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "13.0.1+3" +version = "16.0.6+4" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.11.0+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.59.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" diff --git a/gen/generator.jl b/gen/generator.jl index 09d4f59..5fcdec1 100644 --- a/gen/generator.jl +++ b/gen/generator.jl @@ -21,12 +21,15 @@ push!(args, "-DHYPRE_ENABLE_CUDA_STREAMS=OFF") push!(args, "-DHYPRE_ENABLE_CUSPARSE=OFF") push!(args, "-DHYPRE_ENABLE_CURAND=OFF") -headers = joinpath.(hypre_include_dir, [ - "HYPRE.h", - "HYPRE_IJ_mv.h", - "HYPRE_parcsr_mv.h", - "HYPRE_parcsr_ls.h", -]) +headers = joinpath.( + hypre_include_dir, + [ + "HYPRE.h", + "HYPRE_IJ_mv.h", + "HYPRE_parcsr_mv.h", + "HYPRE_parcsr_ls.h", + ] +) ctx = create_context(headers, args, options) diff --git a/gen/generator.toml b/gen/generator.toml index 195d0da..d970b6b 100644 --- a/gen/generator.toml +++ b/gen/generator.toml @@ -13,5 +13,10 @@ output_ignorelist = [ # Bogus expression: const HYPRE_VERSION = ((("HYPRE_RELEASE_NAME Date Compiled: ")(__DATE__))(" "))(__TIME__) "HYPRE_VERSION", # Filter out MPI stuff - "^[PQ]?MPI" + "^[PQ]?MPI", + # Included in prologue.jl + "MPI_Comm", ] + +[codegen] +use_ccall_macro = true diff --git a/gen/prologue.jl b/gen/prologue.jl index 423837c..ca0d607 100644 --- a/gen/prologue.jl +++ b/gen/prologue.jl @@ -1,6 +1,17 @@ +########################### +## Start gen/prologue.jl ## +########################### + using MPI: MPI, MPI_Comm -if isdefined(MPI, :API) # MPI >= 0.20.0 + +if isdefined(MPI, :API) + # MPI >= 0.20.0 using MPI.API: MPI_INT, MPI_DOUBLE -else # MPI < 0.20.0 +else + # MPI < 0.20.0 using MPI: MPI_INT, MPI_DOUBLE end + +######################### +## End gen/prologue.jl ## +######################### diff --git a/gen/solver_options.jl b/gen/solver_options.jl index aefd3ed..ff370d1 100644 --- a/gen/solver_options.jl +++ b/gen/solver_options.jl @@ -2,11 +2,10 @@ using HYPRE.LibHYPRE function generate_options(io, structname, prefixes...) println(io, "") - println(io, "function Internals.set_options(s::$(structname), kwargs)") - println(io, " solver = s.solver") + println(io, "function Internals.set_options(solver::$(structname), kwargs)") println(io, " for (k, v) in kwargs") - ns = Tuple{Symbol,String}[] + ns = Tuple{Symbol, String}[] for prefix in prefixes, n in names(LibHYPRE) r = Regex("^" * prefix * "([A-Z].*)\$") if (m = match(r, string(n)); m !== nothing) @@ -29,7 +28,7 @@ function generate_options(io, structname, prefixes...) println(io) if k == "Precond" println(io, " Internals.set_precond_defaults(v)") - println(io, " Internals.set_precond(s, v)") + println(io, " Internals.set_precond(solver, v)") elseif nargs == 1 println(io, " @check ", n, "(solver)") elseif nargs == 2 @@ -44,6 +43,7 @@ function generate_options(io, structname, prefixes...) println(io, " end") println(io, " end") println(io, "end") + return end open(joinpath(@__DIR__, "..", "src", "solver_options.jl"), "w") do io diff --git a/lib/LibHYPRE.jl b/lib/LibHYPRE.jl index 9fe4ee8..53a2eb6 100644 --- a/lib/LibHYPRE.jl +++ b/lib/LibHYPRE.jl @@ -1,15 +1,28 @@ -using HYPRE_jll +local libHYPRE # Silence of the Langs(erver) + +using HYPRE_jll: HYPRE_jll, libHYPRE export HYPRE_jll -using CEnum +using CEnum: @cenum + +########################### +## Start gen/prologue.jl ## +########################### using MPI: MPI, MPI_Comm -if isdefined(MPI, :API) # MPI >= 0.20.0 + +if isdefined(MPI, :API) + # MPI >= 0.20.0 using MPI.API: MPI_INT, MPI_DOUBLE -else # MPI < 0.20.0 +else + # MPI < 0.20.0 using MPI: MPI_INT, MPI_DOUBLE end +######################### +## End gen/prologue.jl ## +######################### + const HYPRE_BigInt = Cint @@ -21,57 +34,57 @@ const HYPRE_Complex = HYPRE_Real # no prototype is found for this function at HYPRE_utilities.h:116:11, please use with caution function HYPRE_Init() - ccall((:HYPRE_Init, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_Init()::HYPRE_Int end # no prototype is found for this function at HYPRE_utilities.h:117:11, please use with caution function HYPRE_Finalize() - ccall((:HYPRE_Finalize, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_Finalize()::HYPRE_Int end # no prototype is found for this function at HYPRE_utilities.h:124:11, please use with caution function HYPRE_GetError() - ccall((:HYPRE_GetError, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_GetError()::HYPRE_Int end function HYPRE_CheckError(hypre_ierr, hypre_error_code) - ccall((:HYPRE_CheckError, libHYPRE), HYPRE_Int, (HYPRE_Int, HYPRE_Int), hypre_ierr, hypre_error_code) + return @ccall libHYPRE.HYPRE_CheckError(hypre_ierr::HYPRE_Int, hypre_error_code::HYPRE_Int)::HYPRE_Int end # no prototype is found for this function at HYPRE_utilities.h:131:11, please use with caution function HYPRE_GetErrorArg() - ccall((:HYPRE_GetErrorArg, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_GetErrorArg()::HYPRE_Int end function HYPRE_DescribeError(hypre_ierr, descr) - ccall((:HYPRE_DescribeError, libHYPRE), Cvoid, (HYPRE_Int, Ptr{Cchar}), hypre_ierr, descr) + return @ccall libHYPRE.HYPRE_DescribeError(hypre_ierr::HYPRE_Int, descr::Ptr{Cchar})::Cvoid end # no prototype is found for this function at HYPRE_utilities.h:137:11, please use with caution function HYPRE_ClearAllErrors() - ccall((:HYPRE_ClearAllErrors, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_ClearAllErrors()::HYPRE_Int end function HYPRE_ClearError(hypre_error_code) - ccall((:HYPRE_ClearError, libHYPRE), HYPRE_Int, (HYPRE_Int,), hypre_error_code) + return @ccall libHYPRE.HYPRE_ClearError(hypre_error_code::HYPRE_Int)::HYPRE_Int end # no prototype is found for this function at HYPRE_utilities.h:143:11, please use with caution function HYPRE_PrintDeviceInfo() - ccall((:HYPRE_PrintDeviceInfo, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_PrintDeviceInfo()::HYPRE_Int end function HYPRE_Version(version_ptr) - ccall((:HYPRE_Version, libHYPRE), HYPRE_Int, (Ptr{Ptr{Cchar}},), version_ptr) + return @ccall libHYPRE.HYPRE_Version(version_ptr::Ptr{Ptr{Cchar}})::HYPRE_Int end function HYPRE_VersionNumber(major_ptr, minor_ptr, patch_ptr, single_ptr) - ccall((:HYPRE_VersionNumber, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Int}, Ptr{HYPRE_Int}, Ptr{HYPRE_Int}, Ptr{HYPRE_Int}), major_ptr, minor_ptr, patch_ptr, single_ptr) + return @ccall libHYPRE.HYPRE_VersionNumber(major_ptr::Ptr{HYPRE_Int}, minor_ptr::Ptr{HYPRE_Int}, patch_ptr::Ptr{HYPRE_Int}, single_ptr::Ptr{HYPRE_Int})::HYPRE_Int end # no prototype is found for this function at HYPRE_utilities.h:174:11, please use with caution function HYPRE_AssumedPartitionCheck() - ccall((:HYPRE_AssumedPartitionCheck, libHYPRE), HYPRE_Int, ()) + return @ccall libHYPRE.HYPRE_AssumedPartitionCheck()::HYPRE_Int end @cenum _HYPRE_MemoryLocation::Int32 begin @@ -83,11 +96,11 @@ end const HYPRE_MemoryLocation = _HYPRE_MemoryLocation function HYPRE_SetMemoryLocation(memory_location) - ccall((:HYPRE_SetMemoryLocation, libHYPRE), HYPRE_Int, (HYPRE_MemoryLocation,), memory_location) + return @ccall libHYPRE.HYPRE_SetMemoryLocation(memory_location::HYPRE_MemoryLocation)::HYPRE_Int end function HYPRE_GetMemoryLocation(memory_location) - ccall((:HYPRE_GetMemoryLocation, libHYPRE), HYPRE_Int, (Ptr{HYPRE_MemoryLocation},), memory_location) + return @ccall libHYPRE.HYPRE_GetMemoryLocation(memory_location::Ptr{HYPRE_MemoryLocation})::HYPRE_Int end @cenum _HYPRE_ExecutionPolicy::Int32 begin @@ -99,63 +112,63 @@ end const HYPRE_ExecutionPolicy = _HYPRE_ExecutionPolicy function HYPRE_SetExecutionPolicy(exec_policy) - ccall((:HYPRE_SetExecutionPolicy, libHYPRE), HYPRE_Int, (HYPRE_ExecutionPolicy,), exec_policy) + return @ccall libHYPRE.HYPRE_SetExecutionPolicy(exec_policy::HYPRE_ExecutionPolicy)::HYPRE_Int end function HYPRE_GetExecutionPolicy(exec_policy) - ccall((:HYPRE_GetExecutionPolicy, libHYPRE), HYPRE_Int, (Ptr{HYPRE_ExecutionPolicy},), exec_policy) + return @ccall libHYPRE.HYPRE_GetExecutionPolicy(exec_policy::Ptr{HYPRE_ExecutionPolicy})::HYPRE_Int end function HYPRE_SetStructExecutionPolicy(exec_policy) - ccall((:HYPRE_SetStructExecutionPolicy, libHYPRE), HYPRE_Int, (HYPRE_ExecutionPolicy,), exec_policy) + return @ccall libHYPRE.HYPRE_SetStructExecutionPolicy(exec_policy::HYPRE_ExecutionPolicy)::HYPRE_Int end function HYPRE_GetStructExecutionPolicy(exec_policy) - ccall((:HYPRE_GetStructExecutionPolicy, libHYPRE), HYPRE_Int, (Ptr{HYPRE_ExecutionPolicy},), exec_policy) + return @ccall libHYPRE.HYPRE_GetStructExecutionPolicy(exec_policy::Ptr{HYPRE_ExecutionPolicy})::HYPRE_Int end function HYPRE_SetUmpireDevicePoolSize(nbytes) - ccall((:HYPRE_SetUmpireDevicePoolSize, libHYPRE), HYPRE_Int, (Csize_t,), nbytes) + return @ccall libHYPRE.HYPRE_SetUmpireDevicePoolSize(nbytes::Csize_t)::HYPRE_Int end function HYPRE_SetUmpireUMPoolSize(nbytes) - ccall((:HYPRE_SetUmpireUMPoolSize, libHYPRE), HYPRE_Int, (Csize_t,), nbytes) + return @ccall libHYPRE.HYPRE_SetUmpireUMPoolSize(nbytes::Csize_t)::HYPRE_Int end function HYPRE_SetUmpireHostPoolSize(nbytes) - ccall((:HYPRE_SetUmpireHostPoolSize, libHYPRE), HYPRE_Int, (Csize_t,), nbytes) + return @ccall libHYPRE.HYPRE_SetUmpireHostPoolSize(nbytes::Csize_t)::HYPRE_Int end function HYPRE_SetUmpirePinnedPoolSize(nbytes) - ccall((:HYPRE_SetUmpirePinnedPoolSize, libHYPRE), HYPRE_Int, (Csize_t,), nbytes) + return @ccall libHYPRE.HYPRE_SetUmpirePinnedPoolSize(nbytes::Csize_t)::HYPRE_Int end function HYPRE_SetUmpireDevicePoolName(pool_name) - ccall((:HYPRE_SetUmpireDevicePoolName, libHYPRE), HYPRE_Int, (Ptr{Cchar},), pool_name) + return @ccall libHYPRE.HYPRE_SetUmpireDevicePoolName(pool_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_SetUmpireUMPoolName(pool_name) - ccall((:HYPRE_SetUmpireUMPoolName, libHYPRE), HYPRE_Int, (Ptr{Cchar},), pool_name) + return @ccall libHYPRE.HYPRE_SetUmpireUMPoolName(pool_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_SetUmpireHostPoolName(pool_name) - ccall((:HYPRE_SetUmpireHostPoolName, libHYPRE), HYPRE_Int, (Ptr{Cchar},), pool_name) + return @ccall libHYPRE.HYPRE_SetUmpireHostPoolName(pool_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_SetUmpirePinnedPoolName(pool_name) - ccall((:HYPRE_SetUmpirePinnedPoolName, libHYPRE), HYPRE_Int, (Ptr{Cchar},), pool_name) + return @ccall libHYPRE.HYPRE_SetUmpirePinnedPoolName(pool_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_SetGPUMemoryPoolSize(bin_growth, min_bin, max_bin, max_cached_bytes) - ccall((:HYPRE_SetGPUMemoryPoolSize, libHYPRE), HYPRE_Int, (HYPRE_Int, HYPRE_Int, HYPRE_Int, Csize_t), bin_growth, min_bin, max_bin, max_cached_bytes) + return @ccall libHYPRE.HYPRE_SetGPUMemoryPoolSize(bin_growth::HYPRE_Int, min_bin::HYPRE_Int, max_bin::HYPRE_Int, max_cached_bytes::Csize_t)::HYPRE_Int end function HYPRE_SetSpGemmUseCusparse(use_cusparse) - ccall((:HYPRE_SetSpGemmUseCusparse, libHYPRE), HYPRE_Int, (HYPRE_Int,), use_cusparse) + return @ccall libHYPRE.HYPRE_SetSpGemmUseCusparse(use_cusparse::HYPRE_Int)::HYPRE_Int end function HYPRE_SetUseGpuRand(use_curand) - ccall((:HYPRE_SetUseGpuRand, libHYPRE), HYPRE_Int, (HYPRE_Int,), use_curand) + return @ccall libHYPRE.HYPRE_SetUseGpuRand(use_curand::HYPRE_Int)::HYPRE_Int end mutable struct hypre_IJMatrix_struct end @@ -163,95 +176,95 @@ mutable struct hypre_IJMatrix_struct end const HYPRE_IJMatrix = Ptr{hypre_IJMatrix_struct} function HYPRE_IJMatrixCreate(comm, ilower, iupper, jlower, jupper, matrix) - ccall((:HYPRE_IJMatrixCreate, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, Ptr{HYPRE_IJMatrix}), comm, ilower, iupper, jlower, jupper, matrix) + return @ccall libHYPRE.HYPRE_IJMatrixCreate(comm::MPI_Comm, ilower::HYPRE_BigInt, iupper::HYPRE_BigInt, jlower::HYPRE_BigInt, jupper::HYPRE_BigInt, matrix::Ptr{HYPRE_IJMatrix})::HYPRE_Int end function HYPRE_IJMatrixDestroy(matrix) - ccall((:HYPRE_IJMatrixDestroy, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix,), matrix) + return @ccall libHYPRE.HYPRE_IJMatrixDestroy(matrix::HYPRE_IJMatrix)::HYPRE_Int end function HYPRE_IJMatrixInitialize(matrix) - ccall((:HYPRE_IJMatrixInitialize, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix,), matrix) + return @ccall libHYPRE.HYPRE_IJMatrixInitialize(matrix::HYPRE_IJMatrix)::HYPRE_Int end function HYPRE_IJMatrixInitialize_v2(matrix, memory_location) - ccall((:HYPRE_IJMatrixInitialize_v2, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_MemoryLocation), matrix, memory_location) + return @ccall libHYPRE.HYPRE_IJMatrixInitialize_v2(matrix::HYPRE_IJMatrix, memory_location::HYPRE_MemoryLocation)::HYPRE_Int end function HYPRE_IJMatrixSetValues(matrix, nrows, ncols, rows, cols, values) - ccall((:HYPRE_IJMatrixSetValues, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), matrix, nrows, ncols, rows, cols, values) + return @ccall libHYPRE.HYPRE_IJMatrixSetValues(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, ncols::Ptr{HYPRE_Int}, rows::Ptr{HYPRE_BigInt}, cols::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJMatrixSetConstantValues(matrix, value) - ccall((:HYPRE_IJMatrixSetConstantValues, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Complex), matrix, value) + return @ccall libHYPRE.HYPRE_IJMatrixSetConstantValues(matrix::HYPRE_IJMatrix, value::HYPRE_Complex)::HYPRE_Int end function HYPRE_IJMatrixAddToValues(matrix, nrows, ncols, rows, cols, values) - ccall((:HYPRE_IJMatrixAddToValues, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), matrix, nrows, ncols, rows, cols, values) + return @ccall libHYPRE.HYPRE_IJMatrixAddToValues(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, ncols::Ptr{HYPRE_Int}, rows::Ptr{HYPRE_BigInt}, cols::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJMatrixSetValues2(matrix, nrows, ncols, rows, row_indexes, cols, values) - ccall((:HYPRE_IJMatrixSetValues2, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), matrix, nrows, ncols, rows, row_indexes, cols, values) + return @ccall libHYPRE.HYPRE_IJMatrixSetValues2(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, ncols::Ptr{HYPRE_Int}, rows::Ptr{HYPRE_BigInt}, row_indexes::Ptr{HYPRE_Int}, cols::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJMatrixAddToValues2(matrix, nrows, ncols, rows, row_indexes, cols, values) - ccall((:HYPRE_IJMatrixAddToValues2, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), matrix, nrows, ncols, rows, row_indexes, cols, values) + return @ccall libHYPRE.HYPRE_IJMatrixAddToValues2(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, ncols::Ptr{HYPRE_Int}, rows::Ptr{HYPRE_BigInt}, row_indexes::Ptr{HYPRE_Int}, cols::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJMatrixAssemble(matrix) - ccall((:HYPRE_IJMatrixAssemble, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix,), matrix) + return @ccall libHYPRE.HYPRE_IJMatrixAssemble(matrix::HYPRE_IJMatrix)::HYPRE_Int end function HYPRE_IJMatrixGetRowCounts(matrix, nrows, rows, ncols) - ccall((:HYPRE_IJMatrixGetRowCounts, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Int}), matrix, nrows, rows, ncols) + return @ccall libHYPRE.HYPRE_IJMatrixGetRowCounts(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, rows::Ptr{HYPRE_BigInt}, ncols::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_IJMatrixGetValues(matrix, nrows, ncols, rows, cols, values) - ccall((:HYPRE_IJMatrixGetValues, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), matrix, nrows, ncols, rows, cols, values) + return @ccall libHYPRE.HYPRE_IJMatrixGetValues(matrix::HYPRE_IJMatrix, nrows::HYPRE_Int, ncols::Ptr{HYPRE_Int}, rows::Ptr{HYPRE_BigInt}, cols::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJMatrixSetObjectType(matrix, type) - ccall((:HYPRE_IJMatrixSetObjectType, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int), matrix, type) + return @ccall libHYPRE.HYPRE_IJMatrixSetObjectType(matrix::HYPRE_IJMatrix, type::HYPRE_Int)::HYPRE_Int end function HYPRE_IJMatrixGetObjectType(matrix, type) - ccall((:HYPRE_IJMatrixGetObjectType, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{HYPRE_Int}), matrix, type) + return @ccall libHYPRE.HYPRE_IJMatrixGetObjectType(matrix::HYPRE_IJMatrix, type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_IJMatrixGetLocalRange(matrix, ilower, iupper, jlower, jupper) - ccall((:HYPRE_IJMatrixGetLocalRange, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}), matrix, ilower, iupper, jlower, jupper) + return @ccall libHYPRE.HYPRE_IJMatrixGetLocalRange(matrix::HYPRE_IJMatrix, ilower::Ptr{HYPRE_BigInt}, iupper::Ptr{HYPRE_BigInt}, jlower::Ptr{HYPRE_BigInt}, jupper::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_IJMatrixGetObject(matrix, object) - ccall((:HYPRE_IJMatrixGetObject, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{Ptr{Cvoid}}), matrix, object) + return @ccall libHYPRE.HYPRE_IJMatrixGetObject(matrix::HYPRE_IJMatrix, object::Ptr{Ptr{Cvoid}})::HYPRE_Int end function HYPRE_IJMatrixSetRowSizes(matrix, sizes) - ccall((:HYPRE_IJMatrixSetRowSizes, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{HYPRE_Int}), matrix, sizes) + return @ccall libHYPRE.HYPRE_IJMatrixSetRowSizes(matrix::HYPRE_IJMatrix, sizes::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_IJMatrixSetDiagOffdSizes(matrix, diag_sizes, offdiag_sizes) - ccall((:HYPRE_IJMatrixSetDiagOffdSizes, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{HYPRE_Int}, Ptr{HYPRE_Int}), matrix, diag_sizes, offdiag_sizes) + return @ccall libHYPRE.HYPRE_IJMatrixSetDiagOffdSizes(matrix::HYPRE_IJMatrix, diag_sizes::Ptr{HYPRE_Int}, offdiag_sizes::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_IJMatrixSetMaxOffProcElmts(matrix, max_off_proc_elmts) - ccall((:HYPRE_IJMatrixSetMaxOffProcElmts, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int), matrix, max_off_proc_elmts) + return @ccall libHYPRE.HYPRE_IJMatrixSetMaxOffProcElmts(matrix::HYPRE_IJMatrix, max_off_proc_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_IJMatrixSetPrintLevel(matrix, print_level) - ccall((:HYPRE_IJMatrixSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int), matrix, print_level) + return @ccall libHYPRE.HYPRE_IJMatrixSetPrintLevel(matrix::HYPRE_IJMatrix, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_IJMatrixSetOMPFlag(matrix, omp_flag) - ccall((:HYPRE_IJMatrixSetOMPFlag, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, HYPRE_Int), matrix, omp_flag) + return @ccall libHYPRE.HYPRE_IJMatrixSetOMPFlag(matrix::HYPRE_IJMatrix, omp_flag::HYPRE_Int)::HYPRE_Int end function HYPRE_IJMatrixRead(filename, comm, type, matrix) - ccall((:HYPRE_IJMatrixRead, libHYPRE), HYPRE_Int, (Ptr{Cchar}, MPI_Comm, HYPRE_Int, Ptr{HYPRE_IJMatrix}), filename, comm, type, matrix) + return @ccall libHYPRE.HYPRE_IJMatrixRead(filename::Ptr{Cchar}, comm::MPI_Comm, type::HYPRE_Int, matrix::Ptr{HYPRE_IJMatrix})::HYPRE_Int end function HYPRE_IJMatrixPrint(matrix, filename) - ccall((:HYPRE_IJMatrixPrint, libHYPRE), HYPRE_Int, (HYPRE_IJMatrix, Ptr{Cchar}), matrix, filename) + return @ccall libHYPRE.HYPRE_IJMatrixPrint(matrix::HYPRE_IJMatrix, filename::Ptr{Cchar})::HYPRE_Int end mutable struct hypre_IJVector_struct end @@ -259,67 +272,67 @@ mutable struct hypre_IJVector_struct end const HYPRE_IJVector = Ptr{hypre_IJVector_struct} function HYPRE_IJVectorCreate(comm, jlower, jupper, vector) - ccall((:HYPRE_IJVectorCreate, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, Ptr{HYPRE_IJVector}), comm, jlower, jupper, vector) + return @ccall libHYPRE.HYPRE_IJVectorCreate(comm::MPI_Comm, jlower::HYPRE_BigInt, jupper::HYPRE_BigInt, vector::Ptr{HYPRE_IJVector})::HYPRE_Int end function HYPRE_IJVectorDestroy(vector) - ccall((:HYPRE_IJVectorDestroy, libHYPRE), HYPRE_Int, (HYPRE_IJVector,), vector) + return @ccall libHYPRE.HYPRE_IJVectorDestroy(vector::HYPRE_IJVector)::HYPRE_Int end function HYPRE_IJVectorInitialize(vector) - ccall((:HYPRE_IJVectorInitialize, libHYPRE), HYPRE_Int, (HYPRE_IJVector,), vector) + return @ccall libHYPRE.HYPRE_IJVectorInitialize(vector::HYPRE_IJVector)::HYPRE_Int end function HYPRE_IJVectorInitialize_v2(vector, memory_location) - ccall((:HYPRE_IJVectorInitialize_v2, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_MemoryLocation), vector, memory_location) + return @ccall libHYPRE.HYPRE_IJVectorInitialize_v2(vector::HYPRE_IJVector, memory_location::HYPRE_MemoryLocation)::HYPRE_Int end function HYPRE_IJVectorSetMaxOffProcElmts(vector, max_off_proc_elmts) - ccall((:HYPRE_IJVectorSetMaxOffProcElmts, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int), vector, max_off_proc_elmts) + return @ccall libHYPRE.HYPRE_IJVectorSetMaxOffProcElmts(vector::HYPRE_IJVector, max_off_proc_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_IJVectorSetValues(vector, nvalues, indices, values) - ccall((:HYPRE_IJVectorSetValues, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), vector, nvalues, indices, values) + return @ccall libHYPRE.HYPRE_IJVectorSetValues(vector::HYPRE_IJVector, nvalues::HYPRE_Int, indices::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJVectorAddToValues(vector, nvalues, indices, values) - ccall((:HYPRE_IJVectorAddToValues, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), vector, nvalues, indices, values) + return @ccall libHYPRE.HYPRE_IJVectorAddToValues(vector::HYPRE_IJVector, nvalues::HYPRE_Int, indices::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJVectorAssemble(vector) - ccall((:HYPRE_IJVectorAssemble, libHYPRE), HYPRE_Int, (HYPRE_IJVector,), vector) + return @ccall libHYPRE.HYPRE_IJVectorAssemble(vector::HYPRE_IJVector)::HYPRE_Int end function HYPRE_IJVectorGetValues(vector, nvalues, indices, values) - ccall((:HYPRE_IJVectorGetValues, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), vector, nvalues, indices, values) + return @ccall libHYPRE.HYPRE_IJVectorGetValues(vector::HYPRE_IJVector, nvalues::HYPRE_Int, indices::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end function HYPRE_IJVectorSetObjectType(vector, type) - ccall((:HYPRE_IJVectorSetObjectType, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int), vector, type) + return @ccall libHYPRE.HYPRE_IJVectorSetObjectType(vector::HYPRE_IJVector, type::HYPRE_Int)::HYPRE_Int end function HYPRE_IJVectorGetObjectType(vector, type) - ccall((:HYPRE_IJVectorGetObjectType, libHYPRE), HYPRE_Int, (HYPRE_IJVector, Ptr{HYPRE_Int}), vector, type) + return @ccall libHYPRE.HYPRE_IJVectorGetObjectType(vector::HYPRE_IJVector, type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_IJVectorGetLocalRange(vector, jlower, jupper) - ccall((:HYPRE_IJVectorGetLocalRange, libHYPRE), HYPRE_Int, (HYPRE_IJVector, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}), vector, jlower, jupper) + return @ccall libHYPRE.HYPRE_IJVectorGetLocalRange(vector::HYPRE_IJVector, jlower::Ptr{HYPRE_BigInt}, jupper::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_IJVectorGetObject(vector, object) - ccall((:HYPRE_IJVectorGetObject, libHYPRE), HYPRE_Int, (HYPRE_IJVector, Ptr{Ptr{Cvoid}}), vector, object) + return @ccall libHYPRE.HYPRE_IJVectorGetObject(vector::HYPRE_IJVector, object::Ptr{Ptr{Cvoid}})::HYPRE_Int end function HYPRE_IJVectorSetPrintLevel(vector, print_level) - ccall((:HYPRE_IJVectorSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_IJVector, HYPRE_Int), vector, print_level) + return @ccall libHYPRE.HYPRE_IJVectorSetPrintLevel(vector::HYPRE_IJVector, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_IJVectorRead(filename, comm, type, vector) - ccall((:HYPRE_IJVectorRead, libHYPRE), HYPRE_Int, (Ptr{Cchar}, MPI_Comm, HYPRE_Int, Ptr{HYPRE_IJVector}), filename, comm, type, vector) + return @ccall libHYPRE.HYPRE_IJVectorRead(filename::Ptr{Cchar}, comm::MPI_Comm, type::HYPRE_Int, vector::Ptr{HYPRE_IJVector})::HYPRE_Int end function HYPRE_IJVectorPrint(vector, filename) - ccall((:HYPRE_IJVectorPrint, libHYPRE), HYPRE_Int, (HYPRE_IJVector, Ptr{Cchar}), vector, filename) + return @ccall libHYPRE.HYPRE_IJVectorPrint(vector::HYPRE_IJVector, filename::Ptr{Cchar})::HYPRE_Int end mutable struct hypre_CSRMatrix_struct end @@ -339,123 +352,123 @@ mutable struct hypre_Vector_struct end const HYPRE_Vector = Ptr{hypre_Vector_struct} function HYPRE_CSRMatrixCreate(num_rows, num_cols, row_sizes) - ccall((:HYPRE_CSRMatrixCreate, libHYPRE), HYPRE_CSRMatrix, (HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Int}), num_rows, num_cols, row_sizes) + return @ccall libHYPRE.HYPRE_CSRMatrixCreate(num_rows::HYPRE_Int, num_cols::HYPRE_Int, row_sizes::Ptr{HYPRE_Int})::HYPRE_CSRMatrix end function HYPRE_CSRMatrixDestroy(matrix) - ccall((:HYPRE_CSRMatrixDestroy, libHYPRE), HYPRE_Int, (HYPRE_CSRMatrix,), matrix) + return @ccall libHYPRE.HYPRE_CSRMatrixDestroy(matrix::HYPRE_CSRMatrix)::HYPRE_Int end function HYPRE_CSRMatrixInitialize(matrix) - ccall((:HYPRE_CSRMatrixInitialize, libHYPRE), HYPRE_Int, (HYPRE_CSRMatrix,), matrix) + return @ccall libHYPRE.HYPRE_CSRMatrixInitialize(matrix::HYPRE_CSRMatrix)::HYPRE_Int end function HYPRE_CSRMatrixRead(file_name) - ccall((:HYPRE_CSRMatrixRead, libHYPRE), HYPRE_CSRMatrix, (Ptr{Cchar},), file_name) + return @ccall libHYPRE.HYPRE_CSRMatrixRead(file_name::Ptr{Cchar})::HYPRE_CSRMatrix end function HYPRE_CSRMatrixPrint(matrix, file_name) - ccall((:HYPRE_CSRMatrixPrint, libHYPRE), Cvoid, (HYPRE_CSRMatrix, Ptr{Cchar}), matrix, file_name) + return @ccall libHYPRE.HYPRE_CSRMatrixPrint(matrix::HYPRE_CSRMatrix, file_name::Ptr{Cchar})::Cvoid end function HYPRE_CSRMatrixGetNumRows(matrix, num_rows) - ccall((:HYPRE_CSRMatrixGetNumRows, libHYPRE), HYPRE_Int, (HYPRE_CSRMatrix, Ptr{HYPRE_Int}), matrix, num_rows) + return @ccall libHYPRE.HYPRE_CSRMatrixGetNumRows(matrix::HYPRE_CSRMatrix, num_rows::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MappedMatrixCreate() - ccall((:HYPRE_MappedMatrixCreate, libHYPRE), HYPRE_MappedMatrix, ()) + return @ccall libHYPRE.HYPRE_MappedMatrixCreate()::HYPRE_MappedMatrix end function HYPRE_MappedMatrixDestroy(matrix) - ccall((:HYPRE_MappedMatrixDestroy, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixDestroy(matrix::HYPRE_MappedMatrix)::HYPRE_Int end function HYPRE_MappedMatrixLimitedDestroy(matrix) - ccall((:HYPRE_MappedMatrixLimitedDestroy, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixLimitedDestroy(matrix::HYPRE_MappedMatrix)::HYPRE_Int end function HYPRE_MappedMatrixInitialize(matrix) - ccall((:HYPRE_MappedMatrixInitialize, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixInitialize(matrix::HYPRE_MappedMatrix)::HYPRE_Int end function HYPRE_MappedMatrixAssemble(matrix) - ccall((:HYPRE_MappedMatrixAssemble, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixAssemble(matrix::HYPRE_MappedMatrix)::HYPRE_Int end function HYPRE_MappedMatrixPrint(matrix) - ccall((:HYPRE_MappedMatrixPrint, libHYPRE), Cvoid, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixPrint(matrix::HYPRE_MappedMatrix)::Cvoid end function HYPRE_MappedMatrixGetColIndex(matrix, j) - ccall((:HYPRE_MappedMatrixGetColIndex, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix, HYPRE_Int), matrix, j) + return @ccall libHYPRE.HYPRE_MappedMatrixGetColIndex(matrix::HYPRE_MappedMatrix, j::HYPRE_Int)::HYPRE_Int end function HYPRE_MappedMatrixGetMatrix(matrix) - ccall((:HYPRE_MappedMatrixGetMatrix, libHYPRE), Ptr{Cvoid}, (HYPRE_MappedMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MappedMatrixGetMatrix(matrix::HYPRE_MappedMatrix)::Ptr{Cvoid} end function HYPRE_MappedMatrixSetMatrix(matrix, matrix_data) - ccall((:HYPRE_MappedMatrixSetMatrix, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix, Ptr{Cvoid}), matrix, matrix_data) + return @ccall libHYPRE.HYPRE_MappedMatrixSetMatrix(matrix::HYPRE_MappedMatrix, matrix_data::Ptr{Cvoid})::HYPRE_Int end function HYPRE_MappedMatrixSetColMap(matrix, ColMap) - ccall((:HYPRE_MappedMatrixSetColMap, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix, Ptr{Cvoid}), matrix, ColMap) + return @ccall libHYPRE.HYPRE_MappedMatrixSetColMap(matrix::HYPRE_MappedMatrix, ColMap::Ptr{Cvoid})::HYPRE_Int end function HYPRE_MappedMatrixSetMapData(matrix, MapData) - ccall((:HYPRE_MappedMatrixSetMapData, libHYPRE), HYPRE_Int, (HYPRE_MappedMatrix, Ptr{Cvoid}), matrix, MapData) + return @ccall libHYPRE.HYPRE_MappedMatrixSetMapData(matrix::HYPRE_MappedMatrix, MapData::Ptr{Cvoid})::HYPRE_Int end function HYPRE_MultiblockMatrixCreate() - ccall((:HYPRE_MultiblockMatrixCreate, libHYPRE), HYPRE_MultiblockMatrix, ()) + return @ccall libHYPRE.HYPRE_MultiblockMatrixCreate()::HYPRE_MultiblockMatrix end function HYPRE_MultiblockMatrixDestroy(matrix) - ccall((:HYPRE_MultiblockMatrixDestroy, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MultiblockMatrixDestroy(matrix::HYPRE_MultiblockMatrix)::HYPRE_Int end function HYPRE_MultiblockMatrixLimitedDestroy(matrix) - ccall((:HYPRE_MultiblockMatrixLimitedDestroy, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MultiblockMatrixLimitedDestroy(matrix::HYPRE_MultiblockMatrix)::HYPRE_Int end function HYPRE_MultiblockMatrixInitialize(matrix) - ccall((:HYPRE_MultiblockMatrixInitialize, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MultiblockMatrixInitialize(matrix::HYPRE_MultiblockMatrix)::HYPRE_Int end function HYPRE_MultiblockMatrixAssemble(matrix) - ccall((:HYPRE_MultiblockMatrixAssemble, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MultiblockMatrixAssemble(matrix::HYPRE_MultiblockMatrix)::HYPRE_Int end function HYPRE_MultiblockMatrixPrint(matrix) - ccall((:HYPRE_MultiblockMatrixPrint, libHYPRE), Cvoid, (HYPRE_MultiblockMatrix,), matrix) + return @ccall libHYPRE.HYPRE_MultiblockMatrixPrint(matrix::HYPRE_MultiblockMatrix)::Cvoid end function HYPRE_MultiblockMatrixSetNumSubmatrices(matrix, n) - ccall((:HYPRE_MultiblockMatrixSetNumSubmatrices, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix, HYPRE_Int), matrix, n) + return @ccall libHYPRE.HYPRE_MultiblockMatrixSetNumSubmatrices(matrix::HYPRE_MultiblockMatrix, n::HYPRE_Int)::HYPRE_Int end function HYPRE_MultiblockMatrixSetSubmatrixType(matrix, j, type) - ccall((:HYPRE_MultiblockMatrixSetSubmatrixType, libHYPRE), HYPRE_Int, (HYPRE_MultiblockMatrix, HYPRE_Int, HYPRE_Int), matrix, j, type) + return @ccall libHYPRE.HYPRE_MultiblockMatrixSetSubmatrixType(matrix::HYPRE_MultiblockMatrix, j::HYPRE_Int, type::HYPRE_Int)::HYPRE_Int end function HYPRE_VectorCreate(size) - ccall((:HYPRE_VectorCreate, libHYPRE), HYPRE_Vector, (HYPRE_Int,), size) + return @ccall libHYPRE.HYPRE_VectorCreate(size::HYPRE_Int)::HYPRE_Vector end function HYPRE_VectorDestroy(vector) - ccall((:HYPRE_VectorDestroy, libHYPRE), HYPRE_Int, (HYPRE_Vector,), vector) + return @ccall libHYPRE.HYPRE_VectorDestroy(vector::HYPRE_Vector)::HYPRE_Int end function HYPRE_VectorInitialize(vector) - ccall((:HYPRE_VectorInitialize, libHYPRE), HYPRE_Int, (HYPRE_Vector,), vector) + return @ccall libHYPRE.HYPRE_VectorInitialize(vector::HYPRE_Vector)::HYPRE_Int end function HYPRE_VectorPrint(vector, file_name) - ccall((:HYPRE_VectorPrint, libHYPRE), HYPRE_Int, (HYPRE_Vector, Ptr{Cchar}), vector, file_name) + return @ccall libHYPRE.HYPRE_VectorPrint(vector::HYPRE_Vector, file_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_VectorRead(file_name) - ccall((:HYPRE_VectorRead, libHYPRE), HYPRE_Vector, (Ptr{Cchar},), file_name) + return @ccall libHYPRE.HYPRE_VectorRead(file_name::Ptr{Cchar})::HYPRE_Vector end @cenum HYPRE_TimerID::UInt32 begin @@ -503,111 +516,111 @@ mutable struct hypre_ParVector_struct end const HYPRE_ParVector = Ptr{hypre_ParVector_struct} function HYPRE_ParCSRMatrixCreate(comm, global_num_rows, global_num_cols, row_starts, col_starts, num_cols_offd, num_nonzeros_diag, num_nonzeros_offd, matrix) - ccall((:HYPRE_ParCSRMatrixCreate, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_ParCSRMatrix}), comm, global_num_rows, global_num_cols, row_starts, col_starts, num_cols_offd, num_nonzeros_diag, num_nonzeros_offd, matrix) + return @ccall libHYPRE.HYPRE_ParCSRMatrixCreate(comm::MPI_Comm, global_num_rows::HYPRE_BigInt, global_num_cols::HYPRE_BigInt, row_starts::Ptr{HYPRE_BigInt}, col_starts::Ptr{HYPRE_BigInt}, num_cols_offd::HYPRE_Int, num_nonzeros_diag::HYPRE_Int, num_nonzeros_offd::HYPRE_Int, matrix::Ptr{HYPRE_ParCSRMatrix})::HYPRE_Int end function HYPRE_ParCSRMatrixDestroy(matrix) - ccall((:HYPRE_ParCSRMatrixDestroy, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix,), matrix) + return @ccall libHYPRE.HYPRE_ParCSRMatrixDestroy(matrix::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_ParCSRMatrixInitialize(matrix) - ccall((:HYPRE_ParCSRMatrixInitialize, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix,), matrix) + return @ccall libHYPRE.HYPRE_ParCSRMatrixInitialize(matrix::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_ParCSRMatrixRead(comm, file_name, matrix) - ccall((:HYPRE_ParCSRMatrixRead, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{Cchar}, Ptr{HYPRE_ParCSRMatrix}), comm, file_name, matrix) + return @ccall libHYPRE.HYPRE_ParCSRMatrixRead(comm::MPI_Comm, file_name::Ptr{Cchar}, matrix::Ptr{HYPRE_ParCSRMatrix})::HYPRE_Int end function HYPRE_ParCSRMatrixPrint(matrix, file_name) - ccall((:HYPRE_ParCSRMatrixPrint, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{Cchar}), matrix, file_name) + return @ccall libHYPRE.HYPRE_ParCSRMatrixPrint(matrix::HYPRE_ParCSRMatrix, file_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_ParCSRMatrixGetComm(matrix, comm) - ccall((:HYPRE_ParCSRMatrixGetComm, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{MPI_Comm}), matrix, comm) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetComm(matrix::HYPRE_ParCSRMatrix, comm::Ptr{MPI_Comm})::HYPRE_Int end function HYPRE_ParCSRMatrixGetDims(matrix, M, N) - ccall((:HYPRE_ParCSRMatrixGetDims, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}), matrix, M, N) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetDims(matrix::HYPRE_ParCSRMatrix, M::Ptr{HYPRE_BigInt}, N::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_ParCSRMatrixGetRowPartitioning(matrix, row_partitioning_ptr) - ccall((:HYPRE_ParCSRMatrixGetRowPartitioning, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{Ptr{HYPRE_BigInt}}), matrix, row_partitioning_ptr) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetRowPartitioning(matrix::HYPRE_ParCSRMatrix, row_partitioning_ptr::Ptr{Ptr{HYPRE_BigInt}})::HYPRE_Int end function HYPRE_ParCSRMatrixGetColPartitioning(matrix, col_partitioning_ptr) - ccall((:HYPRE_ParCSRMatrixGetColPartitioning, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{Ptr{HYPRE_BigInt}}), matrix, col_partitioning_ptr) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetColPartitioning(matrix::HYPRE_ParCSRMatrix, col_partitioning_ptr::Ptr{Ptr{HYPRE_BigInt}})::HYPRE_Int end function HYPRE_ParCSRMatrixGetLocalRange(matrix, row_start, row_end, col_start, col_end) - ccall((:HYPRE_ParCSRMatrixGetLocalRange, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}), matrix, row_start, row_end, col_start, col_end) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetLocalRange(matrix::HYPRE_ParCSRMatrix, row_start::Ptr{HYPRE_BigInt}, row_end::Ptr{HYPRE_BigInt}, col_start::Ptr{HYPRE_BigInt}, col_end::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_ParCSRMatrixGetRow(matrix, row, size, col_ind, values) - ccall((:HYPRE_ParCSRMatrixGetRow, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, HYPRE_BigInt, Ptr{HYPRE_Int}, Ptr{Ptr{HYPRE_BigInt}}, Ptr{Ptr{HYPRE_Complex}}), matrix, row, size, col_ind, values) + return @ccall libHYPRE.HYPRE_ParCSRMatrixGetRow(matrix::HYPRE_ParCSRMatrix, row::HYPRE_BigInt, size::Ptr{HYPRE_Int}, col_ind::Ptr{Ptr{HYPRE_BigInt}}, values::Ptr{Ptr{HYPRE_Complex}})::HYPRE_Int end function HYPRE_ParCSRMatrixRestoreRow(matrix, row, size, col_ind, values) - ccall((:HYPRE_ParCSRMatrixRestoreRow, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, HYPRE_BigInt, Ptr{HYPRE_Int}, Ptr{Ptr{HYPRE_BigInt}}, Ptr{Ptr{HYPRE_Complex}}), matrix, row, size, col_ind, values) + return @ccall libHYPRE.HYPRE_ParCSRMatrixRestoreRow(matrix::HYPRE_ParCSRMatrix, row::HYPRE_BigInt, size::Ptr{HYPRE_Int}, col_ind::Ptr{Ptr{HYPRE_BigInt}}, values::Ptr{Ptr{HYPRE_Complex}})::HYPRE_Int end function HYPRE_CSRMatrixToParCSRMatrix(comm, A_CSR, row_partitioning, col_partitioning, matrix) - ccall((:HYPRE_CSRMatrixToParCSRMatrix, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_CSRMatrix, Ptr{HYPRE_BigInt}, Ptr{HYPRE_BigInt}, Ptr{HYPRE_ParCSRMatrix}), comm, A_CSR, row_partitioning, col_partitioning, matrix) + return @ccall libHYPRE.HYPRE_CSRMatrixToParCSRMatrix(comm::MPI_Comm, A_CSR::HYPRE_CSRMatrix, row_partitioning::Ptr{HYPRE_BigInt}, col_partitioning::Ptr{HYPRE_BigInt}, matrix::Ptr{HYPRE_ParCSRMatrix})::HYPRE_Int end function HYPRE_ParCSRMatrixMatvec(alpha, A, x, beta, y) - ccall((:HYPRE_ParCSRMatrixMatvec, libHYPRE), HYPRE_Int, (HYPRE_Complex, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_Complex, HYPRE_ParVector), alpha, A, x, beta, y) + return @ccall libHYPRE.HYPRE_ParCSRMatrixMatvec(alpha::HYPRE_Complex, A::HYPRE_ParCSRMatrix, x::HYPRE_ParVector, beta::HYPRE_Complex, y::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRMatrixMatvecT(alpha, A, x, beta, y) - ccall((:HYPRE_ParCSRMatrixMatvecT, libHYPRE), HYPRE_Int, (HYPRE_Complex, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_Complex, HYPRE_ParVector), alpha, A, x, beta, y) + return @ccall libHYPRE.HYPRE_ParCSRMatrixMatvecT(alpha::HYPRE_Complex, A::HYPRE_ParCSRMatrix, x::HYPRE_ParVector, beta::HYPRE_Complex, y::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParVectorCreate(comm, global_size, partitioning, vector) - ccall((:HYPRE_ParVectorCreate, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_BigInt, Ptr{HYPRE_BigInt}, Ptr{HYPRE_ParVector}), comm, global_size, partitioning, vector) + return @ccall libHYPRE.HYPRE_ParVectorCreate(comm::MPI_Comm, global_size::HYPRE_BigInt, partitioning::Ptr{HYPRE_BigInt}, vector::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParVectorDestroy(vector) - ccall((:HYPRE_ParVectorDestroy, libHYPRE), HYPRE_Int, (HYPRE_ParVector,), vector) + return @ccall libHYPRE.HYPRE_ParVectorDestroy(vector::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParVectorInitialize(vector) - ccall((:HYPRE_ParVectorInitialize, libHYPRE), HYPRE_Int, (HYPRE_ParVector,), vector) + return @ccall libHYPRE.HYPRE_ParVectorInitialize(vector::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParVectorRead(comm, file_name, vector) - ccall((:HYPRE_ParVectorRead, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{Cchar}, Ptr{HYPRE_ParVector}), comm, file_name, vector) + return @ccall libHYPRE.HYPRE_ParVectorRead(comm::MPI_Comm, file_name::Ptr{Cchar}, vector::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParVectorPrint(vector, file_name) - ccall((:HYPRE_ParVectorPrint, libHYPRE), HYPRE_Int, (HYPRE_ParVector, Ptr{Cchar}), vector, file_name) + return @ccall libHYPRE.HYPRE_ParVectorPrint(vector::HYPRE_ParVector, file_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_ParVectorSetConstantValues(vector, value) - ccall((:HYPRE_ParVectorSetConstantValues, libHYPRE), HYPRE_Int, (HYPRE_ParVector, HYPRE_Complex), vector, value) + return @ccall libHYPRE.HYPRE_ParVectorSetConstantValues(vector::HYPRE_ParVector, value::HYPRE_Complex)::HYPRE_Int end function HYPRE_ParVectorSetRandomValues(vector, seed) - ccall((:HYPRE_ParVectorSetRandomValues, libHYPRE), HYPRE_Int, (HYPRE_ParVector, HYPRE_Int), vector, seed) + return @ccall libHYPRE.HYPRE_ParVectorSetRandomValues(vector::HYPRE_ParVector, seed::HYPRE_Int)::HYPRE_Int end function HYPRE_ParVectorCopy(x, y) - ccall((:HYPRE_ParVectorCopy, libHYPRE), HYPRE_Int, (HYPRE_ParVector, HYPRE_ParVector), x, y) + return @ccall libHYPRE.HYPRE_ParVectorCopy(x::HYPRE_ParVector, y::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParVectorScale(value, x) - ccall((:HYPRE_ParVectorScale, libHYPRE), HYPRE_Int, (HYPRE_Complex, HYPRE_ParVector), value, x) + return @ccall libHYPRE.HYPRE_ParVectorScale(value::HYPRE_Complex, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParVectorInnerProd(x, y, prod) - ccall((:HYPRE_ParVectorInnerProd, libHYPRE), HYPRE_Int, (HYPRE_ParVector, HYPRE_ParVector, Ptr{HYPRE_Real}), x, y, prod) + return @ccall libHYPRE.HYPRE_ParVectorInnerProd(x::HYPRE_ParVector, y::HYPRE_ParVector, prod::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_VectorToParVector(comm, b, partitioning, vector) - ccall((:HYPRE_VectorToParVector, libHYPRE), HYPRE_Int, (MPI_Comm, HYPRE_Vector, Ptr{HYPRE_BigInt}, Ptr{HYPRE_ParVector}), comm, b, partitioning, vector) + return @ccall libHYPRE.HYPRE_VectorToParVector(comm::MPI_Comm, b::HYPRE_Vector, partitioning::Ptr{HYPRE_BigInt}, vector::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParVectorGetValues(vector, num_values, indices, values) - ccall((:HYPRE_ParVectorGetValues, libHYPRE), HYPRE_Int, (HYPRE_ParVector, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Complex}), vector, num_values, indices, values) + return @ccall libHYPRE.HYPRE_ParVectorGetValues(vector::HYPRE_ParVector, num_values::HYPRE_Int, indices::Ptr{HYPRE_BigInt}, values::Ptr{HYPRE_Complex})::HYPRE_Int end mutable struct hypre_Solver_struct end @@ -625,675 +638,675 @@ const HYPRE_PtrToSolverFcn = Ptr{Cvoid} const HYPRE_PtrToModifyPCFcn = Ptr{Cvoid} function HYPRE_PCGSetup(solver, A, b, x) - ccall((:HYPRE_PCGSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_PCGSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_PCGSolve(solver, A, b, x) - ccall((:HYPRE_PCGSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_PCGSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_PCGSetTol(solver, tol) - ccall((:HYPRE_PCGSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_PCGSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_PCGSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_PCGSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_PCGSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_PCGSetResidualTol(solver, rtol) - ccall((:HYPRE_PCGSetResidualTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, rtol) + return @ccall libHYPRE.HYPRE_PCGSetResidualTol(solver::HYPRE_Solver, rtol::HYPRE_Real)::HYPRE_Int end function HYPRE_PCGSetAbsoluteTolFactor(solver, abstolf) - ccall((:HYPRE_PCGSetAbsoluteTolFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, abstolf) + return @ccall libHYPRE.HYPRE_PCGSetAbsoluteTolFactor(solver::HYPRE_Solver, abstolf::HYPRE_Real)::HYPRE_Int end function HYPRE_PCGSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_PCGSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_PCGSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_PCGSetStopCrit(solver, stop_crit) - ccall((:HYPRE_PCGSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_PCGSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetMaxIter(solver, max_iter) - ccall((:HYPRE_PCGSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_PCGSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetTwoNorm(solver, two_norm) - ccall((:HYPRE_PCGSetTwoNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, two_norm) + return @ccall libHYPRE.HYPRE_PCGSetTwoNorm(solver::HYPRE_Solver, two_norm::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetRelChange(solver, rel_change) - ccall((:HYPRE_PCGSetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, rel_change) + return @ccall libHYPRE.HYPRE_PCGSetRelChange(solver::HYPRE_Solver, rel_change::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetRecomputeResidual(solver, recompute_residual) - ccall((:HYPRE_PCGSetRecomputeResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, recompute_residual) + return @ccall libHYPRE.HYPRE_PCGSetRecomputeResidual(solver::HYPRE_Solver, recompute_residual::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetRecomputeResidualP(solver, recompute_residual_p) - ccall((:HYPRE_PCGSetRecomputeResidualP, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, recompute_residual_p) + return @ccall libHYPRE.HYPRE_PCGSetRecomputeResidualP(solver::HYPRE_Solver, recompute_residual_p::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_PCGSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_PCGSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_PCGSetLogging(solver, logging) - ccall((:HYPRE_PCGSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_PCGSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGSetPrintLevel(solver, level) - ccall((:HYPRE_PCGSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_PCGSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_PCGGetNumIterations(solver, num_iterations) - ccall((:HYPRE_PCGGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_PCGGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_PCGGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_PCGGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_PCGGetResidual(solver, residual) - ccall((:HYPRE_PCGGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_PCGGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_PCGGetTol(solver, tol) - ccall((:HYPRE_PCGGetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_PCGGetTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_PCGGetResidualTol(solver, rtol) - ccall((:HYPRE_PCGGetResidualTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, rtol) + return @ccall libHYPRE.HYPRE_PCGGetResidualTol(solver::HYPRE_Solver, rtol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_PCGGetAbsoluteTolFactor(solver, abstolf) - ccall((:HYPRE_PCGGetAbsoluteTolFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, abstolf) + return @ccall libHYPRE.HYPRE_PCGGetAbsoluteTolFactor(solver::HYPRE_Solver, abstolf::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_PCGGetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_PCGGetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, cf_tol) + return @ccall libHYPRE.HYPRE_PCGGetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_PCGGetStopCrit(solver, stop_crit) - ccall((:HYPRE_PCGGetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, stop_crit) + return @ccall libHYPRE.HYPRE_PCGGetStopCrit(solver::HYPRE_Solver, stop_crit::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetMaxIter(solver, max_iter) - ccall((:HYPRE_PCGGetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, max_iter) + return @ccall libHYPRE.HYPRE_PCGGetMaxIter(solver::HYPRE_Solver, max_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetTwoNorm(solver, two_norm) - ccall((:HYPRE_PCGGetTwoNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, two_norm) + return @ccall libHYPRE.HYPRE_PCGGetTwoNorm(solver::HYPRE_Solver, two_norm::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetRelChange(solver, rel_change) - ccall((:HYPRE_PCGGetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, rel_change) + return @ccall libHYPRE.HYPRE_PCGGetRelChange(solver::HYPRE_Solver, rel_change::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetSkipRealResidualCheck(solver, skip_real_r_check) - ccall((:HYPRE_GMRESGetSkipRealResidualCheck, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, skip_real_r_check) + return @ccall libHYPRE.HYPRE_GMRESGetSkipRealResidualCheck(solver::HYPRE_Solver, skip_real_r_check::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_PCGGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_PCGGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_PCGGetLogging(solver, level) - ccall((:HYPRE_PCGGetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_PCGGetLogging(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetPrintLevel(solver, level) - ccall((:HYPRE_PCGGetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_PCGGetPrintLevel(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_PCGGetConverged(solver, converged) - ccall((:HYPRE_PCGGetConverged, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, converged) + return @ccall libHYPRE.HYPRE_PCGGetConverged(solver::HYPRE_Solver, converged::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESSetup(solver, A, b, x) - ccall((:HYPRE_GMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_GMRESSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_GMRESSolve(solver, A, b, x) - ccall((:HYPRE_GMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_GMRESSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_GMRESSetTol(solver, tol) - ccall((:HYPRE_GMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_GMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_GMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_GMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_GMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_GMRESSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_GMRESSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_GMRESSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_GMRESSetStopCrit(solver, stop_crit) - ccall((:HYPRE_GMRESSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_GMRESSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_GMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_GMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_GMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_GMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetKDim(solver, k_dim) - ccall((:HYPRE_GMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_GMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetRelChange(solver, rel_change) - ccall((:HYPRE_GMRESSetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, rel_change) + return @ccall libHYPRE.HYPRE_GMRESSetRelChange(solver::HYPRE_Solver, rel_change::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetSkipRealResidualCheck(solver, skip_real_r_check) - ccall((:HYPRE_GMRESSetSkipRealResidualCheck, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, skip_real_r_check) + return @ccall libHYPRE.HYPRE_GMRESSetSkipRealResidualCheck(solver::HYPRE_Solver, skip_real_r_check::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_GMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_GMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_GMRESSetLogging(solver, logging) - ccall((:HYPRE_GMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_GMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESSetPrintLevel(solver, level) - ccall((:HYPRE_GMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_GMRESSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_GMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_GMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_GMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_GMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_GMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_GMRESGetResidual(solver, residual) - ccall((:HYPRE_GMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_GMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_GMRESGetTol(solver, tol) - ccall((:HYPRE_GMRESGetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_GMRESGetTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_GMRESGetAbsoluteTol(solver, tol) - ccall((:HYPRE_GMRESGetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_GMRESGetAbsoluteTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_GMRESGetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_GMRESGetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, cf_tol) + return @ccall libHYPRE.HYPRE_GMRESGetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_GMRESGetStopCrit(solver, stop_crit) - ccall((:HYPRE_GMRESGetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, stop_crit) + return @ccall libHYPRE.HYPRE_GMRESGetStopCrit(solver::HYPRE_Solver, stop_crit::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetMinIter(solver, min_iter) - ccall((:HYPRE_GMRESGetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, min_iter) + return @ccall libHYPRE.HYPRE_GMRESGetMinIter(solver::HYPRE_Solver, min_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetMaxIter(solver, max_iter) - ccall((:HYPRE_GMRESGetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, max_iter) + return @ccall libHYPRE.HYPRE_GMRESGetMaxIter(solver::HYPRE_Solver, max_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetKDim(solver, k_dim) - ccall((:HYPRE_GMRESGetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, k_dim) + return @ccall libHYPRE.HYPRE_GMRESGetKDim(solver::HYPRE_Solver, k_dim::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetRelChange(solver, rel_change) - ccall((:HYPRE_GMRESGetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, rel_change) + return @ccall libHYPRE.HYPRE_GMRESGetRelChange(solver::HYPRE_Solver, rel_change::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_GMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_GMRESGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_GMRESGetLogging(solver, level) - ccall((:HYPRE_GMRESGetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_GMRESGetLogging(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetPrintLevel(solver, level) - ccall((:HYPRE_GMRESGetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_GMRESGetPrintLevel(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_GMRESGetConverged(solver, converged) - ccall((:HYPRE_GMRESGetConverged, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, converged) + return @ccall libHYPRE.HYPRE_GMRESGetConverged(solver::HYPRE_Solver, converged::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESSetup(solver, A, b, x) - ccall((:HYPRE_FlexGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_FlexGMRESSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_FlexGMRESSolve(solver, A, b, x) - ccall((:HYPRE_FlexGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_FlexGMRESSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_FlexGMRESSetTol(solver, tol) - ccall((:HYPRE_FlexGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_FlexGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_FlexGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_FlexGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_FlexGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_FlexGMRESSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_FlexGMRESSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_FlexGMRESSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_FlexGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_FlexGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_FlexGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_FlexGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_FlexGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_FlexGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_FlexGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_FlexGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_FlexGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_FlexGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_FlexGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_FlexGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_FlexGMRESSetLogging(solver, logging) - ccall((:HYPRE_FlexGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_FlexGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_FlexGMRESSetPrintLevel(solver, level) - ccall((:HYPRE_FlexGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_FlexGMRESSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_FlexGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_FlexGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_FlexGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_FlexGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_FlexGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_FlexGMRESGetResidual(solver, residual) - ccall((:HYPRE_FlexGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_FlexGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_FlexGMRESGetTol(solver, tol) - ccall((:HYPRE_FlexGMRESGetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_FlexGMRESGetTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_FlexGMRESGetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_FlexGMRESGetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, cf_tol) + return @ccall libHYPRE.HYPRE_FlexGMRESGetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_FlexGMRESGetStopCrit(solver, stop_crit) - ccall((:HYPRE_FlexGMRESGetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, stop_crit) + return @ccall libHYPRE.HYPRE_FlexGMRESGetStopCrit(solver::HYPRE_Solver, stop_crit::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetMinIter(solver, min_iter) - ccall((:HYPRE_FlexGMRESGetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, min_iter) + return @ccall libHYPRE.HYPRE_FlexGMRESGetMinIter(solver::HYPRE_Solver, min_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetMaxIter(solver, max_iter) - ccall((:HYPRE_FlexGMRESGetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, max_iter) + return @ccall libHYPRE.HYPRE_FlexGMRESGetMaxIter(solver::HYPRE_Solver, max_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetKDim(solver, k_dim) - ccall((:HYPRE_FlexGMRESGetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, k_dim) + return @ccall libHYPRE.HYPRE_FlexGMRESGetKDim(solver::HYPRE_Solver, k_dim::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_FlexGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_FlexGMRESGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_FlexGMRESGetLogging(solver, level) - ccall((:HYPRE_FlexGMRESGetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_FlexGMRESGetLogging(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetPrintLevel(solver, level) - ccall((:HYPRE_FlexGMRESGetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_FlexGMRESGetPrintLevel(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESGetConverged(solver, converged) - ccall((:HYPRE_FlexGMRESGetConverged, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, converged) + return @ccall libHYPRE.HYPRE_FlexGMRESGetConverged(solver::HYPRE_Solver, converged::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_FlexGMRESSetModifyPC(solver, modify_pc) - ccall((:HYPRE_FlexGMRESSetModifyPC, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToModifyPCFcn), solver, modify_pc) + return @ccall libHYPRE.HYPRE_FlexGMRESSetModifyPC(solver::HYPRE_Solver, modify_pc::HYPRE_PtrToModifyPCFcn)::HYPRE_Int end function HYPRE_LGMRESSetup(solver, A, b, x) - ccall((:HYPRE_LGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_LGMRESSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_LGMRESSolve(solver, A, b, x) - ccall((:HYPRE_LGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_LGMRESSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_LGMRESSetTol(solver, tol) - ccall((:HYPRE_LGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_LGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_LGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_LGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_LGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_LGMRESSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_LGMRESSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_LGMRESSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_LGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_LGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_LGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_LGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_LGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_LGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_LGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESSetAugDim(solver, aug_dim) - ccall((:HYPRE_LGMRESSetAugDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, aug_dim) + return @ccall libHYPRE.HYPRE_LGMRESSetAugDim(solver::HYPRE_Solver, aug_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_LGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_LGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_LGMRESSetLogging(solver, logging) - ccall((:HYPRE_LGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_LGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESSetPrintLevel(solver, level) - ccall((:HYPRE_LGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_LGMRESSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_LGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_LGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_LGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_LGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_LGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_LGMRESGetResidual(solver, residual) - ccall((:HYPRE_LGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_LGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_LGMRESGetTol(solver, tol) - ccall((:HYPRE_LGMRESGetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_LGMRESGetTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_LGMRESGetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_LGMRESGetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, cf_tol) + return @ccall libHYPRE.HYPRE_LGMRESGetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_LGMRESGetStopCrit(solver, stop_crit) - ccall((:HYPRE_LGMRESGetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, stop_crit) + return @ccall libHYPRE.HYPRE_LGMRESGetStopCrit(solver::HYPRE_Solver, stop_crit::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetMinIter(solver, min_iter) - ccall((:HYPRE_LGMRESGetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, min_iter) + return @ccall libHYPRE.HYPRE_LGMRESGetMinIter(solver::HYPRE_Solver, min_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetMaxIter(solver, max_iter) - ccall((:HYPRE_LGMRESGetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, max_iter) + return @ccall libHYPRE.HYPRE_LGMRESGetMaxIter(solver::HYPRE_Solver, max_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetKDim(solver, k_dim) - ccall((:HYPRE_LGMRESGetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, k_dim) + return @ccall libHYPRE.HYPRE_LGMRESGetKDim(solver::HYPRE_Solver, k_dim::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetAugDim(solver, k_dim) - ccall((:HYPRE_LGMRESGetAugDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, k_dim) + return @ccall libHYPRE.HYPRE_LGMRESGetAugDim(solver::HYPRE_Solver, k_dim::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_LGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_LGMRESGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_LGMRESGetLogging(solver, level) - ccall((:HYPRE_LGMRESGetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_LGMRESGetLogging(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetPrintLevel(solver, level) - ccall((:HYPRE_LGMRESGetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_LGMRESGetPrintLevel(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_LGMRESGetConverged(solver, converged) - ccall((:HYPRE_LGMRESGetConverged, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, converged) + return @ccall libHYPRE.HYPRE_LGMRESGetConverged(solver::HYPRE_Solver, converged::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESSetup(solver, A, b, x) - ccall((:HYPRE_COGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_COGMRESSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_COGMRESSolve(solver, A, b, x) - ccall((:HYPRE_COGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_COGMRESSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_COGMRESSetTol(solver, tol) - ccall((:HYPRE_COGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_COGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_COGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_COGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_COGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_COGMRESSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_COGMRESSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_COGMRESSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_COGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_COGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_COGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_COGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_COGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_COGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_COGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetUnroll(solver, unroll) - ccall((:HYPRE_COGMRESSetUnroll, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, unroll) + return @ccall libHYPRE.HYPRE_COGMRESSetUnroll(solver::HYPRE_Solver, unroll::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetCGS(solver, cgs) - ccall((:HYPRE_COGMRESSetCGS, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cgs) + return @ccall libHYPRE.HYPRE_COGMRESSetCGS(solver::HYPRE_Solver, cgs::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_COGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_COGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_COGMRESSetLogging(solver, logging) - ccall((:HYPRE_COGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_COGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESSetPrintLevel(solver, level) - ccall((:HYPRE_COGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_COGMRESSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_COGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_COGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_COGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_COGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_COGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_COGMRESGetResidual(solver, residual) - ccall((:HYPRE_COGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_COGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_COGMRESGetTol(solver, tol) - ccall((:HYPRE_COGMRESGetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, tol) + return @ccall libHYPRE.HYPRE_COGMRESGetTol(solver::HYPRE_Solver, tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_COGMRESGetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_COGMRESGetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, cf_tol) + return @ccall libHYPRE.HYPRE_COGMRESGetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_COGMRESGetMinIter(solver, min_iter) - ccall((:HYPRE_COGMRESGetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, min_iter) + return @ccall libHYPRE.HYPRE_COGMRESGetMinIter(solver::HYPRE_Solver, min_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetMaxIter(solver, max_iter) - ccall((:HYPRE_COGMRESGetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, max_iter) + return @ccall libHYPRE.HYPRE_COGMRESGetMaxIter(solver::HYPRE_Solver, max_iter::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetKDim(solver, k_dim) - ccall((:HYPRE_COGMRESGetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, k_dim) + return @ccall libHYPRE.HYPRE_COGMRESGetKDim(solver::HYPRE_Solver, k_dim::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetUnroll(solver, unroll) - ccall((:HYPRE_COGMRESGetUnroll, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, unroll) + return @ccall libHYPRE.HYPRE_COGMRESGetUnroll(solver::HYPRE_Solver, unroll::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetCGS(solver, cgs) - ccall((:HYPRE_COGMRESGetCGS, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, cgs) + return @ccall libHYPRE.HYPRE_COGMRESGetCGS(solver::HYPRE_Solver, cgs::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_COGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_COGMRESGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_COGMRESGetLogging(solver, level) - ccall((:HYPRE_COGMRESGetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_COGMRESGetLogging(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetPrintLevel(solver, level) - ccall((:HYPRE_COGMRESGetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, level) + return @ccall libHYPRE.HYPRE_COGMRESGetPrintLevel(solver::HYPRE_Solver, level::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESGetConverged(solver, converged) - ccall((:HYPRE_COGMRESGetConverged, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, converged) + return @ccall libHYPRE.HYPRE_COGMRESGetConverged(solver::HYPRE_Solver, converged::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_COGMRESSetModifyPC(solver, modify_pc) - ccall((:HYPRE_COGMRESSetModifyPC, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToModifyPCFcn), solver, modify_pc) + return @ccall libHYPRE.HYPRE_COGMRESSetModifyPC(solver::HYPRE_Solver, modify_pc::HYPRE_PtrToModifyPCFcn)::HYPRE_Int end function HYPRE_BiCGSTABDestroy(solver) - ccall((:HYPRE_BiCGSTABDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_BiCGSTABDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_BiCGSTABSetup(solver, A, b, x) - ccall((:HYPRE_BiCGSTABSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BiCGSTABSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_BiCGSTABSolve(solver, A, b, x) - ccall((:HYPRE_BiCGSTABSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BiCGSTABSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_BiCGSTABSetTol(solver, tol) - ccall((:HYPRE_BiCGSTABSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_BiCGSTABSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BiCGSTABSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_BiCGSTABSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_BiCGSTABSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BiCGSTABSetConvergenceFactorTol(solver, cf_tol) - ccall((:HYPRE_BiCGSTABSetConvergenceFactorTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_BiCGSTABSetConvergenceFactorTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BiCGSTABSetStopCrit(solver, stop_crit) - ccall((:HYPRE_BiCGSTABSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_BiCGSTABSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_BiCGSTABSetMinIter(solver, min_iter) - ccall((:HYPRE_BiCGSTABSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_BiCGSTABSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_BiCGSTABSetMaxIter(solver, max_iter) - ccall((:HYPRE_BiCGSTABSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_BiCGSTABSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_BiCGSTABSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_BiCGSTABSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_BiCGSTABSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_BiCGSTABSetLogging(solver, logging) - ccall((:HYPRE_BiCGSTABSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_BiCGSTABSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_BiCGSTABSetPrintLevel(solver, level) - ccall((:HYPRE_BiCGSTABSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_BiCGSTABSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_BiCGSTABGetNumIterations(solver, num_iterations) - ccall((:HYPRE_BiCGSTABGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_BiCGSTABGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BiCGSTABGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_BiCGSTABGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_BiCGSTABGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BiCGSTABGetResidual(solver, residual) - ccall((:HYPRE_BiCGSTABGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, residual) + return @ccall libHYPRE.HYPRE_BiCGSTABGetResidual(solver::HYPRE_Solver, residual::Ptr{Cvoid})::HYPRE_Int end function HYPRE_BiCGSTABGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_BiCGSTABGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_BiCGSTABGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_CGNRDestroy(solver) - ccall((:HYPRE_CGNRDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_CGNRDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_CGNRSetup(solver, A, b, x) - ccall((:HYPRE_CGNRSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_CGNRSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_CGNRSolve(solver, A, b, x) - ccall((:HYPRE_CGNRSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_CGNRSolve(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_CGNRSetTol(solver, tol) - ccall((:HYPRE_CGNRSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_CGNRSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_CGNRSetStopCrit(solver, stop_crit) - ccall((:HYPRE_CGNRSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_CGNRSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_CGNRSetMinIter(solver, min_iter) - ccall((:HYPRE_CGNRSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_CGNRSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_CGNRSetMaxIter(solver, max_iter) - ccall((:HYPRE_CGNRSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_CGNRSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_CGNRSetPrecond(solver, precond, precondT, precond_setup, precond_solver) - ccall((:HYPRE_CGNRSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precondT, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_CGNRSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precondT::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_CGNRSetLogging(solver, logging) - ccall((:HYPRE_CGNRSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_CGNRSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_CGNRGetNumIterations(solver, num_iterations) - ccall((:HYPRE_CGNRGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_CGNRGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_CGNRGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_CGNRGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_CGNRGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_CGNRGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_CGNRGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_CGNRGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end struct utilities_FortranMatrix @@ -1305,115 +1318,115 @@ struct utilities_FortranMatrix end function utilities_FortranMatrixCreate() - ccall((:utilities_FortranMatrixCreate, libHYPRE), Ptr{utilities_FortranMatrix}, ()) + return @ccall libHYPRE.utilities_FortranMatrixCreate()::Ptr{utilities_FortranMatrix} end function utilities_FortranMatrixAllocateData(h, w, mtx) - ccall((:utilities_FortranMatrixAllocateData, libHYPRE), Cvoid, (HYPRE_BigInt, HYPRE_BigInt, Ptr{utilities_FortranMatrix}), h, w, mtx) + return @ccall libHYPRE.utilities_FortranMatrixAllocateData(h::HYPRE_BigInt, w::HYPRE_BigInt, mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixWrap(arg1, gh, h, w, mtx) - ccall((:utilities_FortranMatrixWrap, libHYPRE), Cvoid, (Ptr{HYPRE_Real}, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, Ptr{utilities_FortranMatrix}), arg1, gh, h, w, mtx) + return @ccall libHYPRE.utilities_FortranMatrixWrap(arg1::Ptr{HYPRE_Real}, gh::HYPRE_BigInt, h::HYPRE_BigInt, w::HYPRE_BigInt, mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixDestroy(mtx) - ccall((:utilities_FortranMatrixDestroy, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixDestroy(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixGlobalHeight(mtx) - ccall((:utilities_FortranMatrixGlobalHeight, libHYPRE), HYPRE_BigInt, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixGlobalHeight(mtx::Ptr{utilities_FortranMatrix})::HYPRE_BigInt end function utilities_FortranMatrixHeight(mtx) - ccall((:utilities_FortranMatrixHeight, libHYPRE), HYPRE_BigInt, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixHeight(mtx::Ptr{utilities_FortranMatrix})::HYPRE_BigInt end function utilities_FortranMatrixWidth(mtx) - ccall((:utilities_FortranMatrixWidth, libHYPRE), HYPRE_BigInt, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixWidth(mtx::Ptr{utilities_FortranMatrix})::HYPRE_BigInt end function utilities_FortranMatrixValues(mtx) - ccall((:utilities_FortranMatrixValues, libHYPRE), Ptr{HYPRE_Real}, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixValues(mtx::Ptr{utilities_FortranMatrix})::Ptr{HYPRE_Real} end function utilities_FortranMatrixClear(mtx) - ccall((:utilities_FortranMatrixClear, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixClear(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixClearL(mtx) - ccall((:utilities_FortranMatrixClearL, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixClearL(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixSetToIdentity(mtx) - ccall((:utilities_FortranMatrixSetToIdentity, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixSetToIdentity(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixTransposeSquare(mtx) - ccall((:utilities_FortranMatrixTransposeSquare, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixTransposeSquare(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixSymmetrize(mtx) - ccall((:utilities_FortranMatrixSymmetrize, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixSymmetrize(mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixCopy(src, t, dest) - ccall((:utilities_FortranMatrixCopy, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, HYPRE_Int, Ptr{utilities_FortranMatrix}), src, t, dest) + return @ccall libHYPRE.utilities_FortranMatrixCopy(src::Ptr{utilities_FortranMatrix}, t::HYPRE_Int, dest::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixIndexCopy(index, src, t, dest) - ccall((:utilities_FortranMatrixIndexCopy, libHYPRE), Cvoid, (Ptr{HYPRE_Int}, Ptr{utilities_FortranMatrix}, HYPRE_Int, Ptr{utilities_FortranMatrix}), index, src, t, dest) + return @ccall libHYPRE.utilities_FortranMatrixIndexCopy(index::Ptr{HYPRE_Int}, src::Ptr{utilities_FortranMatrix}, t::HYPRE_Int, dest::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixSetDiagonal(mtx, d) - ccall((:utilities_FortranMatrixSetDiagonal, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}), mtx, d) + return @ccall libHYPRE.utilities_FortranMatrixSetDiagonal(mtx::Ptr{utilities_FortranMatrix}, d::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixGetDiagonal(mtx, d) - ccall((:utilities_FortranMatrixGetDiagonal, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}), mtx, d) + return @ccall libHYPRE.utilities_FortranMatrixGetDiagonal(mtx::Ptr{utilities_FortranMatrix}, d::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixAdd(a, mtxA, mtxB, mtxC) - ccall((:utilities_FortranMatrixAdd, libHYPRE), Cvoid, (HYPRE_Real, Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}), a, mtxA, mtxB, mtxC) + return @ccall libHYPRE.utilities_FortranMatrixAdd(a::HYPRE_Real, mtxA::Ptr{utilities_FortranMatrix}, mtxB::Ptr{utilities_FortranMatrix}, mtxC::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixDMultiply(d, mtx) - ccall((:utilities_FortranMatrixDMultiply, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}), d, mtx) + return @ccall libHYPRE.utilities_FortranMatrixDMultiply(d::Ptr{utilities_FortranMatrix}, mtx::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixMultiplyD(mtx, d) - ccall((:utilities_FortranMatrixMultiplyD, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, Ptr{utilities_FortranMatrix}), mtx, d) + return @ccall libHYPRE.utilities_FortranMatrixMultiplyD(mtx::Ptr{utilities_FortranMatrix}, d::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixMultiply(mtxA, tA, mtxB, tB, mtxC) - ccall((:utilities_FortranMatrixMultiply, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, HYPRE_Int, Ptr{utilities_FortranMatrix}, HYPRE_Int, Ptr{utilities_FortranMatrix}), mtxA, tA, mtxB, tB, mtxC) + return @ccall libHYPRE.utilities_FortranMatrixMultiply(mtxA::Ptr{utilities_FortranMatrix}, tA::HYPRE_Int, mtxB::Ptr{utilities_FortranMatrix}, tB::HYPRE_Int, mtxC::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixFNorm(mtx) - ccall((:utilities_FortranMatrixFNorm, libHYPRE), HYPRE_Real, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixFNorm(mtx::Ptr{utilities_FortranMatrix})::HYPRE_Real end function utilities_FortranMatrixValue(mtx, i, j) - ccall((:utilities_FortranMatrixValue, libHYPRE), HYPRE_Real, (Ptr{utilities_FortranMatrix}, HYPRE_BigInt, HYPRE_BigInt), mtx, i, j) + return @ccall libHYPRE.utilities_FortranMatrixValue(mtx::Ptr{utilities_FortranMatrix}, i::HYPRE_BigInt, j::HYPRE_BigInt)::HYPRE_Real end function utilities_FortranMatrixValuePtr(mtx, i, j) - ccall((:utilities_FortranMatrixValuePtr, libHYPRE), Ptr{HYPRE_Real}, (Ptr{utilities_FortranMatrix}, HYPRE_BigInt, HYPRE_BigInt), mtx, i, j) + return @ccall libHYPRE.utilities_FortranMatrixValuePtr(mtx::Ptr{utilities_FortranMatrix}, i::HYPRE_BigInt, j::HYPRE_BigInt)::Ptr{HYPRE_Real} end function utilities_FortranMatrixMaxValue(mtx) - ccall((:utilities_FortranMatrixMaxValue, libHYPRE), HYPRE_Real, (Ptr{utilities_FortranMatrix},), mtx) + return @ccall libHYPRE.utilities_FortranMatrixMaxValue(mtx::Ptr{utilities_FortranMatrix})::HYPRE_Real end function utilities_FortranMatrixSelectBlock(mtx, iFrom, iTo, jFrom, jTo, block) - ccall((:utilities_FortranMatrixSelectBlock, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix}, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, Ptr{utilities_FortranMatrix}), mtx, iFrom, iTo, jFrom, jTo, block) + return @ccall libHYPRE.utilities_FortranMatrixSelectBlock(mtx::Ptr{utilities_FortranMatrix}, iFrom::HYPRE_BigInt, iTo::HYPRE_BigInt, jFrom::HYPRE_BigInt, jTo::HYPRE_BigInt, block::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixUpperInv(u) - ccall((:utilities_FortranMatrixUpperInv, libHYPRE), Cvoid, (Ptr{utilities_FortranMatrix},), u) + return @ccall libHYPRE.utilities_FortranMatrixUpperInv(u::Ptr{utilities_FortranMatrix})::Cvoid end function utilities_FortranMatrixPrint(mtx, fileName) - ccall((:utilities_FortranMatrixPrint, libHYPRE), HYPRE_Int, (Ptr{utilities_FortranMatrix}, Ptr{Cchar}), mtx, fileName) + return @ccall libHYPRE.utilities_FortranMatrixPrint(mtx::Ptr{utilities_FortranMatrix}, fileName::Ptr{Cchar})::HYPRE_Int end struct mv_InterfaceInterpreter @@ -1449,75 +1462,75 @@ mutable struct mv_MultiVector end const mv_MultiVectorPtr = Ptr{mv_MultiVector} function mv_MultiVectorGetData(x) - ccall((:mv_MultiVectorGetData, libHYPRE), Ptr{Cvoid}, (mv_MultiVectorPtr,), x) + return @ccall libHYPRE.mv_MultiVectorGetData(x::mv_MultiVectorPtr)::Ptr{Cvoid} end function mv_MultiVectorWrap(ii, data, ownsData) - ccall((:mv_MultiVectorWrap, libHYPRE), mv_MultiVectorPtr, (Ptr{mv_InterfaceInterpreter}, Ptr{Cvoid}, HYPRE_Int), ii, data, ownsData) + return @ccall libHYPRE.mv_MultiVectorWrap(ii::Ptr{mv_InterfaceInterpreter}, data::Ptr{Cvoid}, ownsData::HYPRE_Int)::mv_MultiVectorPtr end function mv_MultiVectorCreateFromSampleVector(arg1, n, sample) - ccall((:mv_MultiVectorCreateFromSampleVector, libHYPRE), mv_MultiVectorPtr, (Ptr{Cvoid}, HYPRE_Int, Ptr{Cvoid}), arg1, n, sample) + return @ccall libHYPRE.mv_MultiVectorCreateFromSampleVector(arg1::Ptr{Cvoid}, n::HYPRE_Int, sample::Ptr{Cvoid})::mv_MultiVectorPtr end function mv_MultiVectorCreateCopy(x, copyValues) - ccall((:mv_MultiVectorCreateCopy, libHYPRE), mv_MultiVectorPtr, (mv_MultiVectorPtr, HYPRE_Int), x, copyValues) + return @ccall libHYPRE.mv_MultiVectorCreateCopy(x::mv_MultiVectorPtr, copyValues::HYPRE_Int)::mv_MultiVectorPtr end function mv_MultiVectorDestroy(arg1) - ccall((:mv_MultiVectorDestroy, libHYPRE), Cvoid, (mv_MultiVectorPtr,), arg1) + return @ccall libHYPRE.mv_MultiVectorDestroy(arg1::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorWidth(v) - ccall((:mv_MultiVectorWidth, libHYPRE), HYPRE_Int, (mv_MultiVectorPtr,), v) + return @ccall libHYPRE.mv_MultiVectorWidth(v::mv_MultiVectorPtr)::HYPRE_Int end function mv_MultiVectorHeight(v) - ccall((:mv_MultiVectorHeight, libHYPRE), HYPRE_Int, (mv_MultiVectorPtr,), v) + return @ccall libHYPRE.mv_MultiVectorHeight(v::mv_MultiVectorPtr)::HYPRE_Int end function mv_MultiVectorSetMask(v, mask) - ccall((:mv_MultiVectorSetMask, libHYPRE), Cvoid, (mv_MultiVectorPtr, Ptr{HYPRE_Int}), v, mask) + return @ccall libHYPRE.mv_MultiVectorSetMask(v::mv_MultiVectorPtr, mask::Ptr{HYPRE_Int})::Cvoid end function mv_MultiVectorClear(arg1) - ccall((:mv_MultiVectorClear, libHYPRE), Cvoid, (mv_MultiVectorPtr,), arg1) + return @ccall libHYPRE.mv_MultiVectorClear(arg1::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorSetRandom(v, seed) - ccall((:mv_MultiVectorSetRandom, libHYPRE), Cvoid, (mv_MultiVectorPtr, HYPRE_Int), v, seed) + return @ccall libHYPRE.mv_MultiVectorSetRandom(v::mv_MultiVectorPtr, seed::HYPRE_Int)::Cvoid end function mv_MultiVectorCopy(src, dest) - ccall((:mv_MultiVectorCopy, libHYPRE), Cvoid, (mv_MultiVectorPtr, mv_MultiVectorPtr), src, dest) + return @ccall libHYPRE.mv_MultiVectorCopy(src::mv_MultiVectorPtr, dest::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorAxpy(a, x, y) - ccall((:mv_MultiVectorAxpy, libHYPRE), Cvoid, (HYPRE_Complex, mv_MultiVectorPtr, mv_MultiVectorPtr), a, x, y) + return @ccall libHYPRE.mv_MultiVectorAxpy(a::HYPRE_Complex, x::mv_MultiVectorPtr, y::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorByMultiVector(x, y, gh, h, w, v) - ccall((:mv_MultiVectorByMultiVector, libHYPRE), Cvoid, (mv_MultiVectorPtr, mv_MultiVectorPtr, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Real}), x, y, gh, h, w, v) + return @ccall libHYPRE.mv_MultiVectorByMultiVector(x::mv_MultiVectorPtr, y::mv_MultiVectorPtr, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Real})::Cvoid end function mv_MultiVectorByMultiVectorDiag(arg1, arg2, mask, n, diag) - ccall((:mv_MultiVectorByMultiVectorDiag, libHYPRE), Cvoid, (mv_MultiVectorPtr, mv_MultiVectorPtr, Ptr{HYPRE_Int}, HYPRE_Int, Ptr{HYPRE_Real}), arg1, arg2, mask, n, diag) + return @ccall libHYPRE.mv_MultiVectorByMultiVectorDiag(arg1::mv_MultiVectorPtr, arg2::mv_MultiVectorPtr, mask::Ptr{HYPRE_Int}, n::HYPRE_Int, diag::Ptr{HYPRE_Real})::Cvoid end function mv_MultiVectorByMatrix(x, gh, h, w, v, y) - ccall((:mv_MultiVectorByMatrix, libHYPRE), Cvoid, (mv_MultiVectorPtr, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Complex}, mv_MultiVectorPtr), x, gh, h, w, v, y) + return @ccall libHYPRE.mv_MultiVectorByMatrix(x::mv_MultiVectorPtr, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Complex}, y::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorXapy(x, gh, h, w, v, y) - ccall((:mv_MultiVectorXapy, libHYPRE), Cvoid, (mv_MultiVectorPtr, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Complex}, mv_MultiVectorPtr), x, gh, h, w, v, y) + return @ccall libHYPRE.mv_MultiVectorXapy(x::mv_MultiVectorPtr, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Complex}, y::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorByDiagonal(x, mask, n, diag, y) - ccall((:mv_MultiVectorByDiagonal, libHYPRE), Cvoid, (mv_MultiVectorPtr, Ptr{HYPRE_Int}, HYPRE_Int, Ptr{HYPRE_Complex}, mv_MultiVectorPtr), x, mask, n, diag, y) + return @ccall libHYPRE.mv_MultiVectorByDiagonal(x::mv_MultiVectorPtr, mask::Ptr{HYPRE_Int}, n::HYPRE_Int, diag::Ptr{HYPRE_Complex}, y::mv_MultiVectorPtr)::Cvoid end function mv_MultiVectorEval(f, par, x, y) - ccall((:mv_MultiVectorEval, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, mv_MultiVectorPtr, mv_MultiVectorPtr), f, par, x, y) + return @ccall libHYPRE.mv_MultiVectorEval(f::Ptr{Cvoid}, par::Ptr{Cvoid}, x::mv_MultiVectorPtr, y::mv_MultiVectorPtr)::Cvoid end struct mv_TempMultiVector @@ -1532,67 +1545,67 @@ end const mv_TempMultiVectorPtr = Ptr{mv_TempMultiVector} function mv_TempMultiVectorCreateFromSampleVector(arg1, n, sample) - ccall((:mv_TempMultiVectorCreateFromSampleVector, libHYPRE), Ptr{Cvoid}, (Ptr{Cvoid}, HYPRE_Int, Ptr{Cvoid}), arg1, n, sample) + return @ccall libHYPRE.mv_TempMultiVectorCreateFromSampleVector(arg1::Ptr{Cvoid}, n::HYPRE_Int, sample::Ptr{Cvoid})::Ptr{Cvoid} end function mv_TempMultiVectorCreateCopy(arg1, copyValues) - ccall((:mv_TempMultiVectorCreateCopy, libHYPRE), Ptr{Cvoid}, (Ptr{Cvoid}, HYPRE_Int), arg1, copyValues) + return @ccall libHYPRE.mv_TempMultiVectorCreateCopy(arg1::Ptr{Cvoid}, copyValues::HYPRE_Int)::Ptr{Cvoid} end function mv_TempMultiVectorDestroy(arg1) - ccall((:mv_TempMultiVectorDestroy, libHYPRE), Cvoid, (Ptr{Cvoid},), arg1) + return @ccall libHYPRE.mv_TempMultiVectorDestroy(arg1::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorWidth(v) - ccall((:mv_TempMultiVectorWidth, libHYPRE), HYPRE_Int, (Ptr{Cvoid},), v) + return @ccall libHYPRE.mv_TempMultiVectorWidth(v::Ptr{Cvoid})::HYPRE_Int end function mv_TempMultiVectorHeight(v) - ccall((:mv_TempMultiVectorHeight, libHYPRE), HYPRE_Int, (Ptr{Cvoid},), v) + return @ccall libHYPRE.mv_TempMultiVectorHeight(v::Ptr{Cvoid})::HYPRE_Int end function mv_TempMultiVectorSetMask(v, mask) - ccall((:mv_TempMultiVectorSetMask, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{HYPRE_Int}), v, mask) + return @ccall libHYPRE.mv_TempMultiVectorSetMask(v::Ptr{Cvoid}, mask::Ptr{HYPRE_Int})::Cvoid end function mv_TempMultiVectorClear(arg1) - ccall((:mv_TempMultiVectorClear, libHYPRE), Cvoid, (Ptr{Cvoid},), arg1) + return @ccall libHYPRE.mv_TempMultiVectorClear(arg1::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorSetRandom(v, seed) - ccall((:mv_TempMultiVectorSetRandom, libHYPRE), Cvoid, (Ptr{Cvoid}, HYPRE_Int), v, seed) + return @ccall libHYPRE.mv_TempMultiVectorSetRandom(v::Ptr{Cvoid}, seed::HYPRE_Int)::Cvoid end function mv_TempMultiVectorCopy(src, dest) - ccall((:mv_TempMultiVectorCopy, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}), src, dest) + return @ccall libHYPRE.mv_TempMultiVectorCopy(src::Ptr{Cvoid}, dest::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorAxpy(arg1, arg2, arg3) - ccall((:mv_TempMultiVectorAxpy, libHYPRE), Cvoid, (HYPRE_Complex, Ptr{Cvoid}, Ptr{Cvoid}), arg1, arg2, arg3) + return @ccall libHYPRE.mv_TempMultiVectorAxpy(arg1::HYPRE_Complex, arg2::Ptr{Cvoid}, arg3::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorByMultiVector(arg1, arg2, gh, h, w, v) - ccall((:mv_TempMultiVectorByMultiVector, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Complex}), arg1, arg2, gh, h, w, v) + return @ccall libHYPRE.mv_TempMultiVectorByMultiVector(arg1::Ptr{Cvoid}, arg2::Ptr{Cvoid}, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Complex})::Cvoid end function mv_TempMultiVectorByMultiVectorDiag(x, y, mask, n, diag) - ccall((:mv_TempMultiVectorByMultiVectorDiag, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{HYPRE_Int}, HYPRE_Int, Ptr{HYPRE_Complex}), x, y, mask, n, diag) + return @ccall libHYPRE.mv_TempMultiVectorByMultiVectorDiag(x::Ptr{Cvoid}, y::Ptr{Cvoid}, mask::Ptr{HYPRE_Int}, n::HYPRE_Int, diag::Ptr{HYPRE_Complex})::Cvoid end function mv_TempMultiVectorByMatrix(arg1, gh, h, w, v, arg6) - ccall((:mv_TempMultiVectorByMatrix, libHYPRE), Cvoid, (Ptr{Cvoid}, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Complex}, Ptr{Cvoid}), arg1, gh, h, w, v, arg6) + return @ccall libHYPRE.mv_TempMultiVectorByMatrix(arg1::Ptr{Cvoid}, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Complex}, arg6::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorXapy(x, gh, h, w, v, y) - ccall((:mv_TempMultiVectorXapy, libHYPRE), Cvoid, (Ptr{Cvoid}, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Complex}, Ptr{Cvoid}), x, gh, h, w, v, y) + return @ccall libHYPRE.mv_TempMultiVectorXapy(x::Ptr{Cvoid}, gh::HYPRE_Int, h::HYPRE_Int, w::HYPRE_Int, v::Ptr{HYPRE_Complex}, y::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorByDiagonal(x, mask, n, diag, y) - ccall((:mv_TempMultiVectorByDiagonal, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{HYPRE_Int}, HYPRE_Int, Ptr{HYPRE_Complex}, Ptr{Cvoid}), x, mask, n, diag, y) + return @ccall libHYPRE.mv_TempMultiVectorByDiagonal(x::Ptr{Cvoid}, mask::Ptr{HYPRE_Int}, n::HYPRE_Int, diag::Ptr{HYPRE_Complex}, y::Ptr{Cvoid})::Cvoid end function mv_TempMultiVectorEval(f, par, x, y) - ccall((:mv_TempMultiVectorEval, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}), f, par, x, y) + return @ccall libHYPRE.mv_TempMultiVectorEval(f::Ptr{Cvoid}, par::Ptr{Cvoid}, x::Ptr{Cvoid}, y::Ptr{Cvoid})::Cvoid end struct HYPRE_MatvecFunctions @@ -1605,2078 +1618,2078 @@ struct HYPRE_MatvecFunctions end function HYPRE_LOBPCGCreate(interpreter, mvfunctions, solver) - ccall((:HYPRE_LOBPCGCreate, libHYPRE), HYPRE_Int, (Ptr{mv_InterfaceInterpreter}, Ptr{HYPRE_MatvecFunctions}, Ptr{HYPRE_Solver}), interpreter, mvfunctions, solver) + return @ccall libHYPRE.HYPRE_LOBPCGCreate(interpreter::Ptr{mv_InterfaceInterpreter}, mvfunctions::Ptr{HYPRE_MatvecFunctions}, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_LOBPCGDestroy(solver) - ccall((:HYPRE_LOBPCGDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_LOBPCGDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_LOBPCGSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_LOBPCGSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToSolverFcn, HYPRE_PtrToSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_LOBPCGSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToSolverFcn, precond_setup::HYPRE_PtrToSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_LOBPCGGetPrecond(solver, precond_data_ptr) - ccall((:HYPRE_LOBPCGGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data_ptr) + return @ccall libHYPRE.HYPRE_LOBPCGGetPrecond(solver::HYPRE_Solver, precond_data_ptr::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_LOBPCGSetup(solver, A, b, x) - ccall((:HYPRE_LOBPCGSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector, HYPRE_Vector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_LOBPCGSetup(solver::HYPRE_Solver, A::HYPRE_Matrix, b::HYPRE_Vector, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_LOBPCGSetupB(solver, B, x) - ccall((:HYPRE_LOBPCGSetupB, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector), solver, B, x) + return @ccall libHYPRE.HYPRE_LOBPCGSetupB(solver::HYPRE_Solver, B::HYPRE_Matrix, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_LOBPCGSetupT(solver, T, x) - ccall((:HYPRE_LOBPCGSetupT, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Matrix, HYPRE_Vector), solver, T, x) + return @ccall libHYPRE.HYPRE_LOBPCGSetupT(solver::HYPRE_Solver, T::HYPRE_Matrix, x::HYPRE_Vector)::HYPRE_Int end function HYPRE_LOBPCGSolve(solver, y, x, lambda) - ccall((:HYPRE_LOBPCGSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, mv_MultiVectorPtr, mv_MultiVectorPtr, Ptr{HYPRE_Real}), solver, y, x, lambda) + return @ccall libHYPRE.HYPRE_LOBPCGSolve(solver::HYPRE_Solver, y::mv_MultiVectorPtr, x::mv_MultiVectorPtr, lambda::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_LOBPCGSetTol(solver, tol) - ccall((:HYPRE_LOBPCGSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_LOBPCGSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_LOBPCGSetRTol(solver, tol) - ccall((:HYPRE_LOBPCGSetRTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_LOBPCGSetRTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_LOBPCGSetMaxIter(solver, max_iter) - ccall((:HYPRE_LOBPCGSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_LOBPCGSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_LOBPCGSetPrecondUsageMode(solver, mode) - ccall((:HYPRE_LOBPCGSetPrecondUsageMode, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, mode) + return @ccall libHYPRE.HYPRE_LOBPCGSetPrecondUsageMode(solver::HYPRE_Solver, mode::HYPRE_Int)::HYPRE_Int end function HYPRE_LOBPCGSetPrintLevel(solver, level) - ccall((:HYPRE_LOBPCGSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_LOBPCGSetPrintLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_LOBPCGResidualNorms(solver) - ccall((:HYPRE_LOBPCGResidualNorms, libHYPRE), Ptr{utilities_FortranMatrix}, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_LOBPCGResidualNorms(solver::HYPRE_Solver)::Ptr{utilities_FortranMatrix} end function HYPRE_LOBPCGResidualNormsHistory(solver) - ccall((:HYPRE_LOBPCGResidualNormsHistory, libHYPRE), Ptr{utilities_FortranMatrix}, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_LOBPCGResidualNormsHistory(solver::HYPRE_Solver)::Ptr{utilities_FortranMatrix} end function HYPRE_LOBPCGEigenvaluesHistory(solver) - ccall((:HYPRE_LOBPCGEigenvaluesHistory, libHYPRE), Ptr{utilities_FortranMatrix}, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_LOBPCGEigenvaluesHistory(solver::HYPRE_Solver)::Ptr{utilities_FortranMatrix} end function HYPRE_LOBPCGIterations(solver) - ccall((:HYPRE_LOBPCGIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_LOBPCGIterations(solver::HYPRE_Solver)::HYPRE_Int end function hypre_LOBPCGMultiOperatorB(data, x, y) - ccall((:hypre_LOBPCGMultiOperatorB, libHYPRE), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}), data, x, y) + return @ccall libHYPRE.hypre_LOBPCGMultiOperatorB(data::Ptr{Cvoid}, x::Ptr{Cvoid}, y::Ptr{Cvoid})::Cvoid end function lobpcg_MultiVectorByMultiVector(x, y, xy) - ccall((:lobpcg_MultiVectorByMultiVector, libHYPRE), Cvoid, (mv_MultiVectorPtr, mv_MultiVectorPtr, Ptr{utilities_FortranMatrix}), x, y, xy) + return @ccall libHYPRE.lobpcg_MultiVectorByMultiVector(x::mv_MultiVectorPtr, y::mv_MultiVectorPtr, xy::Ptr{utilities_FortranMatrix})::Cvoid end # typedef HYPRE_Int ( * HYPRE_PtrToParSolverFcn ) ( HYPRE_Solver , HYPRE_ParCSRMatrix , HYPRE_ParVector , HYPRE_ParVector ) const HYPRE_PtrToParSolverFcn = Ptr{Cvoid} function HYPRE_BoomerAMGCreate(solver) - ccall((:HYPRE_BoomerAMGCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_BoomerAMGCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_BoomerAMGDestroy(solver) - ccall((:HYPRE_BoomerAMGDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_BoomerAMGDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_BoomerAMGSetup(solver, A, b, x) - ccall((:HYPRE_BoomerAMGSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BoomerAMGSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_BoomerAMGSolve(solver, A, b, x) - ccall((:HYPRE_BoomerAMGSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BoomerAMGSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_BoomerAMGSolveT(solver, A, b, x) - ccall((:HYPRE_BoomerAMGSolveT, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BoomerAMGSolveT(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_BoomerAMGSetOldDefault(solver) - ccall((:HYPRE_BoomerAMGSetOldDefault, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_BoomerAMGSetOldDefault(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_BoomerAMGGetResidual(solver, residual) - ccall((:HYPRE_BoomerAMGGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_BoomerAMGGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_BoomerAMGGetNumIterations(solver, num_iterations) - ccall((:HYPRE_BoomerAMGGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_BoomerAMGGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BoomerAMGGetFinalRelativeResidualNorm(solver, rel_resid_norm) - ccall((:HYPRE_BoomerAMGGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, rel_resid_norm) + return @ccall libHYPRE.HYPRE_BoomerAMGGetFinalRelativeResidualNorm(solver::HYPRE_Solver, rel_resid_norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BoomerAMGSetNumFunctions(solver, num_functions) - ccall((:HYPRE_BoomerAMGSetNumFunctions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_functions) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumFunctions(solver::HYPRE_Solver, num_functions::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetDofFunc(solver, dof_func) - ccall((:HYPRE_BoomerAMGSetDofFunc, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, dof_func) + return @ccall libHYPRE.HYPRE_BoomerAMGSetDofFunc(solver::HYPRE_Solver, dof_func::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BoomerAMGSetConvergeType(solver, type) - ccall((:HYPRE_BoomerAMGSetConvergeType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetConvergeType(solver::HYPRE_Solver, type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetTol(solver, tol) - ccall((:HYPRE_BoomerAMGSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetMaxIter(solver, max_iter) - ccall((:HYPRE_BoomerAMGSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMinIter(solver, min_iter) - ccall((:HYPRE_BoomerAMGSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMaxCoarseSize(solver, max_coarse_size) - ccall((:HYPRE_BoomerAMGSetMaxCoarseSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_coarse_size) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMaxCoarseSize(solver::HYPRE_Solver, max_coarse_size::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMinCoarseSize(solver, min_coarse_size) - ccall((:HYPRE_BoomerAMGSetMinCoarseSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_coarse_size) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMinCoarseSize(solver::HYPRE_Solver, min_coarse_size::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMaxLevels(solver, max_levels) - ccall((:HYPRE_BoomerAMGSetMaxLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_levels) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMaxLevels(solver::HYPRE_Solver, max_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCoarsenCutFactor(solver, coarsen_cut_factor) - ccall((:HYPRE_BoomerAMGSetCoarsenCutFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, coarsen_cut_factor) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCoarsenCutFactor(solver::HYPRE_Solver, coarsen_cut_factor::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetStrongThreshold(solver, strong_threshold) - ccall((:HYPRE_BoomerAMGSetStrongThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, strong_threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetStrongThreshold(solver::HYPRE_Solver, strong_threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetStrongThresholdR(solver, strong_threshold) - ccall((:HYPRE_BoomerAMGSetStrongThresholdR, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, strong_threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetStrongThresholdR(solver::HYPRE_Solver, strong_threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetFilterThresholdR(solver, filter_threshold) - ccall((:HYPRE_BoomerAMGSetFilterThresholdR, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, filter_threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetFilterThresholdR(solver::HYPRE_Solver, filter_threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetSCommPkgSwitch(solver, S_commpkg_switch) - ccall((:HYPRE_BoomerAMGSetSCommPkgSwitch, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, S_commpkg_switch) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSCommPkgSwitch(solver::HYPRE_Solver, S_commpkg_switch::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetMaxRowSum(solver, max_row_sum) - ccall((:HYPRE_BoomerAMGSetMaxRowSum, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, max_row_sum) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMaxRowSum(solver::HYPRE_Solver, max_row_sum::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetCoarsenType(solver, coarsen_type) - ccall((:HYPRE_BoomerAMGSetCoarsenType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, coarsen_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCoarsenType(solver::HYPRE_Solver, coarsen_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNonGalerkinTol(solver, nongalerkin_tol) - ccall((:HYPRE_BoomerAMGSetNonGalerkinTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, nongalerkin_tol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNonGalerkinTol(solver::HYPRE_Solver, nongalerkin_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetLevelNonGalerkinTol(solver, nongalerkin_tol, level) - ccall((:HYPRE_BoomerAMGSetLevelNonGalerkinTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, nongalerkin_tol, level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetLevelNonGalerkinTol(solver::HYPRE_Solver, nongalerkin_tol::HYPRE_Real, level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNonGalerkTol(solver, nongalerk_num_tol, nongalerk_tol) - ccall((:HYPRE_BoomerAMGSetNonGalerkTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_Real}), solver, nongalerk_num_tol, nongalerk_tol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNonGalerkTol(solver::HYPRE_Solver, nongalerk_num_tol::HYPRE_Int, nongalerk_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BoomerAMGSetMeasureType(solver, measure_type) - ccall((:HYPRE_BoomerAMGSetMeasureType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, measure_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMeasureType(solver::HYPRE_Solver, measure_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAggNumLevels(solver, agg_num_levels) - ccall((:HYPRE_BoomerAMGSetAggNumLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_num_levels) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggNumLevels(solver::HYPRE_Solver, agg_num_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNumPaths(solver, num_paths) - ccall((:HYPRE_BoomerAMGSetNumPaths, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_paths) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumPaths(solver::HYPRE_Solver, num_paths::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCGCIts(solver, its) - ccall((:HYPRE_BoomerAMGSetCGCIts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, its) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCGCIts(solver::HYPRE_Solver, its::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNodal(solver, nodal) - ccall((:HYPRE_BoomerAMGSetNodal, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nodal) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNodal(solver::HYPRE_Solver, nodal::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNodalDiag(solver, nodal_diag) - ccall((:HYPRE_BoomerAMGSetNodalDiag, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nodal_diag) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNodalDiag(solver::HYPRE_Solver, nodal_diag::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetKeepSameSign(solver, keep_same_sign) - ccall((:HYPRE_BoomerAMGSetKeepSameSign, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, keep_same_sign) + return @ccall libHYPRE.HYPRE_BoomerAMGSetKeepSameSign(solver::HYPRE_Solver, keep_same_sign::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetInterpType(solver, interp_type) - ccall((:HYPRE_BoomerAMGSetInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, interp_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetInterpType(solver::HYPRE_Solver, interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetTruncFactor(solver, trunc_factor) - ccall((:HYPRE_BoomerAMGSetTruncFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, trunc_factor) + return @ccall libHYPRE.HYPRE_BoomerAMGSetTruncFactor(solver::HYPRE_Solver, trunc_factor::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetPMaxElmts(solver, P_max_elmts) - ccall((:HYPRE_BoomerAMGSetPMaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, P_max_elmts) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPMaxElmts(solver::HYPRE_Solver, P_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSepWeight(solver, sep_weight) - ccall((:HYPRE_BoomerAMGSetSepWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, sep_weight) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSepWeight(solver::HYPRE_Solver, sep_weight::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAggInterpType(solver, agg_interp_type) - ccall((:HYPRE_BoomerAMGSetAggInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_interp_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggInterpType(solver::HYPRE_Solver, agg_interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAggTruncFactor(solver, agg_trunc_factor) - ccall((:HYPRE_BoomerAMGSetAggTruncFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, agg_trunc_factor) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggTruncFactor(solver::HYPRE_Solver, agg_trunc_factor::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetAggP12TruncFactor(solver, agg_P12_trunc_factor) - ccall((:HYPRE_BoomerAMGSetAggP12TruncFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, agg_P12_trunc_factor) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggP12TruncFactor(solver::HYPRE_Solver, agg_P12_trunc_factor::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetAggPMaxElmts(solver, agg_P_max_elmts) - ccall((:HYPRE_BoomerAMGSetAggPMaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_P_max_elmts) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggPMaxElmts(solver::HYPRE_Solver, agg_P_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAggP12MaxElmts(solver, agg_P12_max_elmts) - ccall((:HYPRE_BoomerAMGSetAggP12MaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_P12_max_elmts) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAggP12MaxElmts(solver::HYPRE_Solver, agg_P12_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetInterpVectors(solver, num_vectors, interp_vectors) - ccall((:HYPRE_BoomerAMGSetInterpVectors, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_ParVector}), solver, num_vectors, interp_vectors) + return @ccall libHYPRE.HYPRE_BoomerAMGSetInterpVectors(solver::HYPRE_Solver, num_vectors::HYPRE_Int, interp_vectors::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_BoomerAMGSetInterpVecVariant(solver, var) - ccall((:HYPRE_BoomerAMGSetInterpVecVariant, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, var) + return @ccall libHYPRE.HYPRE_BoomerAMGSetInterpVecVariant(solver::HYPRE_Solver, var::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetInterpVecQMax(solver, q_max) - ccall((:HYPRE_BoomerAMGSetInterpVecQMax, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, q_max) + return @ccall libHYPRE.HYPRE_BoomerAMGSetInterpVecQMax(solver::HYPRE_Solver, q_max::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetInterpVecAbsQTrunc(solver, q_trunc) - ccall((:HYPRE_BoomerAMGSetInterpVecAbsQTrunc, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, q_trunc) + return @ccall libHYPRE.HYPRE_BoomerAMGSetInterpVecAbsQTrunc(solver::HYPRE_Solver, q_trunc::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetGSMG(solver, gsmg) - ccall((:HYPRE_BoomerAMGSetGSMG, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, gsmg) + return @ccall libHYPRE.HYPRE_BoomerAMGSetGSMG(solver::HYPRE_Solver, gsmg::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNumSamples(solver, num_samples) - ccall((:HYPRE_BoomerAMGSetNumSamples, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_samples) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumSamples(solver::HYPRE_Solver, num_samples::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCycleType(solver, cycle_type) - ccall((:HYPRE_BoomerAMGSetCycleType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cycle_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCycleType(solver::HYPRE_Solver, cycle_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetFCycle(solver, fcycle) - ccall((:HYPRE_BoomerAMGSetFCycle, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, fcycle) + return @ccall libHYPRE.HYPRE_BoomerAMGSetFCycle(solver::HYPRE_Solver, fcycle::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAdditive(solver, addlvl) - ccall((:HYPRE_BoomerAMGSetAdditive, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, addlvl) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAdditive(solver::HYPRE_Solver, addlvl::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMultAdditive(solver, addlvl) - ccall((:HYPRE_BoomerAMGSetMultAdditive, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, addlvl) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMultAdditive(solver::HYPRE_Solver, addlvl::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSimple(solver, addlvl) - ccall((:HYPRE_BoomerAMGSetSimple, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, addlvl) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSimple(solver::HYPRE_Solver, addlvl::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAddLastLvl(solver, add_last_lvl) - ccall((:HYPRE_BoomerAMGSetAddLastLvl, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, add_last_lvl) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAddLastLvl(solver::HYPRE_Solver, add_last_lvl::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetMultAddTruncFactor(solver, add_trunc_factor) - ccall((:HYPRE_BoomerAMGSetMultAddTruncFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, add_trunc_factor) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMultAddTruncFactor(solver::HYPRE_Solver, add_trunc_factor::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetMultAddPMaxElmts(solver, add_P_max_elmts) - ccall((:HYPRE_BoomerAMGSetMultAddPMaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, add_P_max_elmts) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMultAddPMaxElmts(solver::HYPRE_Solver, add_P_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAddRelaxType(solver, add_rlx_type) - ccall((:HYPRE_BoomerAMGSetAddRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, add_rlx_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAddRelaxType(solver::HYPRE_Solver, add_rlx_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetAddRelaxWt(solver, add_rlx_wt) - ccall((:HYPRE_BoomerAMGSetAddRelaxWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, add_rlx_wt) + return @ccall libHYPRE.HYPRE_BoomerAMGSetAddRelaxWt(solver::HYPRE_Solver, add_rlx_wt::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetSeqThreshold(solver, seq_threshold) - ccall((:HYPRE_BoomerAMGSetSeqThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, seq_threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSeqThreshold(solver::HYPRE_Solver, seq_threshold::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetRedundant(solver, redundant) - ccall((:HYPRE_BoomerAMGSetRedundant, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, redundant) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRedundant(solver::HYPRE_Solver, redundant::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetNumGridSweeps(solver, num_grid_sweeps) - ccall((:HYPRE_BoomerAMGSetNumGridSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_grid_sweeps) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumGridSweeps(solver::HYPRE_Solver, num_grid_sweeps::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BoomerAMGSetNumSweeps(solver, num_sweeps) - ccall((:HYPRE_BoomerAMGSetNumSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_sweeps) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumSweeps(solver::HYPRE_Solver, num_sweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCycleNumSweeps(solver, num_sweeps, k) - ccall((:HYPRE_BoomerAMGSetCycleNumSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int), solver, num_sweeps, k) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCycleNumSweeps(solver::HYPRE_Solver, num_sweeps::HYPRE_Int, k::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetGridRelaxType(solver, grid_relax_type) - ccall((:HYPRE_BoomerAMGSetGridRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, grid_relax_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetGridRelaxType(solver::HYPRE_Solver, grid_relax_type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BoomerAMGSetRelaxType(solver, relax_type) - ccall((:HYPRE_BoomerAMGSetRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRelaxType(solver::HYPRE_Solver, relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCycleRelaxType(solver, relax_type, k) - ccall((:HYPRE_BoomerAMGSetCycleRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int), solver, relax_type, k) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCycleRelaxType(solver::HYPRE_Solver, relax_type::HYPRE_Int, k::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetRelaxOrder(solver, relax_order) - ccall((:HYPRE_BoomerAMGSetRelaxOrder, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_order) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRelaxOrder(solver::HYPRE_Solver, relax_order::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetGridRelaxPoints(solver, grid_relax_points) - ccall((:HYPRE_BoomerAMGSetGridRelaxPoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Ptr{HYPRE_Int}}), solver, grid_relax_points) + return @ccall libHYPRE.HYPRE_BoomerAMGSetGridRelaxPoints(solver::HYPRE_Solver, grid_relax_points::Ptr{Ptr{HYPRE_Int}})::HYPRE_Int end function HYPRE_BoomerAMGSetRelaxWeight(solver, relax_weight) - ccall((:HYPRE_BoomerAMGSetRelaxWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, relax_weight) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRelaxWeight(solver::HYPRE_Solver, relax_weight::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BoomerAMGSetRelaxWt(solver, relax_weight) - ccall((:HYPRE_BoomerAMGSetRelaxWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, relax_weight) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRelaxWt(solver::HYPRE_Solver, relax_weight::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetLevelRelaxWt(solver, relax_weight, level) - ccall((:HYPRE_BoomerAMGSetLevelRelaxWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, relax_weight, level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetLevelRelaxWt(solver::HYPRE_Solver, relax_weight::HYPRE_Real, level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetOmega(solver, omega) - ccall((:HYPRE_BoomerAMGSetOmega, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, omega) + return @ccall libHYPRE.HYPRE_BoomerAMGSetOmega(solver::HYPRE_Solver, omega::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BoomerAMGSetOuterWt(solver, omega) - ccall((:HYPRE_BoomerAMGSetOuterWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, omega) + return @ccall libHYPRE.HYPRE_BoomerAMGSetOuterWt(solver::HYPRE_Solver, omega::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetLevelOuterWt(solver, omega, level) - ccall((:HYPRE_BoomerAMGSetLevelOuterWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, omega, level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetLevelOuterWt(solver::HYPRE_Solver, omega::HYPRE_Real, level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetChebyOrder(solver, order) - ccall((:HYPRE_BoomerAMGSetChebyOrder, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, order) + return @ccall libHYPRE.HYPRE_BoomerAMGSetChebyOrder(solver::HYPRE_Solver, order::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetChebyFraction(solver, ratio) - ccall((:HYPRE_BoomerAMGSetChebyFraction, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, ratio) + return @ccall libHYPRE.HYPRE_BoomerAMGSetChebyFraction(solver::HYPRE_Solver, ratio::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetChebyScale(solver, scale) - ccall((:HYPRE_BoomerAMGSetChebyScale, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, scale) + return @ccall libHYPRE.HYPRE_BoomerAMGSetChebyScale(solver::HYPRE_Solver, scale::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetChebyVariant(solver, variant) - ccall((:HYPRE_BoomerAMGSetChebyVariant, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, variant) + return @ccall libHYPRE.HYPRE_BoomerAMGSetChebyVariant(solver::HYPRE_Solver, variant::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetChebyEigEst(solver, eig_est) - ccall((:HYPRE_BoomerAMGSetChebyEigEst, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, eig_est) + return @ccall libHYPRE.HYPRE_BoomerAMGSetChebyEigEst(solver::HYPRE_Solver, eig_est::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSmoothType(solver, smooth_type) - ccall((:HYPRE_BoomerAMGSetSmoothType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, smooth_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSmoothType(solver::HYPRE_Solver, smooth_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSmoothNumLevels(solver, smooth_num_levels) - ccall((:HYPRE_BoomerAMGSetSmoothNumLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, smooth_num_levels) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSmoothNumLevels(solver::HYPRE_Solver, smooth_num_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSmoothNumSweeps(solver, smooth_num_sweeps) - ccall((:HYPRE_BoomerAMGSetSmoothNumSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, smooth_num_sweeps) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSmoothNumSweeps(solver::HYPRE_Solver, smooth_num_sweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetVariant(solver, variant) - ccall((:HYPRE_BoomerAMGSetVariant, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, variant) + return @ccall libHYPRE.HYPRE_BoomerAMGSetVariant(solver::HYPRE_Solver, variant::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetOverlap(solver, overlap) - ccall((:HYPRE_BoomerAMGSetOverlap, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, overlap) + return @ccall libHYPRE.HYPRE_BoomerAMGSetOverlap(solver::HYPRE_Solver, overlap::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetDomainType(solver, domain_type) - ccall((:HYPRE_BoomerAMGSetDomainType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, domain_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetDomainType(solver::HYPRE_Solver, domain_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSchwarzRlxWeight(solver, schwarz_rlx_weight) - ccall((:HYPRE_BoomerAMGSetSchwarzRlxWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, schwarz_rlx_weight) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSchwarzRlxWeight(solver::HYPRE_Solver, schwarz_rlx_weight::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetSchwarzUseNonSymm(solver, use_nonsymm) - ccall((:HYPRE_BoomerAMGSetSchwarzUseNonSymm, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, use_nonsymm) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSchwarzUseNonSymm(solver::HYPRE_Solver, use_nonsymm::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetSym(solver, sym) - ccall((:HYPRE_BoomerAMGSetSym, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, sym) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSym(solver::HYPRE_Solver, sym::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetLevel(solver, level) - ccall((:HYPRE_BoomerAMGSetLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetThreshold(solver, threshold) - ccall((:HYPRE_BoomerAMGSetThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetThreshold(solver::HYPRE_Solver, threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetFilter(solver, filter) - ccall((:HYPRE_BoomerAMGSetFilter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, filter) + return @ccall libHYPRE.HYPRE_BoomerAMGSetFilter(solver::HYPRE_Solver, filter::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetDropTol(solver, drop_tol) - ccall((:HYPRE_BoomerAMGSetDropTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, drop_tol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetDropTol(solver::HYPRE_Solver, drop_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetMaxNzPerRow(solver, max_nz_per_row) - ccall((:HYPRE_BoomerAMGSetMaxNzPerRow, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_nz_per_row) + return @ccall libHYPRE.HYPRE_BoomerAMGSetMaxNzPerRow(solver::HYPRE_Solver, max_nz_per_row::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetEuclidFile(solver, euclidfile) - ccall((:HYPRE_BoomerAMGSetEuclidFile, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cchar}), solver, euclidfile) + return @ccall libHYPRE.HYPRE_BoomerAMGSetEuclidFile(solver::HYPRE_Solver, euclidfile::Ptr{Cchar})::HYPRE_Int end function HYPRE_BoomerAMGSetEuLevel(solver, eu_level) - ccall((:HYPRE_BoomerAMGSetEuLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, eu_level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetEuLevel(solver::HYPRE_Solver, eu_level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetEuSparseA(solver, eu_sparse_A) - ccall((:HYPRE_BoomerAMGSetEuSparseA, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, eu_sparse_A) + return @ccall libHYPRE.HYPRE_BoomerAMGSetEuSparseA(solver::HYPRE_Solver, eu_sparse_A::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetEuBJ(solver, eu_bj) - ccall((:HYPRE_BoomerAMGSetEuBJ, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, eu_bj) + return @ccall libHYPRE.HYPRE_BoomerAMGSetEuBJ(solver::HYPRE_Solver, eu_bj::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetILUType(solver, ilu_type) - ccall((:HYPRE_BoomerAMGSetILUType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ilu_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetILUType(solver::HYPRE_Solver, ilu_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetILULevel(solver, ilu_lfil) - ccall((:HYPRE_BoomerAMGSetILULevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ilu_lfil) + return @ccall libHYPRE.HYPRE_BoomerAMGSetILULevel(solver::HYPRE_Solver, ilu_lfil::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetILUMaxRowNnz(solver, ilu_max_row_nnz) - ccall((:HYPRE_BoomerAMGSetILUMaxRowNnz, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ilu_max_row_nnz) + return @ccall libHYPRE.HYPRE_BoomerAMGSetILUMaxRowNnz(solver::HYPRE_Solver, ilu_max_row_nnz::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetILUMaxIter(solver, ilu_max_iter) - ccall((:HYPRE_BoomerAMGSetILUMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ilu_max_iter) + return @ccall libHYPRE.HYPRE_BoomerAMGSetILUMaxIter(solver::HYPRE_Solver, ilu_max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetILUDroptol(solver, ilu_droptol) - ccall((:HYPRE_BoomerAMGSetILUDroptol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, ilu_droptol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetILUDroptol(solver::HYPRE_Solver, ilu_droptol::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetRestriction(solver, restr_par) - ccall((:HYPRE_BoomerAMGSetRestriction, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, restr_par) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRestriction(solver::HYPRE_Solver, restr_par::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetIsTriangular(solver, is_triangular) - ccall((:HYPRE_BoomerAMGSetIsTriangular, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, is_triangular) + return @ccall libHYPRE.HYPRE_BoomerAMGSetIsTriangular(solver::HYPRE_Solver, is_triangular::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetGMRESSwitchR(solver, gmres_switch) - ccall((:HYPRE_BoomerAMGSetGMRESSwitchR, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, gmres_switch) + return @ccall libHYPRE.HYPRE_BoomerAMGSetGMRESSwitchR(solver::HYPRE_Solver, gmres_switch::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetADropTol(solver, A_drop_tol) - ccall((:HYPRE_BoomerAMGSetADropTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, A_drop_tol) + return @ccall libHYPRE.HYPRE_BoomerAMGSetADropTol(solver::HYPRE_Solver, A_drop_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetADropType(solver, A_drop_type) - ccall((:HYPRE_BoomerAMGSetADropType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, A_drop_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetADropType(solver::HYPRE_Solver, A_drop_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetPrintFileName(solver, print_file_name) - ccall((:HYPRE_BoomerAMGSetPrintFileName, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cchar}), solver, print_file_name) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPrintFileName(solver::HYPRE_Solver, print_file_name::Ptr{Cchar})::HYPRE_Int end function HYPRE_BoomerAMGSetPrintLevel(solver, print_level) - ccall((:HYPRE_BoomerAMGSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetLogging(solver, logging) - ccall((:HYPRE_BoomerAMGSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_BoomerAMGSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetDebugFlag(solver, debug_flag) - ccall((:HYPRE_BoomerAMGSetDebugFlag, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, debug_flag) + return @ccall libHYPRE.HYPRE_BoomerAMGSetDebugFlag(solver::HYPRE_Solver, debug_flag::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGInitGridRelaxation(num_grid_sweeps_ptr, grid_relax_type_ptr, grid_relax_points_ptr, coarsen_type, relax_weights_ptr, max_levels) - ccall((:HYPRE_BoomerAMGInitGridRelaxation, libHYPRE), HYPRE_Int, (Ptr{Ptr{HYPRE_Int}}, Ptr{Ptr{HYPRE_Int}}, Ptr{Ptr{Ptr{HYPRE_Int}}}, HYPRE_Int, Ptr{Ptr{HYPRE_Real}}, HYPRE_Int), num_grid_sweeps_ptr, grid_relax_type_ptr, grid_relax_points_ptr, coarsen_type, relax_weights_ptr, max_levels) + return @ccall libHYPRE.HYPRE_BoomerAMGInitGridRelaxation(num_grid_sweeps_ptr::Ptr{Ptr{HYPRE_Int}}, grid_relax_type_ptr::Ptr{Ptr{HYPRE_Int}}, grid_relax_points_ptr::Ptr{Ptr{Ptr{HYPRE_Int}}}, coarsen_type::HYPRE_Int, relax_weights_ptr::Ptr{Ptr{HYPRE_Real}}, max_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetRAP2(solver, rap2) - ccall((:HYPRE_BoomerAMGSetRAP2, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, rap2) + return @ccall libHYPRE.HYPRE_BoomerAMGSetRAP2(solver::HYPRE_Solver, rap2::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetModuleRAP2(solver, mod_rap2) - ccall((:HYPRE_BoomerAMGSetModuleRAP2, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, mod_rap2) + return @ccall libHYPRE.HYPRE_BoomerAMGSetModuleRAP2(solver::HYPRE_Solver, mod_rap2::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetKeepTranspose(solver, keepTranspose) - ccall((:HYPRE_BoomerAMGSetKeepTranspose, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, keepTranspose) + return @ccall libHYPRE.HYPRE_BoomerAMGSetKeepTranspose(solver::HYPRE_Solver, keepTranspose::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetPlotGrids(solver, plotgrids) - ccall((:HYPRE_BoomerAMGSetPlotGrids, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, plotgrids) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPlotGrids(solver::HYPRE_Solver, plotgrids::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetPlotFileName(solver, plotfilename) - ccall((:HYPRE_BoomerAMGSetPlotFileName, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cchar}), solver, plotfilename) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPlotFileName(solver::HYPRE_Solver, plotfilename::Ptr{Cchar})::HYPRE_Int end function HYPRE_BoomerAMGSetCoordDim(solver, coorddim) - ccall((:HYPRE_BoomerAMGSetCoordDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, coorddim) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCoordDim(solver::HYPRE_Solver, coorddim::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCoordinates(solver, coordinates) - ccall((:HYPRE_BoomerAMGSetCoordinates, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cfloat}), solver, coordinates) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCoordinates(solver::HYPRE_Solver, coordinates::Ptr{Cfloat})::HYPRE_Int end function HYPRE_BoomerAMGGetGridHierarchy(solver, cgrid) - ccall((:HYPRE_BoomerAMGGetGridHierarchy, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, cgrid) + return @ccall libHYPRE.HYPRE_BoomerAMGGetGridHierarchy(solver::HYPRE_Solver, cgrid::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_BoomerAMGSetCPoints(solver, cpt_coarse_level, num_cpt_coarse, cpt_coarse_index) - ccall((:HYPRE_BoomerAMGSetCPoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_BigInt}), solver, cpt_coarse_level, num_cpt_coarse, cpt_coarse_index) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCPoints(solver::HYPRE_Solver, cpt_coarse_level::HYPRE_Int, num_cpt_coarse::HYPRE_Int, cpt_coarse_index::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_BoomerAMGSetCpointsToKeep(solver, cpt_coarse_level, num_cpt_coarse, cpt_coarse_index) - ccall((:HYPRE_BoomerAMGSetCpointsToKeep, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_BigInt}), solver, cpt_coarse_level, num_cpt_coarse, cpt_coarse_index) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCpointsToKeep(solver::HYPRE_Solver, cpt_coarse_level::HYPRE_Int, num_cpt_coarse::HYPRE_Int, cpt_coarse_index::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_BoomerAMGSetFPoints(solver, num_fpt, fpt_index) - ccall((:HYPRE_BoomerAMGSetFPoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_BigInt}), solver, num_fpt, fpt_index) + return @ccall libHYPRE.HYPRE_BoomerAMGSetFPoints(solver::HYPRE_Solver, num_fpt::HYPRE_Int, fpt_index::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_BoomerAMGSetIsolatedFPoints(solver, num_isolated_fpt, isolated_fpt_index) - ccall((:HYPRE_BoomerAMGSetIsolatedFPoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_BigInt}), solver, num_isolated_fpt, isolated_fpt_index) + return @ccall libHYPRE.HYPRE_BoomerAMGSetIsolatedFPoints(solver::HYPRE_Solver, num_isolated_fpt::HYPRE_Int, isolated_fpt_index::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_BoomerAMGSetSabs(solver, Sabs) - ccall((:HYPRE_BoomerAMGSetSabs, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, Sabs) + return @ccall libHYPRE.HYPRE_BoomerAMGSetSabs(solver::HYPRE_Solver, Sabs::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDCreate(solver) - ccall((:HYPRE_BoomerAMGDDCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_BoomerAMGDDCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_BoomerAMGDDDestroy(solver) - ccall((:HYPRE_BoomerAMGDDDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_BoomerAMGDDDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_BoomerAMGDDSetup(solver, A, b, x) - ccall((:HYPRE_BoomerAMGDDSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_BoomerAMGDDSolve(solver, A, b, x) - ccall((:HYPRE_BoomerAMGDDSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_BoomerAMGDDSetFACNumRelax(solver, amgdd_fac_num_relax) - ccall((:HYPRE_BoomerAMGDDSetFACNumRelax, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, amgdd_fac_num_relax) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetFACNumRelax(solver::HYPRE_Solver, amgdd_fac_num_relax::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetFACNumCycles(solver, amgdd_fac_num_cycles) - ccall((:HYPRE_BoomerAMGDDSetFACNumCycles, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, amgdd_fac_num_cycles) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetFACNumCycles(solver::HYPRE_Solver, amgdd_fac_num_cycles::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetFACCycleType(solver, amgdd_fac_cycle_type) - ccall((:HYPRE_BoomerAMGDDSetFACCycleType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, amgdd_fac_cycle_type) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetFACCycleType(solver::HYPRE_Solver, amgdd_fac_cycle_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetFACRelaxType(solver, amgdd_fac_relax_type) - ccall((:HYPRE_BoomerAMGDDSetFACRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, amgdd_fac_relax_type) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetFACRelaxType(solver::HYPRE_Solver, amgdd_fac_relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetFACRelaxWeight(solver, amgdd_fac_relax_weight) - ccall((:HYPRE_BoomerAMGDDSetFACRelaxWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, amgdd_fac_relax_weight) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetFACRelaxWeight(solver::HYPRE_Solver, amgdd_fac_relax_weight::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGDDSetStartLevel(solver, start_level) - ccall((:HYPRE_BoomerAMGDDSetStartLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, start_level) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetStartLevel(solver::HYPRE_Solver, start_level::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetPadding(solver, padding) - ccall((:HYPRE_BoomerAMGDDSetPadding, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, padding) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetPadding(solver::HYPRE_Solver, padding::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetNumGhostLayers(solver, num_ghost_layers) - ccall((:HYPRE_BoomerAMGDDSetNumGhostLayers, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_ghost_layers) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetNumGhostLayers(solver::HYPRE_Solver, num_ghost_layers::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGDDSetUserFACRelaxation(solver, userFACRelaxation) - ccall((:HYPRE_BoomerAMGDDSetUserFACRelaxation, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cvoid}), solver, userFACRelaxation) + return @ccall libHYPRE.HYPRE_BoomerAMGDDSetUserFACRelaxation(solver::HYPRE_Solver, userFACRelaxation::Ptr{Cvoid})::HYPRE_Int end function HYPRE_BoomerAMGDDGetAMG(solver, amg_solver) - ccall((:HYPRE_BoomerAMGDDGetAMG, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, amg_solver) + return @ccall libHYPRE.HYPRE_BoomerAMGDDGetAMG(solver::HYPRE_Solver, amg_solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_BoomerAMGDDGetFinalRelativeResidualNorm(solver, rel_resid_norm) - ccall((:HYPRE_BoomerAMGDDGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, rel_resid_norm) + return @ccall libHYPRE.HYPRE_BoomerAMGDDGetFinalRelativeResidualNorm(solver::HYPRE_Solver, rel_resid_norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_BoomerAMGDDGetNumIterations(solver, num_iterations) - ccall((:HYPRE_BoomerAMGDDGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_BoomerAMGDDGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParaSailsCreate(comm, solver) - ccall((:HYPRE_ParaSailsCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParaSailsCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParaSailsDestroy(solver) - ccall((:HYPRE_ParaSailsDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParaSailsDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParaSailsSetup(solver, A, b, x) - ccall((:HYPRE_ParaSailsSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParaSailsSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParaSailsSolve(solver, A, b, x) - ccall((:HYPRE_ParaSailsSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParaSailsSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParaSailsSetParams(solver, thresh, nlevels) - ccall((:HYPRE_ParaSailsSetParams, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, thresh, nlevels) + return @ccall libHYPRE.HYPRE_ParaSailsSetParams(solver::HYPRE_Solver, thresh::HYPRE_Real, nlevels::HYPRE_Int)::HYPRE_Int end function HYPRE_ParaSailsSetFilter(solver, filter) - ccall((:HYPRE_ParaSailsSetFilter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, filter) + return @ccall libHYPRE.HYPRE_ParaSailsSetFilter(solver::HYPRE_Solver, filter::HYPRE_Real)::HYPRE_Int end function HYPRE_ParaSailsSetSym(solver, sym) - ccall((:HYPRE_ParaSailsSetSym, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, sym) + return @ccall libHYPRE.HYPRE_ParaSailsSetSym(solver::HYPRE_Solver, sym::HYPRE_Int)::HYPRE_Int end function HYPRE_ParaSailsSetLoadbal(solver, loadbal) - ccall((:HYPRE_ParaSailsSetLoadbal, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, loadbal) + return @ccall libHYPRE.HYPRE_ParaSailsSetLoadbal(solver::HYPRE_Solver, loadbal::HYPRE_Real)::HYPRE_Int end function HYPRE_ParaSailsSetReuse(solver, reuse) - ccall((:HYPRE_ParaSailsSetReuse, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, reuse) + return @ccall libHYPRE.HYPRE_ParaSailsSetReuse(solver::HYPRE_Solver, reuse::HYPRE_Int)::HYPRE_Int end function HYPRE_ParaSailsSetLogging(solver, logging) - ccall((:HYPRE_ParaSailsSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParaSailsSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParaSailsBuildIJMatrix(solver, pij_A) - ccall((:HYPRE_ParaSailsBuildIJMatrix, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_IJMatrix}), solver, pij_A) + return @ccall libHYPRE.HYPRE_ParaSailsBuildIJMatrix(solver::HYPRE_Solver, pij_A::Ptr{HYPRE_IJMatrix})::HYPRE_Int end function HYPRE_ParCSRParaSailsCreate(comm, solver) - ccall((:HYPRE_ParCSRParaSailsCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRParaSailsDestroy(solver) - ccall((:HYPRE_ParCSRParaSailsDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRParaSailsSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRParaSailsSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRParaSailsSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetParams(solver, thresh, nlevels) - ccall((:HYPRE_ParCSRParaSailsSetParams, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, thresh, nlevels) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetParams(solver::HYPRE_Solver, thresh::HYPRE_Real, nlevels::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetFilter(solver, filter) - ccall((:HYPRE_ParCSRParaSailsSetFilter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, filter) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetFilter(solver::HYPRE_Solver, filter::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetSym(solver, sym) - ccall((:HYPRE_ParCSRParaSailsSetSym, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, sym) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetSym(solver::HYPRE_Solver, sym::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetLoadbal(solver, loadbal) - ccall((:HYPRE_ParCSRParaSailsSetLoadbal, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, loadbal) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetLoadbal(solver::HYPRE_Solver, loadbal::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetReuse(solver, reuse) - ccall((:HYPRE_ParCSRParaSailsSetReuse, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, reuse) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetReuse(solver::HYPRE_Solver, reuse::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRParaSailsSetLogging(solver, logging) - ccall((:HYPRE_ParCSRParaSailsSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRParaSailsSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidCreate(comm, solver) - ccall((:HYPRE_EuclidCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_EuclidCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_EuclidDestroy(solver) - ccall((:HYPRE_EuclidDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_EuclidDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_EuclidSetup(solver, A, b, x) - ccall((:HYPRE_EuclidSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_EuclidSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_EuclidSolve(solver, A, b, x) - ccall((:HYPRE_EuclidSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_EuclidSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_EuclidSetParams(solver, argc, argv) - ccall((:HYPRE_EuclidSetParams, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{Ptr{Cchar}}), solver, argc, argv) + return @ccall libHYPRE.HYPRE_EuclidSetParams(solver::HYPRE_Solver, argc::HYPRE_Int, argv::Ptr{Ptr{Cchar}})::HYPRE_Int end function HYPRE_EuclidSetParamsFromFile(solver, filename) - ccall((:HYPRE_EuclidSetParamsFromFile, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Cchar}), solver, filename) + return @ccall libHYPRE.HYPRE_EuclidSetParamsFromFile(solver::HYPRE_Solver, filename::Ptr{Cchar})::HYPRE_Int end function HYPRE_EuclidSetLevel(solver, level) - ccall((:HYPRE_EuclidSetLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_EuclidSetLevel(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidSetBJ(solver, bj) - ccall((:HYPRE_EuclidSetBJ, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, bj) + return @ccall libHYPRE.HYPRE_EuclidSetBJ(solver::HYPRE_Solver, bj::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidSetStats(solver, eu_stats) - ccall((:HYPRE_EuclidSetStats, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, eu_stats) + return @ccall libHYPRE.HYPRE_EuclidSetStats(solver::HYPRE_Solver, eu_stats::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidSetMem(solver, eu_mem) - ccall((:HYPRE_EuclidSetMem, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, eu_mem) + return @ccall libHYPRE.HYPRE_EuclidSetMem(solver::HYPRE_Solver, eu_mem::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidSetSparseA(solver, sparse_A) - ccall((:HYPRE_EuclidSetSparseA, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, sparse_A) + return @ccall libHYPRE.HYPRE_EuclidSetSparseA(solver::HYPRE_Solver, sparse_A::HYPRE_Real)::HYPRE_Int end function HYPRE_EuclidSetRowScale(solver, row_scale) - ccall((:HYPRE_EuclidSetRowScale, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, row_scale) + return @ccall libHYPRE.HYPRE_EuclidSetRowScale(solver::HYPRE_Solver, row_scale::HYPRE_Int)::HYPRE_Int end function HYPRE_EuclidSetILUT(solver, drop_tol) - ccall((:HYPRE_EuclidSetILUT, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, drop_tol) + return @ccall libHYPRE.HYPRE_EuclidSetILUT(solver::HYPRE_Solver, drop_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRPilutCreate(comm, solver) - ccall((:HYPRE_ParCSRPilutCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRPilutCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRPilutDestroy(solver) - ccall((:HYPRE_ParCSRPilutDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRPilutDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRPilutSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRPilutSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRPilutSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRPilutSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRPilutSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRPilutSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRPilutSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRPilutSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRPilutSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPilutSetDropTolerance(solver, tol) - ccall((:HYPRE_ParCSRPilutSetDropTolerance, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRPilutSetDropTolerance(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRPilutSetFactorRowSize(solver, size) - ccall((:HYPRE_ParCSRPilutSetFactorRowSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, size) + return @ccall libHYPRE.HYPRE_ParCSRPilutSetFactorRowSize(solver::HYPRE_Solver, size::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPilutSetLogging(solver, logging) - ccall((:HYPRE_ParCSRPilutSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRPilutSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSCreate(solver) - ccall((:HYPRE_AMSCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_AMSCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_AMSDestroy(solver) - ccall((:HYPRE_AMSDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_AMSDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_AMSSetup(solver, A, b, x) - ccall((:HYPRE_AMSSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_AMSSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSSolve(solver, A, b, x) - ccall((:HYPRE_AMSSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_AMSSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSSetDimension(solver, dim) - ccall((:HYPRE_AMSSetDimension, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, dim) + return @ccall libHYPRE.HYPRE_AMSSetDimension(solver::HYPRE_Solver, dim::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetDiscreteGradient(solver, G) - ccall((:HYPRE_AMSSetDiscreteGradient, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix), solver, G) + return @ccall libHYPRE.HYPRE_AMSSetDiscreteGradient(solver::HYPRE_Solver, G::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_AMSSetCoordinateVectors(solver, x, y, z) - ccall((:HYPRE_AMSSetCoordinateVectors, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParVector, HYPRE_ParVector, HYPRE_ParVector), solver, x, y, z) + return @ccall libHYPRE.HYPRE_AMSSetCoordinateVectors(solver::HYPRE_Solver, x::HYPRE_ParVector, y::HYPRE_ParVector, z::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSSetEdgeConstantVectors(solver, Gx, Gy, Gz) - ccall((:HYPRE_AMSSetEdgeConstantVectors, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParVector, HYPRE_ParVector, HYPRE_ParVector), solver, Gx, Gy, Gz) + return @ccall libHYPRE.HYPRE_AMSSetEdgeConstantVectors(solver::HYPRE_Solver, Gx::HYPRE_ParVector, Gy::HYPRE_ParVector, Gz::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSSetInterpolations(solver, Pi, Pix, Piy, Piz) - ccall((:HYPRE_AMSSetInterpolations, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix), solver, Pi, Pix, Piy, Piz) + return @ccall libHYPRE.HYPRE_AMSSetInterpolations(solver::HYPRE_Solver, Pi::HYPRE_ParCSRMatrix, Pix::HYPRE_ParCSRMatrix, Piy::HYPRE_ParCSRMatrix, Piz::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_AMSSetAlphaPoissonMatrix(solver, A_alpha) - ccall((:HYPRE_AMSSetAlphaPoissonMatrix, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix), solver, A_alpha) + return @ccall libHYPRE.HYPRE_AMSSetAlphaPoissonMatrix(solver::HYPRE_Solver, A_alpha::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_AMSSetBetaPoissonMatrix(solver, A_beta) - ccall((:HYPRE_AMSSetBetaPoissonMatrix, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix), solver, A_beta) + return @ccall libHYPRE.HYPRE_AMSSetBetaPoissonMatrix(solver::HYPRE_Solver, A_beta::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_AMSSetInteriorNodes(solver, interior_nodes) - ccall((:HYPRE_AMSSetInteriorNodes, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParVector), solver, interior_nodes) + return @ccall libHYPRE.HYPRE_AMSSetInteriorNodes(solver::HYPRE_Solver, interior_nodes::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSSetProjectionFrequency(solver, projection_frequency) - ccall((:HYPRE_AMSSetProjectionFrequency, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, projection_frequency) + return @ccall libHYPRE.HYPRE_AMSSetProjectionFrequency(solver::HYPRE_Solver, projection_frequency::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetMaxIter(solver, maxit) - ccall((:HYPRE_AMSSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, maxit) + return @ccall libHYPRE.HYPRE_AMSSetMaxIter(solver::HYPRE_Solver, maxit::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetTol(solver, tol) - ccall((:HYPRE_AMSSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_AMSSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_AMSSetCycleType(solver, cycle_type) - ccall((:HYPRE_AMSSetCycleType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cycle_type) + return @ccall libHYPRE.HYPRE_AMSSetCycleType(solver::HYPRE_Solver, cycle_type::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetPrintLevel(solver, print_level) - ccall((:HYPRE_AMSSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_AMSSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetSmoothingOptions(solver, relax_type, relax_times, relax_weight, omega) - ccall((:HYPRE_AMSSetSmoothingOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Real), solver, relax_type, relax_times, relax_weight, omega) + return @ccall libHYPRE.HYPRE_AMSSetSmoothingOptions(solver::HYPRE_Solver, relax_type::HYPRE_Int, relax_times::HYPRE_Int, relax_weight::HYPRE_Real, omega::HYPRE_Real)::HYPRE_Int end function HYPRE_AMSSetAlphaAMGOptions(solver, alpha_coarsen_type, alpha_agg_levels, alpha_relax_type, alpha_strength_threshold, alpha_interp_type, alpha_Pmax) - ccall((:HYPRE_AMSSetAlphaAMGOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Int, HYPRE_Int), solver, alpha_coarsen_type, alpha_agg_levels, alpha_relax_type, alpha_strength_threshold, alpha_interp_type, alpha_Pmax) + return @ccall libHYPRE.HYPRE_AMSSetAlphaAMGOptions(solver::HYPRE_Solver, alpha_coarsen_type::HYPRE_Int, alpha_agg_levels::HYPRE_Int, alpha_relax_type::HYPRE_Int, alpha_strength_threshold::HYPRE_Real, alpha_interp_type::HYPRE_Int, alpha_Pmax::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetAlphaAMGCoarseRelaxType(solver, alpha_coarse_relax_type) - ccall((:HYPRE_AMSSetAlphaAMGCoarseRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, alpha_coarse_relax_type) + return @ccall libHYPRE.HYPRE_AMSSetAlphaAMGCoarseRelaxType(solver::HYPRE_Solver, alpha_coarse_relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetBetaAMGOptions(solver, beta_coarsen_type, beta_agg_levels, beta_relax_type, beta_strength_threshold, beta_interp_type, beta_Pmax) - ccall((:HYPRE_AMSSetBetaAMGOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Int, HYPRE_Int), solver, beta_coarsen_type, beta_agg_levels, beta_relax_type, beta_strength_threshold, beta_interp_type, beta_Pmax) + return @ccall libHYPRE.HYPRE_AMSSetBetaAMGOptions(solver::HYPRE_Solver, beta_coarsen_type::HYPRE_Int, beta_agg_levels::HYPRE_Int, beta_relax_type::HYPRE_Int, beta_strength_threshold::HYPRE_Real, beta_interp_type::HYPRE_Int, beta_Pmax::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSSetBetaAMGCoarseRelaxType(solver, beta_coarse_relax_type) - ccall((:HYPRE_AMSSetBetaAMGCoarseRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, beta_coarse_relax_type) + return @ccall libHYPRE.HYPRE_AMSSetBetaAMGCoarseRelaxType(solver::HYPRE_Solver, beta_coarse_relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_AMSGetNumIterations(solver, num_iterations) - ccall((:HYPRE_AMSGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_AMSGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_AMSGetFinalRelativeResidualNorm(solver, rel_resid_norm) - ccall((:HYPRE_AMSGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, rel_resid_norm) + return @ccall libHYPRE.HYPRE_AMSGetFinalRelativeResidualNorm(solver::HYPRE_Solver, rel_resid_norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_AMSProjectOutGradients(solver, x) - ccall((:HYPRE_AMSProjectOutGradients, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParVector), solver, x) + return @ccall libHYPRE.HYPRE_AMSProjectOutGradients(solver::HYPRE_Solver, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_AMSConstructDiscreteGradient(A, x_coord, edge_vertex, edge_orientation, G) - ccall((:HYPRE_AMSConstructDiscreteGradient, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, HYPRE_ParVector, Ptr{HYPRE_BigInt}, HYPRE_Int, Ptr{HYPRE_ParCSRMatrix}), A, x_coord, edge_vertex, edge_orientation, G) + return @ccall libHYPRE.HYPRE_AMSConstructDiscreteGradient(A::HYPRE_ParCSRMatrix, x_coord::HYPRE_ParVector, edge_vertex::Ptr{HYPRE_BigInt}, edge_orientation::HYPRE_Int, G::Ptr{HYPRE_ParCSRMatrix})::HYPRE_Int end function HYPRE_ADSCreate(solver) - ccall((:HYPRE_ADSCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_ADSCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ADSDestroy(solver) - ccall((:HYPRE_ADSDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ADSDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ADSSetup(solver, A, b, x) - ccall((:HYPRE_ADSSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ADSSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ADSSolve(solver, A, b, x) - ccall((:HYPRE_ADSSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ADSSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ADSSetDiscreteCurl(solver, C) - ccall((:HYPRE_ADSSetDiscreteCurl, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix), solver, C) + return @ccall libHYPRE.HYPRE_ADSSetDiscreteCurl(solver::HYPRE_Solver, C::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_ADSSetDiscreteGradient(solver, G) - ccall((:HYPRE_ADSSetDiscreteGradient, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix), solver, G) + return @ccall libHYPRE.HYPRE_ADSSetDiscreteGradient(solver::HYPRE_Solver, G::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_ADSSetCoordinateVectors(solver, x, y, z) - ccall((:HYPRE_ADSSetCoordinateVectors, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParVector, HYPRE_ParVector, HYPRE_ParVector), solver, x, y, z) + return @ccall libHYPRE.HYPRE_ADSSetCoordinateVectors(solver::HYPRE_Solver, x::HYPRE_ParVector, y::HYPRE_ParVector, z::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ADSSetInterpolations(solver, RT_Pi, RT_Pix, RT_Piy, RT_Piz, ND_Pi, ND_Pix, ND_Piy, ND_Piz) - ccall((:HYPRE_ADSSetInterpolations, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix, HYPRE_ParCSRMatrix), solver, RT_Pi, RT_Pix, RT_Piy, RT_Piz, ND_Pi, ND_Pix, ND_Piy, ND_Piz) + return @ccall libHYPRE.HYPRE_ADSSetInterpolations(solver::HYPRE_Solver, RT_Pi::HYPRE_ParCSRMatrix, RT_Pix::HYPRE_ParCSRMatrix, RT_Piy::HYPRE_ParCSRMatrix, RT_Piz::HYPRE_ParCSRMatrix, ND_Pi::HYPRE_ParCSRMatrix, ND_Pix::HYPRE_ParCSRMatrix, ND_Piy::HYPRE_ParCSRMatrix, ND_Piz::HYPRE_ParCSRMatrix)::HYPRE_Int end function HYPRE_ADSSetMaxIter(solver, maxit) - ccall((:HYPRE_ADSSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, maxit) + return @ccall libHYPRE.HYPRE_ADSSetMaxIter(solver::HYPRE_Solver, maxit::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSSetTol(solver, tol) - ccall((:HYPRE_ADSSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ADSSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ADSSetCycleType(solver, cycle_type) - ccall((:HYPRE_ADSSetCycleType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cycle_type) + return @ccall libHYPRE.HYPRE_ADSSetCycleType(solver::HYPRE_Solver, cycle_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSSetPrintLevel(solver, print_level) - ccall((:HYPRE_ADSSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ADSSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSSetSmoothingOptions(solver, relax_type, relax_times, relax_weight, omega) - ccall((:HYPRE_ADSSetSmoothingOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Real), solver, relax_type, relax_times, relax_weight, omega) + return @ccall libHYPRE.HYPRE_ADSSetSmoothingOptions(solver::HYPRE_Solver, relax_type::HYPRE_Int, relax_times::HYPRE_Int, relax_weight::HYPRE_Real, omega::HYPRE_Real)::HYPRE_Int end function HYPRE_ADSSetChebySmoothingOptions(solver, cheby_order, cheby_fraction) - ccall((:HYPRE_ADSSetChebySmoothingOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int), solver, cheby_order, cheby_fraction) + return @ccall libHYPRE.HYPRE_ADSSetChebySmoothingOptions(solver::HYPRE_Solver, cheby_order::HYPRE_Int, cheby_fraction::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSSetAMSOptions(solver, cycle_type, coarsen_type, agg_levels, relax_type, strength_threshold, interp_type, Pmax) - ccall((:HYPRE_ADSSetAMSOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Int, HYPRE_Int), solver, cycle_type, coarsen_type, agg_levels, relax_type, strength_threshold, interp_type, Pmax) + return @ccall libHYPRE.HYPRE_ADSSetAMSOptions(solver::HYPRE_Solver, cycle_type::HYPRE_Int, coarsen_type::HYPRE_Int, agg_levels::HYPRE_Int, relax_type::HYPRE_Int, strength_threshold::HYPRE_Real, interp_type::HYPRE_Int, Pmax::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSSetAMGOptions(solver, coarsen_type, agg_levels, relax_type, strength_threshold, interp_type, Pmax) - ccall((:HYPRE_ADSSetAMGOptions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Int, HYPRE_Int), solver, coarsen_type, agg_levels, relax_type, strength_threshold, interp_type, Pmax) + return @ccall libHYPRE.HYPRE_ADSSetAMGOptions(solver::HYPRE_Solver, coarsen_type::HYPRE_Int, agg_levels::HYPRE_Int, relax_type::HYPRE_Int, strength_threshold::HYPRE_Real, interp_type::HYPRE_Int, Pmax::HYPRE_Int)::HYPRE_Int end function HYPRE_ADSGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ADSGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ADSGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ADSGetFinalRelativeResidualNorm(solver, rel_resid_norm) - ccall((:HYPRE_ADSGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, rel_resid_norm) + return @ccall libHYPRE.HYPRE_ADSGetFinalRelativeResidualNorm(solver::HYPRE_Solver, rel_resid_norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRPCGCreate(comm, solver) - ccall((:HYPRE_ParCSRPCGCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRPCGCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRPCGDestroy(solver) - ccall((:HYPRE_ParCSRPCGDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRPCGDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRPCGSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRPCGSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRPCGSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRPCGSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRPCGSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRPCGSetTol(solver, tol) - ccall((:HYPRE_ParCSRPCGSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRPCGSetAbsoluteTol(solver, tol) - ccall((:HYPRE_ParCSRPCGSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetAbsoluteTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRPCGSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRPCGSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGSetStopCrit(solver, stop_crit) - ccall((:HYPRE_ParCSRPCGSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGSetTwoNorm(solver, two_norm) - ccall((:HYPRE_ParCSRPCGSetTwoNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, two_norm) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetTwoNorm(solver::HYPRE_Solver, two_norm::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGSetRelChange(solver, rel_change) - ccall((:HYPRE_ParCSRPCGSetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, rel_change) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetRelChange(solver::HYPRE_Solver, rel_change::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRPCGSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRPCGGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRPCGGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRPCGGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRPCGSetLogging(solver, logging) - ccall((:HYPRE_ParCSRPCGSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRPCGSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRPCGSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRPCGGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRPCGGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRPCGGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRPCGGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRPCGGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRPCGGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRPCGGetResidual(solver, residual) - ccall((:HYPRE_ParCSRPCGGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRPCGGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRDiagScaleSetup(solver, A, y, x) - ccall((:HYPRE_ParCSRDiagScaleSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, y, x) + return @ccall libHYPRE.HYPRE_ParCSRDiagScaleSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, y::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRDiagScale(solver, HA, Hy, Hx) - ccall((:HYPRE_ParCSRDiagScale, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, HA, Hy, Hx) + return @ccall libHYPRE.HYPRE_ParCSRDiagScale(solver::HYPRE_Solver, HA::HYPRE_ParCSRMatrix, Hy::HYPRE_ParVector, Hx::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSROnProcTriSetup(solver, HA, Hy, Hx) - ccall((:HYPRE_ParCSROnProcTriSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, HA, Hy, Hx) + return @ccall libHYPRE.HYPRE_ParCSROnProcTriSetup(solver::HYPRE_Solver, HA::HYPRE_ParCSRMatrix, Hy::HYPRE_ParVector, Hx::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSROnProcTriSolve(solver, HA, Hy, Hx) - ccall((:HYPRE_ParCSROnProcTriSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, HA, Hy, Hx) + return @ccall libHYPRE.HYPRE_ParCSROnProcTriSolve(solver::HYPRE_Solver, HA::HYPRE_ParCSRMatrix, Hy::HYPRE_ParVector, Hx::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRGMRESCreate(comm, solver) - ccall((:HYPRE_ParCSRGMRESCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRGMRESCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRGMRESDestroy(solver) - ccall((:HYPRE_ParCSRGMRESDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRGMRESDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRGMRESSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRGMRESSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_ParCSRGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESSetTol(solver, tol) - ccall((:HYPRE_ParCSRGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_ParCSRGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESSetStopCrit(solver, stop_crit) - ccall((:HYPRE_ParCSRGMRESSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRGMRESGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRGMRESGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRGMRESSetLogging(solver, logging) - ccall((:HYPRE_ParCSRGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRGMRESSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRGMRESGetResidual(solver, residual) - ccall((:HYPRE_ParCSRGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRCOGMRESCreate(comm, solver) - ccall((:HYPRE_ParCSRCOGMRESCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRCOGMRESDestroy(solver) - ccall((:HYPRE_ParCSRCOGMRESDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRCOGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRCOGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_ParCSRCOGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetUnroll(solver, unroll) - ccall((:HYPRE_ParCSRCOGMRESSetUnroll, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, unroll) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetUnroll(solver::HYPRE_Solver, unroll::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetCGS(solver, cgs) - ccall((:HYPRE_ParCSRCOGMRESSetCGS, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cgs) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetCGS(solver::HYPRE_Solver, cgs::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetTol(solver, tol) - ccall((:HYPRE_ParCSRCOGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_ParCSRCOGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRCOGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRCOGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRCOGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRCOGMRESGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRCOGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetLogging(solver, logging) - ccall((:HYPRE_ParCSRCOGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRCOGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCOGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRCOGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRCOGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRCOGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRCOGMRESGetResidual(solver, residual) - ccall((:HYPRE_ParCSRCOGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRCOGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESCreate(comm, solver) - ccall((:HYPRE_ParCSRFlexGMRESCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESDestroy(solver) - ccall((:HYPRE_ParCSRFlexGMRESDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRFlexGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRFlexGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_ParCSRFlexGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetTol(solver, tol) - ccall((:HYPRE_ParCSRFlexGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_ParCSRFlexGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRFlexGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRFlexGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRFlexGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRFlexGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetLogging(solver, logging) - ccall((:HYPRE_ParCSRFlexGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRFlexGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRFlexGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRFlexGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRFlexGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESGetResidual(solver, residual) - ccall((:HYPRE_ParCSRFlexGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRFlexGMRESSetModifyPC(solver, modify_pc) - ccall((:HYPRE_ParCSRFlexGMRESSetModifyPC, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToModifyPCFcn), solver, modify_pc) + return @ccall libHYPRE.HYPRE_ParCSRFlexGMRESSetModifyPC(solver::HYPRE_Solver, modify_pc::HYPRE_PtrToModifyPCFcn)::HYPRE_Int end function HYPRE_ParCSRLGMRESCreate(comm, solver) - ccall((:HYPRE_ParCSRLGMRESCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRLGMRESDestroy(solver) - ccall((:HYPRE_ParCSRLGMRESDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRLGMRESSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRLGMRESSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRLGMRESSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetKDim(solver, k_dim) - ccall((:HYPRE_ParCSRLGMRESSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetAugDim(solver, aug_dim) - ccall((:HYPRE_ParCSRLGMRESSetAugDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, aug_dim) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetAugDim(solver::HYPRE_Solver, aug_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetTol(solver, tol) - ccall((:HYPRE_ParCSRLGMRESSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_ParCSRLGMRESSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRLGMRESSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRLGMRESSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRLGMRESSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRLGMRESGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRLGMRESGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRLGMRESSetLogging(solver, logging) - ccall((:HYPRE_ParCSRLGMRESSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRLGMRESSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRLGMRESGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRLGMRESGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRLGMRESGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRLGMRESGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRLGMRESGetResidual(solver, residual) - ccall((:HYPRE_ParCSRLGMRESGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRLGMRESGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRBiCGSTABCreate(comm, solver) - ccall((:HYPRE_ParCSRBiCGSTABCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRBiCGSTABDestroy(solver) - ccall((:HYPRE_ParCSRBiCGSTABDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRBiCGSTABSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRBiCGSTABSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetTol(solver, tol) - ccall((:HYPRE_ParCSRBiCGSTABSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetAbsoluteTol(solver, a_tol) - ccall((:HYPRE_ParCSRBiCGSTABSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, a_tol) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetAbsoluteTol(solver::HYPRE_Solver, a_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRBiCGSTABSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRBiCGSTABSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetStopCrit(solver, stop_crit) - ccall((:HYPRE_ParCSRBiCGSTABSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRBiCGSTABSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRBiCGSTABGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetLogging(solver, logging) - ccall((:HYPRE_ParCSRBiCGSTABSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRBiCGSTABSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRBiCGSTABGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRBiCGSTABGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRBiCGSTABGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRBiCGSTABGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRBiCGSTABGetResidual(solver, residual) - ccall((:HYPRE_ParCSRBiCGSTABGetResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_ParVector}), solver, residual) + return @ccall libHYPRE.HYPRE_ParCSRBiCGSTABGetResidual(solver::HYPRE_Solver, residual::Ptr{HYPRE_ParVector})::HYPRE_Int end function HYPRE_ParCSRHybridCreate(solver) - ccall((:HYPRE_ParCSRHybridCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_ParCSRHybridCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRHybridDestroy(solver) - ccall((:HYPRE_ParCSRHybridDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRHybridDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRHybridSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRHybridSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRHybridSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRHybridSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRHybridSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRHybridSetTol(solver, tol) - ccall((:HYPRE_ParCSRHybridSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetAbsoluteTol(solver, tol) - ccall((:HYPRE_ParCSRHybridSetAbsoluteTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetAbsoluteTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetConvergenceTol(solver, cf_tol) - ccall((:HYPRE_ParCSRHybridSetConvergenceTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, cf_tol) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetConvergenceTol(solver::HYPRE_Solver, cf_tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetDSCGMaxIter(solver, dscg_max_its) - ccall((:HYPRE_ParCSRHybridSetDSCGMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, dscg_max_its) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetDSCGMaxIter(solver::HYPRE_Solver, dscg_max_its::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetPCGMaxIter(solver, pcg_max_its) - ccall((:HYPRE_ParCSRHybridSetPCGMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, pcg_max_its) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetPCGMaxIter(solver::HYPRE_Solver, pcg_max_its::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetSetupType(solver, setup_type) - ccall((:HYPRE_ParCSRHybridSetSetupType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, setup_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetSetupType(solver::HYPRE_Solver, setup_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetSolverType(solver, solver_type) - ccall((:HYPRE_ParCSRHybridSetSolverType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, solver_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetSolverType(solver::HYPRE_Solver, solver_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRecomputeResidual(solver, recompute_residual) - ccall((:HYPRE_ParCSRHybridSetRecomputeResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, recompute_residual) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRecomputeResidual(solver::HYPRE_Solver, recompute_residual::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridGetRecomputeResidual(solver, recompute_residual) - ccall((:HYPRE_ParCSRHybridGetRecomputeResidual, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, recompute_residual) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetRecomputeResidual(solver::HYPRE_Solver, recompute_residual::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridSetRecomputeResidualP(solver, recompute_residual_p) - ccall((:HYPRE_ParCSRHybridSetRecomputeResidualP, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, recompute_residual_p) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRecomputeResidualP(solver::HYPRE_Solver, recompute_residual_p::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridGetRecomputeResidualP(solver, recompute_residual_p) - ccall((:HYPRE_ParCSRHybridGetRecomputeResidualP, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, recompute_residual_p) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetRecomputeResidualP(solver::HYPRE_Solver, recompute_residual_p::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridSetKDim(solver, k_dim) - ccall((:HYPRE_ParCSRHybridSetKDim, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, k_dim) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetKDim(solver::HYPRE_Solver, k_dim::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetTwoNorm(solver, two_norm) - ccall((:HYPRE_ParCSRHybridSetTwoNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, two_norm) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetTwoNorm(solver::HYPRE_Solver, two_norm::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetStopCrit(solver, stop_crit) - ccall((:HYPRE_ParCSRHybridSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRelChange(solver, rel_change) - ccall((:HYPRE_ParCSRHybridSetRelChange, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, rel_change) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRelChange(solver::HYPRE_Solver, rel_change::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetPrecond(solver, precond, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRHybridSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRHybridSetLogging(solver, logging) - ccall((:HYPRE_ParCSRHybridSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetPrintLevel(solver, print_level) - ccall((:HYPRE_ParCSRHybridSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetStrongThreshold(solver, strong_threshold) - ccall((:HYPRE_ParCSRHybridSetStrongThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, strong_threshold) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetStrongThreshold(solver::HYPRE_Solver, strong_threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetMaxRowSum(solver, max_row_sum) - ccall((:HYPRE_ParCSRHybridSetMaxRowSum, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, max_row_sum) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetMaxRowSum(solver::HYPRE_Solver, max_row_sum::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetTruncFactor(solver, trunc_factor) - ccall((:HYPRE_ParCSRHybridSetTruncFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, trunc_factor) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetTruncFactor(solver::HYPRE_Solver, trunc_factor::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetPMaxElmts(solver, P_max_elmts) - ccall((:HYPRE_ParCSRHybridSetPMaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, P_max_elmts) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetPMaxElmts(solver::HYPRE_Solver, P_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetMaxLevels(solver, max_levels) - ccall((:HYPRE_ParCSRHybridSetMaxLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_levels) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetMaxLevels(solver::HYPRE_Solver, max_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetMeasureType(solver, measure_type) - ccall((:HYPRE_ParCSRHybridSetMeasureType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, measure_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetMeasureType(solver::HYPRE_Solver, measure_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetCoarsenType(solver, coarsen_type) - ccall((:HYPRE_ParCSRHybridSetCoarsenType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, coarsen_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetCoarsenType(solver::HYPRE_Solver, coarsen_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetInterpType(solver, interp_type) - ccall((:HYPRE_ParCSRHybridSetInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, interp_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetInterpType(solver::HYPRE_Solver, interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetCycleType(solver, cycle_type) - ccall((:HYPRE_ParCSRHybridSetCycleType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, cycle_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetCycleType(solver::HYPRE_Solver, cycle_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetGridRelaxType(solver, grid_relax_type) - ccall((:HYPRE_ParCSRHybridSetGridRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, grid_relax_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetGridRelaxType(solver::HYPRE_Solver, grid_relax_type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridSetGridRelaxPoints(solver, grid_relax_points) - ccall((:HYPRE_ParCSRHybridSetGridRelaxPoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{Ptr{HYPRE_Int}}), solver, grid_relax_points) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetGridRelaxPoints(solver::HYPRE_Solver, grid_relax_points::Ptr{Ptr{HYPRE_Int}})::HYPRE_Int end function HYPRE_ParCSRHybridSetNumSweeps(solver, num_sweeps) - ccall((:HYPRE_ParCSRHybridSetNumSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_sweeps) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNumSweeps(solver::HYPRE_Solver, num_sweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetCycleNumSweeps(solver, num_sweeps, k) - ccall((:HYPRE_ParCSRHybridSetCycleNumSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int), solver, num_sweeps, k) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetCycleNumSweeps(solver::HYPRE_Solver, num_sweeps::HYPRE_Int, k::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRelaxType(solver, relax_type) - ccall((:HYPRE_ParCSRHybridSetRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRelaxType(solver::HYPRE_Solver, relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetCycleRelaxType(solver, relax_type, k) - ccall((:HYPRE_ParCSRHybridSetCycleRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int), solver, relax_type, k) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetCycleRelaxType(solver::HYPRE_Solver, relax_type::HYPRE_Int, k::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRelaxOrder(solver, relax_order) - ccall((:HYPRE_ParCSRHybridSetRelaxOrder, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_order) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRelaxOrder(solver::HYPRE_Solver, relax_order::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRelaxWt(solver, relax_wt) - ccall((:HYPRE_ParCSRHybridSetRelaxWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, relax_wt) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRelaxWt(solver::HYPRE_Solver, relax_wt::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetLevelRelaxWt(solver, relax_wt, level) - ccall((:HYPRE_ParCSRHybridSetLevelRelaxWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, relax_wt, level) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetLevelRelaxWt(solver::HYPRE_Solver, relax_wt::HYPRE_Real, level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetOuterWt(solver, outer_wt) - ccall((:HYPRE_ParCSRHybridSetOuterWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, outer_wt) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetOuterWt(solver::HYPRE_Solver, outer_wt::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRHybridSetLevelOuterWt(solver, outer_wt, level) - ccall((:HYPRE_ParCSRHybridSetLevelOuterWt, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real, HYPRE_Int), solver, outer_wt, level) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetLevelOuterWt(solver::HYPRE_Solver, outer_wt::HYPRE_Real, level::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetMaxCoarseSize(solver, max_coarse_size) - ccall((:HYPRE_ParCSRHybridSetMaxCoarseSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_coarse_size) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetMaxCoarseSize(solver::HYPRE_Solver, max_coarse_size::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetMinCoarseSize(solver, min_coarse_size) - ccall((:HYPRE_ParCSRHybridSetMinCoarseSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_coarse_size) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetMinCoarseSize(solver::HYPRE_Solver, min_coarse_size::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetSeqThreshold(solver, seq_threshold) - ccall((:HYPRE_ParCSRHybridSetSeqThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, seq_threshold) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetSeqThreshold(solver::HYPRE_Solver, seq_threshold::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetRelaxWeight(solver, relax_weight) - ccall((:HYPRE_ParCSRHybridSetRelaxWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, relax_weight) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetRelaxWeight(solver::HYPRE_Solver, relax_weight::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRHybridSetOmega(solver, omega) - ccall((:HYPRE_ParCSRHybridSetOmega, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, omega) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetOmega(solver::HYPRE_Solver, omega::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRHybridSetAggNumLevels(solver, agg_num_levels) - ccall((:HYPRE_ParCSRHybridSetAggNumLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_num_levels) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetAggNumLevels(solver::HYPRE_Solver, agg_num_levels::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetAggInterpType(solver, agg_interp_type) - ccall((:HYPRE_ParCSRHybridSetAggInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, agg_interp_type) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetAggInterpType(solver::HYPRE_Solver, agg_interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetNumPaths(solver, num_paths) - ccall((:HYPRE_ParCSRHybridSetNumPaths, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_paths) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNumPaths(solver::HYPRE_Solver, num_paths::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetNumFunctions(solver, num_functions) - ccall((:HYPRE_ParCSRHybridSetNumFunctions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_functions) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNumFunctions(solver::HYPRE_Solver, num_functions::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetDofFunc(solver, dof_func) - ccall((:HYPRE_ParCSRHybridSetDofFunc, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, dof_func) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetDofFunc(solver::HYPRE_Solver, dof_func::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridSetNodal(solver, nodal) - ccall((:HYPRE_ParCSRHybridSetNodal, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nodal) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNodal(solver::HYPRE_Solver, nodal::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetKeepTranspose(solver, keepT) - ccall((:HYPRE_ParCSRHybridSetKeepTranspose, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, keepT) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetKeepTranspose(solver::HYPRE_Solver, keepT::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRHybridSetNonGalerkinTol(solver, num_levels, nongalerkin_tol) - ccall((:HYPRE_ParCSRHybridSetNonGalerkinTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_Real}), solver, num_levels, nongalerkin_tol) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNonGalerkinTol(solver::HYPRE_Solver, num_levels::HYPRE_Int, nongalerkin_tol::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRHybridGetNumIterations(solver, num_its) - ccall((:HYPRE_ParCSRHybridGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_its) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetNumIterations(solver::HYPRE_Solver, num_its::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridGetDSCGNumIterations(solver, dscg_num_its) - ccall((:HYPRE_ParCSRHybridGetDSCGNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, dscg_num_its) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetDSCGNumIterations(solver::HYPRE_Solver, dscg_num_its::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridGetPCGNumIterations(solver, pcg_num_its) - ccall((:HYPRE_ParCSRHybridGetPCGNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, pcg_num_its) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetPCGNumIterations(solver::HYPRE_Solver, pcg_num_its::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRHybridGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ParCSRHybridSetNumGridSweeps(solver, num_grid_sweeps) - ccall((:HYPRE_ParCSRHybridSetNumGridSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_grid_sweeps) + return @ccall libHYPRE.HYPRE_ParCSRHybridSetNumGridSweeps(solver::HYPRE_Solver, num_grid_sweeps::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRHybridGetSetupSolveTime(solver, time) - ccall((:HYPRE_ParCSRHybridGetSetupSolveTime, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, time) + return @ccall libHYPRE.HYPRE_ParCSRHybridGetSetupSolveTime(solver::HYPRE_Solver, time::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_SchwarzCreate(solver) - ccall((:HYPRE_SchwarzCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_SchwarzCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_SchwarzDestroy(solver) - ccall((:HYPRE_SchwarzDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_SchwarzDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_SchwarzSetup(solver, A, b, x) - ccall((:HYPRE_SchwarzSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_SchwarzSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_SchwarzSolve(solver, A, b, x) - ccall((:HYPRE_SchwarzSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_SchwarzSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_SchwarzSetVariant(solver, variant) - ccall((:HYPRE_SchwarzSetVariant, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, variant) + return @ccall libHYPRE.HYPRE_SchwarzSetVariant(solver::HYPRE_Solver, variant::HYPRE_Int)::HYPRE_Int end function HYPRE_SchwarzSetOverlap(solver, overlap) - ccall((:HYPRE_SchwarzSetOverlap, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, overlap) + return @ccall libHYPRE.HYPRE_SchwarzSetOverlap(solver::HYPRE_Solver, overlap::HYPRE_Int)::HYPRE_Int end function HYPRE_SchwarzSetDomainType(solver, domain_type) - ccall((:HYPRE_SchwarzSetDomainType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, domain_type) + return @ccall libHYPRE.HYPRE_SchwarzSetDomainType(solver::HYPRE_Solver, domain_type::HYPRE_Int)::HYPRE_Int end function HYPRE_SchwarzSetRelaxWeight(solver, relax_weight) - ccall((:HYPRE_SchwarzSetRelaxWeight, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, relax_weight) + return @ccall libHYPRE.HYPRE_SchwarzSetRelaxWeight(solver::HYPRE_Solver, relax_weight::HYPRE_Real)::HYPRE_Int end function HYPRE_SchwarzSetDomainStructure(solver, domain_structure) - ccall((:HYPRE_SchwarzSetDomainStructure, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_CSRMatrix), solver, domain_structure) + return @ccall libHYPRE.HYPRE_SchwarzSetDomainStructure(solver::HYPRE_Solver, domain_structure::HYPRE_CSRMatrix)::HYPRE_Int end function HYPRE_SchwarzSetNumFunctions(solver, num_functions) - ccall((:HYPRE_SchwarzSetNumFunctions, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_functions) + return @ccall libHYPRE.HYPRE_SchwarzSetNumFunctions(solver::HYPRE_Solver, num_functions::HYPRE_Int)::HYPRE_Int end function HYPRE_SchwarzSetDofFunc(solver, dof_func) - ccall((:HYPRE_SchwarzSetDofFunc, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, dof_func) + return @ccall libHYPRE.HYPRE_SchwarzSetDofFunc(solver::HYPRE_Solver, dof_func::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_SchwarzSetNonSymm(solver, use_nonsymm) - ccall((:HYPRE_SchwarzSetNonSymm, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, use_nonsymm) + return @ccall libHYPRE.HYPRE_SchwarzSetNonSymm(solver::HYPRE_Solver, use_nonsymm::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCGNRCreate(comm, solver) - ccall((:HYPRE_ParCSRCGNRCreate, libHYPRE), HYPRE_Int, (MPI_Comm, Ptr{HYPRE_Solver}), comm, solver) + return @ccall libHYPRE.HYPRE_ParCSRCGNRCreate(comm::MPI_Comm, solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRCGNRDestroy(solver) - ccall((:HYPRE_ParCSRCGNRDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ParCSRCGNRDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRCGNRSetup(solver, A, b, x) - ccall((:HYPRE_ParCSRCGNRSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRCGNRSolve(solver, A, b, x) - ccall((:HYPRE_ParCSRCGNRSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ParCSRCGNRSetTol(solver, tol) - ccall((:HYPRE_ParCSRCGNRSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ParCSRCGNRSetMinIter(solver, min_iter) - ccall((:HYPRE_ParCSRCGNRSetMinIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, min_iter) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetMinIter(solver::HYPRE_Solver, min_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCGNRSetMaxIter(solver, max_iter) - ccall((:HYPRE_ParCSRCGNRSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCGNRSetStopCrit(solver, stop_crit) - ccall((:HYPRE_ParCSRCGNRSetStopCrit, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, stop_crit) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetStopCrit(solver::HYPRE_Solver, stop_crit::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCGNRSetPrecond(solver, precond, precondT, precond_setup, precond_solver) - ccall((:HYPRE_ParCSRCGNRSetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, precond, precondT, precond_setup, precond_solver) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetPrecond(solver::HYPRE_Solver, precond::HYPRE_PtrToParSolverFcn, precondT::HYPRE_PtrToParSolverFcn, precond_setup::HYPRE_PtrToParSolverFcn, precond_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ParCSRCGNRGetPrecond(solver, precond_data) - ccall((:HYPRE_ParCSRCGNRGetPrecond, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Solver}), solver, precond_data) + return @ccall libHYPRE.HYPRE_ParCSRCGNRGetPrecond(solver::HYPRE_Solver, precond_data::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ParCSRCGNRSetLogging(solver, logging) - ccall((:HYPRE_ParCSRCGNRSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ParCSRCGNRSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRCGNRGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ParCSRCGNRGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ParCSRCGNRGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ParCSRCGNRGetFinalRelativeResidualNorm(solver, norm) - ccall((:HYPRE_ParCSRCGNRGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, norm) + return @ccall libHYPRE.HYPRE_ParCSRCGNRGetFinalRelativeResidualNorm(solver::HYPRE_Solver, norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_MGRCreate(solver) - ccall((:HYPRE_MGRCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_MGRCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_MGRDestroy(solver) - ccall((:HYPRE_MGRDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_MGRDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_MGRSetup(solver, A, b, x) - ccall((:HYPRE_MGRSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_MGRSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_MGRSolve(solver, A, b, x) - ccall((:HYPRE_MGRSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_MGRSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_MGRSetCpointsByContiguousBlock(solver, block_size, max_num_levels, idx_array, num_block_coarse_points, block_coarse_indexes) - ccall((:HYPRE_MGRSetCpointsByContiguousBlock, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_BigInt}, Ptr{HYPRE_Int}, Ptr{Ptr{HYPRE_Int}}), solver, block_size, max_num_levels, idx_array, num_block_coarse_points, block_coarse_indexes) + return @ccall libHYPRE.HYPRE_MGRSetCpointsByContiguousBlock(solver::HYPRE_Solver, block_size::HYPRE_Int, max_num_levels::HYPRE_Int, idx_array::Ptr{HYPRE_BigInt}, num_block_coarse_points::Ptr{HYPRE_Int}, block_coarse_indexes::Ptr{Ptr{HYPRE_Int}})::HYPRE_Int end function HYPRE_MGRSetCpointsByBlock(solver, block_size, max_num_levels, num_block_coarse_points, block_coarse_indexes) - ccall((:HYPRE_MGRSetCpointsByBlock, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{Ptr{HYPRE_Int}}), solver, block_size, max_num_levels, num_block_coarse_points, block_coarse_indexes) + return @ccall libHYPRE.HYPRE_MGRSetCpointsByBlock(solver::HYPRE_Solver, block_size::HYPRE_Int, max_num_levels::HYPRE_Int, num_block_coarse_points::Ptr{HYPRE_Int}, block_coarse_indexes::Ptr{Ptr{HYPRE_Int}})::HYPRE_Int end function HYPRE_MGRSetCpointsByPointMarkerArray(solver, block_size, max_num_levels, num_block_coarse_points, lvl_block_coarse_indexes, point_marker_array) - ccall((:HYPRE_MGRSetCpointsByPointMarkerArray, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Int}, Ptr{Ptr{HYPRE_Int}}, Ptr{HYPRE_Int}), solver, block_size, max_num_levels, num_block_coarse_points, lvl_block_coarse_indexes, point_marker_array) + return @ccall libHYPRE.HYPRE_MGRSetCpointsByPointMarkerArray(solver::HYPRE_Solver, block_size::HYPRE_Int, max_num_levels::HYPRE_Int, num_block_coarse_points::Ptr{HYPRE_Int}, lvl_block_coarse_indexes::Ptr{Ptr{HYPRE_Int}}, point_marker_array::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetNonCpointsToFpoints(solver, nonCptToFptFlag) - ccall((:HYPRE_MGRSetNonCpointsToFpoints, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nonCptToFptFlag) + return @ccall libHYPRE.HYPRE_MGRSetNonCpointsToFpoints(solver::HYPRE_Solver, nonCptToFptFlag::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetMaxCoarseLevels(solver, maxlev) - ccall((:HYPRE_MGRSetMaxCoarseLevels, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, maxlev) + return @ccall libHYPRE.HYPRE_MGRSetMaxCoarseLevels(solver::HYPRE_Solver, maxlev::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetBlockSize(solver, bsize) - ccall((:HYPRE_MGRSetBlockSize, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, bsize) + return @ccall libHYPRE.HYPRE_MGRSetBlockSize(solver::HYPRE_Solver, bsize::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetReservedCoarseNodes(solver, reserved_coarse_size, reserved_coarse_nodes) - ccall((:HYPRE_MGRSetReservedCoarseNodes, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int, Ptr{HYPRE_BigInt}), solver, reserved_coarse_size, reserved_coarse_nodes) + return @ccall libHYPRE.HYPRE_MGRSetReservedCoarseNodes(solver::HYPRE_Solver, reserved_coarse_size::HYPRE_Int, reserved_coarse_nodes::Ptr{HYPRE_BigInt})::HYPRE_Int end function HYPRE_MGRSetReservedCpointsLevelToKeep(solver, level) - ccall((:HYPRE_MGRSetReservedCpointsLevelToKeep, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, level) + return @ccall libHYPRE.HYPRE_MGRSetReservedCpointsLevelToKeep(solver::HYPRE_Solver, level::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetRelaxType(solver, relax_type) - ccall((:HYPRE_MGRSetRelaxType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_type) + return @ccall libHYPRE.HYPRE_MGRSetRelaxType(solver::HYPRE_Solver, relax_type::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetFRelaxMethod(solver, relax_method) - ccall((:HYPRE_MGRSetFRelaxMethod, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, relax_method) + return @ccall libHYPRE.HYPRE_MGRSetFRelaxMethod(solver::HYPRE_Solver, relax_method::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetLevelFRelaxMethod(solver, relax_method) - ccall((:HYPRE_MGRSetLevelFRelaxMethod, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, relax_method) + return @ccall libHYPRE.HYPRE_MGRSetLevelFRelaxMethod(solver::HYPRE_Solver, relax_method::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetCoarseGridMethod(solver, cg_method) - ccall((:HYPRE_MGRSetCoarseGridMethod, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, cg_method) + return @ccall libHYPRE.HYPRE_MGRSetCoarseGridMethod(solver::HYPRE_Solver, cg_method::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetLevelFRelaxNumFunctions(solver, num_functions) - ccall((:HYPRE_MGRSetLevelFRelaxNumFunctions, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_functions) + return @ccall libHYPRE.HYPRE_MGRSetLevelFRelaxNumFunctions(solver::HYPRE_Solver, num_functions::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetRestrictType(solver, restrict_type) - ccall((:HYPRE_MGRSetRestrictType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, restrict_type) + return @ccall libHYPRE.HYPRE_MGRSetRestrictType(solver::HYPRE_Solver, restrict_type::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetLevelRestrictType(solver, restrict_type) - ccall((:HYPRE_MGRSetLevelRestrictType, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, restrict_type) + return @ccall libHYPRE.HYPRE_MGRSetLevelRestrictType(solver::HYPRE_Solver, restrict_type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetNumRestrictSweeps(solver, nsweeps) - ccall((:HYPRE_MGRSetNumRestrictSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nsweeps) + return @ccall libHYPRE.HYPRE_MGRSetNumRestrictSweeps(solver::HYPRE_Solver, nsweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetInterpType(solver, interp_type) - ccall((:HYPRE_MGRSetInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, interp_type) + return @ccall libHYPRE.HYPRE_MGRSetInterpType(solver::HYPRE_Solver, interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetLevelInterpType(solver, interp_type) - ccall((:HYPRE_MGRSetLevelInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, interp_type) + return @ccall libHYPRE.HYPRE_MGRSetLevelInterpType(solver::HYPRE_Solver, interp_type::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRSetNumRelaxSweeps(solver, nsweeps) - ccall((:HYPRE_MGRSetNumRelaxSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nsweeps) + return @ccall libHYPRE.HYPRE_MGRSetNumRelaxSweeps(solver::HYPRE_Solver, nsweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetNumInterpSweeps(solver, nsweeps) - ccall((:HYPRE_MGRSetNumInterpSweeps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nsweeps) + return @ccall libHYPRE.HYPRE_MGRSetNumInterpSweeps(solver::HYPRE_Solver, nsweeps::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetFSolver(solver, fine_grid_solver_solve, fine_grid_solver_setup, fsolver) - ccall((:HYPRE_MGRSetFSolver, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, fine_grid_solver_solve, fine_grid_solver_setup, fsolver) + return @ccall libHYPRE.HYPRE_MGRSetFSolver(solver::HYPRE_Solver, fine_grid_solver_solve::HYPRE_PtrToParSolverFcn, fine_grid_solver_setup::HYPRE_PtrToParSolverFcn, fsolver::HYPRE_Solver)::HYPRE_Int end function HYPRE_MGRBuildAff(A, CF_marker, debug_flag, A_ff) - ccall((:HYPRE_MGRBuildAff, libHYPRE), HYPRE_Int, (HYPRE_ParCSRMatrix, Ptr{HYPRE_Int}, HYPRE_Int, Ptr{HYPRE_ParCSRMatrix}), A, CF_marker, debug_flag, A_ff) + return @ccall libHYPRE.HYPRE_MGRBuildAff(A::HYPRE_ParCSRMatrix, CF_marker::Ptr{HYPRE_Int}, debug_flag::HYPRE_Int, A_ff::Ptr{HYPRE_ParCSRMatrix})::HYPRE_Int end function HYPRE_MGRSetCoarseSolver(solver, coarse_grid_solver_solve, coarse_grid_solver_setup, coarse_grid_solver) - ccall((:HYPRE_MGRSetCoarseSolver, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_PtrToParSolverFcn, HYPRE_PtrToParSolverFcn, HYPRE_Solver), solver, coarse_grid_solver_solve, coarse_grid_solver_setup, coarse_grid_solver) + return @ccall libHYPRE.HYPRE_MGRSetCoarseSolver(solver::HYPRE_Solver, coarse_grid_solver_solve::HYPRE_PtrToParSolverFcn, coarse_grid_solver_setup::HYPRE_PtrToParSolverFcn, coarse_grid_solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_MGRSetPrintLevel(solver, print_level) - ccall((:HYPRE_MGRSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_MGRSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetFrelaxPrintLevel(solver, print_level) - ccall((:HYPRE_MGRSetFrelaxPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_MGRSetFrelaxPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetCoarseGridPrintLevel(solver, print_level) - ccall((:HYPRE_MGRSetCoarseGridPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_MGRSetCoarseGridPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetTruncateCoarseGridThreshold(solver, threshold) - ccall((:HYPRE_MGRSetTruncateCoarseGridThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, threshold) + return @ccall libHYPRE.HYPRE_MGRSetTruncateCoarseGridThreshold(solver::HYPRE_Solver, threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_MGRSetLogging(solver, logging) - ccall((:HYPRE_MGRSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_MGRSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetMaxIter(solver, max_iter) - ccall((:HYPRE_MGRSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_MGRSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetTol(solver, tol) - ccall((:HYPRE_MGRSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_MGRSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_MGRSetMaxGlobalsmoothIters(solver, smooth_iter) - ccall((:HYPRE_MGRSetMaxGlobalsmoothIters, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, smooth_iter) + return @ccall libHYPRE.HYPRE_MGRSetMaxGlobalsmoothIters(solver::HYPRE_Solver, smooth_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRSetGlobalsmoothType(solver, smooth_type) - ccall((:HYPRE_MGRSetGlobalsmoothType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, smooth_type) + return @ccall libHYPRE.HYPRE_MGRSetGlobalsmoothType(solver::HYPRE_Solver, smooth_type::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRGetNumIterations(solver, num_iterations) - ccall((:HYPRE_MGRGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_MGRGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_MGRGetCoarseGridConvergenceFactor(solver, conv_factor) - ccall((:HYPRE_MGRGetCoarseGridConvergenceFactor, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, conv_factor) + return @ccall libHYPRE.HYPRE_MGRGetCoarseGridConvergenceFactor(solver::HYPRE_Solver, conv_factor::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_MGRSetPMaxElmts(solver, P_max_elmts) - ccall((:HYPRE_MGRSetPMaxElmts, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, P_max_elmts) + return @ccall libHYPRE.HYPRE_MGRSetPMaxElmts(solver::HYPRE_Solver, P_max_elmts::HYPRE_Int)::HYPRE_Int end function HYPRE_MGRGetFinalRelativeResidualNorm(solver, res_norm) - ccall((:HYPRE_MGRGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, res_norm) + return @ccall libHYPRE.HYPRE_MGRGetFinalRelativeResidualNorm(solver::HYPRE_Solver, res_norm::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ILUCreate(solver) - ccall((:HYPRE_ILUCreate, libHYPRE), HYPRE_Int, (Ptr{HYPRE_Solver},), solver) + return @ccall libHYPRE.HYPRE_ILUCreate(solver::Ptr{HYPRE_Solver})::HYPRE_Int end function HYPRE_ILUDestroy(solver) - ccall((:HYPRE_ILUDestroy, libHYPRE), HYPRE_Int, (HYPRE_Solver,), solver) + return @ccall libHYPRE.HYPRE_ILUDestroy(solver::HYPRE_Solver)::HYPRE_Int end function HYPRE_ILUSetup(solver, A, b, x) - ccall((:HYPRE_ILUSetup, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ILUSetup(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ILUSolve(solver, A, b, x) - ccall((:HYPRE_ILUSolve, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector), solver, A, b, x) + return @ccall libHYPRE.HYPRE_ILUSolve(solver::HYPRE_Solver, A::HYPRE_ParCSRMatrix, b::HYPRE_ParVector, x::HYPRE_ParVector)::HYPRE_Int end function HYPRE_ILUSetMaxIter(solver, max_iter) - ccall((:HYPRE_ILUSetMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, max_iter) + return @ccall libHYPRE.HYPRE_ILUSetMaxIter(solver::HYPRE_Solver, max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetTol(solver, tol) - ccall((:HYPRE_ILUSetTol, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, tol) + return @ccall libHYPRE.HYPRE_ILUSetTol(solver::HYPRE_Solver, tol::HYPRE_Real)::HYPRE_Int end function HYPRE_ILUSetLevelOfFill(solver, lfil) - ccall((:HYPRE_ILUSetLevelOfFill, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, lfil) + return @ccall libHYPRE.HYPRE_ILUSetLevelOfFill(solver::HYPRE_Solver, lfil::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetMaxNnzPerRow(solver, nzmax) - ccall((:HYPRE_ILUSetMaxNnzPerRow, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, nzmax) + return @ccall libHYPRE.HYPRE_ILUSetMaxNnzPerRow(solver::HYPRE_Solver, nzmax::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetDropThreshold(solver, threshold) - ccall((:HYPRE_ILUSetDropThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, threshold) + return @ccall libHYPRE.HYPRE_ILUSetDropThreshold(solver::HYPRE_Solver, threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_ILUSetDropThresholdArray(solver, threshold) - ccall((:HYPRE_ILUSetDropThresholdArray, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, threshold) + return @ccall libHYPRE.HYPRE_ILUSetDropThresholdArray(solver::HYPRE_Solver, threshold::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ILUSetNSHDropThreshold(solver, threshold) - ccall((:HYPRE_ILUSetNSHDropThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, threshold) + return @ccall libHYPRE.HYPRE_ILUSetNSHDropThreshold(solver::HYPRE_Solver, threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_ILUSetNSHDropThresholdArray(solver, threshold) - ccall((:HYPRE_ILUSetNSHDropThresholdArray, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, threshold) + return @ccall libHYPRE.HYPRE_ILUSetNSHDropThresholdArray(solver::HYPRE_Solver, threshold::Ptr{HYPRE_Real})::HYPRE_Int end function HYPRE_ILUSetSchurMaxIter(solver, ss_max_iter) - ccall((:HYPRE_ILUSetSchurMaxIter, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ss_max_iter) + return @ccall libHYPRE.HYPRE_ILUSetSchurMaxIter(solver::HYPRE_Solver, ss_max_iter::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetType(solver, ilu_type) - ccall((:HYPRE_ILUSetType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, ilu_type) + return @ccall libHYPRE.HYPRE_ILUSetType(solver::HYPRE_Solver, ilu_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetLocalReordering(solver, reordering_type) - ccall((:HYPRE_ILUSetLocalReordering, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, reordering_type) + return @ccall libHYPRE.HYPRE_ILUSetLocalReordering(solver::HYPRE_Solver, reordering_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetPrintLevel(solver, print_level) - ccall((:HYPRE_ILUSetPrintLevel, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, print_level) + return @ccall libHYPRE.HYPRE_ILUSetPrintLevel(solver::HYPRE_Solver, print_level::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUSetLogging(solver, logging) - ccall((:HYPRE_ILUSetLogging, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, logging) + return @ccall libHYPRE.HYPRE_ILUSetLogging(solver::HYPRE_Solver, logging::HYPRE_Int)::HYPRE_Int end function HYPRE_ILUGetNumIterations(solver, num_iterations) - ccall((:HYPRE_ILUGetNumIterations, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Int}), solver, num_iterations) + return @ccall libHYPRE.HYPRE_ILUGetNumIterations(solver::HYPRE_Solver, num_iterations::Ptr{HYPRE_Int})::HYPRE_Int end function HYPRE_ILUGetFinalRelativeResidualNorm(solver, res_norm) - ccall((:HYPRE_ILUGetFinalRelativeResidualNorm, libHYPRE), HYPRE_Int, (HYPRE_Solver, Ptr{HYPRE_Real}), solver, res_norm) + return @ccall libHYPRE.HYPRE_ILUGetFinalRelativeResidualNorm(solver::HYPRE_Solver, res_norm::Ptr{HYPRE_Real})::HYPRE_Int end function GenerateLaplacian(comm, nx, ny, nz, P, Q, R, p, q, r, value) - ccall((:GenerateLaplacian, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Real}), comm, nx, ny, nz, P, Q, R, p, q, r, value) + return @ccall libHYPRE.GenerateLaplacian(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, value::Ptr{HYPRE_Real})::HYPRE_ParCSRMatrix end function GenerateLaplacian27pt(comm, nx, ny, nz, P, Q, R, p, q, r, value) - ccall((:GenerateLaplacian27pt, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Real}), comm, nx, ny, nz, P, Q, R, p, q, r, value) + return @ccall libHYPRE.GenerateLaplacian27pt(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, value::Ptr{HYPRE_Real})::HYPRE_ParCSRMatrix end function GenerateLaplacian9pt(comm, nx, ny, P, Q, p, q, value) - ccall((:GenerateLaplacian9pt, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Real}), comm, nx, ny, P, Q, p, q, value) + return @ccall libHYPRE.GenerateLaplacian9pt(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, value::Ptr{HYPRE_Real})::HYPRE_ParCSRMatrix end function GenerateDifConv(comm, nx, ny, nz, P, Q, R, p, q, r, value) - ccall((:GenerateDifConv, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, Ptr{HYPRE_Real}), comm, nx, ny, nz, P, Q, R, p, q, r, value) + return @ccall libHYPRE.GenerateDifConv(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, value::Ptr{HYPRE_Real})::HYPRE_ParCSRMatrix end function GenerateRotate7pt(comm, nx, ny, P, Q, p, q, alpha, eps) - ccall((:GenerateRotate7pt, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, HYPRE_Real), comm, nx, ny, P, Q, p, q, alpha, eps) + return @ccall libHYPRE.GenerateRotate7pt(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, alpha::HYPRE_Real, eps::HYPRE_Real)::HYPRE_ParCSRMatrix end function GenerateVarDifConv(comm, nx, ny, nz, P, Q, R, p, q, r, eps, rhs_ptr) - ccall((:GenerateVarDifConv, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, Ptr{HYPRE_ParVector}), comm, nx, ny, nz, P, Q, R, p, q, r, eps, rhs_ptr) + return @ccall libHYPRE.GenerateVarDifConv(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, eps::HYPRE_Real, rhs_ptr::Ptr{HYPRE_ParVector})::HYPRE_ParCSRMatrix end function GenerateRSVarDifConv(comm, nx, ny, nz, P, Q, R, p, q, r, eps, rhs_ptr, type) - ccall((:GenerateRSVarDifConv, libHYPRE), HYPRE_ParCSRMatrix, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real, Ptr{HYPRE_ParVector}, HYPRE_Int), comm, nx, ny, nz, P, Q, R, p, q, r, eps, rhs_ptr, type) + return @ccall libHYPRE.GenerateRSVarDifConv(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, eps::HYPRE_Real, rhs_ptr::Ptr{HYPRE_ParVector}, type::HYPRE_Int)::HYPRE_ParCSRMatrix end function GenerateCoordinates(comm, nx, ny, nz, P, Q, R, p, q, r, coorddim) - ccall((:GenerateCoordinates, libHYPRE), Ptr{Cfloat}, (MPI_Comm, HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int), comm, nx, ny, nz, P, Q, R, p, q, r, coorddim) + return @ccall libHYPRE.GenerateCoordinates(comm::MPI_Comm, nx::HYPRE_BigInt, ny::HYPRE_BigInt, nz::HYPRE_BigInt, P::HYPRE_Int, Q::HYPRE_Int, R::HYPRE_Int, p::HYPRE_Int, q::HYPRE_Int, r::HYPRE_Int, coorddim::HYPRE_Int)::Ptr{Cfloat} end function HYPRE_BoomerAMGSetPostInterpType(solver, post_interp_type) - ccall((:HYPRE_BoomerAMGSetPostInterpType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, post_interp_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetPostInterpType(solver::HYPRE_Solver, post_interp_type::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetJacobiTruncThreshold(solver, jacobi_trunc_threshold) - ccall((:HYPRE_BoomerAMGSetJacobiTruncThreshold, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, jacobi_trunc_threshold) + return @ccall libHYPRE.HYPRE_BoomerAMGSetJacobiTruncThreshold(solver::HYPRE_Solver, jacobi_trunc_threshold::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetNumCRRelaxSteps(solver, num_CR_relax_steps) - ccall((:HYPRE_BoomerAMGSetNumCRRelaxSteps, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, num_CR_relax_steps) + return @ccall libHYPRE.HYPRE_BoomerAMGSetNumCRRelaxSteps(solver::HYPRE_Solver, num_CR_relax_steps::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetCRRate(solver, CR_rate) - ccall((:HYPRE_BoomerAMGSetCRRate, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, CR_rate) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCRRate(solver::HYPRE_Solver, CR_rate::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetCRStrongTh(solver, CR_strong_th) - ccall((:HYPRE_BoomerAMGSetCRStrongTh, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Real), solver, CR_strong_th) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCRStrongTh(solver::HYPRE_Solver, CR_strong_th::HYPRE_Real)::HYPRE_Int end function HYPRE_BoomerAMGSetCRUseCG(solver, CR_use_CG) - ccall((:HYPRE_BoomerAMGSetCRUseCG, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, CR_use_CG) + return @ccall libHYPRE.HYPRE_BoomerAMGSetCRUseCG(solver::HYPRE_Solver, CR_use_CG::HYPRE_Int)::HYPRE_Int end function HYPRE_BoomerAMGSetISType(solver, IS_type) - ccall((:HYPRE_BoomerAMGSetISType, libHYPRE), HYPRE_Int, (HYPRE_Solver, HYPRE_Int), solver, IS_type) + return @ccall libHYPRE.HYPRE_BoomerAMGSetISType(solver::HYPRE_Solver, IS_type::HYPRE_Int)::HYPRE_Int end function HYPRE_ParCSRSetupInterpreter(i) - ccall((:HYPRE_ParCSRSetupInterpreter, libHYPRE), HYPRE_Int, (Ptr{mv_InterfaceInterpreter},), i) + return @ccall libHYPRE.HYPRE_ParCSRSetupInterpreter(i::Ptr{mv_InterfaceInterpreter})::HYPRE_Int end function HYPRE_ParCSRSetupMatvec(mv) - ccall((:HYPRE_ParCSRSetupMatvec, libHYPRE), HYPRE_Int, (Ptr{HYPRE_MatvecFunctions},), mv) + return @ccall libHYPRE.HYPRE_ParCSRSetupMatvec(mv::Ptr{HYPRE_MatvecFunctions})::HYPRE_Int end function HYPRE_ParCSRMultiVectorPrint(x_, fileName) - ccall((:HYPRE_ParCSRMultiVectorPrint, libHYPRE), HYPRE_Int, (Ptr{Cvoid}, Ptr{Cchar}), x_, fileName) + return @ccall libHYPRE.HYPRE_ParCSRMultiVectorPrint(x_::Ptr{Cvoid}, fileName::Ptr{Cchar})::HYPRE_Int end function HYPRE_ParCSRMultiVectorRead(comm, ii_, fileName) - ccall((:HYPRE_ParCSRMultiVectorRead, libHYPRE), Ptr{Cvoid}, (MPI_Comm, Ptr{Cvoid}, Ptr{Cchar}), comm, ii_, fileName) + return @ccall libHYPRE.HYPRE_ParCSRMultiVectorRead(comm::MPI_Comm, ii_::Ptr{Cvoid}, fileName::Ptr{Cchar})::Ptr{Cvoid} end const HYPRE_UNITIALIZED = -999 @@ -3744,4 +3757,3 @@ const HYPRE_ERROR_MEMORY = 2 const HYPRE_ERROR_ARG = 4 const HYPRE_ERROR_CONV = 256 - diff --git a/src/HYPRE.jl b/src/HYPRE.jl index 0d0b792..993fbd7 100644 --- a/src/HYPRE.jl +++ b/src/HYPRE.jl @@ -3,14 +3,9 @@ module HYPRE using MPI: MPI -using PartitionedArrays: IndexRange, MPIData, PSparseMatrix, PVector, PartitionedArrays, - SequentialData, map_parts -using SparseArrays: SparseArrays, AbstractSparseMatrixCSC, SparseMatrixCSC, nnz, nonzeros, nzrange, rowvals -using SparseMatricesCSR: SparseMatrixCSR, colvals, getrowptr export HYPREMatrix, HYPREVector - # Clang.jl auto-generated bindings and some manual methods include("LibHYPRE.jl") using .LibHYPRE @@ -29,7 +24,7 @@ initialized. **Note**: This function *must* be called before using HYPRE functions. """ -function Init(; finalize_atexit=true) +function Init(; finalize_atexit = true) if !(MPI.Initialized()) MPI.Init() end @@ -38,7 +33,12 @@ function Init(; finalize_atexit=true) if finalize_atexit # TODO: MPI only calls the finalizer if not exiting due to a Julia exeption. Does # the same reasoning apply here? - atexit(HYPRE_Finalize) + atexit() do + # Finalize any HYPRE objects that are still alive + foreach(finalize, keys(Internals.HYPRE_OBJECTS)) + # Finalize the library + HYPRE_Finalize() + end end return nothing end @@ -49,28 +49,43 @@ end ############### mutable struct HYPREMatrix # <: AbstractMatrix{HYPRE_Complex} - #= const =# comm::MPI.Comm - #= const =# ilower::HYPRE_BigInt - #= const =# iupper::HYPRE_BigInt - #= const =# jlower::HYPRE_BigInt - #= const =# jupper::HYPRE_BigInt + const comm::MPI.Comm + const ilower::HYPRE_BigInt + const iupper::HYPRE_BigInt + const jlower::HYPRE_BigInt + const jupper::HYPRE_BigInt ijmatrix::HYPRE_IJMatrix parmatrix::HYPRE_ParCSRMatrix end -function HYPREMatrix(comm::MPI.Comm, ilower::Integer, iupper::Integer, - jlower::Integer=ilower, jupper::Integer=iupper) +# Defining unsafe_convert enables ccall to automatically convert A::HYPREMatrix to +# HYPRE_IJMatrix and HYPRE_ParCSRMatrix while also making sure A won't be GC'd and +# finalized. +Base.unsafe_convert(::Type{HYPRE_IJMatrix}, A::HYPREMatrix) = A.ijmatrix +Base.unsafe_convert(::Type{HYPRE_ParCSRMatrix}, A::HYPREMatrix) = A.parmatrix + +function HYPREMatrix( + comm::MPI.Comm, + ilower::Integer, iupper::Integer, + jlower::Integer = ilower, jupper::Integer = iupper + ) # Create the IJ matrix A = HYPREMatrix(comm, ilower, iupper, jlower, jupper, C_NULL, C_NULL) ijmatrix_ref = Ref{HYPRE_IJMatrix}(C_NULL) @check HYPRE_IJMatrixCreate(comm, ilower, iupper, ilower, iupper, ijmatrix_ref) A.ijmatrix = ijmatrix_ref[] # Attach a finalizer - finalizer(x -> HYPRE_IJMatrixDestroy(x.ijmatrix), A) + finalizer(A) do x + if x.ijmatrix != C_NULL + HYPRE_IJMatrixDestroy(x) + x.ijmatrix = x.parmatrix = C_NULL + end + end + push!(Internals.HYPRE_OBJECTS, A => nothing) # Set storage type - @check HYPRE_IJMatrixSetObjectType(A.ijmatrix, HYPRE_PARCSR) + @check HYPRE_IJMatrixSetObjectType(A, HYPRE_PARCSR) # Initialize to make ready for setting values - @check HYPRE_IJMatrixInitialize(A.ijmatrix) + @check HYPRE_IJMatrixInitialize(A) return A end @@ -78,10 +93,10 @@ end # This should be called after setting all the values function Internals.assemble_matrix(A::HYPREMatrix) # Finalize after setting all values - @check HYPRE_IJMatrixAssemble(A.ijmatrix) + @check HYPRE_IJMatrixAssemble(A) # Fetch the assembled CSR matrix parmatrix_ref = Ref{Ptr{Cvoid}}(C_NULL) - @check HYPRE_IJMatrixGetObject(A.ijmatrix, parmatrix_ref) + @check HYPRE_IJMatrixGetObject(A, parmatrix_ref) A.parmatrix = convert(Ptr{HYPRE_ParCSRMatrix}, parmatrix_ref[]) return A end @@ -91,13 +106,18 @@ end ############### mutable struct HYPREVector # <: AbstractVector{HYPRE_Complex} - #= const =# comm::MPI.Comm - #= const =# ilower::HYPRE_BigInt - #= const =# iupper::HYPRE_BigInt + const comm::MPI.Comm + const ilower::HYPRE_BigInt + const iupper::HYPRE_BigInt ijvector::HYPRE_IJVector parvector::HYPRE_ParVector end +# Defining unsafe_convert enables ccall to automatically convert b::HYPREVector to +# HYPRE_IJVector and HYPRE_ParVector while also making sure b won't be GC'd and finalized. +Base.unsafe_convert(::Type{HYPRE_IJVector}, b::HYPREVector) = b.ijvector +Base.unsafe_convert(::Type{HYPRE_ParVector}, b::HYPREVector) = b.parvector + function HYPREVector(comm::MPI.Comm, ilower::Integer, iupper::Integer) # Create the IJ vector b = HYPREVector(comm, ilower, iupper, C_NULL, C_NULL) @@ -105,20 +125,26 @@ function HYPREVector(comm::MPI.Comm, ilower::Integer, iupper::Integer) @check HYPRE_IJVectorCreate(comm, ilower, iupper, ijvector_ref) b.ijvector = ijvector_ref[] # Attach a finalizer - finalizer(x -> HYPRE_IJVectorDestroy(x.ijvector), b) + finalizer(b) do x + if x.ijvector != C_NULL + HYPRE_IJVectorDestroy(x) + x.ijvector = x.parvector = C_NULL + end + end + push!(Internals.HYPRE_OBJECTS, b => nothing) # Set storage type - @check HYPRE_IJVectorSetObjectType(b.ijvector, HYPRE_PARCSR) + @check HYPRE_IJVectorSetObjectType(b, HYPRE_PARCSR) # Initialize to make ready for setting values - @check HYPRE_IJVectorInitialize(b.ijvector) + @check HYPRE_IJVectorInitialize(b) return b end function Internals.assemble_vector(b::HYPREVector) # Finalize after setting all values - @check HYPRE_IJVectorAssemble(b.ijvector) + @check HYPRE_IJVectorAssemble(b) # Fetch the assembled vector parvector_ref = Ref{Ptr{Cvoid}}(C_NULL) - @check HYPRE_IJVectorGetObject(b.ijvector, parvector_ref) + @check HYPRE_IJVectorGetObject(b, parvector_ref) b.parvector = convert(Ptr{HYPRE_ParVector}, parvector_ref[]) return b end @@ -126,7 +152,7 @@ end function Internals.get_proc_rows(b::HYPREVector) # ilower_ref = Ref{HYPRE_BigInt}() # iupper_ref = Ref{HYPRE_BigInt}() - # @check HYPRE_IJVectorGetLocalRange(b.ijvector, ilower_ref, iupper_ref) + # @check HYPRE_IJVectorGetLocalRange(b, ilower_ref, iupper_ref) # ilower = ilower_ref[] # iupper = iupper_ref[] # return ilower, iupper @@ -152,105 +178,24 @@ function Base.zero(b::HYPREVector) nvalues = jupper - jlower + 1 indices = collect(HYPRE_BigInt, jlower:jupper) values = zeros(HYPRE_Complex, nvalues) - @check HYPRE_IJVectorSetValues(x.ijvector, nvalues, indices, values) + @check HYPRE_IJVectorSetValues(x, nvalues, indices, values) # Finalize and return Internals.assemble_vector(x) return x end -###################################### -# SparseMatrixCS(C|R) -> HYPREMatrix # -###################################### + +######################### +# Vector -> HYPREVector # +######################### function Internals.check_n_rows(A, ilower, iupper) if size(A, 1) != (iupper - ilower + 1) throw(ArgumentError("number of rows in matrix does not match global start/end rows ilower and iupper")) end + return end -function Internals.to_hypre_data(A::SparseMatrixCSC, ilower, iupper) - Internals.check_n_rows(A, ilower, iupper) - nnz = SparseArrays.nnz(A) - A_rows = rowvals(A) - A_vals = nonzeros(A) - - # Initialize the data buffers HYPRE wants - nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows - ncols = zeros(HYPRE_Int, nrows) # Number of colums for each row - rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices - cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices - values = Vector{HYPRE_Complex}(undef, nnz) # The values - - # First pass to count nnz per row - @inbounds for j in 1:size(A, 2) - for i in nzrange(A, j) - row = A_rows[i] - ncols[row] += 1 - end - end - - # Keep track of the last index used for every row - lastinds = zeros(Int, nrows) - cumsum!((@view lastinds[2:end]), (@view ncols[1:end-1])) - - # Second pass to populate the output - @inbounds for j in 1:size(A, 2) - for i in nzrange(A, j) - row = A_rows[i] - k = lastinds[row] += 1 - val = A_vals[i] - cols[k] = j - values[k] = val - end - end - return nrows, ncols, rows, cols, values -end - -function Internals.to_hypre_data(A::SparseMatrixCSR, ilower, iupper) - Internals.check_n_rows(A, ilower, iupper) - nnz = SparseArrays.nnz(A) - A_cols = colvals(A) - A_vals = nonzeros(A) - - # Initialize the data buffers HYPRE wants - nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows - ncols = Vector{HYPRE_Int}(undef, nrows) # Number of colums for each row - rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices - cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices - values = Vector{HYPRE_Complex}(undef, nnz) # The values - - # Loop over the rows and collect all values - k = 0 - @inbounds for i in 1:size(A, 1) - nzr = nzrange(A, i) - ncols[i] = length(nzr) - for j in nzr - k += 1 - col = A_cols[j] - val = A_vals[j] - cols[k] = col - values[k] = val - end - end - @assert nnz == k - return nrows, ncols, rows, cols, values -end - -function HYPREMatrix(comm::MPI.Comm, B::Union{SparseMatrixCSC,SparseMatrixCSR}, ilower, iupper) - A = HYPREMatrix(comm, ilower, iupper) - nrows, ncols, rows, cols, values = Internals.to_hypre_data(B, ilower, iupper) - @check HYPRE_IJMatrixSetValues(A.ijmatrix, nrows, ncols, rows, cols, values) - Internals.assemble_matrix(A) - return A -end - -HYPREMatrix(B::Union{SparseMatrixCSC,SparseMatrixCSR}, ilower=1, iupper=size(B, 1)) = - HYPREMatrix(MPI.COMM_SELF, B, ilower, iupper) - -######################### -# Vector -> HYPREVector # -######################### - function Internals.to_hypre_data(x::Vector, ilower, iupper) Internals.check_n_rows(x, ilower, iupper) indices = collect(HYPRE_BigInt, ilower:iupper) @@ -262,13 +207,14 @@ end function HYPREVector(comm::MPI.Comm, x::Vector, ilower, iupper) b = HYPREVector(comm, ilower, iupper) nvalues, indices, values = Internals.to_hypre_data(x, ilower, iupper) - @check HYPRE_IJVectorSetValues(b.ijvector, nvalues, indices, values) + @check HYPRE_IJVectorSetValues(b, nvalues, indices, values) Internals.assemble_vector(b) return b end -HYPREVector(x::Vector, ilower=1, iupper=length(x)) = - HYPREVector(MPI.COMM_SELF, x, ilower, iupper) +function HYPREVector(x::Vector, ilower = 1, iupper = length(x)) + return HYPREVector(MPI.COMM_SELF, x, ilower, iupper) +end # TODO: Other eltypes could be support by using a intermediate buffer function Base.copy!(dst::Vector{HYPRE_Complex}, src::HYPREVector) @@ -278,7 +224,7 @@ function Base.copy!(dst::Vector{HYPRE_Complex}, src::HYPREVector) throw(ArgumentError("length of dst and src does not match")) end indices = collect(HYPRE_BigInt, ilower:iupper) - @check HYPRE_IJVectorGetValues(src.ijvector, nvalues, indices, dst) + @check HYPRE_IJVectorGetValues(src, nvalues, indices, dst) return dst end @@ -289,242 +235,187 @@ function Base.copy!(dst::HYPREVector, src::Vector{HYPRE_Complex}) throw(ArgumentError("length of dst and src does not match")) end # Re-initialize the vector - @check HYPRE_IJVectorInitialize(dst.ijvector) + @check HYPRE_IJVectorInitialize(dst) # Set all the values indices = collect(HYPRE_BigInt, ilower:iupper) - @check HYPRE_IJVectorSetValues(dst.ijvector, nvalues, indices, src) + @check HYPRE_IJVectorSetValues(dst, nvalues, indices, src) # TODO: It shouldn't be necessary to assemble here since we only set owned rows (?) - # @check HYPRE_IJVectorAssemble(dst.ijvector) + # @check HYPRE_IJVectorAssemble(dst) # TODO: Necessary to recreate the ParVector? Running some examples it seems like it is # not needed. return dst end -################################################## -# PartitionedArrays.PSparseMatrix -> HYPREMatrix # -################################################## - -# TODO: This has some duplicated code with to_hypre_data(::SparseMatrixCSC, ilower, iupper) -function Internals.to_hypre_data(A::SparseMatrixCSC, r::IndexRange, c::IndexRange) - @assert r.oid_to_lid isa UnitRange && r.oid_to_lid.start == 1 - - ilower = r.lid_to_gid[r.oid_to_lid.start] - iupper = r.lid_to_gid[r.oid_to_lid.stop] - a_rows = rowvals(A) - a_vals = nonzeros(A) - - # Initialize the data buffers HYPRE wants - nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows - ncols = zeros(HYPRE_Int, nrows) # Number of colums for each row - rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices - # cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices - # values = Vector{HYPRE_Complex}(undef, nnz) # The values - - # First pass to count nnz per row (note that the fact that columns are permuted - # doesn't matter for this pass) - a_rows = rowvals(A) - a_vals = nonzeros(A) - @inbounds for j in 1:size(A, 2) - for i in nzrange(A, j) - row = a_rows[i] - row > r.oid_to_lid.stop && continue # Skip ghost rows - # grow = r.lid_to_gid[lrow] - ncols[row] += 1 - end - end - # Initialize remaining buffers now that nnz is known - nnz = sum(ncols) - cols = Vector{HYPRE_BigInt}(undef, nnz) - values = Vector{HYPRE_Complex}(undef, nnz) - - # Keep track of the last index used for every row - lastinds = zeros(Int, nrows) - cumsum!((@view lastinds[2:end]), (@view ncols[1:end-1])) - - # Second pass to populate the output -- here we need to take care of the permutation - # of columns. TODO: Problem that they are not sorted? - @inbounds for j in 1:size(A, 2) - for i in nzrange(A, j) - row = a_rows[i] - row > r.oid_to_lid.stop && continue # Skip ghost rows - k = lastinds[row] += 1 - val = a_vals[i] - cols[k] = c.lid_to_gid[j] - values[k] = val - end - end - return nrows, ncols, rows, cols, values -end +#################### +## HYPREAssembler ## +#################### -# TODO: Possibly this can be optimized if it is possible to pass overlong vectors to HYPRE. -# At least values should be possible to directly share, but cols needs to translated -# to global ids. -function Internals.to_hypre_data(A::SparseMatrixCSR, r::IndexRange, c::IndexRange) - @assert r.oid_to_lid isa UnitRange && r.oid_to_lid.start == 1 - - ilower = r.lid_to_gid[r.oid_to_lid.start] - iupper = r.lid_to_gid[r.oid_to_lid.stop] - a_cols = colvals(A) - a_vals = nonzeros(A) - nnz = getrowptr(A)[r.oid_to_lid.stop + 1] - 1 - - # Initialize the data buffers HYPRE wants - nrows = HYPRE_Int(iupper - ilower + 1) # Total number of rows - ncols = zeros(HYPRE_Int, nrows) # Number of colums for each row - rows = collect(HYPRE_BigInt, ilower:iupper) # The row indices - cols = Vector{HYPRE_BigInt}(undef, nnz) # The column indices - values = Vector{HYPRE_Complex}(undef, nnz) # The values - - # Loop over the (owned) rows and collect all values - k = 0 - @inbounds for i in r.oid_to_lid - nzr = nzrange(A, i) - ncols[i] = length(nzr) - for j in nzr - k += 1 - col = a_cols[j] - val = a_vals[j] - cols[k] = c.lid_to_gid[col] - values[k] = val - end - end - @assert nnz == k - return nrows, ncols, rows, cols, values +struct HYPREMatrixAssembler + A::HYPREMatrix + ncols::Vector{HYPRE_Int} + rows::Vector{HYPRE_BigInt} + cols::Vector{HYPRE_BigInt} + values::Vector{HYPRE_Complex} end -function Internals.get_comm(A::Union{PSparseMatrix{<:Any,<:M}, PVector{<:Any,<:M}}) where M <: MPIData - return A.rows.partition.comm +struct HYPREVectorAssembler + b::HYPREVector + indices::Vector{HYPRE_BigInt} + values::Vector{HYPRE_Complex} end -Internals.get_comm(_::Union{PSparseMatrix,PVector}) = MPI.COMM_SELF -function Internals.get_proc_rows(A::Union{PSparseMatrix{<:Any,<:M}, PVector{<:Any,<:M}}) where M <: MPIData - r = A.rows.partition.part - ilower::HYPRE_BigInt = r.lid_to_gid[r.oid_to_lid[1]] - iupper::HYPRE_BigInt = r.lid_to_gid[r.oid_to_lid[end]] - return ilower, iupper +struct HYPREAssembler + A::HYPREMatrixAssembler + b::HYPREVectorAssembler end -function Internals.get_proc_rows(A::Union{PSparseMatrix{<:Any,<:S}, PVector{<:Any,<:S}}) where S <: SequentialData - ilower::HYPRE_BigInt = typemax(HYPRE_BigInt) - iupper::HYPRE_BigInt = typemin(HYPRE_BigInt) - for r in A.rows.partition.parts - ilower = min(r.lid_to_gid[r.oid_to_lid[1]], ilower) - iupper = max(r.lid_to_gid[r.oid_to_lid[end]], iupper) + +""" + HYPRE.start_assemble!(A::HYPREMatrix) -> HYPREMatrixAssembler + HYPRE.start_assemble!(b::HYPREVector) -> HYPREVectorAssembler + HYPRE.start_assemble!(A::HYPREMatrix, b::HYPREVector) -> HYPREAssembler + +Initialize a new assembly for matrix `A`, vector `b`, or for both. This zeroes out any +previous data in the arrays. Return a `HYPREAssembler` with allocated data buffers needed to +perform the assembly efficiently. + +See also: [`HYPRE.assemble!`](@ref), [`HYPRE.finish_assemble!`](@ref). +""" +start_assemble! + +function start_assemble!(A::HYPREMatrix) + if A.parmatrix != C_NULL + # This matrix have been assembled before, reset to 0 + @check HYPRE_IJMatrixSetConstantValues(A, 0) end - return ilower, iupper + @check HYPRE_IJMatrixInitialize(A) + return HYPREMatrixAssembler(A, HYPRE_Int[], HYPRE_BigInt[], HYPRE_BigInt[], HYPRE_Complex[]) end -function HYPREMatrix(B::PSparseMatrix) - # Use the same communicator as the matrix - comm = Internals.get_comm(B) - # Fetch rows owned by this process - ilower, iupper = Internals.get_proc_rows(B) - # Create the IJ matrix - A = HYPREMatrix(comm, ilower, iupper) - # Set all the values - map_parts(B.values, B.rows.partition, B.cols.partition) do Bv, Br, Bc - nrows, ncols, rows, cols, values = Internals.to_hypre_data(Bv, Br, Bc) - @check HYPRE_IJMatrixSetValues(A.ijmatrix, nrows, ncols, rows, cols, values) - return nothing +function start_assemble!(b::HYPREVector) + if b.parvector != C_NULL + # This vector have been assembled before, reset to 0 + # See https://github.com/hypre-space/hypre/pull/689 + # @check HYPRE_IJVectorSetConstantValues(b, 0) + end + @check HYPRE_IJVectorInitialize(b) + if b.parvector != C_NULL + nvalues = HYPRE_Int(b.iupper - b.ilower + 1) + indices = collect(HYPRE_BigInt, b.ilower:b.iupper) + values = zeros(HYPRE_Complex, nvalues) + @check HYPRE_IJVectorSetValues(b, nvalues, indices, values) + # TODO: Do I need to assemble here? end - # Finalize - Internals.assemble_matrix(A) + return HYPREVectorAssembler(b, HYPRE_BigInt[], HYPRE_Complex[]) +end + +function start_assemble!(A::HYPREMatrix, b::HYPREVector) + return HYPREAssembler(start_assemble!(A), start_assemble!(b)) +end + +""" + HYPRE.assemble!(A::HYPREMatrixAssembler, i, j, a::Matrix) + HYPRE.assemble!(A::HYPREVectorAssembler, i, b::Vector) + HYPRE.assemble!(A::HYPREAssembler, ij, a::Matrix, b::Vector) + +Assemble (by adding) matrix contribution `a`, vector contribution `b`, into the underlying +array(s) of the assembler at global row indices `i` and column indices `j`. + +This is roughly equivalent to: +```julia +# A.A::HYPREMatrix +A.A[i, j] += a + +# A.b::HYPREVector +A.b[i] += b +``` + +See also: [`HYPRE.start_assemble!`](@ref), [`HYPRE.finish_assemble!`](@ref). +""" +assemble! + +function assemble!(A::HYPREMatrixAssembler, i::Vector, j::Vector, a::Matrix) + nrows, ncols, rows, cols, values = Internals.to_hypre_data(A, a, i, j) + @check HYPRE_IJMatrixAddToValues(A.A, nrows, ncols, rows, cols, values) return A end +@deprecate assemble!(A::HYPREMatrixAssembler, ij::Vector, a::Matrix) assemble!(A, ij, ij, a) false -############################################ -# PartitionedArrays.PVector -> HYPREVector # -############################################ +function assemble!(A::HYPREVectorAssembler, ij::Vector, a::Vector) + nvalues, indices, values = Internals.to_hypre_data(A, a, ij) + @check HYPRE_IJVectorAddToValues(A.b, nvalues, indices, values) + return A +end -function HYPREVector(v::PVector) - # Use the same communicator as the matrix - comm = Internals.get_comm(v) - # Fetch rows owned by this process - ilower, iupper = Internals.get_proc_rows(v) - # Create the IJ vector - b = HYPREVector(comm, ilower, iupper) - # Set all the values - map_parts(v.values, v.owned_values, v.rows.partition) do _, vo, vr - ilower_part = vr.lid_to_gid[vr.oid_to_lid.start] - iupper_part = vr.lid_to_gid[vr.oid_to_lid.stop] - - # Option 1: Set all values - nvalues = HYPRE_Int(iupper_part - ilower_part + 1) - indices = collect(HYPRE_BigInt, ilower_part:iupper_part) - # TODO: Could probably just pass the full vector even if it is too long - # values = convert(Vector{HYPRE_Complex}, vv) - values = collect(HYPRE_Complex, vo) - - # # Option 2: Set only non-zeros - # indices = HYPRE_BigInt[] - # values = HYPRE_Complex[] - # for (i, vi) in zip(ilower_part:iupper_part, vo) - # if !iszero(vi) - # push!(indices, i) - # push!(values, vi) - # end - # end - # nvalues = length(indices) - - @check HYPRE_IJVectorSetValues(b.ijvector, nvalues, indices, values) - return nothing - end - # Finalize - Internals.assemble_vector(b) - return b +function assemble!(A::HYPREAssembler, ij::Vector, a::Matrix, b::Vector) + assemble!(A.A, ij, ij, a) + assemble!(A.b, ij, b) + return A end -function Internals.copy_check(dst::HYPREVector, src::PVector) - il_dst, iu_dst = Internals.get_proc_rows(dst) - il_src, iu_src = Internals.get_proc_rows(src) - if il_dst != il_src && iu_dst != iu_src - # TODO: Why require this? - throw(ArgumentError( - "row owner mismatch between dst ($(il_dst:iu_dst)) and src ($(il_dst:iu_dst))" - )) +function Internals.to_hypre_data(A::HYPREMatrixAssembler, a::Matrix, I::Vector, J::Vector) + size(a, 1) == length(I) || error("mismatching number of rows") + size(a, 2) == length(J) || error("mismatching number of cols") + nrows = HYPRE_Int(length(I)) + # Resize cache vectors + ncols = resize!(A.ncols, nrows) + rows = resize!(A.rows, nrows) + cols = resize!(A.cols, length(a)) + values = resize!(A.values, length(a)) + # Fill vectors + ncols = fill!(ncols, HYPRE_Int(length(J))) + copyto!(rows, I) + idx = 0 + for i in 1:length(I), j in 1:length(J) + idx += 1 + cols[idx] = J[j] + values[idx] = a[i, j] end + @assert idx == length(a) + @assert nrows == length(ncols) == length(rows) + return nrows, ncols, rows, cols, values end -# TODO: Other eltypes could be support by using a intermediate buffer -function Base.copy!(dst::PVector{HYPRE_Complex}, src::HYPREVector) - Internals.copy_check(src, dst) - map_parts(dst.values, dst.owned_values, dst.rows.partition) do vv, _, vr - il_src_part = vr.lid_to_gid[vr.oid_to_lid.start] - iu_src_part = vr.lid_to_gid[vr.oid_to_lid.stop] - nvalues = HYPRE_Int(iu_src_part - il_src_part + 1) - indices = collect(HYPRE_BigInt, il_src_part:iu_src_part) - - # Assumption: the dst vector is assembled, and should thus have 0s on the ghost - # entries (??). If this is not true, we must call fill!(vv, 0) here. This should be - # fairly cheap anyway, so might as well do it... - fill!(vv, 0) - - # TODO: Safe to use vv here? Owned values are always first? - @check HYPRE_IJVectorGetValues(src.ijvector, nvalues, indices, vv) - end - return dst +function Internals.to_hypre_data(A::HYPREVectorAssembler, b::Vector, I::Vector) + length(b) == length(I) || error("mismatching number of entries") + nvalues = HYPRE_Int(length(I)) + # Resize cache vectors + indices = resize!(A.indices, nvalues) + values = resize!(A.values, nvalues) + # Fill vectors + copyto!(indices, I) + copyto!(values, b) + return nvalues, indices, values end -function Base.copy!(dst::HYPREVector, src::PVector{HYPRE_Complex}) - Internals.copy_check(dst, src) - # Re-initialize the vector - @check HYPRE_IJVectorInitialize(dst.ijvector) - map_parts(src.values, src.owned_values, src.rows.partition) do vv, _, vr - ilower_src_part = vr.lid_to_gid[vr.oid_to_lid.start] - iupper_src_part = vr.lid_to_gid[vr.oid_to_lid.stop] - nvalues = HYPRE_Int(iupper_src_part - ilower_src_part + 1) - indices = collect(HYPRE_BigInt, ilower_src_part:iupper_src_part) - # TODO: Safe to use vv here? Owned values are always first? - @check HYPRE_IJVectorSetValues(dst.ijvector, nvalues, indices, vv) - end - # TODO: It shouldn't be necessary to assemble here since we only set owned rows (?) - # @check HYPRE_IJVectorAssemble(dst.ijvector) - # TODO: Necessary to recreate the ParVector? Running some examples it seems like it is - # not needed. - return dst +""" + HYPRE.finish_assemble!(A::HYPREMatrixAssembler) + HYPRE.finish_assemble!(A::HYPREVectorAssembler) + HYPRE.finish_assemble!(A::HYPREAssembler) + +Finish the assembly. This synchronizes the data between processors. +""" +finish_assemble! + +function finish_assemble!(A::HYPREMatrixAssembler) + Internals.assemble_matrix(A.A) + return A.A end -# Solver interface +function finish_assemble!(A::HYPREVectorAssembler) + Internals.assemble_vector(A.b) + return A.b +end + +function finish_assemble!(A::HYPREAssembler) + return finish_assemble!(A.A), finish_assemble!(A.b) +end + + +###################### +## Solver interface ## +###################### + include("solvers.jl") include("solver_options.jl") diff --git a/src/Internals.jl b/src/Internals.jl index 61b1738..2cf22c8 100644 --- a/src/Internals.jl +++ b/src/Internals.jl @@ -16,4 +16,6 @@ function setup_func end function solve_func end function to_hypre_data end +const HYPRE_OBJECTS = WeakKeyDict{Any, Nothing}() + end # module Internals diff --git a/src/LibHYPRE.jl b/src/LibHYPRE.jl index 0381ff9..e5ad7bf 100644 --- a/src/LibHYPRE.jl +++ b/src/LibHYPRE.jl @@ -80,7 +80,7 @@ macro check(arg) end # Export everything with HYPRE_ prefix -for name in names(@__MODULE__; all=true) +for name in names(@__MODULE__; all = true) if startswith(string(name), "HYPRE_") @eval export $name end @@ -92,6 +92,7 @@ function __init__() patch_ref = Ref{HYPRE_Int}(-1) @check HYPRE_VersionNumber(major_ref, minor_ref, patch_ref, C_NULL) global VERSION = VersionNumber(major_ref[], minor_ref[], patch_ref[]) + return end end diff --git a/src/precs.jl b/src/precs.jl index f105c88..8956ac7 100644 --- a/src/precs.jl +++ b/src/precs.jl @@ -28,7 +28,7 @@ function construct_boomeramg_prec_builder(settings_fun!; kwargs...) return BoomerAMGPrecBuilder(settings_fun!, kwargs) end -function (b::BoomerAMGPrecBuilder)(A::AbstractSparseMatrixCSC, p) +function (b::BoomerAMGPrecBuilder)(A, p) amg = HYPRE.BoomerAMG(; b.kwargs) settings_fun!(amg, A, p) return (BoomerAMGPrecWrapper(amg, A), I) diff --git a/src/solver_options.jl b/src/solver_options.jl index 2885d59..3e5429f 100644 --- a/src/solver_options.jl +++ b/src/solver_options.jl @@ -4,8 +4,7 @@ Internals.set_options(::HYPRESolver, kwargs) = nothing -function Internals.set_options(s::BiCGSTAB, kwargs) - solver = s.solver +function Internals.set_options(solver::BiCGSTAB, kwargs) for (k, v) in kwargs if k === :ConvergenceFactorTol @check HYPRE_BiCGSTABSetConvergenceFactorTol(solver, v) @@ -19,7 +18,7 @@ function Internals.set_options(s::BiCGSTAB, kwargs) @check HYPRE_ParCSRBiCGSTABSetMinIter(solver, v) elseif k === :Precond Internals.set_precond_defaults(v) - Internals.set_precond(s, v) + Internals.set_precond(solver, v) elseif k === :PrintLevel @check HYPRE_ParCSRBiCGSTABSetPrintLevel(solver, v) elseif k === :StopCrit @@ -30,10 +29,10 @@ function Internals.set_options(s::BiCGSTAB, kwargs) throw(ArgumentError("unknown option $k for HYPRE.BiCGSTAB")) end end + return end -function Internals.set_options(s::BoomerAMG, kwargs) - solver = s.solver +function Internals.set_options(solver::BoomerAMG, kwargs) for (k, v) in kwargs if k === :ADropTol @check HYPRE_BoomerAMGSetADropTol(solver, v) @@ -287,10 +286,10 @@ function Internals.set_options(s::BoomerAMG, kwargs) throw(ArgumentError("unknown option $k for HYPRE.BoomerAMG")) end end + return end -function Internals.set_options(s::FlexGMRES, kwargs) - solver = s.solver +function Internals.set_options(solver::FlexGMRES, kwargs) for (k, v) in kwargs if k === :ConvergenceFactorTol @check HYPRE_FlexGMRESSetConvergenceFactorTol(solver, v) @@ -308,7 +307,7 @@ function Internals.set_options(s::FlexGMRES, kwargs) @check HYPRE_ParCSRFlexGMRESSetModifyPC(solver, v) elseif k === :Precond Internals.set_precond_defaults(v) - Internals.set_precond(s, v) + Internals.set_precond(solver, v) elseif k === :PrintLevel @check HYPRE_ParCSRFlexGMRESSetPrintLevel(solver, v) elseif k === :Tol @@ -317,10 +316,10 @@ function Internals.set_options(s::FlexGMRES, kwargs) throw(ArgumentError("unknown option $k for HYPRE.FlexGMRES")) end end + return end -function Internals.set_options(s::GMRES, kwargs) - solver = s.solver +function Internals.set_options(solver::GMRES, kwargs) for (k, v) in kwargs if k === :ConvergenceFactorTol @check HYPRE_GMRESSetConvergenceFactorTol(solver, v) @@ -340,7 +339,7 @@ function Internals.set_options(s::GMRES, kwargs) @check HYPRE_ParCSRGMRESSetMinIter(solver, v) elseif k === :Precond Internals.set_precond_defaults(v) - Internals.set_precond(s, v) + Internals.set_precond(solver, v) elseif k === :PrintLevel @check HYPRE_ParCSRGMRESSetPrintLevel(solver, v) elseif k === :StopCrit @@ -351,10 +350,10 @@ function Internals.set_options(s::GMRES, kwargs) throw(ArgumentError("unknown option $k for HYPRE.GMRES")) end end + return end -function Internals.set_options(s::Hybrid, kwargs) - solver = s.solver +function Internals.set_options(solver::Hybrid, kwargs) for (k, v) in kwargs if k === :AbsoluteTol @check HYPRE_ParCSRHybridSetAbsoluteTol(solver, v) @@ -424,7 +423,7 @@ function Internals.set_options(s::Hybrid, kwargs) @check HYPRE_ParCSRHybridSetPMaxElmts(solver, v) elseif k === :Precond Internals.set_precond_defaults(v) - Internals.set_precond(s, v) + Internals.set_precond(solver, v) elseif k === :PrintLevel @check HYPRE_ParCSRHybridSetPrintLevel(solver, v) elseif k === :RecomputeResidual @@ -461,10 +460,10 @@ function Internals.set_options(s::Hybrid, kwargs) throw(ArgumentError("unknown option $k for HYPRE.Hybrid")) end end + return end -function Internals.set_options(s::ILU, kwargs) - solver = s.solver +function Internals.set_options(solver::ILU, kwargs) for (k, v) in kwargs if k === :DropThreshold @check HYPRE_ILUSetDropThreshold(solver, v) @@ -496,10 +495,10 @@ function Internals.set_options(s::ILU, kwargs) throw(ArgumentError("unknown option $k for HYPRE.ILU")) end end + return end -function Internals.set_options(s::ParaSails, kwargs) - solver = s.solver +function Internals.set_options(solver::ParaSails, kwargs) for (k, v) in kwargs if k === :Filter @check HYPRE_ParCSRParaSailsSetFilter(solver, v) @@ -517,10 +516,10 @@ function Internals.set_options(s::ParaSails, kwargs) throw(ArgumentError("unknown option $k for HYPRE.ParaSails")) end end + return end -function Internals.set_options(s::PCG, kwargs) - solver = s.solver +function Internals.set_options(solver::PCG, kwargs) for (k, v) in kwargs if k === :AbsoluteTolFactor @check HYPRE_PCGSetAbsoluteTolFactor(solver, v) @@ -540,7 +539,7 @@ function Internals.set_options(s::PCG, kwargs) @check HYPRE_ParCSRPCGSetMaxIter(solver, v) elseif k === :Precond Internals.set_precond_defaults(v) - Internals.set_precond(s, v) + Internals.set_precond(solver, v) elseif k === :PrintLevel @check HYPRE_ParCSRPCGSetPrintLevel(solver, v) elseif k === :RelChange @@ -555,4 +554,5 @@ function Internals.set_options(s::PCG, kwargs) throw(ArgumentError("unknown option $k for HYPRE.PCG")) end end + return end diff --git a/src/solvers.jl b/src/solvers.jl index e54a26e..340f8c2 100644 --- a/src/solvers.jl +++ b/src/solvers.jl @@ -7,16 +7,23 @@ Abstract super type of all the wrapped HYPRE solvers. """ abstract type HYPRESolver end -function Internals.safe_finalizer(Destroy) - # Only calls the Destroy if pointer not C_NULL - return function(solver) - if solver.solver != C_NULL - Destroy(solver.solver) - solver.solver = C_NULL +function Internals.safe_finalizer(Destroy, solver) + # Add the solver to object tracker for possible atexit finalizing + push!(Internals.HYPRE_OBJECTS, solver => nothing) + # Add a finalizer that only calls Destroy if pointer not C_NULL + finalizer(solver) do s + if s.solver != C_NULL + Destroy(s) + s.solver = C_NULL end end + return end +# Defining unsafe_convert enables ccall to automatically convert solver::HYPRESolver to +# HYPRE_Solver while also making sure solver won't be GC'd and finalized. +Base.unsafe_convert(::Type{HYPRE_Solver}, solver::HYPRESolver) = solver.solver + # Fallback for the solvers that doesn't have required defaults Internals.set_precond_defaults(::HYPRESolver) = nothing @@ -45,43 +52,6 @@ See also [`solve`](@ref). solve!(pcg::HYPRESolver, x::HYPREVector, A::HYPREMatrix, ::HYPREVector) -###################################### -# PartitionedArrays solver interface # -###################################### - -# TODO: Would it be useful with a method that copied the solution to b instead? - -function solve(solver::HYPRESolver, A::PSparseMatrix, b::PVector) - hypre_x = solve(solver, HYPREMatrix(A), HYPREVector(b)) - x = copy!(similar(b, HYPRE_Complex), hypre_x) - return x -end -function solve!(solver::HYPRESolver, x::PVector, A::PSparseMatrix, b::PVector) - hypre_x = HYPREVector(x) - solve!(solver, hypre_x, HYPREMatrix(A), HYPREVector(b)) - copy!(x, hypre_x) - return x -end - -######################################## -# SparseMatrixCS(C|R) solver interface # -######################################## - -# TODO: This could use the HYPRE compile flag for sequential mode to avoid MPI overhead - -function solve(solver::HYPRESolver, A::Union{SparseMatrixCSC,SparseMatrixCSR}, b::Vector) - hypre_x = solve(solver, HYPREMatrix(A), HYPREVector(b)) - x = copy!(similar(b, HYPRE_Complex), hypre_x) - return x -end -function solve!(solver::HYPRESolver, x::Vector, A::Union{SparseMatrixCSC,SparseMatrixCSR}, b::Vector) - hypre_x = HYPREVector(x) - solve!(solver, hypre_x, HYPREMatrix(A), HYPREVector(b)) - copy!(x, hypre_x) - return x -end - - ##################################### ## Concrete solver implementations ## ##################################### @@ -102,14 +72,15 @@ Create a `BiCGSTAB` solver. See HYPRE API reference for details and supported se mutable struct BiCGSTAB <: HYPRESolver comm::MPI.Comm solver::HYPRE_Solver - function BiCGSTAB(comm::MPI.Comm=MPI.COMM_NULL; kwargs...) + precond::Union{HYPRESolver, Nothing} + function BiCGSTAB(comm::MPI.Comm = MPI.COMM_NULL; kwargs...) # comm defaults to COMM_NULL since it is unused in HYPRE_ParCSRBiCGSTABCreate - solver = new(comm, C_NULL) + solver = new(comm, C_NULL, nothing) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRBiCGSTABCreate(comm, solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRBiCGSTABDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRBiCGSTABDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -119,8 +90,8 @@ end const ParCSRBiCGSTAB = BiCGSTAB function solve!(bicg::BiCGSTAB, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ParCSRBiCGSTABSetup(bicg.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ParCSRBiCGSTABSolve(bicg.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ParCSRBiCGSTABSetup(bicg, A, b, x) + @check HYPRE_ParCSRBiCGSTABSolve(bicg, A, b, x) return x end @@ -128,9 +99,10 @@ Internals.setup_func(::BiCGSTAB) = HYPRE_ParCSRBiCGSTABSetup Internals.solve_func(::BiCGSTAB) = HYPRE_ParCSRBiCGSTABSolve function Internals.set_precond(bicg::BiCGSTAB, p::HYPRESolver) + bicg.precond = p solve_f = Internals.solve_func(p) setup_f = Internals.setup_func(p) - @check HYPRE_ParCSRBiCGSTABSetPrecond(bicg.solver, solve_f, setup_f, p.solver) + @check HYPRE_ParCSRBiCGSTABSetPrecond(bicg, solve_f, setup_f, p) return nothing end @@ -157,7 +129,7 @@ mutable struct BoomerAMG <: HYPRESolver @check HYPRE_BoomerAMGCreate(solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_BoomerAMGDestroy), solver) + Internals.safe_finalizer(HYPRE_BoomerAMGDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -165,8 +137,8 @@ mutable struct BoomerAMG <: HYPRESolver end function solve!(amg::BoomerAMG, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_BoomerAMGSetup(amg.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_BoomerAMGSolve(amg.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_BoomerAMGSetup(amg, A, b, x) + @check HYPRE_BoomerAMGSolve(amg, A, b, x) return x end @@ -195,14 +167,15 @@ Create a `FlexGMRES` solver. See HYPRE API reference for details and supported s mutable struct FlexGMRES <: HYPRESolver comm::MPI.Comm solver::HYPRE_Solver - function FlexGMRES(comm::MPI.Comm=MPI.COMM_NULL; kwargs...) + precond::Union{HYPRESolver, Nothing} + function FlexGMRES(comm::MPI.Comm = MPI.COMM_NULL; kwargs...) # comm defaults to COMM_NULL since it is unused in HYPRE_ParCSRFlexGMRESCreate - solver = new(comm, C_NULL) + solver = new(comm, C_NULL, nothing) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRFlexGMRESCreate(comm, solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRFlexGMRESDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRFlexGMRESDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -210,8 +183,8 @@ mutable struct FlexGMRES <: HYPRESolver end function solve!(flex::FlexGMRES, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ParCSRFlexGMRESSetup(flex.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ParCSRFlexGMRESSolve(flex.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ParCSRFlexGMRESSetup(flex, A, b, x) + @check HYPRE_ParCSRFlexGMRESSolve(flex, A, b, x) return x end @@ -219,9 +192,10 @@ Internals.setup_func(::FlexGMRES) = HYPRE_ParCSRFlexGMRESSetup Internals.solve_func(::FlexGMRES) = HYPRE_ParCSRFlexGMRESSolve function Internals.set_precond(flex::FlexGMRES, p::HYPRESolver) + flex.precond = p solve_f = Internals.solve_func(p) setup_f = Internals.setup_func(p) - @check HYPRE_ParCSRFlexGMRESSetPrecond(flex.solver, solve_f, setup_f, p.solver) + @check HYPRE_ParCSRFlexGMRESSetPrecond(flex, solve_f, setup_f, p) return nothing end @@ -248,8 +222,8 @@ end #end #function solve!(fsai::FSAI, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) -# @check HYPRE_FSAISetup(fsai.solver, A.parmatrix, b.parvector, x.parvector) -# @check HYPRE_FSAISolve(fsai.solver, A.parmatrix, b.parvector, x.parvector) +# @check HYPRE_FSAISetup(fsai, A, b, x) +# @check HYPRE_FSAISolve(fsai, A, b, x) # return x #end @@ -278,14 +252,15 @@ Create a `GMRES` solver. See HYPRE API reference for details and supported setti mutable struct GMRES <: HYPRESolver comm::MPI.Comm solver::HYPRE_Solver - function GMRES(comm::MPI.Comm=MPI.COMM_NULL; kwargs...) + precond::Union{HYPRESolver, Nothing} + function GMRES(comm::MPI.Comm = MPI.COMM_NULL; kwargs...) # comm defaults to COMM_NULL since it is unused in HYPRE_ParCSRGMRESCreate - solver = new(comm, C_NULL) + solver = new(comm, C_NULL, nothing) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRGMRESCreate(comm, solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRGMRESDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRGMRESDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -293,8 +268,8 @@ mutable struct GMRES <: HYPRESolver end function solve!(gmres::GMRES, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ParCSRGMRESSetup(gmres.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ParCSRGMRESSolve(gmres.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ParCSRGMRESSetup(gmres, A, b, x) + @check HYPRE_ParCSRGMRESSolve(gmres, A, b, x) return x end @@ -302,9 +277,10 @@ Internals.setup_func(::GMRES) = HYPRE_ParCSRGMRESSetup Internals.solve_func(::GMRES) = HYPRE_ParCSRGMRESSolve function Internals.set_precond(gmres::GMRES, p::HYPRESolver) + gmres.precond = p solve_f = Internals.solve_func(p) setup_f = Internals.setup_func(p) - @check HYPRE_ParCSRGMRESSetPrecond(gmres.solver, solve_f, setup_f, p.solver) + @check HYPRE_ParCSRGMRESSetPrecond(gmres, solve_f, setup_f, p) return nothing end @@ -324,13 +300,14 @@ Create a `Hybrid` solver. See HYPRE API reference for details and supported sett """ mutable struct Hybrid <: HYPRESolver solver::HYPRE_Solver + precond::Union{HYPRESolver, Nothing} function Hybrid(; kwargs...) - solver = new(C_NULL) + solver = new(C_NULL, nothing) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRHybridCreate(solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRHybridDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRHybridDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -338,8 +315,8 @@ mutable struct Hybrid <: HYPRESolver end function solve!(hybrid::Hybrid, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ParCSRHybridSetup(hybrid.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ParCSRHybridSolve(hybrid.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ParCSRHybridSetup(hybrid, A, b, x) + @check HYPRE_ParCSRHybridSolve(hybrid, A, b, x) return x end @@ -347,12 +324,13 @@ Internals.setup_func(::Hybrid) = HYPRE_ParCSRHybridSetup Internals.solve_func(::Hybrid) = HYPRE_ParCSRHybridSolve function Internals.set_precond(hybrid::Hybrid, p::HYPRESolver) + hybrid.precond = p solve_f = Internals.solve_func(p) setup_f = Internals.setup_func(p) # Deactivate the finalizer of p since the HYBRIDDestroy function does this, # see https://github.com/hypre-space/hypre/issues/699 finalizer(x -> (x.solver = C_NULL), p) - @check HYPRE_ParCSRHybridSetPrecond(hybrid.solver, solve_f, setup_f, p.solver) + @check HYPRE_ParCSRHybridSetPrecond(hybrid, solve_f, setup_f, p) return nothing end @@ -379,7 +357,7 @@ mutable struct ILU <: HYPRESolver @check HYPRE_ILUCreate(solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ILUDestroy), solver) + Internals.safe_finalizer(HYPRE_ILUDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -387,8 +365,8 @@ mutable struct ILU <: HYPRESolver end function solve!(ilu::ILU, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ILUSetup(ilu.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ILUSolve(ilu.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ILUSetup(ilu, A, b, x) + @check HYPRE_ILUSolve(ilu, A, b, x) return x end @@ -419,14 +397,14 @@ settings. mutable struct ParaSails <: HYPRESolver comm::MPI.Comm solver::HYPRE_Solver - function ParaSails(comm::MPI.Comm=MPI.COMM_WORLD; kwargs...) + function ParaSails(comm::MPI.Comm = MPI.COMM_WORLD; kwargs...) # Note: comm is used in this solver so default to COMM_WORLD solver = new(comm, C_NULL) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRParaSailsCreate(comm, solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRParaSailsDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRParaSailsDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -454,14 +432,15 @@ Create a `PCG` solver. See HYPRE API reference for details and supported setting mutable struct PCG <: HYPRESolver comm::MPI.Comm solver::HYPRE_Solver - function PCG(comm::MPI.Comm=MPI.COMM_NULL; kwargs...) + precond::Union{HYPRESolver, Nothing} + function PCG(comm::MPI.Comm = MPI.COMM_NULL; kwargs...) # comm defaults to COMM_NULL since it is unused in HYPRE_ParCSRPCGCreate - solver = new(comm, C_NULL) + solver = new(comm, C_NULL, nothing) solver_ref = Ref{HYPRE_Solver}(C_NULL) @check HYPRE_ParCSRPCGCreate(comm, solver_ref) solver.solver = solver_ref[] # Attach a finalizer - finalizer(Internals.safe_finalizer(HYPRE_ParCSRPCGDestroy), solver) + Internals.safe_finalizer(HYPRE_ParCSRPCGDestroy, solver) # Set the options Internals.set_options(solver, kwargs) return solver @@ -471,8 +450,8 @@ end const ParCSRPCG = PCG function solve!(pcg::PCG, x::HYPREVector, A::HYPREMatrix, b::HYPREVector) - @check HYPRE_ParCSRPCGSetup(pcg.solver, A.parmatrix, b.parvector, x.parvector) - @check HYPRE_ParCSRPCGSolve(pcg.solver, A.parmatrix, b.parvector, x.parvector) + @check HYPRE_ParCSRPCGSetup(pcg, A, b, x) + @check HYPRE_ParCSRPCGSolve(pcg, A, b, x) return x end @@ -480,8 +459,74 @@ Internals.setup_func(::PCG) = HYPRE_ParCSRPCGSetup Internals.solve_func(::PCG) = HYPRE_ParCSRPCGSolve function Internals.set_precond(pcg::PCG, p::HYPRESolver) + pcg.precond = p solve_f = Internals.solve_func(p) setup_f = Internals.setup_func(p) - @check HYPRE_ParCSRPCGSetPrecond(pcg.solver, solve_f, setup_f, p.solver) + @check HYPRE_ParCSRPCGSetPrecond(pcg, solve_f, setup_f, p) return nothing end + + +########################################################## +# Extracting information about the solution from solvers # +########################################################## + +""" + HYPRE.GetFinalRelativeResidualNorm(s::HYPRESolver) + +Return the final relative residual norm from the last solve with solver `s`. + +This function dispatches on the solver to the corresponding C API wrapper +`LibHYPRE.HYPRE_\$(Solver)GetFinalRelativeResidualNorm`. +""" +function GetFinalRelativeResidualNorm(s::HYPRESolver) + r = Ref{HYPRE_Real}() + if s isa BiCGSTAB + @check HYPRE_ParCSRBiCGSTABGetFinalRelativeResidualNorm(s, r) + elseif s isa BoomerAMG + @check HYPRE_BoomerAMGGetFinalRelativeResidualNorm(s, r) + elseif s isa FlexGMRES + @check HYPRE_ParCSRFlexGMRESGetFinalRelativeResidualNorm(s, r) + elseif s isa GMRES + @check HYPRE_ParCSRGMRESGetFinalRelativeResidualNorm(s, r) + elseif s isa Hybrid + @check HYPRE_ParCSRHybridGetFinalRelativeResidualNorm(s, r) + elseif s isa ILU + @check HYPRE_ILUGetFinalRelativeResidualNorm(s, r) + elseif s isa PCG + @check HYPRE_ParCSRPCGGetFinalRelativeResidualNorm(s, r) + else + throw(ArgumentError("cannot get residual norm for $(typeof(s))")) + end + return r[] +end + +""" + HYPRE.GetNumIterations(s::HYPRESolver) + +Return number of iterations during the last solve with solver `s`. + +This function dispatches on the solver to the corresponding C API wrapper +`LibHYPRE.HYPRE_\$(Solver)GetNumIterations`. +""" +function GetNumIterations(s::HYPRESolver) + r = Ref{HYPRE_Int}() + if s isa BiCGSTAB + @check HYPRE_ParCSRBiCGSTABGetNumIterations(s, r) + elseif s isa BoomerAMG + @check HYPRE_BoomerAMGGetNumIterations(s, r) + elseif s isa FlexGMRES + @check HYPRE_ParCSRFlexGMRESGetNumIterations(s, r) + elseif s isa GMRES + @check HYPRE_ParCSRGMRESGetNumIterations(s, r) + elseif s isa Hybrid + @check HYPRE_ParCSRHybridGetNumIterations(s, r) + elseif s isa ILU + @check HYPRE_ILUGetNumIterations(s, r) + elseif s isa PCG + @check HYPRE_ParCSRPCGGetNumIterations(s, r) + else + throw(ArgumentError("cannot get number of iterations for $(typeof(s))")) + end + return r[] +end diff --git a/test/runtests.jl b/test/runtests.jl index 5d7ad5a..8c5ce75 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -11,6 +11,8 @@ using SparseMatricesCSR using Test using LinearSolve +include("test_utils.jl") + # Init HYPRE and MPI HYPRE.Init() @@ -52,11 +54,10 @@ end @testset "HYPREMatrix(::SparseMatrixCS(C|R))" begin ilower, iupper = 4, 6 - CSC = convert(SparseMatrixCSC{HYPRE_Complex, HYPRE_Int}, sparse([ - 1 2 0 0 3 - 0 4 0 5 0 - 0 6 7 0 8 - ])) + CSC = convert( + SparseMatrixCSC{HYPRE_Complex, HYPRE_Int}, + sparse([1 2 0 0 3; 0 4 0 5 0; 0 6 7 0 8]) + ) CSR = sparsecsr(findnz(CSC)..., size(CSC)...) @test CSC == CSR csc = Internals.to_hypre_data(CSC, ilower, iupper) @@ -73,8 +74,8 @@ end @test csr[5] == CSR.nzval @test_broken csr[5]::Vector{HYPRE_Complex} === CSR.nzval - @test_throws ArgumentError Internals.to_hypre_data(CSC, ilower, iupper-1) - @test_throws ArgumentError Internals.to_hypre_data(CSR, ilower, iupper+1) + @test_throws ArgumentError Internals.to_hypre_data(CSC, ilower, iupper - 1) + @test_throws ArgumentError Internals.to_hypre_data(CSR, ilower, iupper + 1) ilower, iupper = 6, 10 CSC = sprand(5, 10, 0.3) @@ -91,7 +92,7 @@ end H = HYPREMatrix(CSR, ilower, iupper) @test H.ijmatrix != HYPRE_IJMatrix(C_NULL) @test H.parmatrix != HYPRE_ParCSRMatrix(C_NULL) - H = HYPREMatrix(MPI.COMM_WORLD, CSR, ilower, iupper) + H = HYPREMatrix(MPI.COMM_WORLD, CSR, ilower, iupper) @test H.ijmatrix != HYPRE_IJMatrix(C_NULL) @test H.parmatrix != HYPRE_ParCSRMatrix(C_NULL) @@ -112,105 +113,98 @@ end @test H.iupper == H.jupper == 10 end -function tomain(x) - g = gather(copy(x)) - be = get_backend(g.values) - if be isa SequentialBackend - return g.values.parts[1] - else # if be isa MPIBackend - return g.values.part +function distribute_as_parray(parts, backend) + if backend == :debug + parts = DebugArray(parts) + elseif backend == :mpi + parts = distribute_with_mpi(parts) + else + @assert backend == :native + parts = collect(parts) end + return parts end @testset "HYPREMatrix(::PSparseMatrix)" begin - # Sequential backend - function diag_data(backend, parts) - is_seq = backend isa SequentialBackend - rows = PRange(parts, 10) - cols = PRange(parts, 10) - I, J, V = map_parts(parts) do p + function diag_data(parts) + rows = uniform_partition(parts, 10) + cols = uniform_partition(parts, 10) + np = length(parts) + IJV = map(parts) do p i = Int[] j = Int[] v = Float64[] - if (is_seq && p == 1) || !is_seq + if np == 1 + # MPI case is special, we only have one MPI process. + @assert p == 1 + append!(i, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + append!(j, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + append!(v, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + elseif p == 1 + @assert np == 2 append!(i, [1, 2, 3, 4, 5, 6]) append!(j, [1, 2, 3, 4, 5, 6]) append!(v, [1, 2, 3, 4, 5, 6]) - end - if (is_seq && p == 2) || !is_seq + else + @assert np == 2 + @assert p == 2 append!(i, [4, 5, 6, 7, 8, 9, 10]) append!(j, [4, 5, 6, 7, 8, 9, 10]) append!(v, [4, 5, 6, 7, 8, 9, 10]) end return i, j, v end - add_gids!(rows, I) - assemble!(I, J, V, rows) - add_gids!(cols, J) + I, J, V = tuple_of_arrays(IJV) return I, J, V, rows, cols end - backend = SequentialBackend() - parts = get_part_ids(backend, 2) - CSC = PSparseMatrix(diag_data(backend, parts)...; ids=:global) - CSR = PSparseMatrix(sparsecsr, diag_data(backend, parts)...; ids=:global) - - @test tomain(CSC) == tomain(CSR) == - Diagonal([1, 2, 3, 8, 10, 12, 7, 8, 9, 10]) - - map_parts(CSC.values, CSC.rows.partition, CSC.cols.partition, - CSR.values, CSR.rows.partition, CSR.cols.partition, parts) do args... - cscvalues, cscrows, csccols, csrvalues, csrrows, csrcols, p = args - csc = Internals.to_hypre_data(cscvalues, cscrows, csccols) - csr = Internals.to_hypre_data(csrvalues, csrrows, csrcols) - if p == 1 - nrows = 5 - ncols = [1, 1, 1, 1, 1] - rows = [1, 2, 3, 4, 5] - cols = [1, 2, 3, 4, 5] - values = [1, 2, 3, 8, 10] - else # if p == 1 - nrows = 5 - ncols = [1, 1, 1, 1, 1] - rows = [6, 7, 8, 9, 10] - cols = [6, 7, 8, 9, 10] - values = [12, 7, 8, 9, 10] + for backend in [:native, :debug, :mpi] + @testset "Backend=$backend" begin + if backend == :mpi + parts = 1:1 + else + parts = 1:2 + end + parts = distribute_as_parray(parts, backend) + CSC = psparse(diag_data(parts)...) |> fetch + CSR = psparse(sparsecsr, diag_data(parts)...) |> fetch + + for A in [CSC, CSR] + map(local_values(A), A.row_partition, A.col_partition, parts) do values, rows, cols, p + hypre_data = Internals.to_hypre_data(values, rows, cols) + if backend == :mpi + @assert p == 1 + nrows = 10 + ncols = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] + rows = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + cols = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + elseif p == 1 + nrows = 5 + ncols = [1, 1, 1, 1, 1] + rows = [1, 2, 3, 4, 5] + cols = [1, 2, 3, 4, 5] + values = [1, 2, 3, 8, 10] + else + @assert p == 2 + nrows = 5 + ncols = [1, 1, 1, 1, 1] + rows = [6, 7, 8, 9, 10] + cols = [6, 7, 8, 9, 10] + values = [12, 7, 8, 9, 10] + end + @test hypre_data[1]::HYPRE_Int == nrows + @test hypre_data[2]::Vector{HYPRE_Int} == ncols + @test hypre_data[3]::Vector{HYPRE_BigInt} == rows + @test hypre_data[4]::Vector{HYPRE_BigInt} == cols + @test hypre_data[5]::Vector{HYPRE_Complex} == values + end + end end - @test csc[1]::HYPRE_Int == csr[1]::HYPRE_Int == nrows - @test csc[2]::Vector{HYPRE_Int} == csr[2]::Vector{HYPRE_Int} == ncols - @test csc[3]::Vector{HYPRE_BigInt} == csr[3]::Vector{HYPRE_BigInt} == rows - @test csc[4]::Vector{HYPRE_BigInt} == csr[4]::Vector{HYPRE_BigInt} == cols - @test csc[5]::Vector{HYPRE_Complex} == csr[5]::Vector{HYPRE_Complex} == values end - - # MPI backend - backend = MPIBackend() - parts = MPIData(1, MPI.COMM_WORLD, (1,)) # get_part_ids duplicates the comm - CSC = PSparseMatrix(diag_data(backend, parts)...; ids=:global) - CSR = PSparseMatrix(sparsecsr, diag_data(backend, parts)...; ids=:global) - - @test tomain(CSC) == tomain(CSR) == - Diagonal([1, 2, 3, 8, 10, 12, 7, 8, 9, 10]) - - map_parts(CSC.values, CSC.rows.partition, CSC.cols.partition, - CSR.values, CSR.rows.partition, CSR.cols.partition, parts) do args... - cscvalues, cscrows, csccols, csrvalues, csrrows, csrcols, p = args - csc = Internals.to_hypre_data(cscvalues, cscrows, csccols) - csr = Internals.to_hypre_data(csrvalues, csrrows, csrcols) - nrows = 10 - ncols = fill(1, 10) - rows = collect(1:10) - cols = collect(1:10) - values = [1, 2, 3, 8, 10, 12, 7, 8, 9, 10] - @test csc[1]::HYPRE_Int == csr[1]::HYPRE_Int == nrows - @test csc[2]::Vector{HYPRE_Int} == csr[2]::Vector{HYPRE_Int} == ncols - @test csc[3]::Vector{HYPRE_BigInt} == csr[3]::Vector{HYPRE_BigInt} == rows - @test csc[4]::Vector{HYPRE_BigInt} == csr[4]::Vector{HYPRE_BigInt} == cols - @test csc[5]::Vector{HYPRE_Complex} == csr[5]::Vector{HYPRE_Complex} == values - end - end + @testset "HYPREVector" begin h = HYPREVector(MPI.COMM_WORLD, 1, 5) @test h.ijvector != HYPRE_IJVector(C_NULL) @@ -271,52 +265,106 @@ end end @testset "HYPREVector(::PVector)" begin - # Sequential backend - backend = SequentialBackend() - parts = get_part_ids(backend, 2) - rows = PRange(parts, 10) - b = rand(10) - I, V = map_parts(parts) do p - if p == 1 - return collect(1:6), b[1:6] - else # p == 2 - return collect(4:10), b[4:10] + for backend in [:native, :debug, :mpi] + if backend == :mpi + parts = distribute_as_parray(1:1, backend) + else + parts = distribute_as_parray(1:2, backend) end + rows = uniform_partition(parts, 10) + b = rand(10) + IV = map(parts, rows) do p, owned + if backend == :mpi + row_indices = 1:10 + elseif p == 1 + row_indices = 1:6 + else # p == 2 + row_indices = 4:10 + end + values = zeros(length(row_indices)) + for (i, row) in enumerate(row_indices) + if row in owned + values[i] = b[row] + end + end + return collect(row_indices), values + end + I, V = tuple_of_arrays(IV) + pb = pvector(I, V, rows) |> fetch + H = HYPREVector(pb) + # Check for valid vector + @test H.ijvector != HYPRE_IJVector(C_NULL) + @test H.parvector != HYPRE_ParVector(C_NULL) + # Copy back, check if identical + b_copy = copy!(similar(b), H) + @test b_copy == b + # Test copy to and from HYPREVector + pb2 = 2 * pb + H′ = copy!(H, pb2) + @test H === H′ + pbc = similar(pb) + copy!(pbc, H) + @test pbc == 2 * pb + end +end + +@testset "HYPRE(Matrix|Vector)?Assembler" begin + comm = MPI.COMM_WORLD + # Assembly HYPREMatrix from ::Matrix + A = HYPREMatrix(comm, 1, 3) + AM = zeros(3, 3) + for i in 1:2 + assembler = HYPRE.start_assemble!(A) + fill!(AM, 0) + for idx in ([1, 2], [3, 1]) + a = rand(2, 2) + HYPRE.assemble!(assembler, idx, idx, a) + AM[idx, idx] += a + ar = rand(1, 2) + HYPRE.assemble!(assembler, [2], idx, ar) + AM[[2], idx] += ar + end + f = HYPRE.finish_assemble!(assembler) + @test f === A + @test getindex_debug(A, 1:3, 1:3) == AM end - add_gids!(rows, I) - pb = PVector(I, V, rows; ids=:global) - assemble!(pb) - @test tomain(pb) == [i in 4:6 ? 2x : x for (i, x) in zip(eachindex(b), b)] - H = HYPREVector(pb) - @test H.ijvector != HYPRE_IJVector(C_NULL) - @test H.parvector != HYPRE_ParVector(C_NULL) - pbc = fill!(copy(pb), 0) - copy!(pbc, H) - @test tomain(pbc) == tomain(pb) - - pb2 = 2 * pb - H′ = copy!(H, pb2) - @test H === H′ - copy!(pbc, H) - @test tomain(pbc) == 2 * tomain(pb) - - # MPI backend - backend = MPIBackend() - parts = get_part_ids(backend, 1) - rows = PRange(parts, 10) - I, V = map_parts(parts) do p - return collect(1:10), b + # Assembly HYPREVector from ::Vector + b = HYPREVector(comm, 1, 3) + bv = zeros(3) + for i in 1:2 + assembler = HYPRE.start_assemble!(b) + fill!(bv, 0) + for idx in ([1, 2], [3, 1]) + c = rand(2) + HYPRE.assemble!(assembler, idx, c) + bv[idx] += c + end + f = HYPRE.finish_assemble!(assembler) + @test f === b + @test getindex_debug(b, 1:3) == bv + end + # Assembly HYPREMatrix/HYPREVector from ::Array + A = HYPREMatrix(comm, 1, 3) + AM = zeros(3, 3) + b = HYPREVector(comm, 1, 3) + bv = zeros(3) + for i in 1:2 + assembler = HYPRE.start_assemble!(A, b) + fill!(AM, 0) + fill!(bv, 0) + for idx in ([1, 2], [3, 1]) + a = rand(2, 2) + c = rand(2) + HYPRE.assemble!(assembler, idx, a, c) + AM[idx, idx] += a + bv[idx] += c + end + F, f = HYPRE.finish_assemble!(assembler) + @test F === A + @test f === b + @test getindex_debug(A, 1:3, 1:3) == AM + @test getindex_debug(b, 1:3) == bv end - add_gids!(rows, I) - pb = PVector(I, V, rows; ids=:global) - assemble!(pb) - @test tomain(pb) == b - H = HYPREVector(pb) - @test H.ijvector != HYPRE_IJVector(C_NULL) - @test H.parvector != HYPRE_ParVector(C_NULL) - pbc = fill!(copy(pb), 0) - copy!(pbc, H) - @test tomain(pbc) == tomain(pb) end @testset "BiCGSTAB" begin @@ -333,16 +381,19 @@ end b_h = HYPREVector(b) x_h = HYPREVector(x) # Solve - tol = 1e-9 + tol = 1.0e-9 bicg = HYPRE.BiCGSTAB(; Tol = tol) HYPRE.solve!(bicg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(bicg, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(bicg) < tol + @test HYPRE.GetNumIterations(bicg) > 0 # Solve with preconditioner precond = HYPRE.BoomerAMG(; MaxIter = 1, Tol = 0.0) @@ -351,11 +402,11 @@ end HYPRE.solve!(bicg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(bicg, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Tests Internals.set_precond_defaults for BoomerAMG precond = HYPRE.BoomerAMG() bicg = HYPRE.BiCGSTAB(; Tol = tol, Precond = precond) @@ -363,7 +414,7 @@ end HYPRE.solve!(bicg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end @testset "BoomerAMG" begin @@ -377,11 +428,11 @@ end for i in 1:99 k = (1 + rand()) * [1.0 -1.0; -1.0 1.0] append!(V, k) - append!(I, [i, i+1, i, i+1]) # rows - append!(J, [i, i, i+1, i+1]) # cols + append!(I, [i, i + 1, i, i + 1]) # rows + append!(J, [i, i, i + 1, i + 1]) # cols end A = sparse(I, J, V) - A[:, 1] .= 0; A[1, :] .= 0; A[:, end] .= 0; A[end, :] .= 0; + A[:, 1] .= 0; A[1, :] .= 0; A[:, end] .= 0; A[end, :] .= 0 A[1, 1] = 2; A[end, end] = 2 @test isposdef(A) b = rand(100) @@ -391,7 +442,7 @@ end b_h = HYPREVector(b, ilower, iupper) x_h = HYPREVector(b, ilower, iupper) # Solve - tol = 1e-9 + tol = 1.0e-9 amg = HYPRE.BoomerAMG(; Tol = tol) HYPRE.solve!(amg, x_h, A_h, b_h) copy!(x, x_h) @@ -402,6 +453,9 @@ end x_h = HYPRE.solve(amg, A_h, b_h) copy!(x, x_h) @test x ≈ A \ b atol = tol * norm(b) + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(amg) < tol + @test HYPRE.GetNumIterations(amg) > 0 end @testset "FlexGMRES" begin @@ -418,16 +472,19 @@ end b_h = HYPREVector(b) x_h = HYPREVector(x) # Solve - tol = 1e-9 + tol = 1.0e-9 gmres = HYPRE.FlexGMRES(; Tol = tol) HYPRE.solve!(gmres, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(gmres, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(gmres) < tol + @test HYPRE.GetNumIterations(gmres) > 0 # Solve with preconditioner precond = HYPRE.BoomerAMG() @@ -436,11 +493,11 @@ end HYPRE.solve!(gmres, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(gmres, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end @@ -458,16 +515,19 @@ end b_h = HYPREVector(b) x_h = HYPREVector(x) # Solve - tol = 1e-9 + tol = 1.0e-9 gmres = HYPRE.GMRES(; Tol = tol) HYPRE.solve!(gmres, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(gmres, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(gmres) < tol + @test HYPRE.GetNumIterations(gmres) > 0 # Solve with preconditioner precond = HYPRE.BoomerAMG(; MaxIter = 1, Tol = 0.0) @@ -476,11 +536,11 @@ end HYPRE.solve!(gmres, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(gmres, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end @testset "Hybrid" begin @@ -497,16 +557,19 @@ end b_h = HYPREVector(b) x_h = HYPREVector(x) # Solve - tol = 1e-9 + tol = 1.0e-9 hybrid = HYPRE.Hybrid(; Tol = tol) HYPRE.solve!(hybrid, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(hybrid, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(hybrid) < tol + @test HYPRE.GetNumIterations(hybrid) > 0 # Solve with given preconditioner precond = HYPRE.BoomerAMG() @@ -515,11 +578,11 @@ end HYPRE.solve!(hybrid, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(hybrid, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end @@ -537,16 +600,19 @@ end b_h = HYPREVector(b) x_h = HYPREVector(x) # Solve - tol = 1e-9 + tol = 1.0e-9 ilu = HYPRE.ILU(; Tol = tol) HYPRE.solve!(ilu, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(ilu, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(ilu) < tol + @test HYPRE.GetNumIterations(ilu) > 0 # Use as preconditioner to PCG precond = HYPRE.ILU() @@ -555,11 +621,11 @@ end HYPRE.solve!(pcg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(pcg, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end @@ -578,13 +644,16 @@ end b_h = HYPREVector(b, ilower, iupper) x_h = HYPREVector(b, ilower, iupper) # Solve with ParaSails as preconditioner - tol = 1e-9 + tol = 1.0e-9 parasails = HYPRE.ParaSails() pcg = HYPRE.PCG(; Tol = tol, Precond = parasails) HYPRE.solve!(pcg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries (should error) + @test_throws ArgumentError("cannot get residual norm for HYPRE.ParaSails") HYPRE.GetFinalRelativeResidualNorm(parasails) + @test_throws ArgumentError("cannot get number of iterations for HYPRE.ParaSails") HYPRE.GetNumIterations(parasails) end @testset "(ParCSR)PCG" begin @@ -602,16 +671,20 @@ end b_h = HYPREVector(b, ilower, iupper) x_h = HYPREVector(b, ilower, iupper) # Solve - tol = 1e-9 + tol = 1.0e-9 pcg = HYPRE.PCG(; Tol = tol) HYPRE.solve!(pcg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(pcg, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol + # Test solver queries + @test HYPRE.GetFinalRelativeResidualNorm(pcg) < tol + @test HYPRE.GetNumIterations(pcg) > 0 + # Solve with AMG preconditioner precond = HYPRE.BoomerAMG(; MaxIter = 1, Tol = 0.0) pcg = HYPRE.PCG(; Tol = tol, Precond = precond) @@ -619,62 +692,96 @@ end HYPRE.solve!(pcg, x_h, A_h, b_h) copy!(x, x_h) # Test result with direct solver - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol # Test without passing initial guess x_h = HYPRE.solve(pcg, A_h, b_h) copy!(x, x_h) - @test x ≈ A \ b atol=tol + @test x ≈ A \ b atol = tol end -function topartitioned(x::Vector, A::SparseMatrixCSC, b::Vector) - parts = get_part_ids(SequentialBackend(), 1) - rows = PRange(parts, size(A, 1)) - cols = PRange(parts, size(A, 2)) - II, JJ, VV, bb, xx = map_parts(parts) do _ +function topartitioned(x::Vector, A::SparseMatrixCSC, b::Vector, backend) + parts = distribute_as_parray(1:1, backend) + n = size(A, 1) + rows = uniform_partition(parts, n) + cols = uniform_partition(parts, n) + tmp = map(parts) do _ return findnz(A)..., b, x end - add_gids!(rows, II) - assemble!(II, JJ, VV, rows) - add_gids!(cols, JJ) - A_p = PSparseMatrix(II, JJ, VV, rows, cols; ids = :global) + II, JJ, VV, bb, xx = tuple_of_arrays(tmp) + A_p = psparse(II, JJ, VV, rows, cols) |> fetch b_p = PVector(bb, rows) x_p = PVector(xx, cols) return x_p, A_p, b_p end @testset "solve with PartitionedArrays" begin - # Setup - A = sprand(100, 100, 0.05); A = A'A + 5I - b = rand(100) - x = zeros(100) - x_p, A_p, b_p = topartitioned(x, A, b) - @test A == tomain(A_p) - @test b == tomain(b_p) - @test x == tomain(x_p) - # Solve - tol = 1e-9 - pcg = HYPRE.PCG(; Tol = tol) - ## solve! - HYPRE.solve!(pcg, x_p, A_p, b_p) - @test tomain(x_p) ≈ A \ b atol=tol - ## solve - x_p = HYPRE.solve(pcg, A_p, b_p) - @test tomain(x_p) ≈ A \ b atol=tol + for backend in [:native, :debug, :mpi] + # Setup + A = sprand(100, 100, 0.05); A = A'A + 5I + b = rand(100) + x = zeros(100) + x_p, A_p, b_p = topartitioned(x, A, b, :native) + # Data is distributed over a single process. We can then check the following + # as local_values is the entire matrix/vector. + map(local_values(x_p)) do x_l + @test x_l == x + end + map(local_values(b_p)) do b_l + @test b_l == b + end + map(local_values(A_p)) do A_l + @test A_l == A + end + + # Solve + tol = 1.0e-9 + pcg = HYPRE.PCG(; Tol = tol) + ## solve! + HYPRE.solve!(pcg, x_p, A_p, b_p) + ref = A \ b + map(local_values(x_p)) do x + @test x ≈ ref atol = tol + end + ## solve + x_p = HYPRE.solve(pcg, A_p, b_p) + map(local_values(x_p)) do x + @test x ≈ ref atol = tol + end + end end @testset "solve with SparseMatrixCS(C|R)" begin # Setup - A = sprand(100, 100, 0.05); A = A'A + 5I + CSC = sprand(100, 100, 0.05); CSC = CSC'CSC + 5I + CSR = sparsecsr(findnz(CSC)..., size(CSC)...) b = rand(100) - x = zeros(100) + xcsc = zeros(100) + xcsr = zeros(100) # Solve - tol = 1e-9 + tol = 1.0e-9 pcg = HYPRE.PCG(; Tol = tol) ## solve! - HYPRE.solve!(pcg, x, A, b) - @test x ≈ A \ b atol=tol + HYPRE.solve!(pcg, xcsc, CSC, b) + @test xcsc ≈ CSC \ b atol = tol + HYPRE.solve!(pcg, xcsr, CSR, b) + @test xcsr ≈ CSC \ b atol = tol # TODO: CSR \ b fails ## solve - x = HYPRE.solve(pcg, A, b) - @test x ≈ A \ b atol=tol + xcsc = HYPRE.solve(pcg, CSC, b) + @test xcsc ≈ CSC \ b atol = tol + xcsr = HYPRE.solve(pcg, CSR, b) + @test xcsr ≈ CSC \ b atol = tol # TODO: CSR \ b fails +end + +@testset "MPI execution" begin + testfiles = joinpath.( + @__DIR__, + [ + "test_assembler.jl", + ] + ) + for file in testfiles + r = run(ignorestatus(`$(mpiexec()) -n 2 $(Base.julia_cmd()) $(file)`)) + @test r.exitcode == 0 + end end diff --git a/test/test_assembler.jl b/test/test_assembler.jl new file mode 100644 index 0000000..d23051d --- /dev/null +++ b/test/test_assembler.jl @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: MIT + +using HYPRE +using MPI +using Test + +MPI.Init() +HYPRE.Init() + +include("test_utils.jl") + +comm = MPI.COMM_WORLD +comm_rank = MPI.Comm_rank(comm) +comm_size = MPI.Comm_size(comm) + +if comm_size != 2 + error("Must run with 2 ranks.") +end + +if comm_rank == 0 + ilower = 1 + iupper = 10 + N = 2:10 +else + ilower = 11 + iupper = 20 + N = 11:19 +end + +function values_and_indices(n) + idx = [n - 1, n, n + 1] + a = Float64[ + # runic: off + n -2n -n + -2n n -2n + -n -2n n + # runic: on + ] + b = Float64[n, n / 2, n / 3] + return idx, a, b +end + +########################## +## HYPREMatrixAssembler ## +########################## + +# Dense local matrix + +A = HYPREMatrix(comm, ilower, iupper) +AM = zeros(20, 20) +for i in 1:2 + assembler = HYPRE.start_assemble!(A) + fill!(AM, 0) + for n in N + idx, a, _ = values_and_indices(n) + HYPRE.assemble!(assembler, idx, idx, a) + AM[idx, idx] += a + end + f = HYPRE.finish_assemble!(assembler) + @test f === A + MPI.Allreduce!(AM, +, comm) + @test getindex_debug(A, ilower:iupper, 1:20) == AM[ilower:iupper, 1:20] + MPI.Barrier(comm) +end + +########################## +## HYPREVectorAssembler ## +########################## + +# Dense local vector + +b = HYPREVector(comm, ilower, iupper) +bv = zeros(20) +for i in 1:2 + assembler = HYPRE.start_assemble!(b) + fill!(bv, 0) + for n in N + idx, _, a = values_and_indices(n) + HYPRE.assemble!(assembler, idx, a) + bv[idx] += a + end + f = HYPRE.finish_assemble!(assembler) + @test f === b + MPI.Allreduce!(bv, +, comm) + @test getindex_debug(b, ilower:iupper) == bv[ilower:iupper] + MPI.Barrier(comm) +end + +#################### +## HYPREAssembler ## +#################### + +# Dense local arrays + +A = HYPREMatrix(comm, ilower, iupper) +AM = zeros(20, 20) +b = HYPREVector(comm, ilower, iupper) +bv = zeros(20) +for i in 1:2 + assembler = HYPRE.start_assemble!(A, b) + fill!(AM, 0) + fill!(bv, 0) + for n in N + idx, a, c = values_and_indices(n) + HYPRE.assemble!(assembler, idx, a, c) + AM[idx, idx] += a + bv[idx] += c + end + F, f = HYPRE.finish_assemble!(assembler) + @test F === A + @test f === b + MPI.Allreduce!(AM, +, comm) + MPI.Allreduce!(bv, +, comm) + @test getindex_debug(A, ilower:iupper, 1:20) == AM[ilower:iupper, 1:20] + @test getindex_debug(b, ilower:iupper) == bv[ilower:iupper] + MPI.Barrier(comm) +end diff --git a/test/test_utils.jl b/test/test_utils.jl new file mode 100644 index 0000000..25a81ee --- /dev/null +++ b/test/test_utils.jl @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: MIT + +using HYPRE +using HYPRE.LibHYPRE +using HYPRE.LibHYPRE: @check + +function getindex_debug(A::HYPREMatrix, i::AbstractVector, j::AbstractVector) + nrows = HYPRE_Int(length(i)) + ncols = fill(HYPRE_Int(length(j)), length(i)) + rows = convert(Vector{HYPRE_BigInt}, i) + cols = convert(Vector{HYPRE_BigInt}, repeat(j, length(i))) + values = Vector{HYPRE_Complex}(undef, length(i) * length(j)) + @check HYPRE_IJMatrixGetValues(A.ijmatrix, nrows, ncols, rows, cols, values) + return permutedims(reshape(values, (length(j), length(i)))) +end + +function getindex_debug(b::HYPREVector, i::AbstractVector) + nvalues = HYPRE_Int(length(i)) + indices = convert(Vector{HYPRE_BigInt}, i) + values = Vector{HYPRE_Complex}(undef, length(i)) + @check HYPRE_IJVectorGetValues(b.ijvector, nvalues, indices, values) + return values +end