Une nouvelle version du portail de gestion des comptes externes sera mise en production lundi 09 août. Elle permettra d'allonger la validité d'un compte externe jusqu'à 3 ans. Pour plus de détails sur cette version consulter : https://doc-si.inria.fr/x/FCeS

Commit 7530569d authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

ensure correct result for qs size_t and add assert in cuda

parent 11b6f336
......@@ -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{
......
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment