-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
632 Matrix eWiseApply implemented but not declared in base (#184)
Several eWiseApply primitives for matrix inputs and outputs were implemented within all backends, but lacked a base specification. This MR adds a base specification of the operator *and* monoid based matrix eWiseApply to `include/graphblas/base/blas3.hpp`. In providing such, it found and fixes the following items: - matrix eWiseApply did not compile for non-standard matrix index types; - some other primitives did not compile for non-standard matrix types (e.g., `zip`); while - yet other primitives assumed uniform matrix index types for all matrix arguments (e.g., `mxm`). Different backends had several primitives for which this occurred; see this MR details for information on which primitives were affected. This MR included a code review that fixes all such occurrences in *all* backends except banshee--see note [1]. This MR does *not* resolve a previously flagged issue about the testing of matrix-based eWiseApply variants-- see note [2]. Additionally, this MR fixes several issues where passing the algebraic structure as a template argument would not work due to erroneously ordered template arguments. For example, both bottom lines in the following snippet should be equivalent: ``` typedef Semriring< operators::add< double >, operators::mul< double >, identities::zero, identities::one > MyRing; MyRing ring; grb::mxv< descriptors::no_operation >( y, A, x, ring ); grb::mxv< descriptors::no_operation, MyRing >( y, A, x ); ``` The latter variant requires the algebraic structure types to follow the descriptor template argument. This MR fixes several occurrences where this was not the case. (Though both variants are supported, the former is the suggested usage.) Finally, this MR applies various minor code style fixes throughout all files it touches. [1] In the regular usage of ALP/GraphBLAS, the issues regarding custom matrix index types that this MR solves, do not trigger compile-time nor run-time (functional) bugs. The use or compilation of the SparseBLAS and SpBLAS transition APIs (the latter of which does employ different matrix index types) likewise does not trigger related compilation or run-time issues. This MR however notably does *not* include extensive testing for primitives with multiple matrix arguments that use differing index types-- see GitHub issue #205. [2] In resolving this MR it was detected that unit testing only was done for the monoid-based matrix eWiseApply, not for the operator-based variant. This MR solves the issue that for new backends, code calling an unimplemented operator-based variant now does correctly return `UNSUPPORTED` (and triggering an assertion failure when in debug mode). However, it does not enable the automatic detection of such a missing implementation during standard unit testing-- this is to be resolved as part of GitHub issue #203 .
- Loading branch information
Showing
11 changed files
with
525 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.