Skip to content

Commit 2260c8f

Browse files
pratikvnyhmtsai
andcommitted
review updates
Co-authored-by: Yu-Hsiang Tsai <yhmtsai@gmail.com>
1 parent adb8f97 commit 2260c8f

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

include/ginkgo/core/log/batch_logger.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct log_data final {
7676
}
7777

7878
log_data(std::shared_ptr<const Executor> exec, size_type num_batch_items,
79-
array<unsigned char> workspace)
79+
array<unsigned char>& workspace)
8080
: res_norms(exec), iter_counts(exec)
8181
{
8282
const size_type workspace_size =

include/ginkgo/core/solver/batch_solver_base.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,9 @@ class EnableBatchSolver
431431
if (b->get_common_size()[1] > 1) {
432432
GKO_NOT_IMPLEMENTED;
433433
}
434+
auto workspace_view = workspace_.as_view();
434435
auto log_data_ = std::make_unique<log::detail::log_data<real_type>>(
435-
exec, b->get_num_batch_items(), workspace_.as_view());
436+
exec, b->get_num_batch_items(), workspace_view);
436437

437438
this->solver_apply(b, x, log_data_.get());
438439

include/ginkgo/core/stop/batch_stop_enum.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ namespace stop {
4444
* solver.
4545
*
4646
* `absolute` tolerance implies that the convergence criteria check is
47-
* against the computed residual ($||r|| <= \tau$)
47+
* against the computed residual ($||r|| \leq \tau$)
4848
*
4949
* With the `relative` tolerance type, the solver
5050
* convergence criteria checks against the relative residual norm
51-
* ($\frac{||r||}{||b||} <= \tau$, where $||b||$$ is the L2 norm of the rhs).
51+
* ($||r|| \leq ||b|| \times \tau$, where $||b||$$ is the L2 norm of the rhs).
5252
*
53-
* @note the compute residual norm, $||r||$ may be implicit or explicit
53+
* @note the computed residual norm, $||r||$ may be implicit or explicit
5454
* depending on the solver algorithm.
5555
*/
5656
enum class tolerance_type { absolute, relative };

0 commit comments

Comments
 (0)