ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
start.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_TRAITS_START_HPP_
2 #define VIENNACL_TRAITS_START_HPP_
3 
4 /* =========================================================================
5  Copyright (c) 2010-2015, 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 
31 
32 namespace viennacl
33 {
34 namespace traits
35 {
36 
37 //
38 // start: Mostly for vectors
39 //
40 
41 // Default: Try to get the start index from the .start() member function
42 template<typename T>
43 typename result_of::size_type<T>::type
44 start(T const & obj)
45 {
46  return obj.start();
47 }
48 
49 //ViennaCL vector leads to start index 0:
50 template<typename ScalarType, unsigned int AlignmentV>
53 {
54  return 0;
55 }
56 
57 
58 //
59 // start1: Row start index
60 //
61 
62 // Default: Try to get the start index from the .start1() member function
63 template<typename T>
65 start1(T const & obj)
66 {
67  return obj.start1();
68 }
69 
70 //ViennaCL matrix leads to start index 0:
71 template<typename ScalarType, typename F, unsigned int AlignmentV>
74 {
75  return 0;
76 }
77 
78 
79 //
80 // start2: Column start index
81 //
82 template<typename T>
84 start2(T const & obj)
85 {
86  return obj.start2();
87 }
88 
89 //ViennaCL matrix leads to start index 0:
90 template<typename ScalarType, typename F, unsigned int AlignmentV>
93 {
94  return 0;
95 }
96 
97 
98 } //namespace traits
99 } //namespace viennacl
100 
101 
102 #endif
This file provides the forward declarations for the main types used within ViennaCL.
result_of::size_type< T >::type start1(T const &obj)
Definition: start.hpp:65
A dense matrix class.
Definition: forwards.h:375
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:34
result_of::size_type< T >::type start2(T const &obj)
Definition: start.hpp:84
result_of::size_type< T >::type start(T const &obj)
Definition: start.hpp:44
Generic meta-function for retrieving the size_type associated with type T.
Definition: result_of.hpp:139
A collection of compile time type deductions.