3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-08 12:11:23 +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

@ -17,6 +17,9 @@ Revision History:
--*/
#ifdef _WINDOWS
#include "windows.h"
#endif
#include"util.h"
static unsigned g_verbosity_level = 0;
@ -35,6 +38,19 @@ void set_verbose_stream(std::ostream& str) {
g_verbose_stream = &str;
}
static int g_thread_id = 0;
static bool g_is_threaded = false;
bool is_threaded() {
if (g_is_threaded) return true;
#ifdef _WINDOWS
int thid = GetCurrentThreadId();
g_is_threaded = g_thread_id != thid && g_thread_id != 0;
g_thread_id = thid;
#endif
return g_is_threaded;
}
std::ostream& verbose_stream() {
return *g_verbose_stream;
}