Add widening rules for scalar to complex or complex vector types

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: Medium

      For C++ code similar to ...

      #include <complex>
      
      void fxn()
      {
          std::complex<float> scf1, scf2;  // scf: standard complex float
          cfloat bcf1, bcf2;               // bcf: built-in complex float
          float f1;
      
          scf1 = scf2 * f1;
          // scf1.real = scf2.real * f1; scf1.imag = scf2.imag * f1;
          bcf1 = bcf2 * f1;
          // error: Cannot auto-widen "float" into "cfloat"
      }
      

      The first multiply operation works as shown in the pseudocode in the comment.  The second multiply operation gets the error diagnostic shown in the comment.

      The user request is to change the meaning of the multiply operator * for the types cfloat and float so that it matches the behavior of the multiply operator * for the types std::complex<float> and float. And so on for all the other operations between float and cfloat.

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-4826 - Add widening rules for scalar to co...
                SYNCHRONIZED
                • Last Sync Date: