<kiyosi/pricing/settings/monte_carlo.hpp>
#include <kiyosi/pricing/settings/monte_carlo.hpp>MonteCarloBackend
enum class MonteCarloBackendExecution backends supported by Monte Carlo engines. CUDA operations use the calling thread's current device and leave it unchanged. Each call owns a nonblocking stream and waits only for its own work, including cleanup. The device and runtime must support CUDA stream-ordered memory allocation.
枚举值
cpu— Host CPU implementation.cuda— CUDA implementation, when built and available.
kiyosi::MonteCarloSettings
struct kiyosi::MonteCarloSettingsCPU calls own their parallel work and complete synchronously. Concurrent calls on distinct engines or const calls on a shared engine are safe without concurrent mutation. Thread caps apply per call, not process-wide. Fixed seeds reproduce results across thread counts within a library version, build and standard-library implementation; CUDA is a separate backend. Allocation and internal runtime exceptions propagate; no cancellation interface is provided. Vanilla simulation settings, validated when creating an engine; an absent seed draws from the system entropy source. Vanilla engines accept 1..10,000,000 paths and 2..10,000 steps; American pricing before expiry requires at least 3 steps. European pricing samples the exact terminal distribution without intermediate steps.
成员
path_count
int kiyosi::MonteCarloSettings::path_countNumber of simulated paths; 1..10,000,000.
step_count
int kiyosi::MonteCarloSettings::step_countAmerican grid points; 2..10,000 (American: >= 3); validated but unused for European pricing.
seed
std::optional<std::uint64_t> kiyosi::MonteCarloSettings::seedDeterministic seed, or system entropy when absent.
backend
MonteCarloBackend kiyosi::MonteCarloSettings::backendExecution backend.
thread_count
int kiyosi::MonteCarloSettings::thread_countCPU concurrency cap: 0 automatic, 1 serial; CUDA requires 0.
kiyosi::TradingDayMonteCarloSettings
struct kiyosi::TradingDayMonteCarloSettingsAccumulator and autocallable products step the trading calendar directly, so no step count is needed; settings are validated when creating an engine. These engines accept 1..10,000,000 paths. CPU paths use separate PCG32 streams, so early knock-out cannot shift later paths' draws. Seeded prices are reproducible within a library version, standard-library implementation and backend.
成员
path_count
int kiyosi::TradingDayMonteCarloSettings::path_countNumber of simulated paths; 1..10,000,000.
seed
std::optional<std::uint64_t> kiyosi::TradingDayMonteCarloSettings::seedDeterministic seed, or system entropy when absent.
backend
MonteCarloBackend kiyosi::TradingDayMonteCarloSettings::backendExecution backend.
thread_count
int kiyosi::TradingDayMonteCarloSettings::thread_countCPU concurrency cap: 0 automatic, 1 serial; CUDA requires 0.