Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions include/graphblas/ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ namespace grb {
*
* \warning Therefore, this operator may propagate the use of uninitialised
* values if not used with care. Ensuring its use with in-place
* primitives is recommended.
* primitives is recommended; it should \em not be used with
* #grb::eWiseApply.
*/
template<
typename D1, typename D2 = D1, typename D3 = D2,
Expand Down Expand Up @@ -132,7 +133,8 @@ namespace grb {
*
* \warning Therefore, this operator may propagate the use of uninitialised
* values if not used with care. Ensuring its use with in-place
* primitives is recommended.
* primitives is recommended; it should \em not be used with
* #grb::eWiseApply.
*/
template<
typename D1, typename D2 = D1, typename D3 = D2,
Expand Down
15 changes: 12 additions & 3 deletions include/graphblas/reference/blas1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2974,6 +2974,13 @@ namespace grb {
) {
#ifdef _DEBUG
std::cout << "\t internal::dense_apply_generic called\n";
#endif
#ifndef GRB_NO_NOOP_CHECKS
static_assert(
!internal::maybe_noop< OP >::value,
"Warning: you may be generating an output vector with uninitialised values."
" (Define the GRB_NO_NOOP_CHECKS macro to disable this check.)\n"
);
#endif
static_assert( !(left_scalar && left_sparse),
"The left-hand side must be scalar OR sparse, but cannot be both!" );
Expand Down Expand Up @@ -3132,9 +3139,11 @@ namespace grb {
(void) n;
#endif
#ifndef GRB_NO_NOOP_CHECKS
static_assert( !internal::maybe_noop< OP >::value, "Warning: you may be "
"generating an output vector with uninitialised values. Define "
"the GRB_NO_NOOP_CHECKS macro to disable this check.\n" );
static_assert(
(descr & descriptors::dense) || !internal::maybe_noop< OP >::value,
"Warning: you may be generating an output vector with uninitialised values."
" (Define the GRB_NO_NOOP_CHECKS macro to disable this check.)\n"
);
#endif
// assertions
assert( !masked || mask_coors != nullptr );
Expand Down