C# Class BEPUutilities2.ResourceManagement.BufferPool

Contains static helpers for use with buffer pools, avoiding unnecessary type parameters.
显示文件 Open project: RossNordby/scratchpad Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Drops all buffer references. Does not affect outstanding references. Not thread safe.

GetBufferCount ( int poolIndex ) : int

Gets the number of buffers for a pool index. Not thread safe.

GetPoolIndex ( int count ) : int

Gets the exponent associated with the buffer pool which would hold the given count of elements.

Method Details

Clear() public abstract method

Drops all buffer references. Does not affect outstanding references. Not thread safe.
public abstract Clear ( ) : void
return void

GetBufferCount() public abstract method

Gets the number of buffers for a pool index. Not thread safe.
public abstract GetBufferCount ( int poolIndex ) : int
poolIndex int Index of the pool to count.
return int

GetPoolIndex() public static method

Gets the exponent associated with the buffer pool which would hold the given count of elements.
public static GetPoolIndex ( int count ) : int
count int Element count to compute the batch index of.
return int