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

Slightly faster SH basis implementation. #1

Merged
merged 1 commit into from
May 8, 2014
Merged

Slightly faster SH basis implementation. #1

merged 1 commit into from
May 8, 2014

Conversation

dchristiaens
Copy link
Member

I eliminated some unnecessary sine and cosine calculations, resulting in a slight speed gain.

Using iFOD2 on a software phantom, the current master branch gets me:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
103565 generated, 100000 selected [100%]
843.04user 1.89system 3:44.91elapsed 375%CPU (0avgtext+0avgdata 263208960maxresident)k
0inputs+22outputs (32major+16220minor)pagefaults 0swaps

whereas with this commit, I get:
gtime tckgen csd/fod10.mif -mask mask.mif -number 100000 -seed_image mask.mif csd/test.tck -force
tckgen [WARNING]: existing output files will be overwritten
103592 generated, 100000 selected [100%]
800.80user 2.91system 3:27.70elapsed 386%CPU (0avgtext+0avgdata 263012352maxresident)k
3inputs+22outputs (193major+16043minor)pagefaults 0swaps

@dchristiaens
Copy link
Member Author

Yes, of course. I wrote a unit test evaluating all functions affecting by the commit, and compared the output between this pull request and the current master branch. Results are identical up to numerical differences (max difference 1e-6).

jdtournier added a commit that referenced this pull request May 8, 2014
Slightly faster SH basis implementation.
@jdtournier jdtournier merged commit 4d6a443 into master May 8, 2014
@jdtournier jdtournier deleted the sh_basis branch May 9, 2014 13:15
Lestropie referenced this pull request in Lestropie/mrtrix3 Sep 3, 2020
dchristiaens pushed a commit that referenced this pull request Jan 13, 2021
Rebase to latest master
maxpietsch pushed a commit that referenced this pull request Apr 6, 2021
daljit46 pushed a commit that referenced this pull request Feb 27, 2024
daljit46 pushed a commit that referenced this pull request Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants