GEOSX
tv_helpers.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Lawrence Livermore National Security, LLC and LvArray contributors.
3  * All rights reserved.
4  * See the LICENSE file for details.
5  * SPDX-License-Identifier: (BSD-3-Clause)
6  */
7 
12 #pragma once
13 
14 // Source includes
15 #include "../system.hpp"
16 
17 // TPL include
18 #include <typeinfo>
19 
24 namespace totalview
25 {
26 
36 template< typename TYPE, typename INDEX_TYPE >
37 std::string format( int NDIM, INDEX_TYPE const * const dims )
38 {
39  std::string rval = LvArray::system::demangleType< TYPE >();
40  for( int i=0; i<NDIM; ++i )
41  {
42  rval += "["+std::to_string( dims[i] )+"]";
43  }
44  return rval;
45 }
46 
47 }
std::string format(int NDIM, INDEX_TYPE const *const dims)
This function returns a string that may be used as the "type" in a call to TV_ttf_add_row(). This will either be a single value or an array.
Definition: tv_helpers.hpp:37
std::string string
String type.
Definition: DataTypes.hpp:131
Contains functions that are used by the implementation of the totalview c++ view for data inspection ...
Definition: tv_helpers.hpp:24