Companion

Constants and factory functions of InferenceException.

Functions

Link copied to clipboard
fun checkNativeResult(code: Int, message: String? = null, backend: ComputeBackend? = null)

Throws the typed exception for a native result code, or returns normally if it is NativeErrorCode.OK.

Link copied to clipboard
fun fromNativeError(code: Int, message: String? = null, backend: ComputeBackend? = null): InferenceException

Maps a non-NativeErrorCode.OK native result code to the matching typed exception. Unknown codes produce a NativeFailureException that preserves the raw code.