You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
Hi, I find thrust::operator/ (const complex< T0 > & x, const T1 & y) can not handle the case when T0 is float and T1 is int. I have to cast T1 to float explicitly which is not intuitive.
I am working on speeding up my python code with cupy elementwise kernel. I have no experience on c++ before so I cannot provide an example. Sorry about that.
The text was updated successfully, but these errors were encountered:
The operator/ is only defined for a complex<T> when dividing by a T scalar:
template< class T >
constexpr std::complex<T> operator/(const std::complex<T>& lhs, const T& rhs );
If you're wondering why the conversion from int to float doesn't happen implicitly, it's because lhs is in a "deduced context", which means the template type T is deduced from the type of rhs and lhs and the T needs to match between the two.
Hi, I find
thrust::operator/ (const complex< T0 > & x, const T1 & y)
can not handle the case whenT0
isfloat
andT1
isint
. I have to castT1
tofloat
explicitly which is not intuitive.I am working on speeding up my python code with cupy elementwise kernel. I have no experience on c++ before so I cannot provide an example. Sorry about that.
The text was updated successfully, but these errors were encountered: