cuda开发环境高亮显示设置

CUDA代码的高亮设置 以下基于“WIN7(64位)+Visual Studio 2010+CUDA7.5”。   语法高亮除了看起来舒服之外,还可以使用F11寻找函数、变量定义,输入函数的时候也会有相应的提示。下面就是关于CUDA代码的高亮设置。   在搭建好CUDA开发环境后,当打开.cu文件时会发现,其中的CUDAC/C++关键字并没有高亮显示,如__global__、__device__等,而且还有下... 阅读详情

     在网上一顿瞎搜,怎么配置cuda开发环境高亮显示,也不知道怎么弄的,居然好使了,现在把自己的一点小小心得记录下来。说真的,真的很兴奋!

 1、将C:/Documents and Settings/All Users/Application Data/NVIDIA Corporation/NVIDIA CUDA SDK/doc/syntax_highlighting/visual_studio_8里面的usertype.dat文件copy到C:/Program Files/Microsoft Visual Studio 8/Common7/IDE目录下面(如果已经存在,就追加到原来的后面)。
2、打开vs2005->工具(T)->选项(O)->项目和解决方案->VC++项目设置->C/C++文件扩展名(在后面添加*.cu)->包括的扩展名(在其后添加*.cu;)。其他默认就行。

3、还是在工具(T)下面,打开文本编辑器->文件扩展名->在右侧 扩展名一栏中填上.cu,编辑器中选择Microsoft Visual C++,并选中下面的(将无扩展名的文件映射到(M)),对应的后面是Microsoft Visual C++。

4、打开注册表,在HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/8.0/Languages/File Extensions/ 下面添加子键 .cu 然后copy .cpp的键值到.cu。这样才能表示cu也是VS下的VC的工程文件。

5、打开注册表
HKEY_CURRENT_USER/Software/Whole Tomato/Visual Assist X/VANet8 在ExtSource键添加键值.cu;.cuh。

6、打开Visual Assist属性,在projects 的C/C++ Directories custom下面添加CUDA的头文件目录,这样才能在Visual Assist 生成规则的时候找到CUDA自身的特殊定义才能生成Visual Assist的关键字,如__global__.

在这个步骤中,platform选择custom,show directiories for选择stable include files

7、对于这个高亮显示,我也不知道上面的配置对不对,我也是照猫画虎。以前配置环境,用的是开勇的向导,版本是CUDA_VS_Wizard1.2,高亮就不太好使,这回换来用CUDA_VS_Wizard_W32.2.0.zip,不知道这两者有没有啥关系,不太明白。在此感谢开勇。

8、再有就是在第五步,在添加键值的时候比以前多添加了.cuh,这不知道和这次的成功高亮显示有没有什么关系,没有去试过。

9、因为前一次的高亮显示失败,所以这次又进行了上次一样的重新设置,改的地方在第7和8步已经做了说明。第2步和第3步也都进行了重新设置。这次的成功设置,让我很有收获,所以就把这些感受写了下来,以便给自己以后设置做个蓝本。


CUDA学习笔记:CUDA Toolkit安装与项目设置 cuda安装(Win7 32bit、VS2013、CUDA Toolkit 6.5) C++控制台/MFC中使用cuda 阅读详情

相关推荐

VS2012+CUDA8.0 visual assist对.cu和.cuh高亮注册表

VS2012+CUDA8.0 visual assist对.cu和.cuh高亮注册表,压缩文档有说明

让vs2005支持NVDIA CUDA的cu文件语法高亮显示

1、安装好CUDA SDK后,找到安装目录D:/softwareofliuting/CUDA SDK/doc/syntax_highlighting/visual_studio_8。(我安装在D:/softwareofliuting)2、打开readme.txt,按照上面的步骤进行就可以了。ant pretty syntax highlighting when editing

yingziting的专栏 1243

CUDA SDK 语法高亮必备 usertype.dat

在VS中配置CUDA时,本身是不识别CUDA关键字的,关键字不能高亮。早期的CUDA版本在SDK中提供了usertype.dat,其中包含CUDA的关键字,但后来的CUDA没有这个文件,网上找了好久,现在贴出来亲测可用~

CUDA 高亮显示设置【转】

CUDA 高亮显示设置

