[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overloads for C# Interface to use flat vector with unsafe to speedup passing rays #41

Conversation

mariuszhermansdorfer
Copy link
Contributor
@mariuszhermansdorfer mariuszhermansdorfer commented Dec 1, 2022

This PR has a bunch of minor optimizations to the raycasting API:

  • Add an overload for the Embree raytracer to accept float[] as input
  • Use unsafe methods to iterate over arrays for faster conversions

Test results:
image

src/Csharp/CMakeLists.txt Outdated Show resolved Hide resolved
src/Csharp/packages/base/src/NativeUtils.cs Outdated Show resolved Hide resolved
Revert .NET version
Move FlattenVectorArrayUnsafe to the correct place
@cadop
Copy link
Owner
cadop commented Dec 1, 2022

Is there something in your gitignore or a missing commit? I can't build this branch

image

Revert managed classes to static
Add missing reference assembly
@mariuszhermansdorfer
Copy link
Contributor Author

Try building it now @cadop.

I reverted all classes back to static and added the missing reference to CMakeLists. Previously I had it added manually here:
image

@cadop cadop changed the title Minor optimizations to Embree raycasting Add overloads for C# Interface to use flat vector with unsafe to speedup passing rays Dec 2, 2022
@cadop
Copy link
Owner
cadop commented Dec 2, 2022

When you get a chance could you edit the original comment for this PR and paste a screenshot of the hfcsharptest group all passing. I need to setup the automated testing on github runners, but until that happens, i'll just need to have people post that the unittests pass, and then ill review the code and test on other platforms.

@mariuszhermansdorfer
Copy link
Contributor Author

When you get a chance could you edit the original comment for this PR and paste a screenshot of the hfcsharptest group all passing. I need to setup the automated testing on github runners, but until that happens, i'll just need to have people post that the unittests pass, and then ill review the code and test on other platforms.

Updated the initial comment and added a screenshot of all tests passing.

@cadop cadop deleted the branch cadop:support-for-stream-of-rays-in-embree December 9, 2022 17:24
@cadop cadop closed this Dec 9, 2022
@cadop
Copy link
Owner
cadop commented Dec 9, 2022

Didn't mean to close this, it was because I deleted the other branch when merging it. You can rebase on main and reopen this PR to be merged into main (and ill change it).

  • You shouldn't need to make a new PR, just reopen this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants