nndeploy C++ API  0.2.0
nndeploy C++ API
Macros
macro.h File Reference
#include "nndeploy/base/glic_stl_include.h"
Include dependency graph for macro.h:

Go to the source code of this file.

Macros

#define NNDEPLOY_ABS(x)   ((x) > (0) ? (x) : (-(x)))
 
#define NNDEPLOY_ALIGN_PTR(x, y)    (void *)(x & ~static_cast<size_t>(NNDEPLOY_ABS(y) - 1))
 
#define NNDEPLOY_ALIGN_UP4(x)   NNDEPLOY_ROUND_UP((x), 4)
 
#define NNDEPLOY_ALIGN_UP8(x)   NNDEPLOY_ROUND_UP((x), 8)
 
#define NNDEPLOY_ARCHITECTURE_ARM   0
 
#define NNDEPLOY_ARCHITECTURE_CPU   1
 
#define NNDEPLOY_ARCHITECTURE_X86   0
 
#define NNDEPLOY_C_API   extern "C" NNDEPLOY_CC_API
 
#define NNDEPLOY_CC_API
 api More...
 
#define NNDEPLOY_DEFAULT_STR   "nndeploy_default_str"
 string More...
 
#define NNDEPLOY_DEPRECATED
 deprecated More...
 
#define NNDEPLOY_FORCE_LOAD_LIB_SYMBOL(TYPE)
 Force load library symbol. More...
 
#define NNDEPLOY_GENERATE_DEFAULT_STR()
 
#define NNDEPLOY_LIKELY(expr)   (expr)
 
#define NNDEPLOY_MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define NNDEPLOY_MIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define NNDEPLOY_NAMESPACE_PLUS_TO_STR(x)   nndeploy_namespace##x
 
#define NNDEPLOY_OS_ANDROID   0
 
#define NNDEPLOY_OS_DARWIN   0
 
#define NNDEPLOY_OS_IOS   0
 
#define NNDEPLOY_OS_LINUX   0
 
#define NNDEPLOY_OS_UNIX   0
 
#define NNDEPLOY_OS_UNKNOWN   0
 
#define NNDEPLOY_OS_UNKNOWN   1
 
#define NNDEPLOY_OS_WINDOWS   0
 
#define NNDEPLOY_PRAGMA(X)   _Pragma(#X)
 program More...
 
#define NNDEPLOY_ROUND_UP(x, y)
 
#define NNDEPLOY_TO_STR(x)   #x
 
#define NNDEPLOY_UNLIKELY(expr)   (expr)
 
#define NNDEPLOY_UP_DIV(x, y)    ((static_cast<int>(x) + static_cast<int>(y) - (1)) / static_cast<int>(y))
 math More...
 

Macro Definition Documentation

◆ NNDEPLOY_ABS

#define NNDEPLOY_ABS (   x)    ((x) > (0) ? (x) : (-(x)))

Definition at line 113 of file macro.h.

◆ NNDEPLOY_ALIGN_PTR

#define NNDEPLOY_ALIGN_PTR (   x,
 
)     (void *)(x & ~static_cast<size_t>(NNDEPLOY_ABS(y) - 1))

Definition at line 103 of file macro.h.

◆ NNDEPLOY_ALIGN_UP4

#define NNDEPLOY_ALIGN_UP4 (   x)    NNDEPLOY_ROUND_UP((x), 4)

Definition at line 97 of file macro.h.

◆ NNDEPLOY_ALIGN_UP8

#define NNDEPLOY_ALIGN_UP8 (   x)    NNDEPLOY_ROUND_UP((x), 8)

Definition at line 100 of file macro.h.

◆ NNDEPLOY_ARCHITECTURE_ARM

#define NNDEPLOY_ARCHITECTURE_ARM   0

Definition at line 213 of file macro.h.

◆ NNDEPLOY_ARCHITECTURE_CPU

#define NNDEPLOY_ARCHITECTURE_CPU   1

Definition at line 214 of file macro.h.

◆ NNDEPLOY_ARCHITECTURE_X86

#define NNDEPLOY_ARCHITECTURE_X86   0

Definition at line 212 of file macro.h.

◆ NNDEPLOY_C_API

#define NNDEPLOY_C_API   extern "C" NNDEPLOY_CC_API

Definition at line 34 of file macro.h.

◆ NNDEPLOY_CC_API

