Trait DLTensorExt
Source pub trait DLTensorExt {
// Required method
unsafe fn numel(&self) -> usize;
}
Expand description
Size queries on a DLTensor.
The number of elements: the product of the shape, 1 for a scalar.
§Safety
shape points to ndim extents, or ndim is 0.
§Panics
If an extent is negative or the product overflows usize.