Skip to content

"Query everything": a summary of many related issues. #66

@DrTimothyAldenDavis

Description

@DrTimothyAldenDavis

Mechanisms for querying GraphBLAS objects, state, and library info.
The following exists, which is a start:

#define GRB_VERSION 2
#define GRB_SUBVERSION 0
GrB_Info GrB_getVersion (&version, &subversion)

It possible to query a matrix for nrows, ncols, and nvals, but not its type. That is a problem. An application needs to be able to query everything about GraphBLAS opaque objects.

CATEGORY 1: all results would go into user-visible, non-opaque arrays.

user-visible results are better for many uses, such as saving data to a
file, or sending data across an MPI channel, where pointers to things
(like a GrB_Type) cannot be shared:

(1.1) query the library implementation, date, and version, both at
run time and with #defines. Issue: #2

(1.2) query the mode passed to GrB_init (GrB_BLOCKING, GrB_NONBLOCKING).
Issue #4.

(1.3) query the domains (types) of operators: Issue #5.
This should be returned as a string. Returning a GrB_Type is not a
good idea. Note that this requires user-defined types to have a
name. The query would return the name of the C type, as in "bool",
"int8_t", ... "float", "double". For user-defined types it would
return the name of the C typedef; see issue #32.

(1.4) query the size of a GrB_Type, returning a size_t. (See #6)

(1.5) query a GrB_Matrix, GrB_Vector, GrB_Scalar, a serialized_data
from GrB_Matrix_serialize for its type. This should be returned as
a string ("bool", "int8_t", ... "float", "double").
LAGraph has an ugly work-around the lack of this feature in
GraphBLAS; this is a MUST-have.

(1.6) query the identity value of monoid, returning the result into a
uint8_t array perhaps, of size given by (4). See #7

(1.7) query the state of a GrB_Descriptor; see #13.

CATEGORY 2: These query functions can also be added; they return a GrB
object, not a user-visible non-opaque result.
They might be useful
but not essential. Items 2.2, 2.3 and 2.3 (Issue #7) would be
needed if for consistency with the ability to query all other
GrB objects, however.

(1.1) given the name of a type as string, return the corresponding
GrB_Type. Return NULL if the type is user-defined. Note that
this can also be written by the user. I have a GxB_Type_from_name
function that does this.

(1.2) query the monoid of a semiring (see #7)

(1.3) query the multiplicative operator of a semiring (#7)

(1.4) query the binary op of a monoid, returning a GrB_BinaryOp (#7)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions