From c7cc5682eac03fa49027ceb9a808d803560cfaf8 Mon Sep 17 00:00:00 2001 From: Finlay Marno Date: Tue, 21 Feb 2023 09:32:05 +0000 Subject: [PATCH] remove unneeded argument from commit_impl::commit --- include/oneapi/mkl/dft/detail/commit_impl.hpp | 2 +- src/dft/backends/descriptor.cpp | 2 +- src/dft/backends/mklcpu/commit.cpp | 2 +- src/dft/backends/mklcpu/descriptor.cpp | 2 +- src/dft/backends/mklgpu/commit.cpp | 5 ++--- src/dft/backends/mklgpu/descriptor.cpp | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/oneapi/mkl/dft/detail/commit_impl.hpp b/include/oneapi/mkl/dft/detail/commit_impl.hpp index ef52679ed..ee4aee8dd 100644 --- a/include/oneapi/mkl/dft/detail/commit_impl.hpp +++ b/include/oneapi/mkl/dft/detail/commit_impl.hpp @@ -57,7 +57,7 @@ class commit_impl { virtual void* get_handle() noexcept = 0; - virtual void commit(sycl::queue& queue, const dft_values&) = 0; + virtual void commit(const dft_values&) = 0; private: mkl::backend backend_; diff --git a/src/dft/backends/descriptor.cpp b/src/dft/backends/descriptor.cpp index cc0234606..f03c53902 100644 --- a/src/dft/backends/descriptor.cpp +++ b/src/dft/backends/descriptor.cpp @@ -31,7 +31,7 @@ void descriptor::commit(sycl::queue &queue) { if (!pimpl_) { pimpl_.reset(detail::create_commit(*this, queue)); } - pimpl_->commit(queue, values_); + pimpl_->commit(values_); } template void descriptor::commit(sycl::queue &); template void descriptor::commit(sycl::queue &); diff --git a/src/dft/backends/mklcpu/commit.cpp b/src/dft/backends/mklcpu/commit.cpp index 281437e90..b03bd1e4c 100644 --- a/src/dft/backends/mklcpu/commit.cpp +++ b/src/dft/backends/mklcpu/commit.cpp @@ -59,7 +59,7 @@ class commit_derived_impl final : public detail::commit_impl { } } - void commit(sycl::queue&, const detail::dft_values& config_values) override { + void commit(const detail::dft_values& config_values) override { set_value(handle, config_values); if (auto status = DftiCommitDescriptor(handle); status != DFTI_NO_ERROR) { throw oneapi::mkl::exception("dft/backends/mklcpu", "commit", diff --git a/src/dft/backends/mklcpu/descriptor.cpp b/src/dft/backends/mklcpu/descriptor.cpp index 6d6620998..e49d41f7c 100644 --- a/src/dft/backends/mklcpu/descriptor.cpp +++ b/src/dft/backends/mklcpu/descriptor.cpp @@ -31,7 +31,7 @@ void descriptor::commit(backend_selector selector) { if (!pimpl_) { pimpl_.reset(mklcpu::create_commit(*this, selector.get_queue())); } - pimpl_->commit(selector.get_queue(), values_); + pimpl_->commit(values_); } template void descriptor::commit( diff --git a/src/dft/backends/mklgpu/commit.cpp b/src/dft/backends/mklgpu/commit.cpp index 9fb3cf5da..897e0ae5b 100644 --- a/src/dft/backends/mklgpu/commit.cpp +++ b/src/dft/backends/mklgpu/commit.cpp @@ -71,11 +71,10 @@ class commit_derived_impl final : public dft::detail::commit_impl { } } - virtual void commit(sycl::queue& queue, - const dft::detail::dft_values& config_values) override { + virtual void commit(const dft::detail::dft_values& config_values) override { set_value(handle, config_values); try { - handle.commit(queue); + handle.commit(this->get_queue()); } catch (const std::exception& mkl_exception) { // Catching the real MKL exception causes headaches with naming. diff --git a/src/dft/backends/mklgpu/descriptor.cpp b/src/dft/backends/mklgpu/descriptor.cpp index cedf20685..e857e7046 100644 --- a/src/dft/backends/mklgpu/descriptor.cpp +++ b/src/dft/backends/mklgpu/descriptor.cpp @@ -31,7 +31,7 @@ void descriptor::commit(backend_selector selector) { if (!pimpl_) { pimpl_.reset(mklgpu::create_commit(*this, selector.get_queue())); } - pimpl_->commit(selector.get_queue(), values_); + pimpl_->commit(values_); } template void descriptor::commit(