Top | ![]() |
![]() |
![]() |
![]() |
struct | GArrowBuffer |
struct | GArrowMutableBuffer |
struct | GArrowResizableBuffer |
struct | GArrowPoolBuffer |
GObject ╰── GArrowBuffer ╰── GArrowMutableBuffer ╰── GArrowResizableBuffer ╰── GArrowPoolBuffer
GArrowBuffer is a class for keeping data. Other classes such as GArrowArray and GArrowTensor can use data in buffer.
GArrowBuffer is immutable.
GArrowMutableBuffer is mutable.
GArrowResizableBuffer is mutable and resizable. GArrowResizableBuffer isn't instantiatable.
GArrowPoolBuffer is mutable, resizable and instantiatable.
GArrowBuffer * garrow_buffer_new (const guint8 *data
,gint64 size
);
data |
Data for the buffer. They aren't owned by the new buffer. You must not free the data while the new buffer is alive. |
[array length=size] |
size |
The number of bytes of the data. |
Since: 0.3.0
gboolean garrow_buffer_equal (GArrowBuffer *buffer
,GArrowBuffer *other_buffer
);
Since: 0.4.0
gboolean garrow_buffer_equal_n_bytes (GArrowBuffer *buffer
,GArrowBuffer *other_buffer
,gint64 n_bytes
);
buffer |
A GArrowBuffer. |
|
other_buffer |
A GArrowBuffer to be compared. |
|
n_bytes |
The number of first bytes to be compared. |
Since: 0.4.0
gint64
garrow_buffer_get_capacity (GArrowBuffer *buffer
);
Since: 0.3.0
GBytes *
garrow_buffer_get_data (GArrowBuffer *buffer
);
The data of the buffer. The data is owned by the buffer. You should not free or modify the data.
[transfer full]
Since: 0.3.0
GBytes *
garrow_buffer_get_mutable_data (GArrowBuffer *buffer
);
The data of the buffer. If the
buffer is imutable, it returns NULL
. The data is owned by the
buffer. You should not free the data.
[transfer full][nullable]
Since: 0.3.0
GArrowBuffer *
garrow_buffer_get_parent (GArrowBuffer *buffer
);
Since: 0.3.0
GArrowBuffer * garrow_buffer_copy (GArrowBuffer *buffer
,gint64 start
,gint64 size
,GError **error
);
buffer |
A GArrowBuffer. |
|
start |
An offset of data to be copied in byte. |
|
size |
The number of bytes to be copied from the start. |
|
error |
[nullable] |
Since: 0.3.0
GArrowBuffer * garrow_buffer_slice (GArrowBuffer *buffer
,gint64 offset
,gint64 size
);
buffer |
A GArrowBuffer. |
|
offset |
An offset in the buffer data in byte. |
|
size |
The number of bytes of the sliced data. |
A newly created GArrowBuffer that shares data of the base GArrowBuffer. The created GArrowBuffer has data start with offset from the base buffer data and are the specified bytes size.
[transfer full]
Since: 0.3.0
GArrowMutableBuffer * garrow_mutable_buffer_new (guint8 *data
,gint64 size
);
data |
Data for the buffer. They aren't owned by the new buffer. You must not free the data while the new buffer is alive. |
[array length=size] |
size |
The number of bytes of the data. |
Since: 0.3.0
GArrowMutableBuffer * garrow_mutable_buffer_slice (GArrowMutableBuffer *buffer
,gint64 offset
,gint64 size
);
buffer |
||
offset |
An offset in the buffer data in byte. |
|
size |
The number of bytes of the sliced data. |
A newly created GArrowMutableBuffer that shares data of the base GArrowMutableBuffer. The created GArrowMutableBuffer has data start with offset from the base buffer data and are the specified bytes size.
[transfer full]
Since: 0.3.0
gboolean garrow_resizable_buffer_resize (GArrowResizableBuffer *buffer
,gint64 new_size
,GError **error
);
Since: 0.3.0
gboolean garrow_resizable_buffer_reserve (GArrowResizableBuffer *buffer
,gint64 new_capacity
,GError **error
);
Since: 0.3.0
“buffer”
property“buffer” gpointer
The raw std::shared<arrow::Buffer> *.
Flags: Write / Construct Only