@Namespace(value="torch::nn") @Properties(inherit=torch.class) public class AnyValue extends Pointer
std::any
which stores
a type erased object, whose concrete value can be retrieved at runtime by
checking if the typeid()
of a requested type matches the typeid()
of
the object stored.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
AnyValue(AnyValue arg0)
Move construction and assignment is allowed, and follows the default
behavior of move for
std::unique_ptr . |
AnyValue(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
ASMoutput |
getASMoutput() |
T_TensorT_TensorTensor_T_T |
getT_TensorT_TensorTensor_T_T() |
T_TensorTensor_T |
getT_TensorTensor_T() |
Tensor |
getTensor()
Returns the value contained in the
AnyValue if the type passed as
template parameter matches the type of the value stored, and throws an
exception otherwise. |
AnyValue |
put(AnyValue arg0) |
ASMoutput |
try_getASMoutput() |
T_TensorT_TensorTensor_T_T |
try_getT_TensorT_TensorTensor_T_T() |
T_TensorTensor_T |
try_getT_TensorTensor_T() |
Tensor |
try_getTensor()
Returns a pointer to the value contained in the
AnyValue if the type
passed as template parameter matches the type of the value stored, and
returns a null pointer otherwise. |
Pointer |
type_info()
Returns the
type_info object of the contained value. |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public AnyValue(Pointer p)
Pointer(Pointer)
.@Name(value="try_get<at::Tensor>") public Tensor try_getTensor()
AnyValue
if the type
passed as template parameter matches the type of the value stored, and
returns a null pointer otherwise.@Name(value="try_get<std::tuple<at::Tensor,at::Tensor> >") public T_TensorTensor_T try_getT_TensorTensor_T()
@Name(value="try_get<std::tuple<torch::Tensor,std::tuple<torch::Tensor,torch::Tensor> > >") public T_TensorT_TensorTensor_T_T try_getT_TensorT_TensorTensor_T_T()
@ByVal @Name(value="get<at::Tensor>") public Tensor getTensor()
AnyValue
if the type passed as
template parameter matches the type of the value stored, and throws an
exception otherwise.@ByVal @Name(value="get<std::tuple<at::Tensor,at::Tensor> >") public T_TensorTensor_T getT_TensorTensor_T()
@ByVal @Name(value="get<std::tuple<torch::Tensor,std::tuple<torch::Tensor,torch::Tensor> > >") public T_TensorT_TensorTensor_T_T getT_TensorT_TensorTensor_T_T()
Copyright © 2024. All rights reserved.