def trans_I_4x4_3x3(Iw, I, minimal=False, trans=False):
    if minimal:

        T0 = np.empty((6,6))
        T1 = np.empty((6,6))

        for O, I in ((T0, I), (T1, T0.T)):

            # t0 = I[4,:] - I[2,:]*4.0
            # t1 = I[3,:] - I[1,:]*4.0
            # t2 = I[4,:] - I[2,:]
            # t3 = I[3,:] - I[1,:]

            # O[0,:] = I[0,:]*4.0 - I[2,:]*5.0 + I[4,:]
            # O[1,:] = t0 + t1
            # O[2,:] = t0 - t1
            # O[3,:] = t2 + t3*2.0
            # O[4,:] = t2 - t3*2.0
            # O[5,:] = I[1,:]*4.0 - I[3,:]*5.0 + I[5,:]

            t0 = (I[2,:]*4.0 - I[4,:])*rcp6
            t1 = (I[1,:]*4.0 - I[3,:])*rcp6
            t2 = (I[4,:] - I[2,:])*rcp24
            t3 = (I[3,:] - I[1,:])*rcp12

            O[0,:] = I[0,:] + (I[2,:]*-5.0 + I[4,:])*rcp4
            O[1,:] = t0 + t1
            O[2,:] = t0 - t1
            O[3,:] = t2 + t3
            O[4,:] = t2 - t3
            O[5,:] = I[1,:]*4.0 - I[3,:]*5.0 + I[5,:]

        Iw[:] = T1.T

    else:
        Iw[:] = np.dot( np.dot(I_4x4_3x3[trans[0]], I), I_4x4_3x3[trans[1]].T )
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/winograd4.py/trans_I_4x4_3x3/original