Skip to content

Commit

Permalink
few missing ret values
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshmi committed Jun 15, 2020
1 parent 19f7ec6 commit 4928d2c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion def.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cassert>
#include <iostream>
#include <queue>
#include <cstring>
#include <string>
#include <cmath>


Expand Down
1 change: 1 addition & 0 deletions mp_format_converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ namespace format {
bounded_to_smp();
return smp_->C_ ? smp_->C_->m : 0;
}
return 0;
}

size_t num_var(){
Expand Down
1 change: 1 addition & 0 deletions smp_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <utility>

#include <string>
#include "io.h"
#include "sparse_utilities.h"

Expand Down
9 changes: 5 additions & 4 deletions sparse_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#include <omp.h>
#include <cstring>
#include <string>
#include <cassert>
#include <cmath>
#include "def.h"
Expand Down Expand Up @@ -35,7 +35,8 @@ namespace sym_lib {
colind = new int[nnz]();
values = new double[nnz]();

memset(rowCnt, 0, sizeof(int) * nrow);
std::fill_n(rowCnt, nrow, 0);
//memset(rowCnt, 0, sizeof(int) * nrow);
for (int i = 0; i < ncol; i++) {
for (int j = Ap[i]; j < Ap[i + 1]; j++) {
int row = Ai[j];
Expand Down Expand Up @@ -70,8 +71,8 @@ namespace sym_lib {

int *colind = B->i;
double *values = B->x;

memset(rowCnt, 0, sizeof(int) * nrow);
std::fill_n(rowCnt, nrow, 0);
//memset(rowCnt, 0, sizeof(int) * nrow);
for (int i = 0; i < (int)ncol; i++) {
for (int j = A->p[i]; j < A->p[i + 1]; j++) {
int row = A->i[j];
Expand Down

0 comments on commit 4928d2c

Please sign in to comment.