我的項目具有以下結構: 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