Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11011

HE lost implicit conversions on vector with scalar operators

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed
    • Medium
    • Resolution: Fixed
    • Code Generation Tools
    • CODEGEN-10249
    • C7000_3.0.0.STS
    • C7000_3.1.0.LTS*
    • default
    • Use an explicit cast on the scalar operand to the vector element type.

    Description

      Vector operators in which one operand is a scalar may not apply implicit conversions to the scalar operand in host emulation. For example, the following will result in a compilation error due to failing template argument deduction in host emulation:

      uint8_t op2;
      int16 foo(int * op1, int ch)

      { return ((int16)op1[ch]) * op2; }

      Workaround:
      If the scalar operand is explicitly cast to the element type of the vector, no compilation error will occur in host emulation:

      uint8_t op2;
      int16 foo(int * op1, int ch)

      { return ((int16)op1[ch]) * (int32_t) op2; }

      Attachments

        Activity

          People

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: