#include <climits>
#include <cstring>
#include <algorithm>
#include <chrono>
#include <functional>
#include <memory>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
#include "core/common/code_location.h"
#include "core/common/exceptions.h"
#include "core/common/make_string.h"
#include "core/common/status.h"
Go to the source code of this file.
|
#define | ORT_UNUSED_PARAMETER(x) (void)(x) |
|
#define | ORT_HAVE_ATTRIBUTE(x) 0 |
|
#define | ORT_ATTRIBUTE_UNUSED |
|
#define | ORT_IGNORE_RETURN_VALUE(fn) static_cast<void>(fn) |
|
#define | ORT_WHERE ::onnxruntime::CodeLocation(__FILE__, __LINE__, static_cast<const char*>(__FUNCTION__)) |
|
#define | ORT_WHERE_WITH_STACK ::onnxruntime::CodeLocation(__FILE__, __LINE__, static_cast<const char*>(__PRETTY_FUNCTION__), ::onnxruntime::GetStackTrace()) |
|
#define | ORT_TRY try |
|
#define | ORT_CATCH(x) catch (x) |
|
#define | ORT_RETHROW throw; |
|
#define | ORT_HANDLE_EXCEPTION(func) func() |
|
#define | ORT_THROW(...) throw ::onnxruntime::OnnxRuntimeException(ORT_WHERE_WITH_STACK, ::onnxruntime::MakeString(__VA_ARGS__)) |
|
#define | ORT_NOT_IMPLEMENTED(...) throw ::onnxruntime::NotImplementedException(::onnxruntime::MakeString(__VA_ARGS__)) |
|
#define | ORT_ENFORCE(condition,...) |
|
#define | ORT_THROW_EX(ex,...) throw ex(__VA_ARGS__) |
|
#define | ORT_MAKE_STATUS(category, code,...) |
|
#define | ORT_RETURN_IF(condition,...) |
|
#define | ORT_RETURN_IF_NOT(condition,...) ORT_RETURN_IF(!(condition), __VA_ARGS__) |
|
#define | ORT_DISALLOW_COPY(TypeName) TypeName(const TypeName&) = delete |
|
#define | ORT_DISALLOW_ASSIGNMENT(TypeName) TypeName& operator=(const TypeName&) = delete |
|
#define | ORT_DISALLOW_COPY_AND_ASSIGNMENT(TypeName) |
|
#define | ORT_DISALLOW_MOVE(TypeName) |
|
#define | ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(TypeName) |
|
#define | ORT_RETURN_IF_ERROR_SESSIONID(expr, session_id) |
|
#define | ORT_RETURN_IF_ERROR_SESSIONID_(expr) ORT_RETURN_IF_ERROR_SESSIONID(expr, session_id_) |
|
#define | ORT_RETURN_IF_ERROR(expr) ORT_RETURN_IF_ERROR_SESSIONID(expr, 0) |
|
#define | ORT_THROW_IF_ERROR(expr) |
|
#define | ORT_CHECK_AND_SET_RETVAL(expr) |
|
|
std::vector< std::string > | onnxruntime::GetStackTrace () |
|
void | onnxruntime::LogRuntimeError (uint32_t session_id, const common::Status &status, const char *file, const char *function, uint32_t line) |
|
long long | onnxruntime::TimeDiffMicroSeconds (TimePoint start_time) |
|
long long | onnxruntime::TimeDiffMicroSeconds (TimePoint start_time, TimePoint end_time) |
|
std::string | onnxruntime::ToUTF8String (const std::string &s) |
|
std::string | onnxruntime::ToWideString (const std::string &s) |
|
template<typename Key , typename... OtherContainerArgs, template< typename...> typename AssociativeContainer, typename LookupKey > |
bool | onnxruntime::Contains (const AssociativeContainer< Key, OtherContainerArgs...> &container, LookupKey &&key) |
|
#define ORT_ATTRIBUTE_UNUSED |
#define ORT_CATCH |
( |
|
x | ) |
catch (x) |
#define ORT_CHECK_AND_SET_RETVAL |
( |
|
expr | ) |
|
Value:
retval = (expr); \
} \
} while (0)
Definition at line 245 of file common.h.
#define ORT_DISALLOW_ASSIGNMENT |
( |
|
TypeName | ) |
TypeName& operator=(const TypeName&) = delete |
#define ORT_DISALLOW_COPY |
( |
|
TypeName | ) |
TypeName(const TypeName&) = delete |
#define ORT_DISALLOW_COPY_AND_ASSIGNMENT |
( |
|
TypeName | ) |
|
Value:
#define ORT_DISALLOW_ASSIGNMENT(TypeName)
#define ORT_DISALLOW_COPY(TypeName)
Definition at line 211 of file common.h.
#define ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE |
( |
|
TypeName | ) |
|
Value:
#define ORT_DISALLOW_COPY_AND_ASSIGNMENT(TypeName)
#define ORT_DISALLOW_MOVE(TypeName)
Definition at line 219 of file common.h.
#define ORT_DISALLOW_MOVE |
( |
|
TypeName | ) |
|
Value:TypeName(TypeName&&) = delete; \
LeafData & operator=(const LeafData &)=delete
Definition at line 215 of file common.h.
#define ORT_ENFORCE |
( |
|
condition, |
|
|
|
... |
|
) |
| |
Value:
} \
} while (false)
std::string MakeString(const Args &...args)
#define ORT_WHERE_WITH_STACK
Definition at line 172 of file common.h.
#define ORT_HANDLE_EXCEPTION |
( |
|
func | ) |
func() |
#define ORT_HAVE_ATTRIBUTE |
( |
|
x | ) |
0 |
#define ORT_IGNORE_RETURN_VALUE |
( |
|
fn | ) |
static_cast<void>(fn) |
#define ORT_MAKE_STATUS |
( |
|
category, |
|
|
|
code, |
|
|
|
... |
|
) |
| |
Value:
::onnxruntime::common::code, \
std::string MakeString(const Args &...args)
Definition at line 185 of file common.h.
#define ORT_RETHROW throw; |
#define ORT_RETURN_IF |
( |
|
condition, |
|
|
|
... |
|
) |
| |
Value:
} \
} while (false)
std::string MakeString(const Args &...args)
Definition at line 191 of file common.h.
#define ORT_RETURN_IF_ERROR_SESSIONID |
( |
|
expr, |
|
|
|
session_id |
|
) |
| |
Value:do { \
if ((!_status.IsOK())) {
\
return _status; \
} \
} while (0)
void LogRuntimeError(uint32_t session_id, const common::Status &status, const char *file, const char *function, uint32_t line)
Definition at line 223 of file common.h.
#define ORT_RETURN_IF_NOT |
( |
|
condition, |
|
|
|
... |
|
) |
| ORT_RETURN_IF(!(condition), __VA_ARGS__) |
#define ORT_THROW_EX |
( |
|
ex, |
|
|
|
... |
|
) |
| throw ex(__VA_ARGS__) |
#define ORT_THROW_IF_ERROR |
( |
|
expr | ) |
|
Value:do { \
if ((!_status.IsOK())) {
\
} \
} while (0)
void LogRuntimeError(uint32_t session_id, const common::Status &status, const char *file, const char *function, uint32_t line)
Definition at line 235 of file common.h.
#define ORT_UNUSED_PARAMETER |
( |
|
x | ) |
(void)(x) |