Given a real dTheta, I want to create a largish complex linear array of the form z
People must need this for signal processing all the time. Anyhow, I need to do it again and again with different values of dTheta.
Anybody could do this:
Efficiency is the issue here. The symmetry of my problem is much greater than that of the above solution. I assert that it is possible to speed up the above recipe by a large factor in normal coding. Is this also possible using SSE type parallelism via the MKL?
The dTheta is related PI or freqency?
Both IPP or MKL Vector Math Function may help you complete the task. for example.
The functions described below generate a tone (or “sinusoid”) of a given frequency, phase, and magnitude. Tones are fundamental building blocks for analog signals. Thus, sampled tones are extremely useful in signal processing systems as test signals and as building blocks for more complex signals.
The use of tone functions is preferable against the analogous C math library's sin() function for many applications, because Intel IPP functions can use information retained from the computation of the previous sample to compute the next sample much faster than standard sin() or cos().
This function generates the tone with the specified frequency rFreq, phase pPhase, and magnitude magn. The function computes len samples of the tone, and stores them in the array pDst. For real tones, each generated value x[n] is defined as:
x[n] = magn * cos(2πn*rFreq + phase)
For complex tones, x[n] is defined as:
x[n] = magn * (cos(2πn*rFreq + phase)+j* sin(2πn*rFreq + phase))
The parameter hint suggests using specific code, which provides for either fast but less accurate calculation, or more accurate but slower execution.
or MKL function
vsSinCos( n, a, y, z );
Computes sine and cosine of vector elements.
Pointers to arrays that contain the output vectors y (for sinevalues) and z(for cosine values).