24 #include <boost/assert.hpp> 30 template<
typename Type>
41 template<
typename Type>
46 template<
typename Type>
49 , _fbegin(copy._fbegin)
51 , _sbegin(copy._sbegin)
54 this->_flength = this->_fend - this->_fbegin;
57 template<
typename Type>
59 const DataSequence2D<Cpu,
typename std::remove_cv<Type>::type> &data_ptr,
60 std::size_t fbegin, std::size_t fend, std::size_t sbegin, std::size_t send)
67 this->_flength = this->_fend - this->_fbegin;
71 template<
typename Type>
74 std::size_t fbegin, std::size_t fend, std::size_t sbegin, std::size_t send)
81 this->_flength = this->_fend - this->_fbegin;
85 template<
typename Type>
87 BOOST_ASSERT_MSG(this->_raw !=
nullptr,
"Cannot dereference iterator over null DataSequence2D");
88 BOOST_ASSERT_MSG(this->mangle_offset(this->_offset) < this->_data->fast_axis_length()*this->_data->slow_axis_length(),
"Cannot dereference post-end iterator");
89 return this->_raw+this->mangle_offset(this->_offset);
92 template<
typename Type>
94 BOOST_ASSERT_MSG(this->_raw !=
nullptr,
"Cannot dereference iterator over null DataSequence2D");
95 BOOST_ASSERT_MSG(this->mangle_offset(this->_offset) < this->_data->fast_axis_length()*this->_data->slow_axis_length(),
"Cannot dereference post-end iterator");
96 return *(this->_raw+this->mangle_offset(this->_offset));
99 template<
typename Type>
101 std::size_t s_idx = off / this->_flength;
102 std::size_t f_idx = off - s_idx * this->_flength;
103 return (this->_sbegin+s_idx) * this->_data->fast_axis_length() + this->_fbegin + f_idx;
106 template<
typename Type>
113 template<
typename Type>
116 r._offset=this->_flength*(this->_send - this->_sbegin);
Iterator over partial ranges of DataSequence2D types, "fast" axis. CPU specialisation.
Some limits and constants for FLDO.
A 2-dimensional sequencial data of type T.
Iterator over partial ranges of DataSequence2D types, "fast" axis. Generic type.