ComputationRenumberer::PointerCompare< T > Struct Template Reference

Public Member Functions

bool operator() (const std::vector< T > *ptr1, const std::vector< T > *ptr2) const
 

Detailed Description

template<class T>
struct kaldi::nnet3::ComputationRenumberer::PointerCompare< T >

Definition at line 202 of file nnet-optimize-utils.cc.

Member Function Documentation

◆ operator()()

bool operator() ( const std::vector< T > *  ptr1,
const std::vector< T > *  ptr2 
) const
inline

Definition at line 208 of file nnet-optimize-utils.cc.

References ComputationRenumberer::CreateRenumbering().

209  {
210  size_t size1 = ptr1->size(), size2 = ptr2->size();
211  if (size1 < size2) return true;
212  else if (size1 > size2) return false;
213  else return (*ptr1 < *ptr2); // use the std::vector operator <, which is
214  // lexicographical comparison.
215  }

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