Skip to content

Add 3 new element-wise vector operations #413

Open
alexander-novo wants to merge 4 commits intoslaven/vector-handler-cleanupfrom
alex/add-elementwise-vector-ops
Open

Add 3 new element-wise vector operations #413
alexander-novo wants to merge 4 commits intoslaven/vector-handler-cleanupfrom
alex/add-elementwise-vector-ops

Conversation

@alexander-novo
Copy link
Collaborator

Description

Add a new vector operations:

  • elementwiseDivide which performs like scale, but scales by the inverse of a diagonal matrix.
  • elementwiseMax which computes a vector whose elements are the maximum of the corresponding elements in the two input vectors.
  • abs which computes a vector whose elements are the absolute values of the corresponding element in the input vector.

Supplants #409 and is based on top of #411

Proposed changes

N/A

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.

Further comments

N/A

@alexander-novo alexander-novo changed the title Alex/add elementwise vector ops Add 3 new element-wise vector operations Feb 26, 2026
@alexander-novo alexander-novo added enhancement New feature or request hip cuda labels Feb 26, 2026
@alexander-novo alexander-novo added this to the Release 0.99.3 milestone Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda enhancement New feature or request hip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant