LCOV - code coverage report
Current view: top level - src/utility - LAGraph_GetNumThreads.c (source / functions) Hit Total Coverage
Test: LAGraph code coverage report. Commit id: 3b461aa. Current time (UTC): 2024-01-25T16:04:32Z Lines: 6 6 100.0 %
Date: 2024-01-25 16:05:28 Functions: 1 1 100.0 %

          Line data    Source code
       1             : //------------------------------------------------------------------------------
       2             : // LAGraph_GetNumThreads: get the # of threads to use
       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             : // LAGraph_get_nthreads: get # of threads that will be used by LAGraph.
      19             : 
      20             : #include "LG_internal.h"
      21             : 
      22         115 : int LAGraph_GetNumThreads
      23             : (
      24             :     // output:
      25             :     int *nthreads_outer,
      26             :     int *nthreads_inner,
      27             :     char *msg
      28             : )
      29             : {
      30             : 
      31             :     //--------------------------------------------------------------------------
      32             :     // check inputs
      33             :     //--------------------------------------------------------------------------
      34             : 
      35         115 :     LG_CLEAR_MSG ;
      36         115 :     LG_ASSERT (nthreads_outer != NULL && nthreads_inner != NULL,
      37             :         GrB_NULL_POINTER) ;
      38             : 
      39             :     //--------------------------------------------------------------------------
      40             :     // get number of threads
      41             :     //--------------------------------------------------------------------------
      42             : 
      43         114 :     (*nthreads_outer) = LG_nthreads_outer ;
      44         114 :     (*nthreads_inner) = LG_nthreads_inner ;
      45         114 :     return (GrB_SUCCESS) ;
      46             : }

Generated by: LCOV version 1.14