Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some typos. #206

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/src/KokkosFFT_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool are_valid_axes(const ViewType& view, const ArrayType<IntType, DIM>& axes) {
"are_valid_axes: the Rank of FFT axes must be between 1 and View rank");

// Convert the input axes to be in the range of [0, rank-1]
// int type is choosen for consistency with the rest of the code
// int type is chosen for consistency with the rest of the code
// the axes are defined with int type
std::array<int, DIM> non_negative_axes;

Expand Down
58 changes: 29 additions & 29 deletions common/unit_test/Test_Extents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void test_extents_1d() {
EXPECT_TRUE(fft_extents_r2c == ref_fft_extents_r2c);
EXPECT_EQ(howmany_r2c, 1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr, xcout, axes_type({0})); },
std::runtime_error);

Expand All @@ -70,7 +70,7 @@ void test_extents_1d() {
EXPECT_TRUE(fft_extents_c2r == ref_fft_extents_c2r);
EXPECT_EQ(howmany_c2r, 1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin, xr, axes_type({0})); },
std::runtime_error);

Expand Down Expand Up @@ -119,7 +119,7 @@ void test_extents_1d_batched_FFT_2d() {
EXPECT_TRUE(out_extents_r2c_axis0 == ref_out_extents_r2c_axis0);
EXPECT_EQ(howmany_r2c_axis0, ref_howmany_r2c_axis0);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr2, xcout2, axes_type({0})); },
std::runtime_error);

Expand All @@ -131,7 +131,7 @@ void test_extents_1d_batched_FFT_2d() {
EXPECT_TRUE(out_extents_r2c_axis1 == ref_out_extents_r2c_axis1);
EXPECT_EQ(howmany_r2c_axis1, ref_howmany_r2c_axis1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr2, xcout2, axes_type({1})); },
std::runtime_error);

Expand All @@ -144,7 +144,7 @@ void test_extents_1d_batched_FFT_2d() {
EXPECT_TRUE(out_extents_c2r_axis0 == ref_in_extents_r2c_axis0);
EXPECT_EQ(howmany_c2r_axis0, ref_howmany_r2c_axis0);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin2, xr2, axes_type({0})); },
std::runtime_error);

Expand All @@ -156,7 +156,7 @@ void test_extents_1d_batched_FFT_2d() {
EXPECT_TRUE(out_extents_c2r_axis1 == ref_in_extents_r2c_axis1);
EXPECT_EQ(howmany_c2r_axis1, ref_howmany_r2c_axis1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin2, xr2, axes_type({1})); },
std::runtime_error);

Expand All @@ -177,7 +177,7 @@ void test_extents_1d_batched_FFT_2d() {
EXPECT_TRUE(out_extents_c2c_axis1 == ref_in_extents_r2c_axis1);
EXPECT_EQ(howmany_c2c_axis1, ref_howmany_r2c_axis1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
ComplexView2Dtype xcout2_wrong("xcout2_wrong", n0 + 3, n1);
for (int i = 0; i < 2; i++) {
EXPECT_THROW(
Expand Down Expand Up @@ -225,7 +225,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis0 == ref_out_extents_r2c_axis0);
EXPECT_EQ(howmany_r2c_axis0, ref_howmany_r2c_axis0);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({0})); },
std::runtime_error);

Expand All @@ -237,7 +237,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis1 == ref_out_extents_r2c_axis1);
EXPECT_EQ(howmany_r2c_axis1, ref_howmany_r2c_axis1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({1})); },
std::runtime_error);

Expand All @@ -249,7 +249,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis2 == ref_out_extents_r2c_axis2);
EXPECT_EQ(howmany_r2c_axis2, ref_howmany_r2c_axis2);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({2})); },
std::runtime_error);

Expand All @@ -262,7 +262,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis0 == ref_in_extents_r2c_axis0);
EXPECT_EQ(howmany_c2r_axis0, ref_howmany_r2c_axis0);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({0})); },
std::runtime_error);

Expand All @@ -274,7 +274,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis1 == ref_in_extents_r2c_axis1);
EXPECT_EQ(howmany_c2r_axis1, ref_howmany_r2c_axis1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({1})); },
std::runtime_error);

Expand All @@ -286,7 +286,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis2 == ref_in_extents_r2c_axis2);
EXPECT_EQ(howmany_c2r_axis2, ref_howmany_r2c_axis2);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW({ KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({2})); },
std::runtime_error);

Expand Down Expand Up @@ -315,7 +315,7 @@ void test_extents_1d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2c_axis2 == ref_in_extents_r2c_axis2);
EXPECT_EQ(howmany_c2c_axis2, ref_howmany_r2c_axis2);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
ComplexView3Dtype xcout3_wrong("xcout3_wrong", n0 + 3, n1, n2);
for (int i = 0; i < 3; i++) {
EXPECT_THROW(
Expand Down Expand Up @@ -382,7 +382,7 @@ void test_extents_2d() {
EXPECT_EQ(howmany_r2c_axis01, 1);
EXPECT_EQ(howmany_r2c_axis10, 1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr2, xcout2, axes_type({0, 1}));
Expand Down Expand Up @@ -414,7 +414,7 @@ void test_extents_2d() {
EXPECT_EQ(howmany_c2r_axis01, 1);
EXPECT_EQ(howmany_c2r_axis10, 1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin2, xr2, axes_type({0, 1}));
Expand Down Expand Up @@ -446,7 +446,7 @@ void test_extents_2d() {
EXPECT_EQ(howmany_c2c_axis01, 1);
EXPECT_EQ(howmany_c2c_axis10, 1);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
ComplexView2Dtype xcout2_wrong("xcout2_wrong", n0 + 3, n1);
for (int axis0 = 0; axis0 < 2; axis0++) {
for (int axis1 = 0; axis1 < 2; axis1++) {
Expand Down Expand Up @@ -518,7 +518,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_01 == ref_out_extents_r2c_axis_01);
EXPECT_EQ(howmany_r2c_axis_01, ref_howmany_r2c_axis_01);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({0, 1}));
Expand All @@ -533,7 +533,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_02 == ref_out_extents_r2c_axis_02);
EXPECT_EQ(howmany_r2c_axis_02, ref_howmany_r2c_axis_02);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({0, 2}));
Expand All @@ -548,7 +548,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_10 == ref_out_extents_r2c_axis_10);
EXPECT_EQ(howmany_r2c_axis_10, ref_howmany_r2c_axis_10);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({1, 0}));
Expand All @@ -563,7 +563,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_12 == ref_out_extents_r2c_axis_12);
EXPECT_EQ(howmany_r2c_axis_12, ref_howmany_r2c_axis_12);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({1, 2}));
Expand All @@ -578,7 +578,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_20 == ref_out_extents_r2c_axis_20);
EXPECT_EQ(howmany_r2c_axis_20, ref_howmany_r2c_axis_20);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({2, 0}));
Expand All @@ -593,7 +593,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_r2c_axis_21 == ref_out_extents_r2c_axis_21);
EXPECT_EQ(howmany_r2c_axis_21, ref_howmany_r2c_axis_21);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xr3, xcout3, axes_type({2, 1}));
Expand All @@ -609,7 +609,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_01 == ref_in_extents_r2c_axis_01);
EXPECT_EQ(howmany_c2r_axis_01, ref_howmany_r2c_axis_01);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({0, 1}));
Expand All @@ -624,7 +624,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_02 == ref_in_extents_r2c_axis_02);
EXPECT_EQ(howmany_c2r_axis_02, ref_howmany_r2c_axis_02);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({0, 2}));
Expand All @@ -639,7 +639,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_10 == ref_in_extents_r2c_axis_10);
EXPECT_EQ(howmany_c2r_axis_10, ref_howmany_r2c_axis_10);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({1, 0}));
Expand All @@ -654,7 +654,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_12 == ref_in_extents_r2c_axis_12);
EXPECT_EQ(howmany_c2r_axis_12, ref_howmany_r2c_axis_12);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({1, 2}));
Expand All @@ -669,7 +669,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_20 == ref_in_extents_r2c_axis_20);
EXPECT_EQ(howmany_c2r_axis_20, ref_howmany_r2c_axis_20);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({2, 0}));
Expand All @@ -684,7 +684,7 @@ void test_extents_2d_batched_FFT_3d() {
EXPECT_TRUE(out_extents_c2r_axis_21 == ref_in_extents_r2c_axis_21);
EXPECT_EQ(howmany_c2r_axis_21, ref_howmany_r2c_axis_21);

// Check if errors are correctly raised aginst invalid extents
// Check if errors are correctly raised against invalid extents
EXPECT_THROW(
{
KokkosFFT::Impl::get_extents(xcin3, xr3, axes_type({2, 1}));
Expand Down
2 changes: 1 addition & 1 deletion common/unit_test/Test_Traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ template <typename T, typename LayoutType>
void test_admissible_value_type() {
using ViewType = Kokkos::View<T*, LayoutType>;
using real_type = KokkosFFT::Impl::base_floating_point_type<T>;
// Tests that a Value or View has a addmissible value type
// Tests that a Value or View has a admissible value type
if constexpr (std::is_same_v<real_type, float> ||
std::is_same_v<real_type, double>) {
// Base floating point type of a Value is float or double
Expand Down
8 changes: 4 additions & 4 deletions common/unit_test/Test_Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void test_convert_negative_axes_1d() {
EXPECT_EQ(converted_axis_0, ref_converted_axis_0);
EXPECT_EQ(converted_axis_minus1, ref_converted_axis_minus1);

// Check if errors are correctly raised aginst invalid axis
// Check if errors are correctly raised against invalid axis
// axis must be in [-1, 1)
EXPECT_THROW({ KokkosFFT::Impl::convert_negative_axis(x, /*axis=*/1); },
std::runtime_error);
Expand Down Expand Up @@ -93,7 +93,7 @@ void test_convert_negative_axes_2d() {
EXPECT_EQ(converted_axis_1, ref_converted_axis_1);
EXPECT_EQ(converted_axis_minus1, ref_converted_axis_minus1);

// Check if errors are correctly raised aginst invalid axis
// Check if errors are correctly raised against invalid axis
// axis must be in [-2, 2)
EXPECT_THROW({ KokkosFFT::Impl::convert_negative_axis(x, /*axis=*/2); },
std::runtime_error);
Expand Down Expand Up @@ -128,7 +128,7 @@ void test_convert_negative_axes_3d() {
EXPECT_EQ(converted_axis_minus1, ref_converted_axis_minus1);
EXPECT_EQ(converted_axis_minus2, ref_converted_axis_minus2);

// Check if errors are correctly raised aginst invalid axis
// Check if errors are correctly raised against invalid axis
// axis must be in [-3, 3)
EXPECT_THROW({ KokkosFFT::Impl::convert_negative_axis(x, /*axis=*/3); },
std::runtime_error);
Expand Down Expand Up @@ -170,7 +170,7 @@ void test_convert_negative_axes_4d() {
EXPECT_EQ(converted_axis_minus2, ref_converted_axis_minus2);
EXPECT_EQ(converted_axis_minus3, ref_converted_axis_minus3);

// Check if errors are correctly raised aginst invalid axis
// Check if errors are correctly raised against invalid axis
// axis must be in [-4, 4)
EXPECT_THROW({ KokkosFFT::Impl::convert_negative_axis(x, /*axis=*/4); },
std::runtime_error);
Expand Down
10 changes: 5 additions & 5 deletions fft/src/KokkosFFT_Plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Plan {
///
/// \param exec_space [in] Kokkos execution device
/// \param in [in] Input data
/// \param out [in] Ouput data
/// \param out [in] Output data
/// \param direction [in] Direction of FFT (forward/backward)
/// \param axis [in] Axis over which FFT is performed
/// \param n [in] Length of the transformed axis of the output (default,
Expand Down Expand Up @@ -218,7 +218,7 @@ class Plan {
///
/// \param exec_space [in] Kokkos execution space for this plan
/// \param in [in] Input data
/// \param out [in] Ouput data
/// \param out [in] Output data
/// \param direction [in] Direction of FFT (forward/backward)
/// \param axes [in] Axes over which FFT is performed
/// \param s [in] Shape of the transformed axis of the output (default, {})
Expand Down Expand Up @@ -291,7 +291,7 @@ class Plan {
/// \brief Execute FFT on input and output Views with normalization
///
/// \param in [in] Input data
/// \param out [out] Ouput data
/// \param out [out] Output data
/// \param norm [in] How the normalization is applied (default, backward)
void execute(const InViewType& in, const OutViewType& out,
KokkosFFT::Normalization norm =
Expand Down Expand Up @@ -379,10 +379,10 @@ class Plan {

/// \brief Sanity check of the plan used to call FFT interface with
/// pre-defined FFT plan. This raises an error if there is an
/// incosistency between FFT function and plan
/// inconsistency between FFT function and plan
///
/// \param in [in] Input data
/// \param out [in] Ouput data
/// \param out [in] Output data
void good(const InViewType& in, const OutViewType& out) const {
auto in_extents = KokkosFFT::Impl::extract_extents(in);
auto out_extents = KokkosFFT::Impl::extract_extents(out);
Expand Down
2 changes: 1 addition & 1 deletion fft/src/KokkosFFT_SYCL_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ template <
std::enable_if_t<std::is_same_v<ExecutionSpace, Kokkos::Experimental::SYCL>,
std::nullptr_t> = nullptr>
void destroy_plan_and_info(std::unique_ptr<PlanType>&, InfoType&) {
// In oneMKL, plans are destroybed by destructor
// In oneMKL, plans are destroyed by destructor
}
} // namespace Impl
} // namespace KokkosFFT
Expand Down
Loading
Loading