Rank: 54614 based on downloads (last 30 days) and 0 files submitted
photo

Sven

E-mail
Company/University
Philips
Lat/Long
37.4035758972168, -121.940559387207

Personal Profile:

GPGPU, Tomography

Professional Interests:
medical image processing

 

Watch this Author's files

 

Comments and Ratings by Sven
Updated File Comments Rating
20 Jan 2010 NVIDIA CUDA-based bilinear (2D) interpolation Incredible speed boost in comparison to the Matlab implementation. (interp2) Author: Gerald Buchgraber

I tried this on a XP64 machine with Matlab 64. I found one problem: If options are placed into an rsp file by the nvmex_helper script the nvmex compiler cannot parse them. So I added

    if (grep /\.rsp$/i, @ARGV) { # arg is a rsp file
my $fn = substr($ARGV[0],1);
my $holdNewline = $/;
undef $/;
my $inf;
open $inf, "<" . $fn;
my $buf = <$inf>;
close $inf;
$/ = $holdNewline;
$_ = $buf;
s/"(.*)\s(.*)"/"\"$1_!_$2\""/eg; # avoid splitting at spaces with quotes,e.g,. "Program Files/"
s/\s+/" "/eg; # collapse multiple spaces
$buf = $_;
@items = split / /, $buf; #split the input string into individual words
grep(s/_!_/" "/eg, @items);
@ARGV = @items;
    }

to nvmex.pl to allow that. Now I can pass -win32 as an option, and with some add'l tweaks (using win32 matlab and cuda libs, setting LINKER_OPTIONS to /MACHINE:X86 and esnuring that the 32-bit nvcc is called, I can now compile and run 32-bit mex executables from the 64-bit matlab command line.

Contact us at files@mathworks.com