DSPRelated.com
Forums

Complex array Multiplications

Started by new_student February 1, 2008
Hello every one

I am using Microsoft Visual C++6.0 and i needed to multiply a complex data
matrix with complex data vectors. Main problem is large computation time
involved in these multiplications (Currently i am treating both real and
imaginary parts separately). Kindly tell me is there any library in MS
VC++6 for complex numbers ?, since i could not find it in my MSVC
package.And can I download it free from internet?

Is there any other scheme to reduce computational time of complex no's
multiplications and additions?any suggestions?

                                    THANKS in advance


On 1 Feb, 09:38, "new_student" <asimbhatti...@hotmail.com> wrote:
> Hello every one > > I am using Microsoft Visual C++6.0 and i needed to multiply a complex data > matrix with complex data vectors. Main problem is large computation time > involved in these multiplications (Currently i am treating both real and > imaginary parts separately). Kindly tell me is there any library in MS > VC++6 for complex numbers ?, since i could not find it in my MSVC > package.And can I download it free from internet?
These days the C++ standard specifies a library for complex numbers in the <complex> header. I don't know if VC++ 6.0 was released too early to contain this standard header. Rune
Hi,

new_student schrieb:
> I am using Microsoft Visual C++6.0 and i needed to multiply a complex data > matrix with complex data vectors. Main problem is large computation time > involved in these multiplications (Currently i am treating both real and > imaginary parts separately). Kindly tell me is there any library in MS > VC++6 for complex numbers ?, since i could not find it in my MSVC > package.And can I download it free from internet? > > Is there any other scheme to reduce computational time of complex no's > multiplications and additions?any suggestions?
the standard libraries like complex.h won't help you. What you need is a high performance SIMD implementation. The core has to be coded in x86 assembler. There are libraries around, but they usually address a specific topic like FFT or 3D computations. So you have to decide what matches your needs. Marcel
On Feb 1, 3:38 am, "new_student" <asimbhatti...@hotmail.com> wrote:
> Hello every one > > I am using Microsoft Visual C++6.0 and i needed to multiply a complex data > matrix with complex data vectors. Main problem is large computation time > involved in these multiplications (Currently i am treating both real and > imaginary parts separately). Kindly tell me is there any library in MS > VC++6 for complex numbers ?, since i could not find it in my MSVC > package.And can I download it free from internet? > > Is there any other scheme to reduce computational time of complex no's > multiplications and additions?any suggestions? > > THANKS in advance
Marcel is right; if you want the best performance, you'll need to use SIMD instructions. Depending upon the CPU core that you have available, the various SSE instruction sets can give you the ability to do vectorized complex multiplications much faster. Here's an appnote from Intel with details on using complex arithmetic with SSE3: http://softwarecommunity.intel.com/articles/eng/3426.htm It's not too hard to translate the assembly code shown in the article to plain "C" using compiler-provided intrinsics. You'll want to look for xmmintrin.h, emmintrin.h, and pmmintrin.h for information on those. Jason