Code covered by the BSD License  

Highlights from
Universal MEX wrapper

Universal MEX wrapper

by

 

Call any function in a shared library from Matlab (with some limits on the function signature).

zdotu_test.m
%This is a BLAS function that can't be called with this loader:
%complex double zdotu(
%    ptrdiff_t *n,
%    double *zx,
%    ptrdiff_t *incx,
%    double *zy,
%    ptrdiff_t *incy
%);
%Some zdotu and cdotu both return a value rather than being void.
%In some conventions, the first argument can be the return value.


n = 10000;
x = rand(n,1) + i*rand(n,1);
y = rand(n,1) + i*rand(n,1);
intT = 'int64';
tic
dl_exec('zdotu_', cast(n,intT),...
x, cast(1,intT), y, cast(1,intT));
toc
tic
x.'*y;
toc

Contact us