Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
INMOST
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Terekhov
INMOST
Commits
d5434456
Commit
d5434456
authored
Jul 01, 2016
by
Kirill Terekhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup deprecated code from autodiff
parent
de11b0be
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
240 additions
and
1532 deletions
+240
-1532
Source/Autodiff/autodiff.cpp
Source/Autodiff/autodiff.cpp
+101
-753
Source/Headers/inmost_autodiff.h
Source/Headers/inmost_autodiff.h
+115
-765
Source/Headers/inmost_variable.h
Source/Headers/inmost_variable.h
+24
-14
No files found.
Source/Autodiff/autodiff.cpp
View file @
d5434456
This diff is collapsed.
Click to expand it.
Source/Headers/inmost_autodiff.h
View file @
d5434456
This diff is collapsed.
Click to expand it.
Source/Headers/inmost_variable.h
View file @
d5434456
...
...
@@ -266,16 +266,8 @@ namespace INMOST
if
(
pregval
!=
ENUMUNDEF
)
{
mask
=
aut
.
GetDynamicMask
(
pregval
);
if
(
pregval
<
AD_CTAG
)
{
value_tag
=
aut
.
GetDynamicValueTag
(
pregval
);
index_tag
=
aut
.
GetDynamicIndexTag
(
pregval
);
}
else
{
value_tag
=
aut
.
GetStaticValueTag
(
pregval
);
index_tag
=
Tag
();
}
value_tag
=
aut
.
GetDynamicValueTag
(
pregval
);
index_tag
=
aut
.
GetDynamicIndexTag
(
pregval
);
}
}
dynamic_variable
(
const
dynamic_variable
&
other
)
:
aut
(
other
.
aut
),
index_tag
(
other
.
index_tag
),
value_tag
(
other
.
value_tag
),
mask
(
other
.
mask
),
comp
(
other
.
comp
)
{}
...
...
@@ -340,7 +332,10 @@ namespace INMOST
Tag
variable_tag
;
INMOST_DATA_ENUM_TYPE
comp
;
public:
stored_variable
(
Tag
t
,
INMOST_DATA_ENUM_TYPE
pcomp
=
0
)
:
variable_tag
(
t
),
comp
(
pcomp
)
{}
stored_variable
(
Tag
t
,
INMOST_DATA_ENUM_TYPE
pcomp
=
0
)
:
variable_tag
(
t
),
comp
(
pcomp
)
{
assert
(
t
.
GetDataType
()
==
DATA_REAL
||
t
.
GetDataType
()
==
DATA_VARIABLE
);
}
stored_variable
(
const
stored_variable
&
other
)
:
variable_tag
(
other
.
variable_tag
),
comp
(
other
.
comp
)
{}
stored_variable
&
operator
=
(
const
stored_variable
&
other
)
{
...
...
@@ -348,12 +343,27 @@ namespace INMOST
comp
=
other
.
comp
;
return
*
this
;
}
INMOST_DATA_REAL_TYPE
Value
(
const
Storage
&
e
)
const
{
return
e
->
VariableArray
(
variable_tag
)[
comp
].
GetValue
();}
INMOST_DATA_REAL_TYPE
Value
(
const
Storage
&
e
)
const
{
if
(
variable_tag
.
GetDataType
()
==
DATA_VARIABLE
)
return
e
->
VariableArray
(
variable_tag
)[
comp
].
GetValue
();
else
if
(
variable_tag
.
GetDataType
()
==
DATA_REAL
)
return
e
->
RealArray
(
variable_tag
)[
comp
];
}
multivar_expression
Variable
(
const
Storage
&
e
)
const
{
return
e
->
VariableArray
(
variable_tag
)[
comp
];
if
(
variable_tag
.
GetDataType
()
==
DATA_VARIABLE
)
return
e
->
VariableArray
(
variable_tag
)[
comp
];
else
if
(
variable_tag
.
GetDataType
()
==
DATA_REAL
)
return
variable
(
e
->
RealArray
(
variable_tag
)[
comp
]);
}
multivar_expression
operator
[](
const
Storage
&
e
)
const
{
return
e
->
VariableArray
(
variable_tag
)[
comp
];}
multivar_expression
operator
[](
const
Storage
&
e
)
const
{
if
(
variable_tag
.
GetDataType
()
==
DATA_VARIABLE
)
return
e
->
VariableArray
(
variable_tag
)[
comp
];
else
if
(
variable_tag
.
GetDataType
()
==
DATA_REAL
)
return
variable
(
e
->
RealArray
(
variable_tag
)[
comp
]);
}
Tag
VariableTag
()
{
return
variable_tag
;}
void
GetVariation
(
const
Storage
&
e
,
Sparse
::
Row
&
r
)
const
{
(
*
this
)[
e
].
GetJacobian
(
1.0
,
r
);
}
void
GetVariation
(
const
Storage
&
e
,
Sparse
::
RowMerger
&
r
)
const
{
(
*
this
)[
e
].
GetJacobian
(
1.0
,
r
);
}
...
...
Write
Preview
Markdown
is supported
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