Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-22 19:08:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-22 22:13:50 +0300
commiteabf79e40ad64c1e80c9c52227099e211c6092af (patch)
tree6db674fde5f3b6c15729297dec6fc32b5f859cf7 /source/blender/modifiers
parentb176206b94e8ca2e02c8350f08c9020881c777e3 (diff)
Get rid of OMP in MOD_build.
Reasons: - Only parallelized piece of code gives little local speedup (code block only about 25% quicker even on 1M polys cube). - No gain nor loss using new BLI_task system. - At 10% of build, parallelized piece of code is only about 5% of total func runtime (run-time explodes as build proportion increases). See no point in adding (in utmost best optimistic case, in real use-case, when depsgraph will likely already fire several evaluations in parallel, speedup would be even smaller) 1% speedup here at the cost of threading complexity... Note that since later code uses hashes, I don't think it's easy to thread it, so think we can leave with it for now.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_build.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index 507fad466a3..a364eef2974 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -106,15 +106,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
edgeMap = MEM_mallocN(sizeof(*edgeMap) * numEdge_src, "build modifier edgeMap");
faceMap = MEM_mallocN(sizeof(*faceMap) * numPoly_src, "build modifier faceMap");
-#pragma omp parallel sections if (numVert_src + numEdge_src + numPoly_src >= BKE_MESH_OMP_LIMIT)
- {
-#pragma omp section
- { range_vn_i(vertMap, numVert_src, 0); }
-#pragma omp section
- { range_vn_i(edgeMap, numEdge_src, 0); }
-#pragma omp section
- { range_vn_i(faceMap, numPoly_src, 0); }
- }
+ range_vn_i(vertMap, numVert_src, 0);
+ range_vn_i(edgeMap, numEdge_src, 0);
+ range_vn_i(faceMap, numPoly_src, 0);
frac = (BKE_scene_frame_get(md->scene) - bmd->start) / bmd->length;
CLAMP(frac, 0.0f, 1.0f);