Skip to content

Commit

Permalink
remove unneeded argument from commit_impl::commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FMarno committed Feb 21, 2023
1 parent e9fd167 commit c7cc568
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/oneapi/mkl/dft/detail/commit_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class commit_impl {

virtual void* get_handle() noexcept = 0;

virtual void commit(sycl::queue& queue, const dft_values<prec, dom>&) = 0;
virtual void commit(const dft_values<prec, dom>&) = 0;

private:
mkl::backend backend_;
Expand Down
2 changes: 1 addition & 1 deletion src/dft/backends/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void descriptor<prec, dom>::commit(sycl::queue &queue) {
if (!pimpl_) {
pimpl_.reset(detail::create_commit(*this, queue));
}
pimpl_->commit(queue, values_);
pimpl_->commit(values_);
}
template void descriptor<precision::SINGLE, domain::COMPLEX>::commit(sycl::queue &);
template void descriptor<precision::SINGLE, domain::REAL>::commit(sycl::queue &);
Expand Down
2 changes: 1 addition & 1 deletion src/dft/backends/mklcpu/commit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class commit_derived_impl final : public detail::commit_impl<prec, dom> {
}
}

void commit(sycl::queue&, const detail::dft_values<prec, dom>& config_values) override {
void commit(const detail::dft_values<prec, dom>& 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",
Expand Down
2 changes: 1 addition & 1 deletion src/dft/backends/mklcpu/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void descriptor<prec, dom>::commit(backend_selector<backend::mklcpu> selector) {
if (!pimpl_) {
pimpl_.reset(mklcpu::create_commit(*this, selector.get_queue()));
}
pimpl_->commit(selector.get_queue(), values_);
pimpl_->commit(values_);
}

template void descriptor<precision::SINGLE, domain::COMPLEX>::commit(
Expand Down
5 changes: 2 additions & 3 deletions src/dft/backends/mklgpu/commit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ class commit_derived_impl final : public dft::detail::commit_impl<prec, dom> {
}
}

virtual void commit(sycl::queue& queue,
const dft::detail::dft_values<prec, dom>& config_values) override {
virtual void commit(const dft::detail::dft_values<prec, dom>& 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.
Expand Down
2 changes: 1 addition & 1 deletion src/dft/backends/mklgpu/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void descriptor<prec, dom>::commit(backend_selector<backend::mklgpu> selector) {
if (!pimpl_) {
pimpl_.reset(mklgpu::create_commit(*this, selector.get_queue()));
}
pimpl_->commit(selector.get_queue(), values_);
pimpl_->commit(values_);
}

template void descriptor<precision::SINGLE, domain::COMPLEX>::commit(
Expand Down

0 comments on commit c7cc568

Please sign in to comment.