gccxml_gem 0.9.2-universal-darwin-10
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +79 -0
- data/bin/gccxml +0 -0
- data/bin/gccxml_cc1plus +0 -0
- data/gccxml.rb +57 -0
- data/share/doc/gccxml-0.9/Copyright.txt +55 -0
- data/share/doc/gccxml-0.9/gccxml.html +168 -0
- data/share/doc/gccxml-0.9/gccxml.txt +293 -0
- data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
- data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
- data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
- data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
- data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
- data/share/gccxml-0.9/GCC/2.95/complex +38 -0
- data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
- data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
- data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
- data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
- data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
- data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
- data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
- data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
- data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
- data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
- data/share/gccxml-0.9/GCC/2.95/deque +19 -0
- data/share/gccxml-0.9/GCC/2.95/exception +20 -0
- data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
- data/share/gccxml-0.9/GCC/2.95/functional +64 -0
- data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
- data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
- data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
- data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
- data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
- data/share/gccxml-0.9/GCC/2.95/list +19 -0
- data/share/gccxml-0.9/GCC/2.95/map +20 -0
- data/share/gccxml-0.9/GCC/2.95/memory +21 -0
- data/share/gccxml-0.9/GCC/2.95/new +13 -0
- data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
- data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/2.95/queue +20 -0
- data/share/gccxml-0.9/GCC/2.95/set +20 -0
- data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
- data/share/gccxml-0.9/GCC/2.95/stack +19 -0
- data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
- data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
- data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
- data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
- data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
- data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
- data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
- data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
- data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
- data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
- data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
- data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
- data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
- data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
- data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
- data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
- data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
- data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
- data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
- data/share/gccxml-0.9/GCC/2.95/string +26 -0
- data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
- data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
- data/share/gccxml-0.9/GCC/2.95/utility +25 -0
- data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
- data/share/gccxml-0.9/GCC/2.95/vector +19 -0
- data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
- data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
- data/share/gccxml-0.9/GCC/3.2/bits/gthr-default.h +581 -0
- data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
- data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
- data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
- data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
- data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
- data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
- data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
- data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
- data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
- data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
- data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
- data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
- data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
- data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
- data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
- data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
- data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
- data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
- data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
- data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
- data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
- data/share/gccxml-0.9/GCC/3.4/bits/gthr-default.h +664 -0
- data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
- data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
- data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
- data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
- data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
- data/share/gccxml-0.9/GCC/4.3/gccxml_builtins.h +182 -0
- data/share/gccxml-0.9/IBM/8.0/adapt_headers.sh +34 -0
- data/share/gccxml-0.9/IBM/8.0/stdlib.h.patch +27 -0
- data/share/gccxml-0.9/IBM/8.0/xstring.patch +19 -0
- data/share/gccxml-0.9/IBM/README +8 -0
- data/share/gccxml-0.9/IBM/find_flags +51 -0
- data/share/gccxml-0.9/IBM/find_flags_common +48 -0
- data/share/gccxml-0.9/Intel/find_flags +56 -0
- data/share/gccxml-0.9/Intel/pthread.h +16 -0
- data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
- data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
- data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
- data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
- data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
- data/share/gccxml-0.9/MIPSpro/find_flags +70 -0
- data/share/gccxml-0.9/MIPSpro/mipspro_defs.cxx +63 -0
- data/share/gccxml-0.9/Sun/5.8/Cstd.patch +156 -0
- data/share/gccxml-0.9/Sun/5.8/adapt_headers.sh +32 -0
- data/share/gccxml-0.9/Sun/5.8/std-5.10.patch +22 -0
- data/share/gccxml-0.9/Sun/README +8 -0
- data/share/gccxml-0.9/Sun/find_flags +51 -0
- data/share/gccxml-0.9/Sun/find_flags_common +42 -0
- data/share/gccxml-0.9/gccxml_config +2 -0
- data/share/gccxml-0.9/gccxml_identify_compiler.cc +13 -0
- data/share/man/man1/gccxml.1 +246 -0
- metadata +194 -0
@@ -0,0 +1,170 @@
|
|
1
|
+
// The template and inlines for the -*- C++ -*- gslice_array class.
|
2
|
+
|
3
|
+
// Copyright (C) 1997-1999 Cygnus Solutions
|
4
|
+
//
|
5
|
+
// This file is part of the GNU ISO C++ Library. This library is free
|
6
|
+
// software; you can redistribute it and/or modify it under the
|
7
|
+
// terms of the GNU General Public License as published by the
|
8
|
+
// Free Software Foundation; either version 2, or (at your option)
|
9
|
+
// any later version.
|
10
|
+
|
11
|
+
// This library is distributed in the hope that it will be useful,
|
12
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
// GNU General Public License for more details.
|
15
|
+
|
16
|
+
// You should have received a copy of the GNU General Public License along
|
17
|
+
// with this library; see the file COPYING. If not, write to the Free
|
18
|
+
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
19
|
+
// USA.
|
20
|
+
|
21
|
+
// As a special exception, you may use this file as part of a free software
|
22
|
+
// library without restriction. Specifically, if other files instantiate
|
23
|
+
// templates or use macros or inline functions from this file, or you compile
|
24
|
+
// this file and link it with other files to produce an executable, this
|
25
|
+
// file does not by itself cause the resulting executable to be covered by
|
26
|
+
// the GNU General Public License. This exception does not however
|
27
|
+
// invalidate any other reasons why the executable file might be covered by
|
28
|
+
// the GNU General Public License.
|
29
|
+
|
30
|
+
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
|
31
|
+
|
32
|
+
#ifndef __GSLICE_ARRAY__
|
33
|
+
#define __GSLICE_ARRAY__
|
34
|
+
|
35
|
+
extern "C++" {
|
36
|
+
|
37
|
+
template<typename _Tp> class gslice_array
|
38
|
+
{
|
39
|
+
public:
|
40
|
+
typedef _Tp value_type;
|
41
|
+
|
42
|
+
void operator= (const valarray<_Tp>&) const;
|
43
|
+
void operator*= (const valarray<_Tp>&) const;
|
44
|
+
void operator/= (const valarray<_Tp>&) const;
|
45
|
+
void operator%= (const valarray<_Tp>&) const;
|
46
|
+
void operator+= (const valarray<_Tp>&) const;
|
47
|
+
void operator-= (const valarray<_Tp>&) const;
|
48
|
+
void operator^= (const valarray<_Tp>&) const;
|
49
|
+
void operator&= (const valarray<_Tp>&) const;
|
50
|
+
void operator|= (const valarray<_Tp>&) const;
|
51
|
+
void operator<<=(const valarray<_Tp>&) const;
|
52
|
+
void operator>>=(const valarray<_Tp>&) const;
|
53
|
+
void operator=(const _Tp&);
|
54
|
+
|
55
|
+
template<class _Dom>
|
56
|
+
void operator= (const _Expr<_Dom,_Tp>&) const;
|
57
|
+
template<class _Dom>
|
58
|
+
void operator*= (const _Expr<_Dom,_Tp>&) const;
|
59
|
+
template<class _Dom>
|
60
|
+
void operator/= (const _Expr<_Dom,_Tp>&) const;
|
61
|
+
template<class _Dom>
|
62
|
+
void operator%= (const _Expr<_Dom,_Tp>&) const;
|
63
|
+
template<class _Dom>
|
64
|
+
void operator+= (const _Expr<_Dom,_Tp>&) const;
|
65
|
+
template<class _Dom>
|
66
|
+
void operator-= (const _Expr<_Dom,_Tp>&) const;
|
67
|
+
template<class _Dom>
|
68
|
+
void operator^= (const _Expr<_Dom,_Tp>&) const;
|
69
|
+
template<class _Dom>
|
70
|
+
void operator&= (const _Expr<_Dom,_Tp>&) const;
|
71
|
+
template<class _Dom>
|
72
|
+
void operator|= (const _Expr<_Dom,_Tp>&) const;
|
73
|
+
template<class _Dom>
|
74
|
+
void operator<<= (const _Expr<_Dom,_Tp>&) const;
|
75
|
+
template<class _Dom>
|
76
|
+
void operator>>= (const _Expr<_Dom,_Tp>&) const;
|
77
|
+
|
78
|
+
private:
|
79
|
+
_Array<_Tp> _M_array;
|
80
|
+
const valarray<size_t>& _M_index;
|
81
|
+
|
82
|
+
friend class valarray<_Tp>;
|
83
|
+
|
84
|
+
gslice_array (_Array<_Tp>, const valarray<size_t>&);
|
85
|
+
|
86
|
+
// this constructor needs to be implemented.
|
87
|
+
gslice_array (const gslice_array&);
|
88
|
+
|
89
|
+
// not implemented
|
90
|
+
gslice_array();
|
91
|
+
gslice_array& operator= (const gslice_array&);
|
92
|
+
};
|
93
|
+
|
94
|
+
template<typename _Tp>
|
95
|
+
inline
|
96
|
+
gslice_array<_Tp>::gslice_array (_Array<_Tp> __a,
|
97
|
+
const valarray<size_t>& __i)
|
98
|
+
: _M_array (__a), _M_index (__i) {}
|
99
|
+
|
100
|
+
|
101
|
+
template<typename _Tp>
|
102
|
+
inline
|
103
|
+
gslice_array<_Tp>::gslice_array (const gslice_array<_Tp>& __a)
|
104
|
+
: _M_array (__a._M_array), _M_index (__a._M_index) {}
|
105
|
+
|
106
|
+
|
107
|
+
template<typename _Tp>
|
108
|
+
inline void
|
109
|
+
gslice_array<_Tp>::operator= (const _Tp& __t)
|
110
|
+
{
|
111
|
+
__valarray_fill (_M_array, _Array<size_t>(_M_index),
|
112
|
+
_M_index.size(), __t);
|
113
|
+
}
|
114
|
+
|
115
|
+
template<typename _Tp>
|
116
|
+
inline void
|
117
|
+
gslice_array<_Tp>::operator= (const valarray<_Tp>& __v) const
|
118
|
+
{
|
119
|
+
__valarray_copy (_Array<_Tp> (__v), __v.size (),
|
120
|
+
_M_array, _Array<size_t>(_M_index));
|
121
|
+
}
|
122
|
+
|
123
|
+
template<typename _Tp>
|
124
|
+
template<class E>
|
125
|
+
inline void
|
126
|
+
gslice_array<_Tp>::operator= (const _Expr<E, _Tp>& __e) const
|
127
|
+
{
|
128
|
+
__valarray_copy (__e, _M_index.size(), _M_array,
|
129
|
+
_Array<size_t>(_M_index));
|
130
|
+
}
|
131
|
+
|
132
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
133
|
+
#define _DEFINE_VALARRAY_OPERATOR(op, name) \
|
134
|
+
template<typename _Tp> \
|
135
|
+
inline void \
|
136
|
+
gslice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \
|
137
|
+
{ \
|
138
|
+
_Array_augmented_##name (_M_array, _Array<size_t>(_M_index), \
|
139
|
+
_Array<_Tp> (__v), __v.size ()); \
|
140
|
+
} \
|
141
|
+
\
|
142
|
+
template<typename _Tp> template<class E> \
|
143
|
+
inline void \
|
144
|
+
gslice_array<_Tp>::operator op##= (const _Expr<E, _Tp>& __e) const \
|
145
|
+
{ \
|
146
|
+
_Array_augmented_##name (_M_array, _Array<size_t>(_M_index), __e, \
|
147
|
+
_M_index.size()); \
|
148
|
+
}
|
149
|
+
|
150
|
+
_DEFINE_VALARRAY_OPERATOR(*, multiplies)
|
151
|
+
_DEFINE_VALARRAY_OPERATOR(/, divides)
|
152
|
+
_DEFINE_VALARRAY_OPERATOR(%, modulus)
|
153
|
+
_DEFINE_VALARRAY_OPERATOR(+, plus)
|
154
|
+
_DEFINE_VALARRAY_OPERATOR(-, minus)
|
155
|
+
_DEFINE_VALARRAY_OPERATOR(^, xor)
|
156
|
+
_DEFINE_VALARRAY_OPERATOR(&, and)
|
157
|
+
_DEFINE_VALARRAY_OPERATOR(|, or)
|
158
|
+
_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
|
159
|
+
_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
|
160
|
+
|
161
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
162
|
+
|
163
|
+
} // extern "C++"
|
164
|
+
|
165
|
+
|
166
|
+
#endif // __GSLICE_ARRAY__
|
167
|
+
|
168
|
+
// Local Variables:
|
169
|
+
// mode:c++
|
170
|
+
// End:
|
@@ -0,0 +1,157 @@
|
|
1
|
+
// The template and inlines for the -*- C++ -*- indirect_array class.
|
2
|
+
|
3
|
+
// Copyright (C) 1997-1999 Cygnus Solutions
|
4
|
+
//
|
5
|
+
// This file is part of the GNU ISO C++ Library. This library is free
|
6
|
+
// software; you can redistribute it and/or modify it under the
|
7
|
+
// terms of the GNU General Public License as published by the
|
8
|
+
// Free Software Foundation; either version 2, or (at your option)
|
9
|
+
// any later version.
|
10
|
+
|
11
|
+
// This library is distributed in the hope that it will be useful,
|
12
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
// GNU General Public License for more details.
|
15
|
+
|
16
|
+
// You should have received a copy of the GNU General Public License along
|
17
|
+
// with this library; see the file COPYING. If not, write to the Free
|
18
|
+
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
19
|
+
// USA.
|
20
|
+
|
21
|
+
// As a special exception, you may use this file as part of a free software
|
22
|
+
// library without restriction. Specifically, if other files instantiate
|
23
|
+
// templates or use macros or inline functions from this file, or you compile
|
24
|
+
// this file and link it with other files to produce an executable, this
|
25
|
+
// file does not by itself cause the resulting executable to be covered by
|
26
|
+
// the GNU General Public License. This exception does not however
|
27
|
+
// invalidate any other reasons why the executable file might be covered by
|
28
|
+
// the GNU General Public License.
|
29
|
+
|
30
|
+
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
|
31
|
+
|
32
|
+
#ifndef __INDIRECT_ARRAY__
|
33
|
+
#define __INDIRECT_ARRAY__
|
34
|
+
|
35
|
+
extern "C++" {
|
36
|
+
|
37
|
+
template <class _Tp> class indirect_array
|
38
|
+
{
|
39
|
+
public:
|
40
|
+
typedef _Tp value_type;
|
41
|
+
|
42
|
+
void operator= (const valarray<_Tp>&) const;
|
43
|
+
void operator*= (const valarray<_Tp>&) const;
|
44
|
+
void operator/= (const valarray<_Tp>&) const;
|
45
|
+
void operator%= (const valarray<_Tp>&) const;
|
46
|
+
void operator+= (const valarray<_Tp>&) const;
|
47
|
+
void operator-= (const valarray<_Tp>&) const;
|
48
|
+
void operator^= (const valarray<_Tp>&) const;
|
49
|
+
void operator&= (const valarray<_Tp>&) const;
|
50
|
+
void operator|= (const valarray<_Tp>&) const;
|
51
|
+
void operator<<= (const valarray<_Tp>&) const;
|
52
|
+
void operator>>= (const valarray<_Tp>&) const;
|
53
|
+
void operator= (const _Tp&);
|
54
|
+
|
55
|
+
template<class _Dom>
|
56
|
+
void operator= (const _Expr<_Dom, _Tp>&) const;
|
57
|
+
template<class _Dom>
|
58
|
+
void operator*= (const _Expr<_Dom, _Tp>&) const;
|
59
|
+
template<class _Dom>
|
60
|
+
void operator/= (const _Expr<_Dom, _Tp>&) const;
|
61
|
+
template<class _Dom>
|
62
|
+
void operator%= (const _Expr<_Dom, _Tp>&) const;
|
63
|
+
template<class _Dom>
|
64
|
+
void operator+= (const _Expr<_Dom, _Tp>&) const;
|
65
|
+
template<class _Dom>
|
66
|
+
void operator-= (const _Expr<_Dom, _Tp>&) const;
|
67
|
+
template<class _Dom>
|
68
|
+
void operator^= (const _Expr<_Dom, _Tp>&) const;
|
69
|
+
template<class _Dom>
|
70
|
+
void operator&= (const _Expr<_Dom, _Tp>&) const;
|
71
|
+
template<class _Dom>
|
72
|
+
void operator|= (const _Expr<_Dom, _Tp>&) const;
|
73
|
+
template<class _Dom>
|
74
|
+
void operator<<= (const _Expr<_Dom, _Tp>&) const;
|
75
|
+
template<class _Dom>
|
76
|
+
void operator>>= (const _Expr<_Dom, _Tp>&) const;
|
77
|
+
|
78
|
+
private:
|
79
|
+
indirect_array (const indirect_array&);
|
80
|
+
indirect_array (_Array<_Tp>, size_t, _Array<size_t>);
|
81
|
+
|
82
|
+
friend class valarray<_Tp>;
|
83
|
+
friend class gslice_array<_Tp>;
|
84
|
+
|
85
|
+
const size_t _M_sz;
|
86
|
+
const _Array<size_t> _M_index;
|
87
|
+
const _Array<_Tp> _M_array;
|
88
|
+
|
89
|
+
// not implemented
|
90
|
+
indirect_array ();
|
91
|
+
indirect_array& operator= (const indirect_array&);
|
92
|
+
};
|
93
|
+
|
94
|
+
template<typename _Tp>
|
95
|
+
inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
|
96
|
+
: _M_sz (__a._M_sz), _M_index (__a._M_index),
|
97
|
+
_M_array (__a._M_array) {}
|
98
|
+
|
99
|
+
template<typename _Tp>
|
100
|
+
inline
|
101
|
+
indirect_array<_Tp>::indirect_array (_Array<_Tp> __a, size_t __s,
|
102
|
+
_Array<size_t> __i)
|
103
|
+
: _M_sz (__s), _M_index (__i), _M_array (__a) {}
|
104
|
+
|
105
|
+
|
106
|
+
template<typename _Tp>
|
107
|
+
inline void
|
108
|
+
indirect_array<_Tp>::operator= (const _Tp& __t)
|
109
|
+
{ __valarray_fill(_M_array, _M_index, _M_sz, __t); }
|
110
|
+
|
111
|
+
template<typename _Tp>
|
112
|
+
inline void
|
113
|
+
indirect_array<_Tp>::operator= (const valarray<_Tp>& __v) const
|
114
|
+
{ __valarray_copy (_Array<_Tp> (__v), _M_sz, _M_array, _M_index); }
|
115
|
+
|
116
|
+
template<typename _Tp>
|
117
|
+
template<class _Dom>
|
118
|
+
inline void
|
119
|
+
indirect_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const
|
120
|
+
{ __valarray_copy (__e, _M_sz, _M_array, _M_index); }
|
121
|
+
|
122
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
123
|
+
#define _DEFINE_VALARRAY_OPERATOR(op, name) \
|
124
|
+
template<typename _Tp> \
|
125
|
+
inline void \
|
126
|
+
indirect_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const \
|
127
|
+
{ \
|
128
|
+
_Array_augmented_##name (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); \
|
129
|
+
} \
|
130
|
+
\
|
131
|
+
template<typename _Tp> template<class _Dom> \
|
132
|
+
inline void \
|
133
|
+
indirect_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \
|
134
|
+
{ \
|
135
|
+
_Array_augmented_##name (_M_array, _M_index, __e, _M_sz); \
|
136
|
+
}
|
137
|
+
|
138
|
+
_DEFINE_VALARRAY_OPERATOR(*, multiplies)
|
139
|
+
_DEFINE_VALARRAY_OPERATOR(/, divides)
|
140
|
+
_DEFINE_VALARRAY_OPERATOR(%, modulus)
|
141
|
+
_DEFINE_VALARRAY_OPERATOR(+, plus)
|
142
|
+
_DEFINE_VALARRAY_OPERATOR(-, minus)
|
143
|
+
_DEFINE_VALARRAY_OPERATOR(^, xor)
|
144
|
+
_DEFINE_VALARRAY_OPERATOR(&, and)
|
145
|
+
_DEFINE_VALARRAY_OPERATOR(|, or)
|
146
|
+
_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
|
147
|
+
_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
|
148
|
+
|
149
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
150
|
+
|
151
|
+
} // extern "C++"
|
152
|
+
|
153
|
+
#endif // __INDIRECT_ARRAY__
|
154
|
+
|
155
|
+
// Local Variables:
|
156
|
+
// mode:c++
|
157
|
+
// End:
|
@@ -0,0 +1,96 @@
|
|
1
|
+
// The -*- C++ -*- long_double_complex class.
|
2
|
+
// Copyright (C) 1994 Free Software Foundation
|
3
|
+
|
4
|
+
// This file is part of the GNU ANSI C++ Library. This library is free
|
5
|
+
// software; you can redistribute it and/or modify it under the
|
6
|
+
// terms of the GNU General Public License as published by the
|
7
|
+
// Free Software Foundation; either version 2, or (at your option)
|
8
|
+
// any later version.
|
9
|
+
|
10
|
+
// This library is distributed in the hope that it will be useful,
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
// GNU General Public License for more details.
|
14
|
+
|
15
|
+
// You should have received a copy of the GNU General Public License
|
16
|
+
// along with this library; see the file COPYING. If not, write to the Free
|
17
|
+
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
18
|
+
|
19
|
+
// As a special exception, if you link this library with files
|
20
|
+
// compiled with a GNU compiler to produce an executable, this does not cause
|
21
|
+
// the resulting executable to be covered by the GNU General Public License.
|
22
|
+
// This exception does not however invalidate any other reasons why
|
23
|
+
// the executable file might be covered by the GNU General Public License.
|
24
|
+
|
25
|
+
// Written by Jason Merrill based upon the specification in the 27 May 1994
|
26
|
+
// C++ working paper, ANSI document X3J16/94-0098.
|
27
|
+
|
28
|
+
#ifndef __LDCOMPLEX__
|
29
|
+
#define __LDCOMPLEX__
|
30
|
+
|
31
|
+
#ifdef __GNUG__
|
32
|
+
#pragma interface "ldcomplex"
|
33
|
+
#endif
|
34
|
+
|
35
|
+
extern "C++" {
|
36
|
+
template <>
|
37
|
+
class complex<long double>
|
38
|
+
{
|
39
|
+
public:
|
40
|
+
complex (long double r = 0, long double i = 0): re (r), im (i) { }
|
41
|
+
complex (const complex<float>& r): re (r.real ()), im (r.imag ()) { }
|
42
|
+
complex (const complex<double>& r): re (r.real ()), im (r.imag ()) { }
|
43
|
+
|
44
|
+
complex& operator+= (const complex& r) { return __doapl (this, r); }
|
45
|
+
complex& operator-= (const complex& r) { return __doami (this, r); }
|
46
|
+
complex& operator*= (const complex& r) { return __doaml (this, r); }
|
47
|
+
complex& operator/= (const complex& r) { return __doadv (this, r); }
|
48
|
+
|
49
|
+
long double real () const { return re; }
|
50
|
+
long double imag () const { return im; }
|
51
|
+
private:
|
52
|
+
long double re, im;
|
53
|
+
|
54
|
+
friend complex& __doapl<> (complex *, const complex&);
|
55
|
+
friend complex& __doami<> (complex *, const complex&);
|
56
|
+
friend complex& __doaml<> (complex *, const complex&);
|
57
|
+
friend complex& __doadv<> (complex *, const complex&);
|
58
|
+
|
59
|
+
#ifndef __STRICT_ANSI__
|
60
|
+
friend inline complex operator + (const complex& x, long double y)
|
61
|
+
{ return operator+<> (x, y); }
|
62
|
+
friend inline complex operator + (long double x, const complex& y)
|
63
|
+
{ return operator+<> (x, y); }
|
64
|
+
friend inline complex operator - (const complex& x, long double y)
|
65
|
+
{ return operator-<> (x, y); }
|
66
|
+
friend inline complex operator - (long double x, const complex& y)
|
67
|
+
{ return operator-<> (x, y); }
|
68
|
+
friend inline complex operator * (const complex& x, long double y)
|
69
|
+
{ return operator*<> (x, y); }
|
70
|
+
friend inline complex operator * (long double x, const complex& y)
|
71
|
+
{ return operator*<> (x, y); }
|
72
|
+
friend inline complex operator / (const complex& x, long double y)
|
73
|
+
{ return operator/<> (x, y); }
|
74
|
+
friend inline complex operator / (long double x, const complex& y)
|
75
|
+
{ return operator/<> (x, y); }
|
76
|
+
friend inline bool operator == (const complex& x, long double y)
|
77
|
+
{ return operator==<> (x, y); }
|
78
|
+
friend inline bool operator == (long double x, const complex& y)
|
79
|
+
{ return operator==<> (x, y); }
|
80
|
+
friend inline bool operator != (const complex& x, long double y)
|
81
|
+
{ return operator!=<> (x, y); }
|
82
|
+
friend inline bool operator != (long double x, const complex& y)
|
83
|
+
{ return operator!=<> (x, y); }
|
84
|
+
#endif /* __STRICT_ANSI__ */
|
85
|
+
};
|
86
|
+
|
87
|
+
inline complex<float>::complex (const complex<long double>& r)
|
88
|
+
: re (r.real ()), im (r.imag ())
|
89
|
+
{ }
|
90
|
+
|
91
|
+
inline complex<double>::complex (const complex<long double>& r)
|
92
|
+
: re (r.real ()), im (r.imag ())
|
93
|
+
{ }
|
94
|
+
} // extern "C++"
|
95
|
+
|
96
|
+
#endif
|
@@ -0,0 +1,154 @@
|
|
1
|
+
// The template and inlines for the -*- C++ -*- mask_array class.
|
2
|
+
|
3
|
+
// Copyright (C) 1997-1999 Cygnus Solutions
|
4
|
+
//
|
5
|
+
// This file is part of the GNU ISO C++ Library. This library is free
|
6
|
+
// software; you can redistribute it and/or modify it under the
|
7
|
+
// terms of the GNU General Public License as published by the
|
8
|
+
// Free Software Foundation; either version 2, or (at your option)
|
9
|
+
// any later version.
|
10
|
+
|
11
|
+
// This library is distributed in the hope that it will be useful,
|
12
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
// GNU General Public License for more details.
|
15
|
+
|
16
|
+
// You should have received a copy of the GNU General Public License along
|
17
|
+
// with this library; see the file COPYING. If not, write to the Free
|
18
|
+
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
19
|
+
// USA.
|
20
|
+
|
21
|
+
// As a special exception, you may use this file as part of a free software
|
22
|
+
// library without restriction. Specifically, if other files instantiate
|
23
|
+
// templates or use macros or inline functions from this file, or you compile
|
24
|
+
// this file and link it with other files to produce an executable, this
|
25
|
+
// file does not by itself cause the resulting executable to be covered by
|
26
|
+
// the GNU General Public License. This exception does not however
|
27
|
+
// invalidate any other reasons why the executable file might be covered by
|
28
|
+
// the GNU General Public License.
|
29
|
+
|
30
|
+
// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
|
31
|
+
|
32
|
+
#ifndef __MASK_ARRAY__
|
33
|
+
#define __MASK_ARRAY__
|
34
|
+
|
35
|
+
extern "C++" {
|
36
|
+
|
37
|
+
template <class _T> class mask_array
|
38
|
+
{
|
39
|
+
public:
|
40
|
+
typedef _T value_type;
|
41
|
+
|
42
|
+
void operator= (const valarray<_T>&) const;
|
43
|
+
void operator*= (const valarray<_T>&) const;
|
44
|
+
void operator/= (const valarray<_T>&) const;
|
45
|
+
void operator%= (const valarray<_T>&) const;
|
46
|
+
void operator+= (const valarray<_T>&) const;
|
47
|
+
void operator-= (const valarray<_T>&) const;
|
48
|
+
void operator^= (const valarray<_T>&) const;
|
49
|
+
void operator&= (const valarray<_T>&) const;
|
50
|
+
void operator|= (const valarray<_T>&) const;
|
51
|
+
void operator<<=(const valarray<_T>&) const;
|
52
|
+
void operator>>=(const valarray<_T>&) const;
|
53
|
+
void operator= (const _T&);
|
54
|
+
|
55
|
+
template<class _Dom>
|
56
|
+
void operator= (const _Expr<_Dom,_T>&) const;
|
57
|
+
template<class _Dom>
|
58
|
+
void operator*= (const _Expr<_Dom,_T>&) const;
|
59
|
+
template<class _Dom>
|
60
|
+
void operator/= (const _Expr<_Dom,_T>&) const;
|
61
|
+
template<class _Dom>
|
62
|
+
void operator%= (const _Expr<_Dom,_T>&) const;
|
63
|
+
template<class _Dom>
|
64
|
+
void operator+= (const _Expr<_Dom,_T>&) const;
|
65
|
+
template<class _Dom>
|
66
|
+
void operator-= (const _Expr<_Dom,_T>&) const;
|
67
|
+
template<class _Dom>
|
68
|
+
void operator^= (const _Expr<_Dom,_T>&) const;
|
69
|
+
template<class _Dom>
|
70
|
+
void operator&= (const _Expr<_Dom,_T>&) const;
|
71
|
+
template<class _Dom>
|
72
|
+
void operator|= (const _Expr<_Dom,_T>&) const;
|
73
|
+
template<class _Dom>
|
74
|
+
void operator<<=(const _Expr<_Dom,_T>&) const;
|
75
|
+
template<class _Dom>
|
76
|
+
void operator>>=(const _Expr<_Dom,_T>&) const;
|
77
|
+
|
78
|
+
private:
|
79
|
+
mask_array (_Array<_T>, size_t, _Array<bool>);
|
80
|
+
friend class valarray<_T>;
|
81
|
+
|
82
|
+
const size_t _M_sz;
|
83
|
+
const _Array<bool> _M_mask;
|
84
|
+
const _Array<_T> _M_array;
|
85
|
+
|
86
|
+
mask_array (const mask_array&);
|
87
|
+
|
88
|
+
// not implemented
|
89
|
+
mask_array ();
|
90
|
+
mask_array& operator= (const mask_array&);
|
91
|
+
};
|
92
|
+
|
93
|
+
template<typename _Tp>
|
94
|
+
inline mask_array<_Tp>::mask_array (const mask_array<_Tp>& a)
|
95
|
+
: _M_sz (a._M_sz), _M_mask (a._M_mask), _M_array (a._M_array) {}
|
96
|
+
|
97
|
+
template<typename _T>
|
98
|
+
inline
|
99
|
+
mask_array<_T>::mask_array (_Array<_T> __a, size_t __s, _Array<bool> __m)
|
100
|
+
: _M_sz (__s), _M_mask (__m), _M_array (__a) {}
|
101
|
+
|
102
|
+
template<typename _T>
|
103
|
+
inline void
|
104
|
+
mask_array<_T>::operator= (const _T& __t)
|
105
|
+
{ __valarray_fill (_M_array, _M_sz, _M_mask, __t); }
|
106
|
+
|
107
|
+
template<typename _T>
|
108
|
+
inline void
|
109
|
+
mask_array<_T>::operator= (const valarray<_T>& __v) const
|
110
|
+
{ __valarray_copy (_Array<_T> (__v), __v.size (), _M_array, _M_mask); }
|
111
|
+
|
112
|
+
template<typename _T>
|
113
|
+
template<class E>
|
114
|
+
inline void
|
115
|
+
mask_array<_T>::operator= (const _Expr<E, _T>& __e) const
|
116
|
+
{ __valarray_copy (__e, __e.size (), _M_array, _M_mask); }
|
117
|
+
|
118
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
119
|
+
#define _DEFINE_VALARRAY_OPERATOR(op, name) \
|
120
|
+
template<typename _T> \
|
121
|
+
inline void \
|
122
|
+
mask_array<_T>::operator op##= (const valarray<_T>& __v) const \
|
123
|
+
{ \
|
124
|
+
_Array_augmented_##name (_M_array, _M_mask, \
|
125
|
+
_Array<_T> (__v), __v.size ()); \
|
126
|
+
} \
|
127
|
+
\
|
128
|
+
template<typename _T> template<class E> \
|
129
|
+
inline void \
|
130
|
+
mask_array<_T>::operator op##= (const _Expr<E, _T>& __e) const \
|
131
|
+
{ \
|
132
|
+
_Array_augmented_##name (_M_array, _M_mask, __e, __e.size ()); \
|
133
|
+
}
|
134
|
+
|
135
|
+
_DEFINE_VALARRAY_OPERATOR(*, multiplies)
|
136
|
+
_DEFINE_VALARRAY_OPERATOR(/, divides)
|
137
|
+
_DEFINE_VALARRAY_OPERATOR(%, modulus)
|
138
|
+
_DEFINE_VALARRAY_OPERATOR(+, plus)
|
139
|
+
_DEFINE_VALARRAY_OPERATOR(-, minus)
|
140
|
+
_DEFINE_VALARRAY_OPERATOR(^, xor)
|
141
|
+
_DEFINE_VALARRAY_OPERATOR(&, and)
|
142
|
+
_DEFINE_VALARRAY_OPERATOR(|, or)
|
143
|
+
_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
|
144
|
+
_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
|
145
|
+
|
146
|
+
#undef _DEFINE_VALARRAY_OPERATOR
|
147
|
+
|
148
|
+
} // extern "C++"
|
149
|
+
|
150
|
+
#endif // __MASK_ARRAY__
|
151
|
+
|
152
|
+
// Local Variables:
|
153
|
+
// mode:c++
|
154
|
+
// End:
|