mcframework.simulation.MonteCarloSimulation.supports_batch#
- simulation.MonteCarloSimulation.supports_batch#
Whether this simulation supports batch GPU execution.
Subclasses that implement
torch_batch()orcupy_batch()should set this toTrueeither as a class attribute or by settingself.supports_batch = True.- Returns:
boolTrueif the simulation supports vectorized Torch execution.
Examples
>>> class MySim(MonteCarloSimulation): ... supports_batch = True # Class-level override ... def torch_batch(self, n, *, device, generator): ... ...