Skip to content

Conversation

@hakkiai
Copy link

@hakkiai hakkiai commented Nov 16, 2025

Removed the using namespace detail statements and replaced them with explicit qualifiers to make the code easier to follow. Also removed redundant break statements and added NEON dispatch for the max function to be consistent with other SIMD operations. @yungyuc

Removed 'using namespace detail' to explicitly qualify function calls, improving code readability. Also removed redundant break statements and added NEON dispatch for the max function to be consistent with other SIMD operations.
Copy link
Member

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always adding break after case in case a maintainer forgets about it after changing the code before it.

  • Don't remove break even if it is no-op.

case SIMD_NEON:
case detail::SIMD_NEON:
return neon::add<T>(dest, dest_end, src1, src2);
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing break is not conventional. Don't do it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially removed the break statements because they were technically unreachable after a return, so I deleted the break statement to simplify the switch block code. But I understand your point now.

@yungyuc
Copy link
Member

yungyuc commented Nov 17, 2025

Make sure CI passes before requesting for a review. You can run it in your local fork.

@yungyuc yungyuc added the refactor Change code without changing tests label Nov 17, 2025
@yungyuc
Copy link
Member

yungyuc commented Nov 17, 2025

This PR is for issue #631 .

@hakkiai
Copy link
Author

hakkiai commented Nov 17, 2025

Thanks for the review & feedback.

@hakkiai hakkiai closed this Nov 17, 2025
@hakkiai hakkiai removed their assignment Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Change code without changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants