bool DumpBuffer::Compare(DumpBuffer& buffer, float threshold, OutputFormat output, size_t length , size_t stride ,size_t start) { if(!CompareName(buffer)) return false; if(!CompareSize(buffer)){ cout << "Buffer " << getName() << " differ in size: " << getSize() << " / " << buffer.getSize() << " Bytes" << endl; return false; } return CompareData((void*)buffer.getData(), threshold, output, length ,stride ,start); }
bool DumpWrapper<T>::Compare(DumpBuffer& buffer, float threshold, OutputFormat output, size_t length , size_t stride ,size_t start) { if(!CompareName(buffer)) return false; if(!CompareSize(buffer)){ cout << "Buffer " << getName() << " differ in number of elements: " << getSize()/sizeof(T) << " / " << buffer.getSize()/sizeof(T) << endl; return false; } return CompareData((void*)buffer.getData(), threshold, output, length ,stride ,start); }
bool DumpBuffer::CompareSize(DumpBuffer& buffer) { if( getSize() == buffer.getSize()) return true; return false; }