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

wgsl: Change the term bounds to endpoints for intervals #3207

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

zoddicus
Copy link
Contributor

@zoddicus zoddicus commented Dec 5, 2023

This is to help differentiate between concept of the edges of an interval and the values that define a numeric space, like f32 precision, which previously have both been called bounds.

Issue #3201


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

This is to help differentiate between concept of the edges of an
interval and the values that define a numeric space, like f32
precision, which previously have both been called bounds.
@zoddicus zoddicus added the wgsl label Dec 5, 2023
@zoddicus zoddicus self-assigned this Dec 5, 2023
Copy link
Contributor

@jiangzhaoming jiangzhaoming left a comment

Choose a reason for hiding this comment

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

Looks good to me with some minor typo in comments, thanks!

src/webgpu/util/floating_point.ts Outdated Show resolved Hide resolved
src/unittests/floating_point.spec.ts Outdated Show resolved Hide resolved
{ input: constants.positive.max, expected: kUnboundedBounds },
{ input: constants.positive.infinity, expected: kUnboundedBounds },
// The acceptance interval @ x = -1 and 1 is kUnboundedEndpoints,
// because sqrt(1 - x*x) = sqrt(0), and sqrt is defined in terms of
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// because sqrt(1 - x*x) = sqrt(0), and sqrt is defined in terms of
// because sqrt(1 - x*x) = sqrt(0), and sqrt is defined in terms of

src/unittests/floating_point.spec.ts Outdated Show resolved Hide resolved
src/unittests/floating_point.spec.ts Outdated Show resolved Hide resolved
src/unittests/floating_point.spec.ts Outdated Show resolved Hide resolved
src/unittests/floating_point.spec.ts Show resolved Hide resolved
@zoddicus zoddicus merged commit 5787eeb into gpuweb:main Dec 6, 2023
1 check passed
@zoddicus zoddicus deleted the renameBounds branch December 6, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants