vec[0] /= 2.0
print("transform2-inv pre-itersum", vec)
- #vec = halfrev2(vec, True)
vec = [vec[ri[i]] for i in range(n)]
+ vec = halfrev2(vec, True)
#print("transform2-inv post-itersum-reorder", vec)
# first the outer butterfly (iterative sum thing)
jr.reverse()
print ("itersum jr", i+halfsize, i+size, jr)
for jh in jr:
- x = vec[ri[jh]]
- y = vec[ri[jh+size]]
- vec[ri[jh+size]] = x + y
+ x = vec[ji[ri[jh]]]
+ y = vec[ji[ri[jh+size]]]
+ vec[ji[ri[jh+size]]] = x + y
print (" itersum", size, i, jh, jh+size,
x, y, "jh+sz", vec[ji[jh+size]])
size *= 2
# and pretend we LDed data in half-swapped *and* bit-reversed order as well
# TODO: merge these two
- vec = halfrev2(vec, True)
+ #vec = halfrev2(vec, True)
ri = list(range(n))
print("transform2-inv post-reorder", vec)