Skip to content

Use multiple indexing to avoid recomputing constants #4

Description

@simsurace

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions