mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 09:25:51 +00:00
default all fields in all ctors
This commit is contained in:
parent
b692896fc7
commit
3718c38e68
@ -203,15 +203,15 @@ enum class return_value_policy : uint8_t {
|
||||
|
||||
/// Information record describing a Python buffer object
|
||||
struct buffer_info {
|
||||
void *ptr; // Pointer to the underlying storage
|
||||
size_t itemsize; // Size of individual items in bytes
|
||||
size_t size; // Total number of entries
|
||||
void *ptr = nullptr; // Pointer to the underlying storage
|
||||
size_t itemsize = 0; // Size of individual items in bytes
|
||||
size_t size = 0; // Total number of entries
|
||||
std::string format; // For homogeneous buffers, this should be set to format_descriptor<T>::format()
|
||||
size_t ndim; // Number of dimensions
|
||||
size_t ndim = 0; // Number of dimensions
|
||||
std::vector<size_t> shape; // Shape of the tensor (1 entry per dimension)
|
||||
std::vector<size_t> strides; // Number of entries between adjacent entries (for each per dimension)
|
||||
|
||||
buffer_info() : ptr(nullptr), view(nullptr) {}
|
||||
buffer_info(){}
|
||||
|
||||
buffer_info(void *ptr, size_t itemsize, const std::string &format, size_t ndim,
|
||||
const std::vector<size_t> &shape, const std::vector<size_t> &strides)
|
||||
|
Loading…
Reference in New Issue
Block a user