Commit 82cb2574 by Paolo Carlini Committed by Paolo Carlini

indirect_array.h: Trivial formatting fixes.

2004-08-16  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/indirect_array.h: Trivial formatting fixes.
	* include/bits/valarray_after.h: Likewise.
	* include/bits/valarray_array.h: Likewise.
	* src/valarray-inst.cc: Likewise.

From-SVN: r86056
parent 8242fd2d
2004-08-16 Paolo Carlini <pcarlini@suse.de>
* include/bits/indirect_array.h: Trivial formatting fixes.
* include/bits/valarray_after.h: Likewise.
* include/bits/valarray_array.h: Likewise.
* src/valarray-inst.cc: Likewise.
2004-08-15 Paolo Carlini <pcarlini@suse.de>
* testsuite/27_io/basic_stringstream/rdbuf/char/2832.cc: Remove junk.
......
......@@ -46,10 +46,10 @@ namespace std
* @brief Reference to arbitrary subset of an array.
*
* An indirect_array is a reference to the actual elements of an array
* specified by an ordered array of indices. The way to get an indirect_array is to
* call operator[](valarray<size_t>) on a valarray. The returned
* indirect_array then permits carrying operations out on the referenced
* subset of elements in the original valarray.
* specified by an ordered array of indices. The way to get an
* indirect_array is to call operator[](valarray<size_t>) on a valarray.
* The returned indirect_array then permits carrying operations out on the
* referenced subset of elements in the original valarray.
*
* For example, if an indirect_array is obtained using the array (4,2,0) as
* an argument, and then assigned to an array containing (1,2,3), then the
......@@ -152,7 +152,8 @@ namespace std
inline indirect_array<_Tp>&
indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a)
{
std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array, _M_index);
std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array,
_M_index);
return *this;
}
......@@ -169,7 +170,7 @@ namespace std
template<typename _Tp>
template<class _Dom>
inline void
indirect_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
{ std::__valarray_copy(__e, _M_sz, _M_array, _M_index); }
#undef _DEFINE_VALARRAY_OPERATOR
......
......@@ -127,7 +127,9 @@ namespace std
operator[] (size_t __i) const
{ return _M_expr[_M_index[__i]]; }
size_t size() const { return _M_index.size(); }
size_t
size() const
{ return _M_index.size(); }
private:
const _Dom& _M_expr;
......
// The template and inlines for the -*- C++ -*- internal _Array helper class.
// Copyright (C) 1997, 1998, 1999, 2000, 2003
// Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
......@@ -314,11 +314,10 @@ namespace std
__dst[__i * __s2] = __src[__i * __s1];
}
// Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
template<typename _Tp>
inline void
__valarray_copy (const _Tp* __restrict__ __a,
__valarray_copy(const _Tp* __restrict__ __a,
const size_t* __restrict__ __i,
_Tp* __restrict__ __b, size_t __n)
{
......@@ -329,7 +328,7 @@ namespace std
// Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
template<typename _Tp>
inline void
__valarray_copy (const _Tp* __restrict__ __a, size_t __n,
__valarray_copy(const _Tp* __restrict__ __a, size_t __n,
_Tp* __restrict__ __b, const size_t* __restrict__ __i)
{
for (size_t __j = 0; __j < __n; ++__j, ++__a, ++__i)
......@@ -471,7 +470,6 @@ namespace std
_Array<_Tp> __b, size_t __s2)
{ std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
// Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
template<typename _Tp>
inline void
......
// Explicit instantiation file.
// Copyright (C) 2001 Free Software Foundation, Inc.
// Copyright (C) 2001, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
......@@ -48,7 +48,6 @@ namespace std
template size_t valarray<size_t>::size() const;
template size_t& valarray<size_t>::operator[](size_t);
inline size_t
__valarray_product(const valarray<size_t>& __a)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment