1
// Ceres Solver - A fast non-linear least squares minimizer
2
// Copyright 2010, 2011, 2012 Google Inc. All rights reserved.
3
// http://code.google.com/p/ceres-solver/
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are met:
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.
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.
29
// Author: sameeragarwal@google.com (Sameer Agarwal)
31
// ========================================
32
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
33
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
34
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
35
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
36
//=========================================
38
// This file is generated using generate_template_specializations.py.
39
// Editing it manually is not recommended.
41
#include "ceres/linear_solver.h"
42
#include "ceres/schur_eliminator.h"
43
#include "ceres/internal/eigen.h"
49
SchurEliminatorBase::Create(const LinearSolver::Options& options) {
50
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
51
if ((options.row_block_size == 2) &&
52
(options.e_block_size == 2) &&
53
(options.f_block_size == 2)) {
54
return new SchurEliminator<2, 2, 2>(options);
56
if ((options.row_block_size == 2) &&
57
(options.e_block_size == 2) &&
58
(options.f_block_size == 3)) {
59
return new SchurEliminator<2, 2, 3>(options);
61
if ((options.row_block_size == 2) &&
62
(options.e_block_size == 2) &&
63
(options.f_block_size == 4)) {
64
return new SchurEliminator<2, 2, 4>(options);
66
if ((options.row_block_size == 2) &&
67
(options.e_block_size == 2) &&
68
(options.f_block_size == Dynamic)) {
69
return new SchurEliminator<2, 2, Dynamic>(options);
71
if ((options.row_block_size == 2) &&
72
(options.e_block_size == 3) &&
73
(options.f_block_size == 3)) {
74
return new SchurEliminator<2, 3, 3>(options);
76
if ((options.row_block_size == 2) &&
77
(options.e_block_size == 3) &&
78
(options.f_block_size == 4)) {
79
return new SchurEliminator<2, 3, 4>(options);
81
if ((options.row_block_size == 2) &&
82
(options.e_block_size == 3) &&
83
(options.f_block_size == 9)) {
84
return new SchurEliminator<2, 3, 9>(options);
86
if ((options.row_block_size == 2) &&
87
(options.e_block_size == 3) &&
88
(options.f_block_size == Dynamic)) {
89
return new SchurEliminator<2, 3, Dynamic>(options);
91
if ((options.row_block_size == 2) &&
92
(options.e_block_size == 4) &&
93
(options.f_block_size == 3)) {
94
return new SchurEliminator<2, 4, 3>(options);
96
if ((options.row_block_size == 2) &&
97
(options.e_block_size == 4) &&
98
(options.f_block_size == 4)) {
99
return new SchurEliminator<2, 4, 4>(options);
101
if ((options.row_block_size == 2) &&
102
(options.e_block_size == 4) &&
103
(options.f_block_size == Dynamic)) {
104
return new SchurEliminator<2, 4, Dynamic>(options);
106
if ((options.row_block_size == 4) &&
107
(options.e_block_size == 4) &&
108
(options.f_block_size == 2)) {
109
return new SchurEliminator<4, 4, 2>(options);
111
if ((options.row_block_size == 4) &&
112
(options.e_block_size == 4) &&
113
(options.f_block_size == 3)) {
114
return new SchurEliminator<4, 4, 3>(options);
116
if ((options.row_block_size == 4) &&
117
(options.e_block_size == 4) &&
118
(options.f_block_size == 4)) {
119
return new SchurEliminator<4, 4, 4>(options);
121
if ((options.row_block_size == 4) &&
122
(options.e_block_size == 4) &&
123
(options.f_block_size == Dynamic)) {
124
return new SchurEliminator<4, 4, Dynamic>(options);
126
if ((options.row_block_size == Dynamic) &&
127
(options.e_block_size == Dynamic) &&
128
(options.f_block_size == Dynamic)) {
129
return new SchurEliminator<Dynamic, Dynamic, Dynamic>(options);
133
VLOG(1) << "Template specializations not found for <"
134
<< options.row_block_size << ","
135
<< options.e_block_size << ","
136
<< options.f_block_size << ">";
137
return new SchurEliminator<Dynamic, Dynamic, Dynamic>(options);
140
} // namespace internal