Skip to content

Commit 7a9e3fc

Browse files
committed
fix indexing
1 parent 989da7c commit 7a9e3fc

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

benchmarks/Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
1717

1818
[[BenchmarkTools]]
1919
deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
20-
git-tree-sha1 = "940001114a0147b6e4d10624276d56d531dd9b49"
20+
git-tree-sha1 = "4c10eee4af024676200bc7752e536f858c6b8f93"
2121
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
22-
version = "1.2.2"
22+
version = "1.3.1"
2323

2424
[[BitTwiddlingConvenienceFunctions]]
2525
deps = ["Static"]
@@ -295,9 +295,9 @@ version = "1.4.1"
295295

296296
[[Parsers]]
297297
deps = ["Dates"]
298-
git-tree-sha1 = "85b5da0fa43588c75bb1ff986493443f821c70b7"
298+
git-tree-sha1 = "621f4f3b4977325b9128d5fae7a8b4829a0c2222"
299299
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
300-
version = "2.2.3"
300+
version = "2.2.4"
301301

302302
[[Pkg]]
303303
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
@@ -423,21 +423,21 @@ version = "0.2.0"
423423

424424
[[StrideArraysCore]]
425425
deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "Requires", "SIMDTypes", "Static", "ThreadingUtilities"]
426-
git-tree-sha1 = "28debdcb4371020f89ffce06af4f7f68905a5fec"
426+
git-tree-sha1 = "c7e0392560f15771003cce388fe8471d17941374"
427427
uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da"
428-
version = "0.2.15"
428+
version = "0.2.19"
429429

430430
[[SuiteSparse]]
431431
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
432432
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
433433

434434
[[SuiteSparseGraphBLAS]]
435435
deps = ["ChainRulesCore", "HyperSparseMatrices", "Libdl", "LinearAlgebra", "MacroTools", "Preferences", "Random", "SSGraphBLAS_jll", "Serialization", "SparseArrays", "SpecialFunctions", "StorageOrders", "SuiteSparse"]
436-
git-tree-sha1 = "c826a940f860b8cdf6c4c25b09f6bb08260d8783"
436+
git-tree-sha1 = "33576d2926608fdfe958334400eac5b73c58c7d1"
437437
repo-rev = "master"
438438
repo-url = "https://github.com/JuliaSparse/SuiteSparseGraphBLAS.jl.git"
439439
uuid = "c2e53296-7b14-11e9-1210-bddfa8111e1d"
440-
version = "0.5.0"
440+
version = "0.6.1"
441441

442442
[[SuiteSparseMatrixCollection]]
443443
deps = ["DataFrames", "JLD2", "Pkg"]

src/libutils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ end
6464
end
6565

6666
@inline function decrement!(I)
67-
I isa Vector && (return I .-= 1)
6867
I isa Number && (return I - 1)
68+
parent(I) isa Vector && (return I .-= 1)
6969
return I # don't need to modify here, likely an AllType.
7070
end
71+
7172
@inline function increment!(I)
72-
I isa Vector && (return I .+= 1)
7373
I isa Number && (return I + 1)
74+
parent(I) isa Vector && (return I .+= 1)
7475
return I # don't need to modify here, likely an AllType.
7576
end
7677

test/gbarray.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
@test m[1:2:5, 1:2] == GBMatrix(x[1:2:5, 1:2])
2424
@test m[1:2:5, :] == GBMatrix(x[1:2:5, :])
2525

26+
A = GBMatrix([[1,2] [3,4]])
27+
@test A[[1,2], [1,1]] == [[1,2] [1,2]]
28+
2629
end
2730
@testset "sparse" begin
2831
#Construction and indexing correct for sparse matrices

0 commit comments

Comments
 (0)