中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

做h的游戲 迅雷下載網(wǎng)站線上推廣100種方式

做h的游戲 迅雷下載網(wǎng)站,線上推廣100種方式,酒類網(wǎng)站建,用自己的名字做網(wǎng)站域名接上篇文章,可以發(fā)現(xiàn)使用CUDA提供的API進行前綴和掃描時,第一次運行的時間不如共享內(nèi)存訪問,猜測是使用到了全局內(nèi)存。 首先看調(diào)用邏輯: thrust::inclusive_scan(thrust::device, d_x, d_x N, d_x);第一個參數(shù)指定了設(shè)備&#x…

接上篇文章,可以發(fā)現(xiàn)使用CUDA提供的API進行前綴和掃描時,第一次運行的時間不如共享內(nèi)存訪問,猜測是使用到了全局內(nèi)存。
首先看調(diào)用邏輯:

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

第一個參數(shù)指定了設(shè)備,根據(jù)實參數(shù)量和類型找到對應(yīng)的函數(shù),是scan.h中的如下函數(shù):

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);

其實現(xiàn)位于thrust\thrust\system\cuda\detail\scan.h
注意:路徑可能與實際有偏差,可以在/usr/local/下使用find . -name xx查找對應(yīng)的文件

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,
然后執(zhí)行同一文件下的此函數(shù):

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);
}

最終找到主要的執(zhí)行邏輯:

_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調(diào)用了cub的Dispatchscan操作,而cub中是使用全局內(nèi)存的,因此造成了效率還不如手動編寫使用共享內(nèi)存的算法。

http://m.risenshineclean.com/news/61325.html

相關(guān)文章:

  • 衡水網(wǎng)頁網(wǎng)站建設(shè)企業(yè)網(wǎng)絡(luò)營銷策劃
  • 寧陵做網(wǎng)站雅虎搜索引擎中文版
  • 想學(xué)網(wǎng)站制作網(wǎng)絡(luò)軟件開發(fā)
  • php網(wǎng)站開發(fā)需要學(xué)什么怎么宣傳自己新開的店鋪
  • 網(wǎng)站開發(fā)績效考核站長工具友鏈檢測
  • 泰安的網(wǎng)站建設(shè)公司哪家好正規(guī)推廣平臺
  • 購物網(wǎng)站開發(fā)的需求分析常見的網(wǎng)站推廣方式
  • 做網(wǎng)站建設(shè)公司crm在線的提升服務(wù)外貿(mào)網(wǎng)站推廣服務(wù)
  • 上海建設(shè)電動車網(wǎng)絡(luò)營銷鄭州優(yōu)化推廣公司
  • 課程網(wǎng)站建設(shè) 碧輝騰樂谷歌seo
  • 網(wǎng)絡(luò)營銷策劃是什么意思seo排名優(yōu)化方法
  • 蘇州怎么制作網(wǎng)頁網(wǎng)站杭州網(wǎng)站seo價格
  • 廣東哪里網(wǎng)站建設(shè)安卓優(yōu)化神器
  • seopc流量排名官網(wǎng)超級seo外鏈
  • 免費個人crmapp網(wǎng)站優(yōu)化排名易下拉穩(wěn)定
  • 外貿(mào)狼成都seo的方法
  • 做線下活動的網(wǎng)站武漢seo網(wǎng)絡(luò)優(yōu)化公司
  • 云南酒店網(wǎng)站建設(shè)名優(yōu)網(wǎng)站關(guān)鍵詞優(yōu)化
  • 小游戲網(wǎng)址鏈接seo網(wǎng)站推廣優(yōu)化論文
  • java做直播網(wǎng)站有哪些軟件有哪些微信加人推碼35一單
  • 商務(wù)網(wǎng)站建設(shè)管理思路青島seo經(jīng)理
  • 做的網(wǎng)站怎么發(fā)布到網(wǎng)上網(wǎng)絡(luò)推廣方案怎么寫
  • 模仿網(wǎng)站怎么防止侵權(quán)電商關(guān)鍵詞一般用哪些工具
  • icp備案網(wǎng)站要先建好嗎微信社群營銷
  • 北京網(wǎng)站建設(shè)價格天湛江今日頭條新聞
  • 鄭州網(wǎng)站的優(yōu)化廣州公關(guān)公司
  • 網(wǎng)站建設(shè)外包排名游戲推廣在哪里接活
  • app網(wǎng)站制作要多少錢排名nba
  • 做電影網(wǎng)站的工具抖音關(guān)鍵詞搜索排名
  • 做網(wǎng)站最主要搜索引擎推廣的費用