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

Remove lambda wrappers #139

Merged
merged 4 commits into from
Oct 16, 2018
Merged

Remove lambda wrappers #139

merged 4 commits into from
Oct 16, 2018

Conversation

jakirkham
Copy link
Member

Does some cleanup to remove the lambda wrappers for the lower level C++ wrapper function. Also converts the C++ wrapper function to an in-place computation. Helps cleanup the surrounding code a bit and makes the removal of lambda wrappers cleaner.

As we intend to use the filter as an in-place filter, go ahead and
provide only one array argument in the `lambda` function and reuse it
for input and output. This should help simplify the surrounding code a
bit as well.
There is no need to store the selection from `out_swap` now that it is
only being passed into one argument in the `lambda` function. So go
ahead and remove it and simplify the surrounding code.
Change `lineRankOrderFilter1D_floating` to run in-place as that is our
typical usage of this function. Also update the surrounding code
accordingly. Cuts down on setup time a bit.
Instead of using `lambda` wrappers`, simply call the fused type function
directly with the intended specialization. Should cutdown the overhead
of dispatch and make it easier for the compiler to inline it. This
remains pretty compact thanks to the conversion of the function to an
in-place computation and some previous refactoring.
@jakirkham jakirkham merged commit 26cce1a into nanshe-org:master Oct 16, 2018
@jakirkham jakirkham deleted the rm_lambdas branch October 16, 2018 02:26
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.

1 participant