cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

Highlighted
Journeyman III
Journeyman III

stream write: type conversion

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

 

 

0 Kudos
Reply