pub struct TensorMemoryInfo {
pub total_elements: usize,
pub element_size: usize,
pub total_bytes: usize,
pub is_contiguous: bool,
pub alignment: usize,
pub is_on_gpu: bool,
pub device: String,
}Expand description
Memory information for tensors テンソルのメモリ情報
Fields§
§total_elements: usizeTotal number of elements in the tensor テンソルの総要素数
element_size: usizeSize of each element in bytes 各要素のバイトサイズ
total_bytes: usizeTotal memory used in bytes 使用メモリの総バイト数
is_contiguous: boolWhether the tensor data is contiguous in memory テンソルデータがメモリ上で連続しているか
alignment: usizeMemory alignment in bytes メモリアライメント(バイト)
is_on_gpu: boolWhether the tensor is stored on GPU テンソルがGPU上に保存されているか
device: StringDevice type string デバイスタイプ文字列
Trait Implementations§
Source§impl Clone for TensorMemoryInfo
impl Clone for TensorMemoryInfo
Source§fn clone(&self) -> TensorMemoryInfo
fn clone(&self) -> TensorMemoryInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TensorMemoryInfo
impl RefUnwindSafe for TensorMemoryInfo
impl Send for TensorMemoryInfo
impl Sync for TensorMemoryInfo
impl Unpin for TensorMemoryInfo
impl UnwindSafe for TensorMemoryInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more