Skip to content

Commit 972f609

Browse files
committed
[bench-dma] Force page size only on CRU internal
1 parent b3b4d56 commit 972f609

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CommandLineUtilities/ProgramDmaBench.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,12 @@ class ProgramDmaBench : public Program
597597

598598
size_t readoutPage(uintptr_t pageAddress, int64_t readoutCount, int64_t superpageCount, bool atStartOfSuperpage)
599599
{
600-
size_t pageSize = (mDataSource == DataSource::Internal) ? mPageSize : DataFormat::getOffset(reinterpret_cast<const char*>(pageAddress));
600+
size_t pageSize;
601+
if (mCardType == CardType::Cru && mDataSource == DataSource::Internal) {
602+
pageSize = mPageSize;
603+
} else {
604+
pageSize = DataFormat::getOffset(reinterpret_cast<const char*>(pageAddress));
605+
}
601606

602607
// Read out to file
603608
printToFile(pageAddress, pageSize, readoutCount, superpageCount, atStartOfSuperpage, pageSize == 0);

0 commit comments

Comments
 (0)