国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

MATLAB繪制曼德勃羅Mandelbrot集,并利用GPU加速

2021-12-07 23:23 作者:磁懸浮青蛙呱呱呱  | 我要投稿

???? 本文主要參考MATLAB幫助文件,Illustrating Three approaches to GPU Computing: The Mandelbrot Set,也可在網(wǎng)頁https://ww2.mathworks.cn/help/parallel-computing/illustrating-three-approaches-to-gpu-computing-the-mandelbrot-set.html上看到同樣的內(nèi)容,代碼如下:

????? 本機配置:CPU AMD Ryzen5 3600,GPU:RTX 3060,在maxIterations = 500;gridSize = 2000;xlim = [-1.5, 0.6];ylim = [ -1.2, 1.2];的條件下,生成的圖片如下,計算耗時分別是9.89s,2.448s(4倍),0.232s(42.7倍),0.068s(144.6倍),

????? 可以用colormap函數(shù)改顏色,可選參數(shù)有parula,jet,hsv,hot,cool,spring,summer,
autumn,winter,gray,bone,copper,pink,lines,colorcube,prism,flag,white

count = log(count); 取對數(shù)運算不是必須,但能提高圖像對比度,不取對數(shù)的效果如下,可以看出周圍小分支的清晰度下降

pctdemo_processMandelbrotElement.cu、.m、.ptx···在MATLAB安裝路徑下,內(nèi)容分別如下:

????????使用GPU時容易遇到如下報錯:The CUDA driver must recompile the GPU libraries because your device is more recent than the libraries.Recompiling can take several minutes. Learn more.
????????來自MATLAB官方網(wǎng)站的解答(https://ww2.mathworks.cn/matlabcentral/answers/437756-how-can-i-recompile-the-gpu-libraries):
This is a known issue with CUDA 9.1 and the new Turing generation of GPUs. You don't need to do anything except ignore the initial warning or error.
There are multiple issues. The warning about recompiling of libraries is spurious and not relevant. The error from cublas is one-time only. And there is an equivalent error in cuDNN. A permanent workaround is to put the following into your startup.m file:

????? ?一共有兩個startup.m文件,分別是
C:\Program Files\Polyspace\R2019a\toolbox\fixedpoint\fixedpointtool\+fxptui\Startup.m,
C:\Program Files\Polyspace\R2019a\toolbox\matlab\external\interfaces\python\+python\+internal\startup.m,
????? 我在這兩個文件中都加了warning off parallel:gpu:device:DeviceLibsNeedsRecompiling ……,然而沒用,警告還是會彈出。


????? 用其它形式的迭代公式生成的圖形。



MATLAB繪制曼德勃羅Mandelbrot集,并利用GPU加速的評論 (共 條)

分享到微博請遵守國家法律
环江| 达州市| 霸州市| 呼和浩特市| 宝鸡市| 台南县| 焉耆| 宾阳县| 革吉县| 泰来县| 永济市| 湘西| 萨迦县| 古丈县| 新干县| 福州市| 五原县| 会泽县| 安陆市| 盖州市| 措美县| 长垣县| 常州市| 潞西市| 蓬莱市| 伊通| 德惠市| 临夏县| 郓城县| 朝阳区| 沙洋县| 开江县| 子长县| 肥西县| 营山县| 浑源县| 微山县| 小金县| 元江| 德化县| 湖南省|