1 //------------------------------------------------------------------------------
2 // GxB_SelectOp_wait: wait for a user-defined GxB_SelectOp 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 GxB_SelectOp 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
GxB_SelectOp_wait(GxB_SelectOp * op)16 GrB_Info GxB_SelectOp_wait // no work, just check if the GxB_SelectOp is valid
17 (
18 GxB_SelectOp *op
19 )
20 {
21
22 //--------------------------------------------------------------------------
23 // check inputs
24 //--------------------------------------------------------------------------
25
26 #pragma omp flush
27 GB_WHERE1 ("GxB_SelectOp_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