Skip to content

Commit

Permalink
Rename uniformElements[XYZ] to uniformElementsAlong[XYZ]
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Sep 11, 2024
1 parent b4dc73a commit 380840a
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions include/alpaka/exec/UniformElements.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace alpaka
*
* In an N-dimensional kernel, dimension 0 is the one that increases more slowly (e.g. the outer loop),
* followed by dimension 1, up to dimension N-1 that increases fastest (e.g. the inner loop). For convenience
* when converting CUDA or HIP code, `uniformElementsX(acc, ...)`, `Y` and `Z` are shorthands for
* when converting CUDA or HIP code, `uniformElementsAlongX(acc, ...)`, `Y` and `Z` are shorthands for
* `UniformElementsAlong<TAcc, N-1>(acc, ...)`, `<N-2>` and `<N-3>`.
*
* To cover the problem space, different threads may execute a different number of iterations. As a result, it
Expand Down Expand Up @@ -196,10 +196,10 @@ namespace alpaka
};

private:
const Idx elements_;
const Idx first_;
const Idx stride_;
const Idx extent_;
Idx const elements_;
Idx const first_;
Idx const stride_;
Idx const extent_;
};

} // namespace detail
Expand Down Expand Up @@ -256,7 +256,7 @@ namespace alpaka
* use
* - `uniformElementsND(acc, ...)` to cover an N-dimensional problem space with a single loop;
* - `uniformElementsAlong<Dim>(acc, ...)` to perform the iteration explicitly along dimension `Dim`;
* - `uniformElementsX(acc, ...)`, `uniformElementsY(acc, ...)`, or `uniformElementsZ(acc, ...)` to loop
* - `uniformElementsAlongX(acc, ...)`, `uniformElementsY(acc, ...)`, or `uniformElementsZ(acc, ...)` to loop
* along the fastest, second-fastest, or third-fastest dimension.
*/

Expand Down Expand Up @@ -287,7 +287,7 @@ namespace alpaka
return detail::UniformElementsAlong<TAcc, Dim>(acc, static_cast<Idx>(args)...);
}

/* uniformElementsX, Y, Z
/* uniformElementsAlongX, Y, Z
*
* Like `uniformElements` for N-dimensional kernels, along the fastest, second-fastest, and third-fastest
* dimensions.
Expand All @@ -297,7 +297,7 @@ namespace alpaka
typename TAcc,
typename... TArgs,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and (alpaka::Dim<TAcc>::value > 0)>>
ALPAKA_FN_ACC inline auto uniformElementsX(TAcc const& acc, TArgs... args)
ALPAKA_FN_ACC inline auto uniformElementsAlongX(TAcc const& acc, TArgs... args)
{
using Idx = alpaka::Idx<TAcc>;
return detail::UniformElementsAlong<TAcc, alpaka::Dim<TAcc>::value - 1>(acc, static_cast<Idx>(args)...);
Expand All @@ -307,7 +307,7 @@ namespace alpaka
typename TAcc,
typename... TArgs,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and (alpaka::Dim<TAcc>::value > 1)>>
ALPAKA_FN_ACC inline auto uniformElementsY(TAcc const& acc, TArgs... args)
ALPAKA_FN_ACC inline auto uniformElementsAlongY(TAcc const& acc, TArgs... args)
{
using Idx = alpaka::Idx<TAcc>;
return detail::UniformElementsAlong<TAcc, alpaka::Dim<TAcc>::value - 2>(acc, static_cast<Idx>(args)...);
Expand All @@ -317,7 +317,7 @@ namespace alpaka
typename TAcc,
typename... TArgs,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc> and (alpaka::Dim<TAcc>::value > 2)>>
ALPAKA_FN_ACC inline auto uniformElementsZ(TAcc const& acc, TArgs... args)
ALPAKA_FN_ACC inline auto uniformElementsAlongZ(TAcc const& acc, TArgs... args)
{
using Idx = alpaka::Idx<TAcc>;
return detail::UniformElementsAlong<TAcc, alpaka::Dim<TAcc>::value - 3>(acc, static_cast<Idx>(args)...);
Expand Down Expand Up @@ -581,10 +581,10 @@ namespace alpaka
};

private:
const Vec elements_;
const Vec thread_;
const Vec stride_;
const Vec extent_;
Vec const elements_;
Vec const thread_;
Vec const stride_;
Vec const extent_;
};

} // namespace detail
Expand Down Expand Up @@ -762,9 +762,9 @@ namespace alpaka
};

private:
const Idx first_;
const Idx stride_;
const Idx extent_;
Idx const first_;
Idx const stride_;
Idx const extent_;
};

} // namespace detail
Expand Down Expand Up @@ -1031,9 +1031,9 @@ namespace alpaka
};

private:
const Idx first_;
const Idx local_;
const Idx range_;
Idx const first_;
Idx const local_;
Idx const range_;
};

} // namespace detail
Expand Down

0 comments on commit 380840a

Please sign in to comment.