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
6namespace base {
7namespace utils {
8
9// Note while in the calling situation of check_msg_impl and check_exit_impl,
10// the check has been failed, so we don't need to release the char* msg
11inline static const char* check_msg_impl(const char* msg) {
12 return msg;
13}
14
15inline static void check_exit_impl(const char* func, const char* file, uint32_t line, const char* msg) {
16 fprintf(stderr, "Fatal error in function %s, file %s, line %u, \nwith message: \n\t\t%s\n", func, file, line, msg);
17 std::abort();
18}
19
20} // namespace logging
21} // namespace base
22#endif // BASE_CORE_LOGGING_H_
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