apybuffer.h
¶
-
template<typename T>
struct NoDefaultConstructAllocator¶ Public Types
-
using propagate_on_container_move_assignment = std::true_type¶
-
using is_always_equal = std::true_type¶
Public Functions
-
NoDefaultConstructAllocator() noexcept = default¶
-
~NoDefaultConstructAllocator() noexcept = default¶
-
template<typename U>
inline bool operator==(const NoDefaultConstructAllocator<U> &_) noexcept¶
-
template<typename U>
inline bool operator!=(const NoDefaultConstructAllocator<U> &_) noexcept¶
-
template<typename U>
struct rebind¶ Public Types
-
typedef NoDefaultConstructAllocator<U> other¶
-
typedef NoDefaultConstructAllocator<U> other¶
-
using propagate_on_container_move_assignment = std::true_type¶
-
template<typename T, typename Allocator = std::allocator<T>>
class APyBuffer¶ Subclassed by APyArray< apy_limb_t, APyCFixedArray >, APyArray< apy_limb_t, APyFixedArray >, APyArray< APyFloatData, APyFloatArray >, APyArray< T, ARRAY_TYPE >
Public Functions
-
inline std::size_t ndim() const noexcept¶
Retrieve number of array dimensions.
-
inline std::size_t size() const noexcept¶
Retrieve array size.
-
inline const std::vector<std::size_t> &shape() const noexcept¶
Retrieve array shape.
-
inline nb::tuple python_get_shape() const¶
Retrieve array shape (exported to Python)
Protected Functions
-
inline APyBuffer(const std::vector<std::size_t> &shape, std::size_t itemsize = 1)¶
APyBuffers are to be inherited from. All fields and constructors are protected.
Base constructor for creating a new
APyBuffer
-
inline APyBuffer(const std::vector<std::size_t> &shape, std::size_t itemsize, vector_type &&v)¶
Base constructor for creating new
APyBuffer
stealing data from another vector.
-
inline Py_buffer get_py_buffer()¶
Return a Python Buffer structure compatible with the Buffer Protocol.
-
inline void buffer_resize(const std::vector<std::size_t> shape, std::size_t itemsize)¶
Resize the underlying buffer without touching its data. Narrowing the buffer will result in loss of data.
-
inline std::size_t ndim() const noexcept¶