About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconNVCC cuda compiler wraper (Scripts) Publisher's description

This function NVCC is a wraper for the NVIDIA Cuda compiler NVCC.exe

This function NVCC is a wraper for the NVIDIA Cuda compiler NVCC.exe
in combination with a Visual Studio compiler. After this Cuda
files can be compiled into kernels

If you call the code the first time, or with "nvcc -config":
1) It will try to locate the "The NVIDIA GPU Computing Toolkit", which
can be downloaded from www.nvidia.com/object/cuda_get.html
Typical Location :
C:Program FilesNVIDIA GPU Computing ToolkitCUDAv3.2bin
2) It will try to locate the visual studio compiler
Typical Location :
C:Program Files (x86)Microsoft Visual Studio 9.0VCbin
3) It creates a file nvccbat.bat with the compiler information.

After this configuration procedure, you can compile files with:




filename : A string with the filename, for example 'example.cu'
options : NVCC Compiler options for example,
nvcc(option1, option2, option3,filename)

For help on NVCC config options type, "nvcc --help"

If the NVCC fails to locate the compiler you can try to
write your own "nvccbat.bat" file in a text-editor, for example:
echo off
set PATH=C:Program Files (x86)Microsoft Visual Studio 9.0VCbin;PATH
set PATH=C:Program FilesNVIDIA GPU Computing ToolkitCUDAv3.2bin;PATH
call vcvars32.bat
nvcc 1 2 3 4 5 6 7 8 9

1 Example, Configuration
Locate Cuda and VS compiler
nvcc -config

Show the NVCC compiler options
nvcc --help

Test some input options
nvcc --dryrun -ptx example.cu

2 Example,

Locate Cuda and VS compiler
nvcc -config
Compile the code
It the same as :
nvcc -ptx example.cu

Make the kernel
Kernel = parallel.gpu.CUDAKernel('example.ptx', 'example.cu');

We want to execute this kernel 100 times

We make an array with 100 random files
Data=rand(100, 1, 'single');
DataCuda= gpuArray(Data);

We will add the value 1
OneCuda = parallel.gpu.GPUArray.ones(1,1);

Execute the kernel
DataOneCuda = feval(Kernel, DataCuda, OneCuda);

Get the data back

Show the result
figure, hold on;

System Requirements:

MATLAB 7.11 (2010b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

NVCC cuda compiler wraper (Scripts) Tags:

Click on a tag to find related softwares

Is NVCC cuda compiler wraper (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.