Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
Switch back to dynamic allocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoppert committed Jan 19, 2017
1 parent 938b3da commit f790e78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions matrix/Matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,10 @@ class Matrix
void print() const
{
static const size_t n = 10*N*M;
char buf[n];
char * buf = new char[n];
write_string(buf, n);
printf("%s\n", buf);
delete buf;
}

Matrix<Type, N, M> transpose() const
Expand Down Expand Up @@ -501,11 +502,12 @@ bool isEqual(const Matrix<Type, M, N> &x,

if (!equal) {
static const size_t n = 10*N*M;
char buf[n];
char * buf = new char[n];
x.write_string(buf, n);
printf("not equal\nx:\n%s\n", buf);
y.write_string(buf, n);
printf("y:\n%s\n", buf);
delete buf;
}
return equal;
}
Expand Down

0 comments on commit f790e78

Please sign in to comment.