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