Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
02ae0b6c
Commit
02ae0b6c
authored
Jan 02, 2017
by
Matthieu Schaller
Browse files
post-merge fixes
parent
12c44561
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
02ae0b6c
...
...
@@ -566,6 +566,7 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
struct
part
*
parts
=
c
->
parts
;
struct
xpart
*
xparts
=
c
->
xparts
;
struct
gpart
*
gparts
=
c
->
gparts
;
struct
spart
*
sparts
=
c
->
sparts
;
const
double
pivot
[
3
]
=
{
c
->
loc
[
0
]
+
c
->
width
[
0
]
/
2
,
c
->
loc
[
1
]
+
c
->
width
[
1
]
/
2
,
c
->
loc
[
2
]
+
c
->
width
[
2
]
/
2
};
...
...
@@ -596,7 +597,7 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
const
int
bid
=
(
parts
[
k
].
x
[
0
]
>
pivot
[
0
])
*
4
+
(
parts
[
k
].
x
[
1
]
>
pivot
[
1
])
*
2
+
(
parts
[
k
].
x
[
2
]
>
pivot
[
2
]);
bucket_count
[
bid
]
++
;
buff
[
k
]
=
bid
;
buff
[
k
]
.
ind
=
bid
;
}
/* Set the buffer offsets. */
...
...
@@ -610,13 +611,13 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
for
(
int
bucket
=
0
;
bucket
<
8
;
bucket
++
)
{
for
(
int
k
=
bucket_offset
[
bucket
]
+
bucket_count
[
bucket
];
k
<
bucket_offset
[
bucket
+
1
];
k
++
)
{
int
bid
=
buff
[
k
];
int
bid
=
buff
[
k
]
.
ind
;
if
(
bid
!=
bucket
)
{
struct
part
part
=
parts
[
k
];
struct
xpart
xpart
=
xparts
[
k
];
while
(
bid
!=
bucket
)
{
int
j
=
bucket_offset
[
bid
]
+
bucket_count
[
bid
]
++
;
while
(
buff
[
j
]
==
bid
)
{
while
(
buff
[
j
]
.
ind
==
bid
)
{
j
++
;
bucket_count
[
bid
]
++
;
}
...
...
@@ -626,7 +627,7 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
}
parts
[
k
]
=
part
;
xparts
[
k
]
=
xpart
;
buff
[
k
]
=
bid
;
buff
[
k
]
.
ind
=
bid
;
}
bucket_count
[
bid
]
++
;
}
...
...
@@ -734,7 +735,7 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
(
gparts
[
k
].
x
[
1
]
>
pivot
[
1
])
*
2
+
(
gparts
[
k
].
x
[
2
]
>
pivot
[
2
]);
bucket_count
[
bid
]
++
;
buff
[
k
]
=
bid
;
buff
[
k
]
.
ind
=
bid
;
}
/* Set the buffer offsets. */
...
...
@@ -748,12 +749,12 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
for
(
int
bucket
=
0
;
bucket
<
8
;
bucket
++
)
{
for
(
int
k
=
bucket_offset
[
bucket
]
+
bucket_count
[
bucket
];
k
<
bucket_offset
[
bucket
+
1
];
k
++
)
{
int
bid
=
buff
[
k
];
int
bid
=
buff
[
k
]
.
ind
;
if
(
bid
!=
bucket
)
{
struct
gpart
gpart
=
gparts
[
k
];
while
(
bid
!=
bucket
)
{
int
j
=
bucket_offset
[
bid
]
+
bucket_count
[
bid
]
++
;
while
(
buff
[
j
]
==
bid
)
{
while
(
buff
[
j
]
.
ind
==
bid
)
{
j
++
;
bucket_count
[
bid
]
++
;
}
...
...
@@ -761,7 +762,7 @@ void cell_split(struct cell *c, ptrdiff_t parts_offset, ptrdiff_t sparts_offset,
memswap
(
&
buff
[
j
],
&
bid
,
sizeof
(
int
));
}
gparts
[
k
]
=
gpart
;
buff
[
k
]
=
bid
;
buff
[
k
]
.
ind
=
bid
;
}
bucket_count
[
bid
]
++
;
}
...
...
src/space.c
View file @
02ae0b6c
...
...
@@ -1840,7 +1840,7 @@ void space_split_recursive(struct space *s, struct cell *c,
temp
->
count
=
0
;
temp
->
gcount
=
0
;
temp
->
scount
=
0
;
temp
->
ti_old
=
e
->
ti_
current
;
temp
->
ti_old
=
c
->
ti_
old
;
temp
->
loc
[
0
]
=
c
->
loc
[
0
];
temp
->
loc
[
1
]
=
c
->
loc
[
1
];
temp
->
loc
[
2
]
=
c
->
loc
[
2
];
...
...
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