mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
[muparser] Remove MUP_USE_OPENMP
We are not using OpenMP in the fish shell.
This commit is contained in:
parent
483930946b
commit
8364e59709
2 changed files with 1 additions and 61 deletions
|
@ -51,12 +51,6 @@
|
|||
*/
|
||||
#define MUP_BASETYPE double
|
||||
|
||||
/** \brief Activate this option in order to compile with OpenMP support.
|
||||
|
||||
OpenMP is used only in the bulk mode it may increase the performance a bit.
|
||||
*/
|
||||
//#define MUP_USE_OPENMP
|
||||
|
||||
#if defined(_UNICODE)
|
||||
/** \brief Definition of the basic parser string type. */
|
||||
#define MUP_STRING_TYPE std::wstring
|
||||
|
|
|
@ -36,10 +36,6 @@
|
|||
#include <sstream>
|
||||
#include <locale>
|
||||
|
||||
#ifdef MUP_USE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
/** \file
|
||||
|
@ -291,12 +287,6 @@ namespace mu
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MUP_USE_OPENMP
|
||||
ss << _T("; OPENMP");
|
||||
//#else
|
||||
// ss << _T("; NO_OPENMP");
|
||||
#endif
|
||||
|
||||
#if defined(MUP_MATH_EXCEPTIONS)
|
||||
ss << _T("; MATHEXC");
|
||||
//#else
|
||||
|
@ -1726,53 +1716,9 @@ namespace mu
|
|||
CreateRPN();
|
||||
|
||||
int i = 0;
|
||||
|
||||
#ifdef MUP_USE_OPENMP
|
||||
//#define DEBUG_OMP_STUFF
|
||||
#ifdef DEBUG_OMP_STUFF
|
||||
int *pThread = new int[nBulkSize];
|
||||
int *pIdx = new int[nBulkSize];
|
||||
#endif
|
||||
|
||||
int nMaxThreads = std::min(omp_get_max_threads(), s_MaxNumOpenMPThreads);
|
||||
int nThreadID = 0, ct = 0;
|
||||
omp_set_num_threads(nMaxThreads);
|
||||
|
||||
#pragma omp parallel for schedule(static, nBulkSize/nMaxThreads) private(nThreadID)
|
||||
for (i=0; i<nBulkSize; ++i)
|
||||
{
|
||||
nThreadID = omp_get_thread_num();
|
||||
results[i] = ParseCmdCodeBulk(i, nThreadID);
|
||||
|
||||
#ifdef DEBUG_OMP_STUFF
|
||||
#pragma omp critical
|
||||
{
|
||||
pThread[ct] = nThreadID;
|
||||
pIdx[ct] = i;
|
||||
ct++;
|
||||
}
|
||||
#endif
|
||||
results[i] = ParseCmdCodeBulk(i, 0);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OMP_STUFF
|
||||
FILE *pFile = fopen("bulk_dbg.txt", "w");
|
||||
for (i=0; i<nBulkSize; ++i)
|
||||
{
|
||||
fprintf(pFile, "idx: %d thread: %d \n", pIdx[i], pThread[i]);
|
||||
}
|
||||
|
||||
delete [] pIdx;
|
||||
delete [] pThread;
|
||||
|
||||
fclose(pFile);
|
||||
#endif
|
||||
|
||||
#else
|
||||
for (i=0; i<nBulkSize; ++i)
|
||||
{
|
||||
results[i] = ParseCmdCodeBulk(i, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
} // namespace mu
|
||||
|
|
Loading…
Reference in a new issue