• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • Projects
  • Repositories
    • View all public repositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
David Young
  1. David Young

vchoi_fork

Vailin Choi
my_hdf5_fork
Public
Actions
  • Clone
  • Download

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Graphs
  • Branches
  • Network
  • Latest Activities

Commits

David Young
fcd490a0bca
David Young committed 90a602634e017 Oct 2019
I've changed `test/dsets` so that every time it needs to visit all
cells in a matrix in an arbitrary order, first it chooses a random
starting `offset` in [0, rows * columns - 1].  Then it chooses a
random `increment` that's relatively prime to `rows * columns`.
Then it visits every cell in `rows * columns` steps:

        for (i = 0; i < rows * columns; i++) {
                visit(cell[offset / columns][offset % columns]);
                offset = (increment + offset) % (rows * columns);
        }

By moving the HDrandom() calls outside of the main loop and visiting
each cell only once, this probably speeds things up quite a bit.  It's
also more resilient to a crummy random sequence.  The new code visits
cells in an order that's probably arbitrary enough for testing purposes.

Changed files

  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v4.4.1
  • Documentation
  • Contact Support
  • Request a feature
  • About
  • Contact Atlassian
Atlassian