I have an array of 3,000 floats:
float *mVec = new float; and I need to take the log of each element. I am translating MATLAB code, in which everything is vectorized (ie, log(mVec) does some parallelization behind the scenes).
There must be a better way to do this than a for loop. Any suggestions? Speed is important to me.