@@ -16,9 +16,9 @@ be used with multi-processing.
1616The advantages of reduce with summation are:
1717
18181 . More flexible argument interface, avoiding the packing and
19- unpacking that is necessary with rectanguar map.
19+ unpacking that is necessary with rectangular map.
20202 . Partitions data for parallelization automatically (this is done manually
21- in rectanguar map).
21+ in rectangular map).
22223 . Is easier to use.
2323
2424The advantages of rectangular map are:
@@ -92,7 +92,7 @@ See details [below](#reduce-sum-grainsize).
9292
9393For efficiency and convenience additional
9494shared 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, ... ```
9696the effective sum (with individual terms) looks like:
9797
9898``` stan
@@ -137,7 +137,7 @@ without modification from the ```reduce_sum``` / `reduce_sum_static` call)
137137The user-provided function ``` f ``` is expected to compute the partial
138138sum with the terms ``` start ``` through ``` end ``` of the overall
139139sum. 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 ```
141141can index any of the tailing ``` sM ``` arguments as necessary. The
142142trailing ``` sM ``` arguments are passed without modification to every
143143call of ``` f ``` .
@@ -452,8 +452,8 @@ data {
452452}
453453transformed 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}
459459parameters {
0 commit comments