Remove transpose_rec (was unused): the whole cache-oblivious thing seems to be useless

This commit is contained in:
Marshall Lochbaum 2023-03-19 17:18:09 -04:00
parent 5c6075c29d
commit bfb2519aed

View File

@ -19,24 +19,6 @@ def vtranspose{x & tuplen{x}==8 & type{tupsel{0,x}}==[8]i32 & hasarch{'X86_64'}}
fn transpose_rec{T}(rpo:*T, xpo:*T, w:u64, h:u64, wm:i64, hm:i64, scl:u64) : void = {
if (wm<=0 or hm<=0) return{}
if (scl==1) {
assert{T==u32}
def VT = [8]i32
def xvs = each{{i}=>load{*VT~~(xpo+i*w), 0}, iota{vcount{VT}}}
def rvs = vtranspose{xvs}
each{{i,v}=>store{*VT~~(rpo+i*h), 0, v}, iota{vcount{VT}}, rvs}
} else {
o:= (scl+1)>>1; s:= i64~~o
transpose_rec{T}(rpo , xpo , w, h, wm , hm , o)
transpose_rec{T}(rpo + o*8, xpo + o*8*w , w, h, wm , hm-s, o)
transpose_rec{T}(rpo + o*8*h , xpo + o*8, w, h, wm-s, hm , o)
transpose_rec{T}(rpo + o*8*h + o*8, xpo + o*8*w + o*8, w, h, wm-s, hm-s, o)
}
}
fn transpose{T}(r0:*void, x0:*void, w:u64, h:u64) : void = {
rp:*T = *T~~r0
xp:*T = *T~~x0
@ -52,12 +34,8 @@ fn transpose{T}(r0:*void, x0:*void, w:u64, h:u64) : void = {
}
}
# wm:= w/8
# hm:= h/8
# transpose_rec{T}(rp, xp, w, h, i64~~wm, i64~~hm, tern{wm>hm, wm, hm})
if (w%8) emit{void, 'base_transpose_u32', rp+h*(w-w%8), xp+ (w-w%8), w%8, h, w, h}
if (h%8) emit{void, 'base_transpose_u32', rp+ (h-h%8), xp+w*(h-h%8), w-w%8, h%8, w, h}
}
export{'simd_transpose_i32', transpose{u32}}
export{'simd_transpose_i32', transpose{u32}}