mcframework.simulation.MonteCarloSimulation.supports_batch#

simulation.MonteCarloSimulation.supports_batch#

Whether this simulation supports batch GPU execution.

Subclasses that implement torch_batch() or cupy_batch() should set this to True either as a class attribute or by setting self.supports_batch = True.

Returns:
bool

True if the simulation supports vectorized Torch execution.

Examples

>>> class MySim(MonteCarloSimulation):
...     supports_batch = True  # Class-level override
...     def torch_batch(self, n, *, device, generator):
...         ...