1 //------------------------------------------------------------------------------
2 // GrB_BinaryOp_wait: wait for a user-defined GrB_BinaryOp to complete
3 //------------------------------------------------------------------------------
4 
5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
6 // SPDX-License-Identifier: Apache-2.0
7 
8 //------------------------------------------------------------------------------
9 
10 // In SuiteSparse:GraphBLAS, a user-defined GrB_BinaryOp has no pending
11 // operations to wait for.  All this method does is verify that the op is
12 // properly initialized, and then it does an OpenMP flush.
13 
14 #include "GB.h"
15 
GrB_BinaryOp_wait(GrB_BinaryOp * op)16 GrB_Info GrB_BinaryOp_wait   // no work, just check if the GrB_BinaryOp is valid
17 (
18     GrB_BinaryOp *op
19 )
20 {
21 
22     //--------------------------------------------------------------------------
23     // check inputs
24     //--------------------------------------------------------------------------
25 
26     #pragma omp flush
27     GB_WHERE1 ("GrB_BinaryOp_wait (&op)") ;
28     GB_RETURN_IF_NULL (op) ;
29     GB_RETURN_IF_NULL_OR_FAULTY (*op) ;
30 
31     //--------------------------------------------------------------------------
32     // return result
33     //--------------------------------------------------------------------------
34 
35     #pragma omp flush
36     return (GrB_SUCCESS) ;
37 }
38 
39