Skip to content

Commit bdef930

Browse files
committed
Applying change of namespace to library and tests
Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
1 parent f486683 commit bdef930

File tree

330 files changed

+1258
-1258
lines changed

Some content is hidden

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

330 files changed

+1258
-1258
lines changed

batched/KokkosBatched_Util.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ struct is_vector : public std::false_type {};
154154
template <typename Ta, typename Tb>
155155
struct is_same_mag_type {
156156
static const bool is_specialized =
157-
(Kokkos::ArithTraits<Ta>::is_specialized && Kokkos::ArithTraits<Tb>::is_specialized);
157+
(KokkosKernels::ArithTraits<Ta>::is_specialized && KokkosKernels::ArithTraits<Tb>::is_specialized);
158158

159159
static const bool is_mag_type_same =
160-
std::is_same<typename Kokkos::ArithTraits<Ta>::mag_type, typename Kokkos::ArithTraits<Tb>::mag_type>::value;
160+
std::is_same<typename KokkosKernels::ArithTraits<Ta>::mag_type, typename KokkosKernels::ArithTraits<Tb>::mag_type>::value;
161161

162162
static const bool value = is_specialized && is_mag_type_same;
163163
};

batched/dense/impl/KokkosBatched_AddRadial_Internal.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct SerialAddRadialInternal {
3737
#endif
3838
for (int i = 0; i < m; ++i) {
3939
// const auto a_real = RealPart(A[i*as]);
40-
const auto a_real = Kokkos::ArithTraits<ValueType>::real(A[i * as]);
40+
const auto a_real = KokkosKernels::ArithTraits<ValueType>::real(A[i * as]);
4141
A[i * as] += ValueType(minus_abs_tiny) * ValueType(a_real < 0);
4242
A[i * as] += ValueType(abs_tiny) * ValueType(a_real >= 0);
4343
}
@@ -58,7 +58,7 @@ struct TeamAddRadialInternal {
5858

5959
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, m), [&](const int &i) {
6060
// const auto a_real = RealPart(A[i*as]);
61-
const auto a_real = Kokkos::ArithTraits<ValueType>::real(A[i * as]);
61+
const auto a_real = KokkosKernels::ArithTraits<ValueType>::real(A[i * as]);
6262
A[i * as] += ValueType(minus_abs_tiny) * ValueType(a_real < 0);
6363
A[i * as] += ValueType(abs_tiny) * ValueType(a_real >= 0);
6464
});

