mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 23:05:46 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
50
lib/cooperate.h
Normal file
50
lib/cooperate.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
cooperate.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Cooperation support
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo (leonardo) 2011-05-17
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef _COOPERATE_H_
|
||||
#define _COOPERATE_H_
|
||||
|
||||
class cooperation_section;
|
||||
|
||||
class cooperation_ctx {
|
||||
friend class cooperation_section;
|
||||
static bool g_cooperate;
|
||||
public:
|
||||
static bool enabled() { return g_cooperate; }
|
||||
static void checkpoint(char const * task);
|
||||
};
|
||||
|
||||
inline void cooperate(char const * task) {
|
||||
if (cooperation_ctx::enabled()) cooperation_ctx::checkpoint(task);
|
||||
}
|
||||
|
||||
// must be declared before "#pragma parallel" to enable cooperation
|
||||
class cooperation_section {
|
||||
public:
|
||||
cooperation_section();
|
||||
~cooperation_section();
|
||||
};
|
||||
|
||||
// must be first declaration inside "#pragma parallel for"
|
||||
class init_task {
|
||||
public:
|
||||
init_task(char const * task);
|
||||
~init_task();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue