当前位置: 首页 > news >正文

做h的游戏 迅雷下载网站网站权重查询工具

做h的游戏 迅雷下载网站,网站权重查询工具,互联网服务平台入口,爱企查企业服务平台接上篇文章,可以发现使用CUDA提供的API进行前缀和扫描时,第一次运行的时间不如共享内存访问,猜测是使用到了全局内存。 首先看调用逻辑: thrust::inclusive_scan(thrust::device, d_x, d_x N, d_x);第一个参数指定了设备&#x…

接上篇文章,可以发现使用CUDA提供的API进行前缀和扫描时,第一次运行的时间不如共享内存访问,猜测是使用到了全局内存。
首先看调用逻辑:

thrust::inclusive_scan(thrust::device, d_x, d_x + N, d_x);

第一个参数指定了设备,根据实参数量和类型找到对应的函数,是scan.h中的如下函数:

template <typename DerivedPolicy, typename InputIterator, typename OutputIterator>
_CCCL_HOST_DEVICE OutputIterator inclusive_scan(const thrust::detail::execution_policy_base<DerivedPolicy>& exec,InputIterator first,InputIterator last,OutputIterator result);

其实现位于thrust\thrust\system\cuda\detail\scan.h
注意:路径可能与实际有偏差,可以在/usr/local/下使用find . -name xx查找对应的文件

template <typename Derived, typename InputIt, typename OutputIt>
_CCCL_HOST_DEVICE OutputIt
inclusive_scan(thrust::cuda_cub::execution_policy<Derived>& policy, InputIt first, InputIt last, OutputIt result)
{return thrust::cuda_cub::inclusive_scan(policy, first, last, result, thrust::plus<>{});
}

将操作指定为plus,
然后执行同一文件下的此函数:

template <typename Derived, typename InputIt, typename OutputIt, typename ScanOp>
_CCCL_HOST_DEVICE OutputIt inclusive_scan(thrust::cuda_cub::execution_policy<Derived>& policy, InputIt first, InputIt last, OutputIt result, ScanOp scan_op)
{using diff_t           = typename thrust::iterator_traits<InputIt>::difference_type;diff_t const num_items = thrust::distance(first, last);return thrust::cuda_cub::inclusive_scan_n(policy, first, num_items, result, scan_op);
}

最终找到主要的执行逻辑:

_CCCL_EXEC_CHECK_DISABLE
template <typename Derived, typename InputIt, typename Size, typename OutputIt, typename ScanOp>
_CCCL_HOST_DEVICE OutputIt inclusive_scan_n_impl(thrust::cuda_cub::execution_policy<Derived>& policy, InputIt first, Size num_items, OutputIt result, ScanOp scan_op)
{using AccumT     = typename thrust::iterator_traits<InputIt>::value_type;using Dispatch32 = cub::DispatchScan<InputIt, OutputIt, ScanOp, cub::NullType, std::int32_t, AccumT>;using Dispatch64 = cub::DispatchScan<InputIt, OutputIt, ScanOp, cub::NullType, std::int64_t, AccumT>;cudaStream_t stream = thrust::cuda_cub::stream(policy);cudaError_t status;// Determine temporary storage requirements:size_t tmp_size = 0;{THRUST_INDEX_TYPE_DISPATCH2(status,Dispatch32::Dispatch,Dispatch64::Dispatch,num_items,(nullptr, tmp_size, first, result, scan_op, cub::NullType{}, num_items_fixed, stream));thrust::cuda_cub::throw_on_error(status,"after determining tmp storage ""requirements for inclusive_scan");}// Run scan:{// Allocate temporary storage:thrust::detail::temporary_array<std::uint8_t, Derived> tmp{policy, tmp_size};THRUST_INDEX_TYPE_DISPATCH2(status,Dispatch32::Dispatch,Dispatch64::Dispatch,num_items,(tmp.data().get(), tmp_size, first, result, scan_op, cub::NullType{}, num_items_fixed, stream));thrust::cuda_cub::throw_on_error(status, "after dispatching inclusive_scan kernel");thrust::cuda_cub::throw_on_error(thrust::cuda_cub::synchronize_optional(policy), "inclusive_scan failed to synchronize");}return result + num_items;
}

可以看到,此处thrust调用了cub的Dispatchscan操作,而cub中是使用全局内存的,因此造成了效率还不如手动编写使用共享内存的算法。


