• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.10
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Exception.hpp File Reference

    Go to the source code of this file.

    Macros

    #define FRWK_CHECK_CUDA_ERROR(x)
     
    #define FRWK_CHECK_CUDA_ERROR_NOTHROW(x)
     
    #define FRWK_CHECK_DW_ERROR(x)
     
    #define FRWK_CHECK_DW_ERROR_IGNORE_SOME(x, fallback, ...)
     
    #define FRWK_CHECK_DW_ERROR_MSG(x, description)
     
    #define FRWK_CHECK_DW_ERROR_NOTHROW(x)
     
    #define FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME(x, fallback, ...)
     
    #define FRWK_CHECK_NVMEDIA_ERROR(e)
     
    #define GET_STRING(s)   #s
     
    #define THROW_ON_PARAM_NULL(param)
     

    Macro Definition Documentation

    ◆ FRWK_CHECK_CUDA_ERROR

    #define FRWK_CHECK_CUDA_ERROR (   x)
    Value:
    { \
    x; \
    auto result = cudaGetLastError(); \
    if (result != cudaSuccess) \
    { \
    throw dw::core::ExceptionWithStatus(DW_CUDA_ERROR, cudaGetErrorString(result)); \
    } \
    };

    Definition at line 126 of file Exception.hpp.

    ◆ FRWK_CHECK_CUDA_ERROR_NOTHROW

    #define FRWK_CHECK_CUDA_ERROR_NOTHROW (   x)
    Value:
    { \
    x; \
    auto result = cudaGetLastError(); \
    if (result != cudaSuccess) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "CUDA error but not thrown: " \
    << cudaGetErrorString(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 136 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR

    #define FRWK_CHECK_DW_ERROR (   x)
    Value:
    { \
    dwStatus result{}; \
    result = (x); \
    if (result != DW_SUCCESS) \
    { \
    throw dw::core::ExceptionWithStatus(result, __FILE__, ":", __LINE__, " - DriveWorks Error"); \
    } \
    };

    Definition at line 47 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_IGNORE_SOME

    #define FRWK_CHECK_DW_ERROR_IGNORE_SOME (   x,
      fallback,
      ... 
    )
    Value:
    { \
    dwStatus result = x; \
    dwStatus ignoreErros[] = {__VA_ARGS__}; \
    if (result != DW_SUCCESS) \
    { \
    if (std::find(std::begin(ignoreErros), std::end(ignoreErros), result) != std::end(ignoreErros)) \
    { \
    DW_LOGD << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "Ignoring Error: " \
    << dwGetStatusName(result) << ". Falling back on calling " << GET_STRING(fallback) \
    << dw::core::Logger::State::endl; \
    result = fallback; \
    if (result != DW_SUCCESS) \
    { \
    throw dw::core::ExceptionWithStatus(result, "After ignoring errors from ignore list, fallback operation %s encountered DriveWorks error.", GET_STRING(fallback)); \
    } \
    } \
    } \
    if (result != DW_SUCCESS) \
    { \
    throw dw::core::ExceptionWithStatus(result, "DriveWorks error not in ignore list."); \
    } \
    };
    #define GET_STRING(s)
    Definition: Exception.hpp:56

    Definition at line 57 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_MSG

    #define FRWK_CHECK_DW_ERROR_MSG (   x,
      description 
    )
    Value:
    { \
    dwStatus result{}; \
    result = (x); \
    if (result != DW_SUCCESS) \
    { \
    throw dw::core::ExceptionWithStatus(result, (description)); \
    } \
    };

    Definition at line 114 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_NOTHROW

    #define FRWK_CHECK_DW_ERROR_NOTHROW (   x)
    Value:
    { \
    dwStatus result = x; \
    if (result != DW_SUCCESS) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "DriveWorks exception but not thrown: " \
    << dwGetStatusName(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 83 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME

    #define FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME (   x,
      fallback,
      ... 
    )
    Value:
    { \
    dwStatus result = x; \
    dwStatus ignoreErros[] = {__VA_ARGS__}; \
    if (std::find(std::begin(ignoreErros), std::end(ignoreErros), result) != std::end(ignoreErros)) \
    { \
    result = fallback; \
    } \
    if (result != DW_SUCCESS) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "DriveWorks exception but not thrown: " \
    << dwGetStatusName(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 96 of file Exception.hpp.

    ◆ FRWK_CHECK_NVMEDIA_ERROR

    #define FRWK_CHECK_NVMEDIA_ERROR (   e)
    Value:
    { \
    auto FRWK_CHECK_NVMEDIA_ERROR_ret = (e); \
    if (FRWK_CHECK_NVMEDIA_ERROR_ret != NVMEDIA_STATUS_OK) \
    { \
    throw dw::core::ExceptionWithStatus(DW_NVMEDIA_ERROR, "NvMedia error occured"); \
    } \
    }

    Definition at line 150 of file Exception.hpp.

    ◆ GET_STRING

    #define GET_STRING (   s)    #s

    Definition at line 56 of file Exception.hpp.

    ◆ THROW_ON_PARAM_NULL

    #define THROW_ON_PARAM_NULL (   param)
    Value:
    if (param == nullptr) \
    { \
    throw dw::core::ExceptionWithStatus(DW_INVALID_ARGUMENT, #param " == nullptr ", DW_FUNCTION_NAME, ":", __LINE__); \
    }

    Definition at line 39 of file Exception.hpp.

    人人超碰97caoporen国产