Skip to content

Commit

Permalink
Fix bug with assert statements in BasisReader
Browse files Browse the repository at this point in the history
  • Loading branch information
ckendrick committed Apr 18, 2024
1 parent dfbaa7f commit e692592
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/linalg/BasisReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ BasisReader::getSpatialBasis(
int num_cols = getNumSamples("basis");

char tmp[100];
CAROM_VERIFY(0 < start_col <= num_cols);
CAROM_VERIFY(0 < start_col && start_col <= num_cols);
CAROM_VERIFY(start_col <= end_col && end_col <= num_cols);
int num_cols_to_read = end_col - start_col + 1;

Expand Down Expand Up @@ -177,7 +177,7 @@ BasisReader::getTemporalBasis(
int num_cols = getNumSamples("temporal_basis");

char tmp[100];
CAROM_VERIFY(0 < start_col <= num_cols);
CAROM_VERIFY(0 < start_col && start_col <= num_cols);
CAROM_VERIFY(start_col <= end_col && end_col <= num_cols);
int num_cols_to_read = end_col - start_col + 1;

Expand Down Expand Up @@ -351,7 +351,7 @@ BasisReader::getSnapshotMatrix(
int num_rows = getDim("snapshot");
int num_cols = getNumSamples("snapshot");

CAROM_VERIFY(0 < start_col <= num_cols);
CAROM_VERIFY(0 < start_col && start_col <= num_cols);
CAROM_VERIFY(start_col <= end_col && end_col <= num_cols);
int num_cols_to_read = end_col - start_col + 1;

Expand Down

0 comments on commit e692592

Please sign in to comment.