Zoltan2
Toggle main menu visibility
Loading...
Searching...
No Matches
Zoltan2_Util.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Zoltan2: A package of combinatorial algorithms for scientific computing
4
//
5
// Copyright 2012 NTESS and the Zoltan2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
15
16
#ifndef ZOLTAN2_UTIL_HPP
17
#define ZOLTAN2_UTIL_HPP
18
19
#include <
Zoltan2_Standards.hpp
>
20
#include <Teuchos_DefaultComm.hpp>
21
#include <stdexcept>
22
23
namespace
Zoltan2
{
24
25
long
getProcessKilobytes
();
26
27
template
<
typename
scalar_t>
28
inline
bool
outsideRegion
(
scalar_t
val,
scalar_t
mark,
double
epsilon
){
29
return
((val < mark-
epsilon
) || (val > mark+
epsilon
));
30
}
31
32
static
inline
void
33
AssertCondition
(
bool
condition,
const
std::string &message,
34
const
char
*file = __FILE__,
int
line = __LINE__) {
35
if
(!condition) {
36
std::ostringstream eMsg;
37
eMsg <<
"Error: "
<< file <<
", "
<< line <<
": "
<< message
38
<< std::endl;
39
throw
std::runtime_error(eMsg.str());
40
}
41
}
42
43
}
// namespace Zoltan2
44
45
#endif
Zoltan2_Standards.hpp
Gathering definitions used in software development.
Zoltan2
Created by mbenlioglu on Aug 31, 2020.
Definition
Zoltan2_AlgHybrid2GL.hpp:47
Zoltan2::AssertCondition
static void AssertCondition(bool condition, const std::string &message, const char *file="/build/reproducible-path/trilinos-17.0.0+dfsg/packages/zoltan2/core/src/util/Zoltan2_Util.hpp", int line=34)
Definition
Zoltan2_Util.hpp:33
Zoltan2::outsideRegion
bool outsideRegion(scalar_t val, scalar_t mark, double epsilon)
Definition
Zoltan2_Util.hpp:28
Zoltan2::getProcessKilobytes
long getProcessKilobytes()
Definition
Zoltan2_Util.cpp:34
epsilon
#define epsilon
Definition
nd.cpp:47
Zoltan2::scalar_t
core
src
util
Zoltan2_Util.hpp
Generated by
1.17.0