blob: 1b518a6163cea32d06bf6e8549d4edb10d98d3f1 [file] [log] [blame]
Keir Mierle8ebb0732012-04-30 23:09:08 -07001// Ceres Solver - A fast non-linear least squares minimizer
Keir Mierle7492b0d2015-03-17 22:30:16 -07002// Copyright 2015 Google Inc. All rights reserved.
3// http://ceres-solver.org/
Keir Mierle8ebb0732012-04-30 23:09:08 -07004//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are met:
7//
8// * Redistributions of source code must retain the above copyright notice,
9// this list of conditions and the following disclaimer.
10// * Redistributions in binary form must reproduce the above copyright notice,
11// this list of conditions and the following disclaimer in the documentation
12// and/or other materials provided with the distribution.
13// * Neither the name of Google Inc. nor the names of its contributors may be
14// used to endorse or promote products derived from this software without
15// specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27// POSSIBILITY OF SUCH DAMAGE.
28//
29// Author: sameeragarwal@google.com (Sameer Agarwal)
30
31#include "ceres/linear_operator.h"
32
Dmitriy Korchemkinb1fe6032022-09-07 16:06:51 +030033#include <glog/logging.h>
34
Sameer Agarwalcaf614a2022-04-21 17:41:10 -070035namespace ceres::internal {
Keir Mierle8ebb0732012-04-30 23:09:08 -070036
Dmitriy Korchemkinb1fe6032022-09-07 16:06:51 +030037void LinearOperator::RightMultiplyAndAccumulate(const double* x,
38 double* y,
39 ContextImpl* context,
40 int num_threads) const {
41 (void)context;
42 if (num_threads != 1) {
43 VLOG(3) << "Parallel right product is not supported by linear operator "
44 "implementation";
45 }
46 RightMultiplyAndAccumulate(x, y);
47}
48
49void LinearOperator::LeftMultiplyAndAccumulate(const double* x,
50 double* y,
51 ContextImpl* context,
52 int num_threads) const {
53 (void)context;
54 if (num_threads != 1) {
55 VLOG(3) << "Parallel left product is not supported by linear operator "
56 "implementation";
57 }
58 LeftMultiplyAndAccumulate(x, y);
59}
60
Sergiu Deitscha35bd1b2022-02-09 00:56:10 +010061LinearOperator::~LinearOperator() = default;
Keir Mierle8ebb0732012-04-30 23:09:08 -070062
Sameer Agarwalcaf614a2022-04-21 17:41:10 -070063} // namespace ceres::internal