Skip to content

Refactor the new distribution test#92

Merged
rouson merged 16 commits into
mainfrom
define-output_t
Aug 2, 2022
Merged

Refactor the new distribution test#92
rouson merged 16 commits into
mainfrom
define-output_t

Conversation

@rouson

@rouson rouson commented Aug 2, 2022

Copy link
Copy Markdown
Collaborator

A candidate replacement for PR #91, this new PR

  1. Defines a new output_t type that captures input/output pairs with the output being the history array.
  2. Moves and renames build_distribution to simuliated_distribution bound to the new type.
  3. Makes several do loops concurrent.
  4. Collapses some loops into array statements.
  5. Builds an output_t object in the main application.
  6. Give names speed and freq to distribution array subscripts.
  7. Tests both axes of the distribution.
  8. Separates the sim_speeds calculation into a pure function.

davytorres and others added 13 commits August 1, 2022 16:43
1. Convert several serial loops to do concurrent.
2. Collapse array statements.
3. Associate runtime constants.
4. Use garden's assert_equals_within_absolute.
5. Move sim_speeds logic to internal pure function.
use the count() intrinsic function to convert the distribution
calculation into a concurrent loop
This commit collapses the vel calcuation to 1 array statement.
This commit defines a new output_t typ and moves the
build_distribution type-bound function to this new type,
where it can get the empirical distribution from the copy
of the input stored as a component of output_t.
1. Rename function build_distribution -> simulated_distribution.
2. Let simulated_distribution use the output_t history_ component.

This eliminates all arguments required by this function except
the passed-object dummy argument "self".
@rouson rouson requested a review from davytorres August 2, 2022 06:59
@davytorres davytorres self-requested a review August 2, 2022 17:13

@davytorres davytorres left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rouson rouson merged commit c3fbd4d into main Aug 2, 2022
@rouson rouson deleted the define-output_t branch August 2, 2022 17:15
@rouson rouson mentioned this pull request Aug 3, 2022
2 tasks
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

Successfully merging this pull request may close these issues.

2 participants