E
Eric Fortier
Hi all,
Last year I posted a message regarding templates use in blitter functions, but
the single answer I got didn't help.
My problem is that I was writing blitter functions which takes a "Flag"
argument which may radically change the behavior of a function. I have read
that the best way to handle this particular issue was with meta-programming
using templates, as can be read on this page:
http://www.gapidraw.com/gapidraw-features.php
(in the section about templates)
I must now continue that project and I am faced with that same old problem with
an even larger increase in complexity. The number of possible flags for the
main "BltFast()" function alone is around 10, meaning that I either bloat and
slow the inner loop with tons of if/then/else, or I find a new way to manage
the complexity.
I'm working for devices with a very limited CPU in term of speed, so every
cycle count. Are templates a way to solve my problem?
Any information would be welcome. I spent quite a bit of time investigating
this, but still have no idea how templates can help me in this case.
--Eric
Last year I posted a message regarding templates use in blitter functions, but
the single answer I got didn't help.
My problem is that I was writing blitter functions which takes a "Flag"
argument which may radically change the behavior of a function. I have read
that the best way to handle this particular issue was with meta-programming
using templates, as can be read on this page:
http://www.gapidraw.com/gapidraw-features.php
(in the section about templates)
I must now continue that project and I am faced with that same old problem with
an even larger increase in complexity. The number of possible flags for the
main "BltFast()" function alone is around 10, meaning that I either bloat and
slow the inner loop with tons of if/then/else, or I find a new way to manage
the complexity.
I'm working for devices with a very limited CPU in term of speed, so every
cycle count. Are templates a way to solve my problem?
Any information would be welcome. I spent quite a bit of time investigating
this, but still have no idea how templates can help me in this case.
--Eric