Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
Gauthier Quesnel
irritator
Commits
ee0a470f
Commit
ee0a470f
authored
Sep 11, 2020
by
Gauthier Quesnel
Browse files
core: use unreachable code to improve simulation
parent
8807315f
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/include/irritator/core.hpp
View file @
ee0a470f
...
...
@@ -97,6 +97,14 @@
} \
} while (0)
#if defined(__GNUC__)
#define irt_unreachable() __builtin_unreachable();
#elif defined(_MSC_VER)
#define irt_unreachable() __assume(0)
#else
#define irt_unreachable()
#endif
namespace
irt
{
using
i8
=
int8_t
;
...
...
@@ -5690,7 +5698,7 @@ struct simulation
return
f
(
flow_models
);
}
return
status
::
unknown_dynamics
;
irt_unreachable
()
;
}
template
<
typename
Function
>
...
...
@@ -5803,7 +5811,7 @@ struct simulation
return
f
(
flow_models
);
}
return
status
::
unknown_dynamics
;
irt_unreachable
()
;
}
status
get_output_port_index
(
const
model
&
mdl
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment