Created
October 15, 2020 19:22
-
-
Save medigor/78faae5ebdb46113f6d63a56877af99e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nowarn "9" | |
open System | |
open Microsoft.FSharp.NativeInterop | |
let inline stackalloc<'a when 'a: unmanaged> size = | |
let p = NativePtr.stackalloc<'a> size |> NativePtr.toVoidPtr | |
Span<'a>(p, size) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment