Skip to content

i build librom in windows and i fond a memory leak #314

Description

@YuDe95

when i use
CAROM::Matrix* interpolated_matrix = interpolator.interpolate(&desired_point);
Memory increases by 4MB each time it is called.
So i check the code,when call dposv in void MatrixInterpolator::obtainLambda() make it.
so , I replaced dposv with eigen

        Eigen::Map<Eigen::MatrixXd> A(B->getData(), gamma_size, gamma_size);

        // 
        Eigen::Map<Eigen::MatrixXd> X(f_T->getData(), gamma_size, num_elements);

        // 
        Eigen::LLT<Eigen::MatrixXd, Eigen::Upper> llt(A);

        // 
        if (llt.info() != Eigen::Success) { /* error */ }
        llt.solveInPlace(X);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions