9 #ifndef CUBBYFLOW_ARRAY_ACCESSOR1_IMPL_H 10 #define CUBBYFLOW_ARRAY_ACCESSOR1_IMPL_H 22 m_size(0), m_data(nullptr)
42 Reset(other.m_size, other.m_data);
75 return m_data + m_size;
87 return m_data + m_size;
102 template <
typename T>
105 std::swap(other.m_data, m_data);
106 std::swap(other.m_size, m_size);
109 template <
typename T>
110 template <
typename Callback>
113 for (
size_t i = 0; i < size(); ++i)
119 template <
typename T>
120 template <
typename Callback>
123 for (
size_t i = 0; i < size(); ++i)
129 template <
typename T>
130 template <
typename Callback>
139 template <
typename T>
140 template <
typename Callback>
146 template <
typename T>
152 template <
typename T>
158 template <
typename T>
165 template <
typename T>
171 template <
typename T>
173 m_size(0), m_data(nullptr)
178 template <
typename T>
185 template <
typename T>
188 m_size = other.
size();
189 m_data = other.
data();
192 template <
typename T>
195 m_size = other.m_size;
196 m_data = other.m_data;
199 template <
typename T>
206 template <
typename T>
212 template <
typename T>
215 return m_data + m_size;
218 template <
typename T>
224 template <
typename T>
230 template <
typename T>
231 template <
typename Callback>
234 for (
size_t i = 0; i < size(); ++i)
240 template <
typename T>
241 template <
typename Callback>
244 for (
size_t i = 0; i < size(); ++i)
250 template <
typename T>
251 template <
typename Callback>
257 template <
typename T>
1-D read-only array accessor class.
Definition: ArrayAccessor1.h:185
Generic N-dimensional array accessor class interface.
Definition: ArrayAccessor.h:31
Definition: pybind11Utils.h:24
void ParallelFor(IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy)
Makes a for-loop from beginIndex to endIndex in parallel.
Definition: Parallel-Impl.h:201
Generic N-dimensional read-only array accessor class interface.
Definition: ArrayAccessor.h:52
constexpr size_t ZERO_SIZE
Zero size_t.
Definition: Constants.h:18
1-D array accessor class.
Definition: ArrayAccessor1.h:28
size_t size() const
Returns size of the array.
Definition: ArrayAccessor1-Impl.h:91
T *const data() const
Returns the raw pointer to the array data.
Definition: ArrayAccessor1-Impl.h:97