sync
- arrayfire.sync(device_id: int | None = None) None
Blocks until all the functions on the specified device have completed execution.
This function is used to synchronize the program execution with the operations being carried out on a GPU or other computation device, ensuring that all previously submitted operations are complete before the program proceeds.
Parameters
- device_idint | None, optional
The ID of the device on which to wait for all operations to complete. If None is provided, the current active device is used. Default is None.