Documentation of the cutil family of functions
I am wondering where I can find documentation on the cutil family of functions. In many of the example CUDA applications, there are calls to methods such as, "cutilExit", "cutilSafeCall", "cutilCheckError", and "cutilCheckMsg". I have no idea what these functions are doing, and can't find anything in either the programming guide nor the reference manual for CUDA v2.3. What the heck are these things, where are they documented, and when should I use them? Specifically, I am wondering what "cutilExit" does and if it is required, or if calling "cudaThreadExit" is sufficient to clean up my resources on the device? Also, what the heck is cutilCheckMsg doing? I don't understand what the argument to this function is, because none of the errors that I have found are named, "Kernel Execution Failed". Thanks for any help in tracking down some documentation and explanations,

-Jeff
I am wondering where I can find documentation on the cutil family of functions. In many of the example CUDA applications, there are calls to methods such as, "cutilExit", "cutilSafeCall", "cutilCheckError", and "cutilCheckMsg". I have no idea what these functions are doing, and can't find anything in either the programming guide nor the reference manual for CUDA v2.3. What the heck are these things, where are they documented, and when should I use them? Specifically, I am wondering what "cutilExit" does and if it is required, or if calling "cudaThreadExit" is sufficient to clean up my resources on the device? Also, what the heck is cutilCheckMsg doing? I don't understand what the argument to this function is, because none of the errors that I have found are named, "Kernel Execution Failed". Thanks for any help in tracking down some documentation and explanations,



-Jeff

#1
Posted 09/11/2009 04:19 PM   
cutil is a library included with the SDK samples just to reduce the amount of code in those samples. It is not robust to be used in your own applications, so you really shouldn't use it.
cutil is a library included with the SDK samples just to reduce the amount of code in those samples. It is not robust to be used in your own applications, so you really shouldn't use it.

#2
Posted 09/11/2009 04:31 PM   
[quote name='tmurray' post='586994' date='Sep 11 2009, 12:31 PM']cutil is a library included with the SDK samples just to reduce the amount of code in those samples. It is not robust to be used in your own applications, so you really shouldn't use it.[/quote]

OK, thanks! I saw in your "read before you post" section that the cutil functions are unsupported by nvidia, but I just didn't understand why so many of the examples were using them. While I understand the thought process behind simplifying the examples to highlight the important concepts, I think that it is more important to illustrate the correct way to implement code. It is nice to have some "hello world" examples just to get people started, but more advanced code should probably avoid these utilities altogether to prevent confusion. Perhaps it would have been beneficial to see some inline comments expressing that these functions are unfit for production code. Thanks for the explanation,

-Jeff
[quote name='tmurray' post='586994' date='Sep 11 2009, 12:31 PM']cutil is a library included with the SDK samples just to reduce the amount of code in those samples. It is not robust to be used in your own applications, so you really shouldn't use it.



OK, thanks! I saw in your "read before you post" section that the cutil functions are unsupported by nvidia, but I just didn't understand why so many of the examples were using them. While I understand the thought process behind simplifying the examples to highlight the important concepts, I think that it is more important to illustrate the correct way to implement code. It is nice to have some "hello world" examples just to get people started, but more advanced code should probably avoid these utilities altogether to prevent confusion. Perhaps it would have been beneficial to see some inline comments expressing that these functions are unfit for production code. Thanks for the explanation,



-Jeff

#3
Posted 09/11/2009 04:40 PM   
Scroll To Top