-
Notifications
You must be signed in to change notification settings - Fork 218
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
refactor ListEntry used in collision #4811
refactor ListEntry used in collision #4811
Conversation
Still fails with:
|
Fix changes introduced in ComputationalRadiationPhysics#4745 to avoid invalid memory access. Avoid using void pointer as place holder for the later used frame list.
53fab52
to
0dd9aac
Compare
DINLINE auto operator[](uint32_t idx) const | ||
{ | ||
const uint32_t inSuperCellIdx = m_parIdxList[idx]; | ||
return m_framePtrList[inSuperCellIdx / frameSize][inSuperCellIdx % frameSize]; |
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.
Is it guaranteed that the division inSuperCellIdx / frameSize
does not yield a floating point number? (A comment may state that)
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.
With both integers? I don't think so
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.
Both types a integral types, they can not end in floating point numbers, that are defined by the language.
A comment is not useful because it will increase the code size without extra new knowledge.
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.
Looks okay
Refactor changes introduced in #4745 to avoid void using void pointer as a place holder for the later used frame list.