Class MemoryMappedSpan<T>
- Namespace
- DotCompute.Memory
- Assembly
- DotCompute.Memory.dll
Represents a memory-mapped span for zero-copy file access.
public sealed class MemoryMappedSpan<T> : IDisposable where T : unmanaged
Type Parameters
TElement type.
- Inheritance
-
MemoryMappedSpan<T>
- Implements
- Inherited Members
- Extension Methods
Properties
Length
Gets the length of the memory-mapped span in elements.
public long Length { get; }
Property Value
Methods
AsReadOnlySpan()
Gets a read-only span view of the memory-mapped data.
public ReadOnlySpan<T> AsReadOnlySpan()
Returns
- ReadOnlySpan<T>
Read-only span representing the memory-mapped data.
AsSpan()
Gets a span view of the memory-mapped data.
public Span<T> AsSpan()
Returns
- Span<T>
Span representing the memory-mapped data.
AsSpan(long, int)
Gets a slice of the memory-mapped data.
public Span<T> AsSpan(long offset, int length)
Parameters
Returns
- Span<T>
Sliced span.
Dispose()
Performs dispose.
public void Dispose()