Skip to content

Instantly share code, notes, and snippets.

function betterind(tree,indices,usedind=0)
if isa(tree,Int)
return tree,indices,usedind,Dict()
else
(lt,indices,usedind,ltm)=betterind(tree[1],indices,usedind)
(rt,indices,usedind,rtm)=betterind(tree[2],indices,usedind)
tocont=intersect(indices[lt],indices[rt])
nind=Dict(zip(tocont,usedind+1:usedind+length(tocont)))
usedind+=length(tocont)
using Base.Threads;
struct SimpleType{T}
a::Vector{Matrix{T}}
end
Base.length(t::SimpleType) = length(t.a)
Base.getindex(t::SimpleType,i) = t.a[i];
using Strided
function fun1()
A = randn(40,40,40,40);
B = randn(40,40,40,40);
function fun2()
as=StridedView(A);
bs=StridedView(B);
function filterdimstrides(dims,strides)
i = findfirst(isequal(1), dims)
if !(i isa Nothing)
newdims = TupleTools.deleteat(dims, i)
newstrides = broadcast(TupleTools.deleteat, strides, (i,))
return filterdimstrides(newdims,newstrides)
else
return dims,strides
end
end
on julia 1.1
julia/base/compiler/abstractinterpretation.jl
803d802
< print("abstract call gf by type ",argtypes,"\n\n") #why isn't revise picking up these changes?
806d804
< print("abstract calling ",f," with args \n",fargs,"\n\n")
1217a1216
>