MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ element_count()

std::optional< uint64_t > MayaFlux::Kakshya::TensorSpec::element_count ( ) const
nodiscardnoexcept

Product of the shape, or std::nullopt on overflow.

Definition at line 42 of file TensorSpec.cpp.

43{
44 uint64_t count = 1;
45 for (const auto extent : shape) {
46 if (!magnitude_times(count, extent, count))
47 return std::nullopt;
48 }
49 return count;
50}
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).
Definition Analysis.cpp:506
std::vector< uint64_t > shape

References shape.

Referenced by byte_range(), diagnose(), MayaFlux::Kakshya::export_dlpack(), is_contiguous(), MayaFlux::IO::SafetensorsReader::open(), and MayaFlux::Kakshya::TensorInsertion::reshape().

Here is the caller graph for this function: