diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-06-01 23:01:54 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-06-01 23:01:54 +0400 |
commit | db96d4972f201445451f4f12bd6424cc96b93d52 (patch) | |
tree | 6b6f18e12c57d2435a37a6bb6087aa13355823d2 /source/blender/blenkernel/intern/CCGSubSurf.c | |
parent | 4ad5606f6450221549ddfa942e3b9421254ede1b (diff) |
Workaround #20467: disabled OpenMP multithreading on subsurf/multires/sculpt
for now, it's too fine grained and so becomes a performance bottleneck on some
platforms, while only providing a modest speedup on others. Couldn't find a
simple enough solution to solve this, so for now no multithreading here.
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 6778c9eb8ad..8fad398f00a 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -1159,7 +1159,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss, int normalDataOffset = ss->normalDataOffset; int vertDataSize = ss->meshIFC.vertDataSize; - #pragma omp parallel for private(ptrIdx) schedule(static) + //#pragma omp parallel for private(ptrIdx) schedule(static) for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) { CCGFace *f = (CCGFace*) effectedF[ptrIdx]; int S, x, y; @@ -1285,7 +1285,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss, } } - #pragma omp parallel for private(ptrIdx) schedule(static) + //#pragma omp parallel for private(ptrIdx) schedule(static) for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) { CCGFace *f = (CCGFace*) effectedF[ptrIdx]; int S, x, y; @@ -1351,7 +1351,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss, int vertDataSize = ss->meshIFC.vertDataSize; void *q = ss->q, *r = ss->r; - #pragma omp parallel for private(ptrIdx) schedule(static) + //#pragma omp parallel for private(ptrIdx) schedule(static) for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) { CCGFace *f = (CCGFace*) effectedF[ptrIdx]; int S, x, y; @@ -1685,17 +1685,17 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss, } } - #pragma omp parallel private(ptrIdx) + //#pragma omp parallel private(ptrIdx) { void *q, *r; - #pragma omp critical + //#pragma omp critical { q = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf q"); r = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf r"); } - #pragma omp for schedule(static) + //#pragma omp for schedule(static) for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) { CCGFace *f = (CCGFace*) effectedF[ptrIdx]; int S, x, y; @@ -1779,7 +1779,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss, } } - #pragma omp critical + //#pragma omp critical { MEM_freeN(q); MEM_freeN(r); @@ -1791,14 +1791,14 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss, gridSize = 1 + (1<<((nextLvl)-1)); cornerIdx = gridSize-1; - #pragma omp parallel for private(i) schedule(static) + //#pragma omp parallel for private(i) schedule(static) for (i=0; i<numEffectedE; i++) { CCGEdge *e = effectedE[i]; VertDataCopy(EDGE_getCo(e, nextLvl, 0), VERT_getCo(e->v0, nextLvl)); VertDataCopy(EDGE_getCo(e, nextLvl, edgeSize-1), VERT_getCo(e->v1, nextLvl)); } - #pragma omp parallel for private(i) schedule(static) + //#pragma omp parallel for private(i) schedule(static) for (i=0; i<numEffectedF; i++) { CCGFace *f = effectedF[i]; int S, x; |