19#ifndef NDA_HAVE_DEVICE
46 template <MemoryVector X, MemoryVector Y>
48 auto dot(X
const &x, Y
const &y) {
50 EXPECTS(x.size() == y.size());
54#if defined(NDA_HAVE_DEVICE)
55 return device::dot(x.size(), x.data(), x.indexmap().strides()[0], y.data(), y.indexmap().strides()[0]);
61 return f77::dot(x.size(), x.data(), x.indexmap().strides()[0], y.data(), y.indexmap().strides()[0]);
81 template <MemoryVector X, MemoryVector Y>
83 auto dotc(X
const &x, Y
const &y) {
85 EXPECTS(x.size() == y.size());
91#if defined(NDA_HAVE_DEVICE)
92 return device::dotc(x.size(), x.data(), x.indexmap().strides()[0], y.data(), y.indexmap().strides()[0]);
98 return f77::dotc(x.size(), x.data(), x.indexmap().strides()[0], y.data(), y.indexmap().strides()[0]);
Provides definitions and type traits involving the different memory address spaces supported by nda.
Provides a C++ interface for various BLAS routines.
Provides concepts for the nda library.
Provides GPU and non-GPU specific functionality.
constexpr bool have_same_value_type_v
Constexpr variable that is true if all types in As have the same value type as A0.
std::decay_t< decltype(get_first_element(std::declval< A const >()))> get_value_t
Get the value type of an array/view or a scalar type.
auto dot(X const &x, Y const &y)
Interface to the BLAS dot and dotu routine.
auto dotc(X const &x, Y const &y)
Interface to the BLAS dotc routine.
static constexpr bool have_compatible_addr_space
Constexpr variable that is true if all given types have compatible address spaces.
static constexpr bool have_device_compatible_addr_space
Constexpr variable that is true if all given types have an address space compatible with Device.
void compile_error_no_gpu()
Trigger a compilation error in case GPU specific functionality is used without configuring the projec...
constexpr bool is_complex_v
Constexpr variable that is true if type T is a std::complex type.
constexpr bool is_blas_lapack_v
Alias for nda::is_double_or_complex_v.
Macros used in the nda library.
Provides type traits for the nda library.