I am trying to use the function dspr in Openblas with Rcpp. the purpose of dspr is:
A := alpha*x*x**T + A
In my case, firstly I define A
as a matrix with all the elements are 0, alpha=1, x=(1,3)
, so, the final matrix A should be {(1,3),(3,9)}
, but I never get the right result, I set the parameters as follow:
cblas_dspr(CblasColMajor,CblasUpper,2, 1, &(x[0]),1, &(A[0]));
Can anyone tell me how to set the right parameters of dspr? Thanks.