opencog / cogutil

Very low-level C++ programming utilities used by several components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OC_OMP support is incorrect.

linas opened this issue · comments

Follow-on to pull-req #217

So: FIND_PACKAGE(ParallelSTL) works as designed, and cmake sets it correctly:

FIND_PACKAGE(ParallelSTL)
IF (PARALLEL_STL_FOUND)
   ADD_DEFINITIONS(-DHAVE_PARALLEL_STL)
ENDIF (PARALLEL_STL_FOUND)

However, the users of oc_omp.h (or at least, this user) do not have a -DHAVE_PARALLEL_STL in their code, nor do they have any #define OC_OMP either. As a result, those wonderful parallel loops are not actually .. parallel.

Moving to c++17 per #177 seems a little more important, now.

I think this can be closed, reopen otherwise.

Well, I don't know if this should be re-opened or not ... because I can't tell if its a bug or a feature. Basically, OC_OMP didn't do what I thought it did, and this was a surprise. My plan is to avoid it in new code. So maybe just ignoring this is best.