Verified Commit 82f10685 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

is64bit.m: test the operating system, not MATLAB’s index size

Closes: #41
parent d6c536f5
function b = is64bit()
% Returns true iff Matlab 64bit version is used.
% Returns true iff operating system is 64-bit
% The test logic is the same as in dynare.m when selecting the preprocessor
% flavour.
% Copyright (C) 2017 Dynare Team
% Copyright (C) 2017-2019 Dynare Team
% This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
......@@ -17,5 +20,10 @@ function b = is64bit()
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <>.
[~, maxsize] = computer();
b = (maxsize > 2^31);
\ No newline at end of file
if ispc
[~, arch] = system('uname -m');
b = ~isempty(strfind(arch, '64'));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment