PSCF v1.2
|
Functions | |
template<> | |
Prdc::Cuda::cudaReal | Pscf::real (Prdc::Cuda::cudaComplex const &a) |
Return the real part of a complex number. | |
template<> | |
Prdc::Cuda::cudaReal | Pscf::imag (Prdc::Cuda::cudaComplex const &a) |
Return the imaginary part of a complex number. | |
template<> | |
Prdc::Cuda::cudaReal | Pscf::abs (Prdc::Cuda::cudaComplex const &a) |
Return absolute magnitude of a complex number. | |
template<> | |
Prdc::Cuda::cudaReal | Pscf::absSq (Prdc::Cuda::cudaComplex const &a) |
Return square of absolute magnitude of a complex number. | |
template<> | |
void | Pscf::conj (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a) |
Compute complex conjugate, z = a^*. | |
template<> | |
void | Pscf::conj (Prdc::Cuda::cudaComplex &a) |
In-place complex conjugation of a complex number, a = a^* . | |
template<> | |
void | Pscf::assign (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaReal const &a, Prdc::Cuda::cudaReal const &b) |
Create a complex number from real and imaginary parts, z = a + ib. | |
template<> | |
void | Pscf::assign (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaReal const &a) |
Assign a real input to a complex variable. | |
template<> | |
void | Pscf::assign (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a) |
Assign a complex input to a complex variable. | |
template<> | |
void | Pscf::assign (Prdc::Cuda::cudaComplex &z, std::complex< Prdc::Cuda::cudaReal > const &a) |
Assign a std::complex input to a complex variable. | |
template<> | |
void | Pscf::assign (std::complex< Prdc::Cuda::cudaReal > &z, Prdc::Cuda::cudaComplex const &a) |
Assign a complex input to a std::complex variable. | |
template<> | |
void | Pscf::add (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaComplex const &b) |
Addition of two complex numbers, z = a + b. | |
template<> | |
void | Pscf::add (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaReal const &b) |
Addition of a complex and real number, z = a + b. | |
template<> | |
void | Pscf::addEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaComplex const &b) |
In place addition of complex numbers, a += b. | |
template<> | |
void | Pscf::addEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaReal const &b) |
In place addition of a complex and real number, a += b. | |
template<> | |
void | Pscf::sub (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaComplex const &b) |
Subtraction of two complex numbers, z = a - b. | |
template<> | |
void | Pscf::sub (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaReal const &b) |
Subtraction of a real number from a complex number, z = a - b. | |
template<> | |
void | Pscf::subEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaComplex const &b) |
In place subtraction of two complex numbers, a -= b. | |
template<> | |
void | Pscf::subEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaReal const &b) |
In place subtraction of real number from a complex number, a -= b. | |
template<> | |
Prdc::Cuda::cudaReal | Pscf::absSqDiff (Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaComplex const &b) |
Return square of the absolute magnitude of a complex difference. | |
template<> | |
void | Pscf::mul (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaComplex const &b) |
Multiplication of two complex numbers, z = a * b. | |
template<> | |
void | Pscf::mul (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaReal const &b) |
Multiplication of complex and real numbers, z = a * b. | |
template<> | |
void | Pscf::mulEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaComplex const &b) |
In place multiplication of two complex number, a *= b. | |
template<> | |
void | Pscf::mulEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaReal const &b) |
In place multiplication of a complex and real number, a *= b. | |
template<> | |
void | Pscf::square (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a) |
Compute complex square of a complex number, z = a * a. | |
template<> | |
void | Pscf::div (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaComplex const &b) |
Division of two complex numbers, z = a / b . | |
template<> | |
void | Pscf::div (Prdc::Cuda::cudaComplex &z, Prdc::Cuda::cudaComplex const &a, Prdc::Cuda::cudaReal const &b) |
Division of a complex number by a real number, z = a / b . | |
template<> | |
void | Pscf::divEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaComplex const &b) |
In place division of two complex number, a /= b. | |
template<> | |
void | Pscf::divEq (Prdc::Cuda::cudaComplex &a, Prdc::Cuda::cudaReal const &b) |
In place division of a complex number by a real number, a /= b. | |
Typdedefs and functions for complex arithmetic using the complex type used in Cuda GPU code that interfaces with cufft.
|
inline |
Return the real part of a complex number.
a | complex argument (input) |
Definition at line 33 of file prdc/cuda/complex.h.
|
inline |
Return the imaginary part of a complex number.
a | complex argument (input) |
Definition at line 44 of file prdc/cuda/complex.h.
|
inline |
Return absolute magnitude of a complex number.
a | complex argument (in) |
Definition at line 57 of file prdc/cuda/complex.h.
|
inline |
Return square of absolute magnitude of a complex number.
a | complex argument (in) |
Definition at line 68 of file prdc/cuda/complex.h.
|
inline |
Compute complex conjugate, z = a^*.
z | complex conjugate of argument (out) |
a | complex argument (in) |
Definition at line 82 of file prdc/cuda/complex.h.
|
inline |
In-place complex conjugation of a complex number, a = a^* .
a | argument (in) and complex conjugate (out) |
Definition at line 96 of file prdc/cuda/complex.h.
|
inline |
Create a complex number from real and imaginary parts, z = a + ib.
z | complex (out) |
a | real part (in) |
b | imaginary part (in) |
Definition at line 114 of file prdc/cuda/complex.h.
|
inline |
Assign a real input to a complex variable.
z | complex (out) |
a | real (in) |
Definition at line 130 of file prdc/cuda/complex.h.
|
inline |
Assign a complex input to a complex variable.
z | complex (out) |
a | complex (in) |
Definition at line 145 of file prdc/cuda/complex.h.
|
inline |
Assign a std::complex input to a complex variable.
z | complex (out) |
a | std::complex (in) |
Definition at line 160 of file prdc/cuda/complex.h.
|
inline |
Assign a complex input to a std::complex variable.
z | std::complex (out) |
a | complex (in) |
Definition at line 176 of file prdc/cuda/complex.h.
|
inline |
Addition of two complex numbers, z = a + b.
z | complex sum (out) |
a | complex summand (in) |
b | complex summand (in) |
Definition at line 192 of file prdc/cuda/complex.h.
|
inline |
Addition of a complex and real number, z = a + b.
z | complex sum (out) |
a | complex summand (in) |
b | real summand (in) |
Definition at line 209 of file prdc/cuda/complex.h.
|
inline |
In place addition of complex numbers, a += b.
a | complex summand (in) and sum (out) |
b | complex summand (in) |
Definition at line 225 of file prdc/cuda/complex.h.
|
inline |
In place addition of a complex and real number, a += b.
a | complex summand (in) and sum (out) |
b | real summand (in) |
Definition at line 240 of file prdc/cuda/complex.h.
|
inline |
Subtraction of two complex numbers, z = a - b.
z | complex difference (out) |
a | complex 1st argument (in) |
b | complex 2nd argument (in) |
Definition at line 257 of file prdc/cuda/complex.h.
|
inline |
Subtraction of a real number from a complex number, z = a - b.
z | complex difference (out) |
a | complex 1st argument (in) |
b | real 2nd argument (in) |
Definition at line 274 of file prdc/cuda/complex.h.
|
inline |
In place subtraction of two complex numbers, a -= b.
a | complex argument (in) and difference (out) |
b | complex argument (in) |
Definition at line 290 of file prdc/cuda/complex.h.
|
inline |
In place subtraction of real number from a complex number, a -= b.
a | complex argument (in) and difference (out) |
b | real argument (in) |
Definition at line 305 of file prdc/cuda/complex.h.
|
inline |
Return square of the absolute magnitude of a complex difference.
This function returns |a-b|^2 for complex a and b.
a | complex 1st argument (in) |
b | complex 2nd argument (in) |
Definition at line 321 of file prdc/cuda/complex.h.
References Pscf::absSq(), and Pscf::sub().
|
inline |
Multiplication of two complex numbers, z = a * b.
z | complex product (out) |
a | complex factor (in) |
b | complex factor (in) |
Definition at line 341 of file prdc/cuda/complex.h.
|
inline |
Multiplication of complex and real numbers, z = a * b.
z | complex product (out) |
a | complex factor (in) |
b | real factor (in) |
Definition at line 358 of file prdc/cuda/complex.h.
|
inline |
In place multiplication of two complex number, a *= b.
a | complex factor (in) and product (out) |
b | complex factor (in) |
Definition at line 374 of file prdc/cuda/complex.h.
|
inline |
In place multiplication of a complex and real number, a *= b.
a | complex factor (in) and product (out) |
b | real factor (in) |
Definition at line 391 of file prdc/cuda/complex.h.
|
inline |
Compute complex square of a complex number, z = a * a.
z | complex product (out) |
a | complex factor (in) |
Definition at line 406 of file prdc/cuda/complex.h.
|
inline |
Division of two complex numbers, z = a / b .
z | complex ratio (out) |
a | complex numerator (in) |
b | complex denominator (in) |
Definition at line 424 of file prdc/cuda/complex.h.
|
inline |
Division of a complex number by a real number, z = a / b .
z | complex ratio (out) |
a | complex numerator (in) |
b | real denominator (in) |
Definition at line 442 of file prdc/cuda/complex.h.
|
inline |
In place division of two complex number, a /= b.
a | complex numerator (in) and ratio (out) |
b | complex denominator (in) |
Definition at line 458 of file prdc/cuda/complex.h.
|
inline |
In place division of a complex number by a real number, a /= b.
a | complex numerator (in) and ratio (out) |
b | real denominator (in) |
Definition at line 475 of file prdc/cuda/complex.h.