Hi, Dr. Cox and Dr. Treeby,
I have some questions about the following codes in the 'kspaceFirstOrder2D' function:
ux_sgx = bsxfun(@times, pml_x_sgx, ...
bsxfun(@times, pml_x_sgx, ux_sgx) ...
- dt./ rho0_sgx .* real(ifft2( bsxfun(@times, ddx_k_shift_pos, kappa .* p_k) )) ...
);
uy_sgy = bsxfun(@times, pml_y_sgy, ...
bsxfun(@times, pml_y_sgy, uy_sgy) ...
- dt./ rho0_sgy .* real(ifft2( bsxfun(@times, ddy_k_shift_pos, kappa .* p_k) )) ...
);
% force bsxfun compatability with Accelereyes GPU toolbox
if strncmp(data_cast, 'g', 1);
geval(ux_sgx, uy_sgy);
end
I am confused about the use of the 'geval' function. Since 'ux_sgx' and 'uy_sgy' have been computed in the above lines, what's the purpose to use 'geval'. I don't understand the comments 'force bsxfun compatability with Accelereyes GPU toolbox'.
Also, do 'ux_sgx' and 'uy_sgy' comupted in the first 2 statements reside in the CPU memory, while 'ux_sgx' and 'uy_sgy' comupted by 'geval' reside in GPU memroy?
Thanks,
Chao