Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Tpetra_Access.hpp
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 #ifndef TPETRA_ACCESS_HPP
11 #define TPETRA_ACCESS_HPP
12 
13 namespace Tpetra {
14 namespace Access {
15 // Structs for Access tags, these should not be used by user code
16 struct ReadOnlyStruct {};
17 struct OverwriteAllStruct {};
18 struct ReadWriteStruct {};
19 
20 // Tag indicating intent to read up-to-date data, but not modify.
21 constexpr struct ReadOnlyStruct ReadOnly = ReadOnlyStruct();
22 // Tag indicating intent to completely overwrite existing data.
23 constexpr struct OverwriteAllStruct OverwriteAll = OverwriteAllStruct();
24 // Tag indicating intent to both read up-to-date data and modify it.
25 constexpr struct ReadWriteStruct ReadWrite = ReadWriteStruct();
26 } // namespace Access
27 } // namespace Tpetra
28 
29 #endif