diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..9cdf2d67 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/docs/.sphinx" # Location of package manifests + open-pull-requests-limit: 10 + schedule: + interval: "daily" diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 2b731ca4..00000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: Upload to the upload server - -# Controls when the workflow will run -on: - push: - branches: [develop, master] - tags: - - rocm-5.* - release: - types: [published] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: getting branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: branch_name - - name: getting tag name - shell: bash - run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF_NAME})" - id: tag_name - - name: zipping files - run: zip -r ${{ github.event.repository.name }}_${{ steps.tag_name.outputs.tag }}.zip . -x '*.git*' '*.idea*' - - name: echo-step - run: echo "${{ github.event.release.target_commitish }}" - - name: uploading archive to prod - if: ${{ steps.branch_name.outputs.branch == 'master' || github.event.release.target_commitish == 'master'}} - uses: wlixcc/SFTP-Deploy-Action@v1.0 - with: - username: ${{ secrets.USERNAME }} - server: ${{ secrets.SERVER }} - ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} - local_path: ${{ github.event.repository.name }}_${{ steps.tag_name.outputs.tag }}.zip - remote_path: '${{ secrets.PROD_UPLOAD_URL }}' - args: '-o ConnectTimeout=5' - - name: uploading archive to staging - if: ${{ steps.branch_name.outputs.branch == 'develop' || github.event.release.target_commitish == 'develop' }} - uses: wlixcc/SFTP-Deploy-Action@v1.0 - with: - username: ${{ secrets.USERNAME }} - server: ${{ secrets.SERVER }} - ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} - local_path: ${{ github.event.repository.name }}_${{ steps.tag_name.outputs.tag }}.zip - remote_path: '${{ secrets.STG_UPLOAD_URL }}' - args: '-o ConnectTimeout=5' diff --git a/.gitignore b/.gitignore index 233e4ef5..ee5f3b44 100644 --- a/.gitignore +++ b/.gitignore @@ -35,12 +35,14 @@ tags # Editors .vscode -# build-in-source directory -build - -# doc directory -docBin -_build +# build-in-source directory and documentation artifacts +build/ +_build/ +_images/ +_static/ +_templates/ +_toc.yml +docBin/ # matrices *.csr diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8dd7efe1..43a0890c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,11 +4,11 @@ version: 2 sphinx: - configuration: docs/source/conf.py + configuration: docs/conf.py -formats: all +formats: [htmlzip] python: version: "3.8" install: - - requirements: docs/source/requirements.txt + - requirements: docs/.sphinx/requirements.txt diff --git a/README.md b/README.md index dc18a2e3..b2082b80 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,18 @@ # hipSPARSE hipSPARSE is a SPARSE marshalling library, with multiple supported backends. It sits between the application and a 'worker' SPARSE library, marshalling inputs into the backend library and marshalling results back to the application. hipSPARSE exports an interface that does not require the client to change, regardless of the chosen backend. Currently, hipSPARSE supports [rocSPARSE](https://github.com/ROCmSoftwarePlatform/rocSPARSE) and [cuSPARSE](https://developer.nvidia.com/cusparse) as backends. +## Documentation + +Run the steps below to build documentation locally. + +``` +cd docs + +pip3 install -r .sphinx/requirements.txt + +python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html +``` + ## Installing pre-built packages Download pre-built packages either from [ROCm's package servers](https://rocm.github.io/install.html#installing-from-amd-rocm-repositories) or by clicking the github releases tab and manually downloading, which could be newer. Release notes are available for each release on the releases tab. * `sudo apt update && sudo apt install hipsparse` diff --git a/docs/Doxyfile b/docs/.doxygen/Doxyfile similarity index 99% rename from docs/Doxyfile rename to docs/.doxygen/Doxyfile index 0e47a0f6..ebf07520 100644 --- a/docs/Doxyfile +++ b/docs/.doxygen/Doxyfile @@ -51,7 +51,7 @@ PROJECT_BRIEF = "prototype interfaces compatible with ROCm platform and # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = ./rocm.jpg +PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -829,7 +829,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../library/include +INPUT = ../../library/include # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/docs/modules.dox b/docs/.doxygen/modules.dox similarity index 100% rename from docs/modules.dox rename to docs/.doxygen/modules.dox diff --git a/docs/.sphinx/_toc.yml.in b/docs/.sphinx/_toc.yml.in new file mode 100644 index 00000000..38918736 --- /dev/null +++ b/docs/.sphinx/_toc.yml.in @@ -0,0 +1,3 @@ +# Anywhere {branch} is used, the branch name will be substituted. +# These comments will also be removed. +root: index diff --git a/docs/.sphinx/requirements.in b/docs/.sphinx/requirements.in new file mode 100644 index 00000000..7f2c40a8 --- /dev/null +++ b/docs/.sphinx/requirements.in @@ -0,0 +1 @@ +rocm-docs-core==0.13.4 diff --git a/docs/.sphinx/requirements.txt b/docs/.sphinx/requirements.txt new file mode 100644 index 00000000..48b1769e --- /dev/null +++ b/docs/.sphinx/requirements.txt @@ -0,0 +1,145 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile requirements.in +# +accessible-pygments==0.0.3 + # via pydata-sphinx-theme +alabaster==0.7.13 + # via sphinx +babel==2.12.1 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.11.2 + # via pydata-sphinx-theme +breathe==4.34.0 + # via rocm-docs-core +certifi==2022.12.7 + # via requests +cffi==1.15.1 + # via + # cryptography + # pynacl +charset-normalizer==3.1.0 + # via requests +click==8.1.3 + # via sphinx-external-toc +cryptography==41.0.0 + # via pyjwt +deprecated==1.2.13 + # via pygithub +docutils==0.19 + # via + # breathe + # myst-parser + # pydata-sphinx-theme + # sphinx +fastjsonschema==2.16.3 + # via rocm-docs-core +gitdb==4.0.10 + # via gitpython +gitpython==3.1.31 + # via rocm-docs-core +idna==3.4 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.2 + # via + # myst-parser + # sphinx +linkify-it-py==1.0.3 + # via myst-parser +markdown-it-py==2.2.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.2 + # via jinja2 +mdit-py-plugins==0.3.5 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +myst-parser[linkify]==1.0.0 + # via rocm-docs-core +packaging==23.0 + # via + # pydata-sphinx-theme + # sphinx +pycparser==2.21 + # via cffi +pydata-sphinx-theme==0.13.3 + # via + # rocm-docs-core + # sphinx-book-theme +pygithub==1.58.1 + # via rocm-docs-core +pygments==2.14.0 + # via + # accessible-pygments + # pydata-sphinx-theme + # sphinx +pyjwt[crypto]==2.6.0 + # via pygithub +pynacl==1.5.0 + # via pygithub +pyyaml==6.0 + # via + # myst-parser + # rocm-docs-core + # sphinx-external-toc +requests==2.31.0 + # via + # pygithub + # sphinx +rocm-docs-core==0.13.4 + # via -r requirements.in +smmap==5.0.0 + # via gitdb +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.4 + # via beautifulsoup4 +sphinx==5.3.0 + # via + # breathe + # myst-parser + # pydata-sphinx-theme + # rocm-docs-core + # sphinx-book-theme + # sphinx-copybutton + # sphinx-design + # sphinx-external-toc + # sphinx-notfound-page +sphinx-book-theme==1.0.1 + # via rocm-docs-core +sphinx-copybutton==0.5.1 + # via rocm-docs-core +sphinx-design==0.4.1 + # via rocm-docs-core +sphinx-external-toc==0.3.1 + # via rocm-docs-core +sphinx-notfound-page==0.8.3 + # via rocm-docs-core +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +typing-extensions==4.5.0 + # via pydata-sphinx-theme +uc-micro-py==1.0.1 + # via linkify-it-py +urllib3==1.26.15 + # via requests +wrapt==1.15.0 + # via deprecated diff --git a/docs/auxiliary.rst b/docs/auxiliary.rst new file mode 100644 index 00000000..89fa323b --- /dev/null +++ b/docs/auxiliary.rst @@ -0,0 +1,419 @@ +.. _hipsparse_auxiliary_functions_: + +Sparse Auxiliary Functions +========================== + +This module holds all sparse auxiliary functions. + +The functions that are contained in the auxiliary module describe all available helper functions that are required for subsequent library calls. + +.. _hipsparse_create_handle_: + +hipsparseCreate() +----------------- + +.. doxygenfunction:: hipsparseCreate + +.. _hipsparse_destroy_handle_: + +hipsparseDestroy() +------------------ + +.. doxygenfunction:: hipsparseDestroy + +hipsparseGetVersion() +--------------------- + +.. doxygenfunction:: hipsparseGetVersion + +hipsparseGetGitRevision() +------------------------- + +.. doxygenfunction:: hipsparseGetGitRevision + +.. _hipsparse_set_stream_: + +hipsparseSetStream() +-------------------- + +.. doxygenfunction:: hipsparseSetStream + +hipsparseGetStream() +-------------------- + +.. doxygenfunction:: hipsparseGetStream + +hipsparseSetPointerMode() +------------------------- + +.. doxygenfunction:: hipsparseSetPointerMode + +hipsparseGetPointerMode() +------------------------- + +.. doxygenfunction:: hipsparseGetPointerMode + +hipsparseCreateMatDescr() +------------------------- + +.. doxygenfunction:: hipsparseCreateMatDescr + +hipsparseDestroyMatDescr() +-------------------------- + +.. doxygenfunction:: hipsparseDestroyMatDescr + +hipsparseCopyMatDescr() +----------------------- + +.. doxygenfunction:: hipsparseCopyMatDescr + +hipsparseSetMatType() +--------------------- + +.. doxygenfunction:: hipsparseSetMatType + +hipsparseGetMatType() +--------------------- + +.. doxygenfunction:: hipsparseGetMatType + +hipsparseSetMatFillMode() +------------------------- + +.. doxygenfunction:: hipsparseSetMatFillMode + +hipsparseGetMatFillMode() +------------------------- + +.. doxygenfunction:: hipsparseGetMatFillMode + +hipsparseSetMatDiagType() +------------------------- + +.. doxygenfunction:: hipsparseSetMatDiagType + +hipsparseGetMatDiagType() +------------------------- + +.. doxygenfunction:: hipsparseGetMatDiagType + +hipsparseSetMatIndexBase() +-------------------------- + +.. doxygenfunction:: hipsparseSetMatIndexBase + +hipsparseGetMatIndexBase() +-------------------------- + +.. doxygenfunction:: hipsparseGetMatIndexBase + +hipsparseCreateHybMat() +----------------------- + +.. doxygenfunction:: hipsparseCreateHybMat + +hipsparseDestroyHybMat() +------------------------ + +.. doxygenfunction:: hipsparseDestroyHybMat + +hipsparseCreateBsrsv2Info() +--------------------------- + +.. doxygenfunction:: hipsparseCreateBsrsv2Info + +hipsparseDestroyBsrsv2Info() +---------------------------- + +.. doxygenfunction:: hipsparseDestroyBsrsv2Info + +hipsparseCreateBsrsm2Info() +--------------------------- + +.. doxygenfunction:: hipsparseCreateBsrsm2Info + +hipsparseDestroyBsrsm2Info() +---------------------------- + +.. doxygenfunction:: hipsparseDestroyBsrsm2Info + +hipsparseCreateBsrilu02Info() +----------------------------- + +.. doxygenfunction:: hipsparseCreateBsrilu02Info + +hipsparseDestroyBsrilu02Info() +------------------------------ + +.. doxygenfunction:: hipsparseDestroyBsrilu02Info + +hipsparseCreateBsric02Info() +---------------------------- + +.. doxygenfunction:: hipsparseCreateBsric02Info + +hipsparseDestroyBsric02Info() +----------------------------- + +.. doxygenfunction:: hipsparseDestroyBsric02Info + +hipsparseCreateCsrsv2Info() +--------------------------- + +.. doxygenfunction:: hipsparseCreateCsrsv2Info + +hipsparseDestroyCsrsv2Info() +---------------------------- + +.. doxygenfunction:: hipsparseDestroyCsrsv2Info + +hipsparseCreateCsrsm2Info() +--------------------------- + +.. doxygenfunction:: hipsparseCreateCsrsm2Info + +hipsparseDestroyCsrsm2Info() +---------------------------- + +.. doxygenfunction:: hipsparseDestroyCsrsm2Info + +hipsparseCreateCsrilu02Info() +----------------------------- + +.. doxygenfunction:: hipsparseCreateCsrilu02Info + +hipsparseDestroyCsrilu02Info() +------------------------------ + +.. doxygenfunction:: hipsparseDestroyCsrilu02Info + +hipsparseCreateCsric02Info() +---------------------------- + +.. doxygenfunction:: hipsparseCreateCsric02Info + +hipsparseDestroyCsric02Info() +----------------------------- + +.. doxygenfunction:: hipsparseDestroyCsric02Info + +hipsparseCreateCsru2csrInfo() +----------------------------- + +.. doxygenfunction:: hipsparseCreateCsru2csrInfo + +hipsparseDestroyCsru2csrInfo() +------------------------------ + +.. doxygenfunction:: hipsparseDestroyCsru2csrInfo + +hipsparseCreateColorInfo() +-------------------------- + +.. doxygenfunction:: hipsparseCreateColorInfo + +hipsparseDestroyColorInfo() +--------------------------- + +.. doxygenfunction:: hipsparseDestroyColorInfo + +hipsparseCreateCsrgemm2Info() +----------------------------- + +.. doxygenfunction:: hipsparseCreateCsrgemm2Info + +hipsparseDestroyCsrgemm2Info() +------------------------------ + +.. doxygenfunction:: hipsparseDestroyCsrgemm2Info + +hipsparseCreatePruneInfo() +-------------------------- + +.. doxygenfunction:: hipsparseCreatePruneInfo + +hipsparseDestroyPruneInfo() +--------------------------- + +.. doxygenfunction:: hipsparseDestroyPruneInfo + +hipsparseCreateSpVec() +---------------------- + +.. doxygenfunction:: hipsparseCreateSpVec + +hipsparseDestroySpVec() +----------------------- + +.. doxygenfunction:: hipsparseDestroySpVec + +hipsparseSpVecGet() +------------------- + +.. doxygenfunction:: hipsparseSpVecGet + +hipsparseSpVecGetIndexBase() +---------------------------- + +.. doxygenfunction:: hipsparseSpVecGetIndexBase + +hipsparseSpVecGetValues() +------------------------- + +.. doxygenfunction:: hipsparseSpVecGetValues + +hipsparseSpVecSetValues() +------------------------- + +.. doxygenfunction:: hipsparseSpVecSetValues + +hipsparseCreateCoo() +-------------------- + +.. doxygenfunction:: hipsparseCreateCoo + +hipsparseCreateCooAoS() +----------------------- + +.. doxygenfunction:: hipsparseCreateCooAoS + +hipsparseCreateCsr() +-------------------- + +.. doxygenfunction:: hipsparseCreateCsr + +hipsparseCreateCsc() +-------------------- + +.. doxygenfunction:: hipsparseCreateCsc + +hipsparseCreateBlockedEll() +--------------------------- + +.. doxygenfunction:: hipsparseCreateBlockedEll + +hipsparseDestroySpMat() +----------------------- + +.. doxygenfunction:: hipsparseDestroySpMat + +hipsparseCooGet() +----------------- + +.. doxygenfunction:: hipsparseCooGet + +hipsparseCooAoSGet() +-------------------- + +.. doxygenfunction:: hipsparseCooAoSGet + +hipsparseCsrGet() +----------------- + +.. doxygenfunction:: hipsparseCsrGet + +hipsparseBlockedEllGet() +------------------------ + +.. doxygenfunction:: hipsparseBlockedEllGet + +hipsparseCsrSetPointers() +------------------------- + +.. doxygenfunction:: hipsparseCsrSetPointers + +hipsparseCscSetPointers() +------------------------- + +.. doxygenfunction:: hipsparseCscSetPointers + +hipsparseCooSetPointers() +------------------------- + +.. doxygenfunction:: hipsparseCooSetPointers + +hipsparseSpMatGetSize() +----------------------- + +.. doxygenfunction:: hipsparseSpMatGetSize + +hipsparseSpMatGetFormat() +------------------------- + +.. doxygenfunction:: hipsparseSpMatGetFormat + +hipsparseSpMatGetIndexBase() +---------------------------- + +.. doxygenfunction:: hipsparseSpMatGetIndexBase + +hipsparseSpMatGetValues() +------------------------- + +.. doxygenfunction:: hipsparseSpMatGetValues + +hipsparseSpMatSetValues() +------------------------- + +.. doxygenfunction:: hipsparseSpMatSetValues + +hipsparseSpMatGetAttribute() +---------------------------- + +.. doxygenfunction:: hipsparseSpMatGetAttribute + +hipsparseSpMatSetAttribute() +---------------------------- + +.. doxygenfunction:: hipsparseSpMatSetAttribute + +hipsparseCreateDnVec() +---------------------- + +.. doxygenfunction:: hipsparseCreateDnVec + +hipsparseDestroyDnVec() +----------------------- + +.. doxygenfunction:: hipsparseDestroyDnVec + +hipsparseDnVecGet() +------------------- + +.. doxygenfunction:: hipsparseDnVecGet + +hipsparseDnVecGetValues() +------------------------- + +.. doxygenfunction:: hipsparseDnVecGetValues + +hipsparseDnVecSetValues() +------------------------- + +.. doxygenfunction:: hipsparseDnVecSetValues + +hipsparseCreateDnMat() +---------------------- + +.. doxygenfunction:: hipsparseCreateDnMat + +hipsparseDestroyDnMat() +----------------------- + +.. doxygenfunction:: hipsparseDestroyDnMat + +hipsparseDnMatGet() +------------------- + +.. doxygenfunction:: hipsparseDnMatGet + +hipsparseDnMatGetValues() +------------------------- + +.. doxygenfunction:: hipsparseDnMatGetValues + +hipsparseDnMatSetValues() +------------------------- + +.. doxygenfunction:: hipsparseDnMatSetValues \ No newline at end of file diff --git a/docs/basics.rst b/docs/basics.rst new file mode 100644 index 00000000..10a6bb9d --- /dev/null +++ b/docs/basics.rst @@ -0,0 +1,749 @@ +Device and Stream Management +============================ +:cpp:func:`hipSetDevice` and :cpp:func:`hipGetDevice` are HIP device management APIs. +They are NOT part of the hipSPARSE API. + +Asynchronous Execution +---------------------- +All hipSPARSE library functions, unless otherwise stated, are non blocking and executed asynchronously with respect to the host. They may return before the actual computation has finished. To force synchronization, :cpp:func:`hipDeviceSynchronize` or :cpp:func:`hipStreamSynchronize` can be used. This will ensure that all previously executed hipSPARSE functions on the device / this particular stream have completed. + +HIP Device Management +--------------------- +Before a HIP kernel invocation, users need to call :cpp:func:`hipSetDevice` to set a device, e.g. device 1. If users do not explicitly call it, the system by default sets it as device 0. Unless users explicitly call :cpp:func:`hipSetDevice` to set to another device, their HIP kernels are always launched on device 0. + +The above is a HIP (and CUDA) device management approach and has nothing to do with hipSPARSE. hipSPARSE honors the approach above and assumes users have already set the device before a hipSPARSE routine call. + +Once users set the device, they create a handle with :ref:`hipsparse_create_handle_`. + +Subsequent hipSPARSE routines take this handle as an input parameter. hipSPARSE ONLY queries (by :cpp:func:`hipGetDevice`) the user's device; hipSPARSE does NOT set the device for users. If hipSPARSE does not see a valid device, it returns an error message. It is the users' responsibility to provide a valid device to hipSPARSE and ensure the device safety. + +Users CANNOT switch devices between :ref:`hipsparse_create_handle_` and :ref:`hipsparse_destroy_handle_`. If users want to change device, they must destroy the current handle and create another hipSPARSE handle. + +HIP Stream Management +--------------------- +HIP kernels are always launched in a queue (also known as stream). + +If users do not explicitly specify a stream, the system provides a default stream, maintained by the system. Users cannot create or destroy the default stream. However, users can freely create new streams (with :cpp:func:`hipStreamCreate`) and bind it to the hipSPARSE handle using :ref:`hipsparse_set_stream_`. HIP kernels are invoked in hipSPARSE routines. The hipSPARSE handle is always associated with a stream, and hipSPARSE passes its stream to the kernels inside the routine. One hipSPARSE routine only takes one stream in a single invocation. If users create a stream, they are responsible for destroying it. + +Multiple Streams and Multiple Devices +------------------------------------- +If the system under test has multiple HIP devices, users can run multiple hipSPARSE handles concurrently, but can NOT run a single hipSPARSE handle on different discrete devices. Each handle is associated with a particular singular device, and a new handle should be created for each additional device. + +Storage Formats +=============== + +COO storage format +------------------ +The Coordinate (COO) storage format represents a :math:`m \times n` matrix by + +=========== ================================================================== +m number of rows (integer). +n number of columns (integer). +nnz number of non-zero elements (integer). +coo_val array of ``nnz`` elements containing the data (floating point). +coo_row_ind array of ``nnz`` elements containing the row indices (integer). +coo_col_ind array of ``nnz`` elements containing the column indices (integer). +=========== ================================================================== + +The COO matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. +Consider the following :math:`3 \times 5` matrix and the corresponding COO structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ + 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ + 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ + \end{pmatrix} + +where + +.. math:: + + \begin{array}{ll} + \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ + \text{coo_row_ind}[8] & = \{0, 0, 0, 1, 1, 2, 2, 2\} \\ + \text{coo_col_ind}[8] & = \{0, 1, 3, 1, 2, 0, 3, 4\} + \end{array} + +COO (AoS) storage format +------------------------ +The Coordinate (COO) Array of Structure (AoS) storage format represents a :math:`m \times n` matrix by + +======= ========================================================================================== +m number of rows (integer). +n number of columns (integer). +nnz number of non-zero elements (integer). +coo_val array of ``nnz`` elements containing the data (floating point). +coo_ind array of ``2 * nnz`` elements containing alternating row and column indices (integer). +======= ========================================================================================== + +The COO (AoS) matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. +Consider the following :math:`3 \times 5` matrix and the corresponding COO (AoS) structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ + 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ + 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ + \end{pmatrix} + +where + +.. math:: + + \begin{array}{ll} + \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ + \text{coo_ind}[16] & = \{0, 0, 0, 1, 0, 3, 1, 1, 1, 2, 2, 0, 2, 3, 2, 4\} \\ + \end{array} + +CSR storage format +------------------ +The Compressed Sparse Row (CSR) storage format represents a :math:`m \times n` matrix by + +=========== ========================================================================= +m number of rows (integer). +n number of columns (integer). +nnz number of non-zero elements (integer). +csr_val array of ``nnz`` elements containing the data (floating point). +csr_row_ptr array of ``m+1`` elements that point to the start of every row (integer). +csr_col_ind array of ``nnz`` elements containing the column indices (integer). +=========== ========================================================================= + +The CSR matrix is expected to be sorted by column indices within each row. Furthermore, each pair of indices should appear only once. +Consider the following :math:`3 \times 5` matrix and the corresponding CSR structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using one based indexing: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ + 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ + 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ + \end{pmatrix} + +where + +.. math:: + + \begin{array}{ll} + \text{csr_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ + \text{csr_row_ptr}[4] & = \{1, 4, 6, 9\} \\ + \text{csr_col_ind}[8] & = \{1, 2, 4, 2, 3, 1, 4, 5\} + \end{array} + +BSR storage format +------------------ +The Block Compressed Sparse Row (BSR) storage format represents a :math:`(mb \cdot \text{bsr_dim}) \times (nb \cdot \text{bsr_dim})` matrix by + +=========== ==================================================================================================================================== +mb number of block rows (integer) +nb number of block columns (integer) +nnzb number of non-zero blocks (integer) +bsr_val array of ``nnzb * bsr_dim * bsr_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major. +bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer). +bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer). +bsr_dim dimension of each block (integer). +=========== ==================================================================================================================================== + +The BSR matrix is expected to be sorted by column indices within each row. If :math:`m` or :math:`n` are not evenly divisible by the block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_dim} - 1) / \text{bsr_dim}` and :math:`nb = (n + \text{bsr_dim} - 1) / \text{bsr_dim}`. +Consider the following :math:`4 \times 3` matrix and the corresponding BSR structures, with :math:`\text{bsr_dim} = 2, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 0.0 & 2.0 \\ + 3.0 & 0.0 & 4.0 \\ + 5.0 & 6.0 & 0.0 \\ + 7.0 & 0.0 & 8.0 \\ + \end{pmatrix} + +with the blocks :math:`A_{ij}` + +.. math:: + + A_{00} = \begin{pmatrix} + 1.0 & 0.0 \\ + 3.0 & 0.0 \\ + \end{pmatrix}, + A_{01} = \begin{pmatrix} + 2.0 & 0.0 \\ + 4.0 & 0.0 \\ + \end{pmatrix}, + A_{10} = \begin{pmatrix} + 5.0 & 6.0 \\ + 7.0 & 0.0 \\ + \end{pmatrix}, + A_{11} = \begin{pmatrix} + 0.0 & 0.0 \\ + 8.0 & 0.0 \\ + \end{pmatrix} + +such that + +.. math:: + + A = \begin{pmatrix} + A_{00} & A_{01} \\ + A_{10} & A_{11} \\ + \end{pmatrix} + +with arrays representation + +.. math:: + + \begin{array}{ll} + \text{bsr_val}[16] & = \{1.0, 3.0, 0.0, 0.0, 2.0, 4.0, 0.0, 0.0, 5.0, 7.0, 6.0, 0.0, 0.0, 8.0, 0.0, 0.0\} \\ + \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\ + \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} + \end{array} + +GEBSR storage format +-------------------- +The General Block Compressed Sparse Row (GEBSR) storage format represents a :math:`(mb \cdot \text{bsr_row_dim}) \times (nb \cdot \text{bsr_col_dim})` matrix by + +=========== ==================================================================================================================================== +mb number of block rows (integer) +nb number of block columns (integer) +nnzb number of non-zero blocks (integer) +bsr_val array of ``nnzb * bsr_row_dim * bsr_col_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major. +bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer). +bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer). +bsr_row_dim row dimension of each block (integer). +bsr_col_dim column dimension of each block (integer). +=========== ==================================================================================================================================== + +The GEBSR matrix is expected to be sorted by column indices within each row. If :math:`m` is not evenly divisible by the row block dimension or :math:`n` is not evenly +divisible by the column block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_row_dim} - 1) / \text{bsr_row_dim}` and +:math:`nb = (n + \text{bsr_col_dim} - 1) / \text{bsr_col_dim}`. Consider the following :math:`4 \times 5` matrix and the corresponding GEBSR structures, +with :math:`\text{bsr_row_dim} = 2`, :math:`\text{bsr_col_dim} = 3`, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 0.0 & 0.0 & 2.0 & 0.0 \\ + 3.0 & 0.0 & 4.0 & 0.0 & 0.0 \\ + 5.0 & 6.0 & 0.0 & 7.0 & 0.0 \\ + 0.0 & 0.0 & 8.0 & 0.0 & 9.0 \\ + \end{pmatrix} + +with the blocks :math:`A_{ij}` + +.. math:: + + A_{00} = \begin{pmatrix} + 1.0 & 0.0 & 0.0 \\ + 3.0 & 0.0 & 4.0 \\ + \end{pmatrix}, + A_{01} = \begin{pmatrix} + 2.0 & 0.0 & 0.0 \\ + 0.0 & 0.0 & 0.0 \\ + \end{pmatrix}, + A_{10} = \begin{pmatrix} + 5.0 & 6.0 & 0.0 \\ + 0.0 & 0.0 & 8.0 \\ + \end{pmatrix}, + A_{11} = \begin{pmatrix} + 7.0 & 0.0 & 0.0 \\ + 0.0 & 9.0 & 0.0 \\ + \end{pmatrix} + +such that + +.. math:: + + A = \begin{pmatrix} + A_{00} & A_{01} \\ + A_{10} & A_{11} \\ + \end{pmatrix} + +with arrays representation + +.. math:: + + \begin{array}{ll} + \text{bsr_val}[24] & = \{1.0, 3.0, 0.0, 0.0, 0.0, 4.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 6.0, 0.0, 0.0, 8.0, 7.0, 0.0, 0.0, 9.0, 0.0, 0.0\} \\ + \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\ + \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} + \end{array} + +ELL storage format +------------------ +The Ellpack-Itpack (ELL) storage format represents a :math:`m \times n` matrix by + +=========== ================================================================================ +m number of rows (integer). +n number of columns (integer). +ell_width maximum number of non-zero elements per row (integer) +ell_val array of ``m times ell_width`` elements containing the data (floating point). +ell_col_ind array of ``m times ell_width`` elements containing the column indices (integer). +=========== ================================================================================ + +The ELL matrix is assumed to be stored in column-major format. Rows with less than ``ell_width`` non-zero elements are padded with zeros (``ell_val``) and :math:`-1` (``ell_col_ind``). +Consider the following :math:`3 \times 5` matrix and the corresponding ELL structures, with :math:`m = 3, n = 5` and :math:`\text{ell_width} = 3` using zero based indexing: + +.. math:: + + A = \begin{pmatrix} + 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ + 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ + 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ + \end{pmatrix} + +where + +.. math:: + + \begin{array}{ll} + \text{ell_val}[9] & = \{1.0, 4.0, 6.0, 2.0, 5.0, 7.0, 3.0, 0.0, 8.0\} \\ + \text{ell_col_ind}[9] & = \{0, 1, 0, 1, 2, 3, 3, -1, 4\} + \end{array} + +.. _HYB storage format: + +HYB storage format +------------------ +The Hybrid (HYB) storage format represents a :math:`m \times n` matrix by + +=========== ========================================================================================= +m number of rows (integer). +n number of columns (integer). +nnz number of non-zero elements of the COO part (integer) +ell_width maximum number of non-zero elements per row of the ELL part (integer) +ell_val array of ``m times ell_width`` elements containing the ELL part data (floating point). +ell_col_ind array of ``m times ell_width`` elements containing the ELL part column indices (integer). +coo_val array of ``nnz`` elements containing the COO part data (floating point). +coo_row_ind array of ``nnz`` elements containing the COO part row indices (integer). +coo_col_ind array of ``nnz`` elements containing the COO part column indices (integer). +=========== ========================================================================================= + +The HYB format is a combination of the ELL and COO sparse matrix formats. Typically, the regular part of the matrix is stored in ELL storage format, and the irregular part of the matrix is stored in COO storage format. Three different partitioning schemes can be applied when converting a CSR matrix to a matrix in HYB storage format. For further details on the partitioning schemes, see :ref:`hipsparse_hyb_partition_`. + +.. _api: + +Exported Sparse Functions +========================= + +Auxiliary Functions +------------------- + ++------------------------------------------+ +|Function name | ++------------------------------------------+ +|:cpp:func:`hipsparseCreate` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroy` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetVersion` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetGitRevision` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetStream` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetStream` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetPointerMode` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetPointerMode` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateMatDescr` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyMatDescr` | ++------------------------------------------+ +|:cpp:func:`hipsparseCopyMatDescr` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetMatType` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetMatType` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetMatFillMode` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetMatFillMode` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetMatDiagType` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetMatDiagType` | ++------------------------------------------+ +|:cpp:func:`hipsparseSetMatIndexBase` | ++------------------------------------------+ +|:cpp:func:`hipsparseGetMatIndexBase` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateHybMat` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyHybMat` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateBsrsv2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyBsrsv2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateBsrsm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyBsrsm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateBsrilu02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyBsrilu02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateBsric02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyBsric02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsrsv2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsrsv2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsrsm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsrsm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsrilu02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsrilu02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsric02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsric02Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsru2csrInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsru2csrInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateColorInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyColorInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsrgemm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyCsrgemm2Info` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreatePruneInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyPruneInfo` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateSpVec` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroySpVec` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpVecGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpVecGetIndexBase` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpVecGetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpVecSetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCoo` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCooAoS` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsr` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateCsc` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateBlockedEll` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroySpMat` | ++------------------------------------------+ +|:cpp:func:`hipsparseCooGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseCooAoSGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseCsrGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseBlockedEllGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseCsrSetPointers` | ++------------------------------------------+ +|:cpp:func:`hipsparseCscSetPointers` | ++------------------------------------------+ +|:cpp:func:`hipsparseCooSetPointers` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatGetSize` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatGetFormat` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatGetIndexBase` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatGetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatSetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatGetAttribute` | ++------------------------------------------+ +|:cpp:func:`hipsparseSpMatSetAttribute` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateDnVec` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyDnVec` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnVecGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnVecGetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnVecSetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseCreateDnMat` | ++------------------------------------------+ +|:cpp:func:`hipsparseDestroyDnMat` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnMatGet` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnMatGetValues` | ++------------------------------------------+ +|:cpp:func:`hipsparseDnMatSetValues` | ++------------------------------------------+ + +Sparse Level 1 Functions +------------------------ + +================================================ ====== ====== ============== ============== +Function name single double single complex double complex +================================================ ====== ====== ============== ============== +:cpp:func:`hipsparseXaxpyi() ` x x x x +:cpp:func:`hipsparseXdoti() ` x x x x +:cpp:func:`hipsparseXdotci() ` x x +:cpp:func:`hipsparseXgthr() ` x x x x +:cpp:func:`hipsparseXgthrz() ` x x x x +:cpp:func:`hipsparseXroti() ` x x +:cpp:func:`hipsparseXsctr() ` x x x x +================================================ ====== ====== ============== ============== + +Sparse Level 2 Functions +------------------------ + +============================================================================== ====== ====== ============== ============== +Function name single double single complex double complex +============================================================================== ====== ====== ============== ============== +:cpp:func:`hipsparseXcsrmv() ` x x x x +:cpp:func:`hipsparseXcsrsv2_zeroPivot` +:cpp:func:`hipsparseXcsrsv2_bufferSize() ` x x x x +:cpp:func:`hipsparseXcsrsv2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsrsv2_analysis() ` x x x x +:cpp:func:`hipsparseXcsrsv2_solve() ` x x x x +:cpp:func:`hipsparseXhybmv() ` x x x x +:cpp:func:`hipsparseXbsrmv() ` x x x x +:cpp:func:`hipsparseXbsrxmv() ` x x x x +:cpp:func:`hipsparseXbsrsv2_zeroPivot` +:cpp:func:`hipsparseXbsrsv2_bufferSize() ` x x x x +:cpp:func:`hipsparseXbsrsv2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXbsrsv2_analysis() ` x x x x +:cpp:func:`hipsparseXbsrsv2_solve() ` x x x x +:cpp:func:`hipsparseXgemvi_bufferSize() ` x x x x +:cpp:func:`hipsparseXgemvi() ` x x x x +============================================================================== ====== ====== ============== ============== + +Sparse Level 3 Functions +------------------------ + +============================================================================= ====== ====== ============== ============== +Function name single double single complex double complex +============================================================================= ====== ====== ============== ============== +:cpp:func:`hipsparseXbsrmm() ` x x x x +:cpp:func:`hipsparseXcsrmm() ` x x x x +:cpp:func:`hipsparseXcsrmm2() ` x x x x +:cpp:func:`hipsparseXbsrsm2_zeroPivot` +:cpp:func:`hipsparseXbsrsm2_bufferSize() ` x x x x +:cpp:func:`hipsparseXbsrsm2_analysis() ` x x x x +:cpp:func:`hipsparseXbsrsm2_solve() ` x x x x +:cpp:func:`hipsparseXcsrsm2_zeroPivot` +:cpp:func:`hipsparseXcsrsm2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsrsm2_analysis() ` x x x x +:cpp:func:`hipsparseXcsrsm2_solve() ` x x x x +:cpp:func:`hipsparseXgemmi() ` x x x x +============================================================================= ====== ====== ============== ============== + +Sparse Extra Functions +---------------------- + +================================================================================== ====== ====== ============== ============== +Function name single double single complex double complex +================================================================================== ====== ====== ============== ============== +:cpp:func:`hipsparseXcsrgeamNnz()` +:cpp:func:`hipsparseXcsrgeam() ` x x x x +:cpp:func:`hipsparseXcsrgeam2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsrgeam2Nnz()` +:cpp:func:`hipsparseXcsrgeam2() ` x x x x +:cpp:func:`hipsparseXcsrgemmNnz` +:cpp:func:`hipsparseXcsrgemm() ` x x x x +:cpp:func:`hipsparseXcsrgemm2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsrgemm2Nnz` +:cpp:func:`hipsparseXcsrgemm2() ` x x x x +================================================================================== ====== ====== ============== ============== + +Preconditioner Functions +------------------------ + +===================================================================================================================== ====== ====== ============== ============== +Function name single double single complex double complex +===================================================================================================================== ====== ====== ============== ============== +:cpp:func:`hipsparseXbsrilu02_zeroPivot` +:cpp:func:`hipsparseXbsrilu02_numericBoost() ` x x x x +:cpp:func:`hipsparseXbsrilu02_bufferSize() ` x x x x +:cpp:func:`hipsparseXbsrilu02_analysis() ` x x x x +:cpp:func:`hipsparseXbsrilu02() ` x x x x +:cpp:func:`hipsparseXcsrilu02_zeroPivot` +:cpp:func:`hipsparseXcsrilu02_numericBoost() ` x x x x +:cpp:func:`hipsparseXcsrilu02_bufferSize() ` x x x x +:cpp:func:`hipsparseXcsrilu02_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsrilu02_analysis() ` x x x x +:cpp:func:`hipsparseXcsrilu02() ` x x x x +:cpp:func:`hipsparseXbsric02_zeroPivot` +:cpp:func:`hipsparseXbsric02_bufferSize() ` x x x x +:cpp:func:`hipsparseXbsric02_analysis() ` x x x x +:cpp:func:`hipsparseXbsric02() ` x x x x +:cpp:func:`hipsparseXcsric02_zeroPivot` +:cpp:func:`hipsparseXcsric02_bufferSize() ` x x x x +:cpp:func:`hipsparseXcsric02_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsric02_analysis() ` x x x x +:cpp:func:`hipsparseXcsric02() ` x x x x +:cpp:func:`hipsparseXgtsv2_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXgtsv2() ` x x x x +:cpp:func:`hipsparseXgtsv2_nopivot_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXgtsv2_nopivot() ` x x x x +:cpp:func:`hipsparseXgtsv2StridedBatch_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXgtsv2StridedBatch() ` x x x x +:cpp:func:`hipsparseXgtsvInterleavedBatch_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXgtsvInterleavedBatch() ` x x x x +:cpp:func:`hipsparseXgpsvInterleavedBatch_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXgpsvInterleavedBatch() ` x x x x +===================================================================================================================== ====== ====== ============== ============== + +Conversion Functions +-------------------- + +====================================================================================================================== ====== ====== ============== ============== +Function name single double single complex double complex +====================================================================================================================== ====== ====== ============== ============== +:cpp:func:`hipsparseXnnz() ` x x x x +:cpp:func:`hipsparseXdense2csr() ` x x x x +:cpp:func:`hipsparseXpruneDense2csr_bufferSize() ` x x +:cpp:func:`hipsparseXpruneDense2csrNnz() ` x x +:cpp:func:`hipsparseXpruneDense2csr() ` x x +:cpp:func:`hipsparseXpruneDense2csrByPercentage_bufferSize() ` x x +:cpp:func:`hipsparseXpruneDense2csrByPercentage_bufferSizeExt() ` x x +:cpp:func:`hipsparseXpruneDense2csrNnzByPercentage() ` x x +:cpp:func:`hipsparseXpruneDense2csrByPercentage() ` x x +:cpp:func:`hipsparseXdense2csc() ` x x x x +:cpp:func:`hipsparseXcsr2dense() ` x x x x +:cpp:func:`hipsparseXcsc2dense() ` x x x x +:cpp:func:`hipsparseXcsr2bsrNnz` +:cpp:func:`hipsparseXcsr2bsr() ` x x x x +:cpp:func:`hipsparseXnnz_compress() ` x x x x +:cpp:func:`hipsparseXcsr2coo` +:cpp:func:`hipsparseXcsr2csc() ` x x x x +:cpp:func:`hipsparseXcsr2hyb() ` x x x x +:cpp:func:`hipsparseXgebsr2gebsc_bufferSize ` x x x x +:cpp:func:`hipsparseXgebsr2gebsc() ` x x x x +:cpp:func:`hipsparseXcsr2gebsr_bufferSize() ` x x x x +:cpp:func:`hipsparseXcsr2gebsrNnz` +:cpp:func:`hipsparseXcsr2gebsr() ` x x x x +:cpp:func:`hipsparseXbsr2csr() ` x x x x +:cpp:func:`hipsparseXgebsr2csr() ` x x x x +:cpp:func:`hipsparseXcsr2csr_compress() ` x x x x +:cpp:func:`hipsparseXpruneCsr2csr_bufferSize() ` x x +:cpp:func:`hipsparseXpruneCsr2csr_bufferSizeExt() ` x x +:cpp:func:`hipsparseXpruneCsr2csrNnz() ` x x +:cpp:func:`hipsparseXpruneCsr2csr() ` x x +:cpp:func:`hipsparseXpruneCsr2csrByPercentage_bufferSize() ` x x +:cpp:func:`hipsparseXpruneCsr2csrByPercentage_bufferSizeExt() ` x x +:cpp:func:`hipsparseXpruneCsr2csrNnzByPercentage() ` x x +:cpp:func:`hipsparseXpruneCsr2csrByPercentage() ` x x +:cpp:func:`hipsparseXhyb2csr() ` x x x x +:cpp:func:`hipsparseXcoo2csr` +:cpp:func:`hipsparseCreateIdentityPermutation` +:cpp:func:`hipsparseXcsrsort_bufferSizeExt` +:cpp:func:`hipsparseXcsrsort` +:cpp:func:`hipsparseXcscsort_bufferSizeExt` +:cpp:func:`hipsparseXcscsort` +:cpp:func:`hipsparseXcoosort_bufferSizeExt` +:cpp:func:`hipsparseXcoosortByRow` +:cpp:func:`hipsparseXcoosortByColumn` +:cpp:func:`hipsparseXgebsr2gebsr_bufferSize() ` x x x x +:cpp:func:`hipsparseXgebsr2gebsrNnz()` +:cpp:func:`hipsparseXgebsr2gebsr() ` x x x x +:cpp:func:`hipsparseXcsru2csr_bufferSizeExt() ` x x x x +:cpp:func:`hipsparseXcsru2csr() ` x x x x +:cpp:func:`hipsparseXcsr2csru() ` x x x x +====================================================================================================================== ====== ====== ============== ============== + +Reordering Functions +-------------------- + +======================================================= ====== ====== ============== ============== +Function name single double single complex double complex +======================================================= ====== ====== ============== ============== +:cpp:func:`hipsparseXcsrcolor() ` x x x x +======================================================= ====== ====== ============== ============== + +Sparse Generic Functions +------------------------ + +=============================================== ====== ====== ============== ============== +Function name single double single complex double complex +=============================================== ====== ====== ============== ============== +:cpp:func:`hipsparseAxpby()` x x x x +:cpp:func:`hipsparseGather()` x x x x +:cpp:func:`hipsparseScatter()` x x x x +:cpp:func:`hipsparseRot()` x x x x +:cpp:func:`hipsparseSparseToDense_bufferSize()` x x x x +:cpp:func:`hipsparseSparseToDense()` x x x x +:cpp:func:`hipsparseDenseToSparse_bufferSize()` x x x x +:cpp:func:`hipsparseDenseToSparse_analysis()` x x x x +:cpp:func:`hipsparseDenseToSparse_convert()` x x x x +:cpp:func:`hipsparseSpVV_bufferSize()` x x x x +:cpp:func:`hipsparseSpVV()` x x x x +:cpp:func:`hipsparseSpMV_bufferSize()` x x x x +:cpp:func:`hipsparseSpMV()` x x x x +:cpp:func:`hipsparseSpMM_bufferSize()` x x x x +:cpp:func:`hipsparseSpMM_preprocess()` x x x x +:cpp:func:`hipsparseSpMM()` x x x x +:cpp:func:`hipsparseSpGEMM_createDescr()` x x x x +:cpp:func:`hipsparseSpGEMM_destroyDescr()` x x x x +:cpp:func:`hipsparseSpGEMM_workEstimation()` x x x x +:cpp:func:`hipsparseSpGEMM_compute()` x x x x +:cpp:func:`hipsparseSpGEMM_copy()` x x x x +:cpp:func:`hipsparseSDDMM_bufferSize()` x x x x +:cpp:func:`hipsparseSDDMM_preprocess()` x x x x +:cpp:func:`hipsparseSDDMM()` x x x x +:cpp:func:`hipsparseSpSV_createDescr()` x x x x +:cpp:func:`hipsparseSpSV_destroyDescr()` x x x x +:cpp:func:`hipsparseSpSV_bufferSize()` x x x x +:cpp:func:`hipsparseSpSV_analysis()` x x x x +:cpp:func:`hipsparseSpSV_solve()` x x x x +:cpp:func:`hipsparseSpSM_createDescr()` x x x x +:cpp:func:`hipsparseSpSM_destroyDescr()` x x x x +:cpp:func:`hipsparseSpSM_bufferSize()` x x x x +:cpp:func:`hipsparseSpSM_analysis()` x x x x +:cpp:func:`hipsparseSpSM_solve()` x x x x +=============================================== ====== ====== ============== ============== + +Storage schemes and indexing base +--------------------------------- +hipSPARSE supports 0 and 1 based indexing. +The index base is selected by the :cpp:enum:`hipsparseIndexBase_t` type which is either passed as standalone parameter or as part of the :cpp:type:`hipsparseMatDescr_t` type. + +Furthermore, dense vectors are represented with a 1D array, stored linearly in memory. +Sparse vectors are represented by a 1D data array stored linearly in memory that hold all non-zero elements and a 1D indexing array stored linearly in memory that hold the positions of the corresponding non-zero elements. + +Pointer mode +------------ +The auxiliary functions :cpp:func:`hipsparseSetPointerMode` and :cpp:func:`hipsparseGetPointerMode` are used to set and get the value of the state variable :cpp:enum:`hipsparsePointerMode_t`. +If :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`, then scalar parameters must be allocated on the host. +If :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, then scalar parameters must be allocated on the device. + +There are two types of scalar parameter: + + 1. Scaling parameters, such as `alpha` and `beta` used in e.g. :cpp:func:`hipsparseScsrmv`, :cpp:func:`hipsparseSbsrmv`, ... + 2. Scalar results from functions such as :cpp:func:`hipsparseSdoti`, :cpp:func:`hipsparseCdotci`, ... + +For scalar parameters such as alpha and beta, memory can be allocated on the host heap or stack, when :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`. +The kernel launch is asynchronous, and if the scalar parameter is on the heap, it can be freed after the return from the kernel launch. +When :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, the scalar parameter must not be changed till the kernel completes. + +For scalar results, when :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`, the function blocks the CPU till the GPU has copied the result back to the host. +Using :cpp:enum:`hipsparsePointerMode_t` equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, the function will return after the asynchronous launch. +Similarly to vector and matrix results, the scalar result is only available when the kernel has completed execution. + +Asynchronous API +---------------- +Except a functions having memory allocation inside preventing asynchronicity, all hipSPARSE functions are configured to operate in non-blocking fashion with respect to CPU, meaning these library functions return immediately. diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..89de76b2 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,14 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +from rocm_docs import ROCmDocs + +docs_core = ROCmDocs("hipSPARSE Documentation") +docs_core.run_doxygen() +docs_core.setup() + +for sphinx_var in ROCmDocs.SPHINX_VARS: + globals()[sphinx_var] = getattr(docs_core, sphinx_var) diff --git a/docs/conversion.rst b/docs/conversion.rst new file mode 100644 index 00000000..f9d39ddc --- /dev/null +++ b/docs/conversion.rst @@ -0,0 +1,430 @@ +.. _hipsparse_conversion_functions_: + +Sparse Conversion Functions +=========================== + +This module holds all sparse conversion routines. + +The sparse conversion routines describe operations on a matrix in sparse format to obtain a matrix in a different sparse format. + +hipsparseXnnz() +--------------- + +.. doxygenfunction:: hipsparseSnnz + :outline: +.. doxygenfunction:: hipsparseDnnz + :outline: +.. doxygenfunction:: hipsparseCnnz + :outline: +.. doxygenfunction:: hipsparseZnnz + +hipsparseXdense2csr() +--------------------- + +.. doxygenfunction:: hipsparseSdense2csr + :outline: +.. doxygenfunction:: hipsparseDdense2csr + :outline: +.. doxygenfunction:: hipsparseCdense2csr + :outline: +.. doxygenfunction:: hipsparseZdense2csr + +hipsparseXpruneDense2csr_bufferSize() +------------------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csr_bufferSize + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csr_bufferSize + +hipsparseXpruneDense2csrNnz() +----------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csrNnz + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csrNnz + +hipsparseXpruneDense2csr() +-------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csr + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csr + +hipsparseXpruneDense2csrByPercentage_bufferSize() +------------------------------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage_bufferSize + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage_bufferSize + +hipsparseXpruneDense2csrByPercentage_bufferSizeExt() +---------------------------------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage_bufferSizeExt + +hipsparseXpruneDense2csrNnzByPercentage() +----------------------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csrNnzByPercentage + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csrNnzByPercentage + +hipsparseXpruneDense2csrByPercentage() +-------------------------------------- + +.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage + :outline: +.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage + +hipsparseXdense2csc() +--------------------- + +.. doxygenfunction:: hipsparseSdense2csc + :outline: +.. doxygenfunction:: hipsparseDdense2csc + :outline: +.. doxygenfunction:: hipsparseCdense2csc + :outline: +.. doxygenfunction:: hipsparseZdense2csc + +hipsparseXcsr2dense() +--------------------- + +.. doxygenfunction:: hipsparseScsr2dense + :outline: +.. doxygenfunction:: hipsparseDcsr2dense + :outline: +.. doxygenfunction:: hipsparseCcsr2dense + :outline: +.. doxygenfunction:: hipsparseZcsr2dense + +hipsparseXcsc2dense() +--------------------- + +.. doxygenfunction:: hipsparseScsc2dense + :outline: +.. doxygenfunction:: hipsparseDcsc2dense + :outline: +.. doxygenfunction:: hipsparseCcsc2dense + :outline: +.. doxygenfunction:: hipsparseZcsc2dense + +hipsparseXcsr2bsrNnz() +---------------------- + +.. doxygenfunction:: hipsparseXcsr2bsrNnz + +hipsparseXcsr2bsr() +------------------- + +.. doxygenfunction:: hipsparseScsr2bsr + :outline: +.. doxygenfunction:: hipsparseDcsr2bsr + :outline: +.. doxygenfunction:: hipsparseCcsr2bsr + :outline: +.. doxygenfunction:: hipsparseZcsr2bsr + +hipsparseXnnz_compress() +------------------------ + +.. doxygenfunction:: hipsparseSnnz_compress + :outline: +.. doxygenfunction:: hipsparseDnnz_compress + :outline: +.. doxygenfunction:: hipsparseCnnz_compress + :outline: +.. doxygenfunction:: hipsparseZnnz_compress + +hipsparseXcsr2coo() +------------------- + +.. doxygenfunction:: hipsparseXcsr2coo + +hipsparseXcsr2csc() +------------------- + +.. doxygenfunction:: hipsparseScsr2csc + :outline: +.. doxygenfunction:: hipsparseDcsr2csc + :outline: +.. doxygenfunction:: hipsparseCcsr2csc + :outline: +.. doxygenfunction:: hipsparseZcsr2csc + +hipsparseXcsr2cscEx2_bufferSize() +--------------------------------- + +.. doxygenfunction:: hipsparseCsr2cscEx2_bufferSize + +hipsparseXcsr2cscEx2() +---------------------- + +.. doxygenfunction:: hipsparseCsr2cscEx2 + +hipsparseXcsr2hyb() +------------------- + +.. doxygenfunction:: hipsparseScsr2hyb + :outline: +.. doxygenfunction:: hipsparseDcsr2hyb + :outline: +.. doxygenfunction:: hipsparseCcsr2hyb + :outline: +.. doxygenfunction:: hipsparseZcsr2hyb + +hipsparseXgebsr2gebsc_bufferSize() +---------------------------------- + +.. doxygenfunction:: hipsparseSgebsr2gebsc_bufferSize + :outline: +.. doxygenfunction:: hipsparseDgebsr2gebsc_bufferSize + :outline: +.. doxygenfunction:: hipsparseCgebsr2gebsc_bufferSize + :outline: +.. doxygenfunction:: hipsparseZgebsr2gebsc_bufferSize + +hipsparseXgebsr2gebsc() +----------------------- + +.. doxygenfunction:: hipsparseSgebsr2gebsc + :outline: +.. doxygenfunction:: hipsparseDgebsr2gebsc + :outline: +.. doxygenfunction:: hipsparseCgebsr2gebsc + :outline: +.. doxygenfunction:: hipsparseZgebsr2gebsc + +hipsparseXcsr2gebsr_bufferSize() +-------------------------------- + +.. doxygenfunction:: hipsparseScsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseDcsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseCcsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseZcsr2gebsr_bufferSize + +hipsparseXcsr2gebsrNnz() +------------------------ + +.. doxygenfunction:: hipsparseXcsr2gebsrNnz + +hipsparseXcsr2gebsr() +--------------------- + +.. doxygenfunction:: hipsparseScsr2gebsr + :outline: +.. doxygenfunction:: hipsparseDcsr2gebsr + :outline: +.. doxygenfunction:: hipsparseCcsr2gebsr + :outline: +.. doxygenfunction:: hipsparseZcsr2gebsr + +hipsparseXbsr2csr() +------------------- + +.. doxygenfunction:: hipsparseSbsr2csr + :outline: +.. doxygenfunction:: hipsparseDbsr2csr + :outline: +.. doxygenfunction:: hipsparseCbsr2csr + :outline: +.. doxygenfunction:: hipsparseZbsr2csr + +hipsparseXgebsr2csr() +--------------------- + +.. doxygenfunction:: hipsparseSgebsr2csr + :outline: +.. doxygenfunction:: hipsparseDgebsr2csr + :outline: +.. doxygenfunction:: hipsparseCgebsr2csr + :outline: +.. doxygenfunction:: hipsparseZgebsr2csr + +hipsparseXcsr2csr_compress() +---------------------------- + +.. doxygenfunction:: hipsparseScsr2csr_compress + :outline: +.. doxygenfunction:: hipsparseDcsr2csr_compress + :outline: +.. doxygenfunction:: hipsparseCcsr2csr_compress + :outline: +.. doxygenfunction:: hipsparseZcsr2csr_compress + +hipsparseXpruneCsr2csr_bufferSize() +----------------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csr_bufferSize + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csr_bufferSize + +hipsparseXpruneCsr2csr_bufferSizeExt() +-------------------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csr_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csr_bufferSizeExt + +hipsparseXpruneCsr2csrNnz() +--------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csrNnz + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csrNnz + +hipsparseXpruneCsr2csr() +------------------------ + +.. doxygenfunction:: hipsparseSpruneCsr2csr + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csr + +hipsparseXpruneCsr2csrByPercentage_bufferSize() +----------------------------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage_bufferSize + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage_bufferSize + +hipsparseXpruneCsr2csrByPercentage_bufferSizeExt() +-------------------------------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage_bufferSizeExt + +hipsparseXpruneCsr2csrNnzByPercentage() +--------------------------------------- + +.. doxygenfunction:: hipsparseSpruneCsr2csrNnzByPercentage + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csrNnzByPercentage + +hipsparseXpruneCsr2csrByPercentage() +------------------------------------ + +.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage + :outline: +.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage + +hipsparseXhyb2csr() +------------------- + +.. doxygenfunction:: hipsparseShyb2csr + :outline: +.. doxygenfunction:: hipsparseDhyb2csr + :outline: +.. doxygenfunction:: hipsparseChyb2csr + :outline: +.. doxygenfunction:: hipsparseZhyb2csr + +hipsparseXcoo2csr() +------------------- + +.. doxygenfunction:: hipsparseXcoo2csr + +hipsparseCreateIdentityPermutation() +------------------------------------ + +.. doxygenfunction:: hipsparseCreateIdentityPermutation + +hipsparseXcsrsort_bufferSizeExt() +--------------------------------- + +.. doxygenfunction:: hipsparseXcsrsort_bufferSizeExt + +hipsparseXcsrsort() +------------------- + +.. doxygenfunction:: hipsparseXcsrsort + +hipsparseXcscsort_bufferSizeExt() +--------------------------------- + +.. doxygenfunction:: hipsparseXcscsort_bufferSizeExt + +hipsparseXcscsort() +------------------- + +.. doxygenfunction:: hipsparseXcscsort + +hipsparseXcoosort_bufferSizeExt() +--------------------------------- + +.. doxygenfunction:: hipsparseXcoosort_bufferSizeExt + +hipsparseXcoosortByRow() +------------------------ + +.. doxygenfunction:: hipsparseXcoosortByRow + +hipsparseXcoosortByColumn() +--------------------------- + +.. doxygenfunction:: hipsparseXcoosortByColumn + +hipsparseXgebsr2gebsr_bufferSize() +---------------------------------- + +.. doxygenfunction:: hipsparseSgebsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseDgebsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseCgebsr2gebsr_bufferSize + :outline: +.. doxygenfunction:: hipsparseZgebsr2gebsr_bufferSize + +hipsparseXgebsr2gebsrNnz() +-------------------------- + +.. doxygenfunction:: hipsparseXgebsr2gebsrNnz + +hipsparseXgebsr2gebsr() +----------------------- + +.. doxygenfunction:: hipsparseSgebsr2gebsr + :outline: +.. doxygenfunction:: hipsparseDgebsr2gebsr + :outline: +.. doxygenfunction:: hipsparseCgebsr2gebsr + :outline: +.. doxygenfunction:: hipsparseZgebsr2gebsr + +hipsparseXcsru2csr_bufferSizeExt() +---------------------------------- + +.. doxygenfunction:: hipsparseScsru2csr_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsru2csr_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsru2csr_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsru2csr_bufferSizeExt + +hipsparseXcsru2csr() +-------------------- + +.. doxygenfunction:: hipsparseScsru2csr + :outline: +.. doxygenfunction:: hipsparseDcsru2csr + :outline: +.. doxygenfunction:: hipsparseCcsru2csr + :outline: +.. doxygenfunction:: hipsparseZcsru2csr + +hipsparseXcsr2csru() +-------------------- + +.. doxygenfunction:: hipsparseScsr2csru + :outline: +.. doxygenfunction:: hipsparseDcsr2csru + :outline: +.. doxygenfunction:: hipsparseCcsr2csru + :outline: +.. doxygenfunction:: hipsparseZcsr2csru \ No newline at end of file diff --git a/docs/extra.rst b/docs/extra.rst new file mode 100644 index 00000000..49be1243 --- /dev/null +++ b/docs/extra.rst @@ -0,0 +1,94 @@ +.. _hipsparse_extra_functions_: + +Sparse Extra Functions +====================== + +This module holds all sparse extra routines. + +The sparse extra routines describe operations that manipulate sparse matrices. + +hipsparseXcsrgeamNnz() +---------------------- + +.. doxygenfunction:: hipsparseXcsrgeamNnz + +hipsparseXcsrgeam() +------------------- + +.. doxygenfunction:: hipsparseScsrgeam + :outline: +.. doxygenfunction:: hipsparseDcsrgeam + :outline: +.. doxygenfunction:: hipsparseCcsrgeam + :outline: +.. doxygenfunction:: hipsparseZcsrgeam + +hipsparseXcsrgeam2_bufferSizeExt() +---------------------------------- + +.. doxygenfunction:: hipsparseScsrgeam2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsrgeam2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsrgeam2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsrgeam2_bufferSizeExt + +hipsparseXcsrgeam2Nnz() +----------------------- + +.. doxygenfunction:: hipsparseXcsrgeam2Nnz + +hipsparseXcsrgeam2() +-------------------- + +.. doxygenfunction:: hipsparseScsrgeam2 + :outline: +.. doxygenfunction:: hipsparseDcsrgeam2 + :outline: +.. doxygenfunction:: hipsparseCcsrgeam2 + :outline: +.. doxygenfunction:: hipsparseZcsrgeam2 + +hipsparseXcsrgemmNnz() +---------------------- + +.. doxygenfunction:: hipsparseXcsrgemmNnz + +hipsparseXcsrgemm() +------------------- + +.. doxygenfunction:: hipsparseScsrgemm + :outline: +.. doxygenfunction:: hipsparseDcsrgemm + :outline: +.. doxygenfunction:: hipsparseCcsrgemm + :outline: +.. doxygenfunction:: hipsparseZcsrgemm + +hipsparseXcsrgemm2_bufferSizeExt() +---------------------------------- + +.. doxygenfunction:: hipsparseScsrgemm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsrgemm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsrgemm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsrgemm2_bufferSizeExt + +hipsparseXcsrgemm2Nnz() +----------------------- + +.. doxygenfunction:: hipsparseXcsrgemm2Nnz + +hipsparseXcsrgemm2() +-------------------- + +.. doxygenfunction:: hipsparseScsrgemm2 + :outline: +.. doxygenfunction:: hipsparseDcsrgemm2 + :outline: +.. doxygenfunction:: hipsparseCcsrgemm2 + :outline: +.. doxygenfunction:: hipsparseZcsrgemm2 \ No newline at end of file diff --git a/docs/generic.rst b/docs/generic.rst new file mode 100644 index 00000000..92523e4d --- /dev/null +++ b/docs/generic.rst @@ -0,0 +1,178 @@ +.. _hipsparse_generic_functions_: + +Sparse Generic Functions +======================== + +This module holds all sparse generic routines. + +The sparse generic routines describe operations that manipulate sparse matrices. + +hipsparseAxpby() +---------------- + +.. doxygenfunction:: hipsparseAxpby + +hipsparseGather() +----------------- + +.. doxygenfunction:: hipsparseGather + +hipsparseScatter() +------------------ + +.. doxygenfunction:: hipsparseScatter + +hipsparseRot() +-------------- + +.. doxygenfunction:: hipsparseRot + +hipsparseSparseToDense_bufferSize() +----------------------------------- + +.. doxygenfunction:: hipsparseSparseToDense_bufferSize + +hipsparseSparseToDense() +------------------------ + +.. doxygenfunction:: hipsparseSparseToDense + +hipsparseDenseToSparse_bufferSize() +----------------------------------- + +.. doxygenfunction:: hipsparseDenseToSparse_bufferSize + +hipsparseDenseToSparse_analysis() +--------------------------------- + +.. doxygenfunction:: hipsparseDenseToSparse_analysis + +hipsparseDenseToSparse_convert() +-------------------------------- + +.. doxygenfunction:: hipsparseDenseToSparse_convert + +hipsparseSpVV_bufferSize() +-------------------------- + +.. doxygenfunction:: hipsparseSpVV_bufferSize + +hipsparseSpVV() +--------------- + +.. doxygenfunction:: hipsparseSpVV + +hipsparseSpMV_bufferSize() +-------------------------- + +.. doxygenfunction:: hipsparseSpMV_bufferSize + +hipsparseSpMV() +--------------- + +.. doxygenfunction:: hipsparseSpMV + +hipsparseSpMM_bufferSize() +-------------------------- + +.. doxygenfunction:: hipsparseSpMM_bufferSize + +hipsparseSpMM_preprocess() +-------------------------- + +.. doxygenfunction:: hipsparseSpMM_preprocess + +hipsparseSpMM() +--------------- + +.. doxygenfunction:: hipsparseSpMM + +hipsparseSpGEMM_createDescr() +----------------------------- + +.. doxygenfunction:: hipsparseSpGEMM_createDescr + +hipsparseSpGEMM_destroyDescr() +------------------------------ + +.. doxygenfunction:: hipsparseSpGEMM_destroyDescr + +hipsparseSpGEMM_workEstimation() +-------------------------------- + +.. doxygenfunction:: hipsparseSpGEMM_workEstimation + +hipsparseSpGEMM_compute() +------------------------- + +.. doxygenfunction:: hipsparseSpGEMM_compute + +hipsparseSpGEMM_copy() +---------------------- + +.. doxygenfunction:: hipsparseSpGEMM_copy + +hipsparseSDDMM_bufferSize() +--------------------------- + +.. doxygenfunction:: hipsparseSDDMM_bufferSize + +hipsparseSDDMM_preprocess() +--------------------------- + +.. doxygenfunction:: hipsparseSDDMM_preprocess + +hipsparseSDDMM() +---------------- + +.. doxygenfunction:: hipsparseSDDMM + +hipsparseSpSV_createDescr() +--------------------------- + +.. doxygenfunction:: hipsparseSpSV_createDescr + +hipsparseSpSV_destroyDescr() +---------------------------- + +.. doxygenfunction:: hipsparseSpSV_destroyDescr + +hipsparseSpSV_bufferSize() +-------------------------- + +.. doxygenfunction:: hipsparseSpSV_bufferSize + +hipsparseSpSV_analysis() +------------------------ + +.. doxygenfunction:: hipsparseSpSV_analysis + +hipsparseSpSV_solve() +--------------------- + +.. doxygenfunction:: hipsparseSpSV_solve + +hipsparseSpSM_createDescr() +--------------------------- + +.. doxygenfunction:: hipsparseSpSM_createDescr + +hipsparseSpSM_destroyDescr() +---------------------------- + +.. doxygenfunction:: hipsparseSpSM_destroyDescr + +hipsparseSpSM_bufferSize() +-------------------------- + +.. doxygenfunction:: hipsparseSpSM_bufferSize + +hipsparseSpSM_analysis() +------------------------ + +.. doxygenfunction:: hipsparseSpSM_analysis + +hipsparseSpSM_solve() +--------------------- + +.. doxygenfunction:: hipsparseSpSM_solve diff --git a/docs/source/index.rst b/docs/index.rst similarity index 100% rename from docs/source/index.rst rename to docs/index.rst diff --git a/docs/install.rst b/docs/install.rst new file mode 100644 index 00000000..bf15ea29 --- /dev/null +++ b/docs/install.rst @@ -0,0 +1,148 @@ +.. _hipsparse_building: + +Building and Installing +======================= + +Prerequisites +------------- +hipSPARSE requires a ROCm enabled platform, more information `here `_. + +Installing pre-built packages +----------------------------- +hipSPARSE can be installed from `AMD ROCm repository `_. +For detailed instructions on how to set up ROCm on different platforms, see the `AMD ROCm Platform Installation Guide for Linux `_. + +hipSPARSE can be installed on e.g. Ubuntu using + +:: + + $ sudo apt-get update + $ sudo apt-get install hipsparse + +Once installed, hipSPARSE can be used just like any other library with a C API. +The header file will need to be included in the user code in order to make calls into hipSPARSE, and the hipSPARSE shared library will become link-time and run-time dependent for the user application. + +Building hipSPARSE from source +------------------------------ +Building from source is not necessary, as hipSPARSE can be used after installing the pre-built packages as described above. +If desired, the following instructions can be used to build hipSPARSE from source. +Furthermore, the following compile-time dependencies must be met + +- `rocSPARSE `_ +- `git `_ +- `CMake `_ 3.5 or later +- `AMD ROCm `_ +- `googletest `_ (optional, for clients) + +Download hipSPARSE +`````````````````` +The hipSPARSE source code is available at the `hipSPARSE GitHub page `_. +Download the master branch using: + +:: + + $ git clone -b master https://github.com/ROCmSoftwarePlatform/hipSPARSE.git + $ cd hipSPARSE + +Below are steps to build different packages of the library, including dependencies and clients. +It is recommended to install hipSPARSE using the `install.sh` script. + +Using `install.sh` to build hipSPARSE with dependencies +``````````````````````````````````````````````````````` +The following table lists common uses of `install.sh` to build dependencies + library. + +.. tabularcolumns:: + |\X{1}{6}|\X{5}{6}| + +================= ==== +Command Description +================= ==== +`./install.sh -h` Print help information. +`./install.sh -d` Build dependencies and library in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies. +`./install.sh` Build library in your local directory. It is assumed dependencies are available. +`./install.sh -i` Build library, then build and install hipSPARSE package in `/opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. +================= ==== + +Using `install.sh` to build hipSPARSE with dependencies and clients +``````````````````````````````````````````````````````````````````` +The client contains example code and unit tests. Common uses of `install.sh` to build them are listed in the table below. + +.. tabularcolumns:: + |\X{1}{6}|\X{5}{6}| + +=================== ==== +Command Description +=================== ==== +`./install.sh -h` Print help information. +`./install.sh -dc` Build dependencies, library and client in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies. +`./install.sh -c` Build library and client in your local directory. It is assumed dependencies are available. +`./install.sh -idc` Build library, dependencies and client, then build and install hipSPARSE package in `/opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. +`./install.sh -ic` Build library and client, then build and install hipSPARSE package in `opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. +=================== ==== + +Using individual commands to build hipSPARSE +```````````````````````````````````````````` +CMake 3.5 or later is required in order to build hipSPARSE. + +hipSPARSE can be built using the following commands: + +:: + + # Create and change to build directory + $ mkdir -p build/release ; cd build/release + + # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX= to adjust it + $ cmake ../.. + + # Compile hipSPARSE library + $ make -j$(nproc) + + # Install hipSPARSE to /opt/rocm + $ make install + +GoogleTest is required in order to build hipSPARSE clients. + +hipSPARSE with dependencies and clients can be built using the following commands: + +:: + + # Install googletest + $ mkdir -p build/release/deps ; cd build/release/deps + $ cmake ../../../deps + $ make -j$(nproc) install + + # Change to build directory + $ cd .. + + # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX= to adjust it + $ cmake ../.. -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_SAMPLES=ON + + # Compile hipSPARSE library + $ make -j$(nproc) + + # Install hipSPARSE to /opt/rocm + $ make install + +Simple Test +``````````` +You can test the installation by running one of the hipSPARSE examples, after successfully compiling the library with clients. + +:: + + # Navigate to clients binary directory + $ cd hipSPARSE/build/release/clients/staging + + # Execute hipSPARSE example + $ ./example_csrmv 1000 + +Supported Targets +----------------- +Currently, hipSPARSE is supported under the following operating systems + +- `Ubuntu 18.04 `_ +- `Ubuntu 20.04 `_ +- `CentOS 7 `_ +- `CentOS 8 `_ +- `SLES 15 `_ + +To compile and run hipSPARSE, `AMD ROCm Platform `_ is required. \ No newline at end of file diff --git a/docs/intro.rst b/docs/intro.rst new file mode 100644 index 00000000..4728f7e6 --- /dev/null +++ b/docs/intro.rst @@ -0,0 +1,26 @@ +Introduction +============ + +hipSPARSE is a library that contains basic linear algebra subroutines for sparse matrices and vectors written in HIP for GPU devices. +It is designed to be used from C and C++ code. +The functionality of hipSPARSE is organized in the following categories: + +* :ref:`hipsparse_auxiliary_functions_` describe available helper functions that are required for subsequent library calls. +* :ref:`hipsparse_level1_functions_` describe operations between a vector in sparse format and a vector in dense format. +* :ref:`hipsparse_level2_functions_` describe operations between a matrix in sparse format and a vector in dense format. +* :ref:`hipsparse_level3_functions_` describe operations between a matrix in sparse format and multiple vectors in dense format. +* :ref:`hipsparse_extra_functions_` describe operations that manipulate sparse matrices. +* :ref:`hipsparse_precond_functions_` describe manipulations on a matrix in sparse format to obtain a preconditioner. +* :ref:`hipsparse_conversion_functions_` describe operations on a matrix in sparse format to obtain a different matrix format. +* :ref:`hipsparse_reordering_functions_` describe operations on a matrix in sparse format to obtain a reordering. +* :ref:`hipsparse_generic_functions_` describe operations that manipulate sparse matrices. + +The code is open and hosted here: https://github.com/ROCmSoftwarePlatform/hipSPARSE + +hipSPARSE is a SPARSE marshalling library, with multiple supported backends. +It sits between the application and a `worker` SPARSE library, marshalling inputs into the backend library and marshalling results back to the application. +hipSPARSE exports an interface that does not require the client to change, regardless of the chosen backend. +Currently, hipSPARSE supports rocSPARSE and cuSPARSE as backends. +hipSPARSE focuses on convenience and portability. +If performance outweighs these factors, then using rocSPARSE itself is highly recommended. +rocSPARSE can also be found on `GitHub `_. \ No newline at end of file diff --git a/docs/level1.rst b/docs/level1.rst new file mode 100644 index 00000000..b8b0c824 --- /dev/null +++ b/docs/level1.rst @@ -0,0 +1,75 @@ +.. _hipsparse_level1_functions_: + +Sparse Level 1 Functions +======================== + +The sparse level 1 routines describe operations between a vector in sparse format and a vector in dense format. This section describes all hipSPARSE level 1 sparse linear algebra functions. + +hipsparseXaxpyi() +----------------- + +.. doxygenfunction:: hipsparseSaxpyi + :outline: +.. doxygenfunction:: hipsparseDaxpyi + :outline: +.. doxygenfunction:: hipsparseCaxpyi + :outline: +.. doxygenfunction:: hipsparseZaxpyi + +hipsparseXdoti() +---------------- + +.. doxygenfunction:: hipsparseSdoti + :outline: +.. doxygenfunction:: hipsparseDdoti + :outline: +.. doxygenfunction:: hipsparseCdoti + :outline: +.. doxygenfunction:: hipsparseZdoti + +hipsparseXdotci() +----------------- + +.. doxygenfunction:: hipsparseCdotci + :outline: +.. doxygenfunction:: hipsparseZdotci + +hipsparseXgthr() +---------------- + +.. doxygenfunction:: hipsparseSgthr + :outline: +.. doxygenfunction:: hipsparseDgthr + :outline: +.. doxygenfunction:: hipsparseCgthr + :outline: +.. doxygenfunction:: hipsparseZgthr + +hipsparseXgthrz() +----------------- + +.. doxygenfunction:: hipsparseSgthrz + :outline: +.. doxygenfunction:: hipsparseDgthrz + :outline: +.. doxygenfunction:: hipsparseCgthrz + :outline: +.. doxygenfunction:: hipsparseZgthrz + +hipsparseXroti() +---------------- + +.. doxygenfunction:: hipsparseSroti + :outline: +.. doxygenfunction:: hipsparseDroti + +hipsparseXsctr() +---------------- + +.. doxygenfunction:: hipsparseSsctr + :outline: +.. doxygenfunction:: hipsparseDsctr + :outline: +.. doxygenfunction:: hipsparseCsctr + :outline: +.. doxygenfunction:: hipsparseZsctr \ No newline at end of file diff --git a/docs/level2.rst b/docs/level2.rst new file mode 100644 index 00000000..e1a501ca --- /dev/null +++ b/docs/level2.rst @@ -0,0 +1,172 @@ +.. _hipsparse_level2_functions_: + +Sparse Level 2 Functions +======================== + +This module holds all sparse level 2 routines. + +The sparse level 2 routines describe operations between a matrix in sparse format and a vector in dense format. + +hipsparseXcsrmv() +----------------- + +.. doxygenfunction:: hipsparseScsrmv + :outline: +.. doxygenfunction:: hipsparseDcsrmv + :outline: +.. doxygenfunction:: hipsparseCcsrmv + :outline: +.. doxygenfunction:: hipsparseZcsrmv + +hipsparseXcsrsv2_zeroPivot() +---------------------------- + +.. doxygenfunction:: hipsparseXcsrsv2_zeroPivot + +hipsparseXcsrsv2_bufferSize() +----------------------------- + +.. doxygenfunction:: hipsparseScsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseDcsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseCcsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseZcsrsv2_bufferSize + +hipsparseXcsrsv2_bufferSizeExt() +-------------------------------- + +.. doxygenfunction:: hipsparseScsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsrsv2_bufferSizeExt + +hipsparseXcsrsv2_analysis() +--------------------------- + +.. doxygenfunction:: hipsparseScsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseDcsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseCcsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseZcsrsv2_analysis + +hipsparseXcsrsv2_solve() +------------------------ + +.. doxygenfunction:: hipsparseScsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseDcsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseCcsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseZcsrsv2_solve + +hipsparseXhybmv() +----------------- + +.. doxygenfunction:: hipsparseShybmv + :outline: +.. doxygenfunction:: hipsparseDhybmv + :outline: +.. doxygenfunction:: hipsparseChybmv + :outline: +.. doxygenfunction:: hipsparseZhybmv + +hipsparseXbsrmv() +----------------- + +.. doxygenfunction:: hipsparseSbsrmv + :outline: +.. doxygenfunction:: hipsparseDbsrmv + :outline: +.. doxygenfunction:: hipsparseCbsrmv + :outline: +.. doxygenfunction:: hipsparseZbsrmv + +hipsparseXbsrxmv() +------------------ + +.. doxygenfunction:: hipsparseSbsrxmv + :outline: +.. doxygenfunction:: hipsparseDbsrxmv + :outline: +.. doxygenfunction:: hipsparseCbsrxmv + :outline: +.. doxygenfunction:: hipsparseZbsrxmv + +hipsparseXbsrsv2_zeroPivot() +---------------------------- + +.. doxygenfunction:: hipsparseXbsrsv2_zeroPivot + +hipsparseXbsrsv2_bufferSize() +----------------------------- + +.. doxygenfunction:: hipsparseSbsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseDbsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseCbsrsv2_bufferSize + :outline: +.. doxygenfunction:: hipsparseZbsrsv2_bufferSize + +hipsparseXbsrsv2_bufferSizeExt() +-------------------------------- + +.. doxygenfunction:: hipsparseSbsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDbsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCbsrsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZbsrsv2_bufferSizeExt + +hipsparseXbsrsv2_analysis() +--------------------------- + +.. doxygenfunction:: hipsparseSbsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseDbsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseCbsrsv2_analysis + :outline: +.. doxygenfunction:: hipsparseZbsrsv2_analysis + +hipsparseXbsrsv2_solve() +------------------------ + +.. doxygenfunction:: hipsparseSbsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseDbsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseCbsrsv2_solve + :outline: +.. doxygenfunction:: hipsparseZbsrsv2_solve + +hipsparseXgemvi_bufferSize() +---------------------------- + +.. doxygenfunction:: hipsparseSgemvi_bufferSize + :outline: +.. doxygenfunction:: hipsparseDgemvi_bufferSize + :outline: +.. doxygenfunction:: hipsparseCgemvi_bufferSize + :outline: +.. doxygenfunction:: hipsparseZgemvi_bufferSize + +hipsparseXgemvi() +----------------- + +.. doxygenfunction:: hipsparseSgemvi + :outline: +.. doxygenfunction:: hipsparseDgemvi + :outline: +.. doxygenfunction:: hipsparseCgemvi + :outline: +.. doxygenfunction:: hipsparseZgemvi \ No newline at end of file diff --git a/docs/level3.rst b/docs/level3.rst new file mode 100644 index 00000000..a6d1936b --- /dev/null +++ b/docs/level3.rst @@ -0,0 +1,128 @@ +.. _hipsparse_level3_functions_: + +Sparse Level 3 Functions +======================== + +This module holds all sparse level 3 routines. + +The sparse level 3 routines describe operations between a matrix in sparse format and multiple vectors in dense format that can also be seen as a dense matrix. + +hipsparseXbsrmm() +----------------- + +.. doxygenfunction:: hipsparseSbsrmm + :outline: +.. doxygenfunction:: hipsparseDbsrmm + :outline: +.. doxygenfunction:: hipsparseCbsrmm + :outline: +.. doxygenfunction:: hipsparseZbsrmm + +hipsparseXcsrmm() +----------------- + +.. doxygenfunction:: hipsparseScsrmm + :outline: +.. doxygenfunction:: hipsparseDcsrmm + :outline: +.. doxygenfunction:: hipsparseCcsrmm + :outline: +.. doxygenfunction:: hipsparseZcsrmm + +hipsparseXcsrmm2() +------------------ + +.. doxygenfunction:: hipsparseScsrmm2 + :outline: +.. doxygenfunction:: hipsparseDcsrmm2 + :outline: +.. doxygenfunction:: hipsparseCcsrmm2 + :outline: +.. doxygenfunction:: hipsparseZcsrmm2 + +hipsparseXbsrsm2_zeroPivot() +---------------------------- + +.. doxygenfunction:: hipsparseXbsrsm2_zeroPivot + +hipsparseXbsrsm2_bufferSize() +----------------------------- + +.. doxygenfunction:: hipsparseSbsrsm2_bufferSize + :outline: +.. doxygenfunction:: hipsparseDbsrsm2_bufferSize + :outline: +.. doxygenfunction:: hipsparseCbsrsm2_bufferSize + :outline: +.. doxygenfunction:: hipsparseZbsrsm2_bufferSize + +hipsparseXbsrsm2_analysis() +--------------------------- + +.. doxygenfunction:: hipsparseSbsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseDbsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseCbsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseZbsrsm2_analysis + +hipsparseXbsrsm2_solve() +------------------------ + +.. doxygenfunction:: hipsparseSbsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseDbsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseCbsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseZbsrsm2_solve + +hipsparseXcsrsm2_zeroPivot() +---------------------------- + +.. doxygenfunction:: hipsparseXcsrsm2_zeroPivot + +hipsparseXcsrsm2_bufferSizeExt() +-------------------------------- + +.. doxygenfunction:: hipsparseScsrsm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsrsm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsrsm2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsrsm2_bufferSizeExt + +hipsparseXcsrsm2_analysis() +--------------------------- + +.. doxygenfunction:: hipsparseScsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseDcsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseCcsrsm2_analysis + :outline: +.. doxygenfunction:: hipsparseZcsrsm2_analysis + +hipsparseXcsrsm2_solve() +------------------------ + +.. doxygenfunction:: hipsparseScsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseDcsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseCcsrsm2_solve + :outline: +.. doxygenfunction:: hipsparseZcsrsm2_solve + +hipsparseXgemmi() +----------------- + +.. doxygenfunction:: hipsparseSgemmi + :outline: +.. doxygenfunction:: hipsparseDgemmi + :outline: +.. doxygenfunction:: hipsparseCgemmi + :outline: +.. doxygenfunction:: hipsparseZgemmi \ No newline at end of file diff --git a/docs/precond.rst b/docs/precond.rst new file mode 100644 index 00000000..913e6414 --- /dev/null +++ b/docs/precond.rst @@ -0,0 +1,314 @@ +.. _hipsparse_precond_functions_: + +Preconditioner Functions +======================== + +This module holds all sparse preconditioners. + +The sparse preconditioners describe manipulations on a matrix in sparse format to obtain a sparse preconditioner matrix. + +hipsparseXbsrilu02_zeroPivot() +------------------------------ + +.. doxygenfunction:: hipsparseXbsrilu02_zeroPivot + +hipsparseXbsrilu02_numericBoost() +--------------------------------- + +.. doxygenfunction:: hipsparseSbsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseDbsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseCbsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseZbsrilu02_numericBoost + +hipsparseXbsrilu02_bufferSize() +------------------------------- + +.. doxygenfunction:: hipsparseSbsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseDbsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseCbsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseZbsrilu02_bufferSize + +hipsparseXbsrilu02_analysis() +----------------------------- + +.. doxygenfunction:: hipsparseSbsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseDbsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseCbsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseZbsrilu02_analysis + +hipsparseXbsrilu02() +-------------------- + +.. doxygenfunction:: hipsparseSbsrilu02 + :outline: +.. doxygenfunction:: hipsparseDbsrilu02 + :outline: +.. doxygenfunction:: hipsparseCbsrilu02 + :outline: +.. doxygenfunction:: hipsparseZbsrilu02 + +hipsparseXcsrilu02_zeroPivot() +------------------------------ + +.. doxygenfunction:: hipsparseXcsrilu02_zeroPivot + +hipsparseXcsrilu02_numericBoost() +--------------------------------- + +.. doxygenfunction:: hipsparseScsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseDcsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseCcsrilu02_numericBoost + :outline: +.. doxygenfunction:: hipsparseZcsrilu02_numericBoost + +hipsparseXcsrilu02_bufferSize() +------------------------------- + +.. doxygenfunction:: hipsparseScsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseDcsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseCcsrilu02_bufferSize + :outline: +.. doxygenfunction:: hipsparseZcsrilu02_bufferSize + +hipsparseXcsrilu02_bufferSizeExt() +---------------------------------- + +.. doxygenfunction:: hipsparseScsrilu02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsrilu02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsrilu02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsrilu02_bufferSizeExt + +hipsparseXcsrilu02_analysis() +----------------------------- + +.. doxygenfunction:: hipsparseScsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseDcsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseCcsrilu02_analysis + :outline: +.. doxygenfunction:: hipsparseZcsrilu02_analysis + +hipsparseXcsrilu02() +-------------------- + +.. doxygenfunction:: hipsparseScsrilu02 + :outline: +.. doxygenfunction:: hipsparseDcsrilu02 + :outline: +.. doxygenfunction:: hipsparseCcsrilu02 + :outline: +.. doxygenfunction:: hipsparseZcsrilu02 + +hipsparseXbsric02_zeroPivot() +----------------------------- + +.. doxygenfunction:: hipsparseXbsric02_zeroPivot + +hipsparseXbsric02_bufferSize() +------------------------------ + +.. doxygenfunction:: hipsparseSbsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseDbsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseCbsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseZbsric02_bufferSize + +hipsparseXbsric02_analysis() +---------------------------- + +.. doxygenfunction:: hipsparseSbsric02_analysis + :outline: +.. doxygenfunction:: hipsparseDbsric02_analysis + :outline: +.. doxygenfunction:: hipsparseCbsric02_analysis + :outline: +.. doxygenfunction:: hipsparseZbsric02_analysis + +hipsparseXbsric02() +------------------- + +.. doxygenfunction:: hipsparseSbsric02 + :outline: +.. doxygenfunction:: hipsparseDbsric02 + :outline: +.. doxygenfunction:: hipsparseCbsric02 + :outline: +.. doxygenfunction:: hipsparseZbsric02 + +hipsparseXcsric02_zeroPivot() +----------------------------- + +.. doxygenfunction:: hipsparseXcsric02_zeroPivot + +hipsparseXcsric02_bufferSize() +------------------------------ + +.. doxygenfunction:: hipsparseScsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseDcsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseCcsric02_bufferSize + :outline: +.. doxygenfunction:: hipsparseZcsric02_bufferSize + +hipsparseXcsric02_bufferSizeExt() +--------------------------------- + +.. doxygenfunction:: hipsparseScsric02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDcsric02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCcsric02_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZcsric02_bufferSizeExt + +hipsparseXcsric02_analysis() +---------------------------- + +.. doxygenfunction:: hipsparseScsric02_analysis + :outline: +.. doxygenfunction:: hipsparseDcsric02_analysis + :outline: +.. doxygenfunction:: hipsparseCcsric02_analysis + :outline: +.. doxygenfunction:: hipsparseZcsric02_analysis + +hipsparseXcsric02() +------------------- + +.. doxygenfunction:: hipsparseScsric02 + :outline: +.. doxygenfunction:: hipsparseDcsric02 + :outline: +.. doxygenfunction:: hipsparseCcsric02 + :outline: +.. doxygenfunction:: hipsparseZcsric02 + +hipsparseXgtsv2_bufferSizeExt() +------------------------------- + +.. doxygenfunction:: hipsparseSgtsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDgtsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCgtsv2_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZgtsv2_bufferSizeExt + +hipsparseXgtsv2() +----------------- + +.. doxygenfunction:: hipsparseSgtsv2 + :outline: +.. doxygenfunction:: hipsparseDgtsv2 + :outline: +.. doxygenfunction:: hipsparseCgtsv2 + :outline: +.. doxygenfunction:: hipsparseZgtsv2 + +hipsparseXgtsv2_nopivot_bufferSizeExt() +--------------------------------------- + +.. doxygenfunction:: hipsparseSgtsv2_nopivot_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDgtsv2_nopivot_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCgtsv2_nopivot_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZgtsv2_nopivot_bufferSizeExt + +hipsparseXgtsv2_nopivot() +------------------------- + +.. doxygenfunction:: hipsparseSgtsv2_nopivot + :outline: +.. doxygenfunction:: hipsparseDgtsv2_nopivot + :outline: +.. doxygenfunction:: hipsparseCgtsv2_nopivot + :outline: +.. doxygenfunction:: hipsparseZgtsv2_nopivot + +hipsparseXgtsv2StridedBatch_bufferSizeExt() +------------------------------------------- + +.. doxygenfunction:: hipsparseSgtsv2StridedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDgtsv2StridedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCgtsv2StridedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZgtsv2StridedBatch_bufferSizeExt + +hipsparseXgtsv2StridedBatch() +----------------------------- + +.. doxygenfunction:: hipsparseSgtsv2StridedBatch + :outline: +.. doxygenfunction:: hipsparseDgtsv2StridedBatch + :outline: +.. doxygenfunction:: hipsparseCgtsv2StridedBatch + :outline: +.. doxygenfunction:: hipsparseZgtsv2StridedBatch + +hipsparseXgtsvInterleavedBatch_bufferSizeExt() +---------------------------------------------- + +.. doxygenfunction:: hipsparseSgtsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDgtsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCgtsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZgtsvInterleavedBatch_bufferSizeExt + +hipsparseXgtsvInterleavedBatch() +-------------------------------- + +.. doxygenfunction:: hipsparseSgtsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseDgtsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseCgtsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseZgtsvInterleavedBatch + +hipsparseXgpsvInterleavedBatch_bufferSizeExt() +---------------------------------------------- + +.. doxygenfunction:: hipsparseSgpsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseDgpsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseCgpsvInterleavedBatch_bufferSizeExt + :outline: +.. doxygenfunction:: hipsparseZgpsvInterleavedBatch_bufferSizeExt + +hipsparseXgpsvInterleavedBatch() +-------------------------------- + +.. doxygenfunction:: hipsparseSgpsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseDgpsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseCgpsvInterleavedBatch + :outline: +.. doxygenfunction:: hipsparseZgpsvInterleavedBatch diff --git a/docs/reorder.rst b/docs/reorder.rst new file mode 100644 index 00000000..4d7aef5b --- /dev/null +++ b/docs/reorder.rst @@ -0,0 +1,17 @@ +.. _hipsparse_reordering_functions_: + +Sparse Reordering Functions +=========================== + +This module holds all sparse reordering routines. + +hipsparseXcsrcolor() +-------------------- + +.. doxygenfunction:: hipsparseScsrcolor + :outline: +.. doxygenfunction:: hipsparseDcsrcolor + :outline: +.. doxygenfunction:: hipsparseCcsrcolor + :outline: +.. doxygenfunction:: hipsparseZcsrcolor \ No newline at end of file diff --git a/docs/rocm.jpg b/docs/rocm.jpg deleted file mode 100644 index 9bb84100..00000000 Binary files a/docs/rocm.jpg and /dev/null differ diff --git a/docs/run_doc.sh b/docs/run_doc.sh deleted file mode 100755 index f87b2325..00000000 --- a/docs/run_doc.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -eu - -# Make this directory the PWD -cd "$(dirname "${BASH_SOURCE[0]}")" - -# Update version string -cur_version=$(sed -n -e "s/^.*VERSION_STRING.* \"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt) -sed -i -e "s/\(PROJECT_NUMBER.*=\)\(.*\)/\1 v${cur_version}/" Doxyfile -sed -i -e "s/\(version.*=\)\(.*\)/\1 u'${cur_version}'/" source/conf.py -sed -i -e "s/\(release.*=\)\(.*\)/\1 u'${cur_version}'/" source/conf.py - -# Build doxygen info -rm -rf docBin -doxygen Doxyfile - -# Build sphinx docs -cd source -make clean -make html -make latexpdf diff --git a/docs/run_doxygen.sh b/docs/run_doxygen.sh deleted file mode 100755 index dedfdb0e..00000000 --- a/docs/run_doxygen.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -eu - -# Make this directory the PWD -cd "$(dirname "${BASH_SOURCE[0]}")" - -# Update version string -cur_version=$(sed -n -e "s/^.*VERSION_STRING.* \"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt) -sed -i -e "s/\(PROJECT_NUMBER.*=\)\(.*\)/\1 v${cur_version}/" Doxyfile - -# Build the doxygen info -rm -rf docBin -doxygen Doxyfile diff --git a/docs/source/Makefile b/docs/source/Makefile deleted file mode 100644 index a0e8b475..00000000 --- a/docs/source/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = hipSPARSE -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css deleted file mode 100644 index 63ee6cc7..00000000 --- a/docs/source/_static/theme_overrides.css +++ /dev/null @@ -1,13 +0,0 @@ -/* override table width restrictions */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } -} diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index e4bf3ed1..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,232 +0,0 @@ -"""Copyright (C) 2016-2023 Advanced Micro Devices, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell cop- - ies of the Software, and to permit persons to whom the Software is furnished - to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM- - PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNE- - CTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -""" - -# -*- coding: utf-8 -*- -# -# hipSPARSE documentation build configuration file, created by -# sphinx-quickstart on Mon Jan 8 16:34:42 2018. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - -import os -import sys -import subprocess - -read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' - -if read_the_docs_build: - subprocess.call('../run_doxygen.sh') - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ['sphinx.ext.mathjax', - 'breathe', - "sphinx.ext.duration", - "sphinx.ext.doctest", - "sphinx.ext.autodoc", - "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", - #"sphinx_external_toc", - "sphinx_design", - "sphinx_copybutton", - "myst_nb"] - -# MyST Configuration -myst_enable_extensions = ["colon_fence", "linkify"] -myst_heading_anchors = 3 - -breathe_projects = { "hipSPARSE": "../docBin/xml" } -breathe_default_project = "hipSPARSE" - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = ['.rst', '.md'] - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'hipSPARSE' -copyright = u'2016-2023, Advanced Micro Devices' -author = u'Advanced Micro Devices' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -#version = u'' -# The full version, including alpha/beta/rc tags. -#release = u'' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = 'en' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = 'alabaster' - -#if read_the_docs_build: -# html_theme = 'default' -#else: -import sphinx_rtd_theme -#html_theme = "sphinx_rtd_theme" -#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -#html_logo = "rocm_logo.png" - -html_theme = "sphinx_book_theme" -html_title = project -html_theme_options = { - "home_page_in_toc": True, - "use_edit_page_button": True, - "repository_url": "https://github.com/ROCmSoftwarePlatform/hipSPARSE/", -#TODO: import branch based on current git checkout - "repository_branch": "develop", - "path_to_docs": "docs", -} - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -html_theme_options = { - 'logo_only': True, - 'display_version': True -} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -#html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -# html_sidebars = { -# '**': [ -# 'relations.html', # needs 'show_related': True theme option to display -# 'searchbox.html', -# ] -# } - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'hipSPARSEdoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - 'preamble': '\setcounter{tocdepth}{5}', - 'preamble': '\\usepackage[strings]{underscore}', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'hipSPARSE.tex', u'hipSPARSE Documentation', - u'Advanced Micro Devices', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'hipsparse', u'hipSPARSE Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'hipSPARSE', u'hipSPARSE Documentation', - author, 'hipSPARSE', 'SPARSE for AMD ROCm', - 'Miscellaneous'), -] - diff --git a/docs/source/requirements.in b/docs/source/requirements.in deleted file mode 100644 index 04c45b0e..00000000 --- a/docs/source/requirements.in +++ /dev/null @@ -1,9 +0,0 @@ -docutils==0.16 -sphinx==4.3.1 -breathe==4.31.0 -sphinx-design==0.3.0 -sphinx-copybutton==0.5.1 -sphinx_external_toc==0.3.1 -sphinx-book-theme==0.3.3 -myst_nb==0.17.1 -myst-parser[linkify]==0.18.1 diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt deleted file mode 100644 index 385003eb..00000000 --- a/docs/source/requirements.txt +++ /dev/null @@ -1,244 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# -# pip-compile docs/source/requirements.in -# -alabaster==0.7.12 - # via sphinx -asttokens==2.2.0 - # via stack-data -attrs==22.1.0 - # via - # jsonschema - # jupyter-cache -babel==2.10.3 - # via sphinx -backcall==0.2.0 - # via ipython -beautifulsoup4==4.11.1 - # via pydata-sphinx-theme -breathe==4.31.0 - # via -r docs/source/requirements.in -certifi==2022.6.15 - # via requests -charset-normalizer==2.1.0 - # via requests -click==8.1.3 - # via - # jupyter-cache - # sphinx-external-toc -debugpy==1.6.4 - # via ipykernel -decorator==5.1.1 - # via ipython -docutils==0.16 - # via - # -r docs/source/requirements.in - # breathe - # myst-parser - # pydata-sphinx-theme - # sphinx -entrypoints==0.4 - # via jupyter-client -executing==1.2.0 - # via stack-data -fastjsonschema==2.16.2 - # via nbformat -greenlet==2.0.1 - # via sqlalchemy -idna==3.3 - # via requests -imagesize==1.4.1 - # via sphinx -importlib-metadata==5.1.0 - # via - # jupyter-cache - # myst-nb -importlib-resources==5.10.0 - # via jsonschema -ipykernel==6.17.1 - # via myst-nb -ipython==8.7.0 - # via - # ipykernel - # myst-nb -jedi==0.18.2 - # via ipython -jinja2==3.1.2 - # via - # myst-parser - # sphinx -jsonschema==4.17.3 - # via nbformat -jupyter-cache==0.5.0 - # via myst-nb -jupyter-client==7.4.7 - # via - # ipykernel - # nbclient -jupyter-core==5.1.0 - # via - # jupyter-client - # nbformat -linkify-it-py==1.0.3 - # via myst-parser -markdown-it-py==2.1.0 - # via - # mdit-py-plugins - # myst-parser -markupsafe==2.1.1 - # via jinja2 -matplotlib-inline==0.1.6 - # via - # ipykernel - # ipython -mdit-py-plugins==0.3.1 - # via myst-parser -mdurl==0.1.2 - # via markdown-it-py -myst-nb==0.17.1 - # via -r docs/source/requirements.in -myst-parser[linkify]==0.18.1 - # via - # -r docs/source/requirements.in - # myst-nb -nbclient==0.5.13 - # via - # jupyter-cache - # myst-nb -nbformat==5.7.0 - # via - # jupyter-cache - # myst-nb - # nbclient -nest-asyncio==1.5.6 - # via - # ipykernel - # jupyter-client - # nbclient -packaging==21.3 - # via - # ipykernel - # pydata-sphinx-theme - # sphinx -parso==0.8.3 - # via jedi -pexpect==4.8.0 - # via ipython -pickleshare==0.7.5 - # via ipython -pkgutil-resolve-name==1.3.10 - # via jsonschema -platformdirs==2.5.4 - # via jupyter-core -prompt-toolkit==3.0.33 - # via ipython -psutil==5.9.4 - # via ipykernel -ptyprocess==0.7.0 - # via pexpect -pure-eval==0.2.2 - # via stack-data -pydata-sphinx-theme==0.8.1 - # via sphinx-book-theme -pygments==2.12.0 - # via - # ipython - # sphinx -pyparsing==3.0.9 - # via packaging -pyrsistent==0.19.2 - # via jsonschema -python-dateutil==2.8.2 - # via jupyter-client -pytz==2022.1 - # via babel -pyyaml==6.0 - # via - # jupyter-cache - # myst-nb - # myst-parser - # sphinx-book-theme - # sphinx-external-toc -pyzmq==24.0.1 - # via - # ipykernel - # jupyter-client -requests==2.28.1 - # via sphinx -six==1.16.0 - # via - # asttokens - # python-dateutil -snowballstemmer==2.2.0 - # via sphinx -soupsieve==2.3.2.post1 - # via beautifulsoup4 -sphinx==4.3.1 - # via - # -r docs/source/requirements.in - # breathe - # myst-nb - # myst-parser - # pydata-sphinx-theme - # sphinx-book-theme - # sphinx-copybutton - # sphinx-design - # sphinx-external-toc -sphinx-book-theme==0.3.3 - # via -r docs/source/requirements.in -sphinx-copybutton==0.5.1 - # via -r docs/source/requirements.in -sphinx-design==0.3.0 - # via -r docs/source/requirements.in -sphinx-external-toc==0.3.1 - # via -r docs/source/requirements.in -sphinxcontrib-applehelp==1.0.2 - # via sphinx -sphinxcontrib-devhelp==1.0.2 - # via sphinx -sphinxcontrib-htmlhelp==2.0.0 - # via sphinx -sphinxcontrib-jsmath==1.0.1 - # via sphinx -sphinxcontrib-qthelp==1.0.3 - # via sphinx -sphinxcontrib-serializinghtml==1.1.5 - # via sphinx -sqlalchemy==1.4.44 - # via jupyter-cache -stack-data==0.6.2 - # via ipython -tabulate==0.9.0 - # via jupyter-cache -tornado==6.2 - # via - # ipykernel - # jupyter-client -traitlets==5.6.0 - # via - # ipykernel - # ipython - # jupyter-client - # jupyter-core - # matplotlib-inline - # nbclient - # nbformat -typing-extensions==4.4.0 - # via - # myst-nb - # myst-parser -uc-micro-py==1.0.1 - # via linkify-it-py -urllib3==1.26.11 - # via requests -wcwidth==0.2.5 - # via prompt-toolkit -zipp==3.11.0 - # via - # importlib-metadata - # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/docs/source/usermanual.rst b/docs/source/usermanual.rst deleted file mode 100644 index e64f9ec4..00000000 --- a/docs/source/usermanual.rst +++ /dev/null @@ -1,3025 +0,0 @@ -.. _user_manual: - -*********** -User Manual -*********** - -.. toctree:: - :maxdepth: 3 - :caption: Contents: - -Introduction -============ - -hipSPARSE is a library that contains basic linear algebra subroutines for sparse matrices and vectors written in HIP for GPU devices. -It is designed to be used from C and C++ code. -The functionality of hipSPARSE is organized in the following categories: - -* :ref:`hipsparse_auxiliary_functions_` describe available helper functions that are required for subsequent library calls. -* :ref:`hipsparse_level1_functions_` describe operations between a vector in sparse format and a vector in dense format. -* :ref:`hipsparse_level2_functions_` describe operations between a matrix in sparse format and a vector in dense format. -* :ref:`hipsparse_level3_functions_` describe operations between a matrix in sparse format and multiple vectors in dense format. -* :ref:`hipsparse_extra_functions_` describe operations that manipulate sparse matrices. -* :ref:`hipsparse_precond_functions_` describe manipulations on a matrix in sparse format to obtain a preconditioner. -* :ref:`hipsparse_conversion_functions_` describe operations on a matrix in sparse format to obtain a different matrix format. -* :ref:`hipsparse_reordering_functions_` describe operations on a matrix in sparse format to obtain a reordering. -* :ref:`hipsparse_generic_functions_` describe operations that manipulate sparse matrices. - -The code is open and hosted here: https://github.com/ROCmSoftwarePlatform/hipSPARSE - -hipSPARSE is a SPARSE marshalling library, with multiple supported backends. -It sits between the application and a `worker` SPARSE library, marshalling inputs into the backend library and marshalling results back to the application. -hipSPARSE exports an interface that does not require the client to change, regardless of the chosen backend. -Currently, hipSPARSE supports rocSPARSE and cuSPARSE as backends. -hipSPARSE focuses on convenience and portability. -If performance outweighs these factors, then using rocSPARSE itself is highly recommended. -rocSPARSE can also be found on `GitHub `_. - -.. _hipsparse_building: - -Building and Installing -======================= - -Prerequisites -------------- -hipSPARSE requires a ROCm enabled platform, more information `here `_. - -Installing pre-built packages ------------------------------ -hipSPARSE can be installed from `AMD ROCm repository `_. -For detailed instructions on how to set up ROCm on different platforms, see the `AMD ROCm Platform Installation Guide for Linux `_. - -hipSPARSE can be installed on e.g. Ubuntu using - -:: - - $ sudo apt-get update - $ sudo apt-get install hipsparse - -Once installed, hipSPARSE can be used just like any other library with a C API. -The header file will need to be included in the user code in order to make calls into hipSPARSE, and the hipSPARSE shared library will become link-time and run-time dependent for the user application. - -Building hipSPARSE from source ------------------------------- -Building from source is not necessary, as hipSPARSE can be used after installing the pre-built packages as described above. -If desired, the following instructions can be used to build hipSPARSE from source. -Furthermore, the following compile-time dependencies must be met - -- `rocSPARSE `_ -- `git `_ -- `CMake `_ 3.5 or later -- `AMD ROCm `_ -- `googletest `_ (optional, for clients) - -Download hipSPARSE -`````````````````` -The hipSPARSE source code is available at the `hipSPARSE GitHub page `_. -Download the master branch using: - -:: - - $ git clone -b master https://github.com/ROCmSoftwarePlatform/hipSPARSE.git - $ cd hipSPARSE - -Below are steps to build different packages of the library, including dependencies and clients. -It is recommended to install hipSPARSE using the `install.sh` script. - -Using `install.sh` to build hipSPARSE with dependencies -``````````````````````````````````````````````````````` -The following table lists common uses of `install.sh` to build dependencies + library. - -.. tabularcolumns:: - |\X{1}{6}|\X{5}{6}| - -================= ==== -Command Description -================= ==== -`./install.sh -h` Print help information. -`./install.sh -d` Build dependencies and library in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies. -`./install.sh` Build library in your local directory. It is assumed dependencies are available. -`./install.sh -i` Build library, then build and install hipSPARSE package in `/opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. -================= ==== - -Using `install.sh` to build hipSPARSE with dependencies and clients -``````````````````````````````````````````````````````````````````` -The client contains example code and unit tests. Common uses of `install.sh` to build them are listed in the table below. - -.. tabularcolumns:: - |\X{1}{6}|\X{5}{6}| - -=================== ==== -Command Description -=================== ==== -`./install.sh -h` Print help information. -`./install.sh -dc` Build dependencies, library and client in your local directory. The `-d` flag only needs to be used once. For subsequent invocations of `install.sh` it is not necessary to rebuild the dependencies. -`./install.sh -c` Build library and client in your local directory. It is assumed dependencies are available. -`./install.sh -idc` Build library, dependencies and client, then build and install hipSPARSE package in `/opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. -`./install.sh -ic` Build library and client, then build and install hipSPARSE package in `opt/rocm/hipsparse`. You will be prompted for sudo access. This will install for all users. -=================== ==== - -Using individual commands to build hipSPARSE -```````````````````````````````````````````` -CMake 3.5 or later is required in order to build hipSPARSE. - -hipSPARSE can be built using the following commands: - -:: - - # Create and change to build directory - $ mkdir -p build/release ; cd build/release - - # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX= to adjust it - $ cmake ../.. - - # Compile hipSPARSE library - $ make -j$(nproc) - - # Install hipSPARSE to /opt/rocm - $ make install - -GoogleTest is required in order to build hipSPARSE clients. - -hipSPARSE with dependencies and clients can be built using the following commands: - -:: - - # Install googletest - $ mkdir -p build/release/deps ; cd build/release/deps - $ cmake ../../../deps - $ make -j$(nproc) install - - # Change to build directory - $ cd .. - - # Default install path is /opt/rocm, use -DCMAKE_INSTALL_PREFIX= to adjust it - $ cmake ../.. -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_SAMPLES=ON - - # Compile hipSPARSE library - $ make -j$(nproc) - - # Install hipSPARSE to /opt/rocm - $ make install - -Simple Test -``````````` -You can test the installation by running one of the hipSPARSE examples, after successfully compiling the library with clients. - -:: - - # Navigate to clients binary directory - $ cd hipSPARSE/build/release/clients/staging - - # Execute hipSPARSE example - $ ./example_csrmv 1000 - -Supported Targets ------------------ -Currently, hipSPARSE is supported under the following operating systems - -- `Ubuntu 18.04 `_ -- `Ubuntu 20.04 `_ -- `CentOS 7 `_ -- `CentOS 8 `_ -- `SLES 15 `_ - -To compile and run hipSPARSE, `AMD ROCm Platform `_ is required. - -Device and Stream Management -============================ -:cpp:func:`hipSetDevice` and :cpp:func:`hipGetDevice` are HIP device management APIs. -They are NOT part of the hipSPARSE API. - -Asynchronous Execution ----------------------- -All hipSPARSE library functions, unless otherwise stated, are non blocking and executed asynchronously with respect to the host. They may return before the actual computation has finished. To force synchronization, :cpp:func:`hipDeviceSynchronize` or :cpp:func:`hipStreamSynchronize` can be used. This will ensure that all previously executed hipSPARSE functions on the device / this particular stream have completed. - -HIP Device Management ---------------------- -Before a HIP kernel invocation, users need to call :cpp:func:`hipSetDevice` to set a device, e.g. device 1. If users do not explicitly call it, the system by default sets it as device 0. Unless users explicitly call :cpp:func:`hipSetDevice` to set to another device, their HIP kernels are always launched on device 0. - -The above is a HIP (and CUDA) device management approach and has nothing to do with hipSPARSE. hipSPARSE honors the approach above and assumes users have already set the device before a hipSPARSE routine call. - -Once users set the device, they create a handle with :ref:`hipsparse_create_handle_`. - -Subsequent hipSPARSE routines take this handle as an input parameter. hipSPARSE ONLY queries (by :cpp:func:`hipGetDevice`) the user's device; hipSPARSE does NOT set the device for users. If hipSPARSE does not see a valid device, it returns an error message. It is the users' responsibility to provide a valid device to hipSPARSE and ensure the device safety. - -Users CANNOT switch devices between :ref:`hipsparse_create_handle_` and :ref:`hipsparse_destroy_handle_`. If users want to change device, they must destroy the current handle and create another hipSPARSE handle. - -HIP Stream Management ---------------------- -HIP kernels are always launched in a queue (also known as stream). - -If users do not explicitly specify a stream, the system provides a default stream, maintained by the system. Users cannot create or destroy the default stream. However, users can freely create new streams (with :cpp:func:`hipStreamCreate`) and bind it to the hipSPARSE handle using :ref:`hipsparse_set_stream_`. HIP kernels are invoked in hipSPARSE routines. The hipSPARSE handle is always associated with a stream, and hipSPARSE passes its stream to the kernels inside the routine. One hipSPARSE routine only takes one stream in a single invocation. If users create a stream, they are responsible for destroying it. - -Multiple Streams and Multiple Devices -------------------------------------- -If the system under test has multiple HIP devices, users can run multiple hipSPARSE handles concurrently, but can NOT run a single hipSPARSE handle on different discrete devices. Each handle is associated with a particular singular device, and a new handle should be created for each additional device. - -Storage Formats -=============== - -COO storage format ------------------- -The Coordinate (COO) storage format represents a :math:`m \times n` matrix by - -=========== ================================================================== -m number of rows (integer). -n number of columns (integer). -nnz number of non-zero elements (integer). -coo_val array of ``nnz`` elements containing the data (floating point). -coo_row_ind array of ``nnz`` elements containing the row indices (integer). -coo_col_ind array of ``nnz`` elements containing the column indices (integer). -=========== ================================================================== - -The COO matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. -Consider the following :math:`3 \times 5` matrix and the corresponding COO structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ - 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ - 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ - \end{pmatrix} - -where - -.. math:: - - \begin{array}{ll} - \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ - \text{coo_row_ind}[8] & = \{0, 0, 0, 1, 1, 2, 2, 2\} \\ - \text{coo_col_ind}[8] & = \{0, 1, 3, 1, 2, 0, 3, 4\} - \end{array} - -COO (AoS) storage format ------------------------- -The Coordinate (COO) Array of Structure (AoS) storage format represents a :math:`m \times n` matrix by - -======= ========================================================================================== -m number of rows (integer). -n number of columns (integer). -nnz number of non-zero elements (integer). -coo_val array of ``nnz`` elements containing the data (floating point). -coo_ind array of ``2 * nnz`` elements containing alternating row and column indices (integer). -======= ========================================================================================== - -The COO (AoS) matrix is expected to be sorted by row indices and column indices per row. Furthermore, each pair of indices should appear only once. -Consider the following :math:`3 \times 5` matrix and the corresponding COO (AoS) structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using zero based indexing: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ - 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ - 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ - \end{pmatrix} - -where - -.. math:: - - \begin{array}{ll} - \text{coo_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ - \text{coo_ind}[16] & = \{0, 0, 0, 1, 0, 3, 1, 1, 1, 2, 2, 0, 2, 3, 2, 4\} \\ - \end{array} - -CSR storage format ------------------- -The Compressed Sparse Row (CSR) storage format represents a :math:`m \times n` matrix by - -=========== ========================================================================= -m number of rows (integer). -n number of columns (integer). -nnz number of non-zero elements (integer). -csr_val array of ``nnz`` elements containing the data (floating point). -csr_row_ptr array of ``m+1`` elements that point to the start of every row (integer). -csr_col_ind array of ``nnz`` elements containing the column indices (integer). -=========== ========================================================================= - -The CSR matrix is expected to be sorted by column indices within each row. Furthermore, each pair of indices should appear only once. -Consider the following :math:`3 \times 5` matrix and the corresponding CSR structures, with :math:`m = 3, n = 5` and :math:`\text{nnz} = 8` using one based indexing: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ - 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ - 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ - \end{pmatrix} - -where - -.. math:: - - \begin{array}{ll} - \text{csr_val}[8] & = \{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0\} \\ - \text{csr_row_ptr}[4] & = \{1, 4, 6, 9\} \\ - \text{csr_col_ind}[8] & = \{1, 2, 4, 2, 3, 1, 4, 5\} - \end{array} - -BSR storage format ------------------- -The Block Compressed Sparse Row (BSR) storage format represents a :math:`(mb \cdot \text{bsr_dim}) \times (nb \cdot \text{bsr_dim})` matrix by - -=========== ==================================================================================================================================== -mb number of block rows (integer) -nb number of block columns (integer) -nnzb number of non-zero blocks (integer) -bsr_val array of ``nnzb * bsr_dim * bsr_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major. -bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer). -bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer). -bsr_dim dimension of each block (integer). -=========== ==================================================================================================================================== - -The BSR matrix is expected to be sorted by column indices within each row. If :math:`m` or :math:`n` are not evenly divisible by the block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_dim} - 1) / \text{bsr_dim}` and :math:`nb = (n + \text{bsr_dim} - 1) / \text{bsr_dim}`. -Consider the following :math:`4 \times 3` matrix and the corresponding BSR structures, with :math:`\text{bsr_dim} = 2, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 0.0 & 2.0 \\ - 3.0 & 0.0 & 4.0 \\ - 5.0 & 6.0 & 0.0 \\ - 7.0 & 0.0 & 8.0 \\ - \end{pmatrix} - -with the blocks :math:`A_{ij}` - -.. math:: - - A_{00} = \begin{pmatrix} - 1.0 & 0.0 \\ - 3.0 & 0.0 \\ - \end{pmatrix}, - A_{01} = \begin{pmatrix} - 2.0 & 0.0 \\ - 4.0 & 0.0 \\ - \end{pmatrix}, - A_{10} = \begin{pmatrix} - 5.0 & 6.0 \\ - 7.0 & 0.0 \\ - \end{pmatrix}, - A_{11} = \begin{pmatrix} - 0.0 & 0.0 \\ - 8.0 & 0.0 \\ - \end{pmatrix} - -such that - -.. math:: - - A = \begin{pmatrix} - A_{00} & A_{01} \\ - A_{10} & A_{11} \\ - \end{pmatrix} - -with arrays representation - -.. math:: - - \begin{array}{ll} - \text{bsr_val}[16] & = \{1.0, 3.0, 0.0, 0.0, 2.0, 4.0, 0.0, 0.0, 5.0, 7.0, 6.0, 0.0, 0.0, 8.0, 0.0, 0.0\} \\ - \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\ - \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} - \end{array} - -GEBSR storage format --------------------- -The General Block Compressed Sparse Row (GEBSR) storage format represents a :math:`(mb \cdot \text{bsr_row_dim}) \times (nb \cdot \text{bsr_col_dim})` matrix by - -=========== ==================================================================================================================================== -mb number of block rows (integer) -nb number of block columns (integer) -nnzb number of non-zero blocks (integer) -bsr_val array of ``nnzb * bsr_row_dim * bsr_col_dim`` elements containing the data (floating point). Blocks can be stored column-major or row-major. -bsr_row_ptr array of ``mb+1`` elements that point to the start of every block row (integer). -bsr_col_ind array of ``nnzb`` elements containing the block column indices (integer). -bsr_row_dim row dimension of each block (integer). -bsr_col_dim column dimension of each block (integer). -=========== ==================================================================================================================================== - -The GEBSR matrix is expected to be sorted by column indices within each row. If :math:`m` is not evenly divisible by the row block dimension or :math:`n` is not evenly -divisible by the column block dimension, then zeros are padded to the matrix, such that :math:`mb = (m + \text{bsr_row_dim} - 1) / \text{bsr_row_dim}` and -:math:`nb = (n + \text{bsr_col_dim} - 1) / \text{bsr_col_dim}`. Consider the following :math:`4 \times 5` matrix and the corresponding GEBSR structures, -with :math:`\text{bsr_row_dim} = 2`, :math:`\text{bsr_col_dim} = 3`, mb = 2, nb = 2` and :math:`\text{nnzb} = 4` using zero based indexing and column-major storage: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 0.0 & 0.0 & 2.0 & 0.0 \\ - 3.0 & 0.0 & 4.0 & 0.0 & 0.0 \\ - 5.0 & 6.0 & 0.0 & 7.0 & 0.0 \\ - 0.0 & 0.0 & 8.0 & 0.0 & 9.0 \\ - \end{pmatrix} - -with the blocks :math:`A_{ij}` - -.. math:: - - A_{00} = \begin{pmatrix} - 1.0 & 0.0 & 0.0 \\ - 3.0 & 0.0 & 4.0 \\ - \end{pmatrix}, - A_{01} = \begin{pmatrix} - 2.0 & 0.0 & 0.0 \\ - 0.0 & 0.0 & 0.0 \\ - \end{pmatrix}, - A_{10} = \begin{pmatrix} - 5.0 & 6.0 & 0.0 \\ - 0.0 & 0.0 & 8.0 \\ - \end{pmatrix}, - A_{11} = \begin{pmatrix} - 7.0 & 0.0 & 0.0 \\ - 0.0 & 9.0 & 0.0 \\ - \end{pmatrix} - -such that - -.. math:: - - A = \begin{pmatrix} - A_{00} & A_{01} \\ - A_{10} & A_{11} \\ - \end{pmatrix} - -with arrays representation - -.. math:: - - \begin{array}{ll} - \text{bsr_val}[24] & = \{1.0, 3.0, 0.0, 0.0, 0.0, 4.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 6.0, 0.0, 0.0, 8.0, 7.0, 0.0, 0.0, 9.0, 0.0, 0.0\} \\ - \text{bsr_row_ptr}[3] & = \{0, 2, 4\} \\ - \text{bsr_col_ind}[4] & = \{0, 1, 0, 1\} - \end{array} - -ELL storage format ------------------- -The Ellpack-Itpack (ELL) storage format represents a :math:`m \times n` matrix by - -=========== ================================================================================ -m number of rows (integer). -n number of columns (integer). -ell_width maximum number of non-zero elements per row (integer) -ell_val array of ``m times ell_width`` elements containing the data (floating point). -ell_col_ind array of ``m times ell_width`` elements containing the column indices (integer). -=========== ================================================================================ - -The ELL matrix is assumed to be stored in column-major format. Rows with less than ``ell_width`` non-zero elements are padded with zeros (``ell_val``) and :math:`-1` (``ell_col_ind``). -Consider the following :math:`3 \times 5` matrix and the corresponding ELL structures, with :math:`m = 3, n = 5` and :math:`\text{ell_width} = 3` using zero based indexing: - -.. math:: - - A = \begin{pmatrix} - 1.0 & 2.0 & 0.0 & 3.0 & 0.0 \\ - 0.0 & 4.0 & 5.0 & 0.0 & 0.0 \\ - 6.0 & 0.0 & 0.0 & 7.0 & 8.0 \\ - \end{pmatrix} - -where - -.. math:: - - \begin{array}{ll} - \text{ell_val}[9] & = \{1.0, 4.0, 6.0, 2.0, 5.0, 7.0, 3.0, 0.0, 8.0\} \\ - \text{ell_col_ind}[9] & = \{0, 1, 0, 1, 2, 3, 3, -1, 4\} - \end{array} - -.. _HYB storage format: - -HYB storage format ------------------- -The Hybrid (HYB) storage format represents a :math:`m \times n` matrix by - -=========== ========================================================================================= -m number of rows (integer). -n number of columns (integer). -nnz number of non-zero elements of the COO part (integer) -ell_width maximum number of non-zero elements per row of the ELL part (integer) -ell_val array of ``m times ell_width`` elements containing the ELL part data (floating point). -ell_col_ind array of ``m times ell_width`` elements containing the ELL part column indices (integer). -coo_val array of ``nnz`` elements containing the COO part data (floating point). -coo_row_ind array of ``nnz`` elements containing the COO part row indices (integer). -coo_col_ind array of ``nnz`` elements containing the COO part column indices (integer). -=========== ========================================================================================= - -The HYB format is a combination of the ELL and COO sparse matrix formats. Typically, the regular part of the matrix is stored in ELL storage format, and the irregular part of the matrix is stored in COO storage format. Three different partitioning schemes can be applied when converting a CSR matrix to a matrix in HYB storage format. For further details on the partitioning schemes, see :ref:`hipsparse_hyb_partition_`. - -Types -===== - -hipsparseHandle_t ------------------ - -.. doxygentypedef:: hipsparseHandle_t - -hipsparseMatDescr_t -------------------- - -.. doxygentypedef:: hipsparseMatDescr_t - -hipsparseHybMat_t ------------------ - -.. doxygentypedef:: hipsparseHybMat_t - -For more details on the HYB format, see :ref:`HYB storage format`. - -.. _hipsparse_color_: - -hipsparseColorInfo_t --------------------- - -.. doxygentypedef:: hipsparseColorInfo_t - -bsrsv2Info_t ------------- - -.. doxygentypedef:: bsrsv2Info_t - -bsrsm2Info_t ------------- - -.. doxygentypedef:: bsrsm2Info_t - -bsrilu02Info_t --------------- - -.. doxygentypedef:: bsrilu02Info_t - -bsric02Info_t -------------- - -.. doxygentypedef:: bsric02Info_t - -csrsv2Info_t ------------- - -.. doxygentypedef:: csrsv2Info_t - -csrsm2Info_t ------------- - -.. doxygentypedef:: csrsm2Info_t - -csrilu02Info_t --------------- - -.. doxygentypedef:: csrilu02Info_t - -csric02Info_t -------------- - -.. doxygentypedef:: csric02Info_t - -csrgemm2Info_t --------------- - -.. doxygentypedef:: csrgemm2Info_t - -pruneInfo_t ------------ - -.. doxygentypedef:: pruneInfo_t - -csru2csrInfo_t --------------- - -.. doxygentypedef:: csru2csrInfo_t - -hipsparseSpVecDescr_t ---------------------- - -.. doxygentypedef:: hipsparseSpVecDescr_t - -hipsparseSpMatDescr_t ---------------------- - -.. doxygentypedef:: hipsparseSpMatDescr_t - -hipsparseDnVecDescr_t ---------------------- - -.. doxygentypedef:: hipsparseDnVecDescr_t - -hipsparseDnMatDescr_t ---------------------- - -.. doxygentypedef:: hipsparseDnMatDescr_t - -hipsparseSpGEMMDescr_t ----------------------- - -.. doxygentypedef:: hipsparseSpGEMMDescr_t - -hipsparseSpSVDescr_t --------------------- - -.. doxygentypedef:: hipsparseSpSVDescr_t - -hipsparseSpSMDescr_t --------------------- - -.. doxygentypedef:: hipsparseSpSMDescr_t - -hipsparseStatus_t ------------------ - -.. doxygenenum:: hipsparseStatus_t - -hipsparsePointerMode_t ----------------------- - -.. doxygenenum:: hipsparsePointerMode_t - -.. _hipsparse_action_: - -hipsparseAction_t ------------------ - -.. doxygenenum:: hipsparseAction_t - -hipsparseMatrixType_t ---------------------- - -.. doxygenenum:: hipsparseMatrixType_t - -.. _hipsparse_fill_mode_: - -hipsparseFillMode_t -------------------- - -.. doxygenenum:: hipsparseFillMode_t - -.. _hipsparse_diag_type_: - -hipsparseDiagType_t -------------------- - -.. doxygenenum:: hipsparseDiagType_t - -.. _hipsparse_index_base_: - -hipsparseIndexBase_t --------------------- - -.. doxygenenum:: hipsparseIndexBase_t - -.. _hipsparse_operation_: - -hipsparseOperation_t --------------------- - -.. doxygenenum:: hipsparseOperation_t - -.. _hipsparse_hyb_partition_: - -hipsparseHybPartition_t ------------------------ - -.. doxygenenum:: hipsparseHybPartition_t - -hipsparseSolvePolicy_t ----------------------- - -.. doxygenenum:: hipsparseSolvePolicy_t - -hipsparseSideMode_t -------------------- - -.. doxygenenum:: hipsparseSideMode_t - -hipsparseDirection_t --------------------- - -.. doxygenenum:: hipsparseDirection_t - -hipsparseFormat_t ------------------ - -.. doxygenenum:: hipsparseFormat_t - -hipsparseOrder_t ----------------- - -.. doxygenenum:: hipsparseOrder_t - -hipsparseIndextype_t --------------------- - -.. doxygenenum:: hipsparseIndexType_t - -hipsparseCsr2CscAlg_t ---------------------- - -.. doxygenenum:: hipsparseCsr2CscAlg_t - -hipsparseSpMVAlg_t ------------------- - -.. doxygenenum:: hipsparseSpMVAlg_t - -hipsparseSpMMAlg_t ------------------- - -.. doxygenenum:: hipsparseSpMMAlg_t - -hipsparseSparseToDenseAlg_t ---------------------------- - -.. doxygenenum:: hipsparseSparseToDenseAlg_t - -hipsparseDenseToSparseAlg_t ---------------------------- - -.. doxygenenum:: hipsparseDenseToSparseAlg_t - -hipsparseSDDMMAlg_t -------------------- - -.. doxygenenum:: hipsparseSDDMMAlg_t - -hipsparseSpSVAlg_t ------------------- - -.. doxygenenum:: hipsparseSpSVAlg_t - -hipsparseSpSMAlg_t ------------------- - -.. doxygenenum:: hipsparseSpSMAlg_t - -hipsparseSpMatAttribute_t -------------------------- - -.. doxygenenum:: hipsparseSpMatAttribute_t - -hipsparseSpGEMMAlg_t --------------------- - -.. doxygenenum:: hipsparseSpGEMMAlg_t - -.. _api: - -Exported Sparse Functions -========================= - -Auxiliary Functions -------------------- - -+------------------------------------------+ -|Function name | -+------------------------------------------+ -|:cpp:func:`hipsparseCreate` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroy` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetVersion` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetGitRevision` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetStream` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetStream` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetPointerMode` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetPointerMode` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateMatDescr` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyMatDescr` | -+------------------------------------------+ -|:cpp:func:`hipsparseCopyMatDescr` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetMatType` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetMatType` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetMatFillMode` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetMatFillMode` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetMatDiagType` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetMatDiagType` | -+------------------------------------------+ -|:cpp:func:`hipsparseSetMatIndexBase` | -+------------------------------------------+ -|:cpp:func:`hipsparseGetMatIndexBase` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateHybMat` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyHybMat` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateBsrsv2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyBsrsv2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateBsrsm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyBsrsm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateBsrilu02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyBsrilu02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateBsric02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyBsric02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsrsv2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsrsv2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsrsm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsrsm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsrilu02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsrilu02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsric02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsric02Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsru2csrInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsru2csrInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateColorInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyColorInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsrgemm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyCsrgemm2Info` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreatePruneInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyPruneInfo` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateSpVec` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroySpVec` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpVecGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpVecGetIndexBase` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpVecGetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpVecSetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCoo` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCooAoS` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsr` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateCsc` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateBlockedEll` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroySpMat` | -+------------------------------------------+ -|:cpp:func:`hipsparseCooGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseCooAoSGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseCsrGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseBlockedEllGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseCsrSetPointers` | -+------------------------------------------+ -|:cpp:func:`hipsparseCscSetPointers` | -+------------------------------------------+ -|:cpp:func:`hipsparseCooSetPointers` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatGetSize` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatGetFormat` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatGetIndexBase` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatGetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatSetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatGetAttribute` | -+------------------------------------------+ -|:cpp:func:`hipsparseSpMatSetAttribute` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateDnVec` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyDnVec` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnVecGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnVecGetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnVecSetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseCreateDnMat` | -+------------------------------------------+ -|:cpp:func:`hipsparseDestroyDnMat` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnMatGet` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnMatGetValues` | -+------------------------------------------+ -|:cpp:func:`hipsparseDnMatSetValues` | -+------------------------------------------+ - -Sparse Level 1 Functions ------------------------- - -================================================ ====== ====== ============== ============== -Function name single double single complex double complex -================================================ ====== ====== ============== ============== -:cpp:func:`hipsparseXaxpyi() ` x x x x -:cpp:func:`hipsparseXdoti() ` x x x x -:cpp:func:`hipsparseXdotci() ` x x -:cpp:func:`hipsparseXgthr() ` x x x x -:cpp:func:`hipsparseXgthrz() ` x x x x -:cpp:func:`hipsparseXroti() ` x x -:cpp:func:`hipsparseXsctr() ` x x x x -================================================ ====== ====== ============== ============== - -Sparse Level 2 Functions ------------------------- - -============================================================================== ====== ====== ============== ============== -Function name single double single complex double complex -============================================================================== ====== ====== ============== ============== -:cpp:func:`hipsparseXcsrmv() ` x x x x -:cpp:func:`hipsparseXcsrsv2_zeroPivot` -:cpp:func:`hipsparseXcsrsv2_bufferSize() ` x x x x -:cpp:func:`hipsparseXcsrsv2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsrsv2_analysis() ` x x x x -:cpp:func:`hipsparseXcsrsv2_solve() ` x x x x -:cpp:func:`hipsparseXhybmv() ` x x x x -:cpp:func:`hipsparseXbsrmv() ` x x x x -:cpp:func:`hipsparseXbsrxmv() ` x x x x -:cpp:func:`hipsparseXbsrsv2_zeroPivot` -:cpp:func:`hipsparseXbsrsv2_bufferSize() ` x x x x -:cpp:func:`hipsparseXbsrsv2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXbsrsv2_analysis() ` x x x x -:cpp:func:`hipsparseXbsrsv2_solve() ` x x x x -:cpp:func:`hipsparseXgemvi_bufferSize() ` x x x x -:cpp:func:`hipsparseXgemvi() ` x x x x -============================================================================== ====== ====== ============== ============== - -Sparse Level 3 Functions ------------------------- - -============================================================================= ====== ====== ============== ============== -Function name single double single complex double complex -============================================================================= ====== ====== ============== ============== -:cpp:func:`hipsparseXbsrmm() ` x x x x -:cpp:func:`hipsparseXcsrmm() ` x x x x -:cpp:func:`hipsparseXcsrmm2() ` x x x x -:cpp:func:`hipsparseXbsrsm2_zeroPivot` -:cpp:func:`hipsparseXbsrsm2_bufferSize() ` x x x x -:cpp:func:`hipsparseXbsrsm2_analysis() ` x x x x -:cpp:func:`hipsparseXbsrsm2_solve() ` x x x x -:cpp:func:`hipsparseXcsrsm2_zeroPivot` -:cpp:func:`hipsparseXcsrsm2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsrsm2_analysis() ` x x x x -:cpp:func:`hipsparseXcsrsm2_solve() ` x x x x -:cpp:func:`hipsparseXgemmi() ` x x x x -============================================================================= ====== ====== ============== ============== - -Sparse Extra Functions ----------------------- - -================================================================================== ====== ====== ============== ============== -Function name single double single complex double complex -================================================================================== ====== ====== ============== ============== -:cpp:func:`hipsparseXcsrgeamNnz()` -:cpp:func:`hipsparseXcsrgeam() ` x x x x -:cpp:func:`hipsparseXcsrgeam2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsrgeam2Nnz()` -:cpp:func:`hipsparseXcsrgeam2() ` x x x x -:cpp:func:`hipsparseXcsrgemmNnz` -:cpp:func:`hipsparseXcsrgemm() ` x x x x -:cpp:func:`hipsparseXcsrgemm2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsrgemm2Nnz` -:cpp:func:`hipsparseXcsrgemm2() ` x x x x -================================================================================== ====== ====== ============== ============== - -Preconditioner Functions ------------------------- - -===================================================================================================================== ====== ====== ============== ============== -Function name single double single complex double complex -===================================================================================================================== ====== ====== ============== ============== -:cpp:func:`hipsparseXbsrilu02_zeroPivot` -:cpp:func:`hipsparseXbsrilu02_numericBoost() ` x x x x -:cpp:func:`hipsparseXbsrilu02_bufferSize() ` x x x x -:cpp:func:`hipsparseXbsrilu02_analysis() ` x x x x -:cpp:func:`hipsparseXbsrilu02() ` x x x x -:cpp:func:`hipsparseXcsrilu02_zeroPivot` -:cpp:func:`hipsparseXcsrilu02_numericBoost() ` x x x x -:cpp:func:`hipsparseXcsrilu02_bufferSize() ` x x x x -:cpp:func:`hipsparseXcsrilu02_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsrilu02_analysis() ` x x x x -:cpp:func:`hipsparseXcsrilu02() ` x x x x -:cpp:func:`hipsparseXbsric02_zeroPivot` -:cpp:func:`hipsparseXbsric02_bufferSize() ` x x x x -:cpp:func:`hipsparseXbsric02_analysis() ` x x x x -:cpp:func:`hipsparseXbsric02() ` x x x x -:cpp:func:`hipsparseXcsric02_zeroPivot` -:cpp:func:`hipsparseXcsric02_bufferSize() ` x x x x -:cpp:func:`hipsparseXcsric02_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsric02_analysis() ` x x x x -:cpp:func:`hipsparseXcsric02() ` x x x x -:cpp:func:`hipsparseXgtsv2_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXgtsv2() ` x x x x -:cpp:func:`hipsparseXgtsv2_nopivot_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXgtsv2_nopivot() ` x x x x -:cpp:func:`hipsparseXgtsv2StridedBatch_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXgtsv2StridedBatch() ` x x x x -:cpp:func:`hipsparseXgtsvInterleavedBatch_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXgtsvInterleavedBatch() ` x x x x -:cpp:func:`hipsparseXgpsvInterleavedBatch_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXgpsvInterleavedBatch() ` x x x x -===================================================================================================================== ====== ====== ============== ============== - -Conversion Functions --------------------- - -====================================================================================================================== ====== ====== ============== ============== -Function name single double single complex double complex -====================================================================================================================== ====== ====== ============== ============== -:cpp:func:`hipsparseXnnz() ` x x x x -:cpp:func:`hipsparseXdense2csr() ` x x x x -:cpp:func:`hipsparseXpruneDense2csr_bufferSize() ` x x -:cpp:func:`hipsparseXpruneDense2csrNnz() ` x x -:cpp:func:`hipsparseXpruneDense2csr() ` x x -:cpp:func:`hipsparseXpruneDense2csrByPercentage_bufferSize() ` x x -:cpp:func:`hipsparseXpruneDense2csrByPercentage_bufferSizeExt() ` x x -:cpp:func:`hipsparseXpruneDense2csrNnzByPercentage() ` x x -:cpp:func:`hipsparseXpruneDense2csrByPercentage() ` x x -:cpp:func:`hipsparseXdense2csc() ` x x x x -:cpp:func:`hipsparseXcsr2dense() ` x x x x -:cpp:func:`hipsparseXcsc2dense() ` x x x x -:cpp:func:`hipsparseXcsr2bsrNnz` -:cpp:func:`hipsparseXcsr2bsr() ` x x x x -:cpp:func:`hipsparseXnnz_compress() ` x x x x -:cpp:func:`hipsparseXcsr2coo` -:cpp:func:`hipsparseXcsr2csc() ` x x x x -:cpp:func:`hipsparseXcsr2hyb() ` x x x x -:cpp:func:`hipsparseXgebsr2gebsc_bufferSize ` x x x x -:cpp:func:`hipsparseXgebsr2gebsc() ` x x x x -:cpp:func:`hipsparseXcsr2gebsr_bufferSize() ` x x x x -:cpp:func:`hipsparseXcsr2gebsrNnz` -:cpp:func:`hipsparseXcsr2gebsr() ` x x x x -:cpp:func:`hipsparseXbsr2csr() ` x x x x -:cpp:func:`hipsparseXgebsr2csr() ` x x x x -:cpp:func:`hipsparseXcsr2csr_compress() ` x x x x -:cpp:func:`hipsparseXpruneCsr2csr_bufferSize() ` x x -:cpp:func:`hipsparseXpruneCsr2csr_bufferSizeExt() ` x x -:cpp:func:`hipsparseXpruneCsr2csrNnz() ` x x -:cpp:func:`hipsparseXpruneCsr2csr() ` x x -:cpp:func:`hipsparseXpruneCsr2csrByPercentage_bufferSize() ` x x -:cpp:func:`hipsparseXpruneCsr2csrByPercentage_bufferSizeExt() ` x x -:cpp:func:`hipsparseXpruneCsr2csrNnzByPercentage() ` x x -:cpp:func:`hipsparseXpruneCsr2csrByPercentage() ` x x -:cpp:func:`hipsparseXhyb2csr() ` x x x x -:cpp:func:`hipsparseXcoo2csr` -:cpp:func:`hipsparseCreateIdentityPermutation` -:cpp:func:`hipsparseXcsrsort_bufferSizeExt` -:cpp:func:`hipsparseXcsrsort` -:cpp:func:`hipsparseXcscsort_bufferSizeExt` -:cpp:func:`hipsparseXcscsort` -:cpp:func:`hipsparseXcoosort_bufferSizeExt` -:cpp:func:`hipsparseXcoosortByRow` -:cpp:func:`hipsparseXcoosortByColumn` -:cpp:func:`hipsparseXgebsr2gebsr_bufferSize() ` x x x x -:cpp:func:`hipsparseXgebsr2gebsrNnz()` -:cpp:func:`hipsparseXgebsr2gebsr() ` x x x x -:cpp:func:`hipsparseXcsru2csr_bufferSizeExt() ` x x x x -:cpp:func:`hipsparseXcsru2csr() ` x x x x -:cpp:func:`hipsparseXcsr2csru() ` x x x x -====================================================================================================================== ====== ====== ============== ============== - -Reordering Functions --------------------- - -======================================================= ====== ====== ============== ============== -Function name single double single complex double complex -======================================================= ====== ====== ============== ============== -:cpp:func:`hipsparseXcsrcolor() ` x x x x -======================================================= ====== ====== ============== ============== - -Sparse Generic Functions ------------------------- - -=============================================== ====== ====== ============== ============== -Function name single double single complex double complex -=============================================== ====== ====== ============== ============== -:cpp:func:`hipsparseAxpby()` x x x x -:cpp:func:`hipsparseGather()` x x x x -:cpp:func:`hipsparseScatter()` x x x x -:cpp:func:`hipsparseRot()` x x x x -:cpp:func:`hipsparseSparseToDense_bufferSize()` x x x x -:cpp:func:`hipsparseSparseToDense()` x x x x -:cpp:func:`hipsparseDenseToSparse_bufferSize()` x x x x -:cpp:func:`hipsparseDenseToSparse_analysis()` x x x x -:cpp:func:`hipsparseDenseToSparse_convert()` x x x x -:cpp:func:`hipsparseSpVV_bufferSize()` x x x x -:cpp:func:`hipsparseSpVV()` x x x x -:cpp:func:`hipsparseSpMV_bufferSize()` x x x x -:cpp:func:`hipsparseSpMV()` x x x x -:cpp:func:`hipsparseSpMM_bufferSize()` x x x x -:cpp:func:`hipsparseSpMM_preprocess()` x x x x -:cpp:func:`hipsparseSpMM()` x x x x -:cpp:func:`hipsparseSpGEMM_createDescr()` x x x x -:cpp:func:`hipsparseSpGEMM_destroyDescr()` x x x x -:cpp:func:`hipsparseSpGEMM_workEstimation()` x x x x -:cpp:func:`hipsparseSpGEMM_compute()` x x x x -:cpp:func:`hipsparseSpGEMM_copy()` x x x x -:cpp:func:`hipsparseSDDMM_bufferSize()` x x x x -:cpp:func:`hipsparseSDDMM_preprocess()` x x x x -:cpp:func:`hipsparseSDDMM()` x x x x -:cpp:func:`hipsparseSpSV_createDescr()` x x x x -:cpp:func:`hipsparseSpSV_destroyDescr()` x x x x -:cpp:func:`hipsparseSpSV_bufferSize()` x x x x -:cpp:func:`hipsparseSpSV_analysis()` x x x x -:cpp:func:`hipsparseSpSV_solve()` x x x x -:cpp:func:`hipsparseSpSM_createDescr()` x x x x -:cpp:func:`hipsparseSpSM_destroyDescr()` x x x x -:cpp:func:`hipsparseSpSM_bufferSize()` x x x x -:cpp:func:`hipsparseSpSM_analysis()` x x x x -:cpp:func:`hipsparseSpSM_solve()` x x x x -=============================================== ====== ====== ============== ============== - -Storage schemes and indexing base ---------------------------------- -hipSPARSE supports 0 and 1 based indexing. -The index base is selected by the :cpp:enum:`hipsparseIndexBase_t` type which is either passed as standalone parameter or as part of the :cpp:type:`hipsparseMatDescr_t` type. - -Furthermore, dense vectors are represented with a 1D array, stored linearly in memory. -Sparse vectors are represented by a 1D data array stored linearly in memory that hold all non-zero elements and a 1D indexing array stored linearly in memory that hold the positions of the corresponding non-zero elements. - -Pointer mode ------------- -The auxiliary functions :cpp:func:`hipsparseSetPointerMode` and :cpp:func:`hipsparseGetPointerMode` are used to set and get the value of the state variable :cpp:enum:`hipsparsePointerMode_t`. -If :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`, then scalar parameters must be allocated on the host. -If :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, then scalar parameters must be allocated on the device. - -There are two types of scalar parameter: - - 1. Scaling parameters, such as `alpha` and `beta` used in e.g. :cpp:func:`hipsparseScsrmv`, :cpp:func:`hipsparseSbsrmv`, ... - 2. Scalar results from functions such as :cpp:func:`hipsparseSdoti`, :cpp:func:`hipsparseCdotci`, ... - -For scalar parameters such as alpha and beta, memory can be allocated on the host heap or stack, when :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`. -The kernel launch is asynchronous, and if the scalar parameter is on the heap, it can be freed after the return from the kernel launch. -When :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, the scalar parameter must not be changed till the kernel completes. - -For scalar results, when :cpp:enum:`hipsparsePointerMode_t` is equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_HOST`, the function blocks the CPU till the GPU has copied the result back to the host. -Using :cpp:enum:`hipsparsePointerMode_t` equal to :cpp:enumerator:`HIPSPARSE_POINTER_MODE_DEVICE`, the function will return after the asynchronous launch. -Similarly to vector and matrix results, the scalar result is only available when the kernel has completed execution. - -Asynchronous API ----------------- -Except a functions having memory allocation inside preventing asynchronicity, all hipSPARSE functions are configured to operate in non-blocking fashion with respect to CPU, meaning these library functions return immediately. - -.. _hipsparse_auxiliary_functions_: - -Sparse Auxiliary Functions -========================== - -This module holds all sparse auxiliary functions. - -The functions that are contained in the auxiliary module describe all available helper functions that are required for subsequent library calls. - -.. _hipsparse_create_handle_: - -hipsparseCreate() ------------------ - -.. doxygenfunction:: hipsparseCreate - -.. _hipsparse_destroy_handle_: - -hipsparseDestroy() ------------------- - -.. doxygenfunction:: hipsparseDestroy - -hipsparseGetVersion() ---------------------- - -.. doxygenfunction:: hipsparseGetVersion - -hipsparseGetGitRevision() -------------------------- - -.. doxygenfunction:: hipsparseGetGitRevision - -.. _hipsparse_set_stream_: - -hipsparseSetStream() --------------------- - -.. doxygenfunction:: hipsparseSetStream - -hipsparseGetStream() --------------------- - -.. doxygenfunction:: hipsparseGetStream - -hipsparseSetPointerMode() -------------------------- - -.. doxygenfunction:: hipsparseSetPointerMode - -hipsparseGetPointerMode() -------------------------- - -.. doxygenfunction:: hipsparseGetPointerMode - -hipsparseCreateMatDescr() -------------------------- - -.. doxygenfunction:: hipsparseCreateMatDescr - -hipsparseDestroyMatDescr() --------------------------- - -.. doxygenfunction:: hipsparseDestroyMatDescr - -hipsparseCopyMatDescr() ------------------------ - -.. doxygenfunction:: hipsparseCopyMatDescr - -hipsparseSetMatType() ---------------------- - -.. doxygenfunction:: hipsparseSetMatType - -hipsparseGetMatType() ---------------------- - -.. doxygenfunction:: hipsparseGetMatType - -hipsparseSetMatFillMode() -------------------------- - -.. doxygenfunction:: hipsparseSetMatFillMode - -hipsparseGetMatFillMode() -------------------------- - -.. doxygenfunction:: hipsparseGetMatFillMode - -hipsparseSetMatDiagType() -------------------------- - -.. doxygenfunction:: hipsparseSetMatDiagType - -hipsparseGetMatDiagType() -------------------------- - -.. doxygenfunction:: hipsparseGetMatDiagType - -hipsparseSetMatIndexBase() --------------------------- - -.. doxygenfunction:: hipsparseSetMatIndexBase - -hipsparseGetMatIndexBase() --------------------------- - -.. doxygenfunction:: hipsparseGetMatIndexBase - -hipsparseCreateHybMat() ------------------------ - -.. doxygenfunction:: hipsparseCreateHybMat - -hipsparseDestroyHybMat() ------------------------- - -.. doxygenfunction:: hipsparseDestroyHybMat - -hipsparseCreateBsrsv2Info() ---------------------------- - -.. doxygenfunction:: hipsparseCreateBsrsv2Info - -hipsparseDestroyBsrsv2Info() ----------------------------- - -.. doxygenfunction:: hipsparseDestroyBsrsv2Info - -hipsparseCreateBsrsm2Info() ---------------------------- - -.. doxygenfunction:: hipsparseCreateBsrsm2Info - -hipsparseDestroyBsrsm2Info() ----------------------------- - -.. doxygenfunction:: hipsparseDestroyBsrsm2Info - -hipsparseCreateBsrilu02Info() ------------------------------ - -.. doxygenfunction:: hipsparseCreateBsrilu02Info - -hipsparseDestroyBsrilu02Info() ------------------------------- - -.. doxygenfunction:: hipsparseDestroyBsrilu02Info - -hipsparseCreateBsric02Info() ----------------------------- - -.. doxygenfunction:: hipsparseCreateBsric02Info - -hipsparseDestroyBsric02Info() ------------------------------ - -.. doxygenfunction:: hipsparseDestroyBsric02Info - -hipsparseCreateCsrsv2Info() ---------------------------- - -.. doxygenfunction:: hipsparseCreateCsrsv2Info - -hipsparseDestroyCsrsv2Info() ----------------------------- - -.. doxygenfunction:: hipsparseDestroyCsrsv2Info - -hipsparseCreateCsrsm2Info() ---------------------------- - -.. doxygenfunction:: hipsparseCreateCsrsm2Info - -hipsparseDestroyCsrsm2Info() ----------------------------- - -.. doxygenfunction:: hipsparseDestroyCsrsm2Info - -hipsparseCreateCsrilu02Info() ------------------------------ - -.. doxygenfunction:: hipsparseCreateCsrilu02Info - -hipsparseDestroyCsrilu02Info() ------------------------------- - -.. doxygenfunction:: hipsparseDestroyCsrilu02Info - -hipsparseCreateCsric02Info() ----------------------------- - -.. doxygenfunction:: hipsparseCreateCsric02Info - -hipsparseDestroyCsric02Info() ------------------------------ - -.. doxygenfunction:: hipsparseDestroyCsric02Info - -hipsparseCreateCsru2csrInfo() ------------------------------ - -.. doxygenfunction:: hipsparseCreateCsru2csrInfo - -hipsparseDestroyCsru2csrInfo() ------------------------------- - -.. doxygenfunction:: hipsparseDestroyCsru2csrInfo - -hipsparseCreateColorInfo() --------------------------- - -.. doxygenfunction:: hipsparseCreateColorInfo - -hipsparseDestroyColorInfo() ---------------------------- - -.. doxygenfunction:: hipsparseDestroyColorInfo - -hipsparseCreateCsrgemm2Info() ------------------------------ - -.. doxygenfunction:: hipsparseCreateCsrgemm2Info - -hipsparseDestroyCsrgemm2Info() ------------------------------- - -.. doxygenfunction:: hipsparseDestroyCsrgemm2Info - -hipsparseCreatePruneInfo() --------------------------- - -.. doxygenfunction:: hipsparseCreatePruneInfo - -hipsparseDestroyPruneInfo() ---------------------------- - -.. doxygenfunction:: hipsparseDestroyPruneInfo - -hipsparseCreateSpVec() ----------------------- - -.. doxygenfunction:: hipsparseCreateSpVec - -hipsparseDestroySpVec() ------------------------ - -.. doxygenfunction:: hipsparseDestroySpVec - -hipsparseSpVecGet() -------------------- - -.. doxygenfunction:: hipsparseSpVecGet - -hipsparseSpVecGetIndexBase() ----------------------------- - -.. doxygenfunction:: hipsparseSpVecGetIndexBase - -hipsparseSpVecGetValues() -------------------------- - -.. doxygenfunction:: hipsparseSpVecGetValues - -hipsparseSpVecSetValues() -------------------------- - -.. doxygenfunction:: hipsparseSpVecSetValues - -hipsparseCreateCoo() --------------------- - -.. doxygenfunction:: hipsparseCreateCoo - -hipsparseCreateCooAoS() ------------------------ - -.. doxygenfunction:: hipsparseCreateCooAoS - -hipsparseCreateCsr() --------------------- - -.. doxygenfunction:: hipsparseCreateCsr - -hipsparseCreateCsc() --------------------- - -.. doxygenfunction:: hipsparseCreateCsc - -hipsparseCreateBlockedEll() ---------------------------- - -.. doxygenfunction:: hipsparseCreateBlockedEll - -hipsparseDestroySpMat() ------------------------ - -.. doxygenfunction:: hipsparseDestroySpMat - -hipsparseCooGet() ------------------ - -.. doxygenfunction:: hipsparseCooGet - -hipsparseCooAoSGet() --------------------- - -.. doxygenfunction:: hipsparseCooAoSGet - -hipsparseCsrGet() ------------------ - -.. doxygenfunction:: hipsparseCsrGet - -hipsparseBlockedEllGet() ------------------------- - -.. doxygenfunction:: hipsparseBlockedEllGet - -hipsparseCsrSetPointers() -------------------------- - -.. doxygenfunction:: hipsparseCsrSetPointers - -hipsparseCscSetPointers() -------------------------- - -.. doxygenfunction:: hipsparseCscSetPointers - -hipsparseCooSetPointers() -------------------------- - -.. doxygenfunction:: hipsparseCooSetPointers - -hipsparseSpMatGetSize() ------------------------ - -.. doxygenfunction:: hipsparseSpMatGetSize - -hipsparseSpMatGetFormat() -------------------------- - -.. doxygenfunction:: hipsparseSpMatGetFormat - -hipsparseSpMatGetIndexBase() ----------------------------- - -.. doxygenfunction:: hipsparseSpMatGetIndexBase - -hipsparseSpMatGetValues() -------------------------- - -.. doxygenfunction:: hipsparseSpMatGetValues - -hipsparseSpMatSetValues() -------------------------- - -.. doxygenfunction:: hipsparseSpMatSetValues - -hipsparseSpMatGetAttribute() ----------------------------- - -.. doxygenfunction:: hipsparseSpMatGetAttribute - -hipsparseSpMatSetAttribute() ----------------------------- - -.. doxygenfunction:: hipsparseSpMatSetAttribute - -hipsparseCreateDnVec() ----------------------- - -.. doxygenfunction:: hipsparseCreateDnVec - -hipsparseDestroyDnVec() ------------------------ - -.. doxygenfunction:: hipsparseDestroyDnVec - -hipsparseDnVecGet() -------------------- - -.. doxygenfunction:: hipsparseDnVecGet - -hipsparseDnVecGetValues() -------------------------- - -.. doxygenfunction:: hipsparseDnVecGetValues - -hipsparseDnVecSetValues() -------------------------- - -.. doxygenfunction:: hipsparseDnVecSetValues - -hipsparseCreateDnMat() ----------------------- - -.. doxygenfunction:: hipsparseCreateDnMat - -hipsparseDestroyDnMat() ------------------------ - -.. doxygenfunction:: hipsparseDestroyDnMat - -hipsparseDnMatGet() -------------------- - -.. doxygenfunction:: hipsparseDnMatGet - -hipsparseDnMatGetValues() -------------------------- - -.. doxygenfunction:: hipsparseDnMatGetValues - -hipsparseDnMatSetValues() -------------------------- - -.. doxygenfunction:: hipsparseDnMatSetValues - -.. _hipsparse_level1_functions_: - -Sparse Level 1 Functions -======================== - -The sparse level 1 routines describe operations between a vector in sparse format and a vector in dense format. This section describes all hipSPARSE level 1 sparse linear algebra functions. - -hipsparseXaxpyi() ------------------ - -.. doxygenfunction:: hipsparseSaxpyi - :outline: -.. doxygenfunction:: hipsparseDaxpyi - :outline: -.. doxygenfunction:: hipsparseCaxpyi - :outline: -.. doxygenfunction:: hipsparseZaxpyi - -hipsparseXdoti() ----------------- - -.. doxygenfunction:: hipsparseSdoti - :outline: -.. doxygenfunction:: hipsparseDdoti - :outline: -.. doxygenfunction:: hipsparseCdoti - :outline: -.. doxygenfunction:: hipsparseZdoti - -hipsparseXdotci() ------------------ - -.. doxygenfunction:: hipsparseCdotci - :outline: -.. doxygenfunction:: hipsparseZdotci - -hipsparseXgthr() ----------------- - -.. doxygenfunction:: hipsparseSgthr - :outline: -.. doxygenfunction:: hipsparseDgthr - :outline: -.. doxygenfunction:: hipsparseCgthr - :outline: -.. doxygenfunction:: hipsparseZgthr - -hipsparseXgthrz() ------------------ - -.. doxygenfunction:: hipsparseSgthrz - :outline: -.. doxygenfunction:: hipsparseDgthrz - :outline: -.. doxygenfunction:: hipsparseCgthrz - :outline: -.. doxygenfunction:: hipsparseZgthrz - -hipsparseXroti() ----------------- - -.. doxygenfunction:: hipsparseSroti - :outline: -.. doxygenfunction:: hipsparseDroti - -hipsparseXsctr() ----------------- - -.. doxygenfunction:: hipsparseSsctr - :outline: -.. doxygenfunction:: hipsparseDsctr - :outline: -.. doxygenfunction:: hipsparseCsctr - :outline: -.. doxygenfunction:: hipsparseZsctr - -.. _hipsparse_level2_functions_: - -Sparse Level 2 Functions -======================== - -This module holds all sparse level 2 routines. - -The sparse level 2 routines describe operations between a matrix in sparse format and a vector in dense format. - -hipsparseXcsrmv() ------------------ - -.. doxygenfunction:: hipsparseScsrmv - :outline: -.. doxygenfunction:: hipsparseDcsrmv - :outline: -.. doxygenfunction:: hipsparseCcsrmv - :outline: -.. doxygenfunction:: hipsparseZcsrmv - -hipsparseXcsrsv2_zeroPivot() ----------------------------- - -.. doxygenfunction:: hipsparseXcsrsv2_zeroPivot - -hipsparseXcsrsv2_bufferSize() ------------------------------ - -.. doxygenfunction:: hipsparseScsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseDcsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseCcsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseZcsrsv2_bufferSize - -hipsparseXcsrsv2_bufferSizeExt() --------------------------------- - -.. doxygenfunction:: hipsparseScsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsrsv2_bufferSizeExt - -hipsparseXcsrsv2_analysis() ---------------------------- - -.. doxygenfunction:: hipsparseScsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseDcsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseCcsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseZcsrsv2_analysis - -hipsparseXcsrsv2_solve() ------------------------- - -.. doxygenfunction:: hipsparseScsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseDcsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseCcsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseZcsrsv2_solve - -hipsparseXhybmv() ------------------ - -.. doxygenfunction:: hipsparseShybmv - :outline: -.. doxygenfunction:: hipsparseDhybmv - :outline: -.. doxygenfunction:: hipsparseChybmv - :outline: -.. doxygenfunction:: hipsparseZhybmv - -hipsparseXbsrmv() ------------------ - -.. doxygenfunction:: hipsparseSbsrmv - :outline: -.. doxygenfunction:: hipsparseDbsrmv - :outline: -.. doxygenfunction:: hipsparseCbsrmv - :outline: -.. doxygenfunction:: hipsparseZbsrmv - -hipsparseXbsrxmv() ------------------- - -.. doxygenfunction:: hipsparseSbsrxmv - :outline: -.. doxygenfunction:: hipsparseDbsrxmv - :outline: -.. doxygenfunction:: hipsparseCbsrxmv - :outline: -.. doxygenfunction:: hipsparseZbsrxmv - -hipsparseXbsrsv2_zeroPivot() ----------------------------- - -.. doxygenfunction:: hipsparseXbsrsv2_zeroPivot - -hipsparseXbsrsv2_bufferSize() ------------------------------ - -.. doxygenfunction:: hipsparseSbsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseDbsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseCbsrsv2_bufferSize - :outline: -.. doxygenfunction:: hipsparseZbsrsv2_bufferSize - -hipsparseXbsrsv2_bufferSizeExt() --------------------------------- - -.. doxygenfunction:: hipsparseSbsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDbsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCbsrsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZbsrsv2_bufferSizeExt - -hipsparseXbsrsv2_analysis() ---------------------------- - -.. doxygenfunction:: hipsparseSbsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseDbsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseCbsrsv2_analysis - :outline: -.. doxygenfunction:: hipsparseZbsrsv2_analysis - -hipsparseXbsrsv2_solve() ------------------------- - -.. doxygenfunction:: hipsparseSbsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseDbsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseCbsrsv2_solve - :outline: -.. doxygenfunction:: hipsparseZbsrsv2_solve - -hipsparseXgemvi_bufferSize() ----------------------------- - -.. doxygenfunction:: hipsparseSgemvi_bufferSize - :outline: -.. doxygenfunction:: hipsparseDgemvi_bufferSize - :outline: -.. doxygenfunction:: hipsparseCgemvi_bufferSize - :outline: -.. doxygenfunction:: hipsparseZgemvi_bufferSize - -hipsparseXgemvi() ------------------ - -.. doxygenfunction:: hipsparseSgemvi - :outline: -.. doxygenfunction:: hipsparseDgemvi - :outline: -.. doxygenfunction:: hipsparseCgemvi - :outline: -.. doxygenfunction:: hipsparseZgemvi - -.. _hipsparse_level3_functions_: - -Sparse Level 3 Functions -======================== - -This module holds all sparse level 3 routines. - -The sparse level 3 routines describe operations between a matrix in sparse format and multiple vectors in dense format that can also be seen as a dense matrix. - -hipsparseXbsrmm() ------------------ - -.. doxygenfunction:: hipsparseSbsrmm - :outline: -.. doxygenfunction:: hipsparseDbsrmm - :outline: -.. doxygenfunction:: hipsparseCbsrmm - :outline: -.. doxygenfunction:: hipsparseZbsrmm - -hipsparseXcsrmm() ------------------ - -.. doxygenfunction:: hipsparseScsrmm - :outline: -.. doxygenfunction:: hipsparseDcsrmm - :outline: -.. doxygenfunction:: hipsparseCcsrmm - :outline: -.. doxygenfunction:: hipsparseZcsrmm - -hipsparseXcsrmm2() ------------------- - -.. doxygenfunction:: hipsparseScsrmm2 - :outline: -.. doxygenfunction:: hipsparseDcsrmm2 - :outline: -.. doxygenfunction:: hipsparseCcsrmm2 - :outline: -.. doxygenfunction:: hipsparseZcsrmm2 - -hipsparseXbsrsm2_zeroPivot() ----------------------------- - -.. doxygenfunction:: hipsparseXbsrsm2_zeroPivot - -hipsparseXbsrsm2_bufferSize() ------------------------------ - -.. doxygenfunction:: hipsparseSbsrsm2_bufferSize - :outline: -.. doxygenfunction:: hipsparseDbsrsm2_bufferSize - :outline: -.. doxygenfunction:: hipsparseCbsrsm2_bufferSize - :outline: -.. doxygenfunction:: hipsparseZbsrsm2_bufferSize - -hipsparseXbsrsm2_analysis() ---------------------------- - -.. doxygenfunction:: hipsparseSbsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseDbsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseCbsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseZbsrsm2_analysis - -hipsparseXbsrsm2_solve() ------------------------- - -.. doxygenfunction:: hipsparseSbsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseDbsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseCbsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseZbsrsm2_solve - -hipsparseXcsrsm2_zeroPivot() ----------------------------- - -.. doxygenfunction:: hipsparseXcsrsm2_zeroPivot - -hipsparseXcsrsm2_bufferSizeExt() --------------------------------- - -.. doxygenfunction:: hipsparseScsrsm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsrsm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsrsm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsrsm2_bufferSizeExt - -hipsparseXcsrsm2_analysis() ---------------------------- - -.. doxygenfunction:: hipsparseScsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseDcsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseCcsrsm2_analysis - :outline: -.. doxygenfunction:: hipsparseZcsrsm2_analysis - -hipsparseXcsrsm2_solve() ------------------------- - -.. doxygenfunction:: hipsparseScsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseDcsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseCcsrsm2_solve - :outline: -.. doxygenfunction:: hipsparseZcsrsm2_solve - -hipsparseXgemmi() ------------------ - -.. doxygenfunction:: hipsparseSgemmi - :outline: -.. doxygenfunction:: hipsparseDgemmi - :outline: -.. doxygenfunction:: hipsparseCgemmi - :outline: -.. doxygenfunction:: hipsparseZgemmi - -.. _hipsparse_extra_functions_: - -Sparse Extra Functions -====================== - -This module holds all sparse extra routines. - -The sparse extra routines describe operations that manipulate sparse matrices. - -hipsparseXcsrgeamNnz() ----------------------- - -.. doxygenfunction:: hipsparseXcsrgeamNnz - -hipsparseXcsrgeam() -------------------- - -.. doxygenfunction:: hipsparseScsrgeam - :outline: -.. doxygenfunction:: hipsparseDcsrgeam - :outline: -.. doxygenfunction:: hipsparseCcsrgeam - :outline: -.. doxygenfunction:: hipsparseZcsrgeam - -hipsparseXcsrgeam2_bufferSizeExt() ----------------------------------- - -.. doxygenfunction:: hipsparseScsrgeam2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsrgeam2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsrgeam2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsrgeam2_bufferSizeExt - -hipsparseXcsrgeam2Nnz() ------------------------ - -.. doxygenfunction:: hipsparseXcsrgeam2Nnz - -hipsparseXcsrgeam2() --------------------- - -.. doxygenfunction:: hipsparseScsrgeam2 - :outline: -.. doxygenfunction:: hipsparseDcsrgeam2 - :outline: -.. doxygenfunction:: hipsparseCcsrgeam2 - :outline: -.. doxygenfunction:: hipsparseZcsrgeam2 - -hipsparseXcsrgemmNnz() ----------------------- - -.. doxygenfunction:: hipsparseXcsrgemmNnz - -hipsparseXcsrgemm() -------------------- - -.. doxygenfunction:: hipsparseScsrgemm - :outline: -.. doxygenfunction:: hipsparseDcsrgemm - :outline: -.. doxygenfunction:: hipsparseCcsrgemm - :outline: -.. doxygenfunction:: hipsparseZcsrgemm - -hipsparseXcsrgemm2_bufferSizeExt() ----------------------------------- - -.. doxygenfunction:: hipsparseScsrgemm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsrgemm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsrgemm2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsrgemm2_bufferSizeExt - -hipsparseXcsrgemm2Nnz() ------------------------ - -.. doxygenfunction:: hipsparseXcsrgemm2Nnz - -hipsparseXcsrgemm2() --------------------- - -.. doxygenfunction:: hipsparseScsrgemm2 - :outline: -.. doxygenfunction:: hipsparseDcsrgemm2 - :outline: -.. doxygenfunction:: hipsparseCcsrgemm2 - :outline: -.. doxygenfunction:: hipsparseZcsrgemm2 - -.. _hipsparse_precond_functions_: - -Preconditioner Functions -======================== - -This module holds all sparse preconditioners. - -The sparse preconditioners describe manipulations on a matrix in sparse format to obtain a sparse preconditioner matrix. - -hipsparseXbsrilu02_zeroPivot() ------------------------------- - -.. doxygenfunction:: hipsparseXbsrilu02_zeroPivot - -hipsparseXbsrilu02_numericBoost() ---------------------------------- - -.. doxygenfunction:: hipsparseSbsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseDbsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseCbsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseZbsrilu02_numericBoost - -hipsparseXbsrilu02_bufferSize() -------------------------------- - -.. doxygenfunction:: hipsparseSbsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseDbsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseCbsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseZbsrilu02_bufferSize - -hipsparseXbsrilu02_analysis() ------------------------------ - -.. doxygenfunction:: hipsparseSbsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseDbsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseCbsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseZbsrilu02_analysis - -hipsparseXbsrilu02() --------------------- - -.. doxygenfunction:: hipsparseSbsrilu02 - :outline: -.. doxygenfunction:: hipsparseDbsrilu02 - :outline: -.. doxygenfunction:: hipsparseCbsrilu02 - :outline: -.. doxygenfunction:: hipsparseZbsrilu02 - -hipsparseXcsrilu02_zeroPivot() ------------------------------- - -.. doxygenfunction:: hipsparseXcsrilu02_zeroPivot - -hipsparseXcsrilu02_numericBoost() ---------------------------------- - -.. doxygenfunction:: hipsparseScsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseDcsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseCcsrilu02_numericBoost - :outline: -.. doxygenfunction:: hipsparseZcsrilu02_numericBoost - -hipsparseXcsrilu02_bufferSize() -------------------------------- - -.. doxygenfunction:: hipsparseScsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseDcsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseCcsrilu02_bufferSize - :outline: -.. doxygenfunction:: hipsparseZcsrilu02_bufferSize - -hipsparseXcsrilu02_bufferSizeExt() ----------------------------------- - -.. doxygenfunction:: hipsparseScsrilu02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsrilu02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsrilu02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsrilu02_bufferSizeExt - -hipsparseXcsrilu02_analysis() ------------------------------ - -.. doxygenfunction:: hipsparseScsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseDcsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseCcsrilu02_analysis - :outline: -.. doxygenfunction:: hipsparseZcsrilu02_analysis - -hipsparseXcsrilu02() --------------------- - -.. doxygenfunction:: hipsparseScsrilu02 - :outline: -.. doxygenfunction:: hipsparseDcsrilu02 - :outline: -.. doxygenfunction:: hipsparseCcsrilu02 - :outline: -.. doxygenfunction:: hipsparseZcsrilu02 - -hipsparseXbsric02_zeroPivot() ------------------------------ - -.. doxygenfunction:: hipsparseXbsric02_zeroPivot - -hipsparseXbsric02_bufferSize() ------------------------------- - -.. doxygenfunction:: hipsparseSbsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseDbsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseCbsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseZbsric02_bufferSize - -hipsparseXbsric02_analysis() ----------------------------- - -.. doxygenfunction:: hipsparseSbsric02_analysis - :outline: -.. doxygenfunction:: hipsparseDbsric02_analysis - :outline: -.. doxygenfunction:: hipsparseCbsric02_analysis - :outline: -.. doxygenfunction:: hipsparseZbsric02_analysis - -hipsparseXbsric02() -------------------- - -.. doxygenfunction:: hipsparseSbsric02 - :outline: -.. doxygenfunction:: hipsparseDbsric02 - :outline: -.. doxygenfunction:: hipsparseCbsric02 - :outline: -.. doxygenfunction:: hipsparseZbsric02 - -hipsparseXcsric02_zeroPivot() ------------------------------ - -.. doxygenfunction:: hipsparseXcsric02_zeroPivot - -hipsparseXcsric02_bufferSize() ------------------------------- - -.. doxygenfunction:: hipsparseScsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseDcsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseCcsric02_bufferSize - :outline: -.. doxygenfunction:: hipsparseZcsric02_bufferSize - -hipsparseXcsric02_bufferSizeExt() ---------------------------------- - -.. doxygenfunction:: hipsparseScsric02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsric02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsric02_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsric02_bufferSizeExt - -hipsparseXcsric02_analysis() ----------------------------- - -.. doxygenfunction:: hipsparseScsric02_analysis - :outline: -.. doxygenfunction:: hipsparseDcsric02_analysis - :outline: -.. doxygenfunction:: hipsparseCcsric02_analysis - :outline: -.. doxygenfunction:: hipsparseZcsric02_analysis - -hipsparseXcsric02() -------------------- - -.. doxygenfunction:: hipsparseScsric02 - :outline: -.. doxygenfunction:: hipsparseDcsric02 - :outline: -.. doxygenfunction:: hipsparseCcsric02 - :outline: -.. doxygenfunction:: hipsparseZcsric02 - -hipsparseXgtsv2_bufferSizeExt() -------------------------------- - -.. doxygenfunction:: hipsparseSgtsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDgtsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCgtsv2_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZgtsv2_bufferSizeExt - -hipsparseXgtsv2() ------------------ - -.. doxygenfunction:: hipsparseSgtsv2 - :outline: -.. doxygenfunction:: hipsparseDgtsv2 - :outline: -.. doxygenfunction:: hipsparseCgtsv2 - :outline: -.. doxygenfunction:: hipsparseZgtsv2 - -hipsparseXgtsv2_nopivot_bufferSizeExt() ---------------------------------------- - -.. doxygenfunction:: hipsparseSgtsv2_nopivot_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDgtsv2_nopivot_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCgtsv2_nopivot_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZgtsv2_nopivot_bufferSizeExt - -hipsparseXgtsv2_nopivot() -------------------------- - -.. doxygenfunction:: hipsparseSgtsv2_nopivot - :outline: -.. doxygenfunction:: hipsparseDgtsv2_nopivot - :outline: -.. doxygenfunction:: hipsparseCgtsv2_nopivot - :outline: -.. doxygenfunction:: hipsparseZgtsv2_nopivot - -hipsparseXgtsv2StridedBatch_bufferSizeExt() -------------------------------------------- - -.. doxygenfunction:: hipsparseSgtsv2StridedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDgtsv2StridedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCgtsv2StridedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZgtsv2StridedBatch_bufferSizeExt - -hipsparseXgtsv2StridedBatch() ------------------------------ - -.. doxygenfunction:: hipsparseSgtsv2StridedBatch - :outline: -.. doxygenfunction:: hipsparseDgtsv2StridedBatch - :outline: -.. doxygenfunction:: hipsparseCgtsv2StridedBatch - :outline: -.. doxygenfunction:: hipsparseZgtsv2StridedBatch - -hipsparseXgtsvInterleavedBatch_bufferSizeExt() ----------------------------------------------- - -.. doxygenfunction:: hipsparseSgtsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDgtsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCgtsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZgtsvInterleavedBatch_bufferSizeExt - -hipsparseXgtsvInterleavedBatch() --------------------------------- - -.. doxygenfunction:: hipsparseSgtsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseDgtsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseCgtsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseZgtsvInterleavedBatch - -hipsparseXgpsvInterleavedBatch_bufferSizeExt() ----------------------------------------------- - -.. doxygenfunction:: hipsparseSgpsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDgpsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCgpsvInterleavedBatch_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZgpsvInterleavedBatch_bufferSizeExt - -hipsparseXgpsvInterleavedBatch() --------------------------------- - -.. doxygenfunction:: hipsparseSgpsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseDgpsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseCgpsvInterleavedBatch - :outline: -.. doxygenfunction:: hipsparseZgpsvInterleavedBatch - -.. _hipsparse_conversion_functions_: - -Sparse Conversion Functions -=========================== - -This module holds all sparse conversion routines. - -The sparse conversion routines describe operations on a matrix in sparse format to obtain a matrix in a different sparse format. - -hipsparseXnnz() ---------------- - -.. doxygenfunction:: hipsparseSnnz - :outline: -.. doxygenfunction:: hipsparseDnnz - :outline: -.. doxygenfunction:: hipsparseCnnz - :outline: -.. doxygenfunction:: hipsparseZnnz - -hipsparseXdense2csr() ---------------------- - -.. doxygenfunction:: hipsparseSdense2csr - :outline: -.. doxygenfunction:: hipsparseDdense2csr - :outline: -.. doxygenfunction:: hipsparseCdense2csr - :outline: -.. doxygenfunction:: hipsparseZdense2csr - -hipsparseXpruneDense2csr_bufferSize() -------------------------------------- - -.. doxygenfunction:: hipsparseSpruneDense2csr_bufferSize - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csr_bufferSize - -hipsparseXpruneDense2csrNnz() ------------------------------ - -.. doxygenfunction:: hipsparseSpruneDense2csrNnz - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csrNnz - -hipsparseXpruneDense2csr() --------------------------- - -.. doxygenfunction:: hipsparseSpruneDense2csr - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csr - -hipsparseXpruneDense2csrByPercentage_bufferSize() -------------------------------------------------- - -.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage_bufferSize - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage_bufferSize - -hipsparseXpruneDense2csrByPercentage_bufferSizeExt() ----------------------------------------------------- - -.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage_bufferSizeExt - -hipsparseXpruneDense2csrNnzByPercentage() ------------------------------------------ - -.. doxygenfunction:: hipsparseSpruneDense2csrNnzByPercentage - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csrNnzByPercentage - -hipsparseXpruneDense2csrByPercentage() --------------------------------------- - -.. doxygenfunction:: hipsparseSpruneDense2csrByPercentage - :outline: -.. doxygenfunction:: hipsparseDpruneDense2csrByPercentage - -hipsparseXdense2csc() ---------------------- - -.. doxygenfunction:: hipsparseSdense2csc - :outline: -.. doxygenfunction:: hipsparseDdense2csc - :outline: -.. doxygenfunction:: hipsparseCdense2csc - :outline: -.. doxygenfunction:: hipsparseZdense2csc - -hipsparseXcsr2dense() ---------------------- - -.. doxygenfunction:: hipsparseScsr2dense - :outline: -.. doxygenfunction:: hipsparseDcsr2dense - :outline: -.. doxygenfunction:: hipsparseCcsr2dense - :outline: -.. doxygenfunction:: hipsparseZcsr2dense - -hipsparseXcsc2dense() ---------------------- - -.. doxygenfunction:: hipsparseScsc2dense - :outline: -.. doxygenfunction:: hipsparseDcsc2dense - :outline: -.. doxygenfunction:: hipsparseCcsc2dense - :outline: -.. doxygenfunction:: hipsparseZcsc2dense - -hipsparseXcsr2bsrNnz() ----------------------- - -.. doxygenfunction:: hipsparseXcsr2bsrNnz - -hipsparseXcsr2bsr() -------------------- - -.. doxygenfunction:: hipsparseScsr2bsr - :outline: -.. doxygenfunction:: hipsparseDcsr2bsr - :outline: -.. doxygenfunction:: hipsparseCcsr2bsr - :outline: -.. doxygenfunction:: hipsparseZcsr2bsr - -hipsparseXnnz_compress() ------------------------- - -.. doxygenfunction:: hipsparseSnnz_compress - :outline: -.. doxygenfunction:: hipsparseDnnz_compress - :outline: -.. doxygenfunction:: hipsparseCnnz_compress - :outline: -.. doxygenfunction:: hipsparseZnnz_compress - -hipsparseXcsr2coo() -------------------- - -.. doxygenfunction:: hipsparseXcsr2coo - -hipsparseXcsr2csc() -------------------- - -.. doxygenfunction:: hipsparseScsr2csc - :outline: -.. doxygenfunction:: hipsparseDcsr2csc - :outline: -.. doxygenfunction:: hipsparseCcsr2csc - :outline: -.. doxygenfunction:: hipsparseZcsr2csc - -hipsparseXcsr2cscEx2_bufferSize() ---------------------------------- - -.. doxygenfunction:: hipsparseCsr2cscEx2_bufferSize - -hipsparseXcsr2cscEx2() ----------------------- - -.. doxygenfunction:: hipsparseCsr2cscEx2 - -hipsparseXcsr2hyb() -------------------- - -.. doxygenfunction:: hipsparseScsr2hyb - :outline: -.. doxygenfunction:: hipsparseDcsr2hyb - :outline: -.. doxygenfunction:: hipsparseCcsr2hyb - :outline: -.. doxygenfunction:: hipsparseZcsr2hyb - -hipsparseXgebsr2gebsc_bufferSize() ----------------------------------- - -.. doxygenfunction:: hipsparseSgebsr2gebsc_bufferSize - :outline: -.. doxygenfunction:: hipsparseDgebsr2gebsc_bufferSize - :outline: -.. doxygenfunction:: hipsparseCgebsr2gebsc_bufferSize - :outline: -.. doxygenfunction:: hipsparseZgebsr2gebsc_bufferSize - -hipsparseXgebsr2gebsc() ------------------------ - -.. doxygenfunction:: hipsparseSgebsr2gebsc - :outline: -.. doxygenfunction:: hipsparseDgebsr2gebsc - :outline: -.. doxygenfunction:: hipsparseCgebsr2gebsc - :outline: -.. doxygenfunction:: hipsparseZgebsr2gebsc - -hipsparseXcsr2gebsr_bufferSize() --------------------------------- - -.. doxygenfunction:: hipsparseScsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseDcsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseCcsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseZcsr2gebsr_bufferSize - -hipsparseXcsr2gebsrNnz() ------------------------- - -.. doxygenfunction:: hipsparseXcsr2gebsrNnz - -hipsparseXcsr2gebsr() ---------------------- - -.. doxygenfunction:: hipsparseScsr2gebsr - :outline: -.. doxygenfunction:: hipsparseDcsr2gebsr - :outline: -.. doxygenfunction:: hipsparseCcsr2gebsr - :outline: -.. doxygenfunction:: hipsparseZcsr2gebsr - -hipsparseXbsr2csr() -------------------- - -.. doxygenfunction:: hipsparseSbsr2csr - :outline: -.. doxygenfunction:: hipsparseDbsr2csr - :outline: -.. doxygenfunction:: hipsparseCbsr2csr - :outline: -.. doxygenfunction:: hipsparseZbsr2csr - -hipsparseXgebsr2csr() ---------------------- - -.. doxygenfunction:: hipsparseSgebsr2csr - :outline: -.. doxygenfunction:: hipsparseDgebsr2csr - :outline: -.. doxygenfunction:: hipsparseCgebsr2csr - :outline: -.. doxygenfunction:: hipsparseZgebsr2csr - -hipsparseXcsr2csr_compress() ----------------------------- - -.. doxygenfunction:: hipsparseScsr2csr_compress - :outline: -.. doxygenfunction:: hipsparseDcsr2csr_compress - :outline: -.. doxygenfunction:: hipsparseCcsr2csr_compress - :outline: -.. doxygenfunction:: hipsparseZcsr2csr_compress - -hipsparseXpruneCsr2csr_bufferSize() ------------------------------------ - -.. doxygenfunction:: hipsparseSpruneCsr2csr_bufferSize - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csr_bufferSize - -hipsparseXpruneCsr2csr_bufferSizeExt() --------------------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csr_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csr_bufferSizeExt - -hipsparseXpruneCsr2csrNnz() ---------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csrNnz - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csrNnz - -hipsparseXpruneCsr2csr() ------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csr - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csr - -hipsparseXpruneCsr2csrByPercentage_bufferSize() ------------------------------------------------ - -.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage_bufferSize - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage_bufferSize - -hipsparseXpruneCsr2csrByPercentage_bufferSizeExt() --------------------------------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage_bufferSizeExt - -hipsparseXpruneCsr2csrNnzByPercentage() ---------------------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csrNnzByPercentage - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csrNnzByPercentage - -hipsparseXpruneCsr2csrByPercentage() ------------------------------------- - -.. doxygenfunction:: hipsparseSpruneCsr2csrByPercentage - :outline: -.. doxygenfunction:: hipsparseDpruneCsr2csrByPercentage - -hipsparseXhyb2csr() -------------------- - -.. doxygenfunction:: hipsparseShyb2csr - :outline: -.. doxygenfunction:: hipsparseDhyb2csr - :outline: -.. doxygenfunction:: hipsparseChyb2csr - :outline: -.. doxygenfunction:: hipsparseZhyb2csr - -hipsparseXcoo2csr() -------------------- - -.. doxygenfunction:: hipsparseXcoo2csr - -hipsparseCreateIdentityPermutation() ------------------------------------- - -.. doxygenfunction:: hipsparseCreateIdentityPermutation - -hipsparseXcsrsort_bufferSizeExt() ---------------------------------- - -.. doxygenfunction:: hipsparseXcsrsort_bufferSizeExt - -hipsparseXcsrsort() -------------------- - -.. doxygenfunction:: hipsparseXcsrsort - -hipsparseXcscsort_bufferSizeExt() ---------------------------------- - -.. doxygenfunction:: hipsparseXcscsort_bufferSizeExt - -hipsparseXcscsort() -------------------- - -.. doxygenfunction:: hipsparseXcscsort - -hipsparseXcoosort_bufferSizeExt() ---------------------------------- - -.. doxygenfunction:: hipsparseXcoosort_bufferSizeExt - -hipsparseXcoosortByRow() ------------------------- - -.. doxygenfunction:: hipsparseXcoosortByRow - -hipsparseXcoosortByColumn() ---------------------------- - -.. doxygenfunction:: hipsparseXcoosortByColumn - -hipsparseXgebsr2gebsr_bufferSize() ----------------------------------- - -.. doxygenfunction:: hipsparseSgebsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseDgebsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseCgebsr2gebsr_bufferSize - :outline: -.. doxygenfunction:: hipsparseZgebsr2gebsr_bufferSize - -hipsparseXgebsr2gebsrNnz() --------------------------- - -.. doxygenfunction:: hipsparseXgebsr2gebsrNnz - -hipsparseXgebsr2gebsr() ------------------------ - -.. doxygenfunction:: hipsparseSgebsr2gebsr - :outline: -.. doxygenfunction:: hipsparseDgebsr2gebsr - :outline: -.. doxygenfunction:: hipsparseCgebsr2gebsr - :outline: -.. doxygenfunction:: hipsparseZgebsr2gebsr - -hipsparseXcsru2csr_bufferSizeExt() ----------------------------------- - -.. doxygenfunction:: hipsparseScsru2csr_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseDcsru2csr_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseCcsru2csr_bufferSizeExt - :outline: -.. doxygenfunction:: hipsparseZcsru2csr_bufferSizeExt - -hipsparseXcsru2csr() --------------------- - -.. doxygenfunction:: hipsparseScsru2csr - :outline: -.. doxygenfunction:: hipsparseDcsru2csr - :outline: -.. doxygenfunction:: hipsparseCcsru2csr - :outline: -.. doxygenfunction:: hipsparseZcsru2csr - -hipsparseXcsr2csru() --------------------- - -.. doxygenfunction:: hipsparseScsr2csru - :outline: -.. doxygenfunction:: hipsparseDcsr2csru - :outline: -.. doxygenfunction:: hipsparseCcsr2csru - :outline: -.. doxygenfunction:: hipsparseZcsr2csru - -.. _hipsparse_reordering_functions_: - -Sparse Reordering Functions -=========================== - -This module holds all sparse reordering routines. - -hipsparseXcsrcolor() --------------------- - -.. doxygenfunction:: hipsparseScsrcolor - :outline: -.. doxygenfunction:: hipsparseDcsrcolor - :outline: -.. doxygenfunction:: hipsparseCcsrcolor - :outline: -.. doxygenfunction:: hipsparseZcsrcolor - -.. _hipsparse_generic_functions_: - -Sparse Generic Functions -======================== - -This module holds all sparse generic routines. - -The sparse generic routines describe operations that manipulate sparse matrices. - -hipsparseAxpby() ----------------- - -.. doxygenfunction:: hipsparseAxpby - -hipsparseGather() ------------------ - -.. doxygenfunction:: hipsparseGather - -hipsparseScatter() ------------------- - -.. doxygenfunction:: hipsparseScatter - -hipsparseRot() --------------- - -.. doxygenfunction:: hipsparseRot - -hipsparseSparseToDense_bufferSize() ------------------------------------ - -.. doxygenfunction:: hipsparseSparseToDense_bufferSize - -hipsparseSparseToDense() ------------------------- - -.. doxygenfunction:: hipsparseSparseToDense - -hipsparseDenseToSparse_bufferSize() ------------------------------------ - -.. doxygenfunction:: hipsparseDenseToSparse_bufferSize - -hipsparseDenseToSparse_analysis() ---------------------------------- - -.. doxygenfunction:: hipsparseDenseToSparse_analysis - -hipsparseDenseToSparse_convert() --------------------------------- - -.. doxygenfunction:: hipsparseDenseToSparse_convert - -hipsparseSpVV_bufferSize() --------------------------- - -.. doxygenfunction:: hipsparseSpVV_bufferSize - -hipsparseSpVV() ---------------- - -.. doxygenfunction:: hipsparseSpVV - -hipsparseSpMV_bufferSize() --------------------------- - -.. doxygenfunction:: hipsparseSpMV_bufferSize - -hipsparseSpMV() ---------------- - -.. doxygenfunction:: hipsparseSpMV - -hipsparseSpMM_bufferSize() --------------------------- - -.. doxygenfunction:: hipsparseSpMM_bufferSize - -hipsparseSpMM_preprocess() --------------------------- - -.. doxygenfunction:: hipsparseSpMM_preprocess - -hipsparseSpMM() ---------------- - -.. doxygenfunction:: hipsparseSpMM - -hipsparseSpGEMM_createDescr() ------------------------------ - -.. doxygenfunction:: hipsparseSpGEMM_createDescr - -hipsparseSpGEMM_destroyDescr() ------------------------------- - -.. doxygenfunction:: hipsparseSpGEMM_destroyDescr - -hipsparseSpGEMM_workEstimation() --------------------------------- - -.. doxygenfunction:: hipsparseSpGEMM_workEstimation - -hipsparseSpGEMM_compute() -------------------------- - -.. doxygenfunction:: hipsparseSpGEMM_compute - -hipsparseSpGEMM_copy() ----------------------- - -.. doxygenfunction:: hipsparseSpGEMM_copy - -hipsparseSDDMM_bufferSize() ---------------------------- - -.. doxygenfunction:: hipsparseSDDMM_bufferSize - -hipsparseSDDMM_preprocess() ---------------------------- - -.. doxygenfunction:: hipsparseSDDMM_preprocess - -hipsparseSDDMM() ----------------- - -.. doxygenfunction:: hipsparseSDDMM - -hipsparseSpSV_createDescr() ---------------------------- - -.. doxygenfunction:: hipsparseSpSV_createDescr - -hipsparseSpSV_destroyDescr() ----------------------------- - -.. doxygenfunction:: hipsparseSpSV_destroyDescr - -hipsparseSpSV_bufferSize() --------------------------- - -.. doxygenfunction:: hipsparseSpSV_bufferSize - -hipsparseSpSV_analysis() ------------------------- - -.. doxygenfunction:: hipsparseSpSV_analysis - -hipsparseSpSV_solve() ---------------------- - -.. doxygenfunction:: hipsparseSpSV_solve - -hipsparseSpSM_createDescr() ---------------------------- - -.. doxygenfunction:: hipsparseSpSM_createDescr - -hipsparseSpSM_destroyDescr() ----------------------------- - -.. doxygenfunction:: hipsparseSpSM_destroyDescr - -hipsparseSpSM_bufferSize() --------------------------- - -.. doxygenfunction:: hipsparseSpSM_bufferSize - -hipsparseSpSM_analysis() ------------------------- - -.. doxygenfunction:: hipsparseSpSM_analysis - -hipsparseSpSM_solve() ---------------------- - -.. doxygenfunction:: hipsparseSpSM_solve diff --git a/docs/types.rst b/docs/types.rst new file mode 100644 index 00000000..59731c99 --- /dev/null +++ b/docs/types.rst @@ -0,0 +1,253 @@ +Types +===== + +hipsparseHandle_t +----------------- + +.. doxygentypedef:: hipsparseHandle_t + +hipsparseMatDescr_t +------------------- + +.. doxygentypedef:: hipsparseMatDescr_t + +hipsparseHybMat_t +----------------- + +.. doxygentypedef:: hipsparseHybMat_t + +For more details on the HYB format, see :ref:`HYB storage format`. + +.. _hipsparse_color_: + +hipsparseColorInfo_t +-------------------- + +.. doxygentypedef:: hipsparseColorInfo_t + +bsrsv2Info_t +------------ + +.. doxygentypedef:: bsrsv2Info_t + +bsrsm2Info_t +------------ + +.. doxygentypedef:: bsrsm2Info_t + +bsrilu02Info_t +-------------- + +.. doxygentypedef:: bsrilu02Info_t + +bsric02Info_t +------------- + +.. doxygentypedef:: bsric02Info_t + +csrsv2Info_t +------------ + +.. doxygentypedef:: csrsv2Info_t + +csrsm2Info_t +------------ + +.. doxygentypedef:: csrsm2Info_t + +csrilu02Info_t +-------------- + +.. doxygentypedef:: csrilu02Info_t + +csric02Info_t +------------- + +.. doxygentypedef:: csric02Info_t + +csrgemm2Info_t +-------------- + +.. doxygentypedef:: csrgemm2Info_t + +pruneInfo_t +----------- + +.. doxygentypedef:: pruneInfo_t + +csru2csrInfo_t +-------------- + +.. doxygentypedef:: csru2csrInfo_t + +hipsparseSpVecDescr_t +--------------------- + +.. doxygentypedef:: hipsparseSpVecDescr_t + +hipsparseSpMatDescr_t +--------------------- + +.. doxygentypedef:: hipsparseSpMatDescr_t + +hipsparseDnVecDescr_t +--------------------- + +.. doxygentypedef:: hipsparseDnVecDescr_t + +hipsparseDnMatDescr_t +--------------------- + +.. doxygentypedef:: hipsparseDnMatDescr_t + +hipsparseSpGEMMDescr_t +---------------------- + +.. doxygentypedef:: hipsparseSpGEMMDescr_t + +hipsparseSpSVDescr_t +-------------------- + +.. doxygentypedef:: hipsparseSpSVDescr_t + +hipsparseSpSMDescr_t +-------------------- + +.. doxygentypedef:: hipsparseSpSMDescr_t + +hipsparseStatus_t +----------------- + +.. doxygenenum:: hipsparseStatus_t + +hipsparsePointerMode_t +---------------------- + +.. doxygenenum:: hipsparsePointerMode_t + +.. _hipsparse_action_: + +hipsparseAction_t +----------------- + +.. doxygenenum:: hipsparseAction_t + +hipsparseMatrixType_t +--------------------- + +.. doxygenenum:: hipsparseMatrixType_t + +.. _hipsparse_fill_mode_: + +hipsparseFillMode_t +------------------- + +.. doxygenenum:: hipsparseFillMode_t + +.. _hipsparse_diag_type_: + +hipsparseDiagType_t +------------------- + +.. doxygenenum:: hipsparseDiagType_t + +.. _hipsparse_index_base_: + +hipsparseIndexBase_t +-------------------- + +.. doxygenenum:: hipsparseIndexBase_t + +.. _hipsparse_operation_: + +hipsparseOperation_t +-------------------- + +.. doxygenenum:: hipsparseOperation_t + +.. _hipsparse_hyb_partition_: + +hipsparseHybPartition_t +----------------------- + +.. doxygenenum:: hipsparseHybPartition_t + +hipsparseSolvePolicy_t +---------------------- + +.. doxygenenum:: hipsparseSolvePolicy_t + +hipsparseSideMode_t +------------------- + +.. doxygenenum:: hipsparseSideMode_t + +hipsparseDirection_t +-------------------- + +.. doxygenenum:: hipsparseDirection_t + +hipsparseFormat_t +----------------- + +.. doxygenenum:: hipsparseFormat_t + +hipsparseOrder_t +---------------- + +.. doxygenenum:: hipsparseOrder_t + +hipsparseIndextype_t +-------------------- + +.. doxygenenum:: hipsparseIndexType_t + +hipsparseCsr2CscAlg_t +--------------------- + +.. doxygenenum:: hipsparseCsr2CscAlg_t + +hipsparseSpMVAlg_t +------------------ + +.. doxygenenum:: hipsparseSpMVAlg_t + +hipsparseSpMMAlg_t +------------------ + +.. doxygenenum:: hipsparseSpMMAlg_t + +hipsparseSparseToDenseAlg_t +--------------------------- + +.. doxygenenum:: hipsparseSparseToDenseAlg_t + +hipsparseDenseToSparseAlg_t +--------------------------- + +.. doxygenenum:: hipsparseDenseToSparseAlg_t + +hipsparseSDDMMAlg_t +------------------- + +.. doxygenenum:: hipsparseSDDMMAlg_t + +hipsparseSpSVAlg_t +------------------ + +.. doxygenenum:: hipsparseSpSVAlg_t + +hipsparseSpSMAlg_t +------------------ + +.. doxygenenum:: hipsparseSpSMAlg_t + +hipsparseSpMatAttribute_t +------------------------- + +.. doxygenenum:: hipsparseSpMatAttribute_t + +hipsparseSpGEMMAlg_t +-------------------- + +.. doxygenenum:: hipsparseSpGEMMAlg_t \ No newline at end of file diff --git a/docs/usermanual.rst b/docs/usermanual.rst new file mode 100644 index 00000000..da8e00a5 --- /dev/null +++ b/docs/usermanual.rst @@ -0,0 +1,23 @@ +.. _user_manual: + +*********** +User Manual +*********** + +.. toctree:: + :maxdepth: 3 + :caption: Contents: + + intro + install + basics + types + auxiliary + level1 + level2 + level3 + extra + precond + conversion + reorder + generic \ No newline at end of file