Skip to content

Add vectorized version of the getValue function in ScalarField. - #2

Open
damienmarchal wants to merge 1 commit into
sofa-framework:masterfrom
CRIStAL-PADR:pr-vectorize-getvalue
Open

Add vectorized version of the getValue function in ScalarField.#2
damienmarchal wants to merge 1 commit into
sofa-framework:masterfrom
CRIStAL-PADR:pr-vectorize-getvalue

Conversation

@damienmarchal

Copy link
Copy Markdown
Contributor

Currently the scalar field can be evaluated only one by one. This is very time consuming and not CUDA friendly. So I add a new method getValues to get a bunch of values in a single call.

Using the vector version accelerates a lot the the evaluation of fields especially when defined in python because the traversal from c++ to python has to be done one time.

A simple benchmark made on the file example-mesh-extraction-from-implicit.py.
It takes 26 seconds on my machine with the getValue API and only 4 seconds with the vector version.

This allows to accelerates a lot the evaluation of field defined in python as the conversion
has to be done a limited amount of time.

On The example-mesh-extraction-from-implicit.py exemple the computation time goes from 26 seconds with the current implementation using getValue down to 4 seconds with the getValues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant