From bae26674c0e01570819be3c446b26f26c5d82c2b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 28 Sep 2022 21:36:30 -0700 Subject: [PATCH] remove unused 'MATRIX_SKEW' flag This property is sometimes set on matrices but then never read. --- cmd/tools/matrix_market.c | 2 -- lib/sparse/SparseMatrix.c | 1 - lib/sparse/SparseMatrix.h | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/tools/matrix_market.c b/cmd/tools/matrix_market.c index d727f72a3..93d5c243a 100644 --- a/cmd/tools/matrix_market.c +++ b/cmd/tools/matrix_market.c @@ -240,8 +240,6 @@ SparseMatrix SparseMatrix_import_matrix_market(FILE * f) if (mm_is_symmetric(matcode)) { SparseMatrix_set_symmetric(A); SparseMatrix_set_pattern_symmetric(A); - } else if (mm_is_skew(matcode)) { - SparseMatrix_set_skew(A); } diff --git a/lib/sparse/SparseMatrix.c b/lib/sparse/SparseMatrix.c index 93d80774e..8a2c6a305 100644 --- a/lib/sparse/SparseMatrix.c +++ b/lib/sparse/SparseMatrix.c @@ -1625,7 +1625,6 @@ SparseMatrix SparseMatrix_remove_upper(SparseMatrix A){/* remove diag and upper clear_flag(A->property, MATRIX_PATTERN_SYMMETRIC); clear_flag(A->property, MATRIX_SYMMETRIC); - clear_flag(A->property, MATRIX_SKEW); return A; } diff --git a/lib/sparse/SparseMatrix.h b/lib/sparse/SparseMatrix.h index 1090ef272..b8df858bd 100644 --- a/lib/sparse/SparseMatrix.h +++ b/lib/sparse/SparseMatrix.h @@ -21,7 +21,7 @@ extern "C" { #define SYMMETRY_EPSILON 0.0000001 enum {FORMAT_CSC, FORMAT_CSR, FORMAT_COORD}; enum {UNMASKED = -10, MASKED = 1}; -enum {MATRIX_PATTERN_SYMMETRIC = 1<<0, MATRIX_SYMMETRIC = 1<<1, MATRIX_SKEW = 1<<2, MATRIX_UNDIRECTED = 1<<4}; +enum {MATRIX_PATTERN_SYMMETRIC = 1<<0, MATRIX_SYMMETRIC = 1<<1, MATRIX_UNDIRECTED = 1<<4}; enum {BIPARTITE_RECT = 0, BIPARTITE_PATTERN_UNSYM, BIPARTITE_UNSYM, BIPARTITE_ALWAYS}; @@ -111,7 +111,6 @@ SparseMatrix SparseMatrix_from_dense(int m, int n, double *x); #define SparseMatrix_set_undirected(A) set_flag((A)->property, MATRIX_UNDIRECTED) #define SparseMatrix_set_symmetric(A) set_flag((A)->property, MATRIX_SYMMETRIC) #define SparseMatrix_set_pattern_symmetric(A) set_flag((A)->property, MATRIX_PATTERN_SYMMETRIC) -#define SparseMatrix_set_skew(A) set_flag((A)->property, MATRIX_SKEW) #define SparseMatrix_known_undirected(A) test_flag((A)->property, MATRIX_UNDIRECTED) -- 2.40.0