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
solverstack
ScalFMM
Commits
7530569d
Commit
7530569d
authored
Jan 22, 2016
by
BRAMAS Berenger
Browse files
ensure correct result for qs size_t and add assert in cuda
parent
11b6f336
Changes
2
Hide whitespace changes
Inline
Side-by-side
Src/GroupTree/StarPUUtils/FStarPUCudaWrapper.hpp
View file @
7530569d
...
...
@@ -269,6 +269,7 @@ public:
FAssertLF
(
outsideInteractions
[
safeOuterInteractions
[
counterInnerCell
]].
insideIdxInBlock
<
outsideInteractions
[
idxInter
].
insideIdxInBlock
);
counterInnerCell
+=
1
;
FAssertLF
(
counterInnerCell
<=
nbInteractions
);
safeOuterInteractions
[
counterInnerCell
]
=
safeOuterInteractions
[
counterInnerCell
-
1
];
}
else
{
...
...
@@ -291,6 +292,7 @@ public:
FAssertLF
(
outsideInteractions
[
safeOuterInteractions
[
counterInnerCell
]].
outsideIdxInBlock
<
outsideInteractions
[
idxInter
].
outsideIdxInBlock
);
counterInnerCell
+=
1
;
FAssertLF
(
counterInnerCell
<=
nbInteractions
);
safeOuterInteractions
[
counterInnerCell
]
=
safeOuterInteractions
[
counterInnerCell
-
1
];
}
else
{
...
...
Src/Utils/FQuickSort.hpp
View file @
7530569d
...
...
@@ -89,13 +89,7 @@ protected:
static
IndexType
QsPartition
(
SortType
array
[],
IndexType
left
,
IndexType
right
,
const
infOrEqualPtr
infOrEqual
){
Swap
(
array
[
right
],
array
[((
right
-
left
)
/
2
)
+
left
]);
IndexType
idx
=
left
;
while
(
idx
<
right
&&
infOrEqual
(
array
[
idx
],
array
[
right
])){
idx
+=
1
;
}
left
=
idx
;
for
(
;
idx
<
right
;
++
idx
){
for
(
IndexType
idx
=
left
;
idx
<
right
;
++
idx
){
if
(
infOrEqual
(
array
[
idx
],
array
[
right
])
){
Swap
(
array
[
idx
],
array
[
left
]);
left
+=
1
;
...
...
@@ -113,7 +107,7 @@ protected:
if
(
left
<
right
){
const
IndexType
part
=
QsPartition
(
array
,
left
,
right
,
infOrEqual
);
QsSequentialStep
(
array
,
part
+
1
,
right
,
infOrEqual
);
QsSequentialStep
(
array
,
left
,
part
-
1
,
infOrEqual
);
if
(
part
)
QsSequentialStep
(
array
,
left
,
part
-
1
,
infOrEqual
);
}
}
...
...
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