hongqiang200的专栏 1518

基于Visual Studio 2010 的CUDA 环境配置

来自论坛,有略微的修改,亲测,可以使用

Charles 抓包工具下载安装及基础使用

本篇内容主讲关于Charles抓包工具,从下载安装以及配置信息,证书的下载安装以及PC端设置代理配置和移动端设备配置代理,阐述关于Charles抓包工具面板的基础使用以及如何进行抓包和设置断点,对于软件测试以及对抓包感兴趣的读者可以翻阅!感谢大家的支持!!!

灵魂学者的博客 2957

vscode颜色没有显示出来颜色预览效果,安装插件解决

安装Color Highlight, 来显示颜色对应的颜色预览效果。

花花鱼的专栏 2855

基因的富集分析

通过RNA_seq差异表达分析等获得一组基因,想要进一步了解这些基因可能参与哪些生物学过程,具有哪些功能,一般就会用到基因的富集分析了。现在小麦基因注释信息已经可以获得,目前来看包括两套。一个是TGACv1,另一个就是IWGSC1.0。需要用到一个叫“clusterProfiler”的R包。下面用到的数据集来自TGACv1。1、安装source("https://bioconductor.org/b

xxxxx 1万+

VS Visual Studio 2017 +cuda环境配置+创建项目

选择合适版本的CUDA,这里我们选择版本12.2进行下载,进入下载页面,根据系统版本以及安装方式进行选择,点击Download进行安装包下载。然后,进入cuda官网进行下载https://developer.nvidia.com/cuda-toolkit-archive。3.更改Windows SDK : 项目名右键->属性->常规->Windows SDK 版本 选择已安装的版本。其次,查看当前支持的cuda版本。2.项目名右键->属性->CUDA C++ ->第一行填写 $(CUDA_PATH) ->

qq_41491827的博客 6510

php对接建行h5网页支付

php对接建行h5网页支付前言H5页面支付H5页面支付回调通知退款及其他的业务 前言 最近接到公司乙方要求,需要再支付上面增加建行的支付渠道。之前一直用的都是微信和支付宝这种第三方支付平台,银行直接对接比较少。没办法就只能上网搜索,搜索一番返现网上对接建行的资料比较少,没办法只好摸着石头过河,中间也借鉴了一些大佬的文章内容。 H5页面支付 根据建行的h5网页支付对接文档,还是可以看出是比较简单的。...

lihua100862的博客 5409

Windows 10下Carla 0.9.15安装避坑指南:从下载到运行的全流程解析

本文详细解析了在Windows 10系统上安装和运行Carla 0.9.15自动驾驶仿真平台的全流程。内容涵盖从系统环境准备、资源下载、Python依赖安装,到首次启动验证及常见错误(如DLL缺失、显卡驱动问题)的深度解决方案,旨在帮助用户快速搭建稳定的开发环境,并运行第一个自动驾驶Python脚本。

alice7model的博客 546

CUDA开发环境高亮显示设置(转)

在网上一顿瞎搜,怎么配置cuda开发环境高亮显示,也不知道怎么弄的,居然好使了,现在把自己的一点小小心得记录下来。说真的,真的很兴奋!  1、将C:/Documents and Settings/All Users/Application Data/NVIDIA Corporation/NVIDIA CUDA SDK/doc/syntax_highlighting/visual_studio_

hongqiang200的专栏 911

Apple CarPlay Certification Guide December 2022 解析V1.0

Apple CarPlay Certification Guide December 2022更新说明

m0_74450450的博客 703

CUDA开发环境高亮显示设置

在网上一顿瞎搜,怎么配置cuda开发环境高亮显示,也不知道怎么弄的,居然好使了,现在把自己的一点小小心得记录下来。说真的,真的很兴奋! 1、将C:\Documents and Settings\All Users\App...

cs199503的博客 232

从UART到RS485:手把手教你用SIT3485E收发器搞定工业级通信(含原理图与PCB布局要点)

本文详细解析了从UART到RS485的工业级通信转换,重点介绍了SIT3485E收发器的原理图设计、PCB布局要点及抗干扰技巧。通过差分信号传输和优化电路设计,实现长距离、多设备稳定通信,适用于工业自动化等复杂环境。

weixin_29169505的博客 349

Android14 Qcom 从Framework到Driver带你打开WIFI(二)

上篇文章讲到了UI打开WIFI以后,逐步调用到加载底层驱动以及通知等相关流程。这篇接着上文继续往下看WIFI ON的后续动作。

IAYLBL的博客 766

CUDA 高亮显示设置

1、将C:/Documents and Settings/All Users/Application Data/NVIDIA Corporation/NVIDIA CUDA SDK/doc/syntax_highlighting/visual_studio_8里面的usertyp

燕子的专栏 3917

上位机 寻边器 通讯实战

寻边器通讯接口实现 本文介绍了上位机与盖泽(Gazer)和JEL品牌寻边器的通讯接口实现方案。主要内容包括: 接口定义:创建了IAlignerOperation接口,定义了获取状态、控制运动、真空吸附等核心功能。 具体实现: 盖泽寻边器(GazerAlignerCjh):通过串口通讯,实现了回零、校准、移动位置等操作 JEL寻边器(JelAligner):同样基于串口通讯,包含错误处理、状态查询等功能 工厂模式:通过AlignerFactory工厂类根据设备品牌创建对应的实现对象。 设备加载:展示了如何在系

StevenChen的博客 377

cuda语法高亮设置

1.1 启动VS2010   1.2 新建一个win32的控制台工程,空的。   1.3 右键源文件文件夹->新建项->选择cuda c/c++->新建一个以.cu结尾的文件   1.4 右键工程-》生成自定义-》选择cuda生成   1.5 右键test.cu-》属性-》选择cuda c/c++编译器   1.6 右键工程-》

阳仔的博客 1197

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

VS2012安装CUDA

前提安装:Visual Studio 2012Visual Assist X安装步骤:1. Nvidia显卡驱动,装275.33版,这是最新版本驱动,初次安装为了少出错,最好安装比较新版本的驱动。2. Cuda Toolkit 4.0安装,CUDA 4.0的新特性可以参见其Release Notes,其中包括了本文将要介绍的Thrust库。3. GPU Computing SDK 4.0 安装,默

Augusdi的专栏 1万+

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

CUDA笔记1:环境配置

几年前一直叫嚣着要学习CUDA,却从未开始过,那么就从今天起步。自己对CUDA并行编程的原理似有了解,却从未真正跑过CUDA程序。CUDA编程第一步首先从VS2010+CUDA5.5的配置环境走起。学走路当然少不了前人的搀扶。 1)从NV官网下载、安装CUDA Toolkit 5.5 : 默认安装路径:C:\Program Files\NVIDIA GPU Co

