使用自带的历程 效果确实提升了 5-6 倍 我的显卡是 GTX 1060 5GB 但是 自己写了一个程序 使用GPU加速后效果更慢了 什么情况 求大神解答 感激不尽 我写的代码如下
- dev_update_off()
- query_available_compute_devices (DeviceIdentifier)
- open_compute_device (DeviceIdentifier[0], DeviceHandle)
- init_compute_device (DeviceHandle,'gray_closing_rect')
- activate_compute_device (DeviceHandle)
- *deactivate_compute_device (DeviceHandle)
- read_image (Image2, '2.tiff')
- gen_circle (Circle1, 200, 200, 100.5)
- reduce_domain (Image2, Circle1, ImageReduced)
- Time:=0
- count_seconds (SStart)
- for Index1 := 1 to 5000 by 1
-
- gray_closing_rect (ImageReduced, ImageClosing, 11, 11)
-
- endfor
- count_seconds (SEnd)
- Time := (SEnd - SStart) * 1000
复制代码 |