Merge branch 'threading' into 'master'

Adds a threading option to the GMM algorithm

See merge request !22
3 jobs for master in 25 minutes and 40 seconds (queued for 2 seconds)