CUDA::Minimal and Error Handling
In the last few days I've been introducing my CUDA bindings for Perl that I've put on github called CUDA::Minimal. CUDA is a framework for writing and running massively parallel code on the highly parallel computing architecture that is your video card (assuming your card is capable of CUDA in the first place). Today I am going to discuss error handling in CUDA.
Error handling is a boring topic, but it's important, so I'm going to motivate it a bit. Consider this statement from version 4.0 of the CUDA C Best Practices Guide (which you can find here):
Code samples throughout the guide omit error checking for conciseness. Production code should, however, systematically check the error code returned by each API call...
In CUDA::Minimal, you don't have to sacrifice conciseness for error-checking...