设置首页收藏本站
开启左侧

为什么使用GPU加速后反而更慢了

[复制链接]
星辰 发表于 2020-11-27 10:32:50 | 显示全部楼层 |阅读模式
使用自带的历程 效果确实提升了 5-6 倍 我的显卡是 GTX 1060 5GB 但是 自己写了一个程序 使用GPU加速后效果更慢了 什么情况 求大神解答 感激不尽  我写的代码如下
  1. dev_update_off()
  2. query_available_compute_devices (DeviceIdentifier)
  3. open_compute_device (DeviceIdentifier[0], DeviceHandle)
  4. init_compute_device (DeviceHandle,'gray_closing_rect')
  5. activate_compute_device (DeviceHandle)

  6. *deactivate_compute_device (DeviceHandle)

  7. read_image (Image2, '2.tiff')


  8. gen_circle (Circle1, 200, 200, 100.5)
  9. reduce_domain (Image2, Circle1, ImageReduced)
  10. Time:=0
  11. count_seconds (SStart)
  12. for Index1 := 1 to 5000 by 1
  13.         
  14.         gray_closing_rect (ImageReduced, ImageClosing, 11, 11)
  15.         
  16. endfor
  17. count_seconds (SEnd)
  18. Time := (SEnd - SStart) * 1000
复制代码
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表