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

[FEA]: Inconsistent template parameter in thrust::complex operators #554

Closed
1 task done
srinivasyadav18 opened this issue Oct 13, 2023 · 3 comments · Fixed by #555
Closed
1 task done

[FEA]: Inconsistent template parameter in thrust::complex operators #554

srinivasyadav18 opened this issue Oct 13, 2023 · 3 comments · Fixed by #555
Assignees
Labels
bug Something isn't working right.

Comments

@srinivasyadav18
Copy link
Contributor

Is this a duplicate?

Area

Thrust

Is your feature request related to a problem? Please describe.

The template parameter in thrust::complex operators w.r.t to the arguments are in consistently used.
For instance -

template <typename T0, typename T1>
__host__ __device__ typename detail::disable_if<
  detail::or_<detail::is_same<T0, T1>, detail::not_<detail::is_arithmetic<T1>>>::value,
  complex<typename detail::promoted_numerical_type<T0, T1>::type>>::type
operator-(const T0 &x, const complex<T1> &y);

The type T1 should actually be T0.

Describe the solution you'd like

Replalce T1 with T0 in detail::is_arithmetic<T0>

template <typename T0, typename T1>
__host__ __device__ typename detail::disable_if<
  detail::or_<detail::is_same<T0, T1>, detail::not_<detail::is_arithmetic<T0>>>::value,
  complex<typename detail::promoted_numerical_type<T0, T1>::type>>::type
operator-(const T0 &x, const complex<T1> &y);

Describe alternatives you've considered

No response

Additional context

No response

@srinivasyadav18 srinivasyadav18 added the feature request New feature or request. label Oct 13, 2023
@github-actions github-actions bot added the needs triage Issues that require the team's attention label Oct 13, 2023
@github-actions
Copy link
Contributor

Hi @srinivasyadav18!

Thanks for submitting this issue - the CCCL team has been notified and we'll get back to you as soon as we can!
In the mean time, feel free to add any relevant information to this issue.

@jrhemstad jrhemstad added bug Something isn't working right. and removed feature request New feature or request. needs triage Issues that require the team's attention labels Oct 13, 2023
@jrhemstad
Copy link
Collaborator

Thanks @srinivasyadav18. Are you still thinking you'd like to take care of this?

@srinivasyadav18
Copy link
Contributor Author

@jrhemstad Yes. I have a PR coming up right-away.

@miscco miscco changed the title [FEA]: [FEA]: Inconsistent template parameter in thrust::complex operators Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants