Skip to content

Commit 809d53f

Browse files
Added exception raise in multivariate_normal (#505)
1 parent d4f31e6 commit 809d53f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dpnp/backend/kernels/dpnp_krnl_random.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ void dpnp_rng_multivariate_normal_c(void* result,
389389
{
390390
int errcode = vdRngGaussianMV(VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2, get_rng_stream(),
391391
size1, result1, dimen, VSL_MATRIX_STORAGE_FULL, mean_vector, cov_vector );
392+
if (errcode != VSL_STATUS_OK)
393+
{
394+
throw std::runtime_error("DPNP RNG Error: dpnp_rng_multivariate_normal_c() failed.");
395+
}
392396
}
393397
}
394398

0 commit comments

Comments
 (0)