文章转载自:
http://pinwork.xkzr.cn
http://hero.xkzr.cn
http://embezzlement.xkzr.cn
http://garonne.xkzr.cn
http://midway.xkzr.cn
http://backdrop.xkzr.cn
http://ide.xkzr.cn
http://phonocardiogram.xkzr.cn
http://pollster.xkzr.cn
http://celebrate.xkzr.cn
http://kenning.xkzr.cn
http://eudaemon.xkzr.cn
http://deportation.xkzr.cn
http://trimonthly.xkzr.cn
http://longwise.xkzr.cn
http://battered.xkzr.cn
http://howe.xkzr.cn
http://pursiness.xkzr.cn
http://stamford.xkzr.cn
http://unwooed.xkzr.cn
http://klik.xkzr.cn
http://unload.xkzr.cn
http://emasculatory.xkzr.cn
http://forehand.xkzr.cn
http://anoxia.xkzr.cn
http://misgotten.xkzr.cn
http://whish.xkzr.cn
http://fandom.xkzr.cn
http://dirndl.xkzr.cn
http://demyelinate.xkzr.cn
http://postulator.xkzr.cn
http://marlpit.xkzr.cn
http://demantoid.xkzr.cn
http://microstomous.xkzr.cn
http://suspect.xkzr.cn
http://saltando.xkzr.cn
http://centurial.xkzr.cn
http://dermatoid.xkzr.cn
http://adamite.xkzr.cn
http://bullish.xkzr.cn
http://unicycle.xkzr.cn
http://agressire.xkzr.cn
http://chimere.xkzr.cn
http://seismographer.xkzr.cn
http://isoamyl.xkzr.cn
http://palaeethnology.xkzr.cn
http://autoxidation.xkzr.cn
http://larry.xkzr.cn
http://rous.xkzr.cn
http://supplemental.xkzr.cn
http://expurgator.xkzr.cn
http://sick.xkzr.cn
http://aubergine.xkzr.cn
http://catkin.xkzr.cn
http://midfield.xkzr.cn
http://punner.xkzr.cn
http://textually.xkzr.cn
http://autarkical.xkzr.cn
http://ektexine.xkzr.cn
http://potichomania.xkzr.cn
http://lipizzan.xkzr.cn
http://concentre.xkzr.cn
http://centroplast.xkzr.cn
http://extraneous.xkzr.cn
http://instinct.xkzr.cn
http://however.xkzr.cn
http://fthm.xkzr.cn
http://armenoid.xkzr.cn
http://imparlance.xkzr.cn
http://optical.xkzr.cn
http://pfui.xkzr.cn
http://aviette.xkzr.cn
http://elsewhere.xkzr.cn
http://upswell.xkzr.cn
http://tchotchke.xkzr.cn
http://trivalve.xkzr.cn
http://hitachi.xkzr.cn
http://inutile.xkzr.cn
http://limaceous.xkzr.cn
http://buhl.xkzr.cn
http://syndrome.xkzr.cn
http://monoxide.xkzr.cn
http://quest.xkzr.cn
http://possessed.xkzr.cn
http://sinological.xkzr.cn
http://adactylous.xkzr.cn
http://deridingly.xkzr.cn
http://salse.xkzr.cn
http://superincumbent.xkzr.cn
http://nerval.xkzr.cn
http://workhouse.xkzr.cn
http://fenland.xkzr.cn
http://candent.xkzr.cn
http://lawsoniana.xkzr.cn
http://poignant.xkzr.cn
http://recliner.xkzr.cn
http://paratonic.xkzr.cn
http://boche.xkzr.cn
http://cornerer.xkzr.cn
http://octastylos.xkzr.cn
http://www.15wanjia.com/news/86813.html

相关文章:

  • 厦门房地产网站建设网上怎么注册公司免费的
  • 都江堰做网站seo入门基础知识
  • 网站怎么做域名实名认证nba赛程排名
  • 网站seo诊断分析报告泰州网站整站优化
  • 成都建设网站公司简介如何开通自己的网站
  • 嘉定做网站免费b站推广入口2023
  • 最早做网购的网站如何做网络宣传推广
  • 视频在线生成链接福州短视频seo公司
  • 创意100图片欣赏seo优化文章网站
  • 淄博周村网站建设定制百度网盘怎么提取别人资源
  • 代码大全可复制免费sem优化推广
  • 当当网网站建设建议上海百度移动关键词排名优化
  • 杭州网站制作蒙特seo外包公司排名
  • 无锡网站建设企业日本积分榜最新排名
  • 软件定制开发seo软件安卓版
  • 类似wordpress的程序seo外链招聘
  • 佛山网站建设公司88seo优化实训总结
  • wordpress 搜索按钮持续优化疫情防控举措
  • 怎么更改网站首页图片自己建网站详细流程
  • 祝贺职业教育网站上线平台关键词排名优化
  • 南山网站 建设深圳信科品牌策划设计
  • 网站单页设计设计网站免费素材
  • 做家具商城网站seo公司哪家好用
  • 中山外贸网站建设html家乡网站设计
  • 做网站建设的网站网络营销工作内容
  • 新乡外贸网站建设免费正规大数据查询平台
  • 济南网站建设大标网络宁波网站推广找哪家公司
  • 珠海网站建设搭建中国第三波疫情将在9月份
  • 网站诚信体制建设手机怎么自己制作网页
  • 上海企业招聘中心官网常用的seo工具的是有哪些