Cache based matrix transpose