what is use of cutilSafeCall( {some memory related call} ) ?

I am new for cuda. I start looking cuda code and found a cutilSafeCall() call it like a safecall.
But i want to know that how it make a safecall and what extends it safe to use?

It’s part of the cutil library. The cutil library is a utility library used in the CUDA SDK examples (and isn’t supported by CUDA or recommended for end user use). As far as I know, cutilSafeCall() will check for CUDA errors having occurred, and if there have been, then it’ll print an error message and exit the application, so maybe naming it a safe call is a bit of a misnomer. A preferable route is to manually check the return codes from CUDA calls (if using the runtime API, look [post=‘here’]http://developer.download.nvidia.com/compute/cuda/4_0/toolkit/docs/online/group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#g3f51e3575c2178246db0a94a430e0038[/post]), see if they’re an error code (i.e. not cudaSuccess), and perform the appropriate error handling if so.