MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / lock

Method lock

src/core/array.rs:626–631  ·  view source on GitHub ↗

Lock the device buffer in the memory manager Locked buffers are not freed by memory manager until unlock is called.

(&self)

Source from the content-addressed store, hash-verified

624 ///
625 /// Locked buffers are not freed by memory manager until unlock is called.
626 pub fn lock(&self) {
627 unsafe {
628 let err_val = af_lock_array(self.handle);
629 HANDLE_ERROR(AfError::from(err_val));
630 }
631 }
632
633 /// Unlock the device buffer in the memory manager
634 ///

Callers 1

mainFunction · 0.80

Calls 1

HANDLE_ERRORFunction · 0.85

Tested by

no test coverage detected