Ai_ViVi的专栏 882

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

vs2012编译cuda程序

前提安装: Visual Studio 2012 Visual Assist X 安装步骤: 1. Nvidia显卡驱动,装275.33版,这是最新版本驱动,初次安装为了少出错,最好安装比较新版本的驱动。 2. Cuda Toolkit 4.0安装,CUDA 4.0的新特性可以参见其Release Notes,其中包括了本文将要介绍的Thrust库。 3. GPU Comp

thankyvision 3544

cuda4.1+vs2010配置与安装

转载:转自miaomiao8204,http://blog.youkuaiyun.com/miaomiao8204/article/details/7277354 安装环境: win vista 32位   nvidia公司的显卡 安装前提: visual studio 2010 Visual Assist X 安装步骤: 1. CUDAToolkit4.1下载地址 在该地址下一次下

liyongbao1988的专栏 1894

CUDA4.2安装与配置

CUDA4.2安装与配置 0.安装VS2005、VS2008、VS2010,我的机子操作系统是Win7 32位,开发平台VS2005 1.在http://www.nvidia.com/object/cuda_get.html上选择相应的操作系统,并下载最新的CUDA driver\CUDA toolkit、CUDA SDK、GPU检测工具GPU-Z及CUDAVSWinzard(VS下开

wufenxia的专栏 8339

CUDA安装及开发环境的配置

CUDA详细安装教程以及CUDA开发环境的配置,并使用pytorch连接cuda进行GPU加速

NKU_lyx的博客 5602
上一篇: C语言中的头文件可以自己写吗?
下一篇: 使用VS2005进行cuda开发
learngis
博客等级 码龄18年 73粉丝 7原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值