Line data Source code
1 : //------------------------------------------------------------------------------ 2 : // LAGraph_SFreeSet: free a set of matrices 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 : #include "LAGraphX.h" 20 : 21 6 : void LAGraph_SFreeSet // free a set of matrices 22 : ( 23 : // input/output 24 : GrB_Matrix **Set_handle, // array of GrB_Matrix of size nmatrices 25 : GrB_Index nmatrices // # of matrices in the set 26 : ) 27 : { 28 6 : if (Set_handle != NULL) 29 : { 30 6 : GrB_Matrix *Set = (*Set_handle) ; 31 6 : if (Set != NULL) 32 : { 33 106 : for (GrB_Index i = 0 ; i < nmatrices ; i++) 34 : { 35 103 : GrB_free (&(Set [i])) ; 36 : } 37 : } 38 6 : LAGraph_Free ((void **) Set_handle, NULL) ; 39 : } 40 6 : }