-
Notifications
You must be signed in to change notification settings - Fork 145
USE SW and fix Floating point exception #6362
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
Conversation
| set(SW ON) | ||
| include_directories(${SW_MATH}/include) | ||
| include_directories(${SW_FFT}/include) | ||
| include_directories(${SW_FFT}/lib/libfftw3.a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe include_directories should be a directory (e.g. lib/) instead of the library file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks,the problem has been fixed in the new PR .
| }//end if section | ||
| }//end c_index loop | ||
| sum /= rot_count; | ||
| if (rot_count!=0) sum/= rot_count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the value of sum be changed if rot_count == 0? What is the expected behaviour of the code if rot_count==0 encountered and divided by zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, when rot_count == 0, the subsequent parallel computation will not run. Therefore, the sum variable is irrelevant. However, since sum stores Infinity, using it in other code could lead to undefined behavior.
|
It changes into PR 'sw' |
Linked Issue
Fix #6355
Unit Tests and/or Case Tests for my changes
What's changed?
Attention