%TYPECAST Convert datatypes of gpuArray without changing underlying data
%   Y = TYPECAST(X, DATATYPE)
%   
%   Example:
%    
%       N = 1000;
%       Di = -1*gpuArray.ones(1,N,'int8');
%       Du = typecast(Di,'uint8')
%       classDi = underlyingType(Di)
%       classDu = underlyingType(Du)
%   
%   type casts the 1-by-N gpuArray uint8 row vector Du to the
%   gpuArray int8 array Di.
%   Di has all values -1 while Du has all values 255.
%   classDi is 'int8' while classDu is 'uint8'.
%   
%   See also TYPECAST, GPUARRAY, GPUARRAY/ONES, 
%   GPUARRAY/underlyingType.
%   


%   Copyright 2006-2020 The MathWorks, Inc.
