Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nifty_gridder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ift
nifty_gridder
Commits
04c1d771
Commit
04c1d771
authored
Oct 08, 2019
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more sanity checks
parent
73a27198
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
gridder_cxx.h
gridder_cxx.h
+10
-11
No files found.
gridder_cxx.h
View file @
04c1d771
...
...
@@ -472,7 +472,7 @@ class Baselines
shift
=
0
;
while
((
idx_t
(
1
)
<<
shift
)
<
nchan
)
++
shift
;
mask
=
(
idx_t
(
1
)
<<
shift
)
-
1
;
myassert
(
nrows
*
nchan
<
hugeval
,
"too many entries in MS"
);
myassert
(
nrows
*
(
mask
+
1
)
<
hugeval
,
"too many entries in MS"
);
f_over_c
.
resize
(
nchan
);
for
(
size_t
i
=
0
;
i
<
nchan
;
++
i
)
{
...
...
@@ -1293,6 +1293,7 @@ template<typename Serv> void wminmax(const GridderConfig &gconf,
template
<
typename
T
>
void
update_idx
(
vector
<
T
>
&
v
,
vector
<
T
>
&
vold
,
const
vector
<
T
>
&
add
,
const
vector
<
T
>
&
del
)
{
myassert
(
v
.
size
()
>=
del
.
size
(),
"must not happen"
);
vold
.
resize
(
0
);
vold
.
reserve
((
v
.
size
()
+
add
.
size
())
-
del
.
size
());
auto
iin
=
v
.
begin
(),
ein
=
v
.
end
();
...
...
@@ -1301,19 +1302,17 @@ template<typename T> void update_idx(vector<T> &v, vector<T> &vold,
while
(
iin
!=
ein
)
{
if
(
irem
!=
erem
)
{
while
((
iin
!=
ein
)
&&
(
irem
!=
erem
)
&&
(
*
iin
==*
irem
))
{
++
irem
;
++
iin
;
}
// skip the entries to be removed
if
(
iin
==
ein
)
break
;
}
if
(
iadd
!=
eadd
)
while
((
iadd
!=
eadd
)
&&
(
*
iadd
<*
iin
))
vold
.
push_back
(
*
(
iadd
++
));
vold
.
push_back
(
*
(
iin
++
));
if
((
irem
!=
erem
)
&&
(
*
iin
==*
irem
))
{
++
irem
;
++
iin
;
}
// skip removed entry
else
if
((
iadd
!=
eadd
)
&&
(
*
iadd
<*
iin
))
vold
.
push_back
(
*
(
iadd
++
));
// add new entry
else
vold
.
push_back
(
*
(
iin
++
));
}
myassert
(
irem
==
erem
,
"must not happen"
);
while
(
iadd
!=
eadd
)
vold
.
push_back
(
*
(
iadd
++
));
myassert
(
vold
.
size
()
==
(
v
.
size
()
+
add
.
size
())
-
del
.
size
(),
"must not happen"
);
v
.
swap
(
vold
);
}
...
...
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