- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

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

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

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

Blocks until the `device` is finished processing.

Parameters

  [in] | device | is the target device

Examples:
  black_scholes_options.cpp, brain_segmentation.cpp, deep_belief_net.cpp, heston_model.cpp, logistic_regression.cpp, naive_bayes.cpp, neural_network.cpp, perceptron.cpp, and softmax_regression.cpp.