PPL Logo

topo::impl::vtxEqual Class Reference

Hack for PGI and Fujitsu STLport-using compilers because of their incorrect implementation of an STL routine. More...

#include <treeStrategy_nodeAware_minGens.h>


Public Member Functions

bool operator() (const SpanningTreeVertex &vtx, const int num)
bool operator() (const int num, const SpanningTreeVertex &vtx)
bool operator() (const int a, const int b)


Detailed Description

Hack for PGI and Fujitsu STLport-using compilers because of their incorrect implementation of an STL routine.

std::find_first_of(inpItr,inpItr,fwdItr,fwdItr) should use operator== for comparison. However, PGI's implementation just instantiates a std::equal_to<T> object with T=inpItrvalue_type and delegates the work to std::find_first_of(inpItr,inpItr,fwdItr,fwdItr,BinPred).

The implementation makes the wrong assumption that inpItr::value_type is the same as fwdItr::value_type and hence simply instantiates std::equal_to with one of their value_types. This breaks when inpItr and fwdItr have different value_types but the programmer has overloaded operator== to allow comparisons between compare inpItr::value_type and fwdItr::value_type.

We sidestep the issue by supplying our own binary predicate when we use std::find_first_of when charm is built with a PGI compiler.

Note:
: This hack is not needed from pgCC 10.1 onwards

Definition at line 76 of file treeStrategy_nodeAware_minGens.h.


Member Function Documentation

bool topo::impl::vtxEqual::operator() ( const SpanningTreeVertex vtx,
const int  num 
) [inline]

Definition at line 79 of file treeStrategy_nodeAware_minGens.h.

References topo::SpanningTreeVertex::id.

bool topo::impl::vtxEqual::operator() ( const int  num,
const SpanningTreeVertex vtx 
) [inline]

Definition at line 80 of file treeStrategy_nodeAware_minGens.h.

References topo::SpanningTreeVertex::id.

bool topo::impl::vtxEqual::operator() ( const int  a,
const int  b 
) [inline]

Definition at line 81 of file treeStrategy_nodeAware_minGens.h.


The documentation for this class was generated from the following file:

Generated on Mon Sep 21 08:34:31 2020 for Charm++ by  doxygen 1.5.5