Strided1DBuffer of which this is
an extension providing write operations and a writable slice.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Strided1DWritableBuffer.
A |
| Access | Constructor and Description |
|---|---|
| public | Strided1DWritableBuffer(int
consumer requirements flags, BufferProtocol exporting object (or obj, byte[] null)raw byte array containing exported data storage, int index into storage of item[0] index0, int number of items in the slice count, int byte-index distance from one element to the next in the new PyBuffer stride)Provide an instance of |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | checkWritable()
Overrides org. Do nothing: the buffer is writable. |
| public PyBuffer | getBufferSlice(int
specifying features demanded and the navigational capabilities of the consumer flags, int index in the current buffer start, int number of items in the required slice count, int index-distance in the current buffer between consecutive items in the slice stride)Overrides org. Implements org. Get a |
| public final boolean | isReadonly()
Overrides org. Implements org. Determine whether the consumer is entitled to write to the exported storage. |
| protected void | storeAtImpl(byte
to store value, int byte-index of location to retrieve byteIndex)Overrides org. Store the byte at the given index in the underlying storage treated as a flat sequence of bytes. |
| Strided1DWritableBuffer | back to summary |
|---|---|
| public Strided1DWritableBuffer(int flags, BufferProtocol obj, byte[] storage, int index0, int count, int stride) throws ArrayIndexOutOfBoundsException, NullPointerException, PyException Provide an instance of
The constructed
| |
| checkWritable | back to summary |
|---|---|
| protected final void checkWritable() Overrides org. Do nothing: the buffer is writable.
| |
| getBufferSlice | back to summary |
|---|---|
| public PyBuffer getBufferSlice(int flags, int start, int count, int stride) Overrides org. Implements org. Doc from org. Get a
Suppose that x(i) denotes the ith element of the current buffer, that is, the
byte retrieved by
In a simple buffer backed by a contiguous byte array, the result is a strided PyBuffer on the
same storage but where the offset is adjusted by s and the stride is as supplied. If
the current buffer is already strided and/or has an item size larger than single bytes, the
new
Doc from org. a buffer representing the slice | |
| isReadonly | back to summary |
|---|---|
| public final boolean isReadonly() Overrides org. Implements org. Doc from org. Determine whether the consumer is entitled to write to the exported storage.
Declared
| |
| storeAtImpl | back to summary |
|---|---|
| protected void storeAtImpl(byte value, int byteIndex) Overrides org. Doc from org. Store the byte at the given index in the underlying storage treated as a flat sequence of
bytes. This byte-index will have been computed from the item index (which may have been
multi-dimensional), taking into account
| |
Strided1DWritableBuffer.SlicedView represents a non-contiguous subsequence of
a simple buffer.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv PyBuffer | root
The buffer on which this is a slice view |
| Access | Constructor and Description |
|---|---|
| public | SlicedView(PyBuffer
on which release must be called when this is released root, int consumer requirements flags, byte[] raw byte array containing exported data storage, int index into storage of item[0] index0, int number of items in the sliced view count, int in between successive elements of the new PyBuffer stride)Construct a slice of a one-dimensional byte buffer. |
| Modifier and Type | Method and Description |
|---|---|
| protected PyBuffer | getRoot()
Overrides org. Some |
| root | back to summary |
|---|---|
| pack-priv PyBuffer root The buffer on which this is a slice view | |
| SlicedView | back to summary |
|---|---|
| public SlicedView(PyBuffer root, int flags, byte[] storage, int index0, int count, int stride) throws PyException Construct a slice of a one-dimensional byte buffer.
| |
| getRoot | back to summary |
|---|---|
| protected PyBuffer getRoot() Overrides org. Doc from org. Some | |