CUDA_SAFE_CALL utility ? does this macro do any work ?

Reading the (good) examples given with the CUDA SDK, I put every cuda built-in function call inside that macro.
I recently looked at preprocessed code to track some bug and discovered that the macro is just removed.
Is that macro really usefull to prevent problems (ie as assert ), or not worth writing in future kernels ?

Check the macro again. When compiled in debug mode, it checks for any error return value from the function called. This is a very useful thing to do if something isn’t working properly.

Unless _DEBUG is defined, the macros get compiled to nothing for performance reasons.

Paulius

Ok guys, thanx for your answers !