@Name(value="c10::ArrayRef<jshort>") @NoOffset @Properties(inherit=torch.class) public class ShortArrayRef extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ShortArrayRef()
\name Constructors
\{
|
ShortArrayRef(long size)
Native array allocator.
|
ShortArrayRef(Pointer p)
Pointer cast constructor.
|
ShortArrayRef(short[] data,
long length) |
ShortArrayRef(short[] begin,
short[] end) |
ShortArrayRef(ShortBuffer data,
long length) |
ShortArrayRef(ShortBuffer begin,
ShortBuffer end) |
ShortArrayRef(ShortPointer data,
long length)
Construct an ArrayRef from a pointer and length.
|
ShortArrayRef(ShortPointer begin,
ShortPointer end)
Construct an ArrayRef from a range.
|
Modifier and Type | Method and Description |
---|---|
short |
at(long Index)
Vector compatibility
|
short |
back()
back - Get the last element.
|
ShortPointer |
begin()
\}
\name Simple Operations
\{
|
ShortPointer |
cbegin() |
ShortPointer |
cend() |
ShortPointer |
data() |
boolean |
empty()
empty - Check if the array is empty.
|
ShortPointer |
end() |
boolean |
equals(short... RHS) |
boolean |
equals(ShortArrayRef RHS)
equals - Check for element-wise equality.
|
short |
front()
front - Get the first element.
|
short |
get(long Index)
\}
\name Operator Overloads
\{
|
ShortArrayRef |
getPointer(long i) |
ShortArrayRef |
position(long position) |
long |
size()
size - Get the array size.
|
ShortArrayRef |
slice(long N)
slice(n) - Chop off the first N elements of the array.
|
ShortArrayRef |
slice(long N,
long M)
slice(n, m) - Take M elements of the array starting at element N
|
ShortPointer |
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 ShortArrayRef(Pointer p)
Pointer(Pointer)
.public ShortArrayRef(long size)
Pointer.position(long)
.public ShortArrayRef()
Construct an empty ArrayRef.
public ShortArrayRef(@Const ShortPointer data, @Cast(value="size_t") long length)
public ShortArrayRef(@Const ShortBuffer data, @Cast(value="size_t") long length)
public ShortArrayRef(@Const ShortPointer begin, @Const ShortPointer end)
public ShortArrayRef(@Const ShortBuffer begin, @Const ShortBuffer end)
public ShortArrayRef position(long position)
public ShortArrayRef getPointer(long i)
getPointer
in class Pointer
@Const public ShortPointer begin()
@Const public ShortPointer end()
@Const public ShortPointer cbegin()
@Const public ShortPointer cend()
@Const public ShortPointer data()
public short front()
public short back()
@Cast(value="const bool") public boolean equals(@ByVal ShortArrayRef RHS)
@Cast(value="const bool") public boolean equals(@ByVal @Cast(value={"jshort*","c10::ArrayRef<jshort>","std::vector<jshort>&"}) @StdVector(value="jshort") short... RHS)
@Const @ByVal public ShortArrayRef slice(@Cast(value="size_t") long N, @Cast(value="size_t") long M)
@Const @ByVal public ShortArrayRef slice(@Cast(value="size_t") long N)
@Name(value="operator []") public short get(@Cast(value="size_t") long Index)
@StdVector public ShortPointer vec()
Copyright © 2024. All rights reserved.