ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
logging.h
Go to the documentation of this file.
1#ifndef BASE_CORE_LOGGING_H_
2#define BASE_CORE_LOGGING_H_
3
5#include <cstdio>
6#include <cstdlib>
7
8namespace base {
9namespace 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
13inline static const char* check_msg_impl(const char* msg) {
14 return msg;
15}
16
17inline 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_
Definition array_ref.h:9
Definition allocator.h:6
file(GLOB ATen_CORE_SRCS "*.cpp") set(ATen_CPU_SRCS $
Definition CMakeLists.txt:1
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