79596141

Date: 2025-04-28 09:30:15
Score: 3.5
Natty:
Report link

I also don't have reputation to comment on anyone's answer, but I'd like to mention that in following this post's ideas of hotwiring atomicMax/Min for floats and doubles, I have also successfully used the same concept to hotwire it to do atomicMax for a 32-bit float with an unsigned 32-bit integer i.e. (max with argMax).

This has allowed me to effectively do atomicArgmax with float/uint32 (I have only tested positive floats as that's my use-case).

If there are people who are interested to see an implementation I'll update the answer (but I'm sure if you follow the ideas in this post you can easily write it yourself; it's just layering the float as the first 32 bits and then the uint32 index as the last 32 bits)!

Reasons:
  • Blacklisted phrase (1): to comment
  • RegEx Blacklisted phrase (1.5): don't have reputation to comment
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gabriel Lim