sync

Contents

sync#

Wait for any code running on an executor to complete. For CUDA executors this typically synchronizes the stream backing the executor, while host executors wait until the calling thread completes.

Examples#

(Bout = matvec(A, X)).run(exec);
(norm = sum((Bout-B)*(Bout-B))).run(exec);
(maxn = matx::max(sqrt(norm))).run(exec);

exec.sync();