Class PinnedMemoryOperations
- Namespace
- DotCompute.Memory
- Assembly
- DotCompute.Memory.dll
Pinned memory utilities for interop scenarios.
public static class PinnedMemoryOperations
- Inheritance
-
PinnedMemoryOperations
- Inherited Members
Methods
Pin<T>(ReadOnlySpan<T>)
Creates a pinned memory handle for a read-only span.
public static PinnedMemoryHandle<T> Pin<T>(this ReadOnlySpan<T> span) where T : unmanaged
Parameters
spanReadOnlySpan<T>Span to pin.
Returns
- PinnedMemoryHandle<T>
Pinned memory handle.
Type Parameters
TElement type.
Pin<T>(Span<T>)
Creates a pinned memory handle for a span.
public static PinnedMemoryHandle<T> Pin<T>(this Span<T> span) where T : unmanaged
Parameters
spanSpan<T>Span to pin.
Returns
- PinnedMemoryHandle<T>
Pinned memory handle.
Type Parameters
TElement type.