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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "TensorAlgebra"
uuid = "68bd88dc-f39d-4e12-b2ca-f046b68fcc6a"
version = "0.7.18"
version = "0.7.19"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down
5 changes: 2 additions & 3 deletions src/matricize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,8 @@ function unmatricizeadd!(
invperm_codomain::Tuple{Vararg{Int}}, invperm_domain::Tuple{Vararg{Int}},
α::Number, β::Number
)
a12 = unmatricize(style, m, axes(a_dest), invperm_codomain, invperm_domain)
a_dest .= α .* a12 .+ β .* a_dest
return a_dest
a = unmatricize(style, m, axes(a_dest), invperm_codomain, invperm_domain)
return add!(a_dest, a, α, β)
end

function unmatricizeadd!(
Expand Down
5 changes: 5 additions & 0 deletions src/permutedimsadd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ end

# Broadcasting implementation of add!.
function add!_broadcast(dest::AbstractArray, src::AbstractArray, α::Number, β::Number)
# This works around a bug in Strided.jl v2.3.4 and below when broadcasting
# empty StridedViews: https://github.com/QuantumKitHub/Strided.jl/pull/50
# TODO: Delete this and bump the version of Strided.jl once that is fixed.
isempty(dest) && return dest

if iszero(β)
dest .= α .* src
else
Expand Down
Loading