made valgrind use optional
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 21 Mar 2012 01:26:30 +0000 (01:26 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 21 Mar 2012 01:26:30 +0000 (01:26 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@349 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/unittest/vq_train_jvm.c

index 54613f6bb1ba3ac3c0e63a5e1d45100ef8e50291..9da091e085aa35108d66aa4c9ac0d04a94acda6e 100755 (executable)
@@ -27,7 +27,9 @@
 */
 
 
+#ifdef VALGRIND
 #include <valgrind/memcheck.h>
+#endif
 
 #include <assert.h>
 #include <stdlib.h>
@@ -337,7 +339,10 @@ int main(int argc, char **argv)
     }
   }
   nb_vectors = i;
+
+#ifdef VALGRIND
   VALGRIND_CHECK_MEM_IS_DEFINED(data, nb_entries*ndim);
+#endif
 
   /* determine weights for each training vector */
 
@@ -365,7 +370,9 @@ int main(int argc, char **argv)
       pred[i*ndim+j] = data[i*ndim+j] - COEF*data[(i-2)*ndim+j];
   }
 
+#ifdef VALGRIND
   VALGRIND_CHECK_MEM_IS_DEFINED(pred, nb_entries*ndim);
+#endif
 
   /* train first stage */