我的项目具有以下结构: MainFolder:
>>InitToolbox.m //Here addpaths are executed
>>Compile.m //Here mex compilations calls are made
AlgorithmsFolder //MATLAB code
UtilitiesFolder //MATLAB c
我试图剖析嵌入到mex文件中的CUDA代码,这些代码是从MATLAB调用的。 MATLAB test.m
->contains some standard code generating variables (and calling 1 or 2 minor own MATLAB fucntions)
-> calls testcuda.mex
->contains
我有一个MATLAB代码是 %% Inputs are theta and h (size NxM)
alpha=zeros(N,M);
h_tmp=zeros(N,M);
h_tmp(1:N-1,:)=h(2:N ,:);
for i=1:N
alpha(i,:)=theta.*(h_tmp(i,:)+h(i,:));
end
通过使用向量化方法中,上述代码可以是 alp