Skip to content

Add developer docs for vector and matrix classes and handlers#425

Merged
shakedregev merged 4 commits into
developfrom
tamar/vector-matrix-handler-docs
May 29, 2026
Merged

Add developer docs for vector and matrix classes and handlers#425
shakedregev merged 4 commits into
developfrom
tamar/vector-matrix-handler-docs

Conversation

@tamar-dewilde
Copy link
Copy Markdown
Collaborator

@tamar-dewilde tamar-dewilde commented May 28, 2026

Description

This PR adds a Developer Guide page for the open-ended documentation/tutorial task.

The page explains how Re::Solve separates vector and matrix data classes from operation handlers, backend workspaces, and memory spaces. It focuses on the difference between data containers, such as vector::Vector and matrix::Csr, and operation handlers, such as VectorHandler and MatrixHandler.

It also uses the SCCG path as a concrete example of how these pieces work together in backend-capable code.

@shakedregev

Proposed changes

  • Added docs/sphinx/developer_guide/vector_matrix_handlers.rst.
  • Added the new page to the Developer Guide index.
  • Documented the role of vector and matrix classes as data containers.
  • Documented the role of VectorHandler and MatrixHandler as operation handlers.
  • Added notes on workspaces, memory::HOST, and memory::DEVICE.
  • Used SCCG as an example of how data containers, handlers, workspaces, and memory spaces interact.
  • Added common details to watch for and suggested validation commands for SCCG-related CPU and CUDA paths.

Checklist

  • All tests pass (make test and make test_install per testing instructions). Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • I have manually run the non-experimental examples and verified that residuals are close to machine precision. (In your build directory run: ./examples/<your_example>.exe -h to get instructions how to run examples). Code tested on:
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR. If this is a minor PR that is part of a larger fix already included in the file, state so.

Testing

  • Ran pre-commit run --all-files.

  • Built the documentation locally with:

    sphinx-build -b html docs /tmp/resolve-docs-html
  • Documentation build succeeded with one existing warning from docs/doxygen/index.rst

Further comments

This is a documentation only PR, so backend tests, solver residual checks, compiler warning checks, and unit tests are not applicable.

I added the page to the Developer Guide index so it can be built and previewed with Sphinx. If this page should live somewhere else or be structured differently, please let me know.

@tamar-dewilde tamar-dewilde self-assigned this May 28, 2026
Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is helpful! There are a few rendering errors. You can look at the source code for documentation we already have to fix those.

Comment thread docs/doxygen/Doxyfile.in Outdated
Comment on lines +2793 to +2828
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen

OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen

OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen

OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
OUTPUT_DIRECTORY=../_readthedocs/html/doxygen

OUTPUT_DIRECTORY=../_readthedocs/html/doxygen

OUTPUT_DIRECTORY=../_readthedocs/html/doxygen
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line seems to be repeated

@shakedregev
Copy link
Copy Markdown
Collaborator

Please also update the Changelog

@tamar-dewilde
Copy link
Copy Markdown
Collaborator Author

Updated. I removed the repeated Doxyfile lines and added the CHANGELOG entry.

I may be missing the same rendering errors locally. Could you point me to where they are showing up specifically for you because I am not seeing them besides one small change?

Comment on lines +17 to +22
Public Re::Solve documentation describes Re::Solve as an open-source library
that provides GPU-resident linear solvers. The library contains iterative and
direct solvers designed to run on NVIDIA GPUs, AMD GPUs, and CPU devices.
Because of this, Re::Solve code often needs to separate the high-level solver
logic from the backend-specific details needed to perform matrix and vector
operations.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems self referential.

Comment on lines +76 to +79
.. code:: cpp

vector::Vector* x = new vector::Vector(n);
x->allocate(memory::HOST);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something isn't rendering here

Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let me see how we can fix the rendering.

@shakedregev
Copy link
Copy Markdown
Collaborator

shakedregev commented May 29, 2026

The rendering is correct, see here.

Just fix that one small comment I left and we can merge this.

Comment thread docs/sphinx/developer_guide/vector_matrix_handlers.rst Outdated
Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@shakedregev shakedregev merged commit 6a156c1 into develop May 29, 2026
6 checks passed
@shakedregev shakedregev deleted the tamar/vector-matrix-handler-docs branch May 29, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants