1 //------------------------------------------------------------------------------
2 // GrB_Type_wait: wait for a user-defined GrB_Type 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_Type has no pending operations
11 // to wait for.  All this method does is verify that the type is properly
12 // initialized, and then it does an OpenMP flush.
13 
14 #include "GB.h"
15 
GrB_Type_wait(GrB_Type * type)16 GrB_Info GrB_Type_wait      // no work, just check if the GrB_Type is valid
17 (
18     GrB_Type *type
19 )
20 {
21 
22     //--------------------------------------------------------------------------
23     // check inputs
24     //--------------------------------------------------------------------------
25 
26     #pragma omp flush
27     GB_WHERE1 ("GrB_Type_wait (&type)") ;
28     GB_RETURN_IF_NULL (type) ;
29     GB_RETURN_IF_NULL_OR_FAULTY (*type) ;
30 
31     //--------------------------------------------------------------------------
32     // return result
33     //--------------------------------------------------------------------------
34 
35     #pragma omp flush
36     return (GrB_SUCCESS) ;
37 }
38 
39