batched/dense/impl/KokkosBatched_ApplyHouseholder_Serial_Internal.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct SerialApplyLeftHouseholderInternal {
5353
// w1t /= tau
5454
for (int j = 0; j < n; ++j) {
5555
value_type tmp = a1t[j * a1ts];
56-
for (int i = 0; i < m; ++i) tmp += Kokkos::ArithTraits<value_type>::conj(u2[i * u2s]) * A2[i * as0 + j * as1];
56+
for (int i = 0; i < m; ++i) tmp += KokkosKernels::ArithTraits<value_type>::conj(u2[i * u2s]) * A2[i * as0 + j * as1];
5757
w1t[j] = tmp * inv_tau; // /= (*tau);
5858
}
5959

@@ -101,7 +101,7 @@ struct SerialApplyRightHouseholderInternal {
101101

102102
// A2 -= w1 * u2' (ger with conjugate)
103103
for (int j = 0; j < n; ++j)
104-
for (int i = 0; i < m; ++i) A2[i * as0 + j * as1] -= w1[i] * Kokkos::ArithTraits<ValueType>::conj(u2[j * u2s]);
104+
for (int i = 0; i < m; ++i) A2[i * as0 + j * as1] -= w1[i] * KokkosKernels::ArithTraits<ValueType>::conj(u2[j * u2s]);
105105

106106
return 0;
107107
}

batched/dense/impl/KokkosBatched_ApplyHouseholder_TeamVector_Internal.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct TeamVectorApplyLeftHouseholderInternal {
5656
Kokkos::parallel_reduce(
5757
Kokkos::ThreadVectorRange(member, m),
5858
[&](const int &i, value_type &val) {
59-
val += Kokkos::ArithTraits<value_type>::conj(u2[i * u2s]) * A2[i * as0 + j * as1];
59+
val += KokkosKernels::ArithTraits<value_type>::conj(u2[i * u2s]) * A2[i * as0 + j * as1];
6060
},
6161
tmp);
6262
Kokkos::single(Kokkos::PerThread(member), [&]() {
@@ -125,13 +125,13 @@ struct TeamVectorApplyRightHouseholderInternal {
125125
if (as0 <= as1) {
126126
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &j) {
127127
Kokkos::parallel_for(Kokkos::ThreadVectorRange(member, m), [&](const int &i) {
128-
A2[i * as0 + j * as1] -= w1[i] * Kokkos::ArithTraits<ValueType>::conj(u2[j * u2s]);
128+
A2[i * as0 + j * as1] -= w1[i] * KokkosKernels::ArithTraits<ValueType>::conj(u2[j * u2s]);
129129
});
130130
});
131131
} else {
132132
Kokkos::parallel_for(Kokkos::ThreadVectorRange(member, n), [&](const int &j) {
133133
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, m), [&](const int &i) {
134-
A2[i * as0 + j * as1] -= w1[i] * Kokkos::ArithTraits<ValueType>::conj(u2[j * u2s]);
134+
A2[i * as0 + j * as1] -= w1[i] * KokkosKernels::ArithTraits<ValueType>::conj(u2[j * u2s]);
135135
});
136136
});
137137
}

batched/dense/impl/KokkosBatched_Dot_Internal.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct SerialDotInternal {
3434
KOKKOS_FORCEINLINE_FUNCTION static int invoke(const int m, const ValueType *KOKKOS_RESTRICT A, const int as0,
3535
const ValueType *KOKKOS_RESTRICT B, const int bs0,
3636
/* */ MagnitudeType *KOKKOS_RESTRICT C) {
37-
using ats = Kokkos::ArithTraits<ValueType>;
37+
using ats = KokkosKernels::ArithTraits<ValueType>;
3838
C[0] = ValueType(0);
3939
#if defined(KOKKOS_ENABLE_PRAGMA_UNROLL)
4040
#pragma unroll
@@ -70,7 +70,7 @@ struct TeamDotInternal {
7070
const ValueType *KOKKOS_RESTRICT A, const int as0,
7171
const ValueType *KOKKOS_RESTRICT B, const int bs0,
7272
/* */ MagnitudeType *KOKKOS_RESTRICT C) {
73-
using ats = Kokkos::ArithTraits<ValueType>;
73+
using ats = KokkosKernels::ArithTraits<ValueType>;
7474
ValueType t(0);
7575
Kokkos::parallel_reduce(
7676
Kokkos::TeamThreadRange(member, m),
@@ -90,7 +90,7 @@ struct TeamDotInternal {
9090
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
9191
const ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1,
9292
/* */ MagnitudeType *KOKKOS_RESTRICT C, const int cs) {
93-
using ats = Kokkos::ArithTraits<ValueType>;
93+
using ats = KokkosKernels::ArithTraits<ValueType>;
9494
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &j) {
9595
ValueType t(0);
9696
const ValueType *KOKKOS_RESTRICT A_at_j = A + j * as1;
@@ -117,7 +117,7 @@ struct TeamVectorDotInternal {
117117
const ValueType *KOKKOS_RESTRICT A, const int as0,
118118
const ValueType *KOKKOS_RESTRICT B, const int bs0,
119119
/* */ MagnitudeType *KOKKOS_RESTRICT C) {
120-
using ats = Kokkos::ArithTraits<ValueType>;
120+
using ats = KokkosKernels::ArithTraits<ValueType>;
121121
ValueType t(0);
122122
Kokkos::parallel_reduce(
123123
Kokkos::TeamVectorRange(member, m),
@@ -137,7 +137,7 @@ struct TeamVectorDotInternal {
137137
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
138138
const ValueType *KOKKOS_RESTRICT B, const int bs0, const int bs1,
139139
/* */ MagnitudeType *KOKKOS_RESTRICT C, const int cs) {
140-
using ats = Kokkos::ArithTraits<ValueType>;
140+
using ats = KokkosKernels::ArithTraits<ValueType>;
141141
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &j) {
142142
ValueType t(0);
143143
const ValueType *KOKKOS_RESTRICT A_at_j = A + j * as1;

batched/dense/impl/KokkosBatched_Eigendecomposition_Serial_Internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct SerialEigendecompositionInternal {
7171
"Serial eigendecomposition on device and/or without LAPACK "
7272
"is not implemented yet");
7373
// typedef RealType real_type;
74-
// typedef Kokkos::ArithTraits<real_type> ats;
74+
// typedef KokkosKernels::ArithTraits<real_type> ats;
7575

7676
// const real_type one(1), zero(0), tol = 1e2*ats::epsilon();
7777
// //const Kokkos::pair<real_type,real_type> identity(one, zero);

batched/dense/impl/KokkosBatched_Eigenvalue_Serial_Internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct SerialEigenvalueInternal {
6666
/* */ RealType *ei, const int eis, const bool restart = false,
6767
const int user_max_iteration = -1) {
6868
typedef RealType real_type;
69-
typedef Kokkos::ArithTraits<real_type> ats;
69+
typedef KokkosKernels::ArithTraits<real_type> ats;
7070
const real_type zero(0), nan(ats::nan()), tol = 1e2 * ats::epsilon();
7171
const int max_iteration = user_max_iteration < 0 ? 300 : user_max_iteration;
7272

batched/dense/impl/KokkosBatched_Francis_Serial_Internal.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ struct SerialFrancisInternal {
8080
t = lambda1.real() * lambda1.real() + lambda1.imag() * lambda1.imag();
8181
} else {
8282
const value_type val = H[(m - 1) * hs];
83-
const auto dist_lambda1 = Kokkos::ArithTraits<value_type>::abs(lambda1.real() - val);
84-
const auto dist_lambda2 = Kokkos::ArithTraits<value_type>::abs(lambda2.real() - val);
83+
const auto dist_lambda1 = KokkosKernels::ArithTraits<value_type>::abs(lambda1.real() - val);
84+
const auto dist_lambda2 = KokkosKernels::ArithTraits<value_type>::abs(lambda2.real() - val);
8585
const value_type lambda = dist_lambda1 < dist_lambda2 ? lambda1.real() : lambda2.real();
8686
s = 2 * lambda;
8787
t = lambda * lambda;

batched/dense/impl/KokkosBatched_Gemm_TeamVector_Internal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorGemmInternal<Algo::Gemm::Unblocked, true>::
102102
const ValueType *KOKKOS_RESTRICT pB = B + j * bs1;
103103

104104
ValueType c = ValueType(0);
105-
for (int p = 0; p < k; ++p) c += Kokkos::ArithTraits<ValueType>::conj(pA[p * as1]) * pB[p * bs0];
105+
for (int p = 0; p < k; ++p) c += KokkosKernels::ArithTraits<ValueType>::conj(pA[p * as1]) * pB[p * bs0];
106106
C[i * cs0 + j * cs1] += alpha * c;
107107
});
108108
});

batched/dense/impl/KokkosBatched_Gesv_Impl.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ KOKKOS_INLINE_FUNCTION int SerialStaticPivoting::invoke(const MatrixType1 A, con
5959
// First, the algorithm loops over the rows and columns and search
6060
// for the maximal absolute value per row and column.
6161
for (size_t i = 0; i < n; ++i) {
62-
D2(i) = Kokkos::ArithTraits<value_type>::zero();
62+
D2(i) = KokkosKernels::ArithTraits<value_type>::zero();
6363
tmp_v_1(i) = 0;
6464
tmp_v_2(i) = 1.;
6565
for (size_t j = 0; j < n; ++j) {
@@ -82,7 +82,7 @@ KOKKOS_INLINE_FUNCTION int SerialStaticPivoting::invoke(const MatrixType1 A, con
8282
// of A and Y.
8383
value_type D1_i;
8484
for (size_t i = 0; i < n; ++i) {
85-
D1_i = Kokkos::ArithTraits<value_type>::zero();
85+
D1_i = KokkosKernels::ArithTraits<value_type>::zero();
8686
for (size_t j = 0; j < n; ++j) {
8787
if (D1_i < Kokkos::abs(A(i, j))) D1_i = Kokkos::abs(A(i, j));
8888
}
@@ -104,8 +104,8 @@ KOKKOS_INLINE_FUNCTION int SerialStaticPivoting::invoke(const MatrixType1 A, con
104104
for (size_t i = 0; i < n; ++i) {
105105
int row_index = 0;
106106
int col_index = 0;
107-
value_type tmp_0 = Kokkos::ArithTraits<value_type>::zero();
108-
value_type tmp_1 = Kokkos::ArithTraits<value_type>::zero();
107+
value_type tmp_0 = KokkosKernels::ArithTraits<value_type>::zero();
108+
value_type tmp_1 = KokkosKernels::ArithTraits<value_type>::zero();
109109
for (size_t j = 0; j < n; ++j) {
110110
if (tmp_0 < tmp_v_1(j)) {
111111
tmp_0 = tmp_v_1(j);
@@ -118,9 +118,9 @@ KOKKOS_INLINE_FUNCTION int SerialStaticPivoting::invoke(const MatrixType1 A, con
118118
col_index = j;
119119
}
120120
}
121-
if (tmp_1 == Kokkos::ArithTraits<value_type>::zero()) return 1;
122-
tmp_v_1(row_index) = Kokkos::ArithTraits<value_type>::zero();
123-
tmp_v_2(col_index) = Kokkos::ArithTraits<value_type>::zero();
121+
if (tmp_1 == KokkosKernels::ArithTraits<value_type>::zero()) return 1;
122+
tmp_v_1(row_index) = KokkosKernels::ArithTraits<value_type>::zero();
123+
tmp_v_2(col_index) = KokkosKernels::ArithTraits<value_type>::zero();
124124

125125
for (size_t j = 0; j < n; ++j) {
126126
PDAD(col_index, j) = A(row_index, j);
@@ -147,7 +147,7 @@ KOKKOS_INLINE_FUNCTION int TeamStaticPivoting<MemberType>::invoke(const MemberTy
147147
size_t n = A.extent(0);
148148

149149
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &i) {
150-
D2(i) = Kokkos::ArithTraits<value_type>::zero();
150+
D2(i) = KokkosKernels::ArithTraits<value_type>::zero();
151151
tmp_v_1(i) = 0;
152152
tmp_v_2(i) = 1.;
153153
for (size_t j = 0; j < n; ++j) {
@@ -164,7 +164,7 @@ KOKKOS_INLINE_FUNCTION int TeamStaticPivoting<MemberType>::invoke(const MemberTy
164164
});
165165

166166
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &i) {
167-
value_type D1_i = Kokkos::ArithTraits<value_type>::zero();
167+
value_type D1_i = KokkosKernels::ArithTraits<value_type>::zero();
168168
for (size_t j = 0; j < n; ++j) {
169169
if (D1_i < Kokkos::abs(A(i, j))) D1_i = Kokkos::abs(A(i, j));
170170
}
@@ -190,7 +190,7 @@ KOKKOS_INLINE_FUNCTION int TeamStaticPivoting<MemberType>::invoke(const MemberTy
190190
reducer_value);
191191
row_index = value.loc;
192192
value.loc = 0;
193-
value.val = Kokkos::ArithTraits<value_type>::zero();
193+
value.val = KokkosKernels::ArithTraits<value_type>::zero();
194194
Kokkos::parallel_reduce(
195195
Kokkos::TeamThreadRange(member, n),
196196
[&](const int &j, reducer_value_type &update) {
@@ -201,9 +201,9 @@ KOKKOS_INLINE_FUNCTION int TeamStaticPivoting<MemberType>::invoke(const MemberTy
201201
},
202202
reducer_value);
203203
col_index = value.loc;
204-
if (value.val == Kokkos::ArithTraits<value_type>::zero()) return 1;
205-
tmp_v_1(row_index) = Kokkos::ArithTraits<value_type>::zero();
206-
tmp_v_2(col_index) = Kokkos::ArithTraits<value_type>::zero();
204+
if (value.val == KokkosKernels::ArithTraits<value_type>::zero()) return 1;
205+
tmp_v_1(row_index) = KokkosKernels::ArithTraits<value_type>::zero();
206+
tmp_v_2(col_index) = KokkosKernels::ArithTraits<value_type>::zero();
207207

208208
for (size_t j = 0; j < n; ++j) {
209209
PDAD(col_index, j) = A(row_index, j);
@@ -228,7 +228,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorStaticPivoting<MemberType>::invoke(const Me
228228
const size_t n = A.extent(0);
229229

230230
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &i) {
231-
D2(i) = Kokkos::ArithTraits<value_type>::zero();
231+
D2(i) = KokkosKernels::ArithTraits<value_type>::zero();
232232
tmp_v_1(i) = 0;
233233
tmp_v_2(i) = 1.;
234234
reducer_value_type value;
@@ -260,7 +260,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorStaticPivoting<MemberType>::invoke(const Me
260260
});
261261

262262
Kokkos::parallel_for(Kokkos::TeamThreadRange(member, n), [&](const int &i) {
263-
value_type D1_i = Kokkos::ArithTraits<value_type>::zero();
263+
value_type D1_i = KokkosKernels::ArithTraits<value_type>::zero();
264264
reducer_value_type value;
265265
Kokkos::MaxLoc<value_type, int> reducer_value(value);
266266
Kokkos::parallel_reduce(
@@ -292,7 +292,7 @@ KOKKOS_INLINE_FUNCTION int TeamVectorStaticPivoting<MemberType>::invoke(const Me
292292
reducer_value);
293293
row_index = value.loc;
294294
value.loc = 0;
295-
value.val = Kokkos::ArithTraits<value_type>::zero();
295+
value.val = KokkosKernels::ArithTraits<value_type>::zero();
296296
Kokkos::parallel_reduce(
297297
Kokkos::TeamVectorRange(member, n),
298298
[&](const int &j, reducer_value_type &update) {
@@ -303,9 +303,9 @@ KOKKOS_INLINE_FUNCTION int TeamVectorStaticPivoting<MemberType>::invoke(const Me
303303
},
304304
reducer_value);
305305
col_index = value.loc;
306-
if (value.val == Kokkos::ArithTraits<value_type>::zero()) return 1;
307-
tmp_v_1(row_index) = Kokkos::ArithTraits<value_type>::zero();
308-
tmp_v_2(col_index) = Kokkos::ArithTraits<value_type>::zero();
306+
if (value.val == KokkosKernels::ArithTraits<value_type>::zero()) return 1;
307+
tmp_v_1(row_index) = KokkosKernels::ArithTraits<value_type>::zero();
308+
tmp_v_2(col_index) = KokkosKernels::ArithTraits<value_type>::zero();
309309

310310
Kokkos::parallel_for(Kokkos::TeamVectorRange(member, n),
311311
[&](const int &j) { PDAD(col_index, j) = A(row_index, j); });

0 commit comments

Comments
 (0)