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 multiple indexing to avoid recomputing constants #4

Open
simsurace opened this issue Mar 18, 2021 · 1 comment
Open

Use multiple indexing to avoid recomputing constants #4

simsurace opened this issue Mar 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@simsurace
Copy link
Collaborator

For example, when sampling an array A of size (4, 4, 4), with count of size (4, 4) and prob of size (4,), use an index i to select among the CartesianIndices((4,4)) and an index j to select among CartesianIndices((4,)), and iterate over the remaining indices (in this case, just the third axis of A) within the kernel. This avoids recomputing the constants that are needed for the BTRS algorithm.

This should probably only be merged if it is consistently faster, or else maybe be a user option avoid_recomp.

@simsurace simsurace added the enhancement New feature or request label Mar 18, 2021
@simsurace
Copy link
Collaborator Author

This can be addressed by looping over indices in Rr within the kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant