[Home] Type Microsoft.FSharp.NativeInterop.NativeArray2


This type wraps a pointer to a blob of unmanaged memory assumed to contain a C-style row major two-dimensional matrix of items compatible with the (presumably blittable) type 'a. The blob of memory must be allocated and managed externally, e.g. by a computation routine written in C. All operations on this type are marked inlined because the code used to implement the operations is not verifiable. Any code that uses these operations will be unverifiable and may cause memory corruption if not used with extreme care.

Full Type Signature

type NativeArray2<'a>
  with
    static member FromPtr : 'a nativeptr * nrows:int * ncols:int -> NativeArray2<'a>
    [<UnverifiableAttribute ()>]
    member Item : int * int -> 'a with get
    member NativeTranspose : FortranMatrix<'a>
    member NumCols : int
    member NumRows : int
    member Ptr : 'a nativeptr
    [<UnverifiableAttribute ()>]
    member Item : int * int -> 'a with set
  end

Instance Members

MemberDescription
[<UnverifiableAttribute ()>]
member Item : int * int -> 'a with get
WARNING: use of this function may lead to unverifiable or invalid code
[<UnverifiableAttribute ()>]
member Item : int * int -> 'a with set
WARNING: use of this function may lead to unverifiable or invalid code
member NativeTranspose : FortranMatrix<'a>
View a CMatrix as a FortranMatrix. Doesn't actually allocate a new matirx - just gives a different label to the same bits, and swaps the row/column count information associated with the bits.
member NumCols : int
Number of columns of the native array
member NumRows : int
Number of rows of the native array
member Ptr : 'a nativeptr
Pointer to the C-style row major two-dimensional array

Static Members

MemberDescription
member FromPtr : 'a nativeptr * nrows:int * ncols:int -> NativeArray2<'a>
Creates a C-style row major two-dimensional array from a native pointer, the number of rows and the number of columns. Nothing is actually copied.

See Also

Microsoft.FSharp.NativeInterop


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19