How to use atomicMin or atomicMax for half data structure?

atomicMin and atomicMAX are not support half ,how to write a function achieve this?

You could simulate it (a bit slower) with atomicCAS.