[Cs-dev] table opcodes also for non-power-of-two tables?
Date | 2010-07-26 12:05 |
From | joachim heintz |
Subject | [Cs-dev] table opcodes also for non-power-of-two tables? |
does anyone know, or can see from the code, whether the table and table(i)w opcodes can be used also for non powof2 table sizes? i am a bit confused because it seems to work (i just made a test) but i am not sure if this is pure hazard. thanks - joachim ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-26 16:34 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] table opcodes also for non-power-of-two tables? |
table(i)w uses masking for wrapping and so is power-of-two only table on the otherhabd seems to allow any size " /* Previously this code limited the upper range of the indx to * the table length - for instance 8. Then the result was ANDed * with a mask (for instance 7). * * This meant that when the input index was 8 or above, it got * reduced to 0. What we want is for it to stick at the index * which reads the last value from the table - in this example * from location 7. * * So instead of limiting to the table length, we limit to * (table length - 1). */ " ==John ff > does anyone know, or can see from the code, whether the table and > table(i)w opcodes can be used also for non powof2 table sizes? > i am a bit confused because it seems to work (i just made a test) but > i am not sure if this is pure hazard. > > thanks - > > joachim ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-26 17:27 |
From | joachim heintz |
Subject | Re: [Cs-dev] table opcodes also for non-power-of-two tables? |
thanks! joachim Am 26.07.2010 um 17:34 schrieb jpff@cs.bath.ac.uk: > > table(i)w uses masking for wrapping and so is power-of-two only > > table on the otherhabd seems to allow any size > > " /* Previously this code limited the upper range of the indx to > * the table length - for instance 8. Then the result was ANDed > * with a mask (for instance 7). > * > * This meant that when the input index was 8 or above, it got > * reduced to 0. What we want is for it to stick at the index > * which reads the last value from the table - in this example > * from location 7. > * > * So instead of limiting to the table length, we limit to > * (table length - 1). */ > " > > ==John ff >> does anyone know, or can see from the code, whether the table and >> table(i)w opcodes can be used also for non powof2 table sizes? >> i am a bit confused because it seems to work (i just made a test) but >> i am not sure if this is pure hazard. >> >> thanks - >> >> joachim > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |