Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Parallel2017#1

Closed
anton-malakhov wants to merge 7 commits intomasterfrom
parallel2017
Closed

Parallel2017#1
anton-malakhov wants to merge 7 commits intomasterfrom
parallel2017

Conversation

@anton-malakhov
Copy link
Copy Markdown
Contributor

Code review for @fschlimb

@anton-malakhov
Copy link
Copy Markdown
Contributor Author

From a glance, this code is not compatible with few design principles we tried to follow with the SC version. To name a few:

  • files bs_erf_*.py are supposed to runnable (see run.sh) and clearly diffable (for the sake of live demo)
  • names are not consistent, in particular "framework" files like bs_erf_apply.py defines black_scholes which is rather property of the compute kernel, not "launcher"
  • global?!
  • while I like modular approach to different parallel engines, it asks for better integration with the main driver, probably specifying "run" method by argument keys (see composability benches as an example)
  • it introduces some new usage principles which are not obvious to me at this moment. But what's obvious already is that they are incompatible with existing code introducing fragmentation of approaches and usage model.
    Apparently, existing structure of the benchmark was not ready for introduction of many "run approaches", so, it needs clean design approach to be established in order to keep everything uniformly organized, easy to use, easy to read, simply diffable, modular for avoiding side-effects from one component to another..

T = t [i]
P = float(price[i])
S = strike[i]
T = t[i]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces here were on purpose to make it look pretty in WinMerge reports comparing implementations

if repeat < 1:
repeat = 1
##############################################

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's changed here? EOLs?



def bs(nopt, rate, vol):
mr = -rate
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need new implementation here?

sig_sig_two = vol * vol * 2
def black_scholes(nopt, price, strike, t, rate, vol):
mr = -rate
sig_sig_two = vol * vol * 2
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all spaces were on purpose for the diff

@xaleryb xaleryb closed this Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants