#ifndef max

#define max( a, b ) ( ((a) > (b)) ? (a) : (b) )

#endif

#ifndef min

#define min( a, b ) ( ((a) < (b)) ? (a) : (b) )

#endif

In C, I have defined these two small functions and use quite often.

now when it comes to CUDA, I just notice that I need to do convert the function in CUDA form.

Is there any simple way to do it? or callable function ?

Just let me know where to look or terms that I have to search…

Thanks in advance and any help is appreciated.