3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00

parallelizing ccc

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-04-23 14:46:46 -07:00
parent 07fe45e923
commit d052155f6e
8 changed files with 284 additions and 281 deletions

View file

@ -24,6 +24,7 @@ Revision History:
#include<iostream>
#include<climits>
#include<limits>
#include"z3_omp.h"
#ifndef SIZE_MAX
#define SIZE_MAX std::numeric_limits<std::size_t>::max()
@ -182,16 +183,26 @@ void set_verbosity_level(unsigned lvl);
unsigned get_verbosity_level();
std::ostream& verbose_stream();
void set_verbose_stream(std::ostream& str);
bool is_threaded();
#define IF_VERBOSE(LVL, CODE) { if (get_verbosity_level() >= LVL) { CODE } } ((void) 0)
#ifdef _EXTERNAL_RELEASE
#define IF_IVERBOSE(LVL, CODE) ((void) 0)
#else
#define IF_IVERBOSE(LVL, CODE) { if (get_verbosity_level() >= LVL) { CODE } } ((void) 0)
#endif
#define IF_VERBOSE(LVL, CODE) { \
if (get_verbosity_level() >= LVL) { \
if (is_threaded()) { \
LOCK_CODE(CODE); \
} \
else { \
CODE; \
} \
} } ((void) 0)
#define LOCK_CODE(CODE) \
{ \
__pragma(omp critical (verbose_lock)) \
{ \
CODE; \
} \
}
template<typename T>
struct default_eq {