Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Tpetra_Details_WrappedDualView.cpp
1 // @HEADER
2 // *****************************************************************************
3 // Tpetra: Templated Linear Algebra Services Package
4 //
5 // Copyright 2008 NTESS and the Tpetra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #include "Tpetra_Details_WrappedDualView.hpp"
11 
12 namespace Tpetra {
13 namespace Details {
14 
15 bool wdvTrackingEnabled = true;
16 
18 {
20  throw std::runtime_error("WrappedDualView refcount tracking is already enabled!");
21  wdvTrackingEnabled = true;
22 }
23 
25 {
27  throw std::runtime_error("WrappedDualView refcount tracking is already disabled!");
28  wdvTrackingEnabled = false;
29 }
30 
31 } // namespace Details
32 } // namespace Tpetra
bool wdvTrackingEnabled
Whether WrappedDualView reference count checking is enabled. Initially true. Since the DualView sync ...
void enableWDVTracking()
Enable WrappedDualView reference-count tracking and syncing. Call this after exiting a host-parallel ...
void disableWDVTracking()
Disable WrappedDualView reference-count tracking and syncing. Call this before entering a host-parall...