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

Function makeThread

samples/common/sampleInference.cpp:1070–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068}
1069
1070inline std::thread makeThread(InferenceOptions const& inference, InferenceEnvironment& iEnv, SyncStruct& sync,
1071 int32_t threadIdx, int32_t streamsPerThread, int32_t device, std::vector<InferenceTrace>& trace)
1072{
1073
1074 if (iEnv.safe)
1075 {
1076 ASSERT(sample::hasSafeRuntime());
1077 return std::thread(inferenceExecution<nvinfer1::safe::IExecutionContext>, std::cref(inference), std::ref(iEnv),
1078 std::ref(sync), threadIdx, streamsPerThread, device, std::ref(trace));
1079 }
1080
1081 return std::thread(inferenceExecution<nvinfer1::IExecutionContext>, std::cref(inference), std::ref(iEnv),
1082 std::ref(sync), threadIdx, streamsPerThread, device, std::ref(trace));
1083}
1084
1085} // namespace
1086

Callers 2

runInferenceFunction · 0.85
runMultiTasksInferenceFunction · 0.85

Calls 2

hasSafeRuntimeFunction · 0.85
refFunction · 0.85

Tested by

no test coverage detected