GTPin: gtpin::IGtIargFactory Class Reference

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
gtpin::IGtIargFactory Class Reference
GTPin: High-Level Instrumentation (HLI) Parameters and Arguments

Factory and container of HLI function arguments and return value representations. More...

`#include <igt_iarg_factory.h>`

## Public Member Functions
virtual const IGtIarg & | MakePrime (GtHliParamTraits paramTraits, GtIargImmValue value)=0
| Create an argument of GtIargType::PRIME type, passed by an immediate value.
virtual const IGtIarg & | MakePrime (GtHliParamTraits paramTraits, const GtReg &reg)=0
| Create an argument of GtIargType::PRIME type, passed by a register value.
virtual const IGtIarg & | MakeHostPtr (const void *hostPtr)=0
| Create an argument of GtIargType::HOST_PTR type.
virtual const IGtIarg & | MakeDevicePtr (const GtReg &addrReg)=0
| Create an argument of GtIargType::DEVICE_PTR type, passed by a register value.
virtual const IGtIarg & | MakeBufferOffset (uint32_t offset)=0
| Create an argument of GtIargType::BUFFER_OFFSET type, passed by a 32-bit immediate value.
virtual const IGtIarg & | MakeBufferOffset (const GtReg &offsetReg)=0
| Create an argument of GtIargType::BUFFER_OFFSET type, passed by a register value.
virtual const IGtIarg & | MakeTid ()=0
| Create an argument of GtIargType::TID type.
virtual const IGtIarg & | MakeFfTid ()=0
| Create an argument of GtIargType::FFTID type.
virtual const IGtIarg & | MakeGrfRange (uint32_t firstReg, uint32_t numRegs)=0
| Create an argument of GtIargType::GRF_RANGE type.
virtual const IGtIarg & | MakeConstGrfRange (uint32_t firstReg, uint32_t numRegs)=0
| Create an argument of GtIargType::CONST_GRF_RANGE type.
virtual const IGtIarg & | MakeSimdMask (bool ignoreCeMask, uint32_t execMask, const GtPredicate &predicate)=0
| Create an argument of GtIargType::SIMD_MASK type.
virtual const IGtIarg & | MakeInsOpMask (const IGtIns &ins)=0
virtual const IGtIarg & | MakeSlmPtr ()=0
| Create an argument of GtIargType::SLM_PTR type.
virtual const IGtIret & | MakeIret (GtHliParamTraits retTraits, const GtReg &reg)=0
virtual const IGtIret & | MakeIret ()=0

## Detailed Description

Factory and container of HLI function arguments and return value representations.

Each instance of this factory is associated with a single instrumentation session. The factory methods create IGtIarg objects and store them in the internal container. All these objects are destroyed when the instrumentation session ends, so the methods for freeing individual IGtIarg instances are not provided.

Availability:
  - IGtTool::OnKernelBuild

## Member Function Documentation

virtual const IGtIarg& gtpin::IGtIargFactory::MakeBufferOffset | ( | uint32_t | offset | ) | `[pure virtual]`

Create an argument of GtIargType::BUFFER_OFFSET type, passed by a 32-bit immediate value.

Parameters:

  [in] | offset | Offset in the GTPin profile buffer

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeBufferOffset | ( | const GtReg & | offsetReg | ) | `[pure virtual]`

Create an argument of GtIargType::BUFFER_OFFSET type, passed by a register value.

Parameters:

  [in] | offsetReg | Register that holds an offset in the GTPin profile buffer

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeConstGrfRange | ( | uint32_t | firstReg,
|  | uint32_t | numRegs
| ) |  | `[pure virtual]`

Create an argument of GtIargType::CONST_GRF_RANGE type.

Parameters:

  [in] | firstReg | Ordinal number of the first GRF register in the range
  [in] | numRegs | Number of registers in the range

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeDevicePtr | ( | const GtReg & | addrReg | ) | `[pure virtual]`

Create an argument of GtIargType::DEVICE_PTR type, passed by a register value.

Parameters:

  [in] | addrReg | Register that holds an address in the device memory space

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeFfTid | ( |  | ) | `[pure virtual]`

