function y = cumprod(x,varargin)
%MATLAB Code Generation Library Function

%   Copyright 2002-2016 The MathWorks, Inc.
%#codegen

coder.inline('always');
narginchk(1,inf);
coder.internal.prefer_const(varargin);
if islogical(x)
    x = cumop('cumprod',x,varargin{:});
    y = double(x);
else
    x = cumop('cumprod',x,varargin{:});
    y = x; % This copy may be removed after inlining.
end
