You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="https://github-images.s3.amazonaws.com/help/pull_requests/recently_pushed_branch.png"width="600px"alt="GitHub notification showing a recently pushed branch with a Compare and pull request button">
<imgsrc="https://github-images.s3.amazonaws.com/help/pull_requests/recently_pushed_branch.png"width="600px"alt="GitHub notification showing a recently pushed branch with a Compare and pull request button">
{style="width: 800px;" fig-alt="Diagram showing how Quarto works: a .qmd file is processed by knitr and Pandoc to produce HTML, PDF, or Word output"}
79
79
:::
80
80
81
81
Source: Quarto website https://quarto.org/docs/faq/rmarkdown.html
{fig-alt="Diagram of version-controlled project history showing branching and merging of revisions over time"}
94
94
<!-- <img src="https://upload.wikimedia.org/wikipedia/commons/a/af/Revision_controlled_project_visualization-2010-24-02.svg" alt="Diagram of version control" width="100%"> -->
95
95
:::
96
96
:::
@@ -166,7 +166,7 @@ In these cases, and no doubt others, a version control system should make your l
166
166
::: {.r-fit-text}
167
167
During this class (and perhaps, the entire program,) we will be using
<imgsrc="./fig/modular_collaboration.png"style="width:1000px;"alt="Diagram showing modular collaboration pattern in software development with top-level and lower-level function modules">
107
107
108
108
109
109
An example from an R package: [SeqSGPV](https://github.com/chipmanj/SeqSGPV/blob/master/R/SeqSGPV.R)
<imgsrc="datatable-syntax-paths.svg"width="700px"alt="Diagram illustrating data.table syntax: DT[i, j, by] where i filters rows, j selects or computes columns, and by groups results">
281
281
</div>
282
282
283
283
- Any time that you see **:=** in **j** that is "Assignment by reference." Using
@@ -349,7 +349,7 @@ address(dat_ldt$parent)
349
349
dat_ldt <- lazy_dt(dat, immutable = TRUE)
350
350
```
351
351
352
-
{width="800px"}
352
+
{width="800px" fig-alt="Diagram illustrating R object pointer behavior: showing memory address sharing and copying when modifying a data.table object"}
353
353
354
354
Question: What is the `immutable = FALSE` option used for?
Copy file name to clipboardExpand all lines: 06-rcpp/slides.qmd
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ slides_eval <- TRUE
29
29
## Before we start {style="font-size: 16pt"}
30
30
31
31
<divstyle="text-align: center; margin: auto;">
32
-
<ahref="https://imgflip.com/i/38ji3q"><imgsrc="https://i.imgflip.com/38ji3q.jpg"title="made at imgflip.com"width="30%"/></a>
33
-
<ahref="https://imgflip.com/i/38jiku"><imgsrc="https://i.imgflip.com/38jiku.jpg"title="made at imgflip.com"width="30%"/></a>
32
+
<ahref="https://imgflip.com/i/38ji3q"><imgsrc="https://i.imgflip.com/38ji3q.jpg"title="made at imgflip.com"alt="Meme: one does not simply avoid writing C++ when using Rcpp"width="30%"/></a>
33
+
<ahref="https://imgflip.com/i/38jiku"><imgsrc="https://i.imgflip.com/38jiku.jpg"title="made at imgflip.com"alt="Meme: Emergency broadcast - your R code will get a serious speed boost with Rcpp"width="30%"/></a>
34
34
</div>
35
35
36
36
1. You need to have Rcpp installed in your system:
{fig-align="center" fig-alt="Animated GIF of a bulldog teaching a baby to crawl"}
{width=450px fig-alt="Diagram showing serial computing: one core processes tasks one element at a time while other cores are idle"}
{width=450px fig-alt="Diagram showing parallel computing: four cores each process one element simultaneously with no idle cores"}
119
119
:::
120
120
:::
121
121
@@ -124,7 +124,7 @@ f_pll(1:4)
124
124
125
125
<textstyle="color:white;">Let's think before we start...</text>
{style="width:500px" fig-alt="Animated GIF illustrating a thinking or decision-making moment"}
128
128
129
129
<textstyle="color:white;">When is it a good idea to go HPC?</text>
130
130
@@ -320,7 +320,7 @@ And there's also a more advanced set of options
320
320
- Multiple types of cluster: `PSOCK`, `Fork`, `MPI`, etc.
321
321
:::
322
322
::: {.column width="50%"}
323
-

323
+
{fig-alt="Diagram showing the R parallel package architecture with clusters composed of local and remote R sessions"}
324
324
:::
325
325
:::
326
326
@@ -760,7 +760,7 @@ Using a Fork cluster instead of a PSOCK cluster can further reduce the overhead
760
760
761
761
## {style="text-align:center!important;"}
762
762
763
-
```{r thanks, out.width="300px", echo=FALSE}
763
+
```{r thanks, out.width="300px", echo=FALSE, fig.alt="Animated GIF of a runner celebrating a fast finish, representing speed gains from parallel computing"}
RcppArmadillo + OpenMP<br>=<br><imgsrc="https://media.giphy.com/media/WUq1cg9K7uzHa/giphy.gif"style="width:400px"alt="Animated GIF of a happy celebration, representing the power of combining RcppArmadillo with OpenMP">
79
79
</p>
80
80
81
81
* Friendlier than [**RcppParallel**](http://rcppcore.github.io/RcppParallel/)...
@@ -269,7 +269,7 @@ squeue -u$(id -u)
269
269
270
270
Once your job is submitted, the R script should generate a boxplot like the following:
271
271
272
-
<img src="openmp-exampl.png" style="width: 80%">
272
+
<img src="openmp-exampl.png" style="width: 80%" alt="Boxplot comparing execution times of serial versus parallel OpenMP implementations in R">
0 commit comments