0 Replies Latest reply on May 18, 2009 7:13 AM by hennequi

    stream write: type conversion

    hennequi
      How can we make "writing a float stream into a double array" possible?

      Hello,

      I am facing the following problem:

      - i have a float stream s

      - i have a double array d

      - i would like to directly write s into d, without having to create an intermediate float array. Ideally I am thinking of something like

      s.write(d,"pleaseConvertfromFloatToDouble")

      Are you aware of anything like that?

      FYI, the problem originates from my need to write OCaml bindings, and the native float type in OCaml is the C double.

      In fact, I am even using float4 streams... if I were using simple float streams, I could very well use directly double streams which would cancel the problem.

      Thanks for your suggestions

      Guillaume