Win7 64位 VS2013环境cuda_7.5.18的一些坑
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的一些坑的更多相关文章
- Win7 64位 VS2013环境编译CGAL-4.7
看到有人在QQ空间感叹编译CGAL配置折腾了一天时间,自己也想试试,虽然并不打算用,但感觉这库也挺有名的,想必日后用得着,于是着手试着编译. 首先是看一下官网的windows下配置说明 http:// ...
- Win7 64位 VS2013环境使用cuda_7.5.18
首先得吐槽下VS2015出来快一年了CUDA居然还不支持,没办法重装系统刚从2013升到2015,还得再装回一个2013用,只为学习CUDA... 然后安装的时候,如果你选择自定义组件安装,注意不要改 ...
- Win7 64位 VS2013环境编译boost1_58_0
备忘,发现好多不常用的东西不记笔记再想用要重新花时间找,所以试着开始记笔记,写入博客吧. 首先去官网下最新的版本 http://www.boost.org/ 写本文时boost最新版本为1_58_0, ...
- Win7 64位 VS2013环境编译Squirrel 3.0.7
Squirrel是一个类似Lua,但是更面向对象的脚本语言. 国内这个介绍很少,环境配置更是没有任何文章提到,花了点时间搞定了,备忘记录下过程. 首先是下载,写本文时Squirrel最新版本为3.0. ...
- Win7 64位 VS2013环境编译Lua5.3.1
主要参考这篇文章,原文有几个错误顺便改正了. 在Windows下使用Visual Studio编译Lua5.3 写本文时Lua官方网站放出的新版本为5.3.1,然后我不知道为啥,神奇的国内不能访问Lu ...
- Win7 VS2013环境cuda_7.5.18的一些坑
thrust库的sort算法,在x86平台使用就崩溃,x64就没问题,搜了下好像是很早的版本,4开始就有这样的问题了,原因不明. http://stackoverflow.com/questions/ ...
- win7 64位 php环境开启curl服务Call to undefined function
无法使用curl_init(),一般情况问题可能出在没有去加载php的扩展文件php_curl.dll(windows操作系统),但是检查了一下系统配置,发现,环境下已经将php.ini文件里 ;ex ...
- Win7 64位 MinGW环境测试SDL2.0.3
下载MinGW版的文件 http://www.libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz 解压放到mysys下面 运行Makefile mysys ...
- 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. ...
随机推荐
- java中 DigestUtils.md5Hex 的c#实现
C# string target= "央行降息影响楼市:100万20年期房贷月供减少141元"; string result = Md5Helper.Md5Hex(aa); //r ...
- Nginx的nginx.conf配置文件中文注释说明
#运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 erro ...
- go 静态web服务器
package main import ( "net/http" ) type helloHandler struct{} func (h *helloHandler) Serve ...
- jquery实现淡入淡出
fade方法包括四个: (1)fadeIn(speed,callback):淡入的方法,speed代表淡入的速度,可以是slow,fast,毫秒,不填等 例如: $(document).ready(f ...
- C# delegate
1. delegate example1 class Program { public delegate int MyDelegate(int i); int MyFunc(int i) { retu ...
- winform空间批量控制
第一版: private void RefreshControl(PanelEx panel, bool enabled, bool isClear) { ; i < panel.Control ...
- 根目录97 <input file>标签,把图片上传到服务器(跟增删改查一起实现)
首先来个简单的html页面: enctype="multipart/form-data" encoding="multipart/form-data" acti ...
- 一般html5 手机端头部需要
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- ArcEngine:The XY domain on the spatial reference is not set or invalid错误
在创建数据集的时候,提示The XY domain on the spatial reference is not set or invalid错误. 原因:未设置空间参考(ISpatialRefer ...
- 介绍几个 window 下面的terminal
1. putty 配合 winscp 这个是标配 但是如果开多个ssh连接,管理起来很是不方便. 2. MTputty ,如果要管理多态机器,那么这个工具就是相当给力. 可以连接多个Tab,配置和保存 ...