function out = fftw(x, info)
%MATLAB Code Generation Library Function

%   Copyright 2016-2019 The MathWorks, Inc.
%#codegen
    narginchk(1,2);
    coder.internal.assert(coder.internal.isCharOrScalarString(x), ...
                          'MATLAB:fftfcn:FirstInputNotString');

    % Silently ignore this function call if we are not using the matlab FFTW library.
    if coder.internal.fft.CUFFTEnabled || ~coder.internal.fft.FFTWEnabled || ...
            ~coder.internal.runs_in_matlab
        out = '';
        return
    end

    if nargin == 1
        if nargout == 1
            out = coder.internal.fft.fftw(x);
        else
            coder.internal.fft.fftw(x);
        end
    else
        if nargout == 1
            out = coder.internal.fft.fftw(x, info);
        else
            coder.internal.fft.fftw(x, info);
        end
    end
end
