@Name(value="c10::ArrayRef<jbyte>") @NoOffset @Properties(inherit=torch.class) public class ByteArrayRef extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ByteArrayRef()
\name Constructors
\{
|
ByteArrayRef(byte[] begin,
byte[] end) |
ByteArrayRef(byte[] data,
long length) |
ByteArrayRef(ByteBuffer begin,
ByteBuffer end) |
ByteArrayRef(ByteBuffer data,
long length) |
ByteArrayRef(BytePointer begin,
BytePointer end)
Construct an ArrayRef from a range.
|
ByteArrayRef(BytePointer data,
long length)
Construct an ArrayRef from a pointer and length.
|
ByteArrayRef(long size)
Native array allocator.
|
ByteArrayRef(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
byte |
at(long Index)
Vector compatibility
|
byte |
back()
back - Get the last element.
|
BytePointer |
begin()
\}
\name Simple Operations
\{
|
BytePointer |
cbegin() |
BytePointer |
cend() |
BytePointer |
data() |
boolean |
empty()
empty - Check if the array is empty.
|
BytePointer |
end() |
boolean |
equals(byte... RHS) |
boolean |
equals(ByteArrayRef RHS)
equals - Check for element-wise equality.
|
byte |
front()
front - Get the first element.
|
byte |
get(long Index)
\}
\name Operator Overloads
\{
|
ByteArrayRef |
getPointer(long i) |
ByteArrayRef |
position(long position) |
long |
size()
size - Get the array size.
|
ByteArrayRef |
slice(long N)
slice(n) - Chop off the first N elements of the array.
|
ByteArrayRef |
slice(long N,
long M)
slice(n, m) - Take M elements of the array starting at element N
|
BytePointer |
vec()
\}
\name Expensive Operations
\{
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public ByteArrayRef(Pointer p)
Pointer(Pointer)
.public ByteArrayRef(long size)
Pointer.position(long)
.public ByteArrayRef()
Construct an empty ArrayRef.
public ByteArrayRef(@Const BytePointer data, @Cast(value="size_t") long length)
public ByteArrayRef(@Const ByteBuffer data, @Cast(value="size_t") long length)
public ByteArrayRef(@Const BytePointer begin, @Const BytePointer end)
public ByteArrayRef(@Const ByteBuffer begin, @Const ByteBuffer end)
public ByteArrayRef position(long position)
public ByteArrayRef getPointer(long i)
getPointer
in class Pointer
@Const public BytePointer begin()
@Const public BytePointer end()
@Const public BytePointer cbegin()
@Const public BytePointer cend()
@Const public BytePointer data()
public byte front()
public byte back()
@Cast(value="const bool") public boolean equals(@ByVal ByteArrayRef RHS)
@Cast(value="const bool") public boolean equals(@ByVal @Cast(value={"jbyte*","c10::ArrayRef<jbyte>","std::vector<jbyte>&"}) @StdVector(value="jbyte") byte... RHS)
@Const @ByVal public ByteArrayRef slice(@Cast(value="size_t") long N, @Cast(value="size_t") long M)
@Const @ByVal public ByteArrayRef slice(@Cast(value="size_t") long N)
@Name(value="operator []") public byte get(@Cast(value="size_t") long Index)
@StdVector public BytePointer vec()
Copyright © 2024. All rights reserved.