[macstl-dev] Questions on valarray use

Stéphane Letz letz at grame.fr
Tue Sep 20 17:31:37 WST 2005

  • Previous message: [macstl-dev] [ANN] macstl 0.3.1 -- Extensively re-optimized, runs 450x faster than G4 scalar code
  • Next message: [macstl-dev] Questions on valarray use
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]


Hi,

I'm trying to use macstl to optimize audio mixing code, something  
like the following function:

void
mix_buffers_with_gain (float*dst, float*src, int nframes, float gain)
{
     stdext::valarray <float> vf1 (src, nframes);
     stdext::valarray <float> vf2 (dst, nframes);
     vf2 += vf1 * gain;
}

But it seems that dst and src buffers content is actually copied in  
vst1 and vst2.
It is possible to use valarray with buffers already allocated so that  
to do the computation on these arrays?

Thanks

Regards

Stephane Letz



  • Previous message: [macstl-dev] [ANN] macstl 0.3.1 -- Extensively re-optimized, runs 450x faster than G4 scalar code
  • Next message: [macstl-dev] Questions on valarray use
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the macstl-dev mailing list