Code covered by the BSD License  

Highlights from
Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

image thumbnail

Huygens-Fresnel integral approximation, free-form apertures and rough surfaces

by

 

Simulate wave propagation through free-form apertures, or off rough surfaces.

toGpu(A, options)
function Agpu = toGpu(A, options)
% toGpu - map a variable to GPU memory

if numel(A) == 1
	displayMessage(0, 'skipped ''toGpu'' of a scalar value (see GPUmat ERROR code 9)');
	Agpu = A;
	return;
elseif ~options.useGpu
	displayMessage(0, 'skipped ''toGpu'' (options.useGpu==false)');
	Agpu = A;
	return;
end

if GPUisDoublePrecision
	Agpu = GPUdouble(A);
else
	Agpu = GPUsingle(A);
end

Contact us