Converting a pointer C# type to F#??
- by Brendon
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??