1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
//------------------------------------------------------------------------------
// GrB_Scalar_nvals: number of entries in a sparse GrB_Scalar
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2025, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//------------------------------------------------------------------------------
#include "GB.h"
GrB_Info GrB_Scalar_nvals // get the number of entries in a GrB_Scalar
(
uint64_t *nvals, // number of entries (1 or 0)
const GrB_Scalar s // GrB_Scalar to query
)
{
//--------------------------------------------------------------------------
// check inputs
//--------------------------------------------------------------------------
GB_RETURN_IF_NULL (s) ;
GB_WHERE_1 (s, "GrB_Scalar_nvals (&nvals, s)") ;
ASSERT (GB_SCALAR_OK (s)) ;
//--------------------------------------------------------------------------
// get the number of entries
//--------------------------------------------------------------------------
info = GB_nvals (nvals, (GrB_Matrix) s, Werk) ;
#pragma omp flush
return (info) ;
}
//------------------------------------------------------------------------------
// GxB_Scalar_nvals: number of entries in a sparse GrB_Scalar (historical)
//------------------------------------------------------------------------------
GrB_Info GxB_Scalar_nvals // get the number of entries in a GrB_Scalar
(
uint64_t *nvals, // number of entries (1 or 0)
const GrB_Scalar s // GrB_Scalar to query
)
{
return (GrB_Scalar_nvals (nvals, s)) ;
}
|