File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
src/GraphCtrl/GraphElement/_GEngine/GDynamicEngine Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -203,21 +203,8 @@ CVoid GDynamicEngine::fatWait() {
203203#ifdef _CGRAPH_PARALLEL_MICRO_BATCH_ENABLE_
204204CVoid GDynamicEngine::parallelRunAll () {
205205 // 微任务模式,主要用于性能测试的场景下
206- const UThreadPoolConfig& config = thread_pool_->getConfig ();
207- CSize thdNum = config.default_thread_size_ + config.secondary_thread_size_ ;
208- CGRAPH_THROW_EXCEPTION_BY_CONDITION (thdNum <= 0 ,
209- " default thread size cannot smaller than 1" );
210-
211206 std::vector<std::future<CStatus>> futures;
212- CSize taskNumPerThd = total_end_size_ / thdNum + (CSize)(0 != total_end_size_ % thdNum);
213- for (int i = 0 ; i < thdNum; i++) {
214- GElementPtrArr elements;
215- for (int j = 0 ; j < taskNumPerThd; j++) {
216- auto cur = i * taskNumPerThd + j;
217- if (cur < total_end_size_) {
218- elements.emplace_back (front_element_arr_[cur]);
219- }
220- }
207+ for (auto & elements : parallel_element_matrix_) {
221208 auto curFut = thread_pool_->commit ([elements] {
222209 CGRAPH_FUNCTION_BEGIN
223210 for (auto * element : elements) {
You can’t perform that action at this time.
0 commit comments