Skip to content

Commit

Permalink
remove unused variables from internal tbsv serial functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Jun 13, 2024
1 parent 11c9136 commit bace490
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
24 changes: 12 additions & 12 deletions batched/dense/impl/KokkosBatched_Tbsv_Serial_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ struct SerialTbsv<Uplo::Lower, Trans::NoTranspose, ArgDiag,
if (info) return info;

return SerialTbsvInternalLower<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand All @@ -95,8 +95,8 @@ struct SerialTbsv<Uplo::Lower, Trans::Transpose, ArgDiag,
if (info) return info;

return SerialTbsvInternalLowerTranspose<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, false, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, false, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand All @@ -111,8 +111,8 @@ struct SerialTbsv<Uplo::Lower, Trans::ConjTranspose, ArgDiag,
if (info) return info;

return SerialTbsvInternalLowerTranspose<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, true, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, true, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand All @@ -127,8 +127,8 @@ struct SerialTbsv<Uplo::Upper, Trans::NoTranspose, ArgDiag,
if (info) return info;

return SerialTbsvInternalUpper<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand All @@ -143,8 +143,8 @@ struct SerialTbsv<Uplo::Upper, Trans::Transpose, ArgDiag,
if (info) return info;

return SerialTbsvInternalUpperTranspose<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, false, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, false, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand All @@ -159,8 +159,8 @@ struct SerialTbsv<Uplo::Upper, Trans::ConjTranspose, ArgDiag,
if (info) return info;

return SerialTbsvInternalUpperTranspose<Algo::Tbsv::Unblocked>::invoke(
ArgDiag::use_unit_diag, true, A.extent(1), x.extent(0), A.data(),
A.stride_0(), A.stride_1(), x.data(), x.stride_0(), k);
ArgDiag::use_unit_diag, true, A.extent(1), A.data(), A.stride_0(),
A.stride_1(), x.data(), x.stride_0(), k);
}
};

Expand Down
36 changes: 20 additions & 16 deletions batched/dense/impl/KokkosBatched_Tbsv_Serial_Internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ template <typename AlgoType>
struct SerialTbsvInternalLower {
template <typename ValueType>
KOKKOS_INLINE_FUNCTION static int invoke(const bool use_unit_diag,
const int an, const int xm,
const int an,
const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x,
Expand All @@ -46,8 +46,8 @@ template <>
template <typename ValueType>
KOKKOS_INLINE_FUNCTION int
SerialTbsvInternalLower<Algo::Tbsv::Unblocked>::invoke(
const bool use_unit_diag, const int an, const int xn,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
const bool use_unit_diag, const int an, const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k) {
#if defined(KOKKOS_ENABLE_PRAGMA_UNROLL)
#pragma unroll
Expand Down Expand Up @@ -76,17 +76,19 @@ SerialTbsvInternalLower<Algo::Tbsv::Unblocked>::invoke(
template <typename AlgoType>
struct SerialTbsvInternalLowerTranspose {
template <typename ValueType>
KOKKOS_INLINE_FUNCTION static int invoke(
const bool use_unit_diag, const bool do_conj, const int an, const int xm,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k);
KOKKOS_INLINE_FUNCTION static int invoke(const bool use_unit_diag,
const bool do_conj, const int an,
const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x,
const int xs0, const int k);
};

template <>
template <typename ValueType>
KOKKOS_INLINE_FUNCTION int
SerialTbsvInternalLowerTranspose<Algo::Tbsv::Unblocked>::invoke(
const bool use_unit_diag, const bool do_conj, const int an, const int xn,
const bool use_unit_diag, const bool do_conj, const int an,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k) {
#if defined(KOKKOS_ENABLE_PRAGMA_UNROLL)
Expand Down Expand Up @@ -129,7 +131,7 @@ template <typename AlgoType>
struct SerialTbsvInternalUpper {
template <typename ValueType>
KOKKOS_INLINE_FUNCTION static int invoke(const bool use_unit_diag,
const int an, const int xm,
const int an,
const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x,
Expand All @@ -140,8 +142,8 @@ template <>
template <typename ValueType>
KOKKOS_INLINE_FUNCTION int
SerialTbsvInternalUpper<Algo::Tbsv::Unblocked>::invoke(
const bool use_unit_diag, const int an, const int xn,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
const bool use_unit_diag, const int an, const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k) {
#if defined(KOKKOS_ENABLE_PRAGMA_UNROLL)
#pragma unroll
Expand Down Expand Up @@ -170,17 +172,19 @@ SerialTbsvInternalUpper<Algo::Tbsv::Unblocked>::invoke(
template <typename AlgoType>
struct SerialTbsvInternalUpperTranspose {
template <typename ValueType>
KOKKOS_INLINE_FUNCTION static int invoke(
const bool use_unit_diag, const bool do_conj, const int an, const int xm,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k);
KOKKOS_INLINE_FUNCTION static int invoke(const bool use_unit_diag,
const bool do_conj, const int an,
const ValueType *KOKKOS_RESTRICT A,
const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x,
const int xs0, const int k);
};

template <>
template <typename ValueType>
KOKKOS_INLINE_FUNCTION int
SerialTbsvInternalUpperTranspose<Algo::Tbsv::Unblocked>::invoke(
const bool use_unit_diag, const bool do_conj, const int an, const int xn,
const bool use_unit_diag, const bool do_conj, const int an,
const ValueType *KOKKOS_RESTRICT A, const int as0, const int as1,
/**/ ValueType *KOKKOS_RESTRICT x, const int xs0, const int k) {
#if defined(KOKKOS_ENABLE_PRAGMA_UNROLL)
Expand Down

0 comments on commit bace490

Please sign in to comment.