nrm2#

ベクトルのユークリッド・ノルムを計算します。

説明

nrm2 ルーチンは、ベクトルのユークリッド・ノルムを計算します。操作はのように定義されています。

\[result = ||x||\]

説明:

  • xn 要素のベクトルです

nrm2 は次の精度をサポートします。

T

Tres

sycl::half

sycl::half

oneapi::mkl::bfloat16

oneapi::mkl::bfloat16

float

float

double

double

std::complex<float>

float

std::complex<double>

double

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 のユークリッド・ノルムが格納されている場所へのポインター。

戻り値#

計算が完了したことを確認するために待機する出力イベント。