Skip to content

Commit 6420604

Browse files
committed
put default types in KokkosKernels namespace
Signed-off-by: Carl Pearson <cwpears@sandia.gov>
1 parent e1a5906 commit 6420604

File tree

56 files changed

+605
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+605
-530
lines changed

blas/src/KokkosBlas1_dot.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ typename Kokkos::Details::InnerProductSpaceTraits<typename XVector::non_const_va
7777
// These special cases are to maintain accuracy.
7878
using result_type = typename KokkosBlas::Impl::DotAccumulatingScalar<dot_type>::type;
7979
using RVector_Internal =
80-
Kokkos::View<dot_type, default_layout, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
81-
using RVector_Result =
82-
Kokkos::View<result_type, default_layout, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
80+
Kokkos::View<dot_type, KokkosKernels::default_layout, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
81+
using RVector_Result = Kokkos::View<result_type, KokkosKernels::default_layout, Kokkos::HostSpace,
82+
Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
8383

8484
XVector_Internal X = x;
8585
YVector_Internal Y = y;

blas/src/KokkosBlas1_nrm1.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ typename Kokkos::Details::InnerProductSpaceTraits<typename XVector::non_const_va
4949
typename KokkosKernels::Impl::GetUnifiedLayout<XVector>::array_layout,
5050
typename XVector::device_type, Kokkos::MemoryTraits<Kokkos::Unmanaged> >;
5151

52-
using RVector_Internal =
53-
Kokkos::View<mag_type, default_layout, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged> >;
52+
using RVector_Internal = Kokkos::View<mag_type, KokkosKernels::default_layout, Kokkos::HostSpace,
53+
Kokkos::MemoryTraits<Kokkos::Unmanaged> >;
5454

5555
mag_type result;
5656
RVector_Internal R = RVector_Internal(&result);

blas/src/KokkosBlas1_nrm2_squared.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ typename Kokkos::Details::InnerProductSpaceTraits<typename XVector::non_const_va
5555
typename XVector::device_type, Kokkos::MemoryTraits<Kokkos::Unmanaged> >
5656
XVector_Internal;
5757

58-
typedef Kokkos::View<mag_type, default_layout, Kokkos::HostSpace, Kokkos::MemoryTraits<Kokkos::Unmanaged> >
58+
typedef Kokkos::View<mag_type, KokkosKernels::default_layout, Kokkos::HostSpace,
59+
Kokkos::MemoryTraits<Kokkos::Unmanaged> >
5960
RVector_Internal;
6061

6162
mag_type result;

common/src/KokkosKernels_default_types.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
#include "Kokkos_Core.hpp" //for LayoutLeft/LayoutRight
2121
#include <KokkosKernels_config.h> //for all the ETI #cmakedefine macros
2222

