shared_ptr migrations
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "Network.h"
|
||||
#include "Layer.h"
|
||||
#include "NvInfer.h"
|
||||
#include <memory>
|
||||
|
||||
namespace tk { namespace dnn {
|
||||
|
||||
@@ -59,7 +60,8 @@ public:
|
||||
#if NV_TENSORRT_MAJOR >= 6
|
||||
nvinfer1::IBuilderConfig *configRT;
|
||||
#endif
|
||||
nvinfer1::ICudaEngine *engineRT;
|
||||
std::shared_ptr<nvinfer1::ICudaEngine> engineRT;
|
||||
//nvinfer1::ICudaEngine *engineRT;
|
||||
nvinfer1::IExecutionContext *contextRT;
|
||||
|
||||
const static int MAX_BUFFERS_RT = 10;
|
||||
@@ -114,6 +116,9 @@ public:
|
||||
|
||||
bool serialize(const char *filename);
|
||||
bool deserialize(const char *filename);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -110,6 +110,17 @@ double t_ns = time_ms.count();
|
||||
FatalError(_error.str()); \
|
||||
} \
|
||||
}
|
||||
struct InferDeleter
|
||||
{
|
||||
template <typename T>
|
||||
void operator()(T* obj) const
|
||||
{
|
||||
if (obj)
|
||||
{
|
||||
obj->destroy();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
ERROR_CUDNN = 2,
|
||||
|
||||
Reference in New Issue
Block a user