Skip to content

Commit

Permalink
fix problem in parallelproj projector pair set_up causing slow-down
Browse files Browse the repository at this point in the history
set_up() had the wrong signature, such that the helper was created twice
and hence the start/end arrays computed twice
  • Loading branch information
KrisThielemans committed Aug 29, 2023
1 parent 2a27252 commit 4408419
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ class ProjectorByBinPairUsingParallelproj :
ProjectorByBinPairUsingParallelproj();

Succeeded
set_up(const shared_ptr<ProjDataInfo>&,
const shared_ptr<DiscretisedDensity<3,float> >&);
set_up(const shared_ptr<const ProjDataInfo>&,
const shared_ptr<const DiscretisedDensity<3,float> >&) override;

/// Set verbosity
void set_verbosity(const bool verbosity);

private:
shared_ptr<detail::ParallelprojHelper> _helper;

void set_defaults();
void initialise_keymap();
bool post_processing();
void set_defaults() override;
void initialise_keymap() override;
bool post_processing() override;
bool _verbosity;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ ProjectorByBinPairUsingParallelproj()

Succeeded
ProjectorByBinPairUsingParallelproj::
set_up(const shared_ptr<ProjDataInfo>& proj_data_info_sptr,
const shared_ptr<DiscretisedDensity<3,float> >& image_info_sptr)
set_up(const shared_ptr<const ProjDataInfo>& proj_data_info_sptr,
const shared_ptr<const DiscretisedDensity<3,float> >& image_info_sptr)
{
_helper = std::make_shared<detail::ParallelprojHelper>(*proj_data_info_sptr, *image_info_sptr);
dynamic_pointer_cast<ForwardProjectorByBinParallelproj>(this->forward_projector_sptr)
Expand Down

0 comments on commit 4408419

Please sign in to comment.