Compiling mex files with Visual Studio 2013

Configuration: Matlab 2015b, Visual Studio 2013, Intel 64bit machine. In Visual Studio do the following: 1) File -> New Project; Select location and name; in the project type, select Templates -> Visual C++ -> Win32 -> Win32 Console Application -> OK; 2) In the Win32 Application Wizard, click Next, in the Application Type choose DLL, then click Finish. 3) Project -> Properties -> Configuration Manager -> Active Solution Platform -> New -> Type or Select ...
More

Compiling Cuda mex files with Visual Studio 2013

Configuration: Matlab 2015b, Visual Studio 2013, Intel 64bit machine. In Visual Studio do the following: 1) File -> New Project; Select location and name; in the project type, select NVIDIA -> CUDA 8.0 (choose your CUDA version as appropriate); 2) Project -> Properties -> Configuration Manager -> Active Solution Platform -> choose x64; 3) Project -> Properties -> Configuration -> Release (possibly optional); 4) Project -> Properties -> Configuration ...
More

Using CUDA dynamic parallelism in Visual Studio

Starting from CUDA 5.0, CUDA enables the use of dynamic parallelism for GPUs with compute capability 3.5 or higher. Dynamic parallelism allows launching kernels directly from other kernels and enables further speedups in those applications which can benefit of a better handling of the computing workloads at runtime directly on the GPU; in many cases, dynamic parallelism avoids CPU/GPU interactions with benefits to mechanisms like recursion. To use dynamic parallelism in Visual Studio 2010 or ...
More

Using OpenMP and CUDA with Visual Studio

To exploit OpenMP under C++ and using Visual Studio 2010 or 2013 you need two steps: 1) #include <omp.h> 2) Project -> Properties -> Configuration Properties -> C/C++ -> Language ->  Open MP Support and then select Yes (/openmp). To exploit OpenMP under CUDA and using Visual Studio 2010 or 2013 you need some more hacking. In particular, you need the additional step: 3) Go to C:Program FilesNVIDIA GPU Computing ToolkitCUDAv5.5bin, open nvcc.profile as Administrator and...
More

OAuth for Twitter HTTP requests in VB.NET: send tweets programmatically

Following a previous post, we share a new VB.NET class that uses OAuth  authentication to programmatically send tweets on an user's page. Comments have been provided within the class, that you may download here; after the import in your project you can use it as follows:   Dim myReq = New statusUpdate(oauth_consumer_key, consumer_secret, oauth_token, oauth_token_secret) myReq.makeRequest("My twitter test")   You can get all the authorization tokens following the Twitter Tokens page ...
More

Matrix transposition in CUDA

Matrix transposition is a very common operation in linear algebra. From a numerical point of view, it is a memory bound problem since there is practically no arithmetics in it and the operation essentially consists of rearranging the layout of the matrix in memory. Due to the particular architecture of a GPU and to the cost of performing global memory operations, matrix transposition admits no naive implementation if performance is of interest. We here compare two different possibilities of pe...
More

Tricks and Tips: Compiling CUDA mex files with Visual Studio – The case of dynamic parallelism

With the recent development of CUDA 5.0 and the release of the Kepler architecture, dynamic parallelism makes it possible to call kernels within kernels. The use of dynamic parallelism requires the generation of relocatable code and the linking of the cudadevrt.lib library. In the framework of linking CUDA routines under Matlab by mexfiles, the new procedure at  Mathworks Help does not seem to make it possible to link external libraries. The  downloadable Visual Studio 2010 project shows how t...
More

CUDA Texture memory fetches vs global memory fetches: the complex case

At the time of compute capability 1.x, memory fetches could benefit of texture cache to accelerate the accesses. Since compute capability 2.0, global memory fetches can benefit of L1 and L2 caches, so that texture memory has reduced its relative importance [1]. The question then naturally arises on whether texture memory is still worth using with newer GPU generations or not. Answering this question is highly application-dependent. Below, we focus on the particular test-case of 1D linear interp...
More

Bluebird Library – New Features: Stand-alone components for Complex Type management

Orange Owl Solutions introduces new stand-alone components for Complex Type management in the Bluebird library: Thanks to the power of CUDA/C++ metaprogramming, you will be able to develope high performance solutions in a easy and intuitive way. Main features The main features of current beta version (0.5) are: C++/CUDA Metaprogramming Simple (Matlab/Octave-like) ways to manage vectors and matrices Stand-alone components for Complex Type management Peer-to-Peer (P2P) communication betwee...
More