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

Unnecessary memory expansion? #318

Open
DanNBullock opened this issue Aug 13, 2019 · 1 comment
Open

Unnecessary memory expansion? #318

DanNBullock opened this issue Aug 13, 2019 · 1 comment

Comments

@DanNBullock
Copy link
Contributor

DanNBullock commented Aug 13, 2019

fg.fibers=cellfun(@double, fg.fibers, 'UniformOutput', false);

Hypothetically speaking, if the streamline coordinates of the input fg are not in double precision float, doesn't this double the ram usage without any associated gain in precision?

Indeed, at this point (

tmp = fread(fid,inf,'*float32')';
) its actually single point precision, so it seems that this is necessarily the case.

Also, even in cases where the input is in double point precision, is that level of precision actually useful given the diffusion resolutions we are typically working with?

Is this line necessary?

@soichih
Copy link
Contributor

soichih commented Aug 15, 2019

I've tested some algorithms (encode, LiFE) using fg without converting to double. The results were within expected stochasticity. We need to test it with more algorithms but so far it seems that we don't need to convert to double.

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

No branches or pull requests

2 participants