#define NNDEPLOY_CC_API

api

Definition at line 29 of file macro.h.

◆ NNDEPLOY_DEFAULT_STR

#define NNDEPLOY_DEFAULT_STR   "nndeploy_default_str"

string

Definition at line 74 of file macro.h.

◆ NNDEPLOY_DEPRECATED

#define NNDEPLOY_DEPRECATED

deprecated

Definition at line 67 of file macro.h.

◆ NNDEPLOY_FORCE_LOAD_LIB_SYMBOL

#define NNDEPLOY_FORCE_LOAD_LIB_SYMBOL (   TYPE)
Value:
TYPE *forceLoad(TYPE *ptr) { \
if (ptr == nullptr) return ptr; \
return ptr; \
}

Force load library symbol.

Definition at line 51 of file macro.h.

◆ NNDEPLOY_GENERATE_DEFAULT_STR

#define NNDEPLOY_GENERATE_DEFAULT_STR ( )
Value:
std::string file = __FILE__; \
std::string function = __FUNCTION__; \
std::string line = std::to_string(__LINE__); \
return NNDEPLOY_DEFAULT_STR + "_" file + "_" + function + "_" + line;
#define NNDEPLOY_DEFAULT_STR
string
Definition: macro.h:74

Definition at line 77 of file macro.h.

◆ NNDEPLOY_LIKELY

#define NNDEPLOY_LIKELY (   expr)    (expr)

Definition at line 230 of file macro.h.

◆ NNDEPLOY_MAX

#define NNDEPLOY_MAX (   x,
 
)    ((x) > (y) ? (x) : (y))

Definition at line 110 of file macro.h.

◆ NNDEPLOY_MIN

#define NNDEPLOY_MIN (   x,
 
)    ((x) < (y) ? (x) : (y))

Definition at line 107 of file macro.h.

◆ NNDEPLOY_NAMESPACE_PLUS_TO_STR

#define NNDEPLOY_NAMESPACE_PLUS_TO_STR (   x)    nndeploy_namespace##x

Definition at line 76 of file macro.h.

◆ NNDEPLOY_OS_ANDROID

#define NNDEPLOY_OS_ANDROID   0

Definition at line 158 of file macro.h.

◆ NNDEPLOY_OS_DARWIN

#define NNDEPLOY_OS_DARWIN   0

Definition at line 159 of file macro.h.

◆ NNDEPLOY_OS_IOS

#define NNDEPLOY_OS_IOS   0

Definition at line 160 of file macro.h.

◆ NNDEPLOY_OS_LINUX

#define NNDEPLOY_OS_LINUX   0

Definition at line 157 of file macro.h.

◆ NNDEPLOY_OS_UNIX

#define NNDEPLOY_OS_UNIX   0

Definition at line 162 of file macro.h.

◆ NNDEPLOY_OS_UNKNOWN [1/2]

#define NNDEPLOY_OS_UNKNOWN   0

Definition at line 202 of file macro.h.

◆ NNDEPLOY_OS_UNKNOWN [2/2]

#define NNDEPLOY_OS_UNKNOWN   1

Definition at line 202 of file macro.h.

◆ NNDEPLOY_OS_WINDOWS

#define NNDEPLOY_OS_WINDOWS   0

Definition at line 161 of file macro.h.

◆ NNDEPLOY_PRAGMA

#define NNDEPLOY_PRAGMA (   X)    _Pragma(#X)

program

Definition at line 44 of file macro.h.

◆ NNDEPLOY_ROUND_UP

#define NNDEPLOY_ROUND_UP (   x,
 
)
Value:
((static_cast<int>(x) + static_cast<int>(y) - (1)) / static_cast<int>(y) * \
static_cast<int>(y))

Definition at line 92 of file macro.h.

◆ NNDEPLOY_TO_STR

#define NNDEPLOY_TO_STR (   x)    #x

Definition at line 75 of file macro.h.

◆ NNDEPLOY_UNLIKELY

#define NNDEPLOY_UNLIKELY (   expr)    (expr)

Definition at line 231 of file macro.h.

◆ NNDEPLOY_UP_DIV

#define NNDEPLOY_UP_DIV (   x,
 
)     ((static_cast<int>(x) + static_cast<int>(y) - (1)) / static_cast<int>(y))

math

Definition at line 88 of file macro.h.