Line data Source code
1 : //------------------------------------------------------------------------------ 2 : // LAGraph_Finalize: finish LAGraph 3 : //------------------------------------------------------------------------------ 4 : 5 : // LAGraph, (c) 2019-2022 by The LAGraph Contributors, All Rights Reserved. 6 : // SPDX-License-Identifier: BSD-2-Clause 7 : // 8 : // For additional details (including references to third party source code and 9 : // other files) see the LICENSE file or contact permission@sei.cmu.edu. See 10 : // Contributors.txt for a full list of contributors. Created, in part, with 11 : // funding and support from the U.S. Government (see Acknowledgments.txt file). 12 : // DM22-0790 13 : 14 : // Contributed by Timothy A. Davis, Texas A&M University 15 : 16 : //------------------------------------------------------------------------------ 17 : 18 : #include "LG_internal.h" 19 : 20 281 : int LAGraph_Finalize (char *msg) 21 : { 22 : 23 : //-------------------------------------------------------------------------- 24 : // check inputs 25 : //-------------------------------------------------------------------------- 26 : 27 281 : LG_CLEAR_MSG ; 28 : 29 : //-------------------------------------------------------------------------- 30 : // free global objects 31 : //-------------------------------------------------------------------------- 32 : 33 281 : LG_TRY (LG_Random_Finalize (msg)) ; 34 : 35 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_int8 )) ; 36 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_int16 )) ; 37 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_int32 )) ; 38 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_int64 )) ; 39 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_uint8 )) ; 40 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_uint16)) ; 41 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_uint32)) ; 42 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_uint64)) ; 43 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_fp32 )) ; 44 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_first_fp64 )) ; 45 : 46 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_int8 )) ; 47 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_int16 )) ; 48 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_int32 )) ; 49 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_int64 )) ; 50 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_uint8 )) ; 51 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_uint16)) ; 52 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_uint32)) ; 53 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_uint64)) ; 54 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_fp32 )) ; 55 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_second_fp64 )) ; 56 : 57 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_int8 )) ; 58 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_int16 )) ; 59 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_int32 )) ; 60 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_int64 )) ; 61 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_uint8 )) ; 62 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_uint16)) ; 63 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_uint32)) ; 64 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_uint64)) ; 65 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_fp32 )) ; 66 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_plus_one_fp64 )) ; 67 : 68 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_bool )) ; 69 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_int8 )) ; 70 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_int16 )) ; 71 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_int32 )) ; 72 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_int64 )) ; 73 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_uint8 )) ; 74 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_uint16)) ; 75 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_uint32)) ; 76 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_uint64)) ; 77 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_fp32 )) ; 78 281 : GRB_TRY (GrB_Semiring_free (&LAGraph_any_one_fp64 )) ; 79 : 80 : //-------------------------------------------------------------------------- 81 : // finalize GraphBLAS 82 : //-------------------------------------------------------------------------- 83 : 84 281 : GRB_TRY (GrB_finalize ( )) ; 85 281 : return (GrB_SUCCESS) ; 86 : } 87 :