dot#
2 つ実数ベクトルの dot 積を計算します。
説明
dot ルーチンは、2 つのベクトル間のドット積を実行します。操作はのように定義されています。
\[\mathrm{result} = \sum_{i=1}^n X_i Y_i\]
dot は次の精度をサポートします。
T |
Tres |
|---|---|
|
|
|
|
|
|
|
|
|
|
注
混合精度バージョン (入力は float、結果は double) の場合、dot 積は倍精度で計算されます。
dot (バッファーバージョン)#
構文#
namespace oneapi::mkl::blas::column_major {
void dot(sycl::queue &queue,
std::int64_t n,
sycl::buffer<T,1> &x,
std::int64_t incx,
sycl::buffer<T,1> &y,
std::int64_t incy,
sycl::buffer<Tres,1> &result)
}namespace oneapi::mkl::blas::row_major {
void dot(sycl::queue &queue,
std::int64_t n,
sycl::buffer<T,1> &x,
std::int64_t incx,
sycl::buffer<T,1> &y,
std::int64_t incy,
sycl::buffer<Tres,1> &result)
}入力パラメーター#
出力パラメーター#
- result
結果 (スカラー) が格納されるバッファー。
dot (USM バージョン)#
構文#
namespace oneapi::mkl::blas::column_major {
sycl::event dot(sycl::queue &queue,
std::int64_t n,
const T *x,
std::int64_t incx,
const T *y,
std::int64_t incy,
Tres *result,
const std::vector<sycl::event> &dependencies = {})
}namespace oneapi::mkl::blas::row_major {
sycl::event dot(sycl::queue &queue,
std::int64_t n,
const T *x,
std::int64_t incx,
const T *y,
std::int64_t incy,
Tres *result,
const std::vector<sycl::event> &dependencies = {})
}入力パラメーター#
- queue
ルーチンを実行するキュー。
- n
ベクトル
xとyの要素数。- x
入力ベクトル
xへのポインター。ベクトルxを保持する配列のサイズは、(1 + (n- 1)*abs(incx)) 以上である必要があります。行列ストレージを参照してください。- incx
ベクトル
xのストライド。- y
入力ベクトル
yへのポインター。ベクトルyを保持する配列のサイズは、(1 + (n- 1)*abs(incy)) 以上である必要があります。行列ストレージを参照してください。- incy
ベクトル
yのストライド。- dependencies
計算を開始する前に待機するイベントのリスト (存在する場合)。省略した場合、依存関係はデフォルトでなくなります。
出力パラメーター#
- result
結果 (スカラー) が格納される場所へのポインター。
戻り値#
計算が完了したことを確認するために待機する出力イベント。