Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
c8bfa5bd
Commit
c8bfa5bd
authored
11 months ago
by
Georgiana Mania
Browse files
Options
Downloads
Patches
Plain Diff
add slide 26
parent
88c6ceca
No related branches found
Branches containing commit
No related tags found
1 merge request
!72
Draft: Compute devices lecture
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lectures/parallelism/slides.qmd
+61
-2
61 additions, 2 deletions
lectures/parallelism/slides.qmd
with
61 additions
and
2 deletions
lectures/parallelism/slides.qmd
+
61
−
2
View file @
c8bfa5bd
...
...
@@ -217,8 +217,11 @@ Wikipedia
## Types of parallelism
* Data-level parallelism - what we've been discussing
* Task-level parallelism - Example: Atmosphere ocean coupling
* Data-level parallelism
* what we've been discussing
* Task-level parallelism
* Example: Atmosphere ocean coupling
## Precondition for parallel execution
...
...
@@ -331,6 +334,62 @@ d = c - b; // S2
```
:::
## Bernstein's parallelism conditions {.alignleft}
:::{.fragment .semi-fade-out}
```c++
c = a + b; // S1
d = a - b; // S2
```
:::
:::{.fragment}
Replace `a` with `c` in statement 2
```c++
c = a + b; // S1
d = c - b; // S2
```
:::
:::{.smaller}
:::: {.columns}
::: {.column width="50%"}
:::{.fragment}
Read and write sets for S1 and S2:
$$
R_1 = \{a,b\} ; W_1 = \{c\} \\
R_2 = \{c,b\} ; W_2 = \{d\} \\
$$
:::
:::
::: {.column width="50%"}
:::{.fragment}
Bernstein's conditions:
$$
R_1 \cap W_2 = \emptyset \\
W_1 \cap R_2 = \{c\} \\
W_1 \cap W_2 = \emptyset
$$
:::
:::
:::
::::
:::{.fragment}
S1 and S2 can NOT be executed in parallel!
:::
## Best practices
* Parallelisation should not change the results! Exceptions to be discussed next week!
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment