Yes, I believe that in QP version 4.x you should be able to modify
QEP_MAX_NEST_DEPTH_. Please note that you should not set it lower than 3. Also
note, that the QEP_MAX_NEST_DEPTH_ constant has impact on the stack usage, so
don't go overboard with it unnecessarily.
The QEP_MAX_NEST_DEPTH_ is not included in the PAL (qep_port.h) for historic
reasons, it seems. In the earlier versions 2.x of QP (published in the fist
edition of the PSiCC book), the "static transition optimization" was
dependent on the maximum nesting depth. In that older version simply
increasing QEP_MAX_NEST_DEPTH_ wouldn't work and would require some
algorithmic changes as well.
In the new version 4.x, the "static optimization" is no longer used,
so QEP_MAX_NEST_DEPTH_ probably should go into the PAL. However, I wanted to
keep the option open to re-introduce the "static transition
optimization" at some point, perhaps.
--Miro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Can I customize QEP_MAX_NEST_DEPTH_, which is, in qep_pkg.h, enum'ed to be
6? If I can, why does it not appear in qep_port.h?
Thanks a lot!
Yes, I believe that in QP version 4.x you should be able to modify
QEP_MAX_NEST_DEPTH_. Please note that you should not set it lower than 3. Also
note, that the QEP_MAX_NEST_DEPTH_ constant has impact on the stack usage, so
don't go overboard with it unnecessarily.
The QEP_MAX_NEST_DEPTH_ is not included in the PAL (qep_port.h) for historic
reasons, it seems. In the earlier versions 2.x of QP (published in the fist
edition of the PSiCC book), the "static transition optimization" was
dependent on the maximum nesting depth. In that older version simply
increasing QEP_MAX_NEST_DEPTH_ wouldn't work and would require some
algorithmic changes as well.
In the new version 4.x, the "static optimization" is no longer used,
so QEP_MAX_NEST_DEPTH_ probably should go into the PAL. However, I wanted to
keep the option open to re-introduce the "static transition
optimization" at some point, perhaps.
--Miro
Hello, Miro
That's the very authoritative and organic answer I appreciated. Thank you.
-- Ding