I'd like to convert hundreds ofmillions of data points as coordinates on screen, so I'll need to optimize the calculation. The formula is simple, for X coordinate transform:
dPointX = dLeft + (dXValue - xAxisMin) * dXFactor, where dXValue is a series point X value. dLeft, xAxisMin and dXFactor are the same for all items.
By using C#,
int iVectorLen = 500000;
double mklVector = new double[iVectorLen];
mklVector[i] = xSeriesPoints[i];
Then, I would like to do
AddToVectorValues(mklVector, iVectorLen, -xAxisMin);
AddToVectorValues(mklVector, iVectorLen, dLeft);
Now, I found dscalfunction, which works for MultiplyVectorValues purposejust fine. But, is there any function toapply the sum operation, for AddToVectorValues purpose? I really couldn't find one, and neither my more MKL-experienced associate.
ByimplementingAddToVectorValues with a for-loop, it will take about ten times more CPU time than a dscal function call.