GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

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

Public Member Functions
gtpin::IGtHliLibrary Class Reference
GTPin: High-Level Instrumentation (HLI) Library

Collection of the High-Level Instrumentation (HLI) modules. More...

`#include <igt_hli_library.h>`

## Public Member Functions
virtual IGtHliModuleHandle | AddModule (ConstByteSpan spirv, const char *name=nullptr, bool isScalar=true)=0
| Add an HLI module to this library.
virtual IGtHliModuleHandle | LoadModule (const char *fileName, const char *name=nullptr, bool isScalar=true)=0
| Load an HLI module from the specified file and add it to this library.
virtual IGtHliModuleHandle | CompileModule (const char *source, GtHliLanguage language=GtHliLanguage::OPENCL_C, GtHliCompilationOptions options={}, const char *name=nullptr, bool isScalar=true)=0
| Compile the specifed source to the SPIR-V representation, and add the compiled module to this library.
virtual IGtHliModuleHandle | CompileModuleFromFile (const char *filePath, GtHliLanguage language=GtHliLanguage::OPENCL_C, GtHliCompilationOptions options={}, const char *name=nullptr, bool isScalar=true)=0
| Compile the specifed source file to the SPIR-V representation, and add the compiled module to this library.
virtual uint32_t | NumModules () const =0
virtual IGtHliModuleHandle | GetModule (uint32_t ordNum) const =0
| Get handle to the HLI module specified by its ordinal number.
virtual bool | HasModule (IGtHliModuleHandle moduleHandle) const =0
| Check to see if this library contains HLI module with the specified handle.
virtual IGtHliModuleHandle | FindModule (const char *name) const =0
| Find HLI module with the specified name.

## Detailed Description

Collection of the High-Level Instrumentation (HLI) modules.

The HLI library contains HLI modules, compiled to the SPIR-V representation.

Availability:
  - Anytime and anywhere

## Member Function Documentation

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::AddModule | ( | ConstByteSpan | spirv,
|  | const char * | name = `nullptr`,
|  | bool | isScalar = `true`
| ) |  | `[pure virtual]`

Add an HLI module to this library.

Parameters:

  [in] | spirv | Content of the HLI module in the SPIRV format
  [in] | name | Optional name of the module
  [in] | isScalar | true - always build this HLI module in SIMD1 false - build this HLI module in SIMD of the module being instrumented

Returns:
  Handle to the new module, or nullptr if the module could not be added to the library. In case of error, the IGtCore::LastError() function provides the specific failure reason

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::CompileModule | ( | const char * | source,
|  | GtHliLanguage | language = `GtHliLanguage::OPENCL_C`
| ) |  | `[pure virtual]`

Compile the specifed source to the SPIR-V representation, and add the compiled module to this library.

Parameters:

  [in] | source | Source code of the HLI module
  [in] | language | The source language
  [in] | options | The module's compilation options
  [in] | name | Optional name of the module
  [in] | isScalar | true - always build this HLI module in SIMD1 false - build this HLI module in SIMD of the module being instrumented

Returns:
  Handle to the new module, or nullptr if the module could not be added to the library. In case of error, the IGtCore::LastError() function provides the specific failure reason

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::CompileModuleFromFile | ( | const char * | filePath,
|  | GtHliLanguage | language = `GtHliLanguage::OPENCL_C`
| ) |  | `[pure virtual]`

Compile the specifed source file to the SPIR-V representation, and add the compiled module to this library.

Parameters:

  [in] | filePath | Path of the file that contains source code of the HLI module
  [in] | language | The source language
  [in] | options | The module's compilation options
  [in] | name | Optional name of the module
  [in] | isScalar | true - always build this HLI module in SIMD1 false - build this HLI module in SIMD of the module being instrumented

Returns:
  Handle to the new module, or nullptr if the module could not be added to the library. In case of error, the IGtCore::LastError() function provides the specific failure reason

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::FindModule | ( | const char * | name | ) | const`[pure virtual]`

Find HLI module with the specified name.

Parameters:

  [in] | name | The name assigned to the module

Returns:
  Handle to the function, or nullptr if the module is not found in this library

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::GetModule | ( | uint32_t | ordNum | ) | const`[pure virtual]`

Get handle to the HLI module specified by its ordinal number.

Precondition:
  ordNum is an integer in the [0, NumModules()] range

Returns:
  Handle to the requested module

virtual bool gtpin::IGtHliLibrary::HasModule | ( | IGtHliModuleHandle | moduleHandle | ) | const`[pure virtual]`

Check to see if this library contains HLI module with the specified handle.

Parameters:

  [in] | moduleHandle | The handle to be checked

Returns:
  True, if this library contains a module with the specified handle, false - otherwise

virtual IGtHliModuleHandle gtpin::IGtHliLibrary::LoadModule | ( | const char * | fileName,
|  | const char * | name = `nullptr`,
|  | bool | isScalar = `true`
| ) |  | `[pure virtual]`

Load an HLI module from the specified file and add it to this library.

Parameters:

  [in] | fileName | Full name of the file that contains HLI module in the SPIRV format
  [in] | name | Optional name of the module
  [in] | isScalar | true - always build this HLI module in SIMD1 false - build this HLI module in SIMD of the module being instrumented

Returns:
  Handle to the loaded module, or nullptr if the module loading failed. In case of error, the IGtCore::LastError() function provides the specific failure reason

virtual uint32_t gtpin::IGtHliLibrary::NumModules | ( |  | ) | const`[pure virtual]`

Returns:
  Number of HLI modules in this library

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT