Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Shlok_P_
Beginner
63 Views

Having issues compiling code of A Parallel Stable Sort Using C++11 TBB

Intel has already provided the source code for this. But I assume there is some issue with code in the file named "test.cpp" at line number 276 where it says.Severity Code Description Project File Line Suppression State  -> Error name followed by "::" must be a class or namespace name 

Here is the link to get the source code

https://software.intel.com/en-us/articles/a-parallel-stable-sort-using-c...

Can anyone help me fix this issue?

 

Thank You in advance 

0 Kudos
3 Replies
Alexei_K_Intel
Employee
63 Views

Hi Shlok,

Could you share the compiler version and the full output related to the observed error, please? In addition, you may want to consider the similar question: https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/706027.

Regards,
Alex

 

Shlok_P_
Beginner
63 Views

Thank You Alex for your reply

 

I am using compiler - Intel Compiler 16.0(Under the Intel Parallel Studio XE 2016 product group) 2016 in IDE Microsoft Visual Studio 2015 Community

 

full output related to the observed error - 

Severity Code Description Project File Line Suppression State
Error (active) name followed by '::' must be a class or namespace name Gpu621 c:\Users\SP\Documents\Visual Studio 2015\Projects\Gpu621\Gpu621\test.cpp 276

 

 pss::parallel_stable_sort( i, i+n, KeyCompare(KeyCompare::Live) ); // THIS IS THE line in which I am getting error and the highlighted part is pss

I hope this is what you are asking for. 

Thank You really appreciate it 

Alexei_K_Intel
Employee
63 Views

The provided example does not have Visual Studio project file to be built. Do you define the threading engine that should be used by the test? The makefile uses the compiler switch "-D" to define one of the four macros to enable particular threading. Try to add one of the following macro definitions at the beginning  of test.cpp:

#define USE_CILKPLUS 1
#define USE_TBB_LOWLEVEL 1
#define USE_TBB_HIGHLEVEL 1
#define USE_OPENMP 1

Pay attention that you need only one macro definition. 

Regards,
Alex
 

Reply