Skip to content

Commit b1103b2

Browse files
committed
accept StorageOrders as options
1 parent 1771316 commit b1103b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/options.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ const BYCOL = LibGraphBLAS.GxB_BY_COL
141141

142142
#only translate if it's a symbol
143143
option_toconst(option) = option
144+
function option_toconst(option::StorageOrders.StorageOrder)
145+
option === StorageOrders.ColMajor() && (return BYCOL)
146+
option === StorageOrders.RowMajor() && (return BYROW)
147+
throw(ArgumentError("Invalid Orientation setting $option"))
148+
end
144149
function option_toconst(sym::Symbol)
145150
sym === :format && return FORMAT
146151
sym === :nthreads && return NTHREADS

0 commit comments

Comments
 (0)