operator-#

Overloads#

operator-(x, y)#

template<typename T0, typename T1>
complex<::cuda::std::common_type_t<T0, T1>> thrust::operator-(
const complex<T0> &x,
const complex<T1> &y,
)#

Subtracts two complex numbers.

The value types of the two complex types should be compatible and the type of the returned complex is the promoted type of the two arguments.

Parameters:
  • x – The first complex (minuend).

  • y – The second complex (subtrahend).

operator-(x, y)#

template<typename T0, typename T1>
complex<::cuda::std::common_type_t<T0, T1>> thrust::operator-(
const complex<T0> &x,
const T1 &y,
)#

Subtracts a scalar from a complex number.

The value type of the complex should be compatible with the scalar and the type of the returned complex is the promoted type of the two arguments.

Parameters:
  • x – The complex (minuend).

  • y – The scalar (subtrahend).

operator-(x, y)#

template<typename T0, typename T1>
complex<::cuda::std::common_type_t<T0, T1>> thrust::operator-(
const T0 &x,
const complex<T1> &y,
)#

Subtracts a complex number from a scalar.

The value type of the complex should be compatible with the scalar and the type of the returned complex is the promoted type of the two arguments.

Parameters:
  • x – The scalar (minuend).

  • y – The complex (subtrahend).

operator-(y)#

template<typename T>
complex<T> thrust::operator-(
const complex<T> &y,
)#

Unary minus, returns the additive inverse (negation) of its complex argument.

Parameters:

y – The complex argument.