Contents

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) noexcept

Converts a real value, so a call site passes a literal.

BlasScalar(const std::complex< double > &value) noexcept

Converts a complex value.

double real() const noexcept

Returns the real part as given.

double imag() const noexcept

Returns the imaginary part as given.

bool is_real() const noexcept

Returns whether the imaginary part is zero.

bool is_zero() const noexcept

Returns whether both parts are zero.

template <typename T>
T as() const noexcept

Returns the scalar in element type T.

Template parameters

T

sycl::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.