Skip to content

Commit 71bb3c5

Browse files
trbauerigcbot
authored andcommitted
G4_SendDesc simplify virtual functions
G4_SendDesc simplify virtual functions by removing getCaching()...
1 parent 4d11da1 commit 71bb3c5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

visa/G4_SendDescs.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ std::string vISA::ToSymbol(Caching l1, Caching l3) {
485485
else
486486
return ToSymbol(l1) + ToSymbol(l3);
487487
}
488-
489488
int ElemsPerAddr::getCount() const {
490489
if (!isChannelMask())
491490
return count;

visa/G4_SendDescs.hpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SPDX-License-Identifier: MIT
1414
#include <optional>
1515
#include <ostream>
1616
#include <string>
17+
#include <tuple>
1718
#include <utility>
1819

1920
namespace vISA {
@@ -321,15 +322,9 @@ class G4_SendDesc {
321322
// This is the size of the element in memory not the register file
322323
// (which might widen the result in GRF).
323324
virtual unsigned getElemSize() const = 0;
324-
325325
//
326-
// Returns the caching behavior of this message if known.
327-
// Returns Caching::INVALID if the message doesn't support caching
328-
// controls.
329-
virtual std::pair<Caching, Caching> getCaching() const = 0;
330-
Caching getCachingL1() const { return getCaching().first; }
331-
Caching getCachingL3() const { return getCaching().second; }
332-
virtual void setCaching(Caching l1, Caching l3) = 0;
326+
// retrieves the caching for L1
327+
virtual Caching getCachingL1() const = 0;
333328
//
334329
// generally in multiples of full GRFs, but a few exceptions such
335330
// as OWord and HWord operations may make this different
@@ -644,8 +639,14 @@ class G4_SendDescRaw : public G4_SendDesc {
644639
virtual size_t getSrc1LenRegs() const override;
645640
//
646641
virtual SendAccess getAccessType() const override { return accessType; }
647-
virtual std::pair<Caching, Caching> getCaching() const override;
648-
virtual void setCaching(Caching l1, Caching l3) override;
642+
//
643+
// Returns the caching behavior of this message if known.
644+
// Returns Caching::INVALID if the message doesn't support caching
645+
// controls.
646+
Caching getCachingL1() const override { return getCaching().first; }
647+
Caching getCachingL3() const { return getCaching().second; }
648+
std::pair<Caching, Caching> getCaching() const;
649+
void setCaching(Caching l1, Caching l3);
649650
//
650651
// If the message has an immediate address offset,
651652
// this returns that offset. The offset is in bytes.

0 commit comments

Comments
 (0)