42#ifndef TEUCHOS_XMLPERFTESTARCHIVE_HPP
43#define TEUCHOS_XMLPERFTESTARCHIVE_HPP
57#if defined __ECC || defined __ICC || defined __INTEL_COMPILER
58 #define TEUCHOS_COMPILER_NAME "Intel C++"
60 #define TEUCHOS_COMPILER_VERSION __ICC
62 #if defined __INTEL_COMPILER
63 #define TEUCHOS_COMPILER_VERSION __INTEL_COMPILER
65 #define TEUCHOS_COMPILER_VERSION __ECC
68 #define TEUCHOS_COMPILER_INTEL 1
71#if defined __IBMC__ || defined __IBMCPP__
72 #define TEUCHOS_COMPILER_NAME "IBM C++"
74 #define TEUCHOS_COMPILER_VERSION __IBMC__
76 #define TEUCHOS_COMPILER_VERSION __IBMCPP__
78 #define TEUCHOS_COMPILER_IBM 1
81#if defined __APPLE_CC__
83 #define TEUCHOS_COMPILER_APPLECC 1
87 #define TEUCHOS_COMPILER_NAME "Clang"
88 #define TEUCHOS_COMPILER_VERSION __clang_major__*100+__clang_minor__*10+__clang_patchlevel__
89 #define TEUCHOS_COMPILER_CLANG 1
92#if defined __GNUC__ && !defined TEUCHOS_COMPILER_NAME && !defined __clang__
93 #define TEUCHOS_COMPILER_NAME "Gnu GCC"
94 #define TEUCHOS_COMPILER_VERSION __GNUC__*100+__GNUC_MINOR__*10+__GNUC_PATCHLEVEL__
95 #define TEUCHOS_COMPILER_GCC 1
98#if defined __PGIC__ && !defined TEUCHOS_COMPILER_NAME
99 #define TEUCHOS_COMPILER_NAME "PGI C++"
100 #define TEUCHOS_COMPILER_VERSION __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__
101 #define TEUCHOS_COMPILER_PGI 1
105 #define TEUCHOS_DEVICE_COMPILER_NAME "NVIDIA NVCC"
106 #define TEUCHOS_DEVICE_COMPILER_VERSION __NVCC__
109#if !defined TEUCHOS_COMPILER_NAME
110 #define TEUCHOS_COMPILER_NAME "Unknown compiler"
113#if !defined TEUCHOS_COMPILER_VERSION
114 #define TEUCHOS_COMPILER_VERSION 0
117#if !defined TEUCHOS_DEVICE_COMPILER_NAME
118 #define TEUCHOS_DEVICE_COMPILER_NAME TEUCHOS_COMPILER_NAME
121#if !defined TEUCHOS_DEVICE_COMPILER_VERSION
122 #define TEUCHOS_DEVICE_COMPILER_VERSION TEUCHOS_COMPILER_VERSION
131struct ValueTolerance {
139 ValueTolerance(
double val,
double tol);
140 ValueTolerance(
double val,
double low,
double up);
142 ValueTolerance(std::string str);
144 bool operator ==(ValueTolerance& rhs);
146 std::string as_string();
147 void from_string(
const std::string& valtol_str);
162 XMLTestNode(
const std::string &tag);
165 void addDouble (
const std::string& name,
double val);
166 void addInt (
const std::string& name,
int val);
167 void addBool (
const std::string& name,
bool val);
168 void addValueTolerance(
const std::string& name,
ValueTolerance val);
169 void addString (
const std::string& name, std::string val);
172 void addAttribute (
const std::string& name, T val) {
173 for (
size_t i = 0; i < name.length (); i++) {
174 if (name[i] ==
' ') {
178 std::ostringstream strs;
180 XMLTestNode entry (name);
185 bool hasChild(
const std::string &name)
const;
187 void appendContentLine(
const size_t& i,
const std::string &str);
189 XMLTestNode getChild(
const std::string &name)
const;
191 XMLTestNode getChild(
const int &i)
const;
195 bool hasSameElements(XMLTestNode
const & lhs)
const;
220 PerfTestNewMachine, PerfTestNewConfiguration,
221 PerfTestNewTest, PerfTestNewTestConfiguration,
222 PerfTestUpdatedTest};
272 XMLTestNode new_test,
273 const std::string filename,
274 const std::string ext_hostname = std::string ());
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
An object representation of a subset of XML data.
Ptr< T > ptr(T *p)
Create a pointer to an object from a raw pointer.
The XMLObjectImplem class takes care of the low-level implementation details of XMLObject.
void addChild(const XMLObject &child)
Add a child node to the node.
void addContent(const std::string &contentLine)
Add a line of character content.
XMLObject()
Empty constructor.
Subclass of XMLObject used by the performance archive.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
XMLTestNode PerfTest_MachineConfig()
PerfTest_MachineConfig generates a basic machine configuration XMLTestNode.
PerfTestResult
ReturnValues for PerfTest_CheckOrAdd_Test.
PerfTestResult PerfTest_CheckOrAdd_Test(XMLTestNode machine_config, XMLTestNode new_test, const std::string filename, const std::string ext_hostname)
Check whether a test is present and match an existing test in an archive.
ValueTolerance is a struct to keep a tuple of value and a tolerance. The tolerance can be either expr...