function data = randperm( obj, varargin )
%RANDPERM  Build a gpuArray of randomly permuted indices.
%   D = randperm(STREAM,...) uses the specified parallel.gpu.RandStream to
%   generate a vector of randomly permuted indices. See gpuArray.randperm 
%   for details of the supported randperm syntaxes.
%
%   See also gpuArray.randperm,
%            parallel.gpu.RandStream/rand,
%            parallel.gpu.RandStream/randi,
%            parallel.gpu.RandStream/randn

%   Copyright 2015 The MathWorks, Inc.

data = gpuArray.randperm( obj, varargin{:} );