Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ version = "1.0.0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
julia = "1.8"
Polyester = "0.7.2"
StaticArrays = "1.5.19"
julia = "1.8"

[extras]
Coverage = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
Expand Down
6 changes: 2 additions & 4 deletions src/ParallelMergeCSR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ using SparseArrays: AbstractSparseMatrixCSC,
rowvals,
rmul!
using Polyester: @batch
using StaticArrays


struct Counter end
Expand Down Expand Up @@ -109,12 +108,11 @@ for (T, t) in ((Adjoint, adjoint), (Transpose, transpose))
num_merge_items = nnz + nrows # preserve the dimensions of the original matrix

num_threads = nthreads()
num_threads > 1024 && error("ParallelMergeCSR.jl only supports up to 1024 threads.")

items_per_thread = (num_merge_items + num_threads - 1) ÷ num_threads

row_carry_out = zeros(MVector{1024,eltype(cp)})
value_carry_out = zeros(MVector{1024,eltype(C)}) # value must match output
row_carry_out = zeros(eltype(cp), num_threads)
value_carry_out = zeros(eltype(C), num_threads) # value must match output


for k in 1:size(C,2)
Expand Down