23+
// define a deprecated symbol = type in the global namespace
24+
// and a non-deprecated version in Kokkos Kernels
25+
// these deprecations were done in 4.4.
26+
#define KK_IMPL_MAKE_TYPE_ALIAS(symbol, type) \
27+
using symbol [[deprecated("use KokkosKernels::" #symbol ".")]] = type; \
28+
namespace KokkosKernels { \
29+
using symbol = type; \
30+
}
31+
2332
#if defined(KOKKOSKERNELS_INST_ORDINAL_INT)
2433
using default_lno_t = int;
2534
#elif defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T)
@@ -73,4 +82,6 @@ using default_device = Kokkos::Threads;
7382
using default_device = Kokkos::Serial;
7483
#endif
7584

85+
} // namespace KokkosKernels
86+
7687
#endif // KOKKOSKERNELS_DEFAULT_TYPES_H

common/unit_test/Test_Common_IOUtils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ViewPrintHelper {
4242

4343
template <typename exec_space>
4444
void testPrintView() {
45-
using scalar_t = default_scalar;
45+
using scalar_t = KokkosKernels::default_scalar;
4646
using Unmanaged = Kokkos::MemoryTraits<Kokkos::Unmanaged>;
4747
using rank0_view = Kokkos::View<scalar_t, Kokkos::HostSpace, Unmanaged>;
4848
using rank1_view = Kokkos::View<scalar_t *, Kokkos::HostSpace, Unmanaged>;

example/half/xpy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int main(int argc, char **argv) {
9494
return 1;
9595
}
9696
using LayoutType = Kokkos::LayoutLeft;
97-
using DeviceType = default_device;
97+
using DeviceType = KokkosKernels::default_device;
9898
size_t n = atoi(argv[1]);
9999
bool time_only = static_cast<bool>(atoi(argv[2]));
100100
do_xpy<float, DeviceType, LayoutType>(n, time_only);

example/wiki/graph/KokkosGraph_wiki_9pt_stencil.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
#include <cmath>
2626
#include <sstream>
2727

28-
using Ordinal = default_lno_t;
29-
using Offset = default_size_type;
30-
using Layout = default_layout;
28+
using Ordinal = KokkosKernels::default_lno_t;
29+
using Offset = KokkosKernels::default_size_type;
30+
using Layout = KokkosKernels::default_layout;
3131
using ExecSpace = Kokkos::DefaultExecutionSpace;
3232
using DeviceSpace = typename ExecSpace::memory_space;
3333
using Kokkos::HostSpace;
3434
using RowmapType = Kokkos::View<Offset*, DeviceSpace>;
3535
using ColindsType = Kokkos::View<Ordinal*, DeviceSpace>;
36-
using Handle = KokkosKernels::Experimental::KokkosKernelsHandle<Offset, Ordinal, default_scalar, ExecSpace, DeviceSpace,
37-
DeviceSpace>;
36+
using Handle = KokkosKernels::Experimental::KokkosKernelsHandle<Offset, Ordinal, KokkosKernels::default_scalar,
37+
ExecSpace, DeviceSpace, DeviceSpace>;
3838

3939
namespace GraphDemo {
4040
Ordinal gridX = 15;

example/wiki/sparse/KokkosSparse_wiki_bsrmatrix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#include "KokkosSparse_BsrMatrix.hpp"
2424
#include "KokkosSparse_CrsMatrix.hpp"
2525

26-
using Scalar = default_scalar;
27-
using Ordinal = default_lno_t;
28-
using Offset = default_size_type;
29-
using Layout = default_layout;
26+
using Scalar = KokkosKernels::default_scalar;
27+
using Ordinal = KokkosKernels::default_lno_t;
28+
using Offset = KokkosKernels::default_size_type;
29+
using Layout = KokkosKernels::default_layout;
3030

3131
int main() {
3232
Kokkos::initialize();

example/wiki/sparse/KokkosSparse_wiki_bsrmatrix_2.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
#include "KokkosKernels_default_types.hpp"
2424
#include "KokkosSparse_BsrMatrix.hpp"
2525

26-
using Scalar = default_scalar;
27-
using Ordinal = default_lno_t;
28-
using Offset = default_size_type;
29-
using Layout = default_layout;
26+
using Scalar = KokkosKernels::default_scalar;
27+
using Ordinal = KokkosKernels::default_lno_t;
28+
using Offset = KokkosKernels::default_size_type;
29+
using Layout = KokkosKernels::default_layout;
3030

3131
template <class bsrmatrix_type>
3232
struct bsr_fill {

example/wiki/sparse/KokkosSparse_wiki_crsmatrix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#include "KokkosSparse_CrsMatrix.hpp"
2222
#include "KokkosSparse_spmv.hpp"
2323

24-
using Scalar = default_scalar;
25-
using Ordinal = default_lno_t;
26-
using Offset = default_size_type;
27-
using Layout = default_layout;
24+
using Scalar = KokkosKernels::default_scalar;
25+
using Ordinal = KokkosKernels::default_lno_t;
26+
using Offset = KokkosKernels::default_size_type;
27+
using Layout = KokkosKernels::default_layout;
2828

2929
int main() {
3030
Kokkos::initialize();

0 commit comments

Comments
 (0)