changing from float* to std::vector<float> to solve numerical problem.
float*
std::vector<float>
tagging @tstreble @gdigrego @fcurcio @alwang