Commit b7093eca authored by wangqibing's avatar wangqibing

is_gpu,Hungarian_Cuda

parent 533684b5
......@@ -314,7 +314,7 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
}
else
{
auto t09 = std::chrono::steady_clock::now();
auto t09 = std::chrono::steady_clock::now();
std::vector<std::vector<float> > tracker_states;
std::vector<int> tracker_type;
for (auto& iter : tracks)
......@@ -417,7 +417,14 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
*/
//Hungarian_Cuda(cuda_iou_matrix, detections.size(), tracks.size(), cuda_association);
Hungarian_Cuda(iou_matrix, detections.size(), tracks.size(), association);
if (m_isGPU == 0)
{
HungarianMatching(iou_matrix, detections.size(), tracks.size(), association);
}
else
{
Hungarian_Cuda(iou_matrix, detections.size(), tracks.size(), association);
}
/*
std::ofstream cuda_ofs("/workspace/cuda_asso.txt", std::ios_base::out);
for(int ii =0; ii < detections.size(); ii++){
......@@ -434,7 +441,14 @@ void BaseTracker<T>::AssociateDetectionsToTrackers(const std::vector<std::vector
auto t13 = std::chrono::steady_clock::now();
auto tdura = std::chrono::duration_cast<std::chrono::nanoseconds>(t13 - t12);
auto tdurams = tdura.count() * 1e-6;
SDK_LOG(SDK_INFO, "HungarianMatching using time is %f ", tdurams);
if (m_isGPU == 0)
{
SDK_LOG(SDK_INFO, "HungarianCPUMatching using time is %f ", tdurams);
}
else
{
SDK_LOG(SDK_INFO, "HungarianGPUMatching using time is %f ", tdurams);
}
for (size_t i = 0; i < detections.size(); i++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment