Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error for overflowing nbits during PQ construction (#3833)
Summary: Pull Request resolved: #3833 size_t expands to unsigned long int, so any left shift more than 31 means ksub overflows. So, we can add a check right before it is constructed in ProductQuantizer. Ramil talked to Matthijs and the outcome is that 16 bits isn't really practical, but we can do the check for 24 to be safe. Reviewed By: kuarora, mengdilin Differential Revision: D62153881 fbshipit-source-id: 721db6bf6ad5dd5d336b4498f4750acc4059310c
- Loading branch information