|
PSCF v1.4.0
|
Overloaded functions and function templates for arithmetic operations using built-in real types and/or C++ standard library complex types. More...
Functions | |
| void | Pscf::assign (double &z, double const &a) |
| Assign a double value. | |
| void | Pscf::assign (float &z, float const &a) |
| Assign a real float value. | |
| template<typename RT> | |
| void | Pscf::assign (std::complex< RT > &z, std::complex< RT > const &a) |
| Assign one std::complex<RT> variable to another. | |
| template<typename RT> | |
| void | Pscf::assign (std::complex< RT > &z, RT const &a, RT const &b) |
| Create std::complex<RT> from real and imaginary parts, z = a + ib. | |
| template<typename RT> | |
| void | Pscf::assign (std::complex< RT > &z, RT const &a) |
| Assign a real input to a std::complex variable. | |
| void | Pscf::add (double &z, double const &a, double const &b) |
| Addition of two double precision numbers, z = a + b. | |
| void | Pscf::add (float &z, float const &a, float const &b) |
| Addition of two real float numbers, z = a + b. | |
| template<typename RT> | |
| void | Pscf::add (std::complex< RT > &z, std::complex< RT > const &a, std::complex< RT > const &b) |
| Addition of two std::complex variables, z = a + b. | |
| template<typename RT> | |
| void | Pscf::add (std::complex< RT > &z, std::complex< RT > const &a, RT const &b) |
| Addition of a std::complex and real number, z = a + b. | |
| void | Pscf::addEq (double &a, double const &b) |
| In place addition a += b (double). | |
| void | Pscf::addEq (float &a, float const &b) |
| In place addition a += b (double). | |
| template<typename RT> | |
| void | Pscf::addEq (std::complex< RT > &a, std::complex< RT > const &b) |
| In place addition a += b (std::complex<RT>) | |
| template<typename RT> | |
| void | Pscf::addEq (std::complex< RT > &a, RT const &b) |
| In place addition of std::complex and real numbers, a += b. | |
| void | Pscf::sub (double &z, double const &a, double const &b) |
| Subtraction of double precision numbers, z = a - b. | |
| void | Pscf::sub (float &z, float const &a, float const &b) |
| Subtraction z = a - b (real float). | |
| template<typename RT> | |
| void | Pscf::sub (std::complex< RT > &z, std::complex< RT > const &a, std::complex< RT > const &b) |
| Subtraction z = a - b (std::complex<RT>) | |
| template<typename RT> | |
| void | Pscf::sub (std::complex< RT > &z, std::complex< RT > const &a, RT const &b) |
| Subtraction of real from complex, z = a - b. | |
| void | Pscf::subEq (double &a, double const &b) |
| In place subtraction a -= b (double). | |
| void | Pscf::subEq (float &a, float const &b) |
| In place subtraction, a -= b (float). | |
| template<typename RT> | |
| void | Pscf::subEq (std::complex< RT > &a, std::complex< RT > const &b) |
| In place subtraction a -= b (std::complex<RT>). | |
| template<typename RT> | |
| void | Pscf::subEq (std::complex< RT > &a, RT const &b) |
| In place subtraction of real from std::complex, a -= b. | |
| void | Pscf::mul (double &z, double const &a, double const &b) |
| Multiplication of double real numbers, z = a * b. | |
| void | Pscf::mul (float &z, float const &a, float const &b) |
| Multiplication z = a * b (float). | |
| template<typename RT> | |
| void | Pscf::mul (std::complex< RT > &z, std::complex< RT > const &a, std::complex< RT > const &b) |
| Multiplication z = a * b (std::complex). | |
| template<typename RT> | |
| void | Pscf::mul (std::complex< RT > &z, std::complex< RT > const &a, RT const &b) |
| Multiplication of std::complex and real, z = a * b. | |
| void | Pscf::mulEq (double &a, double const &b) |
| In place multiplication a *= b (double). | |
| void | Pscf::mulEq (float &a, float const &b) |
| In place multiplication a *= b (float). | |
| template<typename RT> | |
| void | Pscf::square (std::complex< RT > &z, std::complex< RT > const &a) |
| Compute complex square of a std::complex, z = a * a. | |
| void | Pscf::div (double &z, double const &a, double const &b) |
| Division z = a / b (double). | |
| void | Pscf::div (float &z, float const &a, float const &b) |
| Division z = a / b (float). | |
| template<typename RT> | |
| void | Pscf::div (std::complex< RT > &z, std::complex< RT > const &a, std::complex< RT > const &b) |
| Division z = a / b (std::complex) | |
| template<typename RT> | |
| void | Pscf::div (std::complex< RT > &z, std::complex< RT > const &a, RT const &b) |
| Division of a std::complex number by real, z = a / b . | |
| void | Pscf::divEq (double &a, double const &b) |
| In place division a /= b (double). | |
| void | Pscf::divEq (float &a, float const &b) |
| In place division a /= b (float). | |
| template<typename RT> | |
| void | Pscf::divEq (std::complex< RT > &a, std::complex< RT > const &b) |
| In place division a /= b (std::complex). | |
| template<typename RT> | |
| void | Pscf::divEq (std::complex< RT > &a, RT const &b) |
| In place division of std::complex number by real, a /= b. | |
| void | Pscf::inverse (double &z, double const &a) |
| Inverse, z = 1/a (double). | |
| void | Pscf::inverse (float &z, float const &a) |
| Inverse, z = 1 / a (float). | |
| void | Pscf::assignExp (double &z, double const &a) |
| Exponentiation, z = exp(a) (double). | |
| void | Pscf::assignExp (float &z, float const &a) |
| Exponent, z = exp(a) (float). | |
| void | Pscf::assignLog (double &z, double const &a) |
| Logarithm, z = exp(a) (double). | |
| void | Pscf::assignLog (float &z, float const &a) |
| Logarithm, z = exp(a) (float). | |
Overloaded functions and function templates for arithmetic operations using built-in real types and/or C++ standard library complex types.
Corresponding functions that use complex types used by the FFTW and cufft libraries are defined in the files pscf/cpu/complex.h and pscf/cuda/complex.h
Convention: Functions for which the result or output could be a complex number provide this as a modified value of the first parameter of the function, which must be passed as a non-const reference. Functions for which the output is always real (such as an absolute value function) instead provide this as the function return value. This convention creates interfaces that allow the use of data types to represent complex number for which no assignment operator is defined, which cannot be returned as function return values.
|
inline |
Assign a double value.
| z | value (out) |
| a | value (in) |
Definition at line 48 of file arithmetic.h.
|
inline |
Assign a real float value.
| z | value (out) |
| a | value (in) |
Definition at line 60 of file arithmetic.h.
|
inline |
Assign one std::complex<RT> variable to another.
| z | value (out) |
| a | value (in) |
Definition at line 72 of file arithmetic.h.
|
inline |
Create std::complex<RT> from real and imaginary parts, z = a + ib.
| z | complex (out) |
| a | real part (in) |
| b | imaginary part (in) |
Definition at line 85 of file arithmetic.h.
|
inline |
Assign a real input to a std::complex variable.
| z | complex (out) |
| a | real (in) |
Definition at line 97 of file arithmetic.h.
|
inline |
Addition of two double precision numbers, z = a + b.
| z | sum (out) |
| a | summand (in) |
| b | summand (in) |
Definition at line 112 of file arithmetic.h.
|
inline |
Addition of two real float numbers, z = a + b.
| z | sum (out) |
| a | summand (in) |
| b | summand (in) |
Definition at line 125 of file arithmetic.h.
|
inline |
Addition of two std::complex variables, z = a + b.
| z | sum (out) |
| a | summand (in) |
| b | summand (in) |
Definition at line 138 of file arithmetic.h.
|
inline |
Addition of a std::complex and real number, z = a + b.
| z | complex sum (out) |
| a | complex summand (in) |
| b | real summand (in) |
Definition at line 152 of file arithmetic.h.
|
inline |
In place addition a += b (double).
| a | summand (in) and sum (out) |
| b | summand (in) |
Definition at line 165 of file arithmetic.h.
|
inline |
In place addition a += b (double).
| a | summand (in) and sum (out) |
| b | summand (in) |
Definition at line 177 of file arithmetic.h.
|
inline |
In place addition a += b (std::complex<RT>)
| a | summand (in) and sum (out) |
| b | summand (in) |
Definition at line 189 of file arithmetic.h.
|
inline |
In place addition of std::complex and real numbers, a += b.
| a | summand (in) and sum (out) |
| b | summand (in) |
Definition at line 201 of file arithmetic.h.
|
inline |
Subtraction of double precision numbers, z = a - b.
| z | difference (out) |
| a | 1st argument (in) |
| b | 2nd argument (in) |
Definition at line 216 of file arithmetic.h.
|
inline |
Subtraction z = a - b (real float).
| z | difference (out) |
| a | 1st argument (in) |
| b | 2nd argument (in) |
Definition at line 229 of file arithmetic.h.
|
inline |
Subtraction z = a - b (std::complex<RT>)
| z | difference (out) |
| a | 1st argument (in) |
| b | 2nd argument (in) |
Definition at line 242 of file arithmetic.h.
|
inline |
Subtraction of real from complex, z = a - b.
| z | complex difference (out) |
| a | complex 1st argument (in) |
| b | real 2nd argument (in) |
Definition at line 256 of file arithmetic.h.
|
inline |
In place subtraction a -= b (double).
| a | argument (in) and difference (out) |
| b | argument (in) |
Definition at line 269 of file arithmetic.h.
|
inline |
In place subtraction, a -= b (float).
| a | argument (in) and difference (out) |
| b | argument (in) |
Definition at line 281 of file arithmetic.h.
|
inline |
In place subtraction a -= b (std::complex<RT>).
| a | argument (in) and difference (out) |
| b | argument (in) |
Definition at line 293 of file arithmetic.h.
|
inline |
In place subtraction of real from std::complex, a -= b.
| a | argument (in) and difference (out) |
| b | argument (in) |
Definition at line 305 of file arithmetic.h.
|
inline |
Multiplication of double real numbers, z = a * b.
| z | product (out) |
| a | factor (in) |
| b | factor (in) |
Definition at line 320 of file arithmetic.h.
|
inline |
Multiplication z = a * b (float).
| z | product (out) |
| a | factor (in) |
| b | factor (in) |
Definition at line 333 of file arithmetic.h.
|
inline |
Multiplication z = a * b (std::complex).
| z | product (out) |
| a | factor (in) |
| b | factor (in) |
Definition at line 346 of file arithmetic.h.
|
inline |
Multiplication of std::complex and real, z = a * b.
| z | complex product (out) |
| a | complex factor (in) |
| b | real factor (in) |
Definition at line 360 of file arithmetic.h.
|
inline |
In place multiplication a *= b (double).
| a | factor (in) and product (out) |
| b | factor (in) |
Definition at line 374 of file arithmetic.h.
|
inline |
In place multiplication a *= b (float).
| a | factor (in) and product (out) |
| b | factor (in) |
Definition at line 386 of file arithmetic.h.
|
inline |
Compute complex square of a std::complex, z = a * a.
| z | complex product (out) |
| a | complex factor (in) |
Definition at line 398 of file arithmetic.h.
|
inline |
Division z = a / b (double).
| z | ratio (out) |
| a | numerator (in) |
| b | denominator (in) |
Definition at line 413 of file arithmetic.h.
|
inline |
Division z = a / b (float).
| z | ratio (out) |
| a | numerator (in) |
| b | denominator (in) |
Definition at line 426 of file arithmetic.h.
|
inline |
Division z = a / b (std::complex)
| z | ratio (out) |
| a | numerator (in) |
| b | denominator (in) |
Definition at line 439 of file arithmetic.h.
|
inline |
Division of a std::complex number by real, z = a / b .
| z | complex ratio (out) |
| a | complex numerator (in) |
| b | real denominator (in) |
Definition at line 453 of file arithmetic.h.
|
inline |
In place division a /= b (double).
| a | complex numerator (in) and ratio (out) |
| b | complex denominator (in) |
Definition at line 466 of file arithmetic.h.
|
inline |
In place division a /= b (float).
| a | complex numerator (in) and ratio (out) |
| b | complex denominator (in) |
Definition at line 478 of file arithmetic.h.
|
inline |
In place division a /= b (std::complex).
| a | complex numerator (in) and ratio (out) |
| b | complex denominator (in) |
Definition at line 490 of file arithmetic.h.
|
inline |
In place division of std::complex number by real, a /= b.
| a | complex numerator (in) and ratio (out) |
| b | real denominator (in) |
Definition at line 502 of file arithmetic.h.
|
inline |
Inverse, z = 1/a (double).
| z | inverse (out) |
| a | argument (in) |
Definition at line 516 of file arithmetic.h.
|
inline |
Inverse, z = 1 / a (float).
| z | inverse (out) |
| a | argument (in) |
Definition at line 528 of file arithmetic.h.
|
inline |
Exponentiation, z = exp(a) (double).
| z | exponent (out) |
| a | argument (in) |
Definition at line 542 of file arithmetic.h.
|
inline |
Exponent, z = exp(a) (float).
| z | exponent (out) |
| a | argument (in) |
Definition at line 554 of file arithmetic.h.
|
inline |
Logarithm, z = exp(a) (double).
| z | logarithm (out) |
| a | argument (in) |
Definition at line 568 of file arithmetic.h.
|
inline |
Logarithm, z = exp(a) (float).
| z | logarithm (out) |
| a | argument (in) |
Definition at line 580 of file arithmetic.h.