Skip to main content

last_error

Function last_error 

Source
pub fn last_error() -> Result<()>
Expand description

Retrieve and clear the per-thread “sticky” error from the runtime.

This is how the Runtime API reports async kernel failures — failed launches are latched into a thread-local slot that persists across unrelated calls until this function (or cudaPeekAtLastError) reads it.