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 
19  throw std::runtime_error("WrappedDualView refcount tracking is already enabled!");
20  wdvTrackingEnabled = true;
21 }
22 
24  if (!wdvTrackingEnabled)
25  throw std::runtime_error("WrappedDualView refcount tracking is already disabled!");
26  wdvTrackingEnabled = false;
27 }
28 
29 } // namespace Details
30 } // 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...