Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Numerics] update CSparse #2

Closed
wants to merge 1 commit into from
Closed

Conversation

xhub
Copy link
Member

@xhub xhub commented Sep 14, 2015

The version of CSparse in Numerics is very old (2006). This commit updates it.

Nothing much to note, except:

  • they change their indices to csi, which is defined to ptrdiff_t if we
    are not compiling to MATLAB. I kept the name csi when dealing with it
    in order to ease the transition if this gets renamed
  • cs_lusol has its signature (order is now the first arg)
  • the BIGGEST issue is in the css struct, where they use define lnz and
    unz as double, but use them as pointers in the code. By looking at the
    function cs_cumsum, it looks like they do that to prevent some
    overflow ... well the real fix should be to use size_t, but then the
    logic at the end of cs_schol is broken. I left them as csi (which is
    like we had before). I don't think we will ever overflow in our case.
    Feel free to give our opinion.

The version of CSparse in Numerics is very old (2006). This updates it.

Nothing much to note, except:
- they change their indices to csi, which is defined to ptrdiff_t if we
  are not compiling to MATLAB. I kept the name csi when dealing with it
  in order to ease the transition if this gets renamed
- cs_lusol has its signature (order is now the first arg)
- the BIGGEST issue is in the css struct, where they use define lnz and
  unz as double, but use them as pointers in the code. By looking at the
  function cs_cumsum, it looks like they do that to prevent some
  overflow ... well the real fix should be to use size_t, but then the
  logic at the end of cs_schol is broken. I left them as csi (which is
  like we had before). I don't think we will ever overflow in our case.
  Feel free to give our opinion.
@bremond
Copy link
Contributor

bremond commented Sep 22, 2015

@xhub
Copy link
Member Author

xhub commented Sep 22, 2015

Thanks for the review and update. I pushed your branch to master directly to avoid 2 (meaningless merges)

@xhub xhub closed this Sep 22, 2015
radarsat1 added a commit to radarsat1/siconos that referenced this pull request Nov 25, 2016
radarsat1 added a commit to radarsat1/siconos that referenced this pull request Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants