Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/graphblas/reference/blas1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9438,7 +9438,10 @@ namespace grb {
// if apply surely initialises zz, we could use a blend-like op
for( size_t k = 0; k < AnyOp::blocksize; ++k ) {
if( mask[ k ] ) {
apply( zz[ k ], xx[ k ], yy[ k ], anyOp );
GRB_UTIL_IGNORE_MAYBE_UNINITIALIZED // yy and xx cannot be used
// uninitialised or mask
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler warning form #387 warnings disappear if re guard apply with GRB_UTIL_IGNORE_MAYBE_UNINITIALIZED and GRB_UTIL_RESTORE_WARNINGS, just like in the block before. This should be safe since the warning is false-positive.

apply( zz[ k ], xx[ k ], yy[ k ], anyOp ); // would be false while zz
GRB_UTIL_RESTORE_WARNINGS // init is just above
} else {
zz[ k ] = addMonoid.template getIdentity< typename AnyOp::D3 >();
}
Expand Down