Open marktucker opened 2 weeks ago
Amazing, glad it was straightforward and the approach looks great! We've got internal tests for this; some of the usdImaging and Presto picking tests exercise this when we turn hydra 2 on.
Filed as internal issue #USD-10417
/AzurePipelines run
Actually std::transform
dates back to C++98. But I agree almost all the "algorithms" in std are impossible to read and very difficult to write, and especially with the addition of for (auto a : range)
syntax really does not provide much improvement over raw C++ code.
Description of Change(s)
Implementing a vectorized version of FromPickHit called FromPickHits. This amortizes the high cost of computing instancer information when generating pick hit information for multiple hits with one function call.
@jesschimein @tcauchois this is my stab at vectorizing FromPickHit we discussed. This was easier than I expected. It gets Houdini's selection performance with scene index imaging up to par with UsdImagingDelegate performance using GetScenePrimPaths.
Checklist
[ X ] I have created this PR based on the dev branch
[ X ] I have followed the [coding conventions]
[ ] I have added unit tests that exercise this functionality I did not do this because there is no unit test for FromPickHit, and I suspect a fair bit of infrastructure would be required to unit test this. I have however verified it functioning in an unreleased build of Houdini.
[ X ] I have verified that all unit tests pass with the proposed changes
[ X ] I have submitted a signed Contributor License Agreement (Reference: Contributor License Agreement instructions)