Skip to content

Commit 4dca116

Browse files
authored
Merge pull request #3295 from stan-dev/typo-fixes
Fix typos in error messages, comments
2 parents 490c8b5 + cc76435 commit 4dca116

96 files changed

Lines changed: 176 additions & 172 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

stan/math/fwd/fun/atan.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inline fvar<T> atan(const fvar<T>& x) {
2222
*
2323
* @tparam T autodiff value type
2424
* @param[in] z argument
25-
* @return arc tanget of the argument
25+
* @return arc tangent of the argument
2626
*/
2727
template <typename T>
2828
inline std::complex<fvar<T>> atan(const std::complex<fvar<T>>& z) {

stan/math/fwd/fun/read_fvar.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class read_fvar_functor {
3232

3333
/**
3434
* Function applying the read_fvar_functor to extract the values
35-
* and tangets of a given fvar matrix into separate matrices.
35+
* and tangents of a given fvar matrix into separate matrices.
3636
*
3737
* @tparam EigFvar type of the Eigen container of fvar.
3838
* @tparam EigOut type of the Eigen containers to copy to

stan/math/fwd/functor/finite_diff.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ inline auto aggregate_tangent(const FuncTangent& tangent, const InputArg& arg) {
5151

5252
/**
5353
* Construct an fvar<T> where the tangent is calculated by finite-differencing.
54-
* Finite-differencing is only perfomed where the scalar type to be evaluated is
55-
* `fvar<T>.
54+
* Finite-differencing is only performed where the scalar type to be evaluated
55+
* is `fvar<T>.
5656
*
5757
* Higher-order inputs (i.e., fvar<var> & fvar<fvar<T>>) are also implicitly
5858
* supported through auto-diffing the finite-differencing process.
@@ -95,8 +95,8 @@ inline auto finite_diff(const F& func, const TArgs&... args) {
9595

9696
/**
9797
* Construct an fvar<T> where the tangent is calculated by finite-differencing.
98-
* Finite-differencing is only perfomed where the scalar type to be evaluated is
99-
* `fvar<T>.
98+
* Finite-differencing is only performed where the scalar type to be evaluated
99+
* is `fvar<T>.
100100
*
101101
* This overload is used when no fvar<T> arguments are passed and simply
102102
* evaluates the functor with the provided arguments.

stan/math/memory/stack_alloc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class stack_alloc {
254254
/**
255255
* Return number of bytes allocated to this instance by the heap.
256256
* This is not the same as the number of bytes allocated through
257-
* calls to memalloc_. The latter number is not calculatable
257+
* calls to memalloc_. The latter number is not calculable
258258
* because space is wasted at the end of blocks if the next
259259
* alloc request doesn't fit. (Perhaps we could trim down to
260260
* what is actually used?)

stan/math/opencl/kernel_generator.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* into a single OpenCL kernel. This is much simpler than writing
1111
* multi-operation kernels by hand.
1212
*
13-
* Because global GPU memory loads and stores are relativly slow compared to
13+
* Because global GPU memory loads and stores are relatively slow compared to
1414
* calculations in a kernel, using one kernel for multiple operations is faster
1515
* than using one kernel per operation.
1616
*
@@ -27,13 +27,13 @@
2727
* Element-wise functions can be added using one of the macros in
2828
* `elt_functions.hpp`.
2929
*
30-
* New kernel generator classes must satsify the conditions below:
30+
* New kernel generator classes must satisfy the conditions below:
3131
*
3232
* 1. The class must be derived from a class inheriting from `operation_cl`.
3333
* Optionally, if the operation should support being assigned to, it can be
3434
* derived from a class inheriting `operation_cl_lhs` instead.
3535
* 2. It's parent template arguments should be set to derived type, type of
36-
* scalar and types of any expression arguements.
36+
* scalar and types of any expression arguments.
3737
* 3. Member type `Scalar` should be defined as scalar type of the result of
3838
* the operation.
3939
* 4. Member function `deep_copy` should make a copy of the expression.
@@ -97,7 +97,7 @@
9797
*
9898
* A new operation should also have a user-facing function that accepts
9999
* arguments to the operation and returns the operation object. Arguments should
100-
* be passed trough function `as_operation_cl` so that they are wrapped in
100+
* be passed through function `as_operation_cl` so that they are wrapped in
101101
* operations if they are not operations themselves. If the operation defines
102102
* `modify_argument_indices` this function should make copies of arguments by
103103
* calling `deep_copy()` on them internally.

stan/math/opencl/kernel_generator/broadcast.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class broadcast_
6161
}
6262

6363
/**
64-
* Sets index/indices along broadcasted dimmension(s) to 0.
64+
* Sets index/indices along broadcasted dimension(s) to 0.
6565
* @param[in, out] row_index_name row index
6666
* @param[in, out] col_index_name column index
6767
*/
@@ -129,7 +129,7 @@ inline auto broadcast(T&& a) {
129129
}
130130

131131
/**
132-
* Broadcast an expression in rowwise dimmension. The argument must have single
132+
* Broadcast an expression in rowwise dimension. The argument must have single
133133
* column. Further expressions can use this expression as if it had any number
134134
* of columns, repeating the values.
135135
*
@@ -147,7 +147,7 @@ inline auto rowwise_broadcast(T&& a) {
147147
}
148148

149149
/**
150-
* Broadcast an expression in colwise dimmension. The argument must have single
150+
* Broadcast an expression in colwise dimension. The argument must have single
151151
* row. Further expressions can use this expression as if it had any number of
152152
* rows, repeating the values.
153153
*

stan/math/opencl/kernel_generator/check_cl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class check_cl_ : public operation_cl_lhs<check_cl_<T>, bool> {
142142

143143
/**
144144
* Adds all write events on any matrices used by nested expression to a list.
145-
* Ignores read events anc clears no events.
145+
* Ignores read events and clears no events.
146146
* @param[out] events List of all events.
147147
*/
148148
inline void get_clear_read_write_events(
@@ -189,7 +189,7 @@ class check_cl_ : public operation_cl_lhs<check_cl_<T>, bool> {
189189
/**
190190
* Assignment of a scalar bool triggers the scalar check.
191191
* @param condition whether the state is ok.
192-
* @throws std::domain_error condition is false (chack failed).
192+
* @throws std::domain_error condition is false (check failed).
193193
*/
194194
void operator=(bool condition); // implemented in multi_result_kernel.hpp
195195
};

stan/math/opencl/kernel_generator/colwise_reduction.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ namespace internal {
2626
class colwise_reduction_base {};
2727

2828
/**
29-
* Determine number of work groups in rows direction that will be run fro
29+
* Determine number of work groups in rows direction that will be run for
3030
* colwise reduction of given size.
31-
* @param n_rows number of rows of expression to resuce
32-
* @param n_cols number of columns of expression to resuce
31+
* @param n_rows number of rows of expression to reduce
32+
* @param n_cols number of columns of expression to reduce
3333
* @return number of work groups in rows direction
3434
*/
3535
inline int colwise_reduction_wgs_rows(int n_rows, int n_cols) {

stan/math/opencl/kernel_generator/constant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class constant_ : public operation_cl<constant_<T>, T> {
118118
*
119119
* In most cases scalars should be directly used instead of this. This is,
120120
* however, useful for initializing some expression to specific value if that
121-
* expresssion could also be plain `matrix_cl`.
121+
* expression could also be plain `matrix_cl`.
122122
*
123123
* @tparam T type of argument
124124
* @param a input argument

stan/math/opencl/kernel_generator/elt_function_cl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class elt_function_cl : public operation_cl<Derived, Scal, T...> {
190190

191191
/**
192192
* Generates a class and function for an unary function, defined by OpenCL with
193-
* special property that it passes trough zero. That is \f$ f(0)=0 \f$. Such a
193+
* special property that it passes through zero. That is \f$ f(0)=0 \f$. Such a
194194
* function can have triangular view equal to its argument's.
195195
* @param fun function name
196196
*/

0 commit comments

Comments
 (0)