@Name(value="c10::ArrayRef<c10::cuda::CUDAStream>") @Properties(inherit=torch_cuda.class) public class CUDAStreamArrayRef extends CUDAStreamHeaderOnlyArrayRef
virtual would change the performance of
the underlying constexpr calls, we rely on apparent-type dispatch for
inheritance. This should be fine because their memory format is the same,
and it is never incorrect for ArrayRef to call HeaderOnlyArrayRef methods.
However, you should prefer to use ArrayRef when possible, because its use
of TORCH_CHECK will lead to better user-facing error messages.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
CUDAStreamArrayRef() |
CUDAStreamArrayRef(CUDAStream begin,
CUDAStream end) |
CUDAStreamArrayRef(CUDAStream data,
long length) |
CUDAStreamArrayRef(long size)
Native array allocator.
|
CUDAStreamArrayRef(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CUDAStream |
at(long Index)
\}
\name Operator Overloads
\{
|
CUDAStream |
back()
back - Get the last element.
|
CUDAStream |
front()
\}
\name Simple Operations, mostly inherited from HeaderOnlyArrayRef
\{
|
CUDAStreamArrayRef |
getPointer(long i) |
CUDAStreamArrayRef |
position(long position) |
CUDAStreamArrayRef |
slice(long N)
slice(n) - Chop off the first N elements of the array.
|
CUDAStreamArrayRef |
slice(long N,
long M)
slice(n, m) - Take M elements of the array starting at element N
We deviate from HeaderOnlyArrayRef by using TORCH_CHECK instead of
STD_TORCH_CHECK
|
data, empty, get, size, vecaddress, 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, trimMemory, withDeallocator, zeropublic CUDAStreamArrayRef()
public CUDAStreamArrayRef(@Const CUDAStream data, @Cast(value="size_t") long length)
public CUDAStreamArrayRef(@Const CUDAStream begin, @Const CUDAStream end)
public CUDAStreamArrayRef(Pointer p)
Pointer(Pointer).public CUDAStreamArrayRef(long size)
Pointer.position(long).public CUDAStreamArrayRef position(long position)
position in class CUDAStreamHeaderOnlyArrayRefpublic CUDAStreamArrayRef getPointer(long i)
getPointer in class CUDAStreamHeaderOnlyArrayRef@Const @ByRef public CUDAStream front()
front - Get the first element. We deviate from HeaderOnlyArrayRef by using TORCH_CHECK instead of STD_TORCH_CHECK
front in class CUDAStreamHeaderOnlyArrayRef@Const @ByRef public CUDAStream back()
back in class CUDAStreamHeaderOnlyArrayRef@Const @ByVal public CUDAStreamArrayRef slice(@Cast(value="size_t") long N, @Cast(value="size_t") long M)
slice in class CUDAStreamHeaderOnlyArrayRef@Const @ByVal public CUDAStreamArrayRef slice(@Cast(value="size_t") long N)
slice in class CUDAStreamHeaderOnlyArrayRef@Const @ByRef public CUDAStream at(@Cast(value="size_t") long Index)
Vector compatibility We deviate from HeaderOnlyArrayRef by using TORCH_CHECK instead of STD_TORCH_CHECK
at in class CUDAStreamHeaderOnlyArrayRefCopyright © 2026. All rights reserved.