Skip to content

Commit 7f94071

Browse files
sunyabpixar-oss
authored andcommitted
sdf: Replace use of tbb::parallel_for with WorkParallelForTBBRange
Going through libWork adds support for clients with custom task management systems. This drops the use of tbb::static_partitioner since there currently is no matching concept defined in libWork. If there is performance fallout, we could consider adding it to the API like we did for the RangeType concept. (Internal change: 2379721)
1 parent 91f0488 commit 7f94071

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pxr/usd/sdf/crateData.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include "pxr/usd/sdf/payload.h"
2929
#include "pxr/usd/sdf/schema.h"
3030

31-
#include <tbb/parallel_for.h>
32-
3331
#include <algorithm>
3432
#include <functional>
3533
#include <iostream>
@@ -815,7 +813,7 @@ class Sdf_CrateDataImpl
815813
}
816814

817815
// Create all the specData entries and store pointers to them.
818-
tbb::parallel_for(
816+
WorkParallelForTBBRange(
819817
tbb::blocked_range<size_t>(0, specs.size()),
820818
[this, crateFile, &liveFieldSets, &specs](
821819
tbb::blocked_range<size_t> const &r) {
@@ -831,8 +829,7 @@ class Sdf_CrateDataImpl
831829
liveFieldSets.find(spec.fieldSetIndex)->second;
832830

833831
}
834-
},
835-
tbb::static_partitioner());
832+
});
836833

837834
_lastSet = _data.end();
838835

0 commit comments

Comments
 (0)