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