Commit a4f39104 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

ensure correct result for qs size_t and add assert in cuda

parent 7530569d
...@@ -121,11 +121,11 @@ protected: ...@@ -121,11 +121,11 @@ protected:
#pragma omp task firstprivate(array, part, right, deep, infOrEqual) #pragma omp task firstprivate(array, part, right, deep, infOrEqual)
QsOmpTask(array,part + 1,right, deep - 1, infOrEqual); QsOmpTask(array,part + 1,right, deep - 1, infOrEqual);
// #pragma omp task default(none) firstprivate(array, part, right, deep, infOrEqual) // not needed // #pragma omp task default(none) firstprivate(array, part, right, deep, infOrEqual) // not needed
QsOmpTask(array,left,part - 1, deep - 1, infOrEqual); if(part) QsOmpTask(array,left,part - 1, deep - 1, infOrEqual);
} }
else { else {
QsSequentialStep(array,part + 1,right, infOrEqual); QsSequentialStep(array,part + 1,right, infOrEqual);
QsSequentialStep(array,left,part - 1, infOrEqual); if(part) QsSequentialStep(array,left,part - 1, infOrEqual);
} }
} }
} }
...@@ -183,7 +183,7 @@ public: ...@@ -183,7 +183,7 @@ public:
// Push the new task in the vector // Push the new task in the vector
omp_set_lock(&mutexShareVariable); omp_set_lock(&mutexShareVariable);
tasks.push_back(TaskInterval(part+1, ts.getRight(), ts.getDeep()-1)); tasks.push_back(TaskInterval(part+1, ts.getRight(), ts.getDeep()-1));
tasks.push_back(TaskInterval(ts.getLeft(), part-1, ts.getDeep()-1)); if(part) tasks.push_back(TaskInterval(ts.getLeft(), part-1, ts.getDeep()-1));
// We create new task but we are not working so inform other // We create new task but we are not working so inform other
numberOfThreadProceeding -= 1; numberOfThreadProceeding -= 1;
omp_unset_lock(&mutexShareVariable); omp_unset_lock(&mutexShareVariable);
......
Supports Markdown
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