mirror of
https://github.com/boostorg/multi_array.git
synced 2026-01-25 18:32:13 +00:00
Compare commits
7 Commits
boost-1.71
...
bugfix/ren
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
894c172d10 | ||
|
|
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
|
||||
|
||||
34
CMakeLists.txt
Normal file
34
CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
# 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::static_assert
|
||||
Boost::type_traits
|
||||
)
|
||||
|
||||
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -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
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
|
||||
template <class ExtentList>
|
||||
explicit multi_array(
|
||||
ExtentList const& extents,
|
||||
ExtentList const& _extents,
|
||||
const Allocator& alloc = Allocator()
|
||||
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
, typename mpl::if_<
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
int&,int>::type* = 0
|
||||
#endif
|
||||
) :
|
||||
super_type((T*)initial_base_,extents),
|
||||
super_type((T*)initial_base_,_extents),
|
||||
alloc_base(boost::empty_init_t(),alloc) {
|
||||
boost::function_requires<
|
||||
detail::multi_array::CollectionConcept<ExtentList> >();
|
||||
@@ -175,9 +175,9 @@ public:
|
||||
|
||||
|
||||
template <class ExtentList>
|
||||
explicit multi_array(ExtentList const& extents,
|
||||
explicit multi_array(ExtentList const& _extents,
|
||||
const general_storage_order<NumDims>& so) :
|
||||
super_type((T*)initial_base_,extents,so),
|
||||
super_type((T*)initial_base_,_extents,so),
|
||||
alloc_base(boost::empty_init_t()) {
|
||||
boost::function_requires<
|
||||
detail::multi_array::CollectionConcept<ExtentList> >();
|
||||
@@ -185,10 +185,10 @@ public:
|
||||
}
|
||||
|
||||
template <class ExtentList>
|
||||
explicit multi_array(ExtentList const& extents,
|
||||
explicit multi_array(ExtentList const& _extents,
|
||||
const general_storage_order<NumDims>& so,
|
||||
Allocator const& alloc) :
|
||||
super_type((T*)initial_base_,extents,so),
|
||||
super_type((T*)initial_base_,_extents,so),
|
||||
alloc_base(boost::empty_init_t(),alloc) {
|
||||
boost::function_requires<
|
||||
detail::multi_array::CollectionConcept<ExtentList> >();
|
||||
@@ -433,7 +433,7 @@ public:
|
||||
|
||||
|
||||
template <typename ExtentList>
|
||||
multi_array& resize(const ExtentList& extents) {
|
||||
multi_array& resize(const ExtentList& _extents) {
|
||||
boost::function_requires<
|
||||
detail::multi_array::CollectionConcept<ExtentList> >();
|
||||
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
|
||||
for (int i=0; i != NumDims; ++i) {
|
||||
typedef typename gen_type::range range_type;
|
||||
ranges.ranges_[i] = range_type(0,extents[i]);
|
||||
ranges.ranges_[i] = range_type(0,_extents[i]);
|
||||
}
|
||||
|
||||
return this->resize(ranges);
|
||||
@@ -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
|
||||
@@ -128,15 +128,15 @@ protected:
|
||||
// used by array operator[] and iterators to get reference types.
|
||||
template <typename Reference, typename TPtr>
|
||||
Reference access(boost::type<Reference>,index idx,TPtr base,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
|
||||
BOOST_ASSERT(idx - index_bases[0] >= 0);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < _extents[0]);
|
||||
// return a sub_array<T,NDims-1> proxy object
|
||||
TPtr newbase = base + idx * strides[0];
|
||||
return Reference(newbase,extents+1,strides+1,index_bases+1);
|
||||
return Reference(newbase,_extents+1,strides+1,index_bases+1);
|
||||
|
||||
}
|
||||
|
||||
@@ -168,14 +168,14 @@ protected:
|
||||
// used by array operator[] and iterators to get reference types.
|
||||
template <typename Reference, typename TPtr>
|
||||
Reference access(boost::type<Reference>,index idx,TPtr base,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
|
||||
ignore_unused_variable_warning(index_bases);
|
||||
ignore_unused_variable_warning(extents);
|
||||
ignore_unused_variable_warning(_extents);
|
||||
BOOST_ASSERT(idx - index_bases[0] >= 0);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < _extents[0]);
|
||||
return *(base + idx * strides[0]);
|
||||
}
|
||||
|
||||
@@ -299,17 +299,17 @@ protected:
|
||||
Reference access_element(boost::type<Reference>,
|
||||
const IndexList& indices,
|
||||
TPtr base,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
boost::function_requires<
|
||||
CollectionConcept<IndexList> >();
|
||||
ignore_unused_variable_warning(index_bases);
|
||||
ignore_unused_variable_warning(extents);
|
||||
ignore_unused_variable_warning(_extents);
|
||||
#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS)
|
||||
for (size_type i = 0; i != NumDims; ++i) {
|
||||
BOOST_ASSERT(indices[i] - index_bases[i] >= 0);
|
||||
BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < extents[i]);
|
||||
BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < _extents[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -408,7 +408,7 @@ protected:
|
||||
generate_array_view(boost::type<ArrayRef>,
|
||||
const boost::detail::multi_array::
|
||||
index_gen<NumDims,NDims>& indices,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_bases,
|
||||
TPtr base) const {
|
||||
@@ -422,7 +422,7 @@ protected:
|
||||
|
||||
// Use array specs and input specs to produce real specs.
|
||||
const index default_start = index_bases[n];
|
||||
const index default_finish = default_start+extents[n];
|
||||
const index default_finish = default_start+_extents[n];
|
||||
const index_range& current_range = indices.ranges_[n];
|
||||
index start = current_range.get_start(default_start);
|
||||
index finish = current_range.get_finish(default_finish);
|
||||
@@ -453,8 +453,8 @@ protected:
|
||||
// exactly in the set of legal indices
|
||||
// with a special case for empty arrays
|
||||
BOOST_ASSERT(index_bases[n] <= start &&
|
||||
((start <= index_bases[n]+index(extents[n])) ||
|
||||
(start == index_bases[n] && extents[n] == 0)));
|
||||
((start <= index_bases[n]+index(_extents[n])) ||
|
||||
(start == index_bases[n] && _extents[n] == 0)));
|
||||
|
||||
#ifndef BOOST_DISABLE_ASSERTS
|
||||
// finish marks the open side of the range, so it can go one past
|
||||
@@ -462,7 +462,7 @@ protected:
|
||||
// if stride is negative).
|
||||
index bound_adjustment = stride < 0 ? 1 : 0;
|
||||
BOOST_ASSERT(((index_bases[n] - bound_adjustment) <= finish) &&
|
||||
(finish <= (index_bases[n] + index(extents[n]) - bound_adjustment)));
|
||||
(finish <= (index_bases[n] + index(_extents[n]) - bound_adjustment)));
|
||||
ignore_unused_variable_warning(bound_adjustment);
|
||||
#endif // BOOST_DISABLE_ASSERTS
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
// 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
|
||||
@@ -94,10 +94,10 @@ public:
|
||||
|
||||
array_iterator() {}
|
||||
|
||||
array_iterator(index idx, TPtr base, const size_type* extents,
|
||||
array_iterator(index idx, TPtr base, const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_base) :
|
||||
idx_(idx), base_(base), extents_(extents),
|
||||
idx_(idx), base_(base), extents_(_extents),
|
||||
strides_(strides), index_base_(index_base) { }
|
||||
|
||||
template <typename OPtr, typename ORef, typename Cat>
|
||||
@@ -162,4 +162,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.
|
||||
@@ -87,24 +87,24 @@ public:
|
||||
num_elements_(other.num_elements_) { }
|
||||
|
||||
template <typename ExtentList>
|
||||
explicit const_multi_array_ref(TPtr base, const ExtentList& extents) :
|
||||
explicit const_multi_array_ref(TPtr base, const ExtentList& _extents) :
|
||||
base_(base), storage_(c_storage_order()) {
|
||||
boost::function_requires<
|
||||
CollectionConcept<ExtentList> >();
|
||||
|
||||
index_base_list_.assign(0);
|
||||
init_multi_array_ref(extents.begin());
|
||||
init_multi_array_ref(_extents.begin());
|
||||
}
|
||||
|
||||
template <typename ExtentList>
|
||||
explicit const_multi_array_ref(TPtr base, const ExtentList& extents,
|
||||
explicit const_multi_array_ref(TPtr base, const ExtentList& _extents,
|
||||
const general_storage_order<NumDims>& so) :
|
||||
base_(base), storage_(so) {
|
||||
boost::function_requires<
|
||||
CollectionConcept<ExtentList> >();
|
||||
|
||||
index_base_list_.assign(0);
|
||||
init_multi_array_ref(extents.begin());
|
||||
init_multi_array_ref(_extents.begin());
|
||||
}
|
||||
|
||||
explicit const_multi_array_ref(TPtr base,
|
||||
@@ -162,14 +162,14 @@ public:
|
||||
}
|
||||
|
||||
template <typename SizeList>
|
||||
void reshape(const SizeList& extents) {
|
||||
void reshape(const SizeList& _extents) {
|
||||
boost::function_requires<
|
||||
CollectionConcept<SizeList> >();
|
||||
BOOST_ASSERT(num_elements_ ==
|
||||
std::accumulate(extents.begin(),extents.end(),
|
||||
std::accumulate(_extents.begin(),_extents.end(),
|
||||
size_type(1),std::multiplies<size_type>()));
|
||||
|
||||
std::copy(extents.begin(),extents.end(),extent_list_.begin());
|
||||
std::copy(_extents.begin(),_extents.end(),extent_list_.begin());
|
||||
this->compute_strides(stride_list_,extent_list_,storage_);
|
||||
|
||||
origin_offset_ =
|
||||
@@ -325,7 +325,7 @@ public:
|
||||
const_multi_array_ref(TPtr base,
|
||||
const storage_order_type& so,
|
||||
const index * index_bases,
|
||||
const size_type* extents) :
|
||||
const size_type* _extents) :
|
||||
base_(base), storage_(so), origin_offset_(0), directional_offset_(0)
|
||||
{
|
||||
// If index_bases or extents is null, then initialize the corresponding
|
||||
@@ -336,8 +336,8 @@ public:
|
||||
} else {
|
||||
std::fill_n(index_base_list_.begin(),NumDims,0);
|
||||
}
|
||||
if(extents) {
|
||||
init_multi_array_ref(extents);
|
||||
if(_extents) {
|
||||
init_multi_array_ref(_extents);
|
||||
} else {
|
||||
boost::array<index,NumDims> extent_list;
|
||||
extent_list.assign(0);
|
||||
@@ -371,12 +371,12 @@ private:
|
||||
boost::mem_fun_ref(&extent_range::start));
|
||||
|
||||
// calculate the extents
|
||||
extent_list extents;
|
||||
extent_list _extents;
|
||||
std::transform(ranges.ranges_.begin(),ranges.ranges_.end(),
|
||||
extents.begin(),
|
||||
_extents.begin(),
|
||||
boost::mem_fun_ref(&extent_range::size));
|
||||
|
||||
init_multi_array_ref(extents.begin());
|
||||
init_multi_array_ref(_extents.begin());
|
||||
}
|
||||
|
||||
|
||||
@@ -442,16 +442,16 @@ public:
|
||||
};
|
||||
|
||||
template <class ExtentList>
|
||||
explicit multi_array_ref(T* base, const ExtentList& extents) :
|
||||
super_type(base,extents) {
|
||||
explicit multi_array_ref(T* base, const ExtentList& _extents) :
|
||||
super_type(base,_extents) {
|
||||
boost::function_requires<
|
||||
CollectionConcept<ExtentList> >();
|
||||
}
|
||||
|
||||
template <class ExtentList>
|
||||
explicit multi_array_ref(T* base, const ExtentList& extents,
|
||||
explicit multi_array_ref(T* base, const ExtentList& _extents,
|
||||
const general_storage_order<NumDims>& so) :
|
||||
super_type(base,extents,so) {
|
||||
super_type(base,_extents,so) {
|
||||
boost::function_requires<
|
||||
CollectionConcept<ExtentList> >();
|
||||
}
|
||||
@@ -612,11 +612,11 @@ protected:
|
||||
explicit multi_array_ref(T* base,
|
||||
const storage_order_type& so,
|
||||
const index* index_bases,
|
||||
const size_type* extents) :
|
||||
super_type(base,so,index_bases,extents) { }
|
||||
const size_type* _extents) :
|
||||
super_type(base,so,index_bases,_extents) { }
|
||||
|
||||
};
|
||||
|
||||
} // 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"
|
||||
@@ -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
|
||||
@@ -176,10 +176,10 @@ public: // Should be protected
|
||||
#endif
|
||||
|
||||
const_sub_array (TPtr base,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_base) :
|
||||
base_(base), extents_(extents), strides_(strides),
|
||||
base_(base), extents_(_extents), strides_(strides),
|
||||
index_base_(index_base) {
|
||||
}
|
||||
|
||||
@@ -356,10 +356,10 @@ public: // should be private
|
||||
#endif
|
||||
|
||||
sub_array (T* base,
|
||||
const size_type* extents,
|
||||
const size_type* _extents,
|
||||
const index* strides,
|
||||
const index* index_base) :
|
||||
super_type(base,extents,strides,index_base) {
|
||||
super_type(base,_extents,strides,index_base) {
|
||||
}
|
||||
|
||||
};
|
||||
@@ -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.
|
||||
@@ -227,7 +227,7 @@ public: // should be protected
|
||||
// to create strides
|
||||
template <typename ExtentList, typename Index>
|
||||
explicit const_multi_array_view(TPtr base,
|
||||
const ExtentList& extents,
|
||||
const ExtentList& _extents,
|
||||
const boost::array<Index,NumDims>& strides):
|
||||
base_(base), origin_offset_(0) {
|
||||
|
||||
@@ -235,7 +235,7 @@ public: // should be protected
|
||||
|
||||
// Get the extents and strides
|
||||
boost::detail::multi_array::
|
||||
copy_n(extents.begin(),NumDims,extent_list_.begin());
|
||||
copy_n(_extents.begin(),NumDims,extent_list_.begin());
|
||||
boost::detail::multi_array::
|
||||
copy_n(strides.begin(),NumDims,stride_list_.begin());
|
||||
|
||||
@@ -429,9 +429,9 @@ public: // should be private
|
||||
// generate array views
|
||||
template <typename ExtentList, typename Index>
|
||||
explicit multi_array_view(T* base,
|
||||
const ExtentList& extents,
|
||||
const ExtentList& _extents,
|
||||
const boost::array<Index,NumDims>& strides) :
|
||||
super_type(base,extents,strides) { }
|
||||
super_type(base,_extents,strides) { }
|
||||
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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