Skip to content

Commit e5b766e

Browse files
authored
Remove more reserved identifiers (kokkos#2534)
* __A -> A Signed-off-by: Carl Pearson <[email protected]> * __B -> B_ Signed-off-by: Carl Pearson <[email protected]> * __C -> C_ Signed-off-by: Carl Pearson <[email protected]> * Rename _-prefixed include guards Signed-off-by: Carl Pearson <[email protected]> --------- Signed-off-by: Carl Pearson <[email protected]>
1 parent 00b5555 commit e5b766e

19 files changed

+73
-73
lines changed

batched/dense/impl/KokkosBatched_HostLevel_Gemm_DblBuf_Impl.hpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ class BatchedDblBufGemm {
135135
std::conditional_t<std::is_same<ArgAlphaFmaTag, AlphaTag::Yes>::value, AlphaTag::No, AlphaTag::Yes>;
136136

137137
HandleType *const __handle;
138-
AViewType __A;
139-
BViewType __B;
140-
CViewType __C;
138+
AViewType A_;
139+
BViewType B_;
140+
CViewType C_;
141141
ScalarType __alpha, __beta;
142142
ArgTransA __transA_tag;
143143
ArgTransB __transB_tag;
@@ -156,7 +156,7 @@ class BatchedDblBufGemm {
156156

157157
public:
158158
BatchedDblBufGemm(HandleType *const handle, ScalarType alpha, AViewType A, BViewType B, ScalarType beta, CViewType C)
159-
: __handle(handle), __A(A), __B(B), __C(C), __alpha(alpha), __beta(beta) {}
159+
: __handle(handle), A_(A), B_(B), C_(C), __alpha(alpha), __beta(beta) {}
160160

161161
int invoke() {
162162
__run();
@@ -181,7 +181,7 @@ class BatchedDblBufGemm {
181181
constexpr int stride_n = TILE_N / reg_n;
182182
using functor_type = Functor<member_type, reg_m, reg_n, stride_m, stride_n>;
183183

184-
functor_type functor(*this, __A, __B, __C);
184+
functor_type functor(*this, A_, B_, C_);
185185

186186
if (__handle->enableDebug) {
187187
std::cout << "algo_type:" << __handle->get_kernel_algo_type() << std::endl
@@ -244,37 +244,37 @@ class BatchedDblBufGemm {
244244
class Functor {
245245
private:
246246
BatchedDblBufGemm &__ei;
247-
AViewType __A;
248-
BViewType __B;
249-
CViewType __C;
247+
AViewType A_;
248+
BViewType B_;
249+
CViewType C_;
250250
ScalarType __alpha, __beta;
251251
int __k;
252252
size_t __n_sub_tiles, __tiles_per_col, __tiles_per_row;
253253

254254
public:
255255
size_t get_n_sub_tiles() { return __n_sub_tiles; }
256256

257-
// NOTE: We cannot use __ei.{__A,__B,__C,__beta,__alpha,__k} in the operator
257+
// NOTE: We cannot use __ei.{A_,B_,C_,__beta,__alpha,__k} in the operator
258258
// below. If those are used, we get an invalid memory error from cuda. I
259259
// suspect this is due the values not being copied to device and then
260260
// runtime resolution of the host address &__ei.
261-
Functor(BatchedDblBufGemm &ei, AViewType A, BViewType B, CViewType C) : __ei(ei), __A(A), __B(B), __C(C) {
261+
Functor(BatchedDblBufGemm &ei, AViewType A, BViewType B, CViewType C) : __ei(ei), A_(A), B_(B), C_(C) {
262262
if (std::is_same<ArgBatchSzDim, BatchLayout::Left>::value) {
263-
ei.__c_batch_size = ei.__C.extent_int(0);
264-
ei.__c_m = ei.__C.extent_int(1);
265-
ei.__c_n = ei.__C.extent_int(2);
263+
ei.__c_batch_size = ei.C_.extent_int(0);
264+
ei.__c_m = ei.C_.extent_int(1);
265+
ei.__c_n = ei.C_.extent_int(2);
266266
if (std::is_same<ArgTransA, Trans::Transpose>::value)
267-
__k = ei.__A.extent_int(1);
267+
__k = ei.A_.extent_int(1);
268268
else
269-
__k = ei.__A.extent_int(2);
269+
__k = ei.A_.extent_int(2);
270270
} else {
271-
ei.__c_batch_size = ei.__C.extent_int(2);
272-
ei.__c_m = ei.__C.extent_int(0);
273-
ei.__c_n = ei.__C.extent_int(1);
271+
ei.__c_batch_size = ei.C_.extent_int(2);
272+
ei.__c_m = ei.C_.extent_int(0);
273+
ei.__c_n = ei.C_.extent_int(1);
274274
if (std::is_same<ArgTransA, Trans::Transpose>::value)
275-
__k = ei.__A.extent_int(0);
275+
__k = ei.A_.extent_int(0);
276276
else
277-
__k = ei.__A.extent_int(1);
277+
__k = ei.A_.extent_int(1);
278278
}
279279
__beta = ei.__beta; // Copy to device
280280
__alpha = ei.__alpha; // Copy to device
@@ -381,10 +381,10 @@ class BatchedDblBufGemm {
381381

382382
// Fetch entire 2-rank sub-matrix
383383
auto svA =
384-
subview_wrapper(__A, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transA_tag);
384+
subview_wrapper(A_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transA_tag);
385385
auto svB =
386-
subview_wrapper(__B, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transB_tag);
387-
auto svC = subview_wrapper(__C, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag);
386+
subview_wrapper(B_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transB_tag);
387+
auto svC = subview_wrapper(C_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag);
388388

389389
// Allocate scratch memory buffers used for prefetching
390390
view_type_2d_scratch svA_scr(member.team_scratch(0), TILE_M, TILE_K);
@@ -524,10 +524,10 @@ class BatchedDblBufGemm {
524524

525525
// Fetch entire 2-rank sub-matrix
526526
auto svA =
527-
subview_wrapper(__A, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transA_tag);
527+
subview_wrapper(A_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transA_tag);
528528
auto svB =
529-
subview_wrapper(__B, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transB_tag);
530-
auto svC = subview_wrapper(__C, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag);
529+
subview_wrapper(B_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag, __ei.__transB_tag);
530+
auto svC = subview_wrapper(C_, batch_idx, Kokkos::ALL(), Kokkos::ALL(), __ei.__batch_layout_tag);
531531

532532
// Allocate scratch memory buffers used for prefetching
533533
view_type_2d_scratch svA_scr(member.team_scratch(0), TILE_K, TILE_M);

common/impl/KokkosKernels_Iota.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_IOTA_HPP
18-
#define _KOKKOSKERNELS_IOTA_HPP
17+
#ifndef KOKKOSKERNELS_IOTA_HPP
18+
#define KOKKOSKERNELS_IOTA_HPP
1919

2020
#include <type_traits>
2121

@@ -137,4 +137,4 @@ inline constexpr bool is_iota_v = is_iota<P...>::value;
137137
} // namespace Impl
138138
} // namespace KokkosKernels
139139

140-
#endif // _KOKKOSKERNELS_IOTA_HPP
140+
#endif // KOKKOSKERNELS_IOTA_HPP

common/src/KokkosKernels_BitUtils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_BITUTILS_HPP
18-
#define _KOKKOSKERNELS_BITUTILS_HPP
17+
#ifndef KOKKOSKERNELS_BITUTILS_HPP
18+
#define KOKKOSKERNELS_BITUTILS_HPP
1919
#include "Kokkos_Core.hpp"
2020

2121
#if defined(KOKKOS_COMPILER_MSVC)

common/src/KokkosKernels_BlockHashmapAccumulator.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1414
//
1515
//@HEADER
16-
#ifndef _KOKKOSKERNELS_BLOCKHASHMAPACCUMULATOR_HPP
17-
#define _KOKKOSKERNELS_BLOCKHASHMAPACCUMULATOR_HPP
16+
#ifndef KOKKOSKERNELS_BLOCKHASHMAPACCUMULATOR_HPP
17+
#define KOKKOSKERNELS_BLOCKHASHMAPACCUMULATOR_HPP
1818
#include <Kokkos_Atomic.hpp>
1919
#include <atomic>
2020
#include "KokkosKernels_BlockUtils.hpp"
@@ -584,4 +584,4 @@ struct BlockHashmapAccumulator {
584584
} // namespace Experimental
585585
} // namespace KokkosKernels
586586

587-
#endif // _KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
587+
#endif // KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP

common/src/KokkosKernels_BlockUtils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1414
//
1515
//@HEADER
16-
#ifndef _KOKKOSKERNELS_BLOCKUTILS_HPP
17-
#define _KOKKOSKERNELS_BLOCKUTILS_HPP
16+
#ifndef KOKKOSKERNELS_BLOCKUTILS_HPP
17+
#define KOKKOSKERNELS_BLOCKUTILS_HPP
1818

1919
// #include <Kokkos_Atomic.hpp>
2020
// #include <atomic>
@@ -98,4 +98,4 @@ KOKKOS_INLINE_FUNCTION void kk_vector_block_add_mul(const size_type block_dim, v
9898
} // namespace Impl
9999
} // namespace KokkosSparse
100100

101-
#endif // _KOKKOSKERNELS_BLOCKUTILS_HPP
101+
#endif // KOKKOSKERNELS_BLOCKUTILS_HPP

common/src/KokkosKernels_HashmapAccumulator.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1414
//
1515
//@HEADER
16-
#ifndef _KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
17-
#define _KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
16+
#ifndef KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
17+
#define KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
1818
#include <Kokkos_Atomic.hpp>
1919
#include "KokkosKernels_Macros.hpp"
2020
#include <atomic>
@@ -847,4 +847,4 @@ struct HashmapAccumulator {
847847
} // namespace Experimental
848848
} // namespace KokkosKernels
849849

850-
#endif // _KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP
850+
#endif // KOKKOSKERNELS_HASHMAPACCUMULATOR_HPP

common/src/KokkosKernels_LowerBound.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_LOWERBOUND_HPP
18-
#define _KOKKOSKERNELS_LOWERBOUND_HPP
17+
#ifndef KOKKOSKERNELS_LOWERBOUND_HPP
18+
#define KOKKOSKERNELS_LOWERBOUND_HPP
1919

2020
/*! \file KokkosKernels_LowerBound.hpp
2121
Define thread and team-collaborative lower-bound search
@@ -434,4 +434,4 @@ KOKKOS_INLINE_FUNCTION typename ViewLike::size_type lower_bound_team(
434434

435435
} // namespace KokkosKernels
436436

437-
#endif // _KOKKOSKERNELS_LOWERBOUND_HPP
437+
#endif // KOKKOSKERNELS_LOWERBOUND_HPP

common/src/KokkosKernels_Predicates.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_PREDICATES_HPP
18-
#define _KOKKOSKERNELS_PREDICATES_HPP
17+
#ifndef KOKKOSKERNELS_PREDICATES_HPP
18+
#define KOKKOSKERNELS_PREDICATES_HPP
1919

2020
#include "Kokkos_ArithTraits.hpp"
2121

@@ -147,4 +147,4 @@ struct Refl {
147147

148148
} // namespace KokkosKernels
149149

150-
#endif // _KOKKOSKERNELS_PREDICATES_HPP
150+
#endif // KOKKOSKERNELS_PREDICATES_HPP

common/src/KokkosKernels_PrintConfiguration.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_PRINT_CONFIGURATION_HPP
18-
#define _KOKKOSKERNELS_PRINT_CONFIGURATION_HPP
17+
#ifndef KOKKOSKERNELS_PRINT_CONFIGURATION_HPP
18+
#define KOKKOSKERNELS_PRINT_CONFIGURATION_HPP
1919

2020
#include "KokkosKernels_config.h"
2121
#include "KokkosKernels_TplsVersion.hpp"
@@ -168,4 +168,4 @@ inline void print_configuration(std::ostream& os) {
168168
}
169169

170170
} // namespace KokkosKernels
171-
#endif // _KOKKOSKERNELS_PRINT_CONFIGURATION_HPP
171+
#endif // KOKKOSKERNELS_PRINT_CONFIGURATION_HPP

common/src/KokkosKernels_PrintUtils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//@HEADER
1616

17-
#ifndef _KOKKOSKERNELS_PRINTUTILS_HPP
18-
#define _KOKKOSKERNELS_PRINTUTILS_HPP
17+
#ifndef KOKKOSKERNELS_PRINTUTILS_HPP
18+
#define KOKKOSKERNELS_PRINTUTILS_HPP
1919
#include "Kokkos_Core.hpp"
2020
#include <ostream>
2121

0 commit comments

Comments
 (0)