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

◆ infer_generic_structure()

template<typename T >
static std::pair< std::vector< Kakshya::DataDimension >, Kakshya::DataModality > MayaFlux::Yantra::infer_generic_structure ( const T &  data)
static

Generic structure inference for unknown types.

Definition at line 121 of file StructureIntrospection.hpp.

122{
123 size_t size = 0;
124
125 if constexpr (requires { data.size(); }) {
126 size = data.size();
127 } else if constexpr (requires { std::size(data); }) {
128 size = std::size(data);
129 } else {
130 size = 1; // Single element
131 }
132
133 std::vector<Kakshya::DataDimension> dimensions;
134 dimensions.emplace_back(Kakshya::DataDimension::time(size));
135
136 return std::make_pair(std::move(dimensions), Kakshya::DataModality::TENSOR_ND);
137}
bool size

References size, MayaFlux::Kakshya::TENSOR_ND, and MayaFlux::Kakshya::DataDimension::time().

Referenced by infer_structure().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: