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

◆ resolved_strides()

std::vector< int64_t > MayaFlux::Kakshya::TensorSpec::resolved_strides ( ) const
nodiscard

Element strides, with C order filled in when none are stored.

Definition at line 74 of file TensorSpec.cpp.

75{
76 if (!strides.empty())
77 return strides;
78
79 std::vector<int64_t> result(shape.size(), 1);
80 int64_t running = 1;
81 for (size_t i = shape.size(); i-- > 0;) {
82 result[i] = running;
83 running *= static_cast<int64_t>(std::max<uint64_t>(shape[i], 1));
84 }
85 return result;
86}
std::vector< int64_t > strides
std::vector< uint64_t > shape

References shape, and strides.

Referenced by byte_range(), MayaFlux::Kakshya::TensorData::copy_of(), dimensions(), MayaFlux::Kakshya::export_dlpack(), and window().

Here is the caller graph for this function: