netgen/libsrc/core/utils.hpp
Matthias Hochsteger 678b4497c2 Paje tracing
2019-01-02 18:38:03 +01:00

24 lines
566 B
C++

#ifndef NETGEN_CORE_UTILS_HPP
#define NETGEN_CORE_UTILS_HPP
#include <string>
#include <sstream>
#include "ngcore_api.hpp" // for NGCORE_API
namespace ngcore
{
NGCORE_API std::string Demangle(const char* typeinfo);
#if defined(__GNUC__)
inline bool likely (bool x) { return bool(__builtin_expect(long(x), 1L)); }
inline bool unlikely (bool x) { return bool(__builtin_expect(long(x), 0L)); }
#else
inline bool likely (bool x) { return x; }
inline bool unlikely (bool x) { return x; }
#endif
} // namespace ngcore
#endif // NETGEN_CORE_UTILS_HPP