Skip to content

Commit

Permalink
Merge Pull Request trilinos#6604 from mhoemmen/Trilinos/Tpetra-CrsMat…
Browse files Browse the repository at this point in the history
…rix-long-rows-part-1

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: Tpetra: Start work on trilinos#6603 (optimize CrsMatrix GPU unpack for long rows)
PR Author: mhoemmen
  • Loading branch information
trilinos-autotester authored Jan 21, 2020
2 parents 6b2be13 + 326288d commit 5ee3160
Show file tree
Hide file tree
Showing 22 changed files with 657 additions and 704 deletions.
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Epetra_TsqrMessenger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Epetra_TsqrMessenger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_ApplyOp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
12 changes: 5 additions & 7 deletions packages/tpetra/core/src/Tpetra_Assembly_Helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand All @@ -51,28 +49,28 @@ namespace Impl {
template <typename... Args>
inline void foreach_pack(Args &&... args) {}
} // namespace Impl

template <typename... Args>
void beginFill(Args &&... args)
{
// use the comma operator to transform a potentially void function call
// into a argument to allow proper parameter expansion for c++11
Impl::foreach_pack( (args.beginFill(),1)... );

// using c++17 the code would be
// (args.beginFill()...);
}

template <typename... Args>
void endFill(Args &&... args)
{
// use the comma operator to transform a potentially void function call
// into a argument to allow proper parameter expansion for c++11
Impl::foreach_pack( (args.endFill(),1)... );

// using c++17 the code would be
// (args.endFill()...);

}

}// namespace Tpetra
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_BlockCrsMatrix_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_BlockCrsMatrix_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_BlockMultiVector_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
4 changes: 1 addition & 3 deletions packages/tpetra/core/src/Tpetra_BlockMultiVector_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down Expand Up @@ -825,6 +823,6 @@ blockJacobiUpdate (const Scalar& alpha,
// Must be expanded from within the Tpetra namespace!
//
#define TPETRA_BLOCKMULTIVECTOR_INSTANT(S,LO,GO,NODE) \
template class BlockMultiVector< S, LO, GO, NODE >;
template class BlockMultiVector< S, LO, GO, NODE >;

#endif // TPETRA_BLOCKMULTIVECTOR_DEF_HPP
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_BlockMultiVector_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_ConfigDefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
2 changes: 0 additions & 2 deletions packages/tpetra/core/src/Tpetra_Core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact Michael A. Heroux ([email protected])
//
// ************************************************************************
// @HEADER

Expand Down
36 changes: 5 additions & 31 deletions packages/tpetra/core/src/Tpetra_CrsGraph_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ namespace Tpetra {
/// default values.
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,
const Kokkos::DualView<const size_t*, execution_space>& numEntPerRow,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);

/// \brief Constructor specifying a (possibly different) upper
Expand All @@ -350,7 +350,7 @@ namespace Tpetra {
/// default values.
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,
const Teuchos::ArrayView<const size_t>& numEntPerRow,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);


Expand Down Expand Up @@ -379,7 +379,7 @@ namespace Tpetra {
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,
const Teuchos::RCP<const map_type>& colMap,
const size_t maxNumEntriesPerRow,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);

/// \brief Constructor specifying column Map and number of entries in each row.
Expand All @@ -404,7 +404,7 @@ namespace Tpetra {
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,
const Teuchos::RCP<const map_type>& colMap,
const Kokkos::DualView<const size_t*, execution_space>& numEntPerRow,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);

/// \brief Constructor specifying column Map and number of entries
Expand All @@ -430,7 +430,7 @@ namespace Tpetra {
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,
const Teuchos::RCP<const map_type>& colMap,
const Teuchos::ArrayView<const size_t>& numEntPerRow,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);


Expand Down Expand Up @@ -2307,32 +2307,6 @@ namespace Tpetra {
/// bound the number of entries per row.
//@{

/// \brief Local column indices for all rows.
///
/// This is only allocated if
///
/// - The calling process has a nonzero number of entries
/// - The graph has DynamicProfile (2-D storage)
/// - The graph is locally indexed
///
/// In that case, if i_lcl is the local index of a locally owned
/// row, then lclInds2D_[i_lcl] stores the local column indices
/// for that row.
Teuchos::ArrayRCP<Teuchos::Array<local_ordinal_type> > lclInds2D_;

/// \brief Global column indices for all rows.
///
/// This is only allocated if
///
/// - The calling process has a nonzero number of entries
/// - The graph has DynamicProfile (2-D storage)
/// - The graph is globally indexed
///
/// In that case, if i_gbl is the global index of a globally owned
/// row, then gblInds2D_[i_gbl] stores the global column indices
/// for that row.
Teuchos::ArrayRCP<Teuchos::Array<global_ordinal_type> > gblInds2D_;

/// \brief The type of k_numRowEntries_ (see below).
///
/// This View gets used only on host. However, making this
Expand Down
Loading

0 comments on commit 5ee3160

Please sign in to comment.