Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Dr Ian Bush [consultant]
HPC

External contributors:
James Richings
patched overflow in bitwise.hpp logic
Luc Jaulmes
patched v4's install process using CMake
Jakub Adamski
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ See the [docs](docs/README.md) for enabling acceleration and running the unit te

In addition to QuEST's [authors](AUTHORS.txt), we sincerely thank the following external contributors to QuEST.

- [James Richings](https://github.com/JPRichings) for patching a v4 overflow bug.
- [Luc Jaulmes](https://github.com/lucjaulmes) for patching v4's CMake installation.
- [Jakub Adamski](https://github.com/jjacobx) for optimising distributed communication of max-size messages.
- [Bruno Villasenor Alvarez](https://github.com/bvillasen) of [AMD](https://www.amd.com/en.html) for porting the v3 GPU backend to [HIP](https://github.com/ROCm-Developer-Tools/HIP), for compatibility with AMD GPUs.
Expand Down
4 changes: 3 additions & 1 deletion quest/src/core/bitwise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*
* @author Tyson Jones
* @author Erich Essmann (improved OS agnosticism)
* @author James Richings (patched setBit)
*/

#ifndef BITWISE_HPP
Expand Down Expand Up @@ -106,7 +107,8 @@ INLINE qindex insertBit(qindex number, int bitIndex, int bitValue) {

INLINE qindex setBit(qindex number, int bitIndex, int bitValue) {

qindex bitInPlace = bitValue << bitIndex;
// beware that shifting the raw int would overflow (#623)
qindex bitInPlace = ((qindex) bitValue) << bitIndex;
qindex oneInPlace = QINDEX_ONE << bitIndex;
return (number & ~oneInPlace) | bitInPlace;
}
Expand Down