Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2010 使用MKL for rng在VS2010中与Intel TBB进行并行模拟 我需要用C++的Monte-Carlo模拟,在VS2010中用英特尔TBB和MKL安装,只得到1GB内存。_Visual Studio 2010_Random_Tbb_Montecarlo - Fatal编程技术网

Visual studio 2010 使用MKL for rng在VS2010中与Intel TBB进行并行模拟 我需要用C++的Monte-Carlo模拟,在VS2010中用英特尔TBB和MKL安装,只得到1GB内存。

Visual studio 2010 使用MKL for rng在VS2010中与Intel TBB进行并行模拟 我需要用C++的Monte-Carlo模拟,在VS2010中用英特尔TBB和MKL安装,只得到1GB内存。,visual-studio-2010,random,tbb,montecarlo,Visual Studio 2010,Random,Tbb,Montecarlo,让S(t)表示时间t的导数的价格。当前价格为S(0)=100 为简单起见,导数的定义如下(实际导数更复杂): 概率为99%的S(t+1)=S(t)*exp(X),X~N(mu=0,sigma=0.01) 概率为1%时,导数跳到S(t+1)=S(t)*0.4 如果导数在0

让S(t)表示时间t的导数的价格。当前价格为S(0)=100

为简单起见,导数的定义如下(实际导数更复杂): 概率为99%的S(t+1)=S(t)*exp(X),X~N(mu=0,sigma=0.01) 概率为1%时,导数跳到S(t+1)=S(t)*0.4

如果导数在0for j = 1 to #simulation/{ for t = 1 to 250{ generate S(t+1) check if S(t+1) defaults } }
VSLStreamStatePtr stream[10*#processors];
for i = 1 to 10*#processor{
    vslNewStream( &stream[i], VSL_BRNG_MT2203+i, seed );
}

tbb_parallel_for i = 1 to 10*#processors{
    use stream[i]  for random number generation
    generate    10mn / (10*#processor) * 250     random numbers ~ N(0, 0.01) and store them in a vector.
    generate    10mn / (10*#processor) * 250     random numbers ~ Bernoulli(0.01) and store them in a vector.
    generate    10mn / (10*#processor) * 250     random numbers ~ Bernoulli(0.01) and store them in a vector.
    for j = 1 to #simulation/(10*#processors){
        use 
        for t = 1 to 250{
            generate S(t+1) using the vectors filled with random numbers
            check if S(t+1) defaults
        }
    }
}