MayaFlux 0.1.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 107 of file StructureIntrospection.hpp.

108{
109 size_t size = 0;
110
111 if constexpr (requires { data.size(); }) {
112 size = data.size();
113 } else if constexpr (requires { std::size(data); }) {
114 size = std::size(data);
115 } else {
116 size = 1; // Single element
117 }
118
119 std::vector<Kakshya::DataDimension> dimensions;
120 dimensions.emplace_back(Kakshya::DataDimension::time(size));
121
122 return std::make_pair(std::move(dimensions), Kakshya::DataModality::TENSOR_ND);
123}

References 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: