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

Use integers to represent media indices #21

Closed
fangq opened this issue May 17, 2016 · 0 comments
Closed

Use integers to represent media indices #21

fangq opened this issue May 17, 2016 · 0 comments

Comments

@fangq
Copy link
Owner

fangq commented May 17, 2016

Currently, we use an unsigned char to represent a label of a medium label. Because the highest bit of the char is used to represent the detector label, so, the max number of tissues mcx can represent is only 2^7=128.

Since there is no storage benefit to use a char variable inside the cuda kernel because of byte alignment, it probably would not add any overhead, if not faster, to use an integer array to represent the domain.

If we expand the label to 32bit, we can use a subset of bits for special masking to speed up some of the calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant