akielaries / openGPMP

Hardware Accelerated General Purpose Mathematics Package
https://akielaries.github.io/openGPMP/
MIT License
8 stars 3 forks source link

Fix macOS builds #43

Closed sidsbrmnn closed 1 year ago

sidsbrmnn commented 1 year ago

This pull request fixes hanging test cases on macOS during build time.

Issue

compute_miller_rabin() expects two arguments: d and n, where d is an odd number and n is the target number to be checked. d is generated by miller_rabin_prime() and the boundaries for n are handled in miller_rabin_prime(). These boundaries are not handled by compute_miller_rabin() as it expects the input n to be greater than 4.

Changes Made

One auxiliary change was necessary to successfully build openMTPK.

Testing Done

The changes are tested on macOS 13.3 running on M2.

Fixes #27

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (00cff83) 88.11% compared to head (cef6c40) 88.11%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #43 +/- ## ======================================= Coverage 88.11% 88.11% ======================================= Files 10 10 Lines 471 471 ======================================= Hits 415 415 Misses 56 56 ``` | [Impacted Files](https://codecov.io/gh/akielaries/openMTPK/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Akiel+Aries) | Coverage Δ | | |---|---|---| | [modules/nt/primes.cpp](https://codecov.io/gh/akielaries/openMTPK/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Akiel+Aries#diff-bW9kdWxlcy9udC9wcmltZXMuY3Bw) | `63.28% <100.00%> (ø)` | | | [tests/nt/t\_primes.cpp](https://codecov.io/gh/akielaries/openMTPK/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Akiel+Aries#diff-dGVzdHMvbnQvdF9wcmltZXMuY3Bw) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Akiel+Aries). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Akiel+Aries)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.