Skip to content

Commit f5b55c5

Browse files
Remove code duplication from cmd_parse_genX files
Change-Id: I64bb9d8be018ea4da6cb006439c58b1d52100e06 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
1 parent 56d10d7 commit f5b55c5

18 files changed

+599
-1483
lines changed

runtime/gen10/hw_cmds.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
#include "igfxfmid.h"
1414
#define TILERESOURCE_CHICKENBIT_VECTOR_ADDRESS 0x4DFC
1515
#define TILERESOURCE_CHICKENBIT_VECTOR_BITMASK (1UL << 8)
16-
struct CnlParse;
16+
template <class T>
17+
struct CmdParse;
1718
namespace OCLRT {
1819

1920
struct GEN10 {
@@ -22,7 +23,7 @@ struct GEN10 {
2223
};
2324

2425
struct CNLFamily : public GEN10 {
25-
using PARSE = CnlParse;
26+
using PARSE = CmdParse<CNL>;
2627
using GfxFamily = CNLFamily;
2728
using WALKER_TYPE = GPGPU_WALKER;
2829
static const GPGPU_WALKER cmdInitGpgpuWalker;

runtime/gen8/hw_cmds_base.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
#include "igfxfmid.h"
1414

1515
//forward declaration for parsing logic
16-
struct BdwParse;
16+
template <class T>
17+
struct CmdParse;
1718
namespace OCLRT {
1819

1920
struct GEN8 {
2021
#include "runtime/gen8/hw_cmds_generated.h"
2122
#include "runtime/gen8/hw_cmds_generated_patched.h"
2223
};
2324
struct BDWFamily : public GEN8 {
24-
using PARSE = BdwParse;
25+
using PARSE = CmdParse<BDW>;
2526
using GfxFamily = BDWFamily;
2627
using WALKER_TYPE = GPGPU_WALKER;
2728
static const GPGPU_WALKER cmdInitGpgpuWalker;

runtime/gen9/hw_cmds_base.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include "hw_info.h"
1313
#include "igfxfmid.h"
1414

15-
struct SklParse;
15+
template <class T>
16+
struct CmdParse;
1617

1718
namespace OCLRT {
1819

@@ -22,7 +23,7 @@ struct GEN9 {
2223
};
2324

2425
struct SKLFamily : public GEN9 {
25-
using PARSE = SklParse;
26+
using PARSE = CmdParse<SKL>;
2627
using GfxFamily = SKLFamily;
2728
using WALKER_TYPE = GPGPU_WALKER;
2829
static const GPGPU_WALKER cmdInitGpgpuWalker;

0 commit comments

Comments
 (0)