@Name(value="c10::ivalue::Future") @NoOffset @Properties(inherit=torch.class) public class Future extends Pointer
Modifier and Type | Class and Description |
---|---|
static class |
Future.FutureError |
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Future(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
_wait()
Wait on the future until it completes.
|
boolean |
completed() |
IValue |
constValue() |
FuturePtr |
createInstance(Type.TypePtr type) |
Device |
devices() |
Type.TypePtr |
elementType() |
Pointer |
exception_ptr() |
boolean |
hasError() |
boolean |
hasValue() |
void |
markCompleted() |
void |
markCompleted(IValue value) |
void |
markCompleted(IValue value,
WeakStorageVectorOptional storages)
Explicitly mark the future as completed with the output value.
|
void |
setError(Pointer eptr) |
void |
setErrorIfNeeded(Pointer eptr) |
WeakStorage |
storages() |
BytePointer |
tryRetrieveErrorMessage()
Add a callback to the future, and return another Future to hold the return
value of the callback.
|
IValue |
value() |
void |
waitAndThrow()
Wait on the future until it completes and throw an
exception if an error exists.
|
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 Future(Pointer p)
Pointer(Pointer)
.public void waitAndThrow()
public void markCompleted(@ByVal IValue value, @ByVal(nullValue="c10::optional<std::vector<c10::ivalue::Future::WeakStorage> >(c10::nullopt)") WeakStorageVectorOptional storages)
public void markCompleted()
public void setErrorIfNeeded(@ByVal @Cast(value="std::exception_ptr*") Pointer eptr)
@StdVector public WeakStorage storages()
@StdString public BytePointer tryRetrieveErrorMessage()
@ByVal public Type.TypePtr elementType()
@StdVector public Device devices()
@ByVal public FuturePtr createInstance(@ByVal Type.TypePtr type)
Copyright © 2024. All rights reserved.