Integrated the code from the blas repository