Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lattice/quda
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeaclark committed Oct 13, 2011
2 parents 24e2e03 + 7be4de4 commit 3de6e8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/inv_gcr_quda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ void GCR::operator()(cudaColorSpinorField &x, cudaColorSpinorField &b)

// create sloppy fields used for orthogonalization
param.precision = invParam.cuda_prec_sloppy;
cudaColorSpinorField *p[Nkrylov], *Ap[Nkrylov];
cudaColorSpinorField **p = new cudaColorSpinorField*[Nkrylov];
cudaColorSpinorField **Ap = new cudaColorSpinorField*[Nkrylov];
for (int i=0; i<Nkrylov; i++) {
p[i] = new cudaColorSpinorField(x, param);
Ap[i] = new cudaColorSpinorField(x, param);
Expand Down Expand Up @@ -367,6 +368,8 @@ void GCR::operator()(cudaColorSpinorField &x, cudaColorSpinorField &b)
delete p[i];
delete Ap[i];
}
delete[] p;
delete[] Ap;

delete alpha;
for (int i=0; i<Nkrylov; i++) delete []beta[i];
Expand Down
4 changes: 2 additions & 2 deletions tests/test_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ createSiteLinkCPU(void** link, QudaPrecision precision, int phase)

template <typename Float>
int compareLink(Float **linkA, Float **linkB, int len) {
int fail_check = 16;
const int fail_check = 16;
int fail[fail_check];
for (int f=0; f<fail_check; f++) fail[f] = 0;

Expand Down Expand Up @@ -1207,7 +1207,7 @@ createHwCPU(void* hw, QudaPrecision precision)

template <typename Float>
void compare_mom(Float *momA, Float *momB, int len) {
int fail_check = 16;
const int fail_check = 16;
int fail[fail_check];
for (int f=0; f<fail_check; f++) fail[f] = 0;

Expand Down

0 comments on commit 3de6e8f

Please sign in to comment.