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 50 51 52
|
//------------------------------------------------------------------------------
// GB_compatible.h: definitions for GB_compatible and related methods
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//------------------------------------------------------------------------------
#ifndef GB_COMPATIBLE_H
#define GB_COMPATIBLE_H
GB_PUBLIC
bool GB_Type_compatible // check if two types can be typecast
(
const GrB_Type atype,
const GrB_Type btype
) ;
GrB_Info GB_compatible // SUCCESS if all is OK, *_MISMATCH otherwise
(
const GrB_Type ctype, // the type of C (matrix or scalar)
const GrB_Matrix C, // the output matrix C; NULL if C is a scalar
const GrB_Matrix M, // optional mask, NULL if no mask
const bool Mask_struct, // true if M is structural
const GrB_BinaryOp accum, // C<M> = accum(C,T) is computed
const GrB_Type ttype, // type of T
GB_Context Context
) ;
GrB_Info GB_Mask_compatible // check type and dimensions of mask
(
const GrB_Matrix M, // mask to check
const bool Mask_struct, // true if M is structural
const GrB_Matrix C, // C<M>= ...
const GrB_Index nrows, // size of output if C is NULL (see GB*assign)
const GrB_Index ncols,
GB_Context Context
) ;
GrB_Info GB_BinaryOp_compatible // check for domain mismatch
(
const GrB_BinaryOp op, // binary operator to check
const GrB_Type ctype, // C must be compatible with op->ztype
const GrB_Type atype, // A must be compatible with op->xtype
const GrB_Type btype, // B must be compatible with op->ytype
const GB_Type_code bcode, // B may not have a type, just a code
GB_Context Context
) ;
#endif
|