Defines NVXIO Utility API.
#define NVXIO_THROW_EXCEPTION |
( |
|
msg | ) |
|
Value:do { \
std::ostringstream ostr_; \
ostr_ << msg; \
throw std::runtime_error(ostr_.str()); \
} while(0)
Throws std::runtime_error
exception.
- Parameters
-
[in] | msg | A message with content related to the exception. |
- See also
- NVXIO APIs
Definition at line 63 of file Utility.hpp.
#define NVXIO_SAFE_CALL |
( |
|
vxOp | ) |
|
Value:do \
NVXIO_THROW_EXCEPTION(# vxOp <<
" failure [status = " << status <<
"]" <<
" in file " << __FILE__ <<
" line " << __LINE__); \
} \
} while (0)
vx_enum vx_status
A formal status type with known fixed size.
#define NVXIO_THROW_EXCEPTION(msg)
Throws std::runtime_error exception.
Performs an operation.
If the operation has failed then it throws std::runtime_error
exception.
- Parameters
-
[in] | vxOp | A function to be called. The function must have vx_status return value. |
- See also
- NVXIO APIs
Definition at line 77 of file Utility.hpp.
#define NVXIO_ASSERT |
( |
|
cond | ) |
|
Value:do \
{ \
bool status = (cond); \
if (!status) \
} \
} while (0)
#define NVXIO_THROW_EXCEPTION(msg)
Throws std::runtime_error exception.
Checks a condition.
If the condition is false then it throws std::runtime_error
exception.
- Parameters
-
[in] | cond | Expression to be evaluated. |
- See also
- NVXIO APIs
Definition at line 93 of file Utility.hpp.
Checks a reference.
If the reference is not valid then it throws std::runtime_error
exception.
- Parameters
-
[in] | ref | Reference to be checked. |
- See also
- NVXIO APIs
Definition at line 109 of file Utility.hpp.
template<typename T , vx_size N>
The callback for OpenVX error logs, which prints messages to standard output.
Must be used as a parameter for vxRegisterLogCallback.
- Parameters
-
[in] | context | Specifies the OpenVX context. |
[in] | ref | Specifies the reference to the object that generated the error message. |
[in] | status | Specifies the error code. |
[in] | string | Specifies the error message. |
void nvxio::checkIfContextIsValid |
( |
vx_context |
context | ) |
|
template<typename T , typename... Args>
std::unique_ptr<T> nvxio::makeUP |
( |
Args &&... |
args | ) |
|