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

Fixed nth_element, added unary_nor #568

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

koosha94
Copy link
Contributor

@koosha94 koosha94 commented Mar 8, 2016

This commit adds unary_nor, and nor1 as a logical operator.
It also adds/fixes support for user defined types in nth_element.

@jszuppe
Copy link
Contributor

jszuppe commented Mar 8, 2016

Thanks for that! It's a good idea, but I have some comments:

  • NOR is a binary operator (negation of OR).
  • NOR operator can be constructed just using binary_negate and logial_or:
not2(logical_or(arg1, arg2))
  • Don't use master branch for pull requests, make a special feature branch (in this case it could be called fix-nth-element' or whatever), because now yourmaster` and Boost.Compute are different and that can make problems when you want to make next pull request.
  • It would be great to have test for user-defined types for nth_element.

Maybe it would good to add find algorithm version that works with user defined types (Compare or Equal binary function would be required)?

@jszuppe jszuppe self-assigned this Mar 23, 2017
@jszuppe jszuppe removed their assignment Feb 24, 2018
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