diff --git a/build/opt-pricer b/build/opt-pricer index 20f63a0..8507225 100755 Binary files a/build/opt-pricer and b/build/opt-pricer differ diff --git a/src/gbm_mc.c b/src/gbm_mc.c index 2e3df48..131fdac 100644 --- a/src/gbm_mc.c +++ b/src/gbm_mc.c @@ -101,6 +101,7 @@ void gbm(struct Option *opt) pthread_t *threads; struct Option *options; options = malloc(sizeof(struct Option) * NUM_THREADS); + opt->sims = opt->sims / NUM_THREADS; for(i=0; iexpiry_date; @@ -108,7 +109,6 @@ void gbm(struct Option *opt) } threads = malloc(sizeof(pthread_t) * NUM_THREADS); - opt->sims = opt->sims / NUM_THREADS; for(i=0; isims = 0; + for(i=0; ifv += result->fv / NUM_THREADS; opt->delta += result->delta / NUM_THREADS; @@ -130,4 +131,5 @@ void gbm(struct Option *opt) opt->rho += result->rho / NUM_THREADS; opt->sims += result->sims; } + }