Macaulay2 Engine
Loading...
Searching...
No Matches

◆ fill_from_lapack_array() [1/2]

void fill_from_lapack_array ( const std::vector< double > & doubles,
DMatCC & mat )

Definition at line 58 of file lapack.cpp.

59{
60 size_t len = 2 * mat.numRows() * mat.numColumns();
61 if (len > doubles.size())
62 {
63 throw exc::engine_error("Internal error: a size in lapack CC code was set too small");
64 }
65 size_t i = 0;
66 for (size_t c = 0; c < mat.numColumns(); ++c)
67 for (size_t r = 0; r < mat.numRows(); ++r)
68 {
69 mat.entry(r, c).re = doubles[i++];
70 mat.entry(r, c).im = doubles[i++];
71 }
72}
size_t numRows() const
Definition dmat.hpp:144
ElementType & entry(size_t row, size_t column)
Definition dmat.hpp:148
size_t numColumns() const
Definition dmat.hpp:145
doubling_stash * doubles
Definition mem.cpp:14

References doubles, DMat< ACoeffRing >::entry(), cc_doubles_struct::im, DMat< ACoeffRing >::numColumns(), DMat< ACoeffRing >::numRows(), and cc_doubles_struct::re.