Commit d852ab61 authored by crtrott's avatar crtrott
Browse files

Tpetra: fix usage of device_type

This generally replaces device_type with execution_space
and DeviceType with ExecutionSpace except for some places where
the new compound device_type should be used.
parent f87e47bb
......@@ -65,12 +65,12 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PackArraySingleColumnConstantStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> exportLIDs;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type> exports;
Kokkos::View<const LocalOrdinal*, execution_space> exportLIDs;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space> exports;
KOKKOS_INLINE_FUNCTION
void operator()( const size_type k ) const {
......@@ -82,12 +82,12 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PackArraySingleColumnOffset {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> exportLIDs;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type> exports;
Kokkos::View<const LocalOrdinal*, execution_space> exportLIDs;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space> exports;
size_t offset;
KOKKOS_INLINE_FUNCTION
......@@ -100,12 +100,12 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PackArrayMultiColumnConstantStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> exportLIDs;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type> exports;
Kokkos::View<const LocalOrdinal*, execution_space> exportLIDs;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space> exports;
size_t stride, numCols;
KOKKOS_INLINE_FUNCTION
......@@ -121,13 +121,13 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PackArrayMultiColumnVariableStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> exportLIDs;
Kokkos::View<const size_t*, device_type> srcWhichVectors;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type> exports;
Kokkos::View<const LocalOrdinal*, execution_space> exportLIDs;
Kokkos::View<const size_t*, execution_space> srcWhichVectors;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space> exports;
size_t stride, numCols;
KOKKOS_INLINE_FUNCTION
......@@ -176,12 +176,12 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Op, typename Device>
struct UnpackArrayMultiColumnConstantStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> importLIDs;
Kokkos::View<const Scalar*, device_type> imports;
Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged> dest;
Kokkos::View<const LocalOrdinal*, execution_space> importLIDs;
Kokkos::View<const Scalar*, execution_space> imports;
Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged> dest;
size_t stride, numCols;
Op op;
......@@ -198,13 +198,13 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Op, typename Device>
struct UnpackArrayMultiColumnVariableStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> importLIDs;
Kokkos::View<const size_t*, device_type> whichVectors;
Kokkos::View<const Scalar*, device_type> imports;
Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged> dest;
Kokkos::View<const LocalOrdinal*, execution_space> importLIDs;
Kokkos::View<const size_t*, execution_space> whichVectors;
Kokkos::View<const Scalar*, execution_space> imports;
Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged> dest;
size_t stride, numCols;
Op op;
......@@ -221,13 +221,13 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PermuteArrayMultiColumnConstantStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> permuteToLIDs;
Kokkos::View<const LocalOrdinal*, device_type> permuteFromLIDs;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged> dest;
Kokkos::View<const LocalOrdinal*, execution_space> permuteToLIDs;
Kokkos::View<const LocalOrdinal*, execution_space> permuteFromLIDs;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged> dest;
size_t src_stride, dest_stride, numCols;
KOKKOS_INLINE_FUNCTION
......@@ -243,15 +243,15 @@ namespace Details {
template <typename Scalar, typename LocalOrdinal, typename Device>
struct PermuteArrayMultiColumnVariableStride {
typedef Device device_type;
typedef typename device_type::size_type size_type;
Kokkos::View<const LocalOrdinal*, device_type> permuteToLIDs;
Kokkos::View<const LocalOrdinal*, device_type> permuteFromLIDs;
Kokkos::View<const size_t*, device_type> src_whichVectors;
Kokkos::View<const size_t*, device_type> dest_whichVectors;
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged> dest;
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
Kokkos::View<const LocalOrdinal*, execution_space> permuteToLIDs;
Kokkos::View<const LocalOrdinal*, execution_space> permuteFromLIDs;
Kokkos::View<const size_t*, execution_space> src_whichVectors;
Kokkos::View<const size_t*, execution_space> dest_whichVectors;
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> src;
Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged> dest;
size_t src_stride, dest_stride, numCols;
KOKKOS_INLINE_FUNCTION
......
......@@ -96,8 +96,8 @@ namespace Tpetra {
typedef Node node_type;
//! The Kokkos Device type
typedef typename Kokkos::Compat::NodeDevice<node_type>::type device_type;
typedef typename device_type::size_type view_size_type;
typedef typename Kokkos::Compat::NodeDevice<node_type>::type execution_space;
typedef typename execution_space::size_type view_size_type;
//@}
//! @name Constructors and destructor
......@@ -419,8 +419,8 @@ namespace Tpetra {
copyAndPermute (
const SrcDistObject& source,
size_t numSameIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteFromLIDs) = 0;
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteFromLIDs) = 0;
/// \brief Perform any packing or preparation required for communication.
///
......@@ -447,9 +447,9 @@ namespace Tpetra {
virtual void
packAndPrepare (
const SrcDistObject& source,
const Kokkos::View<const LocalOrdinal*, device_type> &exportLIDs,
Kokkos::View<Packet*, device_type> &exports,
const Kokkos::View<size_t*, device_type> &numPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &exportLIDs,
Kokkos::View<Packet*, execution_space> &exports,
const Kokkos::View<size_t*, execution_space> &numPacketsPerLID,
size_t& constantNumPackets,
Distributor &distor) = 0;
......@@ -476,9 +476,9 @@ namespace Tpetra {
/// imported entries with existing entries.
virtual void
unpackAndCombine (
const Kokkos::View<const LocalOrdinal*, device_type> &importLIDs,
const Kokkos::View<const Packet*, device_type> &imports,
const Kokkos::View<size_t*, device_type> &numPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &importLIDs,
const Kokkos::View<const Packet*, execution_space> &imports,
const Kokkos::View<size_t*, execution_space> &numPacketsPerLID,
size_t constantNumPackets,
Distributor &distor,
CombineMode CM) = 0;
......@@ -526,7 +526,7 @@ namespace Tpetra {
private:
//! Buffer into which packed data are imported (received from other processes).
Kokkos::View<packet_type*,device_type> imports_;
Kokkos::View<packet_type*,execution_space> imports_;
/// \brief Number of packets to receive for each receive operation.
///
......@@ -538,11 +538,11 @@ namespace Tpetra {
/// (For example, MultiVector sets the constantNumPackets output
/// argument of packAndPrepare() to the number of columns in
/// the multivector.)
Kokkos::View<size_t*,device_type> numImportPacketsPerLID_;
typename Kokkos::View<size_t*,device_type>::HostMirror host_numImportPacketsPerLID_;
Kokkos::View<size_t*,execution_space> numImportPacketsPerLID_;
typename Kokkos::View<size_t*,execution_space>::HostMirror host_numImportPacketsPerLID_;
//! Buffer from which packed data are exported (sent to other processes).
Kokkos::View<packet_type*,device_type> exports_;
Kokkos::View<packet_type*,execution_space> exports_;
/// \brief Number of packets to send for each send operation.
///
......@@ -554,7 +554,7 @@ namespace Tpetra {
/// (For example, MultiVector sets the constantNumPackets output
/// argument of packAndPrepare() to the number of columns in the
/// multivector.)
Kokkos::View<size_t*,device_type> numExportPacketsPerLID_;
Kokkos::View<size_t*,execution_space> numExportPacketsPerLID_;
#ifdef HAVE_TPETRA_TRANSFER_TIMERS
Teuchos::RCP<Teuchos::Time> doXferTimer_;
......
......@@ -355,15 +355,15 @@ namespace Tpetra {
#endif // HAVE_TPETRA_TRANSFER_TIMERS
// Convert arguments to Kokkos::View's (involves deep copy to device)
typedef Kokkos::View<const LocalOrdinal*, device_type> lo_const_view_type;
typedef Kokkos::View<const LocalOrdinal*, execution_space> lo_const_view_type;
lo_const_view_type permuteToLIDs =
getKokkosViewDeepCopy<device_type> (permuteToLIDs_);
getKokkosViewDeepCopy<execution_space> (permuteToLIDs_);
lo_const_view_type permuteFromLIDs =
getKokkosViewDeepCopy<device_type> (permuteFromLIDs_);
getKokkosViewDeepCopy<execution_space> (permuteFromLIDs_);
lo_const_view_type remoteLIDs =
getKokkosViewDeepCopy<device_type> (remoteLIDs_);
getKokkosViewDeepCopy<execution_space> (remoteLIDs_);
lo_const_view_type exportLIDs =
getKokkosViewDeepCopy<device_type> (exportLIDs_);
getKokkosViewDeepCopy<execution_space> (exportLIDs_);
TEUCHOS_TEST_FOR_EXCEPTION(
! checkSizes (src), std::invalid_argument,
......@@ -480,8 +480,8 @@ namespace Tpetra {
}
// Create mirror views of [import|export]PacketsPerLID
typename Kokkos::View<size_t*,device_type>::HostMirror host_numExportPacketsPerLID = Kokkos::create_mirror_view (numExportPacketsPerLID_);
typename Kokkos::View<size_t*,device_type>::HostMirror host_numImportPacketsPerLID = Kokkos::create_mirror_view (numImportPacketsPerLID_);
typename Kokkos::View<size_t*,execution_space>::HostMirror host_numExportPacketsPerLID = Kokkos::create_mirror_view (numExportPacketsPerLID_);
typename Kokkos::View<size_t*,execution_space>::HostMirror host_numImportPacketsPerLID = Kokkos::create_mirror_view (numImportPacketsPerLID_);
// Copy numExportPacketsPerLID to host
Kokkos::deep_copy (host_numExportPacketsPerLID, numExportPacketsPerLID_);
......
......@@ -493,8 +493,8 @@ packAndPrepareWithOwningPIDs (const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdina
typedef GlobalOrdinal GO;
typedef CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> matrix_type;
typedef typename matrix_type::impl_scalar_type ST;
typedef typename Node::device_type device_type;
typedef typename View<int*, device_type>::HostMirror::host_mirror_space HMS;
typedef typename Node::execution_space execution_space;
typedef typename View<int*, execution_space>::HostMirror::host_mirror_space HMS;
typedef Map<LocalOrdinal,GlobalOrdinal,Node> map_type;
typedef typename ArrayView<const LO>::size_type size_type;
typedef std::pair<typename View<int*, HMS>::size_type,
......@@ -666,8 +666,8 @@ unpackAndCombineWithOwningPIDsCount (const CrsMatrix<Scalar, LocalOrdinal, Globa
typedef CrsMatrix<Scalar, LO, GO, Node> matrix_type;
typedef typename matrix_type::impl_scalar_type ST;
typedef typename Teuchos::ArrayView<const LO>::size_type size_type;
typedef typename Node::device_type device_type;
typedef typename Kokkos::View<int*, device_type>::HostMirror::host_mirror_space HMS;
typedef typename Node::execution_space execution_space;
typedef typename Kokkos::View<int*, execution_space>::HostMirror::host_mirror_space HMS;
const char prefix[] = "unpackAndCombineWithOwningPIDsCount: ";
TEUCHOS_TEST_FOR_EXCEPTION(
......@@ -752,8 +752,8 @@ unpackAndCombineIntoCrsArrays (const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdin
using Teuchos::reduceAll;
typedef LocalOrdinal LO;
typedef GlobalOrdinal GO;
typedef typename Node::device_type device_type;
typedef typename Kokkos::View<int*, device_type>::HostMirror::host_mirror_space HMS;
typedef typename Node::execution_space execution_space;
typedef typename Kokkos::View<int*, execution_space>::HostMirror::host_mirror_space HMS;
typedef CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> matrix_type;
typedef typename matrix_type::impl_scalar_type ST;
typedef Map<LocalOrdinal,GlobalOrdinal,Node> map_type;
......
......@@ -466,7 +466,7 @@ namespace Tpetra {
#if TPETRA_USE_KOKKOS_DISTOBJECT
typedef DistObjectKA<Scalar, LocalOrdinal, GlobalOrdinal, Node> DO;
typedef typename DO::device_type device_type;
typedef typename DO::execution_space execution_space;
#else
typedef DistObject<Scalar, LocalOrdinal, GlobalOrdinal, Node> DO;
#endif
......@@ -1368,23 +1368,23 @@ namespace Tpetra {
copyAndPermute (
const SrcDistObject& sourceObj,
size_t numSameIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteFromLIDs);
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteFromLIDs);
virtual void
packAndPrepare (
const SrcDistObject& sourceObj,
const Kokkos::View<const LocalOrdinal*, device_type> &exportLIDs,
Kokkos::View<Scalar*, device_type> &exports,
const Kokkos::View<size_t*, device_type> &numPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &exportLIDs,
Kokkos::View<Scalar*, execution_space> &exports,
const Kokkos::View<size_t*, execution_space> &numPacketsPerLID,
size_t& constantNumPackets,
Distributor &distor);
virtual void
unpackAndCombine (
const Kokkos::View<const LocalOrdinal*, device_type> &importLIDs,
const Kokkos::View<const Scalar*, device_type> &imports,
const Kokkos::View<size_t*, device_type> &numPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &importLIDs,
const Kokkos::View<const Scalar*, execution_space> &imports,
const Kokkos::View<size_t*, execution_space> &numPacketsPerLID,
size_t constantNumPackets,
Distributor &distor,
CombineMode CM);
......@@ -1425,18 +1425,18 @@ namespace Tpetra {
//@}
#if TPETRA_USE_KOKKOS_DISTOBJECT
Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged>
Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged>
getKokkosView () const {
Teuchos::ArrayRCP<const Scalar> buff = MVT::getValues (lclMV_);
typedef Kokkos::View<const Scalar*, device_type, Kokkos::MemoryUnmanaged> the_view_type;
typedef Kokkos::View<const Scalar*, execution_space, Kokkos::MemoryUnmanaged> the_view_type;
the_view_type v (buff.getRawPtr (), buff.size ());
return v;
}
Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged>
Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged>
getKokkosViewNonConst () {
Teuchos::ArrayRCP<Scalar> buff = MVT::getValuesNonConst (lclMV_);
typedef Kokkos::View<Scalar*, device_type, Kokkos::MemoryUnmanaged> the_view_type;
typedef Kokkos::View<Scalar*, execution_space, Kokkos::MemoryUnmanaged> the_view_type;
the_view_type v (buff.getRawPtr (), buff.size ());
return v;
}
......
......@@ -568,8 +568,8 @@ namespace Tpetra {
copyAndPermute (
const SrcDistObject& sourceObj,
size_t numSameIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, device_type> &permuteFromLIDs)
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteToLIDs,
const Kokkos::View<const LocalOrdinal*, execution_space> &permuteFromLIDs)
{
using Teuchos::ArrayRCP;
using Teuchos::ArrayView;
......@@ -636,7 +636,7 @@ namespace Tpetra {
return;
if (this->isConstantStride ()) {
Details::PermuteArrayMultiColumnConstantStride<Scalar,LocalOrdinal,device_type> perm;
Details::PermuteArrayMultiColumnConstantStride<Scalar,LocalOrdinal,execution_space> perm;
perm.permuteToLIDs = permuteToLIDs;
perm.permuteFromLIDs = permuteFromLIDs;
perm.src = sourceMV.getKokkosView();
......@@ -648,15 +648,15 @@ namespace Tpetra {
perm.permute();
}
else {
Details::PermuteArrayMultiColumnVariableStride<Scalar,LocalOrdinal,device_type> perm;
Details::PermuteArrayMultiColumnVariableStride<Scalar,LocalOrdinal,execution_space> perm;
perm.permuteToLIDs = permuteToLIDs;
perm.permuteFromLIDs = permuteFromLIDs;
perm.src = sourceMV.getKokkosView();
perm.dest = getKokkosViewNonConst();
perm.src_whichVectors =
getKokkosViewDeepCopy<device_type>(sourceMV.whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(sourceMV.whichVectors_ ());
perm.dest_whichVectors =
getKokkosViewDeepCopy<device_type>(whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(whichVectors_ ());
perm.src_stride = MVT::getStride (sourceMV.lclMV_);
perm.dest_stride = stride;
perm.numCols = numCols;
......@@ -670,9 +670,9 @@ namespace Tpetra {
MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node,true>::
packAndPrepare (
const SrcDistObject& sourceObj,
const Kokkos::View<const LocalOrdinal*, device_type> &exportLIDs,
Kokkos::View<Scalar*, device_type> &exports,
const Kokkos::View<size_t*, device_type> &numExportPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &exportLIDs,
Kokkos::View<Scalar*, execution_space> &exports,
const Kokkos::View<size_t*, execution_space> &numExportPacketsPerLID,
size_t& constantNumPackets,
Distributor & /* distor */ )
{
......@@ -718,14 +718,14 @@ namespace Tpetra {
// MultiVector always represents a single column with constant
// stride, but it doesn't hurt to implement both cases anyway.
if (sourceMV.isConstantStride ()) {
Details::PackArraySingleColumnConstantStride<Scalar,LocalOrdinal,device_type> pack;
Details::PackArraySingleColumnConstantStride<Scalar,LocalOrdinal,execution_space> pack;
pack.exportLIDs = exportLIDs;
pack.exports = exports;
pack.src = sourceMV.getKokkosView();
pack.pack();
}
else {
Details::PackArraySingleColumnOffset<Scalar,LocalOrdinal,device_type> pack;
Details::PackArraySingleColumnOffset<Scalar,LocalOrdinal,execution_space> pack;
pack.exportLIDs = exportLIDs;
pack.exports = exports;
pack.src = sourceMV.getKokkosView();
......@@ -735,7 +735,7 @@ namespace Tpetra {
}
else { // the source MultiVector has multiple columns
if (sourceMV.isConstantStride ()) {
Details::PackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,device_type> pack;
Details::PackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,execution_space> pack;
pack.exportLIDs = exportLIDs;
pack.exports = exports;
pack.src = sourceMV.getKokkosView();
......@@ -744,12 +744,12 @@ namespace Tpetra {
pack.pack ();
}
else {
Details::PackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,device_type> pack;
Details::PackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,execution_space> pack;
pack.exportLIDs = exportLIDs;
pack.exports = exports;
pack.src = sourceMV.getKokkosView();
pack.srcWhichVectors =
getKokkosViewDeepCopy<device_type>(sourceMV.whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(sourceMV.whichVectors_ ());
pack.stride = stride;
pack.numCols = numCols;
pack.pack ();
......@@ -762,9 +762,9 @@ namespace Tpetra {
void
MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node,true>::
unpackAndCombine (
const Kokkos::View<const LocalOrdinal*, device_type> &importLIDs,
const Kokkos::View<const Scalar*, device_type> &imports,
const Kokkos::View<size_t*, device_type> &numPacketsPerLID,
const Kokkos::View<const LocalOrdinal*, execution_space> &importLIDs,
const Kokkos::View<const Scalar*, execution_space> &imports,
const Kokkos::View<size_t*, execution_space> &numPacketsPerLID,
size_t constantNumPackets,
Distributor & /* distor */,
CombineMode CM)
......@@ -823,7 +823,7 @@ namespace Tpetra {
// ncview_[...] = f (ncview_[...], *impptr++);
if (CM == INSERT || CM == REPLACE) {
if (isConstantStride()) {
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::InsertOp,device_type> unpack;
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::InsertOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
......@@ -834,12 +834,12 @@ namespace Tpetra {
unpack.unpack();
}
else {
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::InsertOp,device_type> unpack;
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::InsertOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
unpack.whichVectors =
getKokkosViewDeepCopy<device_type>(whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(whichVectors_ ());
unpack.stride = myStride;
unpack.numCols = numVecs;
unpack.op = Details::InsertOp();
......@@ -849,7 +849,7 @@ namespace Tpetra {
}
else if (CM == ADD) {
if (isConstantStride()) {
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::AddOp,device_type> unpack;
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::AddOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
......@@ -860,12 +860,12 @@ namespace Tpetra {
unpack.unpack();
}
else {
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::AddOp,device_type> unpack;
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::AddOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
unpack.whichVectors =
getKokkosViewDeepCopy<device_type>(whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(whichVectors_ ());
unpack.stride = myStride;
unpack.numCols = numVecs;
unpack.op = Details::AddOp();
......@@ -875,7 +875,7 @@ namespace Tpetra {
}
else if (CM == ABSMAX) {
if (isConstantStride()) {
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::AbsMaxOp,device_type> unpack;
Details::UnpackArrayMultiColumnConstantStride<Scalar,LocalOrdinal,Details::AbsMaxOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
......@@ -886,12 +886,12 @@ namespace Tpetra {
unpack.unpack();
}
else {
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::AbsMaxOp,device_type> unpack;
Details::UnpackArrayMultiColumnVariableStride<Scalar,LocalOrdinal,Details::AbsMaxOp,execution_space> unpack;
unpack.importLIDs = importLIDs;
unpack.imports = imports;
unpack.dest = getKokkosViewNonConst();
unpack.whichVectors =
getKokkosViewDeepCopy<device_type>(whichVectors_ ());
getKokkosViewDeepCopy<execution_space>(whichVectors_ ());
unpack.stride = myStride;
unpack.numCols = numVecs;
unpack.op = Details::AbsMaxOp();
......
......@@ -143,7 +143,7 @@ namespace Tpetra {
//! This class' second template parameter; the type of global indices.
typedef GlobalOrdinal global_ordinal_type;
//! This class' third template parameter; the Kokkos device type.
typedef DeviceType device_type;
typedef DeviceType execution_space;
/// \brief The Kokkos Node type used by this class.
///
/// This type depends on the DeviceType template parameter. In
......@@ -153,10 +153,10 @@ namespace Tpetra {
typedef Kokkos::StaticCrsGraph<LocalOrdinal,
Kokkos::LayoutLeft,
device_type, size_t> LocalStaticCrsGraphType;
typedef Kokkos::View<const size_t*, device_type> t_RowPtrs;
typedef Kokkos::View< size_t*, device_type> t_RowPtrsNC;
typedef Kokkos::View<LocalOrdinal*, device_type> t_LocalOrdinal_1D;
execution_space, size_t> LocalStaticCrsGraphType;
typedef Kokkos::View<const size_t*, execution_space> t_RowPtrs;
typedef Kokkos::View< size_t*, execution_space> t_RowPtrsNC;
typedef Kokkos::View<LocalOrdinal*, execution_space> t_LocalOrdinal_1D;
//! The Map specialization used by this class.
typedef Tpetra::Map<LocalOrdinal, GlobalOrdinal, node_type> map_type;
......@@ -209,7 +209,7 @@ namespace Tpetra {
/// null, any missing parameters will be filled in with their
/// default values.
CrsGraph (const Teuchos::RCP<const map_type>& rowMap,