Skip to content

Conversation

@willyborn
Copy link
Contributor

Current compare function is not "Strict Weak Ordering" since it returns true when both arguments are equal, should be false.

Description

The "Strict Weak Ordering" criteria is necessary because some sort implementations will end in a dead-loop without it.

Additional information about the PR answering following questions:

  • Is this a new feature or a bug fix? BUG
  • More detail if necessary to describe all commits in pull request.
  • Why these changes are necessary. To guarantee that the code runs on any compiler
  • Potential impact on specific hardware, software or backends. None
  • New functions and their functionality. None
  • Can this PR be backported to older versions? Yes
  • Future changes not implemented in this PR. None

Fixes: #3378

Changes to Users

None

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • Functions added to unified API
  • Functions documented

@christophe-murphy christophe-murphy merged commit bdda3b3 into arrayfire:master Oct 23, 2024
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.

[BUG] examples/mnist_common.h bool compare(..., ...)

2 participants