5#ifndef PROXSUITE_LINALG_SPARSE_LDLT_ROWMOD_HPP
6#define PROXSUITE_LINALG_SPARSE_LDLT_ROWMOD_HPP
23template<
typename T,
typename I>
50template<
typename T,
typename I>
64 perm_inv ==
nullptr ? usize(
pos) : util::zero_extend(perm_inv[
pos]);
67 I*
pldi = ld.row_indices_mut();
68 T*
pldx = ld.values_mut();
69 I*
pldnz = ld.nnz_per_col_mut();
72 auto col_start = ld.col_start(
j) + 1;
73 auto col_end = ld.col_end(
j);
84 std::memmove(
it,
it + 1,
count *
sizeof(I));
93 ld._set_nnz(ld.nnz() - 1);
112 isize len = isize(util::zero_extend(ld.nnz_per_col()[
permuted_pos])) - 1;
116 static_cast<I
const*
>(
nullptr),
141template<
typename T,
typename I>
152 auto numerical_work = StackReq{ n * isize{
sizeof(T) }, isize{
alignof(T) } };
154 StackReq{ (
id_perm ? 0 : nnz) * isize{
sizeof(I) }, isize{
alignof(I) } };
155 auto pattern_diff = StackReq{ n * isize{
sizeof(I) }, isize{
alignof(I) } };
188template<
typename T,
typename I>
199 bool id_perm = perm_inv ==
nullptr;
200 auto zx = util::zero_extend;
202 I*
pldp = ld.col_ptrs_mut();
203 I*
pldnz = ld.nnz_per_col_mut();
204 I*
pldi = ld.row_indices_mut();
205 T*
pldx = ld.values_mut();
230 for (usize
k = 0;
k < usize(
new_col.nnz()); ++
k) {
258 for (usize p = 0; p < usize(
new_col.nnz()); ++p) {
275 j = util::sign_extend(
etree[
j]);
292 for (usize p = 0; p < usize(
new_col.nnz()); ++p) {
304 ld._set_nnz(ld.nnz() + 1);
315 auto col_start = ld.col_start(
j);
316 auto col_end = ld.col_end(
j);
325 static_cast<T*
>(
nullptr),
351 for (usize
q = col_start + 1;
q < col_end; ++
q) {
362 auto col_start = ld.col_start(
j);
363 auto col_end = ld.col_end(
j);
364 T d =
pldx[col_start];
377 if (
it == (
pldi + col_start + 1)) {
386 usize((
pldi + col_end) -
it) *
sizeof(I));
395 usize((
pldi + col_end) -
it) *
sizeof(T));
403 ld._set_nnz(ld.nnz() + 1);
411 for (usize p = col_start + 1; p < col_end; ++p) {
422 isize len = isize(util::zero_extend(ld.nnz_per_col()[
permuted_pos])) - 1;
426 static_cast<I
const*
>(
nullptr),
#define VEG_CHECK_CONCEPT(...)
auto delete_row_req(proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, isize max_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq
auto delete_row(MatMut< T, I > ld, I *etree, I const *perm_inv, isize pos, DynStackMut stack) noexcept(false) -> MatMut< T, I >
auto merge_second_col_into_first(I *difference, T *first_values, I *first_ptr, PROXSUITE_MAYBE_UNUSED isize first_full_len, isize first_initial_len, Slice< I > second, proxsuite::linalg::veg::DoNotDeduce< I > ignore_threshold_inclusive, bool move_values, DynStackMut stack) noexcept(false) -> proxsuite::linalg::veg::Tuple< SliceMut< T >, SliceMut< I >, SliceMut< I > >
VEG_INLINE void etree(I *parent, SymbolicMatRef< I > a, DynStackMut stack) noexcept
auto add_row(MatMut< T, I > ld, I *etree, I const *perm_inv, isize pos, VecRef< T, I > new_col, proxsuite::linalg::veg::DoNotDeduce< T > diag_element, DynStackMut stack) noexcept(false) -> MatMut< T, I >
auto rank1_update_req(proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, bool id_perm, isize col_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq
auto add_row_req(proxsuite::linalg::veg::Tag< T >, proxsuite::linalg::veg::Tag< I >, isize n, bool id_perm, isize nnz, isize max_nnz) noexcept -> proxsuite::linalg::veg::dynstack::StackReq
auto merge_second_col_into_first_req(proxsuite::linalg::veg::Tag< I >, isize second_size) noexcept -> proxsuite::linalg::veg::dynstack::StackReq
#define VEG_BIND(CV_Auto, Identifiers, Tuple)