ABACUS
develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
source
source_base
module_container
base
utils
logging.h
Go to the documentation of this file.
1
#ifndef BASE_CORE_LOGGING_H_
2
#define BASE_CORE_LOGGING_H_
3
4
#include <
base/macros/macros.h
>
5
#include <cstdio>
6
#include <cstdlib>
7
8
namespace
base
{
9
namespace
utils
{
10
11
// Note while in the calling situation of check_msg_impl and check_exit_impl,
12
// the check has been failed, so we don't need to release the char* msg
13
inline
static
const
char
* check_msg_impl(
const
char
* msg) {
14
return
msg;
15
}
16
17
inline
static
void
check_exit_impl(
const
char
*
func
,
const
char
*
file
, uint32_t line,
const
char
* msg) {
18
fprintf(stderr,
"Fatal error in function %s, file %s, line %u, \nwith message: \n\t\t%s\n"
,
func
,
file
, line, msg);
19
std::abort();
20
}
21
22
}
// namespace logging
23
}
// namespace base
24
#endif
// BASE_CORE_LOGGING_H_
macros.h
base::utils
Definition
array_ref.h:9
base
Definition
allocator.h:6
file
file(GLOB ATen_CORE_SRCS "*.cpp") set(ATen_CPU_SRCS $
Definition
CMakeLists.txt:1
func
double func(const Vec3 &r, const std::vector< Vec3 > &R, const std::vector< double > &a, const std::vector< double > &n)
Definition
test_partition.cpp:50
Generated by
1.15.0