Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
46b9eceb
Commit
46b9eceb
authored
8 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Add some sanity checking when splitting cells.
This depth is way beyond our precision.
parent
44194d4e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!250
Add some sanity checking when splitting cells.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/space.c
+6
-0
6 additions, 0 deletions
src/space.c
src/space.h
+3
-0
3 additions, 0 deletions
src/space.h
with
9 additions
and
0 deletions
src/space.c
+
6
−
0
View file @
46b9eceb
...
...
@@ -1269,6 +1269,12 @@ void space_split_mapper(void *map_data, int num_elements, void *extra_data) {
atomic_cas
(
&
s
->
maxdepth
,
maxdepth
,
c
->
depth
);
}
/* If the depth is too large, we have a problem and should stop. */
if
(
s
->
maxdepth
>
space_cell_maxdepth
)
{
error
(
"Exceeded maximum depth (%d) when splitting cells, aborting"
,
space_cell_maxdepth
);
}
/* Split or let it be? */
if
(
count
>
space_splitsize
||
gcount
>
space_splitsize
)
{
...
...
This diff is collapsed.
Click to expand it.
src/space.h
+
3
−
0
View file @
46b9eceb
...
...
@@ -44,6 +44,9 @@
#define space_stretch 1.10f
#define space_maxreldx 0.25f
/* Maximum allowed depth of cell splits. */
#define space_cell_maxdepth 52
/* Split size. */
extern
int
space_splitsize
;
extern
int
space_maxsize
;
...
...
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