Skip to content

Commit

Permalink
rename variables starting from underscore under fft/src
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Oct 28, 2024
1 parent dab4d13 commit ff4f46a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions fft/src/KokkosFFT_ROCM_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ auto create_plan(const ExecutionSpace& exec_space,
// Create plan
auto in_strides = compute_strides<int, std::size_t>(in_extents);
auto out_strides = compute_strides<int, std::size_t>(out_extents);
auto _fft_extents =
auto reversed_fft_extents =
convert_int_type_and_reverse<int, std::size_t>(fft_extents);

// Create the description
Expand Down Expand Up @@ -160,10 +160,10 @@ auto create_plan(const ExecutionSpace& exec_space,
// Create a plan
plan = std::make_unique<PlanType>();
status = rocfft_plan_create(&(*plan), place, fft_direction, precision,
_fft_extents.size(), // Dimension
_fft_extents.data(), // Lengths
howmany, // Number of transforms
description // Description
reversed_fft_extents.size(), // Dimension
reversed_fft_extents.data(), // Lengths
howmany, // Number of transforms
description // Description
);
KOKKOSFFT_THROW_IF(status != rocfft_status_success,
"rocfft_plan_create failed");
Expand Down
16 changes: 8 additions & 8 deletions fft/src/KokkosFFT_SYCL_plans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,23 @@ auto create_plan(const ExecutionSpace& exec_space,
std::multiplies<>());

// Create plan
auto in_strides = compute_strides<int, std::int64_t>(in_extents);
auto out_strides = compute_strides<int, std::int64_t>(out_extents);
auto _fft_extents = convert_int_type<int, std::int64_t>(fft_extents);
auto in_strides = compute_strides<int, std::int64_t>(in_extents);
auto out_strides = compute_strides<int, std::int64_t>(out_extents);
auto int64_fft_extents = convert_int_type<int, std::int64_t>(fft_extents);

// In oneMKL, the distance is always defined based on R2C transform
std::int64_t _idist = static_cast<std::int64_t>(std::max(idist, odist));
std::int64_t _odist = static_cast<std::int64_t>(std::min(idist, odist));
std::int64_t max_idist = static_cast<std::int64_t>(std::max(idist, odist));
std::int64_t max_odist = static_cast<std::int64_t>(std::min(idist, odist));

plan = std::make_unique<PlanType>(_fft_extents);
plan = std::make_unique<PlanType>(int64_fft_extents);
plan->set_value(oneapi::mkl::dft::config_param::INPUT_STRIDES,
in_strides.data());
plan->set_value(oneapi::mkl::dft::config_param::OUTPUT_STRIDES,
out_strides.data());

// Configuration for batched plan
plan->set_value(oneapi::mkl::dft::config_param::FWD_DISTANCE, _idist);
plan->set_value(oneapi::mkl::dft::config_param::BWD_DISTANCE, _odist);
plan->set_value(oneapi::mkl::dft::config_param::FWD_DISTANCE, max_idist);
plan->set_value(oneapi::mkl::dft::config_param::BWD_DISTANCE, max_odist);
plan->set_value(oneapi::mkl::dft::config_param::NUMBER_OF_TRANSFORMS,
static_cast<std::int64_t>(howmany));

Expand Down

0 comments on commit ff4f46a

Please sign in to comment.