Commit cb3a508d authored by Iulian Grindeanu's avatar Iulian Grindeanu Committed by vijaysm

do not redefine assert

use assert.h
parent bba39188
......@@ -118,6 +118,13 @@ const char* mpi_err_str(int errorcode) {
#ifdef VALGRIND
#include <valgrind/memcheck.h>
template <typename T> inline
void VALGRIND_MAKE_VEC_UNDEFINED(std::vector<T>& v) {
if (v.size()) {}
(void)VALGRIND_MAKE_MEM_UNDEFINED(&v[0], v.size() * sizeof(T));
}
#else
#ifndef VALGRIND_CHECK_MEM_IS_DEFINED
#define VALGRIND_CHECK_MEM_IS_DEFINED(a, b) ((void)0)
......@@ -128,14 +135,14 @@ const char* mpi_err_str(int errorcode) {
#ifndef VALGRIND_MAKE_MEM_UNDEFINED
#define VALGRIND_MAKE_MEM_UNDEFINED(a, b) ((void)0)
#endif
#endif
template <typename T> inline
void VALGRIND_MAKE_VEC_UNDEFINED(std::vector<T>& v) {
if (v.size()) {}
(void)VALGRIND_MAKE_MEM_UNDEFINED(&v[0], v.size() * sizeof(T));
void VALGRIND_MAKE_VEC_UNDEFINED(std::vector<T>& ) {
/* Nothing to do */
}
#endif
#ifndef NDEBUG
#define START_SERIAL \
for (unsigned _x = 0; _x < myPcomm->proc_config().proc_size(); ++_x) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment