| 1068 | } |
| 1069 | |
| 1070 | inline 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 |
no test coverage detected