Skip to content

Commit

Permalink
fix _monoidnew! eval
Browse files Browse the repository at this point in the history
  • Loading branch information
rayegun committed Jul 24, 2022
1 parent 77b7bba commit 7aeaf5b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,9 @@ for Z ∈ valid_vec
function _monoidnew!(op::TypedMonoid{F, $Z, T}) where {F, T}
opref = Ref{LibGraphBLAS.GrB_Monoid}()
if op.terminal === nothing
if Z valid_union
@wraperror LibGraphBLAS.$func(opref, op.binaryop, op.identity)
else
@wraperror LibGraphBLAS.GrB_Monoid_new_UDT(opref, op.binaryop, Ref(op.identity))
end
@wraperror LibGraphBLAS.$func(opref, op.binaryop, op.identity)
else
if Z valid_union
@wraperror LibGraphBLAS.$functerm(opref, op.binaryop, op.identity, op.terminal)
else
@wraperror LibGraphBLAS.GrB_Monoid_terminal_new_UDT(opref, op.binaryop, Ref(op.identity), Ref(op.terminal))
end
@wraperror LibGraphBLAS.$functerm(opref, op.binaryop, op.identity, op.terminal)
end
op.p = opref[]
end
Expand Down

0 comments on commit 7aeaf5b

Please sign in to comment.