You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FIRST and SECOND operators only rely on the pattern, not the values, of one of their inputs. So no typecasting need be done, and there need not be any check for type compatibility. This change would allow many algorithms to operate on many different kinds of matrices, with no typecasting. For example, a BFS algorithm can work on any user defined type, if it uses these operators in its semiring.
Currently the spec requires a type compatibility check, which prohibits this.
The text was updated successfully, but these errors were encountered:
I also do this in my GxB_SelectOp when the builtin operator does not use certain components. The same thing can be done in the proposed GrB_IndexUnaryOps. For example, the GrB_ROWINDEX_* operator does not access the values of the input matrix at all, so no domain check should be done there. GrB_VALUELE_FP32 (etc) does need to look at the values so a domain check should be done for that operator.
I've added the following statement, highlighted in yellow, to my v6.0.0 user guide:
SPEC: Some functions do not make use of all of their inputs; in particular the binary operators FIRST, SECOND, and ONEB, and many of the index unary operators. The Specification requires that the inputs to these operators must be compatible with (that is, can be typecasted to) the inputs to the operators, even if those inputs are not used and no typecasting would ever occur. As an extension to the specification, SuiteSparse:GraphBLAS does not perform this error check on unused inputs of built-in operators. For example, the GrB_FIRST_INT64 operator can be used in GrB_eWiseAdd(C,..,A,B,...) on a matrix B of any type, including user-defined types. For this case, the matrix A must be compatible with GrB_INT64.
The FIRST and SECOND operators only rely on the pattern, not the values, of one of their inputs. So no typecasting need be done, and there need not be any check for type compatibility. This change would allow many algorithms to operate on many different kinds of matrices, with no typecasting. For example, a BFS algorithm can work on any user defined type, if it uses these operators in its semiring.
Currently the spec requires a type compatibility check, which prohibits this.
The text was updated successfully, but these errors were encountered: