Co-authored-by: Jules Pénuchot <jules@penuchot.com> Co-authored-by: Joel FALCOU <jfalcou@codereckons.com> See merge request oss/rotgen!41
20 lines
619 B
C++
20 lines
619 B
C++
//==================================================================================================
|
|
/*
|
|
ROTGEN - Runtime Overlay for Eigen
|
|
Copyright : CODE RECKONS
|
|
SPDX-License-Identifier: BSL-1.0
|
|
*/
|
|
//==================================================================================================
|
|
#pragma once
|
|
|
|
namespace rotgen::solver
|
|
{
|
|
template<typename X, typename M, typename RHS>
|
|
void qr(X& x, M const& m, RHS const& rhs)
|
|
{
|
|
auto r_x = generalize_t<X>(x);
|
|
auto r_m = generalize_t<M const>(m);
|
|
auto r_rhs = generalize_t<RHS const>(rhs);
|
|
r_x = r_m.base().qr_solve(r_rhs.base());
|
|
}
|
|
}
|