From f82f8b44bc3f36d046c0ab62808a6d80a903b322 Mon Sep 17 00:00:00 2001 From: John Long Date: Tue, 4 Apr 2023 15:52:35 -0400 Subject: [PATCH] remove StaticArrays, no performance benefit --- Project.toml | 4 +--- src/ParallelMergeCSR.jl | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 27d66d3..3f56c3d 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/ParallelMergeCSR.jl b/src/ParallelMergeCSR.jl index 051fac3..88985d8 100644 --- a/src/ParallelMergeCSR.jl +++ b/src/ParallelMergeCSR.jl @@ -14,7 +14,6 @@ using SparseArrays: AbstractSparseMatrixCSC, rowvals, rmul! using Polyester: @batch -using StaticArrays struct Counter end @@ -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)