IOLink 1.16.1
Loading...
Searching...
No Matches
Indexer.h
1#pragma once
2
3#include <iolink/DataType.h>
4#include <iolink/MemoryLayout.h>
5#include <iolink/VectorX.h>
6
7namespace iolink
8{
9
35class IOLINK_API Indexer final
36{
37public:
38 Indexer();
39
56 [[deprecated(
57 "Use Indexer(const VectorXu64& shape, DataType dtype, const VectorXu64& byteStride, const VectorXu64& layout) "
58 "instead.")]] Indexer(const VectorXu64& shape, const VectorXu64& stride, const VectorXu64& layout);
59
77 [[deprecated(
78 "Use Indexer(const VectorXu64& shape, DataType dtype, const VectorXu64& byteStride, const VectorXu64& layout) "
79 "instead.")]] Indexer(const VectorXu64& shape, const VectorXu64& stride, MemoryLayout standardLayout);
80
92 [[deprecated(
93 "Use Indexer(const VectorXu64& shape, DataType dtype, const VectorXu64& byteStride, const VectorXu64& layout) "
94 "instead.")]] Indexer(const VectorXu64& shape, const VectorXu64& layout);
95
108 [[deprecated("Use Indexer(const VectorXu64& shape, DataType dtype, MemoryLayout standardLayout) instead.")]] Indexer(
109 const VectorXu64& shape, MemoryLayout standardLayout);
110
123 [[deprecated("Use Indexer(const VectorXu64& shape, DataType dtype) instead.")]] explicit Indexer(
124 const VectorXu64& shape);
125
135 Indexer(const VectorXu64& shape, DataType dtype);
136
146 Indexer(const VectorXu64& shape, DataType dtype, MemoryLayout standardLayout);
147
157 Indexer(const VectorXu64& shape, DataType dtype, const VectorXu64& byteStride);
158
167 Indexer(const VectorXu64& shape, DataType dtype, const VectorXu64& byteStride, const VectorXu64& layout);
168
169 Indexer(const Indexer& other);
170 Indexer& operator=(const Indexer& other);
171
172 Indexer(Indexer&& other) noexcept;
173 Indexer& operator=(Indexer&& other) noexcept;
174
175 ~Indexer();
176
177 bool operator==(const Indexer& other) const;
178 bool operator!=(const Indexer& other) const;
179
183 size_t dimensionCount() const;
184
188 const VectorXu64& shape() const;
189
194
201 [[deprecated("Use byteStride() instead.")]] const VectorXu64& stride() const;
202
206 const VectorXu64& byteStride() const;
207
211 const VectorXu64& layout() const;
212
218 size_t shape(size_t index) const;
219
228 [[deprecated("Use byteStride(size_t index) instead.")]] size_t stride(size_t index) const;
229
233 size_t byteStride(size_t index) const;
234
240 size_t layout(size_t index) const;
241
245 size_t elementCount() const;
246
253 size_t byteCount() const;
254
263 [[deprecated("Use byteOffset(const VectorXu64& index) instead.")]] size_t offset(const VectorXu64& index) const;
264
274 size_t byteOffset(const VectorXu64& index) const;
275
283 bool isContinuous() const;
284
285private:
286 class Private;
287 Private* m_private;
288};
289
290} // end namespace iolink