| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final MemoryLayout |
| Access | Constructor and Description |
|---|---|
| private | |
| private | SequenceLayoutImpl(long elemCount, MemoryLayout elementLayout, long byteAlignment, Optional<String> name)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv SequenceLayoutImpl | dup(long byteAlignment, Optional<String> name)
Implements abstract jdk.
|
| public long | Returns: the element count of this sequence layoutImplements java. Returns the element count of this sequence layout. |
| public MemoryLayout | Returns: the element layout associated with this sequence layoutImplements java. Returns the element layout associated with this sequence layout. |
| public boolean | equals(Object other)
Overrides jdk. Implements java. Compares the specified object with this layout for equality. |
| public SequenceLayout | Returns: a sequence layout with the same size as this layout (but, possibly, with different element count), whose element layout is not a sequence layout.Implements java. Returns a flattened sequence layout. |
| public int | hashCode()
Overrides jdk. Implements java. Returns the hash code value for this layout. |
| public boolean | |
| public static SequenceLayout | |
| public SequenceLayout | Returns: a sequence layout where element layouts in the flattened projection of this sequence layout (seeflatten()) are re-arranged into one or more nested sequence layouts.an array of element counts, of which at most one can be elementCounts)-1.Implements java. Re-arrange the elements in this sequence layout into a multi-dimensional sequence layout. |
| public String | toString()
Implements abstract jdk. Implements java. Returns the string representation of this layout. |
| public SequenceLayoutImpl | withByteAlignment(long byteAlignment)
Overrides jdk. Implements java. Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes). |
| public SequenceLayout | Returns: a sequence layout with the given element count.the new element count. elementCount)Implements java. Returns a sequence layout with the same element layout, alignment constraints and name as this sequence layout, but with the specified element count. |
| elemCount | back to summary |
|---|---|
| private final long elemCount | |
| elementLayout | back to summary |
|---|---|
| private final MemoryLayout elementLayout | |
| SequenceLayoutImpl | back to summary |
|---|---|
| private SequenceLayoutImpl(long elemCount, MemoryLayout elementLayout) | |
| SequenceLayoutImpl | back to summary |
|---|---|
| private SequenceLayoutImpl(long elemCount, MemoryLayout elementLayout, long byteAlignment, Optional<String> name) | |
| dup | back to summary |
|---|---|
| pack-priv SequenceLayoutImpl dup(long byteAlignment, Optional<String> name) Implements abstract jdk.
| |
| elementCount | back to summary |
|---|---|
| public long elementCount() Implements java. Returns the element count of this sequence layout.
| |
| elementLayout | back to summary |
|---|---|
| public MemoryLayout elementLayout() Implements java. Returns the element layout associated with this sequence layout.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides jdk. Implements java. Doc from java. Compares the specified object with this layout for equality. Returns
| |
| flatten | back to summary |
|---|---|
| public SequenceLayout flatten() Implements java. Returns a flattened sequence layout. The element layout of the returned sequence layout is the first non-sequence element layout found by recursively traversing the element layouts of this sequence layout. This transformation preserves the layout size; nested sequence layout in this sequence layout will be dropped and their element counts will be incorporated into that of the returned sequence layout. For instance, given a sequence layout of the kind: var seq = MemoryLayout.sequenceLayout(4, MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_INT)); seq.flatten() will yield the following sequence layout:
var flattenedSeq = MemoryLayout.sequenceLayout(12, ValueLayout.JAVA_INT);
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides jdk. Implements java. Doc from java. Returns the hash code value for this layout.
| |
| hasNaturalAlignment | back to summary |
|---|---|
| public boolean hasNaturalAlignment() Overrides jdk.
| |
| of | back to summary |
|---|---|
| public static SequenceLayout of(long elementCount, MemoryLayout elementLayout) | |
| reshape | back to summary |
|---|---|
| public SequenceLayout reshape(long... elementCounts) Implements java. Re-arrange the elements in this sequence layout into a multi-dimensional sequence layout.
The resulting layout is a sequence layout where element layouts in the flattened projection of this
sequence layout (see For instance, given a sequence layout of the kind: var seq = MemoryLayout.sequenceLayout(4, MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_INT)); seq.reshape(2, 6) will yield the following sequence layout:
var reshapeSeq = MemoryLayout.sequenceLayout(2, MemoryLayout.sequenceLayout(6, ValueLayout.JAVA_INT));
If one of the provided element count is the special value var reshapeSeqImplicit1 = seq.reshape(-1, 6); var reshapeSeqImplicit2 = seq.reshape(2, -1);
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract jdk. Implements java. Doc from java. Returns the string representation of this layout.
| |
| withByteAlignment | back to summary |
|---|---|
| public SequenceLayoutImpl withByteAlignment(long byteAlignment) Overrides jdk. Implements java. Doc from java. Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
| |
| withElementCount | back to summary |
|---|---|
| public SequenceLayout withElementCount(long elementCount) Implements java. Returns a sequence layout with the same element layout, alignment constraints and name as this sequence layout, but with the specified element count.
| |