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

做网站的几个必要步骤wordpress配置数据库

做网站的几个必要步骤,wordpress配置数据库,工作微信管理系统,网站建设中可能升级接上篇文章#xff0c;可以发现使用CUDA提供的API进行前缀和扫描时#xff0c;第一次运行的时间不如共享内存访问#xff0c;猜测是使用到了全局内存。 首先看调用逻辑#xff1a; 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_baseDerivedPolicy 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_policyDerived 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_policyDerived policy, InputIt first, InputIt last, OutputIt result, ScanOp scan_op) {using diff_t typename thrust::iterator_traitsInputIt::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_policyDerived policy, InputIt first, Size num_items, OutputIt result, ScanOp scan_op) {using AccumT typename thrust::iterator_traitsInputIt::value_type;using Dispatch32 cub::DispatchScanInputIt, OutputIt, ScanOp, cub::NullType, std::int32_t, AccumT;using Dispatch64 cub::DispatchScanInputIt, 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_arraystd::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://www.hkea.cn/news/14578506/

相关文章:

  • 网站建设成本计划安阳信息网
  • 常州北京网站建设凡科网站建设是免费的吗
  • 站内免费推广有哪些重庆软件外包公司
  • 只做硬件网站aso优化方案
  • 网站建设a2345公司网站做百度广告如何报税
  • 南通市网站建设我的完网页制作基础教程第二版课后题
  • 做网站程序怎么写wordpress 主题函数生成
  • 英国做电商网站有哪些个人网站空间申请
  • 网站色彩心理centos7 wordpress网站
  • 做网站图片格式建筑设计集团
  • 江山做网站视觉传达设计培训机构有哪些
  • 广州网站设计公司排名门户网站建设工作会议
  • 大连网站运营制作方案怎么注册网站挣流量
  • yy怎么一直在模板相关信息圆柱钢模板优势是什么?企业网站建设模板和定制化有什么区别呢?拼命加载中做直播网站多少钱
  • 广州网站开发定制设计建网站买完域名后怎么做
  • 天津百度整站优化服务动漫制作专业有本科吗
  • 网站定制要花多少钱财经网站建设
  • 做网站 哪些公司安庆网站建设公司简
  • 泰安高新区建设局网站做国外网站衣服码数要怎么写
  • 建立什么网站深圳网站维护
  • 建设商务网站过程功能性的网站归档系统
  • 家装网站建设公司泰安人才网首页
  • win7 做网站服务器优化是什么梗
  • 手机网站推荐几个seo怎么优化步骤
  • 网站一般都是用什么软件做的微信小程序开发工具下载哪个版本
  • 开发一个网站 要多久pc端网站开发
  • 软件工程做项目网站深圳建网站公司哪家好
  • 河南网站建设首选公司镇江教育云平台网站建设
  • 华为免费企业网站建设大良网站建设机构
  • 网站前端切图做多个页面网站资源整合与建设