Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dseries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dseries
Commits
82f10685
Verified
Commit
82f10685
authored
5 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
is64bit.m: test the operating system, not MATLAB’s index size
Closes:
#41
parent
d6c536f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utilities/is/is64bit.m
+12
-4
12 additions, 4 deletions
src/utilities/is/is64bit.m
with
12 additions
and
4 deletions
src/utilities/is/is64bit.m
+
12
−
4
View file @
82f10685
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 <http://www.gnu.org/licenses/>.
[
~
,
maxsize
]
=
computer
();
b
=
(
maxsize
>
2
^
31
);
\ No newline at end of file
if
ispc
arch
=
getenv
(
'PROCESSOR_ARCHITECTURE'
);
else
[
~
,
arch
]
=
system
(
'uname -m'
);
end
b
=
~
isempty
(
strfind
(
arch
,
'64'
));
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment