Class TensorCachingAllocator
Inheritance
TensorCachingAllocator
Syntax
public class TensorCachingAllocator : ITensorAllocator, IDisposable
Constructors
TensorCachingAllocator()
Declaration
public TensorCachingAllocator()
Properties
busyBytes
Declaration
public long busyBytes { get; }
Property Value
freeBytes
Declaration
public long freeBytes { get; }
Property Value
totalBytes
Declaration
public long totalBytes { get; }
Property Value
Methods
AddRef(ITensorData)
Declaration
protected void AddRef(ITensorData buffer)
Parameters
AdoptFreeBuffer(ITensorData)
Declaration
protected void AdoptFreeBuffer(ITensorData buffer)
Parameters
Alloc(TensorShape)
Declaration
public virtual Tensor Alloc(TensorShape shape)
Parameters
Returns
Implements
Alloc(TensorShape, ITensorData)
Declaration
public virtual Tensor Alloc(TensorShape shape, ITensorData buffer)
Parameters
Returns
Implements
Cast(Tensor, ITensorData, ITensorData)
Declaration
public virtual void Cast(Tensor tensor, ITensorData newBuffer, ITensorData oldBuffer)
Parameters
Implements
DecRef(ITensorData, Action<ITensorData>)
Declaration
protected void DecRef(ITensorData buffer, Action<ITensorData> onLastRef = null)
Parameters
Dispose()
Declaration
public virtual void Dispose()
DisposeAllocatedBuffer(ITensorData)
Declaration
protected void DisposeAllocatedBuffer(ITensorData buffer)
Parameters
Finalize()
Declaration
protected void Finalize()
GetAllocationMaxCount(Tensor)
Declaration
protected static int GetAllocationMaxCount(Tensor tensor)
Parameters
Type |
Name |
Description |
Tensor |
tensor |
|
Returns
Release(Tensor, Boolean)
Declaration
public virtual void Release(Tensor tensor, bool calledFromTensorDispose)
Parameters
Type |
Name |
Description |
Tensor |
tensor |
|
Boolean |
calledFromTensorDispose |
|
Implements
Repin(Tensor, ITensorData, ITensorData, Boolean)
Declaration
public virtual void Repin(Tensor tensor, ITensorData newBuffer, ITensorData oldBuffer, bool disposeUnpinnedHint)
Parameters
Implements
Reset(Boolean)
Declaration
public virtual void Reset(bool keepCachedMemory)
Parameters
Type |
Name |
Description |
Boolean |
keepCachedMemory |
|
Implements
ToString()
Declaration
public override string ToString()
Returns
Overrides
WaiveOwnership(Tensor)
Declaration
public virtual void WaiveOwnership(Tensor tensor)
Parameters
Type |
Name |
Description |
Tensor |
tensor |
|
Implements