Skip to content

Commit e8cfcc1

Browse files
upsjyhmtsai
andcommitted
review updates
Co-authored-by: Yu-Hsiang Tsai <yhmtsai@gmail.com>
1 parent 0057ac9 commit e8cfcc1

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

include/ginkgo/core/stop/iteration.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ class Iteration : public EnablePolymorphicObject<Iteration, Criterion> {
3232
*/
3333
size_type max_iters{0};
3434

35-
auto with_max_iters(size_type value)->parameters_type&
35+
parameters_type& with_max_iters(size_type value)
3636
{
3737
this->max_iters = value;
38-
return *(this->self());
38+
return *this;
3939
}
4040
};
4141
GKO_ENABLE_CRITERION_FACTORY(Iteration, parameters, Factory);

include/ginkgo/core/stop/residual_norm.hpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ class ResidualNorm : public ResidualNormBase<ValueType> {
123123
remove_complex<ValueType> reduction_factor{
124124
5 * std ::numeric_limits<remove_complex<ValueType>>::epsilon()};
125125

126-
auto with_reduction_factor(remove_complex<ValueType> value)
127-
->parameters_type&
126+
parameters_type& with_reduction_factor(remove_complex<ValueType> value)
128127
{
129128
this->reduction_factor = value;
130129
return *this;
@@ -186,8 +185,7 @@ class ImplicitResidualNorm : public ResidualNormBase<ValueType> {
186185
remove_complex<ValueType> reduction_factor{
187186
5 * std ::numeric_limits<remove_complex<ValueType>>::epsilon()};
188187

189-
auto with_reduction_factor(remove_complex<ValueType> value)
190-
->parameters_type&
188+
parameters_type& with_reduction_factor(remove_complex<ValueType> value)
191189
{
192190
this->reduction_factor = value;
193191
return *this;
@@ -268,8 +266,7 @@ class GKO_DEPRECATED(
268266
remove_complex<ValueType> reduction_factor{
269267
5 * std ::numeric_limits<remove_complex<ValueType>>::epsilon()};
270268

271-
auto with_reduction_factor(remove_complex<ValueType> value)
272-
->parameters_type&
269+
parameters_type& with_reduction_factor(remove_complex<ValueType> value)
273270
{
274271
this->reduction_factor = value;
275272
return *this;
@@ -330,8 +327,9 @@ class GKO_DEPRECATED(
330327
*/
331328
remove_complex<ValueType> tolerance{
332329
5 * std ::numeric_limits<remove_complex<ValueType>>::epsilon()};
333-
template <typename... Args>
334-
auto with_tolerance(remove_complex<ValueType> value)->parameters_type&
330+
331+
332+
parameters_type& with_tolerance(remove_complex<ValueType> value)
335333
{
336334
this->tolerance = value;
337335
return *this;
@@ -390,7 +388,7 @@ class GKO_DEPRECATED(
390388
remove_complex<ValueType> tolerance{
391389
5 * std ::numeric_limits<remove_complex<ValueType>>::epsilon()};
392390

393-
auto with_tolerance(remove_complex<ValueType> value)->parameters_type&
391+
parameters_type& with_tolerance(remove_complex<ValueType> value)
394392
{
395393
this->tolerance = value;
396394
return *this;

0 commit comments

Comments
 (0)