Struct OpenCLMemoryPoolManager.PooledBufferHandle
- Namespace
- DotCompute.Backends.OpenCL.Memory
- Assembly
- DotCompute.Backends.OpenCL.dll
RAII handle for pooled buffers with automatic return to pool on disposal.
[SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Closely related type, simpler API")]
public readonly struct OpenCLMemoryPoolManager.PooledBufferHandle : IAsyncDisposable, IEquatable<OpenCLMemoryPoolManager.PooledBufferHandle>
- Implements
- Inherited Members
Properties
Buffer
Gets the underlying OpenCL buffer.
public OpenCLMemoryPoolManager.OpenCLBuffer Buffer { get; }
Property Value
Methods
DisposeAsync()
Returns the buffer to the pool automatically.
public ValueTask DisposeAsync()
Returns
Equals(PooledBufferHandle)
Determines whether the specified handle is equal to the current handle.
public bool Equals(OpenCLMemoryPoolManager.PooledBufferHandle other)
Parameters
Returns
Equals(object?)
Determines whether the specified object is equal to the current handle.
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
Returns the hash code for this handle.
public override int GetHashCode()
Returns
Operators
operator ==(PooledBufferHandle, PooledBufferHandle)
Determines whether two handles are equal.
public static bool operator ==(OpenCLMemoryPoolManager.PooledBufferHandle left, OpenCLMemoryPoolManager.PooledBufferHandle right)
Parameters
Returns
operator !=(PooledBufferHandle, PooledBufferHandle)
Determines whether two handles are not equal.
public static bool operator !=(OpenCLMemoryPoolManager.PooledBufferHandle left, OpenCLMemoryPoolManager.PooledBufferHandle right)