diff --git a/packages/kokkos-kernels/src/sparse/KokkosSparse_CrsMatrix.hpp b/packages/kokkos-kernels/src/sparse/KokkosSparse_CrsMatrix.hpp index 968e40db736f..126df1f24d6a 100644 --- a/packages/kokkos-kernels/src/sparse/KokkosSparse_CrsMatrix.hpp +++ b/packages/kokkos-kernels/src/sparse/KokkosSparse_CrsMatrix.hpp @@ -113,6 +113,7 @@ inline int RowsPerThread(const int NNZPerRow) { struct DeviceConfig { struct Dim3 { size_t x, y, z; + KOKKOS_INLINE_FUNCTION Dim3(const size_t x_, const size_t y_ = 1, const size_t z_ = 1) : x(x_), y(y_), z(z_) {} }; @@ -121,6 +122,7 @@ struct DeviceConfig { size_t num_blocks; size_t num_threads_per_block; + KOKKOS_INLINE_FUNCTION DeviceConfig(const size_t num_blocks_ = 0, const size_t threads_per_block_x_ = 0, const size_t threads_per_block_y_ = 0, @@ -454,6 +456,7 @@ class CrsMatrix { /// FIXME (mfh 09 Aug 2013) numCols and nnz should be properties of /// the graph, not the matrix. Then CrsMatrix needs methods to get /// these from the graph. + KOKKOS_INLINE_FUNCTION CrsMatrix () : numCols_ (0) {} @@ -464,6 +467,7 @@ class CrsMatrix { class DType, class MTType, typename IType> + KOKKOS_INLINE_FUNCTION CrsMatrix (const CrsMatrix & B) : graph (B.graph.entries, B.graph.row_map), values (B.values), diff --git a/packages/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp b/packages/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp index 500bf8f424e9..7b6dd34bcfa6 100644 --- a/packages/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp +++ b/packages/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp @@ -298,14 +298,17 @@ class StaticCrsGraph { row_block_type row_block_offsets; //! Construct an empty view. + KOKKOS_INLINE_FUNCTION StaticCrsGraph () : entries(), row_map(), row_block_offsets() {} //! Copy constructor (shallow copy). + KOKKOS_INLINE_FUNCTION StaticCrsGraph (const StaticCrsGraph& rhs) : entries (rhs.entries), row_map (rhs.row_map), row_block_offsets(rhs.row_block_offsets) {} template + KOKKOS_INLINE_FUNCTION StaticCrsGraph (const EntriesType& entries_,const RowMapType& row_map_) : entries (entries_), row_map (row_map_), row_block_offsets() {} @@ -314,6 +317,7 @@ class StaticCrsGraph { * If the old view is the last view * then allocated memory is deallocated. */ + KOKKOS_INLINE_FUNCTION StaticCrsGraph& operator= (const StaticCrsGraph& rhs) { entries = rhs.entries; row_map = rhs.row_map; @@ -324,6 +328,7 @@ class StaticCrsGraph { /** \brief Destroy this view of the array. * If the last view then allocated memory is deallocated. */ + KOKKOS_INLINE_FUNCTION ~StaticCrsGraph() {} /** \brief Return number of rows in the graph