The steps are the followings
Remark: As the whole code will be parsed, it is better to provide the routine in full (don't worry about its content, as everything is done on the fly and I don't save or gather anything!). Do not hesitate to contact me for any question or remark.
- copy and paste your code within the text area above
- select the loop partitioning mode (block or cyclic), this will determine how loop are split and distributed among threads
- specify each block of code you want to "thread" by using the following tags before and after it
shared_var:type_of_var is the name of a shared variable, followed by its type. Note that the type is optional as this script will try to get it from the code (just write shared_var in case you want to omit the type). If there is no shared variable, then write /*START_MAKE_THREAD()*/. In any case, this should be written just before the body of the concerned code block. If the concerned code block is a loop, then it will be parallelized automatically, assuming there is no dependencies (for the moment!).
- click one "GENERATE" to get the result the multithread version of your program.