summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-06-05 11:23:20 -0400
committerErik Schnetter <schnetter@gmail.com>2013-06-05 11:23:20 -0400
commit4e4721e044369a79e2ce657a74b9932c80ba26ac (patch)
treea55b57bc75cdad74c2d3939a7ec99456f71cdd93
parent1f8b9b278efbbb61d1fc3e158d95000fb5a291d0 (diff)
downloadvecmathlib-4e4721e044369a79e2ce657a74b9932c80ba26ac.zip
vecmathlib-4e4721e044369a79e2ce657a74b9932c80ba26ac.tar.gz
Add more debug code to check_mem for load operations
-rw-r--r--test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/test.cc b/test.cc
index 36a2f33..43d1b0e 100644
--- a/test.cc
+++ b/test.cc
@@ -132,14 +132,19 @@ struct vecmathlib_test {
static void check_mem(const char* const func,
const realvec_t x,
const real_t* const p,
- const realvec_t const xold,
+ const realvec_t xold,
const int mval)
{
realvec_t xwant;
for (int i=0; i<realvec_t::size; ++i) {
xwant.set_elt(i, mval & (1<<i) ? p[i] : xold[i]);
}
- const boolvec_t isbad = x != xwant;
+#warning "undo this"
+ // const boolvec_t isbad = x != xwant;
+ boolvec_t isbad;
+ for (int i=0; i<realvec_t::size; ++i) {
+ isbad.set_elt(i, x[i] != xwant[i]);
+ }
if (any(isbad)) {
++ num_errors;
cout << setprecision(realvec_t::digits10+2)
OpenPOWER on IntegriCloud