Predefined macro from compiler to detect if TBB is on?

Predefined macro from compiler to detect if TBB is on?

Hi,

Is there some definition from compiler or TBB include files to use in source code conditional compilation statements for TBB/non-TBB variants?

For example,

#if defined(TBB_<some_macro>)
... TBB-based code
#else
... non TBB-based code
#endif

This is not to add own definitions.

Regards, Sergey
publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

This works only after any of TBB include files got to preprocessor.

I probably formulated my question wrong, sorry, but I wanted to determine if user turned "Intel Performance Libraries\TBB" option in IDE to "Yes", or no.

For example, how it is in general compiler, #ifdef _WIN32 use Windows source code, if not - use Linux.

I.e.
#if defined(TBB_IS_ON) // This is for example, not a real macro ))
#include <tbb/parallel_for.h>
... other TBB stuff...
#else
...use my own multi-threading...
#endif
 

Regards, Sergey

Inicie sesión para dejar un comentario.