Skip to main content

has_compute_context

Function has_compute_context 

Source
pub fn has_compute_context() -> bool
Expand description

Check if the current thread has compute context initialized

Returns true if the thread-local context is initialized with a compute pool and semaphore permits, meaning the compute macros will offload work. Returns false if macros would fall back to inline execution.