Functions | |
| void | cast_double_to_single (int count, const Complex *source, ComplexSingle *destination) |
| void | cast_real_double_to_single (int count, const Real *source, RealSingle *destination) |
| void | cast_real_single_to_double (int count, const RealSingle *source, Real *destination) |
| void | cast_single_to_double (int count, const ComplexSingle *source, Complex *destination) |
|
inline |
Cast an array of double-precision complex values to single-precision.
Element-wise narrowing conversion: each Complex element is converted to ComplexSingle by truncating the mantissa from 52 to 23 bits.
| count | Number of elements to convert. |
| source | Input array of Complex (FP64) values. |
| destination | Output array of ComplexSingle (FP32) values. Must be pre-allocated with at least count elements. |
Definition at line 35 of file precision_cast.hpp.
Referenced by q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint().
|
inline |
Cast an array of double-precision real values to single-precision.
| count | Number of elements to convert. |
| source | Input array of Real (FP64) values. |
| destination | Output array of RealSingle (FP32) values. |
Definition at line 67 of file precision_cast.hpp.
Referenced by q3::GPUPlanewaveHamiltonianApplicator::prepare_kpoint(), and q3::GPUPlanewaveHamiltonianApplicator::update_potential().
|
inline |
Cast an array of single-precision real values to double-precision.
| count | Number of elements to convert. |
| source | Input array of RealSingle (FP32) values. |
| destination | Output array of Real (FP64) values. |
Definition at line 80 of file precision_cast.hpp.
|
inline |
Cast an array of single-precision complex values to double-precision.
Element-wise widening conversion: each ComplexSingle element is converted to Complex by zero-extending the mantissa.
| count | Number of elements to convert. |
| source | Input array of ComplexSingle (FP32) values. |
| destination | Output array of Complex (FP64) values. Must be pre-allocated with at least count elements. |
Definition at line 53 of file precision_cast.hpp.