class
SushiBLAS::BlasScalar
Holds one scalar argument of a BLAS call as a complex double, on the host.
- Declared in
include/SushiBLAS/engine/blas/scalar.hpp
See also
include/SushiBLAS/engine/blas/README.md
Public member functions
BlasScalar(double value) noexceptConverts a real value, so a call site passes a literal.
BlasScalar(const std::complex< double > &value) noexceptConverts a complex value.
double real() const noexceptReturns the real part as given.
double imag() const noexceptReturns the imaginary part as given.
bool is_real() const noexceptReturns whether the imaginary part is zero.
bool is_zero() const noexceptReturns whether both parts are zero.
template <typename T>
T as() const noexceptReturns the scalar in element type T.
Template parameters
Tsycl::half, float, double, std::complex<float> or std::complex<double>.
Precondition
is_real() holds when T is a real type.
Returns
The value rounded once to T; HALF is rounded to binary32 first.

