Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Trilinos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 936
    • Issues 936
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • James Willenbring
  • Trilinos
  • Issues
  • #213

Closed
Open
Created Mar 12, 2016 by James Willenbring@jmwilleMaintainer

Tpetra::CrsGraph::getLocalDiagOffsets: Use LocalOrdinal instead of size_t for offsets

Created by: mhoemmen

@trilinos/tpetra

This doesn't block #212 (closed), but is related. In particular, #205 (closed) makes it easier to use whatever offset type we want in Tpetra, since the proposed search code is agnostic of the offset type.

Tpetra::CrsGraph::getLocalDiagOffsets computes the offset of each row's diagonal entry. Tpetra uses this to speed up extracting the diagonal entries of a CrsMatrix, and the block diagonal entries of a BlockCrsMatrix.

getLocalDiagOffsets computes offsets relative to each row. Thus, the type used to store offsets need only be able to represent the number of entries in a single row. If there are no duplicates in the row, LocalOrdinal thus suffices. If LocalOrdinal is 32 bits, this saves space and speeds up the computation.

There are no duplicates if the graph or matrix is fillComplete. Epetra never has duplicates in the graph, because insertion always merges; it never stores duplicates. #119 means that in Tpetra, it is technically possible to insert more duplicate entries in a row than the number of columns in the matrix. However, that is a weird edge case. Furthermore, there is no advantage to having a single type (currently size_t) for offsets, independent of other template parameters, because the main customer (Ifpack2) of getLocalDiagOffsets takes the same template parameters as Tpetra classes anyway.

Assignee
Assign to
Time tracking