diff --git a/lectures/parallelism/slides.qmd b/lectures/parallelism/slides.qmd index db508f77f4453ae37a57fed7c8cc8e0390b57591..37ce2006a29dcb0ab65a0526b3107a4987a6cc48 100644 --- a/lectures/parallelism/slides.qmd +++ b/lectures/parallelism/slides.qmd @@ -248,19 +248,23 @@ c = a + b; // flow dependence ::: :::{.fragment .fade-in fragment-index=3} -* Control dependence - the order of the execution is defined at runtime +* Control dependence - execution order decided at runtime ::: :::{.fragment .fade-in-then-semi-out fragment-index=4} ```c++ for (int i = 1; i < n ; i++) { - a[i] = (a[i-1] > a[i]) ? a[i] + 1 : 1; + if (a[i-1] > a[i]) { + a[i] = a[i] + 1; + } else { + a[i] = 0; + } } ``` ::: :::{.fragment .fade-in fragment-index=5} -* Resource dependence - the instructions share the same resource +* Resource dependence - share the same resource ::: :::{.fragment .fade-in-then-semi-out fragment-index=6}