-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
feat: add C implementation for math/base/special/fast/uint32-log2
#1946
feat: add C implementation for math/base/special/fast/uint32-log2
#1946
Conversation
This commit if applied adds the native C implementation to @stdlib/math/base/special/fast/uint32-log2
Signed-off-by: Rutam <[email protected]>
Would we need to disable the cppcheck equivalent of no-unused-vars rule here? Cause we'll need to modify the value of x at intermediate stages but we never have to formally return it. If so, where can I find the instruction to disable the rule? Edit: cc @kgryte and @Planeshifter. Hello, I'd be really grateful to receive your feedback for the query above and also, that will speed up the process since by the time the PR gets reviewed, I can keep the required changes ready! |
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/main.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/main.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Pranav <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Pranav <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/main.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Pranav <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/examples/c/example.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/README.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Pranav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail, please check if something is off in your implementation. Thanks for your work!
total: 5034
passing: 2
failing: 5032
duration: 482ms
Signed-off-by: Rutam <[email protected]>
Hi @Pranavchiku, I was mistakenly typecasting the return value - fixed. Edit: So about the linting error, at the last conditional, we're assigning |
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/README.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/benchmark/c/native/benchmark.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/main.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @performant23. I left a few comments and suggestions for improvement.
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
…c/main.c Co-authored-by: Athan <[email protected]> Signed-off-by: Rutam <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/manifest.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@performant23 This PR is almost there. We can simplify the addon.c
file just a touch more by using another macro.
Signed-off-by: Rutam <[email protected]>
Signed-off-by: Rutam <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
lib/node_modules/@stdlib/math/base/special/fast/uint32-log2/src/addon.c
Outdated
Show resolved
Hide resolved
Signed-off-by: Athan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, @performant23!
This commit if applied adds the native C implementation to
@stdlib/math/base/special/fast/uint32-log2
Description
Related Issues
This pull request:
@stdlib/math/base/special/fast/uint32-log2
#1931Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers