private static int checkResult ( int result ) { if ( exceptionsEnabled && result != cublasStatus . CUBLAS_STATUS_SUCCESS ) { throw new CudaException ( cublasStatus . stringFor ( result ) ) ; } return result ; }
If the given result is different to cublasStatus . CUBLAS_STATUS_SUCCESS and exceptions have been enabled this method will throw a CudaException with an error message that corresponds to the given result code . Otherwise the given result is simply returned .