Create an argument of GtIargType::FFTID type.

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeGrfRange | ( | uint32_t | firstReg,
|  | uint32_t | numRegs
| ) |  | `[pure virtual]`

Create an argument of GtIargType::GRF_RANGE type.

Parameters:

  [in] | firstReg | Ordinal number of the first GRF register in the range
  [in] | numRegs | Number of registers in the range

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeHostPtr | ( | const void * | hostPtr | ) | `[pure virtual]`

Create an argument of GtIargType::HOST_PTR type.

Parameters:

  [in] | hostPtr | Pointer in the host memory space

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeInsOpMask | ( | const IGtIns & | ins | ) | `[pure virtual]`

Create an argument of GtIargType::INS_OP_MASK type

The new argument represents mask of scalar operations performed by the instruction on the vector of data elements ceMask = ins.IsWriteMaskEnabled() ? ChannelEnableReg() : 0xffffffff insOpMask = ceMask & DispatchMaskReg() & ins.ExecMask().Bits() & Mask(ins.Predicate())

Note:
  The INS_OP_MASK argument is similar to the SIMD_MASK argument created by the MakeSimdMask function. However, there is one significant difference: the operation mask starts with the state of the GtExecMask::ChannelOffset() channel in the LSB position of the mask, while SIMD mask always holds state of the channel #0 in the LSB position. In other words, insOpMask = (simdMask >> GtExecMask::ChannelOffset())

Parameters:

  [in] | ins | Instruction, the operation mask is evaluated for

Returns:
  Reference to the new IGtIarg object

virtual const IGtIret& gtpin::IGtIargFactory::MakeIret | ( |  | ) | `[pure virtual]`

Create an IGtIret object that represents void / unused HLI function's return value

Returns:
  Reference to the new IGtIret object

virtual const IGtIret& gtpin::IGtIargFactory::MakeIret | ( | GtHliParamTraits | retTraits,
|  | const GtReg & | reg
| ) |  | `[pure virtual]`

Create an IGtIret object that represents HLI function's return value

Parameters:

  [in] | retTraits | Traits of the function's return value
  [in] | reg | Register that holds the return value

Returns:
  Reference to the new IGtIret object

virtual const IGtIarg& gtpin::IGtIargFactory::MakePrime | ( | GtHliParamTraits | paramTraits,
|  | GtIargImmValue | value
| ) |  | `[pure virtual]`

Create an argument of GtIargType::PRIME type, passed by an immediate value.

Parameters:

  [in] | paramTraits | Parameter traits
  [in] | value | Immediate argument value

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakePrime | ( | GtHliParamTraits | paramTraits,
|  | const GtReg & | reg
| ) |  | `[pure virtual]`

Create an argument of GtIargType::PRIME type, passed by a register value.

Parameters:

  [in] | paramTraits | Parameter traits
  [in] | reg | Register that holds the argument value

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeSimdMask | ( | bool | ignoreCeMask,
|  | uint32_t | execMask,
|  | const GtPredicate & | predicate
| ) |  | `[pure virtual]`

Create an argument of GtIargType::SIMD_MASK type.

The new argument evaluates the mask of effective SIMD channels at the instrumentation point ceMask = ignoreCeMask ? 0xffffffff : ChannelEnableReg() simdMask = ceMask & DispatchMaskReg() & execMask & Mask(predicate)

Parameters:

  [in] | ignoreCeMask | Flag that indicates whether the mask in ChannelEnableReg should be applied (false) or ignored (true) in the computation of effective SIMD channels
  [in] | execMask | Execution mask to be used in the computation of effective SIMD channels. Normally, this mask is produced by the GtExecMask::Bits() function.
  [in] | predicate | Predicate to be used in the computation. Invalid predicate is ignored

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeSlmPtr | ( |  | ) | `[pure virtual]`

Create an argument of GtIargType::SLM_PTR type.

Returns:
  Reference to the new IGtIarg object

virtual const IGtIarg& gtpin::IGtIargFactory::MakeTid | ( |  | ) | `[pure virtual]`

Create an argument of GtIargType::TID type.

Returns:
  Reference to the new IGtIarg object

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT