Skip to content

Commit

Permalink
corrected minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Apr 24, 2024
1 parent 4386d89 commit b36c93b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1588,8 +1588,8 @@ for com ∈ (:spinor,:s_m,:m_s,:anti,:a_m,:m_a,:multivector,:s_a,:a_s)
VEC = outspin ? :svecs : :svec
genloop = Symbol(:generate_loop_,com)
@eval @noinline function $genloop(V,a,b,t,MUL,product!,preproduct!,d=nothing)
$(insert_expr((:N,br...,:bn),:mvec)...)
if mdims(V)<cache_limit/2
$(insert_expr((:N,br...,:bn),:mvec)...)
out = $VEC(N,Any)(zeros($VEC(N,t)))
for g $leftspin
X = indexbasis(N,g-1)
Expand All @@ -1610,9 +1610,9 @@ for com ∈ (:spinor,:s_m,:m_s,:anti,:a_m,:m_a,:multivector,:s_a,:a_s)
for g $$leftspin
X = indexbasis(N,g-1)
@inbounds for i 1:bn[g]
@inbounds val = $(nothingd ? :(@inbounds $a[$left[g]+i]/$d) : :(@inbounds $a[$left[g]+i]))
@inbounds val = $(nothingd ? :(@inbounds $a[$left[g]+i]/$d) : :(@inbounds $a[$$left[g]+i]))
val0 && for G $$rightspin
@inbounds R = $right[G]
@inbounds R = $$right[G]
Y = indexbasis(N,G-1)
@inbounds for j 1:bn[G]
dm = derive_mul(V,X[i],Y[j],val,$b[R+j],$MUL)
Expand Down
2 changes: 1 addition & 1 deletion src/products.jl
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ contraction(x::Multivector{W,<:Multivector{V},N},y::Multivector{V,T,N}) where {W
Expr(:call,:Values,[Expr(:call,:+,:(@inbounds y[$i]*value(x[$i]))) for i list(1,N)]...)
end
@inline @generated function matmul(x::Values{N,<:Chain{V,G}},y::Values{N}) where {N,V,G}
Expr(:call,:Values,[Expr(:call,:+,[:(@inbounds y[$i]*x[$i][$j]) for i llist(1,N)]...) for j list(1,binomial(mdims(V),G))]...)
Expr(:call,:Values,[Expr(:call,:+,[:(@inbounds y[$i]*x[$i][$j]) for i list(1,N)]...) for j list(1,binomial(mdims(V),G))]...)
end
@inline @generated function matmul(x::Values{N,<:Multivector{V}},y::Values{N}) where {N,V}
Expr(:call,:Values,[Expr(:call,:+,[:(@inbounds y[$i]*value(x[$i])[$j]) for i list(1,N)]...) for j list(1,1<<mdims(V))]...)
Expand Down

0 comments on commit b36c93b

Please sign in to comment.