Table of Contents

Class ComputePool

Namespace
Balsam.Optimization
Assembly
Balsam.Backtester.dll

Provides a pool of computing resources for strategy simulation.

public class ComputePool : IComputePool, IEnumerable<ComputeNode>, IEnumerable, IDisposable
Inheritance
ComputePool
Implements
Inherited Members
Extension Methods

Properties

Count

Gets the number of available compute nodes.

public int Count { get; }

Property Value

int

Local

Gets a compute pool with a single local compute node (thread).

public static ComputePool Local { get; }

Property Value

ComputePool

Methods

Add(ComputeNode)

Adds the specified compute node to the pool.

public void Add(ComputeNode node)

Parameters

node ComputeNode

Create(int)

Creates a compute pool comprised of the specified number of local compute nodes (threads).

public static ComputePool Create(int instances)

Parameters

instances int

Returns

ComputePool

Create(Type, int, params object[])

Creates and adds multiple instances to the compute pool.

public static ComputePool Create(Type type, int instances, params object[] arguments)

Parameters

type Type
instances int
arguments object[]

Returns

ComputePool

Dispose()

Releases resources.

public void Dispose()

Dispose(bool)

Releases resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Get()

Gets the next available compute node.

public ComputeNode Get()

Returns

ComputeNode

GetEnumerator()

Returns an enumerator to iterate through the collection.

public IEnumerator<ComputeNode> GetEnumerator()

Returns

IEnumerator<ComputeNode>

GetStatus()

Prints the status of the pool nodes.

public void GetStatus()

Initialize()

Initializes the compute pool for use, setting the maximum number of concurrent nodes based on the current count.

public void Initialize()

Release(ComputeNode)

Returns the specified compute node back to the pool for reuse.

public void Release(ComputeNode node)

Parameters

node ComputeNode

ToString()

Returns a string representation of this object.

public override string ToString()

Returns

string