Menu

Why is openmp support restricted to separated channels?

2015-07-03
2015-08-20
  • Jonathan Bokelman

    The topic title is the question.

    De-interleaving and re-interleaving consumes many of the CPU cycles saved by multithreading.

     
  • robs

    robs - 2015-08-20

    openmp support is not restricted to separated channels; for example:

    $ sox -n i.f32 synth 10: sin 0:24k sin 24k:0 gain -1
    $ time ./3-options-input-fn 48000 44100 2 < i.f32 > o.f32
    ./3-options-input-fn no error; 0 clips; I/O: no error

    real 0m3.360s
    user 0m5.443s
    sys 0m0.567s

    Here, sox was used to generate 2-channel, interleaved input data, then a soxr example programme was used to resample the data: the displayed 'user' time is significantly greater than the 'real' time, which indicates that multiple threads were used in the conversion.

    However, soxr currently always works internally with separated channels (i.e. regardless of whether openmp is in use).

     

Log in to post a comment.