Sacado Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
mpl
Sacado_mpl_vector.hpp
Go to the documentation of this file.
1
// @HEADER
2
// ***********************************************************************
3
//
4
// Sacado Package
5
// Copyright (2006) Sandia Corporation
6
//
7
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8
// the U.S. Government retains certain rights in this software.
9
//
10
// This library is free software; you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as
12
// published by the Free Software Foundation; either version 2.1 of the
13
// License, or (at your option) any later version.
14
//
15
// This library is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the Free Software
22
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
// USA
24
// Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
25
// (etphipp@sandia.gov).
26
//
27
// ***********************************************************************
28
// @HEADER
29
30
#ifndef SACADO_MPL_VECTOR_HPP
31
#define SACADO_MPL_VECTOR_HPP
32
33
#include "
Sacado_ConfigDefs.h
"
34
35
#include "
Sacado_mpl_none.hpp
"
36
#include "
Sacado_mpl_size.hpp
"
37
#include "
Sacado_mpl_begin.hpp
"
38
#include "
Sacado_mpl_end.hpp
"
39
#include "
Sacado_mpl_next.hpp
"
40
#include "
Sacado_mpl_push_back.hpp
"
41
#include "
Sacado_mpl_at.hpp
"
42
#include "
Sacado_mpl_deref.hpp
"
43
44
// Specializations needed for various mpl operations
45
#include "
Sacado_mpl_vector_size_spec.hpp
"
46
47
namespace
Sacado
{
48
49
namespace
mpl
{
50
51
// vector tag for mpl operations
52
struct
vector_tag
{};
53
54
// vector
55
template
<
typename
... Args>
56
struct
vector
:
57
vector_size
<Args...> {
58
typedef
vector_tag
tag
;
59
typedef
vector
type
;
60
};
61
62
// iterator
63
template
<
class
Vector,
int
Pos>
64
struct
vector_iterator
{
65
static
const
int
value
= Pos;
66
};
67
68
// size
69
template
<>
70
struct
size_impl
<
vector_tag
> {
71
template
<
class
Vector>
72
struct
apply
{
73
static
const
int
value
= Vector::sz;
74
};
75
};
76
77
// begin
78
template
<>
79
struct
begin_impl
<
vector_tag
> {
80
template
<
class
Vector>
81
struct
apply
{
82
typedef
vector_iterator<Vector,0>
type
;
83
};
84
};
85
86
// end
87
template
<>
88
struct
end_impl
<
vector_tag
> {
89
template
<
class
Vector>
90
struct
apply
{
91
typedef
vector_iterator<Vector,Vector::sz>
type
;
92
};
93
};
94
95
// next
96
template
<
class
Vector,
int
Pos>
97
struct
next
<
vector_iterator
<Vector,Pos> > {
98
typedef
vector_iterator<Vector,Pos+1>
type
;
99
};
100
101
// deref
102
template
<
class
Vector,
int
Pos>
103
struct
deref
<
vector_iterator
<Vector,Pos> > :
mpl::at
<Vector,Pos> {};
104
105
}
106
107
}
108
109
#include "
Sacado_mpl_vector_at_spec.hpp
"
110
#include "
Sacado_mpl_vector_push_back_spec.hpp
"
111
112
namespace
Sacado
{
113
namespace
mpl {
114
115
// at
116
template
<
int
Pos>
117
struct
at_impl
<
vector_tag
, Pos> {
118
template
<
class
Vector>
119
struct
apply
:
vector_at
<Vector,Pos> {};
120
};
121
122
// push_back
123
template
<>
124
struct
push_back_impl
<
vector_tag
> {
125
template
<
class
Vector,
class
T>
126
struct
apply
:
vector_push_back
<Vector, T> {};
127
};
128
129
}
130
}
131
132
#endif
Sacado_ConfigDefs.h
Sacado_mpl_at.hpp
Sacado_mpl_begin.hpp
Sacado_mpl_deref.hpp
Sacado_mpl_end.hpp
Sacado_mpl_next.hpp
Sacado_mpl_none.hpp
Sacado_mpl_push_back.hpp
Sacado_mpl_size.hpp
Sacado_mpl_vector_at_spec.hpp
Sacado_mpl_vector_push_back_spec.hpp
Sacado_mpl_vector_size_spec.hpp
Sacado::mpl
Definition
Sacado_mpl_apply.hpp:41
Sacado
Definition
Sacado_mpl_apply.hpp:39
Sacado::mpl::at_impl< vector_tag, Pos >::apply
Definition
Sacado_mpl_vector.hpp:119
Sacado::mpl::at_impl
Definition
Sacado_mpl_at.hpp:39
Sacado::mpl::at
Definition
Sacado_mpl_at.hpp:43
Sacado::mpl::begin_impl< vector_tag >::apply
Definition
Sacado_mpl_vector.hpp:81
Sacado::mpl::begin_impl< vector_tag >::apply::type
vector_iterator< Vector, 0 > type
Definition
Sacado_mpl_vector.hpp:82
Sacado::mpl::begin_impl
Definition
Sacado_mpl_begin.hpp:39
Sacado::mpl::deref
Definition
Sacado_mpl_deref.hpp:39
Sacado::mpl::end_impl< vector_tag >::apply
Definition
Sacado_mpl_vector.hpp:90
Sacado::mpl::end_impl< vector_tag >::apply::type
vector_iterator< Vector, Vector::sz > type
Definition
Sacado_mpl_vector.hpp:91
Sacado::mpl::end_impl
Definition
Sacado_mpl_end.hpp:39
Sacado::mpl::next< vector_iterator< Vector, Pos > >::type
vector_iterator< Vector, Pos+1 > type
Definition
Sacado_mpl_vector.hpp:98
Sacado::mpl::next
Definition
Sacado_mpl_next.hpp:39
Sacado::mpl::push_back_impl< vector_tag >::apply
Definition
Sacado_mpl_vector.hpp:126
Sacado::mpl::push_back_impl
Definition
Sacado_mpl_push_back.hpp:39
Sacado::mpl::size_impl< vector_tag >::apply
Definition
Sacado_mpl_vector.hpp:72
Sacado::mpl::size_impl< vector_tag >::apply::value
static const int value
Definition
Sacado_mpl_vector.hpp:73
Sacado::mpl::size_impl
Definition
Sacado_mpl_size.hpp:39
Sacado::mpl::vector_at
Definition
Sacado_mpl_vector_at_spec.hpp:37
Sacado::mpl::vector_iterator
Definition
Sacado_mpl_vector.hpp:64
Sacado::mpl::vector_iterator< Vector, 0 >::value
static const int value
Definition
Sacado_mpl_vector.hpp:65
Sacado::mpl::vector_push_back
Definition
Sacado_mpl_vector_push_back_spec.hpp:38
Sacado::mpl::vector_size
Definition
Sacado_mpl_vector_size_spec.hpp:38
Sacado::mpl::vector_tag
Definition
Sacado_mpl_vector.hpp:52
Sacado::mpl::vector
Definition
Sacado_mpl_vector.hpp:57
Sacado::mpl::vector::tag
vector_tag tag
Definition
Sacado_mpl_vector.hpp:58
Sacado::mpl::vector::type
vector type
Definition
Sacado_mpl_vector.hpp:59
Generated by
1.17.0