Converting a pointer C# type to F#??

Posted by Brendon on Stack Overflow See other posts from Stack Overflow or by Brendon
Published on 2010-06-05T16:27:33Z Indexed on 2010/06/05 16:32 UTC
Read the original article Hit count: 199

Filed under:

Hello all

I am just a beginner in programing i wish covert some code from C# to F#,

I have encotered this code: "float[] v1=new float[10]"

I need to use this pointer to pass to the function:

"ComputeBuffer bufV1 = new ComputeBuffer(Context, ComputeMemoryFlags.ReadWrite | ComputeMemoryFlags.UseHostPointer, v1);"

If i creat an array in F# like this: "let v1 = [| 1.0..10.0 |]"

and call now the funaction like this:

"let bufV1 = new ComputeBuffer(Context, ComputeMemoryFlags.ReadWrite ||| ComputeMemoryFlags.UseHostPointer, v1)"

Is it an error?? How do i pass a pointer??

© Stack Overflow or respective owner

Related posts about F#