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.

I need single precision multiplication intrinsic for C6678



Hi,

The intrinsic _complex_mpysp applies to double precision data and generates double precision data. It is a little strange to me, because most asm instruction on single precision operand with SP postfix.

In C66x Floating-Point and Vector/Matrix Operations and Optimizations, it points to:

See the C66x CPU and ISA Reference Guide [2] for other intrinsics in this category.

for intrinsics. But I cannot find even one intrinsic in that document.

More specific, I need single precision intrinsic for multiplication

I have tried:

temp1 = _cmpysp(A_det_real, A_det_imag);

It gives a function declared implicitly warning.

. Anyone can tell me where I can find that? Or, you can tell me what that intrinsic is.

 

Thanks.

  • Here is another relevant question.

    When I tried double precision intrinsic _complex_mpysp, it has no problem on compiling. But, when I insert _fod(), such as:

    temp1 = _fod(A_det_real, A_det_imag);

    according to C66x CPU and ISA Reference Guide , it also gives warning: a function declared implicitly warning. How to use _fod()? Thanks.

     

     

  • Robert,

    The _cmpysp intrinsic is documented in the C6000 Compiler Users Guide as supported for C6600. Are you sure you are compiling the file with -mv6600 option?

    I didn't see the _fod intrinsic documented in this Users Guide. Where did you see it documented?

  • Hi,

    The compiler has the option of -mv6600. This, and other variable definition, _cmpysp() and the link error all can be seen from the below picture.

    What is reason for the link error on my CCS v5?

    Thanks.

  • I am not clear about the rts library settings. I also have tried rts6600_elf.lib in the "Properties for matrix_inv0/General", it doesn't work either instead of "<automatic>". What is the relationship between rts6600_elf.lib and -mv6600?

    Regards,

  • _fod, which is from below text of Page 14, "Optimizing Loops on the C66x DSP", is a typo?

    I find _ftod in "DSPF_sp_autocor.h", which can pass compiling in my project.

    /* Store the result */
    _amemd8((void*)&r[i]) = _ftod(_hif(sum2)+_lof(sum2), _hif(sum1)+_lof(sum1));
    _amemd8((void*)&r[i+2]) = _ftod(_hif(sum4)+_lof(sum4), _hif(sum3)+_lof(sum3));

    Please confirm this for me.

    ..............

     "Optimizing Loops on the C66x DSP"

    3.1.6.2 Form a Register Pair and Extract a Value From a Register Pair
    If the complex number is stored in a register pair in the way defined previously,
    _hif(src) can be used to get the real part of the complex value, and _lof(src) can be used
    to get the imaginary part. This is similar to _hill(src) and _loll(src) intrinsics in the
    C64x+.
    To form a register pair from 2 floating point numbers, _fod(src1, scr2) is needed. If this
    intrinsics is used to form a complex number, _fod(real, imag) must be done. This is
    similar to _itoll(srcq, src2) intrinsic in C64x+.
    See the C66x CPU and ISA Reference Guide [2] for other intrinsics in this category.

  • Robert W said:

    The compiler has the option of -mv6600. This, and other variable definition, _cmpysp() and the link error all can be seen from the below picture.

    The _cmpysp intrinsic takes two __float2_t types as input and returns a __x128_t type. For this to work please include c6x.h to your source file and make sure the return type is __x128_t (this type is documented in section 7.5.6 of the Compiler Users Guide).

  • Robert W said:
    _fod, which is from below text of Page 14, "Optimizing Loops on the C66x DSP", is a typo?

    Yes, that's a typo.  They meant _ftod.  

    On a related note ... Because of the issue described in this wiki article, the intrinsic _ftof2 should be used instead of _ftod.  This change is slowly being made in TI supplied code.

    Thanks and regards,

    -George