Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
18b6ad31
Commit
18b6ad31
authored
9 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
check file integrity before accepting it into online memory
parent
36bbaf08
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pub/lib/mem.cpp
+1
-0
1 addition, 0 deletions
pub/lib/mem.cpp
pub/lib/olf.cpp
+11
-0
11 additions, 0 deletions
pub/lib/olf.cpp
pub/lib/olf.hpp
+1
-0
1 addition, 0 deletions
pub/lib/olf.hpp
with
13 additions
and
0 deletions
pub/lib/mem.cpp
+
1
−
0
View file @
18b6ad31
...
...
@@ -77,6 +77,7 @@ namespace NOlm {
//! Store file f in online memory. If overwrite and k!=-1, overwrite file k.
void
mem_store
(
POlo
f
,
int
k
)
{
f
->
check_integrity
();
if
(
overwrite
&&
k
!=-
1
){
// replace file k
if
(
k
>=
MOM
.
size
()
)
...
...
This diff is collapsed.
Click to expand it.
pub/lib/olf.cpp
+
11
−
0
View file @
18b6ad31
...
...
@@ -59,6 +59,17 @@ string COlo::info_line( int j ) const
}
//! Check integrity, to be called before accepting a new file into online memory.
void
COlo
::
check_integrity
()
const
{
if
(
nJ
()
<
1
)
throw
S
(
"BUG: File has no slices"
);
if
(
nJ
()
>
1
&&
nZ
()
<
1
)
throw
S
(
"BUG: File has several slices but no z coordinate"
);
}
//! Return value of iz-th z-variable for slice j.
RObj
COlo
::
z
(
int
j
,
int
iz
)
const
...
...
This diff is collapsed.
Click to expand it.
pub/lib/olf.hpp
+
1
−
0
View file @
18b6ad31
...
...
@@ -32,6 +32,7 @@ class COlo {
void
remove_z
(
int
iz
);
string
info_line
(
int
j
)
const
;
void
check_integrity
()
const
;
virtual
void
copy_mainvec
(
ROlo
fin
)
=
0
;
...
...
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