Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastiano Mandala committed Apr 1, 2023
1 parent 9a74e5c commit 114ce56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DataStructures/DualMemorySupport/ManagedStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void FastClear()
_realBuffer.Clear();
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Clear()
{
_realBuffer.Clear();
Expand All @@ -137,6 +138,7 @@ public void Clear()
get => ref _realBuffer[index];
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public MB<T> ToRealBuffer() { return _realBuffer; }

IBuffer<T> IBufferStrategy<T>.ToBuffer()
Expand Down
3 changes: 2 additions & 1 deletion DataStructures/DualMemorySupport/NativeStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ IBuffer<T> IBufferStrategy<T>.ToBuffer()

return (IBuffer<T>) _cachedReference.Target;
}


[MethodImpl(MethodImplOptions.AggressiveInlining)]
public NB<T> ToRealBuffer()
{
return _realBuffer;
Expand Down

0 comments on commit 114ce56

Please sign in to comment.