File: cmd_parse_mem_set.inl

package info (click to toggle)
intel-compute-runtime 25.44.36015.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 79,632 kB
  • sloc: cpp: 931,547; lisp: 2,074; sh: 719; makefile: 162; python: 21
file content (22 lines) | stat: -rw-r--r-- 703 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (C) 2024-2025 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include "shared/test/common/cmd_parse/gen_cmd_parse.h"

using namespace NEO;
using MEM_SET = GenStruct::MEM_SET;

template <>
MEM_SET *genCmdCast<MEM_SET *>(void *buffer) {
    auto pCmd = reinterpret_cast<MEM_SET *>(buffer);

    return (MEM_SET::DWORD_LENGTH::DWORD_LENGTH_EXCLUDES_DWORD_0_1 == pCmd->TheStructure.Common.DwordLength &&
            MEM_SET::INSTRUCTION_TARGETOPCODE::INSTRUCTION_TARGETOPCODE_MEM_SET == pCmd->TheStructure.Common.InstructionTarget_Opcode &&
            MEM_SET::CLIENT::CLIENT_2D_PROCESSOR == pCmd->TheStructure.Common.Client)
               ? pCmd
               : nullptr;
}