dthuerck / mapmap_cpu

A high-performance general-purpose MRF MAP solver, heavily exploiting SIMD instructions.
BSD 3-Clause "New" or "Revised" License
102 stars 51 forks source link

Remove 'using' directive, it was making compilation fail #33

Closed oleg-alexandrov closed 2 years ago

oleg-alexandrov commented 2 years ago

Greetings. Thank you for the nice mapmap package. I don't use it myself, but some of my dependencies do.

I found an issue when compiling mapmap with an external TBB (I have a lot of dependencies, and including their code internally as your project does is not practical. I compiled with TBB 2021.5.0 from conda-forge.)

The compilation was failing because of an "ambiguous tbb" error, which I traced to your code having the line "using namespace oneapi". Normally such things are not good in header files, as they affect all the namespace resolution for anybody who ends up using your code one way or another.

The mapmap code, its tests, and demo do build with this line removed. If it also works for you, maybe this change can be accepted as part of your code. Thanks.

dthuerck commented 2 years ago

No objections from my side - thank you!

oleg-alexandrov commented 2 years ago

It looks that the automated build for no reasons connected to the pull request; it failed even before starting to build.