30#include "dot_common.hpp" 
   32namespace dpnp::extensions::blas
 
   34namespace mkl_blas = oneapi::mkl::blas;
 
   35namespace type_utils = dpctl::tensor::type_utils;
 
   38static sycl::event dotc_impl(sycl::queue &exec_q,
 
   41                             const std::int64_t incx,
 
   43                             const std::int64_t incy,
 
   45                             const std::vector<sycl::event> &depends)
 
   47    type_utils::validate_type_for_device<T>(exec_q);
 
   49    const T *x = 
reinterpret_cast<const T *
>(vectorX);
 
   50    const T *y = 
reinterpret_cast<const T *
>(vectorY);
 
   51    T *res = 
reinterpret_cast<T *
>(result);
 
   53    std::stringstream error_msg;
 
   54    bool is_exception_caught = 
false;
 
   56    sycl::event dotc_event;
 
   59            mkl_blas::column_major::dotc(exec_q,
 
   67    } 
catch (oneapi::mkl::exception 
const &e) {
 
   69            << 
"Unexpected MKL exception caught during dotc() call:\nreason: " 
   71        is_exception_caught = 
true;
 
   72    } 
catch (sycl::exception 
const &e) {
 
   73        error_msg << 
"Unexpected SYCL exception caught during dotc() call:\n" 
   75        is_exception_caught = 
true;
 
   78    if (is_exception_caught) 
 
   80        throw std::runtime_error(error_msg.str());
 
   86template <
typename fnT, 
typename varT>
 
   92            return dotc_impl<varT>;
 
 
A factory to define pairs of supported types for which MKL BLAS library provides support in oneapi::m...