ViennaCL - The Vienna Computing Library: viennacl/traits/row_major.hpp Source File

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
row_major.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_TRAITS_ROW_MAJOR_HPP_
2 #define VIENNACL_TRAITS_ROW_MAJOR_HPP_
3
4 /* =========================================================================
5 Copyright (c) 2010-2016, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8 Portions of this software are copyright by UChicago Argonne, LLC.
9
10 -----------------
11 ViennaCL - The Vienna Computing Library
12 -----------------
13
14 Project Head: Karl Rupp rupp@iue.tuwien.ac.at
15
16 (A list of authors and contributors can be found in the manual)
17
18 License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20
25 #include <string>
26 #include <fstream>
27 #include <sstream>
28 #include "viennacl/forwards.h"
29
30 #include "viennacl/meta/result_of.hpp"
31
32 namespace viennacl
33 {
34 namespace traits
35 {
36
37 template<typename T>
38 bool row_major(T const &) { return true; } //default implementation: If there is no underlying matrix type, we take the result to be row-major
39
40 template<typename NumericT>
41 bool row_major(matrix_base<NumericT> const & A) { return A.row_major(); }
42
43 template<typename LHS, typename RHS, typename OP>
44 bool row_major(matrix_expression<LHS, RHS, OP> const & proxy) { return viennacl::traits::row_major(proxy.lhs()); }
45
46 } //namespace traits
47 } //namespace viennacl
48
49
50 #endif
viennacl::matrix_base< NumericT >
viennacl::matrix_expression
Expression template class for representing a tree of expressions which ultimately result in a matrix...
Definition: forwards.h:341
forwards.h
This file provides the forward declarations for the main types used within ViennaCL.
viennacl::matrix_base::row_major
bool row_major() const
Definition: matrix_def.hpp:248
viennacl::traits::row_major
bool row_major(T const &)
Definition: row_major.hpp:38
viennacl::matrix_expression::lhs
LHS & lhs() const
Get left hand side operand.
Definition: matrix.hpp:66
result_of.hpp
A collection of compile time type deductions.