Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Undefined RNG method in MKL VSL

Carly
初学者
2,481 次查看

Hello,

I have a C++ program that produces random numbers from various distributions. I am using multiple generators: vdRngGaussian, vdRngUniform, etc. The one generator that throws an error upon compilation is the vdRngChiSquare generator.

Here is the error:

main.cpp(31): error: identifier "VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA" is undefined
vdRngChiSquare(VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA, stream, 1, &r, nu);

main.cpp(31): error: identifier "vdRngChiSquare" is undefined
vdRngChiSquare(VSL_RNG_METHOD_CHISQUARE_CHI2GAMMA, stream, 1, &r, nu);

 

I don't see a syntax error in my call to the generator. Any ideas what might be going on here?

Thanks in advance.

0 项奖励
4 回复数
mecej4
名誉分销商 III
2,470 次查看

The symbolic constant in question is declared in mkl_vsl_defines.h . Did you #include this file, either directly or through one of the other mkl_vsl*.h files?

0 项奖励
Gennady_F_Intel
主持人
2,458 次查看

#include "mkl_vsl.h"

You may check the vdrngchisquare.c example ( mklroot\vslc\source\ ) .

0 项奖励
Carly
初学者
2,444 次查看

Thank you both for your responses. It turns out I am using an outdated version of MKL, and that is why I do not have access to the Chi Square RNG.

0 项奖励
Gennady_F_Intel
主持人
2,442 次查看

You are welcome to contact us with any further questions. 


0 项奖励
回复