On Sun, 12 Mar 2000, Paul Barton-Davis wrote:
> OK, so take the construction:
> 
>     if (variable) { 
>          output = some_opcode (arg1, arg2, arg3);
>     } else {
>          output = some_other_opcode (arg3);
>     }
> 

The SIMD (ie no conditional brances, as the "threads" are running
hardsynced, in parallel) way of doing it:

        _output1 = some_opcode (arg1, arg2, arg3);
        _output2 = some_other_opcode (arg3);
        output = _output1 * variable + _output1 * (1 - variable);

Obviously, this means that both opcodes are evaluated all the time...


//David


.- M u C o S --------------------------------. .- David Olofson ------.
|          A Free/Open Multimedia            | |     Audio Hacker     |
|      Plugin and Integration Standard       | |    Linux Advocate    |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. |        Singer        |
|  Rock Solid Low Latency Signal Processing  | |      Songwriter      |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'

Reply via email to