Is there convenien开发者_Go百科t way for using asserts within the kernels invocation on device mode?CUDA now has a native assert function.Use assert(...).If its argument is zero, it will stop kernel e
Most of the time I will use an exception to check for a condition in my code, I wonder when it is an appropriate time to use an assertion?