Skip to content

Commit

Permalink
Fixed re-orthogonalization in lsmr solver
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooder committed Jan 25, 2025
1 parent c61cfb7 commit fb9ce6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/lsmr.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ lsmr <- function(A,

localVEnqueue <- function(v) {
# Store v into the circular buffer localV.

if (localPointer < localSize) {
max_cols <- ncol(localV)
if (localPointer < max_cols) {
localPointer <<- localPointer + 1
} else {
localPointer <<- 1
Expand All @@ -142,7 +142,7 @@ lsmr <- function(A,

vOutput <- v
if (localVQueueFull) {
localOrthoLimit <- localSize
localOrthoLimit <- ncol(localV)
} else {
localOrthoLimit <- localPointer
}
Expand Down

0 comments on commit fb9ce6a

Please sign in to comment.