Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Master] Added ::GCD and ::LCM: <numeric> contains GCD and LCM implementation #20583

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

mozga-intel
Copy link
Contributor

@mozga-intel mozga-intel commented Sep 16, 2021

Description

This pull request includes the greatest common divisor implementation (std::gcd) of the integers m and n and computes the least common multiple (std::lcm) of the integers m and n. If MxNet's project is built with c++17, then support is enabled. Following implementation works fine for a given test cases: __gcd(5, 0) == 5 && __gcd(0, 5) == 5 && __gcd(0, 0) == 0;

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@mxnet-bot
Copy link

Hey @mozga-intel , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [windows-cpu, windows-gpu, edge, website, miscellaneous, sanity, unix-gpu, centos-gpu, centos-cpu, clang, unix-cpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 17, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [all]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-cpu, windows-cpu, clang, edge, windows-gpu, sanity, centos-gpu, miscellaneous, unix-gpu, unix-cpu, website]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 17, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [all]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [sanity, centos-cpu, website, centos-gpu, clang, unix-gpu, edge, windows-gpu, unix-cpu, windows-cpu, miscellaneous]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 21, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 22, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [unix-cpu, website]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [website, unix-cpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 22, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [unix-cpu, website, centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-cpu, website, centos-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 26, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Sep 27, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [all]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [unix-gpu, website, miscellaneous, windows-cpu, centos-gpu, centos-cpu, unix-cpu, windows-gpu, sanity, clang, edge]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Oct 12, 2021
@mozga-intel
Copy link
Contributor Author

@mxnet-bot run ci [centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Oct 13, 2021
@mozga-intel
Copy link
Contributor Author

@barry-jin Could you please review it?

Copy link
Contributor

@barry-jin barry-jin left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you!
By the way, you know how much can be improved with std::lcm and std::gcd?

@barry-jin barry-jin merged commit fda48e0 into apache:master Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants