OpenVDB 14.0.0
Loading...
Searching...
No Matches
Threading.h
Go to the documentation of this file.
1// Copyright Contributors to the OpenVDB Project
2// SPDX-License-Identifier: Apache-2.0
3//
4/// @file Threading.h
5
6#ifndef OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED
7#define OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED
8
9#include <openvdb/version.h>
10
11#include <tbb/version.h>
12#include <tbb/task_group.h>
13#include <tbb/blocked_range.h>
14#include <tbb/task.h>
15
16namespace openvdb {
18namespace OPENVDB_VERSION_NAME {
19namespace thread {
20
22{
23 auto ctx = tbb::task::current_context();
24 return ctx ? ctx->cancel_group_execution() : false;
25}
26
28{
29 auto ctx = tbb::task::current_context();
30 return ctx ? ctx->is_group_execution_cancelled() : false;
31}
32
33} // namespace thread
34} // namespace OPENVDB_VERSION_NAME
35} // namespace openvdb
36
37#endif // OPENVDB_THREAD_THREADING_HAS_BEEN_INCLUDED
#define OPENVDB_UBSAN_SUPPRESS(X)
Windows defines.
Definition Platform.h:64
Definition Threading.h:19
vptr bool cancelGroupExecution()
Definition Threading.h:21
vptr bool isGroupExecutionCancelled()
Definition Threading.h:27
Definition Exceptions.h:13
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:291