fitsread is not supported for GPU code generation
Mostrar comentarios más antiguos
Hi! I am using GPU cores to accelerate analysis of images stored in '.fits' files. For this I am using GPU coder, in which I am converting function (see below) to mex format, but it is giving error " fitsread is not supported for GPU code generation ".
%first function
function F=T1(m,n)
file = ['G:\spatial ent\Intensity Correlation Imaging\EI_10mW_G1000_et3.5ms_X1.fits'];
frame1=fitsread(file,'PixelRegion',{[1 64],[1 64],(1)});
F=frame1(m,n);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have successfully generated mex file for trail function (see below) and with 5X increase in speed it is working propoerly.
%second function
function F=T1(m,n)
A=zeros(64);
F=A(m,n);
end
I used second function for trail to generate mex file which I called in the follwing code,
tic;
T=zeros(64);
for m=1:64
for n=1:64
T(m,n)= T1(m,n);
end
end
toc;
Thanks,
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre GPU Computing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!