Skip to content

Commit 774f07c

Browse files
committed
remove some functions that have become redundant in the meantime
1 parent 721c69f commit 774f07c

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

src/PartitionedArrays.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using LinearAlgebra
66
using Printf
77
using CircularArrays
88
using StaticArrays
9+
import Base: +,-,*,/
910
import MPI
1011
import IterativeSolvers
1112
import Distances
@@ -189,7 +190,6 @@ include("gallery.jl")
189190

190191
export ascsc
191192
export ascsr
192-
export copy
193193
export similar
194194
export sparsecsr
195195
export strictly_equivalent
@@ -198,7 +198,6 @@ export pointer_array
198198
export index_array
199199
include("sparse_helpers.jl")
200200

201-
import Base: +,-,*,/
202201
export RAP
203202
export RAP!
204203
export RAPadd!
@@ -208,5 +207,4 @@ export mul!
208207
export mul_search!
209208
include("sequential_implementations.jl")
210209

211-
212210
end # module

src/sparse_helpers.jl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,6 @@ function counts_to_ptrs!(v)
9797
v[1] = 1
9898
end
9999

100-
function Base.similar(A::SparseMatrixCSR{Bi}, m::Integer, n::Integer) where Bi
101-
return SparseMatrixCSR{1}(m, n, ones(eltype(A.rowptr), m+1), eltype(A.colval)[], eltype(A.nzval)[])
102-
end
103-
104-
function Base.similar(A::SparseMatrixCSR{Bi}) where Bi
105-
return SparseMatrixCSR{Bi}(size(A)..., copy(A.rowptr), copy(colvals(A)), similar(nonzeros(A)))
106-
end
107-
108-
function Base.copy(A::SparseMatrixCSR{Bi}) where Bi
109-
return SparseMatrixCSR{Bi}(size(A)..., copy(A.rowptr), copy(colvals(A)), copy(nonzeros(A)))
110-
end
111-
112100
function SparseMatricesCSR.sparsecsr(A::SparseMatrixCSC)
113101
sparsecsr(findnz(A)..., size(A)...)
114102
end
@@ -155,9 +143,6 @@ function strictly_equivalent(A::SparseMatrixCSR, B::SparseMatrixCSR)
155143
end
156144

157145
function strictly_equivalent(A::SparseMatrixCSR,B::SparseMatrixCSC) strictly_equivalent(B,A) end
158-
function ==(A::SparseMatrixCSC,B::SparseMatrixCSR) strictly_equivalent(A,B) end
159-
function ==(A::SparseMatrixCSR,B::SparseMatrixCSC) strictly_equivalent(B,A) end
160-
function ==(A::SparseMatrixCSR,B::SparseMatrixCSR) strictly_equivalent(A,B) end
161146

162147
# Equality definition for SparseCSC and SparseCSR. If the size and lengths match, the CSR matrix is converted.
163148
function approx_equivalent(A::SparseMatrixCSC, B::SparseMatrixCSR,args...)
@@ -191,9 +176,6 @@ function approx_equivalent(A::SparseMatrixCSR, B::SparseMatrixCSR,args...)
191176
end
192177

193178
function approx_equivalent(A::SparseMatrixCSR,B::SparseMatrixCSC) approx_equivalent_equivalent(B,A) end
194-
function (A::SparseMatrixCSC,B::SparseMatrixCSR) approx_equivalent(A,B) end
195-
function (A::SparseMatrixCSR,B::SparseMatrixCSC) approx_equivalent(B,A) end
196-
function (A::SparseMatrixCSR,B::SparseMatrixCSR) approx_equivalent(A,B) end
197179

198180
function copy(At::Transpose{Tv,SparseMatrixCSR{Bi,Tv,Ti}}) where {Bi,Tv,Ti}
199181
A = At.parent

times.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Dict{String, @NamedTuple{min::Float64, max::Float64, avg::Float64}}("Phase 143" => (min = 0.2188811, max = 0.2188811, avg = 0.2188811), "Phase 3" => (min = 0.0, max = 0.0, avg = 0.0), "Matrix Assembly" => (min = 0.4098738, max = 0.4098738, avg = 0.4098738), "Phase 1" => (min = 5.0e-7, max = 5.0e-7, avg = 5.0e-7))
1+
Dict{String, @NamedTuple{min::Float64, max::Float64, avg::Float64}}("Phase 143" => (min = 0.2013603, max = 0.2013603, avg = 0.2013603), "Phase 3" => (min = 0.0, max = 0.0, avg = 0.0), "Matrix Assembly" => (min = 0.4048329, max = 0.4048329, avg = 0.4048329), "Phase 1" => (min = 1.2e-6, max = 1.2e-6, avg = 1.2e-6))

0 commit comments

Comments
 (0)