Skip to content

Commit 8e3cb3e

Browse files
committed
Perform de-clamping inside check_equivalence
1 parent f182c83 commit 8e3cb3e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/check_equivalence.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ int main(int argc, char** argv) {
101101
bsp_matrix_t matrix1 = bsp_read_matrix(info1.fname, info1.dataset);
102102
bsp_matrix_t matrix2 = bsp_read_matrix(info2.fname, info2.dataset);
103103

104+
bool perform_suitesparse_declamping = true;
105+
if (perform_suitesparse_declamping &&
106+
strcmp(bsp_get_file_extension(file1), ".mtx") == 0) {
107+
bsp_matrix_declamp_values(matrix1);
108+
}
109+
110+
if (perform_suitesparse_declamping &&
111+
strcmp(bsp_get_file_extension(file2), ".mtx") == 0) {
112+
bsp_matrix_declamp_values(matrix2);
113+
}
114+
104115
// If matrices are not the same format, try to convert.
105116
if (matrix1.format != matrix2.format) {
106117
if (matrix1.format != BSP_COOR) {

0 commit comments

Comments
 (0)