This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6000 compiler suppport for complex.h

A lot of the application code I write uses complex math types.  I can't seem to find any support for this among the TI DSPs.  The C6000 Compiler User's Guide says the C compiler is fully compatible with ISO standards yet it won't recognize types and functions declared in <complex.h>, an extension added by ISO in C99.  Does TI plan to support this in the near future?  I noticed the C67x DSP lib is somewhat compatible but doesn't support types declared as complex.  Nor is there support for standard functions such as cabs and csqrt.  Can anyone from TI address this?

  •  

    I am using a C6747 with double complex types.  Using C++ types and '#include <complex>'  Unfortunately I found the measured performance to be poor. I believe the compiler and optimizer do not make effective use of complex types.  The DSPLIB API's implement mat_mul_cplx using a simple array of floats where real components must be followed by imaginary components.

    My theory is that complex type structures do not allow the optimizer to use the built in 'index/auto increment' instruction for optimum array processing. Instead using pointer de-references for accessing real and imaginary components. Someone familiar with the compiler and assembly may be able to explain this better.

    We have reverted our code to non complex types, using simple 'C' code and array indexing to access real an imaginary components, consistent wit the DSPLIB's implementation of DSPF_sp_mat_mul_cplx.

     

    Michael Nolin