Menu

problem with QAM constructor itpp-3.10.8

commguy
2007-01-22
2012-09-15
  • commguy

    commguy - 2007-01-22

    Hello,

    I am having trouble instantiating a QAM object. During runtime, I get the following message:

    *** Assertion failed in ../../itpp/base/vec.h on line 192:
    Negative size in Vec::Vec(int) (size>=0)
    Abort trap

    Here is my code snippet:

    include <itpp/comm/modulator.h>

    using namespace itpp;

    int main()
    {
    QAM q(2);
    return 0;
    }


    If I use the PAM constructor instead of QAM, there are no runtime issues.

    I am using Mac OS X 10.4

    Thanks in advance,

    Chinmoy.

     
    • Adam Piątyszek

      Adam Piątyszek - 2007-01-22

      Hi Chinmoy,

      The QAM modulator in IT++ supports only square constellations, i.e. M = 2^(2k), where k = 1,2,3,...,etc. If you want two-point constellation, please use BPSK or PSK class instead.

      BTW, you discovered a minor bug in the set_M() function: the assertion check is wrong there and does not detect that M = 2,8,32,...,etc. values are not supported. I will fix this issue in the SVN sources. The fix will be included in the next stable and development releases of IT++ (3.10.9 and 3.99.1 respectively).

      BR,
      /ediap

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.