Added detection routine.  Uses BLAS.