Skip to content
Snippets Groups Projects
Commit 458174da authored by Roland Greffe's avatar Roland Greffe
Browse files

Faster grouped saving

parent eed10753
Branches
Tags
No related merge requests found
Pipeline #12880 failed
...@@ -33,6 +33,9 @@ namespace gmshfem::post ...@@ -33,6 +33,9 @@ namespace gmshfem::post
// real part // real part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
for(auto j = 0U; j < nbrNodesByElements; ++j) { for(auto j = 0U; j < nbrNodesByElements; ++j) {
...@@ -47,6 +50,9 @@ namespace gmshfem::post ...@@ -47,6 +50,9 @@ namespace gmshfem::post
// imaginary part // imaginary part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].clear(); gmshData[i].clear();
...@@ -62,6 +68,9 @@ namespace gmshfem::post ...@@ -62,6 +68,9 @@ namespace gmshfem::post
else { else {
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
for(auto j = 0U; j < nbrNodesByElements; ++j) { for(auto j = 0U; j < nbrNodesByElements; ++j) {
...@@ -84,6 +93,9 @@ namespace gmshfem::post ...@@ -84,6 +93,9 @@ namespace gmshfem::post
// real part // real part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].reserve(3); gmshData[i].reserve(3);
...@@ -101,6 +113,9 @@ namespace gmshfem::post ...@@ -101,6 +113,9 @@ namespace gmshfem::post
// imaginary part // imaginary part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].clear(); gmshData[i].clear();
...@@ -119,6 +134,9 @@ namespace gmshfem::post ...@@ -119,6 +134,9 @@ namespace gmshfem::post
else { else {
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].reserve(3); gmshData[i].reserve(3);
...@@ -144,6 +162,9 @@ namespace gmshfem::post ...@@ -144,6 +162,9 @@ namespace gmshfem::post
// real part // real part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].reserve(9); gmshData[i].reserve(9);
...@@ -163,6 +184,9 @@ namespace gmshfem::post ...@@ -163,6 +184,9 @@ namespace gmshfem::post
// imaginary part // imaginary part
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].clear(); gmshData[i].clear();
...@@ -183,6 +207,9 @@ namespace gmshfem::post ...@@ -183,6 +207,9 @@ namespace gmshfem::post
else { else {
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp for #pragma omp for
#endif
#ifdef DDMGPU
#pragma omp parallel for
#endif #endif
for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) { for(auto i = 0ULL; i < gmshElementsTags.size(); ++i) {
gmshData[i].reserve(9); gmshData[i].reserve(9);
...@@ -242,6 +269,7 @@ namespace gmshfem::post ...@@ -242,6 +269,7 @@ namespace gmshfem::post
#ifdef HAVE_OPENMP #ifdef HAVE_OPENMP
#pragma omp parallel num_threads(omp::getMaxThreads()) #pragma omp parallel num_threads(omp::getMaxThreads())
#endif #endif
{ {
const unsigned int numThreads = omp::getNumThreads(); const unsigned int numThreads = omp::getNumThreads();
const unsigned int myThreadID = omp::getThreadNum(); const unsigned int myThreadID = omp::getThreadNum();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment