NVIDIA DeepStream SDK API Reference

6.4 Release
infer_base_context.h File Reference

Detailed Description

Header file of the base class for inference context.

This file declares the base class for handling inference context for the nvinferserver low level library.

Definition in file infer_base_context.h.

Go to the source code of this file.

Data Structures

class  nvdsinferserver::InferBaseContext
 The base class for handling the inference context. More...
 

Namespaces

 nvdsinferserver
 Copyright (c) 2021, NVIDIA CORPORATION.
 

Macros

#define _MAX_LOG_LENGTH   4096
 
#define printMsg(level, tag_str, fmt, ...)
 
#define printError(fmt, ...)
 
#define printWarning(fmt, ...)
 
#define printInfo(fmt, ...)
 
#define printDebug(fmt, ...)
 
#define CTX_RETURN_NVINFER_ERROR(err, fmt, ...)
 
#define CTX_RETURN_CUDA_ERR(err, fmt, ...)
 

Typedefs

using nvdsinferserver::InferCompleted = std::function< void(NvDsInferStatus, SharedBatchArray)>
 

Macro Definition Documentation

◆ _MAX_LOG_LENGTH

#define _MAX_LOG_LENGTH   4096

Definition at line 143 of file infer_base_context.h.

◆ CTX_RETURN_CUDA_ERR

#define CTX_RETURN_CUDA_ERR (   err,
  fmt,
  ... 
)
Value:
err, return NVDSINFER_CUDA_ERROR, printError, fmt, ##__VA_ARGS__)

Definition at line 179 of file infer_base_context.h.

◆ CTX_RETURN_NVINFER_ERROR

#define CTX_RETURN_NVINFER_ERROR (   err,
  fmt,
  ... 
)
Value:
err, return ifStatus, printError, fmt, ##__VA_ARGS__)

Definition at line 175 of file infer_base_context.h.

◆ printDebug

#define printDebug (   fmt,
  ... 
)
Value:
do { \
printMsg(NVDSINFER_LOG_DEBUG, "DEBUG", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 170 of file infer_base_context.h.

◆ printError

#define printError (   fmt,
  ... 
)
Value:
do { \
printMsg(NVDSINFER_LOG_ERROR, "Error in", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 155 of file infer_base_context.h.

◆ printInfo

#define printInfo (   fmt,
  ... 
)
Value:
do { \
printMsg(NVDSINFER_LOG_INFO, "Info from", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 165 of file infer_base_context.h.

◆ printMsg

#define printMsg (   level,
  tag_str,
  fmt,
  ... 
)
Value:
do { \
char* baseName = strrchr((char*)__FILE__, '/'); \
baseName = (baseName) ? (baseName + 1) : (char*)__FILE__; \
std::vector<char> logMsgBuffer(_MAX_LOG_LENGTH, 0); \
snprintf(logMsgBuffer.data(), _MAX_LOG_LENGTH - 1, \
tag_str " %s() <%s:%d> [UID = %d]: " fmt, \
__func__, baseName, __LINE__, uniqueId(), ##__VA_ARGS__); \
this->print(level, logMsgBuffer.data()); \
} while (0)

Definition at line 144 of file infer_base_context.h.

◆ printWarning

#define printWarning (   fmt,
  ... 
)
Value:
do { \
printMsg(NVDSINFER_LOG_WARNING, "Warning from", fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 160 of file infer_base_context.h.

NVDSINFER_LOG_ERROR
@ NVDSINFER_LOG_ERROR
Definition: nvdsinfer.h:250
NVDSINFER_LOG_INFO
@ NVDSINFER_LOG_INFO
Definition: nvdsinfer.h:252
NVDSINFER_LOG_WARNING
@ NVDSINFER_LOG_WARNING
Definition: nvdsinfer.h:251
NVDSINFER_CUDA_ERROR
@ NVDSINFER_CUDA_ERROR
CUDA error was encountered.
Definition: nvdsinfer.h:231
printError
#define printError(fmt,...)
Definition: infer_base_context.h:155
NVDSINFER_LOG_DEBUG
@ NVDSINFER_LOG_DEBUG
Definition: nvdsinfer.h:253
CHECK_CUDA_ERR_W_ACTION
#define CHECK_CUDA_ERR_W_ACTION(err, action, logPrint, fmt,...)
Definition: infer_defines.h:103
CHECK_NVINFER_ERROR_PRINT
#define CHECK_NVINFER_ERROR_PRINT(err, action, logPrint, fmt,...)
Definition: infer_defines.h:83
_MAX_LOG_LENGTH
#define _MAX_LOG_LENGTH
Definition: infer_base_context.h:143