ViennaCL - The Vienna Computing Library
1.2.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
viennacl
traits
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-2011, Institute for Microelectronics,
6
Institute for Analysis and Scientific Computing,
7
TU Wien.
8
9
-----------------
10
ViennaCL - The Vienna Computing Library
11
-----------------
12
13
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
14
15
(A list of authors and contributors can be found in the PDF manual)
16
17
License: MIT (X11), see file LICENSE in the base directory
18
============================================================================= */
19
24
#include <string>
25
#include <fstream>
26
#include <sstream>
27
#include "
viennacl/forwards.h
"
28
29
namespace
viennacl
30
{
31
namespace
traits
32
{
33
//
34
// start: Mostly for vectors
35
//
36
37
// Default: Try to get the start index from the .start() member function
38
template
<
typename
T>
39
typename
result_of::size_type<T>::type
40
start
(T
const
& obj)
41
{
42
return
obj.start();
43
}
44
45
//ViennaCL vector leads to start index 0:
46
template
<
typename
ScalarType,
unsigned
int
ALIGNMENT>
47
typename
result_of::size_type<viennacl::vector<ScalarType, ALIGNMENT>
>::type
48
start
(
viennacl::vector<ScalarType, ALIGNMENT>
const
& v)
49
{
50
return
0;
51
}
52
53
//
54
// start1: Row start index
55
//
56
57
// Default: Try to get the start index from the .start1() member function
58
template
<
typename
T>
59
typename
result_of::size_type<T>::type
60
start1
(T
const
& obj)
61
{
62
return
obj.start1();
63
}
64
65
//ViennaCL matrix leads to start index 0:
66
template
<
typename
ScalarType,
typename
F,
unsigned
int
ALIGNMENT>
67
typename
result_of::size_type<viennacl::matrix<ScalarType, F, ALIGNMENT>
>::type
68
start1
(
viennacl::matrix<ScalarType, F, ALIGNMENT>
const
& v)
69
{
70
return
0;
71
}
72
73
74
//
75
// start2: Column start index
76
//
77
template
<
typename
T>
78
typename
result_of::size_type<T>::type
79
start2
(T
const
& obj)
80
{
81
return
obj.start2();
82
}
83
84
//ViennaCL matrix leads to start index 0:
85
template
<
typename
ScalarType,
typename
F,
unsigned
int
ALIGNMENT>
86
typename
result_of::size_type<viennacl::matrix<ScalarType, F, ALIGNMENT>
>::type
87
start2
(
viennacl::matrix<ScalarType, F, ALIGNMENT>
const
& v)
88
{
89
return
0;
90
}
91
92
93
}
//namespace traits
94
}
//namespace viennacl
95
96
97
#endif
Generated on Wed Oct 10 2012 09:58:15 for ViennaCL - The Vienna Computing Library by
1.8.1.2