Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SSE2 で 16+16 ビットのタプルを 32 ビット整数としてソートしています。比較と最小/最大の符号付き整数命令のみがあります。上位部分の順序は単なるハッシュであるため、問題はありません。しかし、負のハッシュを持つエントリは後方にソートされます (そうですか?)
より良い方法はありますか?
Just subtract 0x80000000 from your 32 bit values, use signed operations, then add back the 0x80000000 afterwards.