Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
DomainIR fix ctranspose for UpperTriangular
Browse files Browse the repository at this point in the history
Julia doesn't translate ctranspose to regular transpose for
UpperTriangular type with real data so we fix it here
  • Loading branch information
Ehsan Totoni committed Jan 6, 2017
1 parent c64b2c2 commit 94d1966
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/domain-ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2579,6 +2579,13 @@ function translate_call_globalref(state, env, typ, head, oldfun::ANY, oldargs, f
# ignore 1st arg which is type
new_args = normalize_args(state, env, args[2:end])
expr = mk_expr(typ, head, new_fun, new_args...)
elseif fun.name==:ctranspose && !(typ.parameters[1]<:Complex)
# Julia doesn't translate ctranspose to regular transpose for
# UpperTriangular type so we fix it here
new_fun = GlobalRef(Base,:transpose)
new_args = normalize_args(state, env, args)
dprintln(env, "ctranspose replaced with transpose ")
expr = mk_expr(typ, head, new_fun, new_args...)
end
elseif is(fun.mod, Base.Broadcast)
if is(fun.name, :broadcast_shape)
Expand Down

0 comments on commit 94d1966

Please sign in to comment.