Skip to content

Commit f379532

Browse files
authored
fix typos and code
1 parent 4f711b1 commit f379532

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/stan-users-guide/parallelization.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ be used with multi-processing.
1616
The advantages of reduce with summation are:
1717

1818
1. More flexible argument interface, avoiding the packing and
19-
unpacking that is necessary with rectanguar map.
19+
unpacking that is necessary with rectangular map.
2020
2. Partitions data for parallelization automatically (this is done manually
21-
in rectanguar map).
21+
in rectangular map).
2222
3. Is easier to use.
2323

2424
The advantages of rectangular map are:
@@ -92,7 +92,7 @@ See details [below](#reduce-sum-grainsize).
9292

9393
For efficiency and convenience additional
9494
shared arguments can be passed to every term in the sum. So for the
95-
array ```{ x1, x2, ... }``` and the shared arguments ```s1, s2, ...```stan
95+
array ```{ x1, x2, ... }``` and the shared arguments ```s1, s2, ...```
9696
the effective sum (with individual terms) looks like:
9797

9898
```stan
@@ -137,7 +137,7 @@ without modification from the ```reduce_sum``` / `reduce_sum_static` call)
137137
The user-provided function ```f``` is expected to compute the partial
138138
sum with the terms ```start``` through ```end``` of the overall
139139
sum. The user function is passed the subset ```x[start:end]``` as
140-
```x_slice```. ```start``` and ```end``` are passed so that ```f```stan
140+
```x_slice```. ```start``` and ```end``` are passed so that ```f```
141141
can index any of the tailing ```sM``` arguments as necessary. The
142142
trailing ```sM``` arguments are passed without modification to every
143143
call of ```f```.
@@ -452,8 +452,8 @@ data {
452452
}
453453
transformed data {
454454
// K = 3 shards
455-
array[3, 4] = { y[1:4], y[5:8], y[9:12] int ys };
456-
array[3, 4] = { x[1:4], x[5:8], x[9:12] real xs };
455+
array[3, 4] int ys = { y[1:4], y[5:8], y[9:12] };
456+
array[3, 4] real xs = { x[1:4], x[5:8], x[9:12] };
457457
array[3] vector[0] theta;
458458
}
459459
parameters {

0 commit comments

Comments
 (0)