ArrayFire: sync

Blocks until all operations on device are finished. More...

Functions

AFAPI void sync (const int device=-1)
 Blocks until the device is finished processing. More...
 
AFAPI af_err af_sync (const int device)
 

Blocks until all operations on device are finished.

These functions block the calling thread until all of the device operations have finished.


◆ af_sync()

AFAPI void sync ( const int  device = -1)

Blocks until the device is finished processing.

Parameters
[in]deviceis the target device
Examples
benchmarks/cg.cpp, financial/black_scholes_options.cpp, financial/heston_model.cpp, image_processing/brain_segmentation.cpp, machine_learning/deep_belief_net.cpp, machine_learning/logistic_regression.cpp, machine_learning/naive_bayes.cpp, machine_learning/neural_network.cpp, machine_learning/perceptron.cpp, machine_learning/softmax_regression.cpp, and pde/boltzmann_cfd.cpp.