MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / initialize

Method initialize

plugin/detectionLayerPlugin/detectionLayerPlugin.cpp:141–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141int32_t DetectionLayer::initialize() noexcept
142{
143 try
144 {
145 // Init the mValidCnt and mDecodedBboxes for max batch size.
146 std::vector<int32_t> tempValidCnt(mMaxBatchSize, mAnchorsCnt);
147
148 mValidCnt = std::make_shared<CudaBind<int32_t>>(mMaxBatchSize);
149
150 PLUGIN_CUASSERT(cudaMemcpy(mValidCnt->mPtr, static_cast<void*>(tempValidCnt.data()),
151 sizeof(int32_t) * mMaxBatchSize, cudaMemcpyHostToDevice));
152
153 return STATUS_SUCCESS;
154 }
155 catch (std::exception const& e)
156 {
157 caughtError(e);
158 }
159 return STATUS_FAILURE;
160}
161
162void DetectionLayer::terminate() noexcept {}
163

Callers

nothing calls this directly

Calls 2

caughtErrorFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected