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