Content deleted Content added
m WP:CHECKWIKI error fixes using AWB (11964) |
|||
Line 14:
For example, consider a loop that on each iteration applies a hundred operations, runs for a thousand iterations. This can be thought of as a grid of 100 columns by 1000 rows, a total of 100,000 operations. Cyclic multi-threading assigns each row to a different thread. Pipelined multi-threading assigns each column to a different thread.
==Automatic parallelization technique==
===Scan===
This is the first stage where the scanner will read the input source files to identify all static and extern usages. Each line in the file will be checked against pre-defined patterns to segregate into [[token (parser)|token]]s. These tokens will be stored in a file which will be used later by the
grammar engine. The grammar engine will check patterns of tokens that match with pre-defined rules to identify variables, loops, controls
statements, functions etc. in the code.
===Analyze===
The [[analyzer]] is used to identify sections of code that can be executed concurrently. The analyzer uses the static data information provided by the scanner-parser.The analyzer will first find out all the functions that are totally independent of each other and mark them as
individual tasks. Then analyzer finds which tasks are having dependencies.
===Schedule===
The [[Scheduling (computing)|scheduler]] will lists all the tasks and their dependencies on each other in terms of execution and start times. The scheduler will produce optimal schedule in terms of number of processors to be used or the total time of execution for the application.
===Code Generation===
The [[Scheduling (computing)|scheduler]] will generate list of all the tasks and the details of the cores on which they will execute along with the time that they
will execute for. The code Generator will insert special constructs in the code that will be read during execution by the scheduler. These
constructs will instruct the scheduler on which core a particular task will execute along with the start and end times.
==Cyclic multi-threading==
|