-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Milestone
Description
According to the documentation:
ALP/include/graphblas/utils.hpp
Lines 299 to 307 in 73a3cb3
| * @return If the descriptor does not include grb::descriptors::structural | |
| * nor grb::descriptors::structural_complement and if \a assigned | |
| * is false, then the entry is ignored and uninterpreted, thus | |
| * returning \a false. | |
| * @return If the descriptor includes grb::descriptors::invert_mask, | |
| * returns the negation of the dereferenced value of \a val | |
| * which is first cast to a \a bool. | |
| * @return Otherwise, returns the dereferenced value of \a val, | |
| * cast to a \a bool. |
However, if the descriptor invert_mask is set and assigned is set to false, then the return value will be true:
ALP/include/graphblas/utils.hpp
Lines 320 to 336 in 73a3cb3
| bool ret = false; | |
| // if we request a structural mask, decide only on passed assigned variable | |
| if( descriptor & descriptors::structural ) { | |
| ret = assigned; | |
| } else { | |
| // if based on value, if there is a value, cast it to bool | |
| if( assigned ) { | |
| ret = static_cast< bool >( val[ offset ] ); | |
| } | |
| // otherwise there is no value and false is assumed | |
| } | |
| // check whether we should return the inverted value | |
| if( descriptor & descriptors::invert_mask ) { | |
| return !ret; | |
| } else { | |
| return ret; | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers