map does not work with PGI

Hi all,

I am using “map” in my code where first argument is a struct as:

struct Coord


and then define the map as:

map<Coord,int> pointToIndex;
for(vector::iterator it=cells.begin();it!=cells.end();it++) {
for(int j=0;j<4;j++) {
Coord point=(*it)[j];

and the line which is bold above returns an compilation error when I compile it with pgCC (PGI) but the code is compiler well in gcc under Linux. I don’t know why PGI does not accept “struct” in “map”. Can anybody help? Have you experienced this too?



Hi Danesh,

How did you define your Coord? Can you post a short and complete example?