@Name(value="c10::List<at::Tensor>") @NoOffset @Properties(inherit=torch.class) public class TensorList extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TensorList()
Constructs an empty list.
|
TensorList(long size)
Native array allocator.
|
TensorList(Pointer p)
Pointer cast constructor.
|
TensorList(TensorArrayRef initial_values)
Constructs a list with some initial values.
|
TensorList(TensorList arg0)
Create a generic list with runtime type information.
|
TensorList(TensorVector initial_values) |
Modifier and Type | Method and Description |
---|---|
void |
append(TensorList lst)
Appends the given list to the end of the container.
|
TensorListIterator |
begin()
Returns an iterator to the first element of the container.
|
void |
clear()
Erases all elements from the container.
|
TensorList |
copy()
Create a new List pointing to a deep copy of the same data.
|
Type.TypePtr |
elementType() |
boolean |
empty()
Checks if the container has no elements.
|
TensorListIterator |
end()
Returns an iterator to the element following the last element of the container.
|
TensorListIterator |
erase(TensorListIterator pos)
Removes the element at pos.
|
TensorListIterator |
erase(TensorListIterator first,
TensorListIterator last)
Removes the elements in the range [first, last).
|
Tensor |
extract(long pos)
Moves out the element at the specified location pos and returns it, with bounds checking.
|
Tensor |
get(long pos)
Returns the element at specified location pos, with bounds checking.
|
TensorList |
getPointer(long i) |
TensorListIterator |
insert(TensorListIterator pos,
Tensor value)
Inserts value before pos.
|
boolean |
is(TensorList rhs)
Identity comparison.
|
void |
pop_back()
Removes the last element of the container.
|
TensorList |
position(long position) |
void |
push_back(Tensor value)
Appends the given element value to the end of the container.
|
TensorList |
put(TensorList arg0) |
void |
reserve(long new_cap)
Increase the capacity of the vector to a value that's greater or equal to new_cap.
|
void |
resize(long count)
Resizes the container to contain count elements.
|
void |
resize(long count,
Tensor value)
Resizes the container to contain count elements.
|
void |
set(long pos,
Tensor value)
Assigns a new value to the element at location pos.
|
long |
size()
Returns the number of elements in the container
|
void |
unsafeSetElementType(Type.TypePtr t) |
long |
use_count()
Returns the number of Lists currently pointing to this same list.
|
TensorVector |
vec() |
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 TensorList(Pointer p)
Pointer(Pointer)
.public TensorList(long size)
Pointer.position(long)
.public TensorList()
public TensorList(@ByVal TensorArrayRef initial_values)
public TensorList(@ByVal TensorVector initial_values)
public TensorList(@Const @ByRef TensorList arg0)
public TensorList position(long position)
public TensorList getPointer(long i)
getPointer
in class Pointer
@ByRef @Name(value="operator =") public TensorList put(@Const @ByRef TensorList arg0)
@ByVal public TensorList copy()
@ByVal public Tensor get(long pos)
@ByVal public Tensor extract(long pos)
public void set(long pos, @ByVal Tensor value)
@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") public TensorListIterator begin()
@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") public TensorListIterator end()
public long size()
public void reserve(long new_cap)
public void clear()
@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") public TensorListIterator insert(@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") TensorListIterator pos, @Const @ByRef Tensor value)
public void push_back(@Const @ByRef Tensor value)
public void append(@ByVal TensorList lst)
@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") public TensorListIterator erase(@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") TensorListIterator pos)
@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") public TensorListIterator erase(@ByVal @Cast(value="c10::List<at::Tensor>::iterator*") TensorListIterator first, @ByVal @Cast(value="c10::List<at::Tensor>::iterator*") TensorListIterator last)
public void pop_back()
public void resize(long count)
public void resize(long count, @Const @ByRef Tensor value)
@Cast(value="bool") public boolean is(@Const @ByRef TensorList rhs)
rhs
represents the same
List object as this
.@Cast(value={"","std::vector<torch::Tensor>"}) @StdMove public TensorVector vec()
@Cast(value="size_t") public long use_count()
@ByVal public Type.TypePtr elementType()
public void unsafeSetElementType(@ByVal Type.TypePtr t)
Copyright © 2024. All rights reserved.