From 8c4f0ddb34bb5598169add9f49474ffaa14df540 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 8 Apr 2022 08:14:39 -0700 Subject: [PATCH] mm2gv: remove unused 'SparseMatrix_export_matrix_market' --- cmd/tools/matrix_market.c | 48 --------------------------------------- cmd/tools/matrix_market.h | 2 -- 2 files changed, 50 deletions(-) diff --git a/cmd/tools/matrix_market.c b/cmd/tools/matrix_market.c index 5b74deec1..d0dabf827 100644 --- a/cmd/tools/matrix_market.c +++ b/cmd/tools/matrix_market.c @@ -30,29 +30,6 @@ int mm_get_type(MM_typecode typecode) return MATRIX_TYPE_UNKNOWN; } -static void set_mm_typecode(int type, MM_typecode * typecode) -{ - switch (type) { - case MATRIX_TYPE_COMPLEX: - mm_set_complex(typecode); - break; - case MATRIX_TYPE_REAL: - mm_set_real(typecode); - break; - case MATRIX_TYPE_INTEGER: - mm_set_integer(typecode); - break; - case MATRIX_TYPE_PATTERN: - mm_set_pattern(typecode); - break; - default: - break; - } -} - - - - SparseMatrix SparseMatrix_import_matrix_market(FILE * f, int format) { int ret_code, type; @@ -296,28 +273,3 @@ SparseMatrix SparseMatrix_import_matrix_market(FILE * f, int format) return A; } - - -static void mm_write_comment(FILE * file, char *comment) -{ - char percent[2] = "%"; - fprintf(file, "%s %s\n", percent, comment); -} - -void SparseMatrix_export_matrix_market(FILE * file, SparseMatrix A, - char *comment) -{ - MM_typecode matcode; - - mm_initialize_typecode(&matcode); - mm_set_matrix(&matcode); - mm_set_sparse(&matcode); - mm_set_general(&matcode); - set_mm_typecode(A->type, &matcode); - - mm_write_banner(file, matcode); - mm_write_comment(file, comment); - - SparseMatrix_export(file, A); - -} diff --git a/cmd/tools/matrix_market.h b/cmd/tools/matrix_market.h index c21d9441d..0118ada0f 100644 --- a/cmd/tools/matrix_market.h +++ b/cmd/tools/matrix_market.h @@ -13,6 +13,4 @@ #include "mmio.h" #include int mm_get_type(MM_typecode typecode); -void SparseMatrix_export_matrix_market(FILE * file, SparseMatrix A, - char *comment); SparseMatrix SparseMatrix_import_matrix_market(FILE * f, int format); -- 2.40.0