五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(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加速的評論 (共 條)

分享到微博請遵守國家法律
周至县| 萍乡市| 阆中市| 鹤庆县| 临颍县| 视频| 中宁县| 文水县| 临泉县| 焦作市| 招远市| 黎川县| 邳州市| 抚顺县| 建宁县| 涟水县| 乐至县| 石屏县| 新晃| 庆云县| 永登县| 普兰店市| 杭锦旗| 灌南县| 兰坪| 玛多县| 铁力市| 启东市| 通州市| 博白县| 鄱阳县| 株洲县| 普宁市| 外汇| 无棣县| 黎平县| 宿州市| 浦北县| 大渡口区| 六安市| 扬州市|