Skip to content

Commit d5fe215

Browse files
authored
Deduplicate global implementation (#139)
* deduplicate * inline * format
1 parent 5963edf commit d5fe215

File tree

3 files changed

+94
-267
lines changed

3 files changed

+94
-267
lines changed

src/portfft/committed_descriptor_impl.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ class committed_descriptor_impl;
4949
template <typename Scalar, domain Domain, detail::layout LayoutIn, detail::layout LayoutOut, Idx SubgroupSize,
5050
typename TIn>
5151
std::vector<sycl::event> compute_level(
52-
const typename committed_descriptor_impl<Scalar, Domain>::kernel_data_struct& kd_struct, TIn input, Scalar* output,
53-
TIn input_imag, Scalar* output_imag, const Scalar* twiddles_ptr, const IdxGlobal* factors_triple,
54-
IdxGlobal intermediate_twiddle_offset, IdxGlobal subimpl_twiddle_offset, IdxGlobal input_global_offset,
55-
IdxGlobal committed_size, Idx num_batches_in_l2, IdxGlobal n_transforms, IdxGlobal batch_start, Idx factor_id,
56-
Idx total_factors, complex_storage storage, const std::vector<sycl::event>& dependencies, sycl::queue& queue);
52+
const typename committed_descriptor_impl<Scalar, Domain>::kernel_data_struct& kd_struct, const TIn& input,
53+
Scalar* output, const TIn& input_imag, Scalar* output_imag, const Scalar* twiddles_ptr,
54+
const IdxGlobal* factors_triple, IdxGlobal intermediate_twiddle_offset, IdxGlobal subimpl_twiddle_offset,
55+
IdxGlobal input_global_offset, IdxGlobal committed_size, Idx num_batches_in_l2, IdxGlobal n_transforms,
56+
IdxGlobal batch_start, Idx factor_id, Idx total_factors, complex_storage storage,
57+
const std::vector<sycl::event>& dependencies, sycl::queue& queue);
5758

5859
template <typename Scalar, domain Domain, typename TOut>
5960
sycl::event transpose_level(const typename committed_descriptor_impl<Scalar, Domain>::kernel_data_struct& kd_struct,
@@ -150,8 +151,8 @@ class committed_descriptor_impl {
150151
template <typename Scalar1, domain Domain1, detail::layout LayoutIn, detail::layout LayoutOut, Idx SubgroupSize,
151152
typename TIn>
152153
friend std::vector<sycl::event> detail::compute_level(
153-
const typename committed_descriptor_impl<Scalar1, Domain1>::kernel_data_struct& kd_struct, TIn input,
154-
Scalar1* output, TIn input_imag, Scalar1* output_imag, const Scalar1* twiddles_ptr,
154+
const typename committed_descriptor_impl<Scalar1, Domain1>::kernel_data_struct& kd_struct, const TIn& input,
155+
Scalar1* output, const TIn& input_imag, Scalar1* output_imag, const Scalar1* twiddles_ptr,
155156
const IdxGlobal* factors_triple, IdxGlobal intermediate_twiddle_offset, IdxGlobal subimpl_twiddle_offset,
156157
IdxGlobal input_global_offset, IdxGlobal committed_size, Idx num_batches_in_l2, IdxGlobal n_transforms,
157158
IdxGlobal batch_start, Idx factor_id, Idx total_factors, complex_storage storage,

0 commit comments

Comments
 (0)