~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/Eigen3/Eigen/src/Core/Visitor.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//
4
4
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5
5
//
6
 
// Eigen is free software; you can redistribute it and/or
7
 
// modify it under the terms of the GNU Lesser General Public
8
 
// License as published by the Free Software Foundation; either
9
 
// version 3 of the License, or (at your option) any later version.
10
 
//
11
 
// Alternatively, you can redistribute it and/or
12
 
// modify it under the terms of the GNU General Public License as
13
 
// published by the Free Software Foundation; either version 2 of
14
 
// the License, or (at your option) any later version.
15
 
//
16
 
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17
 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
 
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19
 
// GNU General Public License for more details.
20
 
//
21
 
// You should have received a copy of the GNU Lesser General Public
22
 
// License and a copy of the GNU General Public License along with
23
 
// Eigen. If not, see <http://www.gnu.org/licenses/>.
 
6
// This Source Code Form is subject to the terms of the Mozilla
 
7
// Public License v. 2.0. If a copy of the MPL was not distributed
 
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
24
9
 
25
10
#ifndef EIGEN_VISITOR_H
26
11
#define EIGEN_VISITOR_H
27
12
 
 
13
namespace Eigen { 
 
14
 
28
15
namespace internal {
29
16
 
30
17
template<typename Visitor, typename Derived, int UnrollCount>
35
22
    row = (UnrollCount-1) % Derived::RowsAtCompileTime
36
23
  };
37
24
 
38
 
  inline static void run(const Derived &mat, Visitor& visitor)
 
25
  static inline void run(const Derived &mat, Visitor& visitor)
39
26
  {
40
27
    visitor_impl<Visitor, Derived, UnrollCount-1>::run(mat, visitor);
41
28
    visitor(mat.coeff(row, col), row, col);
45
32
template<typename Visitor, typename Derived>
46
33
struct visitor_impl<Visitor, Derived, 1>
47
34
{
48
 
  inline static void run(const Derived &mat, Visitor& visitor)
 
35
  static inline void run(const Derived &mat, Visitor& visitor)
49
36
  {
50
37
    return visitor.init(mat.coeff(0, 0), 0, 0);
51
38
  }
55
42
struct visitor_impl<Visitor, Derived, Dynamic>
56
43
{
57
44
  typedef typename Derived::Index Index;
58
 
  inline static void run(const Derived& mat, Visitor& visitor)
 
45
  static inline void run(const Derived& mat, Visitor& visitor)
59
46
  {
60
47
    visitor.init(mat.coeff(0,0), 0, 0);
61
48
    for(Index i = 1; i < mat.rows(); ++i)
245
232
  return maxVisitor.res;
246
233
}
247
234
 
 
235
} // end namespace Eigen
 
236
 
248
237
#endif // EIGEN_VISITOR_H