Skip to content

Fix output array for logical ops AND, OR and NEQ #292

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

Merged
merged 2 commits into from
Apr 12, 2021

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Apr 12, 2021

Earlier, these functions were using binary_func macro which picks output based on the input arrays types. However, as these are logical operations which always result in boolean output, the correct macro to use for this is overloaded_logic_func.

With this fix, ::and, ::or and ::neq functions have acquired an additional feature i.e. the user can also use scalars as one of the inputs of these functions.

Fixes #291

9prady9 added 2 commits April 10, 2021 18:17
Earlier, these functions were using binary_func macro which picks
output based on the input arrays types. However, as these are logical
operations which always result in boolean output, the correct macro to
use for this is overloaded_logic_func.

With this fix, ::and, ::or and ::neq functions have acquired an
additional feature i.e. the user can also use scalars as one of the
inputs of these functions.
@9prady9 9prady9 added this to the 3.8.1 milestone Apr 12, 2021
@9prady9 9prady9 merged commit 412510c into arrayfire:master Apr 12, 2021
@9prady9 9prady9 deleted the fmt_fixes branch April 12, 2021 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arrayfire::neq should output Array<bool> ?
1 participant