Whether elements are laid out densely in C order.
Definition at line 52 of file TensorSpec.cpp.
53{
55 return true;
57 return false;
58
60 if (count && *count == 0)
61 return true;
62
63 int64_t expected = 1;
64 for (
size_t i =
shape.size(); i-- > 0;) {
66 return false;
67 if (
shape[i] > max_signed /
static_cast<uint64_t
>(std::max<int64_t>(expected, 1)))
68 return false;
69 expected *=
static_cast<int64_t
>(
shape[i]);
70 }
71 return true;
72}
std::vector< double > count(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Sample count per window (as double for pipeline uniformity).
std::optional< uint64_t > element_count() const noexcept
Product of the shape, or std::nullopt on overflow.
std::vector< int64_t > strides
std::vector< uint64_t > shape
References element_count(), shape, and strides.
Referenced by MayaFlux::Kakshya::TensorData::copy_of(), and diagnose().