Cuda 6.5 + Visual Studio 2013 express environment Configuration

Source: Internet
Author: User

On Windows, the installation of the two software is not difficult. click Next.

The vs Express version does not support installation extension. Therefore, you cannot directly create a Cuda project after installation, but you can only manually handle it. This is a little troublesome:

1. In vs 2013 Express, click File> Create Project and select template \ visual c ++ \ empty project;

2. Right-click the project name of solution Resource Manager and choose generate dependency> Generate custom;

3. Select Cuda 6.5 and click OK.

 

4. Right-click the project, select properties, and add the dependency cudart. Lib of the linker.

5. Set vs 2013 to highlight the. Cu file,

6. Add a new file (Source File> Add> new item> C ++ file) in the project with the extension. cu. Enter the following content:

#include <cuda_runtime_api.h>#include <device_launch_parameters.h>#include <iostream>int main(void){    int n;    cudaGetDeviceCount(&n);    std::cout << n << std::endl;    cudaDeviceProp prop;    cudaGetDeviceProperties(&prop, 0);    std::cout << prop.name << std::endl;    return 0;}

Compile and run...

Cuda 6.5 + Visual Studio 2013 express environment Configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.