[Master] Added ::GCD and ::LCM: <numeric> contains GCD and LCM implementation#20583
Conversation
|
Hey @mozga-intel , Thanks for submitting the PR
CI supported jobs: [windows-cpu, windows-gpu, edge, website, miscellaneous, sanity, unix-gpu, centos-gpu, centos-cpu, clang, unix-cpu] Note: |
0dc98ce to
d080b2e
Compare
|
@mxnet-bot run ci [all] |
|
Jenkins CI successfully triggered : [centos-cpu, windows-cpu, clang, edge, windows-gpu, sanity, centos-gpu, miscellaneous, unix-gpu, unix-cpu, website] |
|
@mxnet-bot run ci [all] |
|
Jenkins CI successfully triggered : [sanity, centos-cpu, website, centos-gpu, clang, unix-gpu, edge, windows-gpu, unix-cpu, windows-cpu, miscellaneous] |
757b182 to
ba94ad6
Compare
|
@mxnet-bot run ci [unix-cpu, website] |
|
Jenkins CI successfully triggered : [website, unix-cpu] |
|
@mxnet-bot run ci [unix-cpu, website, centos-gpu] |
|
Jenkins CI successfully triggered : [unix-cpu, website, centos-gpu] |
ba94ad6 to
0fd7daa
Compare
|
@mxnet-bot run ci [all] |
|
Jenkins CI successfully triggered : [unix-gpu, website, miscellaneous, windows-cpu, centos-gpu, centos-cpu, unix-cpu, windows-gpu, sanity, clang, edge] |
|
@mxnet-bot run ci [centos-gpu] |
|
Jenkins CI successfully triggered : [centos-gpu] |
|
@barry-jin Could you please review it? |
barry-jin
left a comment
There was a problem hiding this comment.
LGTM, Thank you!
By the way, you know how much can be improved with std::lcm and std::gcd?
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
Changes
Comments