sync

Functions
sync
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Managing devices in ArrayFire

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)

## Detailed Description

Blocks until all operations on device are finished.

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

## Function Documentation

## § af_sync()

AFAPI af_err af_sync | ( | const int | device | ) |

## § sync()

AFAPI void af::sync | ( | const int | device = `-1` | ) |

Blocks until the `device` is finished processing.

Parameters

  [in] | device | is the target device

Examples:
  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, and machine_learning/softmax_regression.cpp.