thrust库的sort算法,在x86平台使用就崩溃,x64就没问题,搜了下好像是很早的版本,4开始就有这样的问题了,原因不明。

http://stackoverflow.com/questions/33220674/thrustsort-crashes-invalid-argument

测试代码

 #include <iostream>
#include <ctime> #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <thrust/reduce.h> using std::cout;
using std::endl; using thrust::host_vector;
using thrust::device_vector; int Sequence()
{
//static int i = 0;
//return ++i; return rand() % ;
} int main()
{
host_vector<int> hv();
device_vector<int> dv(); srand((unsigned int)time()); thrust::generate(hv.begin(), hv.end(), Sequence); for (auto i : hv)
{
cout << i << endl;
} cout << endl; dv = hv; thrust::sort(dv.begin(), dv.end());//will crash on x86,works fine on x64 for (auto i : dv)
{
cout << i << endl;
} cout << endl; float sum = thrust::reduce(dv.begin(), dv.end());//sum
cout << "Sum : " << sum << endl; return ;
}

然后想吐槽一下cuda的编译速度,不知道是不是默认参数的原因,就算编译个简单的hello world,

估计也是史上最慢的编译器没有之一,什么原因让编译如此之慢,越来越对cuda没兴趣了,

打算完成一个Opengl版的cuda简单光线追踪应用就放弃,入门与放弃。

Win7 64位 VS2013环境cuda_7.5.18的一些坑的更多相关文章

  1. Win7 64位 VS2013环境编译CGAL-4.7

    看到有人在QQ空间感叹编译CGAL配置折腾了一天时间,自己也想试试,虽然并不打算用,但感觉这库也挺有名的,想必日后用得着,于是着手试着编译. 首先是看一下官网的windows下配置说明 http:// ...

  2. Win7 64位 VS2013环境使用cuda_7.5.18

    首先得吐槽下VS2015出来快一年了CUDA居然还不支持,没办法重装系统刚从2013升到2015,还得再装回一个2013用,只为学习CUDA... 然后安装的时候,如果你选择自定义组件安装,注意不要改 ...

  3. Win7 64位 VS2013环境编译boost1_58_0

    备忘,发现好多不常用的东西不记笔记再想用要重新花时间找,所以试着开始记笔记,写入博客吧. 首先去官网下最新的版本 http://www.boost.org/ 写本文时boost最新版本为1_58_0, ...

  4. Win7 64位 VS2013环境编译Squirrel 3.0.7

    Squirrel是一个类似Lua,但是更面向对象的脚本语言. 国内这个介绍很少,环境配置更是没有任何文章提到,花了点时间搞定了,备忘记录下过程. 首先是下载,写本文时Squirrel最新版本为3.0. ...

  5. Win7 64位 VS2013环境编译Lua5.3.1

    主要参考这篇文章,原文有几个错误顺便改正了. 在Windows下使用Visual Studio编译Lua5.3 写本文时Lua官方网站放出的新版本为5.3.1,然后我不知道为啥,神奇的国内不能访问Lu ...

  6. Win7 VS2013环境cuda_7.5.18的一些坑

    thrust库的sort算法,在x86平台使用就崩溃,x64就没问题,搜了下好像是很早的版本,4开始就有这样的问题了,原因不明. http://stackoverflow.com/questions/ ...

  7. win7 64位 php环境开启curl服务Call to undefined function

    无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里 ;ex ...

  8. Win7 64位 MinGW环境测试SDL2.0.3

    下载MinGW版的文件 http://www.libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz 解压放到mysys下面 运行Makefile mysys ...

  9. Win7 64位 VS2015环境使用qt-msvc2015-5.6.0

    QT下载 http://www.qt.io/download-open-source/#section-2 我用的是 qt-opensource-windows-x86-msvc2015-5.6.0. ...

随机推荐

  1. lisp中的nil

    ANSI Common Lisp 第二章 课后习题 7.只使用本章所介绍的操作符,定义一个函数,它接受一个列表作为实参,如果有一个元素是列表时,就返回真. (defun have-list (lst) ...

  2. 使用Docker Image跑Gitlab

    下载gitlab docker镜像 docker pull gitlab/gitlab-ce:latest 启动gitlab服务 sudo docker run --detach \ --hostna ...

  3. spring启动component-scan类扫描加载过程---源码分析

    http://blog.csdn.net/xieyuooo/article/details/9089441#comments

  4. Appium学习路—Android定位元素与操作

    一.常用识别元素的工具 uiautomator:Android SDK自带的一个工具,在tools目录下 monitor:Android SDK自带的一个工具,在tools目录下 Appium Ins ...

  5. 336-Palindrome Pairs

    336-Palindrome Pairs Given a list of unique words, find all pairs of distinct indices (i, j) in the ...

  6. freeregex-0.01 使用文档

    -- freeregex,简化字符串处理 freeregex使用大体分为两个部分: 正则确定 功能操作 正则确定:共有EMAIL.IP等静态属性:anyOf(String regex)静态方法 :和o ...

  7. Python—使用__slots__限制实例的属性

    如果我们想要限制实例的属性怎么办?比如,只允许对Student实例添加name和age属性. 为了达到限制的目的,Python允许在定义class的时候,定义一个特殊的__slots__变量,来限制该 ...

  8. Linux下错误的捕获:全局变量errno和strerror()

    经常在调用linux 系统api 的时候会出现一些错误,比方说使用open() write() creat()之类的函数有些时候会返回-1,也就是调用失败,这个时候往往需要知道失败的原因.这个时候使用 ...

  9. TimeQuest学习

    1.物理时钟特性:clock skew(时钟差),jitter(拉动),clock latency(时钟潜伏),这些物理时钟特性又称为uncertainl--非定性,或非理想性. clock skew ...

  10. PHP $_FILES中error返回值详解

    $_FILES['file']['error']值 UPLOAD_ERR_OK: 0 //正常,上传成功 UPLOAD_ERR_INI_SIZE: 1 //上传文件大小超过服务器允许上传的最大值,ph ...