See https://github.com/epicf/ef/pull/18#discussion_r242719777 Replace with https://stackoverflow.com/questions/13443968/efficient-method-to-check-for-matrix-stability-in-cuda