diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-12 11:20:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-12 11:20:34 +0400 |
commit | 2ee180eab678c0b21e92aa0175ad93528d9009ae (patch) | |
tree | 54455d3ee395cb006667e26d12189bb3705bda81 /source/blender/bmesh/intern/bmesh_operators.c | |
parent | 3e8b56b321225b5fce0e02130a3de2f770b19441 (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/bmesh/intern/bmesh_operators.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index f7dcb8ba483..fbf51b7dfdf 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -599,7 +599,7 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *UNUSED(op), const char hty BMElemF *ele; int i; -#pragma omp parallel for schedule(dynamic) +#pragma omp parallel for schedule(dynamic) if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT) for (i = 0; i < 3; i++) { if (htype & flag_types[i]) { BM_ITER_MESH (ele, &iter, bm, iter_types[i]) { @@ -1176,7 +1176,7 @@ static void bmo_flag_layer_alloc(BMesh *bm) bm->etoolflagpool = BLI_mempool_create(sizeof(BMFlagLayer) * bm->totflags, max_ii(512, bm->totedge), 512, 0); bm->ftoolflagpool = BLI_mempool_create(sizeof(BMFlagLayer) * bm->totflags, max_ii(512, bm->totface), 512, 0); -#pragma omp parallel sections +#pragma omp parallel sections if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT) { #pragma omp section { @@ -1257,7 +1257,7 @@ static void bmo_flag_layer_free(BMesh *bm) bm->etoolflagpool = BLI_mempool_create(new_totflags_size, bm->totedge, 512, 0); bm->ftoolflagpool = BLI_mempool_create(new_totflags_size, bm->totface, 512, 0); -#pragma omp parallel sections +#pragma omp parallel sections if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT) { #pragma omp section { @@ -1328,7 +1328,7 @@ static void bmo_flag_layer_clear(BMesh *bm) BMIter iter; const int totflags_offset = bm->totflags - 1; -#pragma omp parallel sections +#pragma omp parallel sections if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT) { /* now go through and memcpy all the flag */ #pragma omp section |