atomicMax doesn’t support floating point types. There are tricks to convert floats into a 32 bit representation which will compare correctly using integer logic, however if you want to find the maximum of a non-trivial number of floats, use a parallel reduction instead. It will be appreciably faster.
atomicMax doesn’t support floating point types. There are tricks to convert floats into a 32 bit representation which will compare correctly using integer logic, however if you want to find the maximum of a non-trivial number of floats, use a parallel reduction instead. It will be appreciably faster.