8#include "detail/GDALDataTypeUtil.h"
10namespace isce3 {
namespace io {
namespace gdal {
26 const std::array<int, 2> &
shape);
39 const std::array<int, 2> &
shape,
40 GDALAccess
access = GA_Update);
53 const std::array<int, 2> &
shape,
54 const std::array<std::size_t, 2> &
strides);
68 const std::array<int, 2> &
shape,
69 const std::array<std::size_t, 2> &
strides,
70 GDALAccess
access = GA_Update);
74 void *
data() {
return _data; }
78 const void *
data()
const {
return _data; }
82 GDALDataType
datatype()
const {
return _datatype; }
86 std::size_t
itemsize()
const {
return detail::getSize(_datatype); }
90 const std::array<int, 2> &
shape()
const {
return _shape; }
94 int length()
const {
return _shape[0]; }
98 int width()
const {
return _shape[1]; }
102 const std::array<std::size_t, 2> &
strides()
const {
return _strides; }
114 GDALAccess
access()
const {
return _access; }
128 GDALDataType _datatype;
129 std::array<int, 2> _shape;
130 std::array<std::size_t, 2> _strides;
147 const std::array<int, 2> &
shape);
158 const std::array<int, 2> &
shape,
159 GDALAccess
access = GA_Update);
170 const std::array<int, 2> &
shape,
171 const std::array<std::size_t, 2> &
strides);
184 const std::array<int, 2> &
shape,
185 const std::array<std::size_t, 2> &
strides,
186 GDALAccess
access = GA_Update);
194 const T *
data()
const {
return _data; }
198 GDALDataType
datatype()
const {
return detail::Type2GDALDataType<T>::datatype; }
206 const std::array<int, 2> &
shape()
const {
return _shape; }
214 int width()
const {
return _shape[1]; }
218 const std::array<std::size_t, 2> &
strides()
const {
return _strides; }
230 GDALAccess
access()
const {
return _access; }
234 std::array<int, 2> _shape;
235 std::array<std::size_t, 2> _strides;
241#define ISCE_IO_GDAL_BUFFER_ICC
243#undef ISCE_IO_GDAL_BUFFER_ICC
constexpr std::size_t rowstride() const
Stride in bytes between the start of adjacent rows.
Definition Buffer.h:106
constexpr GDALAccess access() const
Access mode.
Definition Buffer.h:114
constexpr Buffer(const void *data, GDALDataType datatype, const std::array< int, 2 > &shape)
Create a buffer object describing a read-only row-major, contiguous data buffer.
Definition Buffer.icc:10
constexpr TypedBuffer< T > cast() const
Cast to typed buffer.
Definition Buffer.icc:63
constexpr const std::array< std::size_t, 2 > & strides() const
Stride in bytes between the start of adjacent elements along each dimension.
Definition Buffer.h:102
constexpr GDALDataType datatype() const
Datatype identifier.
Definition Buffer.h:82
constexpr std::size_t colstride() const
Stride in bytes between the start of adjacent columns.
Definition Buffer.h:110
constexpr std::size_t itemsize() const
Size in bytes of a single element.
Definition Buffer.h:86
constexpr int width() const
Number of columns.
Definition Buffer.h:98
constexpr int length() const
Number of rows.
Definition Buffer.h:94
constexpr const void * data() const
Pointer to the start of the data buffer.
Definition Buffer.h:78
constexpr void * data()
Pointer to the start of the data buffer.
Definition Buffer.h:74
constexpr const std::array< int, 2 > & shape() const
Buffer dims (nrows, ncols)
Definition Buffer.h:90
Buffer with static type information.
Definition Buffer.h:136
constexpr const std::array< std::size_t, 2 > & strides() const
Stride in bytes between the start of adjacent elements along each dimension.
Definition Buffer.h:218
constexpr std::size_t itemsize() const
Size in bytes of a single element.
Definition Buffer.h:202
constexpr const T * data() const
Pointer to the start of the data buffer.
Definition Buffer.h:194
constexpr int width() const
Number of columns.
Definition Buffer.h:214
constexpr GDALAccess access() const
Access mode.
Definition Buffer.h:230
constexpr std::size_t colstride() const
Stride in bytes between the start of adjacent columns.
Definition Buffer.h:226
constexpr const std::array< int, 2 > & shape() const
Buffer dims (nrows, ncols)
Definition Buffer.h:206
constexpr int length() const
Number of rows.
Definition Buffer.h:210
constexpr GDALDataType datatype() const
Datatype identifier.
Definition Buffer.h:198
constexpr T * data()
Pointer to the start of the data buffer.
Definition Buffer.h:190
constexpr std::size_t rowstride() const
Stride in bytes between the start of adjacent rows.
Definition Buffer.h:222
constexpr TypedBuffer(const T *data, const std::array< int, 2 > &shape)
Create a buffer object describing a read-only row-major, contiguous data buffer.
Definition Buffer.icc:74
The isce3::io namespace.
Definition Constants.h:14
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5