Skip to content

Commit

Permalink
WIP: fixing bounded to smp
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshmi committed Jun 6, 2020
1 parent 502e429 commit 27796c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions def.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@
}

bool equality_check(const CSC* in_c){
if(!in_c && (n == 0 || m == 0))
return true;
if(!in_c && !(n == 0 || m == 0))
return false;
if(n != in_c->n || m != in_c->m || nnz != in_c->nnz)
return false;
for (int j = 0; j < n+1; ++j) {
Expand Down Expand Up @@ -338,6 +342,10 @@
}

bool equality_check(const Dense *in_d){
if(!in_d && (row == 0 || col == 0))
return true;
if(!in_d && !(row == 0 || col == 0))
return false;
if(row != in_d->row || col != in_d->col || lda != in_d->lda)
return false;
for (int i = 0; i < row * col; ++i) {
Expand Down
6 changes: 1 addition & 5 deletions sparse_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,8 @@ namespace sym_lib {
template <class T> bool are_equal(T *m1, T *m2){
if( m1 == NULLPNTR && m2 == NULLPNTR)
return true;
if( m1 == NULLPNTR || m2 == NULLPNTR)
return false;
return m1->equality_check(m2);
return m1 ? m1->equality_check(m2) : m2->equality_check(m1);
}



}

0 comments on commit 27796c8

Please sign in to comment.