Working serial and parallel implementations of lda.