We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 418fcb2 commit 9d688d9Copy full SHA for 9d688d9
1 file changed
include/opdi/logic/omp/flushOmpLogic.hpp
@@ -51,9 +51,13 @@ namespace opdi {
51
public:
52
53
virtual void addReverseFlush() {
54
- Handle* handle = new Handle;
55
- handle->reverseFunc = FlushOmpLogic::reverseFunc;
56
- tool->pushExternalFunction(tool->getThreadLocalTape(), handle);
+
+ if (tool != nullptr && tool->getThreadLocalTape() != nullptr && tool->isActive(tool->getThreadLocalTape())) {
57
+ Handle* handle = new Handle;
58
+ handle->reverseFunc = FlushOmpLogic::reverseFunc;
59
+ tool->pushExternalFunction(tool->getThreadLocalTape(), handle);
60
+ }
61
}
62
};
63
0 commit comments