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:
authorCampbell Barton <ideasman42@gmail.com>2012-12-12 11:20:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-12 11:20:34 +0400
commit2ee180eab678c0b21e92aa0175ad93528d9009ae (patch)
tree54455d3ee395cb006667e26d12189bb3705bda81 /source/blender/editors/mesh/editmesh_utils.c
parent3e8b56b321225b5fce0e02130a3de2f770b19441 (diff)
add threshold for bmesh & openmp so its not used with low poly meshes, BM_OMP_LIMIT may need tweaking.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_utils.c')
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 61bce9f8d1e..17a9c7df41b 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -409,7 +409,7 @@ void EDBM_index_arrays_ensure(BMEditMesh *em, const char htype)
em->face_index = MEM_mallocN(sizeof(void **) * em->bm->totface, "em->face_index");
}
-#pragma omp parallel sections
+#pragma omp parallel sections if (em->bm->totvert + em->bm->totedge + em->bm->totface >= BM_OMP_LIMIT)
{
#pragma omp section
{
@@ -1306,7 +1306,7 @@ void EDBM_mesh_reveal(BMEditMesh *em)
/* Use tag flag to remember what was hidden before all is revealed.
* BM_ELEM_HIDDEN --> BM_ELEM_TAG */
-#pragma omp parallel for schedule(dynamic)
+#pragma omp parallel for schedule(dynamic) if (em->bm->totvert + em->bm->totedge + em->bm->totface >= BM_OMP_LIMIT)
for (i = 0; i < 3; i++) {
BM_ITER_MESH (ele, &iter, em->bm, iter_types[i]) {
BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_HIDDEN));