function varargout = minres(varargin)
%MINRES   Minimum Residual Method for gpuArray.
%   X = MINRES(A,B)
%   X = MINRES(A,B)
%   X = MINRES(A,B,TOL)
%   X = MINRES(A,B,TOL,MAXIT)
%   X = MINRES(A,B,TOL,MAXIT,M)
%   X = MINRES(A,B,TOL,MAXIT,M1,M2)
%   X = MINRES(A,B,TOL,MAXIT,M1,M2,X0)
%   [X,FLAG] = MINRES(A,B,...)
%   [X,FLAG,RELRES] = MINRES(A,B,...)
%   [X,FLAG,RELRES,ITER] = MINRES(A,B,...)
%   [X,FLAG,RELRES,ITER,RESVEC] = MINRES(A,B,...)
%      
%   Note that B must be a non-sparse column vector.
%   
%   
%   Example:
%   Using MINRES to solve a large system of gpuArray data:
%    
%       n = 100; 
%       dOnes = gpuArray.ones(n,1); 
%       dA = spdiags([-2*dOnes 4*dOnes -2*dOnes],-1:1,n,n);
%       db = full(sum(dA,2)); 
%       tol = 1e-10; 
%       maxit = 50;
%       dM = spdiags(4*dOnes, 0, n, n); 
%       
%       dX = MINRES(dA, db, tol, maxit, dM);
%   
%   See also MINRES, GPUARRAY, ONES, SPDIAGS, SUM.


%   Copyright 1984-2018 The MathWorks, Inc.

% Ensure that only the data inputs (args 1,2,5,6,7) are on the GPU
varargin = prepareSolverInputs(varargin, [1 1 0 0 1 1 1]);

% Call the local copy of the MATLAB code
[varargout{1:nargout}] = parallel.internal.flowthrough.minres(varargin{:});
