Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
3718c38e
Commit
3718c38e
authored
Sep 02, 2016
by
Jason Newton
Browse files
default all fields in all ctors
parent
b692896f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/pybind11/common.h
include/pybind11/common.h
+5
-5
No files found.
include/pybind11/common.h
View file @
3718c38e
...
@@ -203,15 +203,15 @@ enum class return_value_policy : uint8_t {
...
@@ -203,15 +203,15 @@ enum class return_value_policy : uint8_t {
/// Information record describing a Python buffer object
/// Information record describing a Python buffer object
struct
buffer_info
{
struct
buffer_info
{
void
*
ptr
;
// Pointer to the underlying storage
void
*
ptr
=
nullptr
;
// Pointer to the underlying storage
size_t
itemsize
;
// Size of individual items in bytes
size_t
itemsize
=
0
;
// Size of individual items in bytes
size_t
size
;
// Total number of entries
size_t
size
=
0
;
// Total number of entries
std
::
string
format
;
// For homogeneous buffers, this should be set to format_descriptor<T>::format()
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
>
shape
;
// Shape of the tensor (1 entry per dimension)
std
::
vector
<
size_t
>
strides
;
// Number of entries between adjacent entries (for each 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
,
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
)
const
std
::
vector
<
size_t
>
&
shape
,
const
std
::
vector
<
size_t
>
&
strides
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment