New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
num_columns.hpp in vendors/XIOS/current/extern/boost/include/boost/numeric/ublas/operation – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/numeric/ublas/operation/num_columns.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1/**
2 * -*- c++ -*-
3 *
4 * \file num_columns.hpp
5 *
6 * \brief The \c num_columns operation.
7 *
8 * Copyright (c) 2009, Marco Guazzone
9 *
10 * Distributed under the Boost Software License, Version 1.0. (See
11 * accompanying file LICENSE_1_0.txt or copy at
12 * http://www.boost.org/LICENSE_1_0.txt)
13 *
14 * \author Marco Guazzone, marco.guazzone@gmail.com
15 */
16
17
18#ifndef BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP
19#define BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP
20
21
22#include <boost/numeric/ublas/detail/config.hpp>
23
24
25namespace boost { namespace numeric { namespace ublas {
26
27    /**
28     * \brief Return the number of columns.
29     * \tparam MatrixExprT A type which models the matrix expression concept.
30     * \param m A matrix expression.
31     * \return The number of columns.
32     */
33    template <typename MatrixExprT>
34    BOOST_UBLAS_INLINE
35    typename MatrixExprT::size_type num_columns(MatrixExprT const& m)
36    {
37        return m.size2();
38    }
39
40}}} // Namespace boost::numeric::ublas
41
42
43#endif // BOOST_NUMERIC_UBLAS_OPERATION_NUM_COLUMNS_HPP
Note: See TracBrowser for help on using the repository browser.