Skip to content

Conversation

@david-cortes-intel
Copy link
Contributor

Description

Fixes a warning from GCC about potential undefined behavior, which cannot be encountered either way but lacks hints for it.


Checklist:

Completeness and readability

  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

@david-cortes-intel
Copy link
Contributor Author

/intelci: run

{
const size_t iStart = iMain * simdBatchSize;
const size_t iStart = iMain * simdBatchSize;
#if defined(__GNUC__) && !defined(__clang__)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some comments here. For example:

Suggested change
#if defined(__GNUC__) && !defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__)
// g++ compiler cannot vectorize the further loops without this attribute
// due to -Werror=aggressive-loop-optimizations, as since GCC 4.8
// "GCC now uses a more aggressive analysis to derive an upper bound
// for the number of iterations of loops using constraints imposed by language standards"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants