Add ThreadPool suppport
Closed this issue · 3 comments
Type of optimization:
[Extraction/Analyze/Build&Compile/Cross-platform]
Description:
Add ThreadPool with conditional variables
`thread pool calls in BFS, thread multiplier 2
2021-11-13 14:38:17:302 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:38:17:304 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:38:17:467 ObjectDetector::getObjectsRects pair threads:8
2021-11-13 14:38:18:728 BfsObjectDetector::createObjectRects, objects found:2680
thread pool calls in BFS, thread multiplier 4
2021-11-13 14:44:29:380 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:44:29:389 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:44:29:553 ObjectDetector::getObjectsRects pair threads:16
2021-11-13 14:44:30:657 BfsObjectDetector::createObjectRects, objects found:2688
thread pool calls in BFS, thread multiplier 6
2021-11-13 14:46:06:769 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:46:06:777 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:46:06:944 ObjectDetector::getObjectsRects pair threads:24
2021-11-13 14:46:08:135 BfsObjectDetector::createObjectRects, objects found:2707
std::async calls in BFS, thread multiplier 2
2021-11-13 14:41:46:672 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:41:46:680 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:41:46:842 ObjectDetector::getObjectsRects pair threads:8
2021-11-13 14:41:47:916 BfsObjectDetector::createObjectRects, objects found:2680
std::async calls in BFS, thread multiplier 4
2021-11-13 14:48:13:930 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:48:13:938 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:48:14:89 ObjectDetector::getObjectsRects pair threads:16
2021-11-13 14:48:15:315 BfsObjectDetector::createObjectRects, objects found:2688
std::async calls in BFS, thread multiplier 6
2021-11-13 14:49:23:128 Reading of file:inputs/rs_1.bmp has been added in extraction queue.
2021-11-13 14:49:23:130 Reading of file:inputs/rs_2.bmp has been added in extraction queue.
2021-11-13 14:49:23:302 ObjectDetector::getObjectsRects pair threads:24
2021-11-13 14:49:24:615 BfsObjectDetector::createObjectRects, objects found:2707`
Threadpool implementation has been added, but usage of it commented
on Inte Core i7 7700hq
ThreadPool threads count : 8 (hw_core = 4 * 2 hyper-threading)
bfs column count(mThreadMultiplier) = 10
~30% faster comparison