mirror of
https://github.com/boostorg/multi_array.git
synced 2026-02-08 11:02:09 +00:00
Compare commits
22 Commits
boost-1.72
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a31951fd81 | ||
|
|
88a22c7e11 | ||
|
|
15e5bd8665 | ||
|
|
2c89ceff08 | ||
|
|
e703d395d3 | ||
|
|
03710c74c7 | ||
|
|
34c8a706f4 | ||
|
|
99aa01c55f | ||
|
|
6471d119d7 | ||
|
|
3abaddaada | ||
|
|
8b1e05a1d0 | ||
|
|
00a17f84da | ||
|
|
a9f14e79f9 | ||
|
|
9e2150f864 | ||
|
|
333c304d84 | ||
|
|
d699673b1f | ||
|
|
0c5348bef7 | ||
|
|
dfbe377927 | ||
|
|
e8140d8183 | ||
|
|
3b40572055 | ||
|
|
eab203a2c5 | ||
|
|
e6f210c7ca |
71
.travis.yml
71
.travis.yml
@@ -5,6 +5,8 @@ language: cpp
|
||||
|
||||
sudo: false
|
||||
|
||||
dist: trusty
|
||||
|
||||
python: "2.7"
|
||||
|
||||
branches:
|
||||
@@ -97,7 +99,6 @@ matrix:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
@@ -109,7 +110,7 @@ matrix:
|
||||
|
||||
- os: linux
|
||||
compiler: g++-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@@ -117,10 +118,36 @@ matrix:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-9
|
||||
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.3
|
||||
|
||||
- os: linux
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.4
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.5
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||
@@ -131,6 +158,7 @@ matrix:
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.6
|
||||
@@ -139,9 +167,20 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.6
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.7
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.8
|
||||
@@ -153,6 +192,7 @@ matrix:
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.8
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.9
|
||||
@@ -164,6 +204,7 @@ matrix:
|
||||
- libstdc++-4.9-dev
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-4.0
|
||||
@@ -189,7 +230,7 @@ matrix:
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-6.0
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@@ -198,6 +239,28 @@ matrix:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-6.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-8
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||
|
||||
33
CMakeLists.txt
Normal file
33
CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by `boostdep --cmake multi_array`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_multi_array VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_multi_array INTERFACE)
|
||||
add_library(Boost::multi_array ALIAS boost_multi_array)
|
||||
|
||||
target_include_directories(boost_multi_array INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_multi_array
|
||||
INTERFACE
|
||||
Boost::array
|
||||
Boost::assert
|
||||
Boost::concept_check
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::functional
|
||||
Boost::iterator
|
||||
Boost::mpl
|
||||
Boost::type_traits
|
||||
)
|
||||
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
|
||||
29
build.jam
Normal file
29
build.jam
Normal file
@@ -0,0 +1,29 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2023-2024
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
require-b2 5.2 ;
|
||||
|
||||
constant boost_dependencies :
|
||||
/boost/array//boost_array
|
||||
/boost/assert//boost_assert
|
||||
/boost/concept_check//boost_concept_check
|
||||
/boost/config//boost_config
|
||||
/boost/core//boost_core
|
||||
/boost/functional//boost_functional
|
||||
/boost/iterator//boost_iterator
|
||||
/boost/mpl//boost_mpl
|
||||
/boost/type_traits//boost_type_traits ;
|
||||
|
||||
project /boost/multi_array
|
||||
;
|
||||
|
||||
explicit
|
||||
[ alias boost_multi_array : : :
|
||||
: <include>include <library>$(boost_dependencies) ]
|
||||
[ alias all : boost_multi_array test ]
|
||||
;
|
||||
|
||||
call-if : boost-library multi_array
|
||||
;
|
||||
@@ -58,7 +58,7 @@ containers. It specifies operations for accessing elements,
|
||||
traversing containers, and creating views
|
||||
of array data.
|
||||
MultiArray defines
|
||||
a flexible memory model that accomodates
|
||||
a flexible memory model that accommodates
|
||||
a variety of data layouts.
|
||||
</p><p>
|
||||
At each level (or dimension) of a MultiArray's
|
||||
@@ -145,7 +145,7 @@ base. Note that since positive index bases are
|
||||
possible, the origin need not exist in order to determine the location
|
||||
in memory of the MultiArray's elements.
|
||||
The strides determine how index values are mapped to memory offsets.
|
||||
They accomodate a
|
||||
They accommodate a
|
||||
number of possible element layouts. For example, the elements of a 2
|
||||
dimensional array can be stored by row (i.e., the elements of each row
|
||||
are stored contiguously) or by column (i.e., the elements of each
|
||||
@@ -303,7 +303,7 @@ This returns the number of values contained in
|
||||
<code class="literal">const element&</code> otherwise.
|
||||
</td><td>
|
||||
This expression accesses a specific element of
|
||||
<code class="literal">a</code>.<code class="literal">index_list</code> is the unique set
|
||||
<code class="literal">a</code>. <code class="literal">index_list</code> is the unique set
|
||||
of indices that address the element returned. It is
|
||||
equivalent to the following code (disregarding intermediate temporaries):
|
||||
<pre class="programlisting">
|
||||
@@ -427,16 +427,16 @@ with unspecified start and finish values.</td></tr><tr><td><code class="literal"
|
||||
value, this is equivalent to <code class="literal">i.start()</code>. Otherwise it
|
||||
returns <code class="literal">idx</code>.</td></tr><tr><td><code class="literal">i.get_finish(idx)</code></td><td><code class="literal">index</code></td><td>If <code class="literal">i</code> specifies a finish
|
||||
value, this is equivalent to <code class="literal">i.finish()</code>. Otherwise it
|
||||
returns <code class="literal">idx</code>.</td></tr><tr><td><code class="literal">i.size(idx)</code></td><td><code class="literal">size_type</code></td><td>If <code class="literal">i</code> specifies a both finish and
|
||||
start values, this is equivalent to
|
||||
returns <code class="literal">idx</code>.</td></tr><tr><td><code class="literal">i.size(idx)</code></td><td><code class="literal">size_type</code></td><td>If <code class="literal">i</code> specifies both a finish and a
|
||||
start value, this is equivalent to
|
||||
<code class="literal">(i.finish()-i.start())/i.stride()</code>. Otherwise it
|
||||
returns <code class="literal">idx</code>.</td></tr><tr><td><code class="literal">i < idx</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the finish
|
||||
value. This notation does not include
|
||||
<code class="literal">idx</code> in the range of valid indices. It is equivalent to
|
||||
<code class="literal">index_range(r.start(), idx, r.stride())</code></td></tr><tr><td><code class="literal">i <= idx</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the finish
|
||||
<code class="literal">index_range(r.start(), idx, r.stride())</code>.</td></tr><tr><td><code class="literal">i <= idx</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the finish
|
||||
value. This notation includes
|
||||
<code class="literal">idx</code> in the range of valid indices. It is equivalent to
|
||||
<code class="literal">index_range(r.start(), idx + 1, r.stride())</code></td></tr><tr><td><code class="literal">idx < i</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the start
|
||||
<code class="literal">index_range(r.start(), idx + 1, r.stride())</code>.</td></tr><tr><td><code class="literal">idx < i</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the start
|
||||
value. This notation does not include
|
||||
<code class="literal">idx</code> in the range of valid indices. It is equivalent to
|
||||
<code class="literal">index_range(idx + 1, i.finish(), i.stride())</code>.</td></tr><tr><td><code class="literal">idx <= i</code></td><td><code class="literal">index</code></td><td>This is another syntax for specifying the start
|
||||
@@ -444,9 +444,9 @@ value. This notation includes
|
||||
<code class="literal">idx1</code> in the range of valid indices. It is equivalent to
|
||||
<code class="literal">index_range(idx, i.finish(), i.stride())</code>.</td></tr><tr><td><code class="literal">i + idx</code></td><td><code class="literal">index</code></td><td>This expression shifts the start and finish values
|
||||
of <code class="literal">i</code> up by <code class="literal">idx</code>. It is equivalent to
|
||||
<code class="literal">index_range(r.start()+idx1, r.finish()+idx, r.stride())</code></td></tr><tr><td><code class="literal">i - idx</code></td><td><code class="literal">index</code></td><td>This expression shifts the start and finish values
|
||||
<code class="literal">index_range(r.start()+idx1, r.finish()+idx, r.stride())</code>.</td></tr><tr><td><code class="literal">i - idx</code></td><td><code class="literal">index</code></td><td>This expression shifts the start and finish values
|
||||
of <code class="literal">i</code> up by <code class="literal">idx</code>. It is equivalent to
|
||||
<code class="literal">index_range(r.start()-idx1, r.finish()-idx, r.stride())</code></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect3" title="index_gen"><div class="titlepage"><div><div><h4 class="title"><a name="index_gen"></a><code class="literal">index_gen</code></h4></div></div></div><p> <code class="literal">index_gen</code> aggregates
|
||||
<code class="literal">index_range(r.start()-idx1, r.finish()-idx, r.stride())</code>.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect3" title="index_gen"><div class="titlepage"><div><div><h4 class="title"><a name="index_gen"></a><code class="literal">index_gen</code></h4></div></div></div><p> <code class="literal">index_gen</code> aggregates
|
||||
<code class="literal">index_range</code> objects in order to specify view
|
||||
parameters. Chained calls to <code class="literal">operator[]</code> store
|
||||
range and dimension information used to
|
||||
@@ -560,7 +560,7 @@ void reindex(const BaseList& values);
|
||||
|
||||
</pre>
|
||||
</span></dt><dd><p>This changes the index bases of the <code class="literal">multi_array</code> to
|
||||
correspond to the the values in <code class="literal">values</code>.</p><p title="BaseList Requirements"><b><code class="literal">BaseList</code> Requirements. </b><code class="literal">BaseList</code> must model
|
||||
correspond to the values in <code class="literal">values</code>.</p><p title="BaseList Requirements"><b><code class="literal">BaseList</code> Requirements. </b><code class="literal">BaseList</code> must model
|
||||
<a class="ulink" href="../../utility/Collection.html" target="_top">Collection</a>.</p><p title="Preconditions"><b>Preconditions. </b><code class="literal">values.size() == NumDims;</code></p><p title="Postconditions"><b>Postconditions. </b><code class="literal">std::equal(values.begin(),values.end(),this->index_bases());
|
||||
</code></p></dd><dt><span class="term">
|
||||
<pre class="programlisting">
|
||||
@@ -745,7 +745,7 @@ multi_array(const const_array_view<NumDims>::type& x);
|
||||
multi_array(const multi_array_ref<ValueType,NumDims>& x);
|
||||
multi_array(const subarray<NumDims>::type& x);
|
||||
multi_array(const array_view<NumDims>::type& x);
|
||||
</pre></span></dt><dd><p>These constructors all constructs a <code class="literal">multi_array</code> and
|
||||
</pre></span></dt><dd><p>These constructors all construct a <code class="literal">multi_array</code> and
|
||||
perform a deep copy of <code class="literal">x</code>.
|
||||
</p><p title="Complexity"><b>Complexity. </b> This performs O(<code class="literal">x.num_elements()</code>) calls to
|
||||
<code class="literal">element</code>'s copy
|
||||
@@ -816,7 +816,7 @@ of the constructors.
|
||||
</p><p title="Model Of."><b>Model Of. </b>
|
||||
<code class="literal">multi_array_ref</code> models
|
||||
<a class="link" href="#MultiArray" title="MultiArray Concept">MultiArray</a>,
|
||||
<a class="ulink" href="../../../libs/utility/CopyConstructible.html" target="_top">CopyConstructible</a>.
|
||||
<a class="ulink" href="../../../libs/utility/CopyConstructible.html" target="_top">CopyConstructible</a>
|
||||
and depending on the element type, it may also model
|
||||
<a class="ulink" href="https://www.boost.org/sgi/stl/EqualityComparable.html" target="_top">EqualityComparable</a> and <a class="ulink" href="https://www.boost.org/sgi/stl/LessThanComparable.html" target="_top">LessThanComparable</a>.
|
||||
Detailed descriptions are provided here only for operations that are
|
||||
@@ -954,7 +954,7 @@ dimensions.
|
||||
multi_array_ref(const multi_array_ref& x);
|
||||
</pre></span></dt><dd><p>This constructs a shallow copy of <code class="literal">x</code>.
|
||||
</p><p title="Complexity"><b>Complexity. </b> Constant time (for contrast, compare this to
|
||||
the <code class="literal">multi_array</code> class copy constructor.
|
||||
the <code class="literal">multi_array</code> class copy constructor).
|
||||
</p></dd></dl></div><p title="Modifiers"><b>Modifiers. </b></p><div class="variablelist"><dl><dt><span class="term"><pre class="programlisting">
|
||||
multi_array_ref& operator=(const multi_array_ref& x);
|
||||
template <class Array> multi_array_ref& operator=(const Array& x);
|
||||
@@ -976,7 +976,7 @@ of the constructors.
|
||||
</p><p title="Model Of."><b>Model Of. </b>
|
||||
<code class="literal">const_multi_array_ref</code> models
|
||||
<a class="link" href="#MultiArray" title="MultiArray Concept">MultiArray</a>,
|
||||
<a class="ulink" href="../../../libs/utility/CopyConstructible.html" target="_top">CopyConstructible</a>.
|
||||
<a class="ulink" href="../../../libs/utility/CopyConstructible.html" target="_top">CopyConstructible</a>
|
||||
and depending on the element type, it may also model
|
||||
<a class="ulink" href="https://www.boost.org/sgi/stl/EqualityComparable.html" target="_top">EqualityComparable</a> and <a class="ulink" href="https://www.boost.org/sgi/stl/LessThanComparable.html" target="_top">LessThanComparable</a>.
|
||||
|
||||
@@ -1110,7 +1110,7 @@ associated with <code class="literal">multi_array</code>,
|
||||
<code class="literal">multi_array_ref</code>, and
|
||||
<code class="literal">const_multi_array_ref</code> that are not
|
||||
dependent upon template parameters. These types find common use with
|
||||
all Boost.Multiarray components. They are defined
|
||||
all Boost.MultiArray components. They are defined
|
||||
in a namespace from which they can be accessed conveniently.
|
||||
With the exception of <code class="literal">extent_gen</code> and
|
||||
<code class="literal">extent_range</code>, these types fulfill the roles of the
|
||||
@@ -1144,7 +1144,7 @@ public:
|
||||
<code class="literal">finish</code> must be greater than <code class="literal">start</code>.
|
||||
</p></dd><dt><span class="term"><code class="function">extent_range(index finish)</code></span></dt><dd><p>This constructor defines the half open interval
|
||||
<code class="literal">[0,finish)</code>. The value of <code class="literal">finish</code>
|
||||
must be positive.</p></dd><dt><span class="term"><code class="function">index start()</code></span></dt><dd><p>This function returns the first index represented by the range</p></dd><dt><span class="term"><code class="function">index finish()</code></span></dt><dd><p>This function returns the upper boundary value of the half-open
|
||||
must be positive.</p></dd><dt><span class="term"><code class="function">index start()</code></span></dt><dd><p>This function returns the first index represented by the range.</p></dd><dt><span class="term"><code class="function">index finish()</code></span></dt><dd><p>This function returns the upper boundary value of the half-open
|
||||
interval. Note that the range does not include this value.</p></dd><dt><span class="term"><code class="function">size_type size()</code></span></dt><dd><p>This function returns the size of the specified range. It is
|
||||
equivalent to <code class="literal">finish()-start()</code>.</p></dd></dl></div></div><div class="sect2" title="extent_gen"><div class="titlepage"><div><div><h3 class="title"><a name="extent_gen"></a><code class="classname">extent_gen</code></h3></div></div></div><p>The <code class="classname">extent_gen</code> class defines an
|
||||
interface for aggregating array shape and indexing information to be
|
||||
@@ -1205,7 +1205,7 @@ For example,
|
||||
a 3 by 3 by 3 <code class="classname">multi_array</code> is constructed as follows:
|
||||
</p><pre class="programlisting">multi_array<int,3> A(extents[3][3][3]);</pre><p>
|
||||
The same array could also be created by explicitly declaring an <code class="literal">extent_gen</code>
|
||||
object locally,, but the global object makes this declaration unnecessary.
|
||||
object locally, but the global object makes this declaration unnecessary.
|
||||
</p></div><div class="sect3" title="indices"><div class="titlepage"><div><div><h4 class="title"><a name="indices"></a><code class="literal">indices</code></h4></div></div></div><pre class="programlisting">
|
||||
namespace boost {
|
||||
multi_array_base::index_gen indices;
|
||||
@@ -1284,7 +1284,7 @@ int a[] = { 0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11 };
|
||||
int s[] = { 3, 1 };
|
||||
</pre><p>
|
||||
Notice that the strides here are different. As a result,
|
||||
The expression given above to access values will work with this pair
|
||||
the expression given above to access values will work with this pair
|
||||
of data and strides as well.
|
||||
</p><p>In addition to dimension order, it is also possible to
|
||||
store any dimension in descending order. For example, returning to the
|
||||
|
||||
@@ -198,7 +198,7 @@ provides a specialized set of constructors. For further information,
|
||||
consult their reference pages.
|
||||
|
||||
<p>All of the non-const array types in this library provide assignment
|
||||
operators<tt>operator=()</tt>. Each of the array types <tt>multi_array</tt>,
|
||||
operators <tt>operator=()</tt>. Each of the array types <tt>multi_array</tt>,
|
||||
<tt>multi_array_ref</tt>, <tt>subarray</tt>, and
|
||||
<tt>array_view</tt> can be assigned from any
|
||||
of the others, so long as their shapes match. The
|
||||
@@ -476,7 +476,7 @@ stored in ascending or descending order.
|
||||
// Store last dimension, then first, then middle
|
||||
array_type::size_type ordering[] = {2,0,1};
|
||||
|
||||
// Store the first dimension(dimension 0) in descending order
|
||||
// Store the first dimension (dimension 0) in descending order
|
||||
bool ascending[] = {false,true,true};
|
||||
|
||||
array_type A(extents[3][4][2],storage(ordering,ascending));
|
||||
@@ -488,7 +488,7 @@ stored in ascending or descending order.
|
||||
<h2>Setting The Array Base</h2>
|
||||
In some situations, it may be inconvenient or awkward to use an
|
||||
array that is zero-based.
|
||||
the Boost.MultiArray components provide two facilities for changing the
|
||||
The Boost.MultiArray components provide two facilities for changing the
|
||||
bases of an array. One may specify a pair of range values, with
|
||||
the <tt>extent_range</tt> type, to
|
||||
the <tt>extent_gen</tt> constructor in order to set the base value.
|
||||
|
||||
@@ -7,7 +7,7 @@ containers. It specifies operations for accessing elements,
|
||||
traversing containers, and creating views
|
||||
of array data.
|
||||
MultiArray defines
|
||||
a flexible memory model that accomodates
|
||||
a flexible memory model that accommodates
|
||||
a variety of data layouts.
|
||||
</para>
|
||||
|
||||
@@ -103,7 +103,7 @@ base. Note that since positive index bases are
|
||||
possible, the origin need not exist in order to determine the location
|
||||
in memory of the MultiArray's elements.
|
||||
The strides determine how index values are mapped to memory offsets.
|
||||
They accomodate a
|
||||
They accommodate a
|
||||
number of possible element layouts. For example, the elements of a 2
|
||||
dimensional array can be stored by row (i.e., the elements of each row
|
||||
are stored contiguously) or by column (i.e., the elements of each
|
||||
@@ -477,7 +477,7 @@ This returns the number of values contained in
|
||||
</entry>
|
||||
<entry>
|
||||
This expression accesses a specific element of
|
||||
<literal>a</literal>.<literal>index_list</literal> is the unique set
|
||||
<literal>a</literal>. <literal>index_list</literal> is the unique set
|
||||
of indices that address the element returned. It is
|
||||
equivalent to the following code (disregarding intermediate temporaries):
|
||||
<programlisting>
|
||||
@@ -818,8 +818,8 @@ returns <literal>idx</literal>.</entry>
|
||||
<row>
|
||||
<entry><literal>i.size(idx)</literal></entry>
|
||||
<entry><literal>size_type</literal></entry>
|
||||
<entry>If <literal>i</literal> specifies a both finish and
|
||||
start values, this is equivalent to
|
||||
<entry>If <literal>i</literal> specifies both a finish and a
|
||||
start value, this is equivalent to
|
||||
<literal>(i.finish()-i.start())/i.stride()</literal>. Otherwise it
|
||||
returns <literal>idx</literal>.</entry>
|
||||
</row>
|
||||
@@ -829,7 +829,7 @@ returns <literal>idx</literal>.</entry>
|
||||
<entry>This is another syntax for specifying the finish
|
||||
value. This notation does not include
|
||||
<literal>idx</literal> in the range of valid indices. It is equivalent to
|
||||
<literal>index_range(r.start(), idx, r.stride())</literal></entry>
|
||||
<literal>index_range(r.start(), idx, r.stride())</literal>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>i <= idx</literal></entry>
|
||||
@@ -837,7 +837,7 @@ value. This notation does not include
|
||||
<entry>This is another syntax for specifying the finish
|
||||
value. This notation includes
|
||||
<literal>idx</literal> in the range of valid indices. It is equivalent to
|
||||
<literal>index_range(r.start(), idx + 1, r.stride())</literal></entry>
|
||||
<literal>index_range(r.start(), idx + 1, r.stride())</literal>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>idx < i</literal></entry>
|
||||
@@ -860,14 +860,14 @@ value. This notation includes
|
||||
<entry><literal>index</literal></entry>
|
||||
<entry>This expression shifts the start and finish values
|
||||
of <literal>i</literal> up by <literal>idx</literal>. It is equivalent to
|
||||
<literal>index_range(r.start()+idx1, r.finish()+idx, r.stride())</literal></entry>
|
||||
<literal>index_range(r.start()+idx1, r.finish()+idx, r.stride())</literal>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>i - idx</literal></entry>
|
||||
<entry><literal>index</literal></entry>
|
||||
<entry>This expression shifts the start and finish values
|
||||
of <literal>i</literal> up by <literal>idx</literal>. It is equivalent to
|
||||
<literal>index_range(r.start()-idx1, r.finish()-idx, r.stride())</literal></entry>
|
||||
<literal>index_range(r.start()-idx1, r.finish()-idx, r.stride())</literal>.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
||||
@@ -282,7 +282,7 @@ void reindex(const BaseList& values);
|
||||
</term>
|
||||
<listitem>
|
||||
<para>This changes the index bases of the <literal>multi_array</literal> to
|
||||
correspond to the the values in <literal>values</literal>.</para>
|
||||
correspond to the values in <literal>values</literal>.</para>
|
||||
|
||||
<formalpara>
|
||||
<title><literal>BaseList</literal> Requirements</title>
|
||||
@@ -364,7 +364,7 @@ associated with <literal>multi_array</literal>,
|
||||
<literal>multi_array_ref</literal>, and
|
||||
<literal>const_multi_array_ref</literal> that are not
|
||||
dependent upon template parameters. These types find common use with
|
||||
all Boost.Multiarray components. They are defined
|
||||
all Boost.MultiArray components. They are defined
|
||||
in a namespace from which they can be accessed conveniently.
|
||||
With the exception of <literal>extent_gen</literal> and
|
||||
<literal>extent_range</literal>, these types fulfill the roles of the
|
||||
@@ -434,7 +434,7 @@ must be positive.</para>
|
||||
|
||||
<varlistentry><term><function>index start()</function></term>
|
||||
<listitem>
|
||||
<para>This function returns the first index represented by the range</para>
|
||||
<para>This function returns the first index represented by the range.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -562,7 +562,7 @@ For example,
|
||||
a 3 by 3 by 3 <classname>multi_array</classname> is constructed as follows:
|
||||
<programlisting>multi_array<int,3> A(extents[3][3][3]);</programlisting>
|
||||
The same array could also be created by explicitly declaring an <literal>extent_gen</literal>
|
||||
object locally,, but the global object makes this declaration unnecessary.
|
||||
object locally, but the global object makes this declaration unnecessary.
|
||||
</para>
|
||||
</sect3>
|
||||
|
||||
@@ -666,7 +666,7 @@ int a[] = { 0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11 };
|
||||
int s[] = { 3, 1 };
|
||||
</programlisting>
|
||||
Notice that the strides here are different. As a result,
|
||||
The expression given above to access values will work with this pair
|
||||
the expression given above to access values will work with this pair
|
||||
of data and strides as well.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ of the constructors.
|
||||
<para>
|
||||
<literal>const_multi_array_ref</literal> models
|
||||
<link linkend="MultiArray">MultiArray</link>,
|
||||
<ulink url="../../../libs/utility/CopyConstructible.html">CopyConstructible</ulink>.
|
||||
<ulink url="../../../libs/utility/CopyConstructible.html">CopyConstructible</ulink>
|
||||
and depending on the element type, it may also model
|
||||
<ulink url="https://www.boost.org/sgi/stl/EqualityComparable.html">EqualityComparable</ulink> and <ulink url="https://www.boost.org/sgi/stl/LessThanComparable.html">LessThanComparable</ulink>.
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ multi_array(const array_view<NumDims>::type& x,
|
||||
const Allocator& alloc = Allocator());]]>
|
||||
</programlisting></term>
|
||||
<listitem>
|
||||
<para>These constructors all constructs a <literal>multi_array</literal> and
|
||||
<para>These constructors all construct a <literal>multi_array</literal> and
|
||||
perform a deep copy of <literal>x</literal>.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ of the constructors.
|
||||
<para>
|
||||
<literal>multi_array_ref</literal> models
|
||||
<link linkend="MultiArray">MultiArray</link>,
|
||||
<ulink url="../../../libs/utility/CopyConstructible.html">CopyConstructible</ulink>.
|
||||
<ulink url="../../../libs/utility/CopyConstructible.html">CopyConstructible</ulink>
|
||||
and depending on the element type, it may also model
|
||||
<ulink url="https://www.boost.org/sgi/stl/EqualityComparable.html">EqualityComparable</ulink> and <ulink url="https://www.boost.org/sgi/stl/LessThanComparable.html">LessThanComparable</ulink>.
|
||||
Detailed descriptions are provided here only for operations that are
|
||||
@@ -198,7 +198,7 @@ dimensions.
|
||||
<formalpara>
|
||||
<title>Complexity</title>
|
||||
<para> Constant time (for contrast, compare this to
|
||||
the <literal>multi_array</literal> class copy constructor.
|
||||
the <literal>multi_array</literal> class copy constructor).
|
||||
</para></formalpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_MULTI_ARRAY_RG071801_HPP
|
||||
#define BOOST_MULTI_ARRAY_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_HPP
|
||||
#define BOOST_MULTI_ARRAY_HPP
|
||||
|
||||
//
|
||||
// multi_array.hpp - contains the multi_array class template
|
||||
@@ -569,4 +569,4 @@ private:
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MULTI_ARRAY_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef BOOST_ALGORITHM_RG071801_HPP
|
||||
#define BOOST_ALGORITHM_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_ALGORITHM_HPP
|
||||
#define BOOST_MULTI_ARRAY_ALGORITHM_HPP
|
||||
|
||||
//
|
||||
//
|
||||
@@ -100,4 +100,4 @@ copy_n(InputIter first, Size count, OutputIter result) {
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ALGORITHM_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BASE_RG071801_HPP
|
||||
#define BASE_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_BASE_HPP
|
||||
#define BOOST_MULTI_ARRAY_BASE_HPP
|
||||
|
||||
//
|
||||
// base.hpp - some implementation base classes for from which
|
||||
@@ -498,4 +498,4 @@ protected:
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BASE_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef COLLECTION_CONCEPT_RG103101_HPP
|
||||
#define COLLECTION_CONCEPT_RG103101_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
|
||||
#define BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
|
||||
|
||||
#include "boost/concept_check.hpp"
|
||||
|
||||
@@ -23,4 +23,4 @@ namespace multi_array { // Old location for this
|
||||
}
|
||||
|
||||
}
|
||||
#endif // COLLECTION_CONCEPT_RG103101_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
|
||||
#define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
|
||||
#define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
|
||||
|
||||
//
|
||||
// concept-checks.hpp - Checks out Const MultiArray and MultiArray
|
||||
@@ -218,4 +218,4 @@ namespace detail {
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef COPY_ARRAY_RG092101_HPP
|
||||
#define COPY_ARRAY_RG092101_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
|
||||
#define BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
|
||||
|
||||
//
|
||||
// copy_array.hpp - generic code for copying the contents of one
|
||||
@@ -65,4 +65,4 @@ void copy_array (Array1& source, Array2& dest) {
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // COPY_ARRAY_RG092101_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_EXTENT_GEN_RG071801_HPP
|
||||
#define BOOST_EXTENT_GEN_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
|
||||
#define BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
|
||||
|
||||
#include "boost/multi_array/extent_range.hpp"
|
||||
#include "boost/multi_array/range_list.hpp"
|
||||
@@ -72,4 +72,4 @@ public:
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_EXTENT_GEN_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_EXTENT_RANGE_RG071801_HPP
|
||||
#define BOOST_EXTENT_RANGE_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
|
||||
#define BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
|
||||
|
||||
#include <utility>
|
||||
|
||||
@@ -46,4 +46,4 @@ public:
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_EXTENT_RANGE_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_INDEX_GEN_RG071801_HPP
|
||||
#define BOOST_INDEX_GEN_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_INDEX_GEN_HPP
|
||||
#define BOOST_MULTI_ARRAY_INDEX_GEN_HPP
|
||||
|
||||
#include "boost/array.hpp"
|
||||
#include "boost/multi_array/index_range.hpp"
|
||||
@@ -78,4 +78,4 @@ public:
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_INDEX_GEN_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_INDEX_RANGE_RG071801_HPP
|
||||
#define BOOST_INDEX_RANGE_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
|
||||
#define BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <utility>
|
||||
@@ -191,4 +191,4 @@ namespace multi_array {
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_INDEX_RANGE_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2002 The Trustees of Indiana University.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -10,16 +10,19 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef ITERATOR_RG071801_HPP
|
||||
#define ITERATOR_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_ITERATOR_HPP
|
||||
#define BOOST_MULTI_ARRAY_ITERATOR_HPP
|
||||
|
||||
//
|
||||
// iterator.hpp - implementation of iterators for the
|
||||
// multi-dimensional array class
|
||||
//
|
||||
|
||||
#include "boost/multi_array/base.hpp"
|
||||
#include "boost/iterator/iterator_facade.hpp"
|
||||
#include <boost/multi_array/base.hpp>
|
||||
#include <boost/type.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/enable_if_convertible.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
@@ -51,7 +54,7 @@ template <typename T, typename TPtr, typename NumDims, typename Reference,
|
||||
typename IteratorCategory>
|
||||
class array_iterator
|
||||
: public
|
||||
iterator_facade<
|
||||
iterators::iterator_facade<
|
||||
array_iterator<T,TPtr,NumDims,Reference,IteratorCategory>
|
||||
, typename associated_types<T,NumDims>::value_type
|
||||
, IteratorCategory
|
||||
@@ -60,13 +63,13 @@ class array_iterator
|
||||
, private
|
||||
value_accessor_generator<T,NumDims>::type
|
||||
{
|
||||
friend class ::boost::iterator_core_access;
|
||||
friend class ::boost::iterators::iterator_core_access;
|
||||
typedef detail::multi_array::associated_types<T,NumDims> access_t;
|
||||
|
||||
typedef iterator_facade<
|
||||
typedef iterators::iterator_facade<
|
||||
array_iterator<T,TPtr,NumDims,Reference,IteratorCategory>
|
||||
, typename detail::multi_array::associated_types<T,NumDims>::value_type
|
||||
, boost::random_access_traversal_tag
|
||||
, boost::iterators::random_access_traversal_tag
|
||||
, Reference
|
||||
> facade_type;
|
||||
|
||||
@@ -78,14 +81,14 @@ class array_iterator
|
||||
friend class array_iterator;
|
||||
#else
|
||||
public:
|
||||
#endif
|
||||
#endif
|
||||
|
||||
index idx_;
|
||||
TPtr base_;
|
||||
const size_type* extents_;
|
||||
const index* strides_;
|
||||
const index* index_base_;
|
||||
|
||||
|
||||
public:
|
||||
// Typedefs to circumvent ambiguities between parent classes
|
||||
typedef typename facade_type::reference reference;
|
||||
@@ -103,7 +106,7 @@ public:
|
||||
template <typename OPtr, typename ORef, typename Cat>
|
||||
array_iterator(
|
||||
const array_iterator<T,OPtr,NumDims,ORef,Cat>& rhs
|
||||
, typename boost::enable_if_convertible<OPtr,TPtr>::type* = 0
|
||||
, typename boost::iterators::enable_if_convertible<OPtr,TPtr>::type* = 0
|
||||
)
|
||||
: idx_(rhs.idx_), base_(rhs.base_), extents_(rhs.extents_),
|
||||
strides_(rhs.strides_), index_base_(rhs.index_base_) { }
|
||||
@@ -115,7 +118,7 @@ public:
|
||||
{
|
||||
return operator_arrow_proxy<reference>(this->dereference());
|
||||
}
|
||||
|
||||
|
||||
|
||||
reference dereference() const
|
||||
{
|
||||
@@ -127,7 +130,7 @@ public:
|
||||
strides_,
|
||||
index_base_);
|
||||
}
|
||||
|
||||
|
||||
void increment() { ++idx_; }
|
||||
void decrement() { --idx_; }
|
||||
|
||||
@@ -162,4 +165,4 @@ public:
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // ITERATOR_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_MULTI_ARRAY_REF_RG071801_HPP
|
||||
#define BOOST_MULTI_ARRAY_REF_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
|
||||
#define BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
|
||||
|
||||
//
|
||||
// multi_array_ref.hpp - code for creating "views" of array data.
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
boost::function_requires<
|
||||
CollectionConcept<ExtentList> >();
|
||||
|
||||
index_base_list_.assign(0);
|
||||
index_base_list_.fill(0);
|
||||
init_multi_array_ref(extents.begin());
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
init_multi_array_ref(extents);
|
||||
} else {
|
||||
boost::array<index,NumDims> extent_list;
|
||||
extent_list.assign(0);
|
||||
extent_list.fill(0);
|
||||
init_multi_array_ref(extent_list.begin());
|
||||
}
|
||||
}
|
||||
@@ -619,4 +619,4 @@ protected:
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_MULTI_ARRAY_REF_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef RANGE_LIST_RG072501_HPP
|
||||
#define RANGE_LIST_RG072501_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_RANGE_LIST_HPP
|
||||
#define BOOST_MULTI_ARRAY_RANGE_LIST_HPP
|
||||
//
|
||||
// range_list.hpp - helper to build boost::arrays for *_set types
|
||||
//
|
||||
@@ -67,4 +67,4 @@ public:
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // RANGE_LIST_RG072501_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_STORAGE_ORDER_RG071801_HPP
|
||||
#define BOOST_STORAGE_ORDER_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
|
||||
#define BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
|
||||
|
||||
#include "boost/multi_array/types.hpp"
|
||||
#include "boost/array.hpp"
|
||||
@@ -48,14 +48,14 @@ namespace boost {
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering_[i] = NumDims - 1 - i;
|
||||
}
|
||||
ascending_.assign(true);
|
||||
ascending_.fill(true);
|
||||
}
|
||||
|
||||
general_storage_order(const fortran_storage_order&) {
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering_[i] = i;
|
||||
}
|
||||
ascending_.assign(true);
|
||||
ascending_.fill(true);
|
||||
}
|
||||
|
||||
size_type ordering(size_type dim) const { return ordering_[dim]; }
|
||||
@@ -122,4 +122,4 @@ namespace boost {
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ARRAY_STORAGE_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef SUBARRAY_RG071801_HPP
|
||||
#define SUBARRAY_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_SUBARRAY_HPP
|
||||
#define BOOST_MULTI_ARRAY_SUBARRAY_HPP
|
||||
|
||||
//
|
||||
// subarray.hpp - used to implement standard operator[] on
|
||||
@@ -384,4 +384,4 @@ public:
|
||||
};
|
||||
} // namespace boost
|
||||
|
||||
#endif // SUBARRAY_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
|
||||
#define BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_TYPES_HPP
|
||||
#define BOOST_MULTI_ARRAY_TYPES_HPP
|
||||
|
||||
//
|
||||
// types.hpp - supply types that are needed by several headers
|
||||
@@ -35,4 +35,4 @@ typedef std::ptrdiff_t index;
|
||||
|
||||
|
||||
|
||||
#endif // BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
|
||||
#define BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_VIEW_HPP
|
||||
#define BOOST_MULTI_ARRAY_VIEW_HPP
|
||||
|
||||
//
|
||||
// view.hpp - code for creating "views" of array data.
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
|
||||
void reindex(index value) {
|
||||
index_base_list_.assign(value);
|
||||
index_base_list_.fill(value);
|
||||
origin_offset_ =
|
||||
this->calculate_indexing_offset(stride_list_,index_base_list_);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public: // should be protected
|
||||
const boost::array<Index,NumDims>& strides):
|
||||
base_(base), origin_offset_(0) {
|
||||
|
||||
index_base_list_.assign(0);
|
||||
index_base_list_.fill(0);
|
||||
|
||||
// Get the extents and strides
|
||||
boost::detail::multi_array::
|
||||
@@ -457,5 +457,4 @@ public:
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
],
|
||||
"maintainers": [
|
||||
"Ronald Garcia <garcia -at- osl.iu.edu>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
project : requirements <library>/boost/multi_array//boost_multi_array ;
|
||||
|
||||
compile-fail fail_cbracket.cpp ;
|
||||
compile-fail fail_cdata.cpp ;
|
||||
compile-fail fail_citerator.cpp ;
|
||||
@@ -15,7 +17,7 @@ compile-fail fail_csubarray.cpp ;
|
||||
compile-fail fail_csubarray2.cpp ;
|
||||
compile-fail fail_csubarray3.cpp ;
|
||||
compile-fail fail_cview.cpp ;
|
||||
compile-fail fail_cview2.cpp ;
|
||||
compile-fail fail_cview2.cpp : <library>/boost/test//included ;
|
||||
compile-fail fail_cview3.cpp ;
|
||||
compile-fail fail_ref_cbracket.cpp ;
|
||||
compile-fail fail_ref_cdata.cpp ;
|
||||
@@ -28,7 +30,7 @@ compile-fail fail_ref_csubarray3.cpp ;
|
||||
compile-fail fail_ref_cview.cpp ;
|
||||
compile-fail fail_ref_cview2.cpp ;
|
||||
compile-fail fail_ref_cview3.cpp ;
|
||||
|
||||
|
||||
run constructors.cpp ;
|
||||
run access.cpp ;
|
||||
run compare.cpp ;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef GENERATIVE_TESTS_RG072001_HPP
|
||||
#define GENERATIVE_TESTS_RG072001_HPP
|
||||
#ifndef BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
|
||||
#define BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
|
||||
|
||||
// Copyright 2002 The Trustees of Indiana University.
|
||||
|
||||
@@ -279,4 +279,4 @@ int run_generative_tests() {
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
#endif // GENERATIVE_TESTS_RG072001_HPP
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user