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

◆ extract_from_eigen_matrix()

template<typename EigenMatrix >
static std::vector< std::span< double > > MayaFlux::Yantra::OperationHelper::extract_from_eigen_matrix ( const EigenMatrix &  matrix)
inlinestaticprivate

Infer data structure from ComputeData type.

Template Parameters
TComputeData type
Parameters
compute_dataInput data
Returns
Pair of (dimensions, modality)

Definition at line 744 of file OperationHelper.hpp.

745 {
746 static thread_local std::vector<std::vector<double>> columns;
747 columns.clear();
748 columns.resize(matrix.cols());
749 std::vector<std::span<double>> spans;
750 spans.reserve(matrix.cols());
751
752 for (int col = 0; col < matrix.cols(); ++col) {
753 columns[col].resize(matrix.rows());
754 for (int row = 0; row < matrix.rows(); ++row) {
755 columns[col][row] = static_cast<double>(matrix(row, col));
756 }
757 spans.emplace_back(columns[col].data(), columns[col].size());
758 }
759 return spans;
760 }
uint32_t columns

References columns.