%CAST Cast a gpuArray to a different data type or class.
%   B = CAST(A,NEWCLASS)
%   
%   B = CAST(A, 'like', Y) converts A to the same underlying data type and 
%   sparsity as the variable Y. If A and Y are both real, then B is also real. 
%   B is complex otherwise.  B is a gpuArray if and only if Y is a 
%   gpuArray.
%   
%   Example:
%    
%       N = 1000;
%       A = gpuArray.ones(N,'uint32');
%       B = cast(Du,'single');
%       classA = underlyingType(A);
%       classB = underlyingType(B);
%   
%   casts the gpuArray uint32 array A to the gpuArray single array
%   B. classA is 'uint32', while classB is 'single'.
%   
%   See also CAST, GPUARRAY, GPUARRAY/ONES, 
%   GPUARRAY/underlyingType.


%   Copyright 2006-2020 The MathWorks, Inc.
