Tpetra and Xpetra: request for typedef or clarification of offset_type
Created by: kddevin
Tpetra uses offset_type for the offsets into the column pointers array. From #153 (closed), it is difficult to tell whether this type is always size_t, or is sometimes int, or is sometimes defined by the node. I am further confused because Tpetra::CrsMatrix::getAllValues uses size_t for the rowPointers; does it make a copy when offset_type is not size_t? Does getAllValues() make copies of all three arrays?
Should we assume that getAllValues will always return size_t rowPointers? If not, we'll need Tpetra and Xpetra to add a public typedef allowing users to access the offset_type, similar to local_ordinal_type or global_ordinal_type.
This request supports #665. In Zoltan2, we had assumed offsets would be local_ordinal_type. In order to use views of the offsets (instead of making copies in Zoltan2), we need to change our offsets to Tpetra's offset type. But before we propagate this change through Zoltan2, we'd like to understand what offset_type really is, and whether we should use size_t everywhere or some other offset_type. This is a change we'd like to propagate only once, so if there are plans for changes in the future, please let us know.
Thanks. @trilinos/tpetra @trilinos/xpetra @trilinos/zoltan2