Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting shared_ptr by SIRF engines. #62

Merged
merged 145 commits into from
Sep 27, 2017
Merged

Conversation

evgueni-ovtchinnikov
Copy link
Contributor

Switched to the use of std::shared_ptr in xGadgetron and stir::shared_ptr in xSTIR. Generally, different SIRF engines can now use different shared_ptr (as specified in *_shared_ptr,h).

evgueni-ovtchinnikov and others added 30 commits May 26, 2017 11:47
@KrisThielemans
Copy link
Member

KrisThielemans commented Sep 27, 2017

@casperdcl do you have any idea why github claims that this PR contains so many commits? This PR is based on master, which was merged to devel recently, from which this branch was created. I guess the git merge won't be a problem, but I'd like to understand this a bit more.

(not sure if this is why it claims there will be conflicts)

@KrisThielemans
Copy link
Member

@evgueni-ovtchinnikov I had a brief look at this. It seems a bit of a hack to me. I guess it works so I'm ok with merging it, but I'm generally quite warry of solving this stuff with #define. Also, it seems we have twice object_handle.inl (identical?) .

I'm not 100% sure, but I guess what you'd need is to have an extra template arg for your ObjectHandle class (and others?)

@evgueni-ovtchinnikov
Copy link
Contributor Author

evgueni-ovtchinnikov commented Sep 27, 2017 via email

@evgueni-ovtchinnikov
Copy link
Contributor Author

evgueni-ovtchinnikov commented Sep 27, 2017 via email

@KrisThielemans
Copy link
Member

FYI, modifying CMake files:

  1. create src/common/include/SIRF/common or something
  2. in xSTIR/CMakeLists.txt do something like
include_directories(${PROJECT_SOURCE_DIR}/src/common/include)
  1. in your file
#include "SIRF/common/object_handle.inl"

I wouldn't do this right now, as we want to avoid the #define trick later (it's not good programming style, and I'm worried that we'll have a conflict at some point).

can you merge with master locally first. looks like you'll have conflicts.

@evgueni-ovtchinnikov
Copy link
Contributor Author

evgueni-ovtchinnikov commented Sep 27, 2017 via email

@KrisThielemans
Copy link
Member

ok. please push

@evgueni-ovtchinnikov evgueni-ovtchinnikov merged commit baca3b1 into master Sep 27, 2017
@evgueni-ovtchinnikov
Copy link
Contributor Author

evgueni-ovtchinnikov commented Sep 27, 2017 via email

@evgueni-ovtchinnikov
Copy link
Contributor Author

Merged manually

@KrisThielemans KrisThielemans deleted the sirf_sptr branch October 13, 2017 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants