3 #include <c10/core/DeviceGuard.h> 4 #include <ATen/core/Tensor.h> 5 #include <c10/core/ScalarType.h> 19 return make_optional(t.
device());
AT_CPP14_CONSTEXPR const T & front() const
front - Get the first element.
optional< Device > device_of(Tensor t)
Return the Device of a Tensor, if the Tensor is defined.
Device device() const
Returns a Tensor's device.
constexpr bool empty() const
empty - Check if the array is empty.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Flush-To-Zero and Denormals-Are-Zero mode.