Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
preprocessor
Commits
1793078b
Verified
Commit
1793078b
authored
Mar 18, 2019
by
Sébastien Villemot
Browse files
Minor stylistic improvements
parent
92af6ffb
Pipeline
#994
passed with stage
in 1 minute and 44 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/DataTree.hh
View file @
1793078b
...
...
@@ -106,7 +106,7 @@ protected:
static
string
packageDir
(
const
string
&
package
);
private:
const
static
int
constants_precision
{
16
};
const
expr
static
int
constants_precision
{
16
};
//! The list of nodes
vector
<
unique_ptr
<
ExprNode
>>
node_list
;
...
...
src/ExprNode.hh
View file @
1793078b
...
...
@@ -181,8 +181,8 @@ class ExprNode
//! Used for caching of first order derivatives (when non-null)
map
<
int
,
expr_t
>
derivatives
;
const
static
int
min_cost_matlab
{
40
*
90
};
const
static
int
min_cost_c
{
40
*
4
};
const
expr
static
int
min_cost_matlab
{
40
*
90
};
const
expr
static
int
min_cost_c
{
40
*
4
};
inline
static
int
min_cost
(
bool
is_matlab
)
{
return
(
is_matlab
?
min_cost_matlab
:
min_cost_c
);
};
//! Cost of computing current node
...
...
src/ExternalFunctionsTable.hh
View file @
1793078b
...
...
@@ -53,11 +53,11 @@ public:
};
using
external_function_table_type
=
map
<
int
,
external_function_options
>
;
//! Symbol ID used when no external function exists that calculates the derivative
const
static
int
IDNotSet
=
-
1
;
const
expr
static
int
IDNotSet
=
-
1
;
//! Symbol ID used when the derivative is obtained from the top-level function
const
static
int
IDSetButNoNameProvided
=
-
2
;
const
expr
static
int
IDSetButNoNameProvided
=
-
2
;
//! Default number of arguments when nargs is not specified
const
static
int
defaultNargs
=
1
;
const
expr
static
int
defaultNargs
=
1
;
private:
//! Map containing options provided to external_functions()
external_function_table_type
externalFunctionTable
;
...
...
src/Statement.cc
View file @
1793078b
...
...
@@ -143,8 +143,8 @@ void
OptionsList
::
writeOutput
(
ostream
&
output
,
const
string
&
option_group
)
const
{
// Initialize option_group as an empty struct iff the field does not exist!
unsigned
idx
=
option_group
.
find_last_of
(
"."
);
if
(
idx
<
UINT_MAX
)
size_t
idx
=
option_group
.
find_last_of
(
"."
);
if
(
idx
!=
string
::
npos
)
{
output
<<
"if ~isfield("
<<
option_group
.
substr
(
0
,
idx
)
<<
",'"
<<
option_group
.
substr
(
idx
+
1
)
<<
"')"
<<
endl
;
output
<<
" "
<<
option_group
<<
" = struct();"
<<
endl
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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