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

Made dace::math::pow forward to std::pow more generic #1583

Merged
merged 19 commits into from
Jun 12, 2024

Conversation

BenWeber42
Copy link
Contributor

This overload solution will forward the argument types separately and use the same return type.

Berke-Ates and others added 11 commits February 16, 2024 15:09
Currently there was an inplementation for `T pow(T, T)`, where `T` is a template and two for the case where `T` is a signed or unsigned integer.
This is a problem if we consider the call `pow(double, long long)` because the call is ambigious and results in a compiler error.
As a solution I added the function `T pow(T, E)`, where both `T` and `E` are templates.

I also think that the implementation of the int case could be improved because currently it is a simple for loop.
@BenWeber42
Copy link
Contributor Author

My attempt at combining #1582 and #1521.

@BenWeber42 BenWeber42 marked this pull request as draft June 7, 2024 14:05
@Berke-Ates
Copy link
Contributor

Thanks for the work! Looks good to me!

@BenWeber42
Copy link
Contributor Author

I want to separate the Xilinx Vitis HLS compiler flag change into its own PR: #1585
If we can merge that PR, I will remove the change in this PR. Then it should be ready for review.

@philip-paul-mueller
Copy link
Collaborator

LGTM

This reverts commit 4551fe1.

The change was separated into its own PR which has been merged
meanwhile.
@BenWeber42 BenWeber42 marked this pull request as ready for review June 10, 2024 17:08
@BenWeber42 BenWeber42 requested a review from tbennun June 11, 2024 18:50
@BenWeber42 BenWeber42 added this pull request to the merge queue Jun 12, 2024
Merged via the queue into spcl:master with commit 0e3e098 Jun 12, 2024
10 checks passed
@BenWeber42 BenWeber42 deleted the pow-overloads branch June 12, 2024 19:36
alexnick83 pushed a commit that referenced this pull request Jul 13, 2024
This overload solution will forward the argument types separately and
use the same return type.

---------

Co-authored-by: Berke Ates <berke@ates.ch>
Co-authored-by: Berke Ates <beates@student.ethz.ch>
Co-authored-by: Philipp Schaad <schaad.phil@gmail.com>
Co-authored-by: Philip Mueller <philip.mueller@cscs.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants