Linux下的Fortran生成均匀分布的随机数(mkl)

huihui2291 2011-07-04 07:50:12
如题,利用函数库mkl生成均匀分布的随机数。我不才,那个英文的手册是在看不懂?大家给我个例子好吗?谢谢
...全文
446 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
intel_iclifort 2011-08-09
  • 打赏
  • 举报
回复
能详细说一下LDS具体指什么吗?

下面是MKL中 basic random number generator BRNG 的说明,它们基于业界的几种算法:

Basic Generators
VSL provides the following BRNGs, which differ in speed and other properties:

•the 32-bit multiplicative congruential pseudorandom number generator MCG(1132489760, 231 -1) [L'Ecuyer99]

•the 32-bit generalized feedback shift register pseudorandom number generator GFSR(250,103) [Kirkpatrick81]

•the combined multiple recursive pseudorandom number generator MRG-32k3a [L'Ecuyer99a]

•the 59-bit multiplicative congruential pseudorandom number generator MCG(1313, 259) from NAG Numerical Libraries [NAG]

•Wichmann-Hill pseudorandom number generator (a set of 273 basic generators) from NAG Numerical Libraries [NAG]

•Mersenne Twister pseudorandom number generator MT19937 [Matsumoto98] with period length 219937-1 of the produced sequence

•Set of 6024 Mersenne Twister pseudorandom number generators MT2203 [Matsumoto98], [Matsumoto00]. Each of them generates a sequence of period length equal to 22203-1. Parameters of the generators provide mutual independence of the corresponding sequences.

•SIMD-oriented Fast Mersenne Twister pseudorandom number generator SFMT19937 [Saito08] with a period length equal to 219937-1 of the produced sequence.

Besides these pseudorandom number generators, VSL provides two basic quasi-random number generators:

•Sobol quasi-random number generator [Sobol76], [Bratley88], which works in arbitrary dimension. For dimensions greater than 40 the user should supply initialization parameters (initial direction numbers and primitive polynomials or direction numbers) by using vslNewStreamEx function. See additional details on interface for registration of the parameters in the library in VSL Notes.

•Niederreiter quasi-random number generator [Bratley92], which works in arbitrary dimension. For dimensions greater than 318 the user should supply initialization parameters (irreducible polynomials or direction numbers) by using vslNewStreamEx function. See additional details on interface for registration of the parameters in the library in VSL Notes.

See some testing results for the generators in VSL Notes and comparative performance data at http://software.intel.com/sites/products/documentation/hpc/mkl/vsl/vsl_data/vsl_performance_data.htm.

VSL provides means of registration of such user-designed generators through the steps described in Advanced Service Routines.
book_singman 2011-08-02
  • 打赏
  • 举报
回复
mkl生成的随机数是符合LDS标准的么
huihui2291 2011-07-08
  • 打赏
  • 举报
回复
谢谢,我试一下
intel_iclifort 2011-07-07
  • 打赏
  • 举报
回复
MKL自己就提供相应的例子代码啊。 算法很多,每一种都有自己对应的源代码

C 语言在 <安装目录>/mkl/examples/vslc/source
Fortran语言在 <安装目录>/mkl/examples/vslf/source

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