https://medium.com/@monocosmo77/using-butterfly-factorization-for-machine-learning-purpose-part1-3dcb9a8b8a0b