Skip to content

Commit 43fc08e

Browse files
committed
new storageorder impl
1 parent 8f6354d commit 43fc08e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/oriented.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
StorageOrders.storageorder(::OrientedGBMatrix{T, F, O}) where {T, F, O} = O
2-
1+
StorageOrders.comptime_storageorder(::OrientedGBMatrix{T, F, O}) where {T, F, O} = O
32
function GBMatrixC{T, F}(
43
A::SparseVector;
54
fill = defaultfill(F)

src/shallowtypes.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# fall back to nzval, this may need to change eventually, as it's currently not possible to know the storage order.
22
# Either a new parameter or something else.
3-
StorageOrders.storageorder(A::AbstractGBShallowArray) = storageorder(A.nzval)
4-
53
function GBShallowVector(v::DenseVector{T}; fill::F = nothing) where {T, F}
64
m = _newGrBRef()
75
@wraperror LibGraphBLAS.GrB_Matrix_new(m, gbtype(T), size(v, 1), size(v, 2))

src/types.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,6 @@ GBVector{T}(
720720
fill::F = defaultfill(T)
721721
) where {T, F} = return GBVector{T, F}(p; fill)
722722

723-
StorageOrders.storageorder(::GBVector) = ColMajor()
724723
# we call @gbvectortype GBVector below GBMatrix defn.
725724

726725
"""
@@ -830,7 +829,8 @@ end
830829

831830
# We need to do this at runtime. This should perhaps be `RuntimeOrder`, but that trait should likely be removed.
832831
# This should ideally work out fine. a GBMatrix or GBVector won't have
833-
StorageOrders.storageorder(A::AbstractGBMatrix) = gbget(A, :format) == Integer(BYCOL) ? StorageOrders.ColMajor() : StorageOrders.RowMajor()
832+
StorageOrders.runtime_storageorder(A::AbstractGBMatrix) = gbget(A, :format) == Integer(BYCOL) ? StorageOrders.ColMajor() : StorageOrders.RowMajor()
833+
StorageOrders.comptime_storageorder(::AbstractGBMatrix) = StorageOrders.RuntimeOrder()
834834
StorageOrders.storageorder(::AbstractGBVector) = ColMajor()
835835

836836
defaultfill(::Type{T}) where T = zero(T)

0 commit comments

Comments
 (0)