Skip to content

Commit

Permalink
fix small mistake with passing syms in contract!
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Dec 15, 2018
1 parent aa028d2 commit dd23a68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/implementation/stridedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ trace!(α, A::AbstractArray, CA::Symbol, β, C::AbstractArray, indleft::IndexTup
trace!(α, A, CA, β, C, (indleft..., indright...), cind1, cind2)

"""
contract!(α, A, conjA, B, conjB, β, C, oindA, cindA, oindB, cindB, indleft, indright)
contract!(α, A, conjA, B, conjB, β, C, oindA, cindA, oindB, cindB, indleft, indright, syms = nothing)
Implements `C = β*C+α*contract(opA(A),opB(B))` where `A` and `B` are contracted, such that
the indices `cindA` of `A` are contracted with indices `cindB` of `B`. The open indices
Expand All @@ -75,11 +75,16 @@ map if `conjA` (`conjB`) equal `:N`. Together, `(oindA..., cindA...)` is a permu
number of indices of `C`. Furthermore, `length(cindA) == length(cindB)`,
`length(oindA)+length(oindB)` equals the number of indices of `C` and `(indleft...,
indright...)` is a permutation of `1` ot the number of indices of `C`.
The final argument `syms` is optional and can be either `nothing`, or a tuple of three
symbols, which are used to identify temporary objects in the cache to be used for permuting
`A`, `B` and `C` so as to perform the contraction as a matrix multiplication.
"""
contract!(α, A::AbstractArray, CA::Symbol, B::AbstractArray, CB::Symbol,
β, C::AbstractArray, oindA::IndexTuple, cindA::IndexTuple, oindB::IndexTuple,
cindB::IndexTuple, indleft::IndexTuple, indright::IndexTuple, syms = nothing) =
contract!(α, A, CA, B, CB, β, C, oindA, cindA, oindB, cindB, (indleft..., indright...))
contract!(α, A, CA, B, CB, β, C,
oindA, cindA, oindB, cindB, (indleft..., indright...), syms)

# actual implementations for AbstractArray with ind = (indleft..., indright...)
Base.@pure function similartype(A, T, sz)
Expand Down

0 comments on commit dd23a68

Please sign in to comment.