Path: blob/master/3rdparty/ittnotify/include/ittnotify.h
16337 views
/* <copyright>1This file is provided under a dual BSD/GPLv2 license. When using or2redistributing this file, you may do so under either license.34GPL LICENSE SUMMARY56Copyright (c) 2005-2014 Intel Corporation. All rights reserved.78This program is free software; you can redistribute it and/or modify9it under the terms of version 2 of the GNU General Public License as10published by the Free Software Foundation.1112This program is distributed in the hope that it will be useful, but13WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15General Public License for more details.1617You should have received a copy of the GNU General Public License18along with this program; if not, write to the Free Software19Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.20The full GNU General Public License is included in this distribution21in the file called LICENSE.GPL.2223Contact Information:24http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/2526BSD LICENSE2728Copyright (c) 2005-2014 Intel Corporation. All rights reserved.29All rights reserved.3031Redistribution and use in source and binary forms, with or without32modification, are permitted provided that the following conditions33are met:3435* Redistributions of source code must retain the above copyright36notice, this list of conditions and the following disclaimer.37* Redistributions in binary form must reproduce the above copyright38notice, this list of conditions and the following disclaimer in39the documentation and/or other materials provided with the40distribution.41* Neither the name of Intel Corporation nor the names of its42contributors may be used to endorse or promote products derived43from this software without specific prior written permission.4445THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS46"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT47LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR48A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT49OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,50SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT51LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,52DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY53THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT54(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE55OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.56</copyright> */57#ifndef _ITTNOTIFY_H_58#define _ITTNOTIFY_H_5960/**61@file62@brief Public User API functions and types63@mainpage6465The ITT API is used to annotate a user's program with additional information66that can be used by correctness and performance tools. The user inserts67calls in their program. Those calls generate information that is collected68at runtime, and used by Intel(R) Threading Tools.6970@section API Concepts71The following general concepts are used throughout the API.7273@subsection Unicode Support74Many API functions take character string arguments. On Windows, there75are two versions of each such function. The function name is suffixed76by W if Unicode support is enabled, and by A otherwise. Any API function77that takes a character string argument adheres to this convention.7879@subsection Conditional Compilation80Many users prefer having an option to modify ITT API code when linking it81inside their runtimes. ITT API header file provides a mechanism to replace82ITT API function names inside your code with empty strings. To do this,83define the macros INTEL_NO_ITTNOTIFY_API during compilation and remove the84static library from the linker script.8586@subsection Domains87[see domains]88Domains provide a way to separate notification for different modules or89libraries in a program. Domains are specified by dotted character strings,90e.g. TBB.Internal.Control.9192A mechanism (to be specified) is provided to enable and disable93domains. By default, all domains are enabled.94@subsection Named Entities and Instances95Named entities (frames, regions, tasks, and markers) communicate96information about the program to the analysis tools. A named entity often97refers to a section of program code, or to some set of logical concepts98that the programmer wants to group together.99100Named entities relate to the programmer's static view of the program. When101the program actually executes, many instances of a given named entity102may be created.103104The API annotations denote instances of named entities. The actual105named entities are displayed using the analysis tools. In other words,106the named entities come into existence when instances are created.107108Instances of named entities may have instance identifiers (IDs). Some109API calls use instance identifiers to create relationships between110different instances of named entities. Other API calls associate data111with instances of named entities.112113Some named entities must always have instance IDs. In particular, regions114and frames always have IDs. Task and markers need IDs only if the ID is115needed in another API call (such as adding a relation or metadata).116117The lifetime of instance IDs is distinct from the lifetime of118instances. This allows various relationships to be specified separate119from the actual execution of instances. This flexibility comes at the120expense of extra API calls.121122The same ID may not be reused for different instances, unless a previous123[ref] __itt_id_destroy call for that ID has been issued.124*/125126/** @cond exclude_from_documentation */127#ifndef ITT_OS_WIN128# define ITT_OS_WIN 1129#endif /* ITT_OS_WIN */130131#ifndef ITT_OS_LINUX132# define ITT_OS_LINUX 2133#endif /* ITT_OS_LINUX */134135#ifndef ITT_OS_MAC136# define ITT_OS_MAC 3137#endif /* ITT_OS_MAC */138139#ifndef ITT_OS_FREEBSD140# define ITT_OS_FREEBSD 4141#endif /* ITT_OS_FREEBSD */142143#ifndef ITT_OS144# if defined WIN32 || defined _WIN32145# define ITT_OS ITT_OS_WIN146# elif defined( __APPLE__ ) && defined( __MACH__ )147# define ITT_OS ITT_OS_MAC148# elif defined( __FreeBSD__ )149# define ITT_OS ITT_OS_FREEBSD150# else151# define ITT_OS ITT_OS_LINUX152# endif153#endif /* ITT_OS */154155#ifndef ITT_PLATFORM_WIN156# define ITT_PLATFORM_WIN 1157#endif /* ITT_PLATFORM_WIN */158159#ifndef ITT_PLATFORM_POSIX160# define ITT_PLATFORM_POSIX 2161#endif /* ITT_PLATFORM_POSIX */162163#ifndef ITT_PLATFORM_MAC164# define ITT_PLATFORM_MAC 3165#endif /* ITT_PLATFORM_MAC */166167#ifndef ITT_PLATFORM_FREEBSD168# define ITT_PLATFORM_FREEBSD 4169#endif /* ITT_PLATFORM_FREEBSD */170171#ifndef ITT_PLATFORM172# if ITT_OS==ITT_OS_WIN173# define ITT_PLATFORM ITT_PLATFORM_WIN174# elif ITT_OS==ITT_OS_MAC175# define ITT_PLATFORM ITT_PLATFORM_MAC176# elif ITT_OS==ITT_OS_FREEBSD177# define ITT_PLATFORM ITT_PLATFORM_FREEBSD178# else179# define ITT_PLATFORM ITT_PLATFORM_POSIX180# endif181#endif /* ITT_PLATFORM */182183#if defined(_UNICODE) && !defined(UNICODE)184#define UNICODE185#endif186187#include <stddef.h>188#if ITT_PLATFORM==ITT_PLATFORM_WIN189#include <tchar.h>190#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */191#include <stdint.h>192#if defined(UNICODE) || defined(_UNICODE)193#include <wchar.h>194#endif /* UNICODE || _UNICODE */195#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */196197#ifndef ITTAPI_CDECL198# if ITT_PLATFORM==ITT_PLATFORM_WIN199# define ITTAPI_CDECL __cdecl200# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */201# if defined _M_IX86 || defined __i386__202# define ITTAPI_CDECL __attribute__ ((cdecl))203# else /* _M_IX86 || __i386__ */204# define ITTAPI_CDECL /* actual only on x86 platform */205# endif /* _M_IX86 || __i386__ */206# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */207#endif /* ITTAPI_CDECL */208209#ifndef STDCALL210# if ITT_PLATFORM==ITT_PLATFORM_WIN211# define STDCALL __stdcall212# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */213# if defined _M_IX86 || defined __i386__214# define STDCALL __attribute__ ((stdcall))215# else /* _M_IX86 || __i386__ */216# define STDCALL /* supported only on x86 platform */217# endif /* _M_IX86 || __i386__ */218# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */219#endif /* STDCALL */220221#define ITTAPI ITTAPI_CDECL222#define LIBITTAPI ITTAPI_CDECL223224/* TODO: Temporary for compatibility! */225#define ITTAPI_CALL ITTAPI_CDECL226#define LIBITTAPI_CALL ITTAPI_CDECL227228#if ITT_PLATFORM==ITT_PLATFORM_WIN229/* use __forceinline (VC++ specific) */230#define ITT_INLINE __forceinline231#define ITT_INLINE_ATTRIBUTE /* nothing */232#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */233/*234* Generally, functions are not inlined unless optimization is specified.235* For functions declared inline, this attribute inlines the function even236* if no optimization level was specified.237*/238#ifdef __STRICT_ANSI__239#define ITT_INLINE static240#define ITT_INLINE_ATTRIBUTE __attribute__((unused))241#else /* __STRICT_ANSI__ */242#define ITT_INLINE static inline243#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))244#endif /* __STRICT_ANSI__ */245#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */246/** @endcond */247248#ifdef INTEL_ITTNOTIFY_ENABLE_LEGACY249# if ITT_PLATFORM==ITT_PLATFORM_WIN250# pragma message("WARNING!!! Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro")251# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */252# warning "Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro"253# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */254# include "legacy/ittnotify.h"255#endif /* INTEL_ITTNOTIFY_ENABLE_LEGACY */256257/** @cond exclude_from_documentation */258/* Helper macro for joining tokens */259#define ITT_JOIN_AUX(p,n) p##n260#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n)261262#ifdef ITT_MAJOR263#undef ITT_MAJOR264#endif265#ifdef ITT_MINOR266#undef ITT_MINOR267#endif268#define ITT_MAJOR 3269#define ITT_MINOR 0270271/* Standard versioning of a token with major and minor version numbers */272#define ITT_VERSIONIZE(x) \273ITT_JOIN(x, \274ITT_JOIN(_, \275ITT_JOIN(ITT_MAJOR, \276ITT_JOIN(_, ITT_MINOR))))277278#ifndef INTEL_ITTNOTIFY_PREFIX279# define INTEL_ITTNOTIFY_PREFIX __itt_280#endif /* INTEL_ITTNOTIFY_PREFIX */281#ifndef INTEL_ITTNOTIFY_POSTFIX282# define INTEL_ITTNOTIFY_POSTFIX _ptr_283#endif /* INTEL_ITTNOTIFY_POSTFIX */284285#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)286#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)))287288#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)289#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)290291#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d)292#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x)293#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y)294#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z)295#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)296#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)297#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)298#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d)299#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x)300#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y)301#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z)302#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a)303#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b)304#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c)305306#ifdef ITT_STUB307#undef ITT_STUB308#endif309#ifdef ITT_STUBV310#undef ITT_STUBV311#endif312#define ITT_STUBV(api,type,name,args) \313typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \314extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name);315#define ITT_STUB ITT_STUBV316/** @endcond */317318#ifdef __cplusplus319extern "C" {320#endif /* __cplusplus */321322/** @cond exclude_from_gpa_documentation */323/**324* @defgroup public Public API325* @{326* @}327*/328329/**330* @defgroup control Collection Control331* @ingroup public332* General behavior: application continues to run, but no profiling information is being collected333*334* Pausing occurs not only for the current thread but for all process as well as spawned processes335* - Intel(R) Parallel Inspector and Intel(R) Inspector XE:336* - Does not analyze or report errors that involve memory access.337* - Other errors are reported as usual. Pausing data collection in338* Intel(R) Parallel Inspector and Intel(R) Inspector XE339* only pauses tracing and analyzing memory access.340* It does not pause tracing or analyzing threading APIs.341* .342* - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:343* - Does continue to record when new threads are started.344* .345* - Other effects:346* - Possible reduction of runtime overhead.347* .348* @{349*/350/** @brief Pause collection */351void ITTAPI __itt_pause(void);352/** @brief Resume collection */353void ITTAPI __itt_resume(void);354/** @brief Detach collection */355void ITTAPI __itt_detach(void);356357/** @cond exclude_from_documentation */358#ifndef INTEL_NO_MACRO_BODY359#ifndef INTEL_NO_ITTNOTIFY_API360ITT_STUBV(ITTAPI, void, pause, (void))361ITT_STUBV(ITTAPI, void, resume, (void))362ITT_STUBV(ITTAPI, void, detach, (void))363#define __itt_pause ITTNOTIFY_VOID(pause)364#define __itt_pause_ptr ITTNOTIFY_NAME(pause)365#define __itt_resume ITTNOTIFY_VOID(resume)366#define __itt_resume_ptr ITTNOTIFY_NAME(resume)367#define __itt_detach ITTNOTIFY_VOID(detach)368#define __itt_detach_ptr ITTNOTIFY_NAME(detach)369#else /* INTEL_NO_ITTNOTIFY_API */370#define __itt_pause()371#define __itt_pause_ptr 0372#define __itt_resume()373#define __itt_resume_ptr 0374#define __itt_detach()375#define __itt_detach_ptr 0376#endif /* INTEL_NO_ITTNOTIFY_API */377#else /* INTEL_NO_MACRO_BODY */378#define __itt_pause_ptr 0379#define __itt_resume_ptr 0380#define __itt_detach_ptr 0381#endif /* INTEL_NO_MACRO_BODY */382/** @endcond */383/** @} control group */384/** @endcond */385386/**387* @defgroup threads Threads388* @ingroup public389* Give names to threads390* @{391*/392/**393* @brief Sets thread name of calling thread394* @param[in] name - name of thread395*/396#if ITT_PLATFORM==ITT_PLATFORM_WIN397void ITTAPI __itt_thread_set_nameA(const char *name);398void ITTAPI __itt_thread_set_nameW(const wchar_t *name);399#if defined(UNICODE) || defined(_UNICODE)400# define __itt_thread_set_name __itt_thread_set_nameW401# define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr402#else /* UNICODE */403# define __itt_thread_set_name __itt_thread_set_nameA404# define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr405#endif /* UNICODE */406#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */407void ITTAPI __itt_thread_set_name(const char *name);408#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */409410/** @cond exclude_from_documentation */411#ifndef INTEL_NO_MACRO_BODY412#ifndef INTEL_NO_ITTNOTIFY_API413#if ITT_PLATFORM==ITT_PLATFORM_WIN414ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name))415ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name))416#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */417ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name))418#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */419#if ITT_PLATFORM==ITT_PLATFORM_WIN420#define __itt_thread_set_nameA ITTNOTIFY_VOID(thread_set_nameA)421#define __itt_thread_set_nameA_ptr ITTNOTIFY_NAME(thread_set_nameA)422#define __itt_thread_set_nameW ITTNOTIFY_VOID(thread_set_nameW)423#define __itt_thread_set_nameW_ptr ITTNOTIFY_NAME(thread_set_nameW)424#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */425#define __itt_thread_set_name ITTNOTIFY_VOID(thread_set_name)426#define __itt_thread_set_name_ptr ITTNOTIFY_NAME(thread_set_name)427#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */428#else /* INTEL_NO_ITTNOTIFY_API */429#if ITT_PLATFORM==ITT_PLATFORM_WIN430#define __itt_thread_set_nameA(name)431#define __itt_thread_set_nameA_ptr 0432#define __itt_thread_set_nameW(name)433#define __itt_thread_set_nameW_ptr 0434#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */435#define __itt_thread_set_name(name)436#define __itt_thread_set_name_ptr 0437#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */438#endif /* INTEL_NO_ITTNOTIFY_API */439#else /* INTEL_NO_MACRO_BODY */440#if ITT_PLATFORM==ITT_PLATFORM_WIN441#define __itt_thread_set_nameA_ptr 0442#define __itt_thread_set_nameW_ptr 0443#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */444#define __itt_thread_set_name_ptr 0445#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */446#endif /* INTEL_NO_MACRO_BODY */447/** @endcond */448449/** @cond exclude_from_gpa_documentation */450451/**452* @brief Mark current thread as ignored from this point on, for the duration of its existence.453*/454void ITTAPI __itt_thread_ignore(void);455456/** @cond exclude_from_documentation */457#ifndef INTEL_NO_MACRO_BODY458#ifndef INTEL_NO_ITTNOTIFY_API459ITT_STUBV(ITTAPI, void, thread_ignore, (void))460#define __itt_thread_ignore ITTNOTIFY_VOID(thread_ignore)461#define __itt_thread_ignore_ptr ITTNOTIFY_NAME(thread_ignore)462#else /* INTEL_NO_ITTNOTIFY_API */463#define __itt_thread_ignore()464#define __itt_thread_ignore_ptr 0465#endif /* INTEL_NO_ITTNOTIFY_API */466#else /* INTEL_NO_MACRO_BODY */467#define __itt_thread_ignore_ptr 0468#endif /* INTEL_NO_MACRO_BODY */469/** @endcond */470/** @} threads group */471472/**473* @defgroup suppress Error suppression474* @ingroup public475* General behavior: application continues to run, but errors are suppressed476*477* @{478*/479480/*****************************************************************//**481* @name group of functions used for error suppression in correctness tools482*********************************************************************/483/** @{ */484/**485* @hideinitializer486* @brief possible value for suppression mask487*/488#define __itt_suppress_all_errors 0x7fffffff489490/**491* @hideinitializer492* @brief possible value for suppression mask (suppresses errors from threading analysis)493*/494#define __itt_suppress_threading_errors 0x000000ff495496/**497* @hideinitializer498* @brief possible value for suppression mask (suppresses errors from memory analysis)499*/500#define __itt_suppress_memory_errors 0x0000ff00501502/**503* @brief Start suppressing errors identified in mask on this thread504*/505void ITTAPI __itt_suppress_push(unsigned int mask);506507/** @cond exclude_from_documentation */508#ifndef INTEL_NO_MACRO_BODY509#ifndef INTEL_NO_ITTNOTIFY_API510ITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask))511#define __itt_suppress_push ITTNOTIFY_VOID(suppress_push)512#define __itt_suppress_push_ptr ITTNOTIFY_NAME(suppress_push)513#else /* INTEL_NO_ITTNOTIFY_API */514#define __itt_suppress_push(mask)515#define __itt_suppress_push_ptr 0516#endif /* INTEL_NO_ITTNOTIFY_API */517#else /* INTEL_NO_MACRO_BODY */518#define __itt_suppress_push_ptr 0519#endif /* INTEL_NO_MACRO_BODY */520/** @endcond */521522/**523* @brief Undo the effects of the matching call to __itt_suppress_push524*/525void ITTAPI __itt_suppress_pop(void);526527/** @cond exclude_from_documentation */528#ifndef INTEL_NO_MACRO_BODY529#ifndef INTEL_NO_ITTNOTIFY_API530ITT_STUBV(ITTAPI, void, suppress_pop, (void))531#define __itt_suppress_pop ITTNOTIFY_VOID(suppress_pop)532#define __itt_suppress_pop_ptr ITTNOTIFY_NAME(suppress_pop)533#else /* INTEL_NO_ITTNOTIFY_API */534#define __itt_suppress_pop()535#define __itt_suppress_pop_ptr 0536#endif /* INTEL_NO_ITTNOTIFY_API */537#else /* INTEL_NO_MACRO_BODY */538#define __itt_suppress_pop_ptr 0539#endif /* INTEL_NO_MACRO_BODY */540/** @endcond */541542/**543* @enum __itt_model_disable544* @brief Enumerator for the disable methods545*/546typedef enum __itt_suppress_mode {547__itt_unsuppress_range,548__itt_suppress_range549} __itt_suppress_mode_t;550551/**552* @brief Mark a range of memory for error suppression or unsuppression for error types included in mask553*/554void ITTAPI __itt_suppress_mark_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size);555556/** @cond exclude_from_documentation */557#ifndef INTEL_NO_MACRO_BODY558#ifndef INTEL_NO_ITTNOTIFY_API559ITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size))560#define __itt_suppress_mark_range ITTNOTIFY_VOID(suppress_mark_range)561#define __itt_suppress_mark_range_ptr ITTNOTIFY_NAME(suppress_mark_range)562#else /* INTEL_NO_ITTNOTIFY_API */563#define __itt_suppress_mark_range(mask)564#define __itt_suppress_mark_range_ptr 0565#endif /* INTEL_NO_ITTNOTIFY_API */566#else /* INTEL_NO_MACRO_BODY */567#define __itt_suppress_mark_range_ptr 0568#endif /* INTEL_NO_MACRO_BODY */569/** @endcond */570571/**572* @brief Undo the effect of a matching call to __itt_suppress_mark_range. If not matching573* call is found, nothing is changed.574*/575void ITTAPI __itt_suppress_clear_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size);576577/** @cond exclude_from_documentation */578#ifndef INTEL_NO_MACRO_BODY579#ifndef INTEL_NO_ITTNOTIFY_API580ITT_STUBV(ITTAPI, void, suppress_clear_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size))581#define __itt_suppress_clear_range ITTNOTIFY_VOID(suppress_clear_range)582#define __itt_suppress_clear_range_ptr ITTNOTIFY_NAME(suppress_clear_range)583#else /* INTEL_NO_ITTNOTIFY_API */584#define __itt_suppress_clear_range(mask)585#define __itt_suppress_clear_range_ptr 0586#endif /* INTEL_NO_ITTNOTIFY_API */587#else /* INTEL_NO_MACRO_BODY */588#define __itt_suppress_clear_range_ptr 0589#endif /* INTEL_NO_MACRO_BODY */590/** @endcond */591/** @} */592/** @} suppress group */593594/**595* @defgroup sync Synchronization596* @ingroup public597* Indicate user-written synchronization code598* @{599*/600/**601* @hideinitializer602* @brief possible value of attribute argument for sync object type603*/604#define __itt_attr_barrier 1605606/**607* @hideinitializer608* @brief possible value of attribute argument for sync object type609*/610#define __itt_attr_mutex 2611612/**613@brief Name a synchronization object614@param[in] addr Handle for the synchronization object. You should615use a real address to uniquely identify the synchronization object.616@param[in] objtype null-terminated object type string. If NULL is617passed, the name will be "User Synchronization".618@param[in] objname null-terminated object name string. If NULL,619no name will be assigned to the object.620@param[in] attribute one of [#__itt_attr_barrier, #__itt_attr_mutex]621*/622623#if ITT_PLATFORM==ITT_PLATFORM_WIN624void ITTAPI __itt_sync_createA(void *addr, const char *objtype, const char *objname, int attribute);625void ITTAPI __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);626#if defined(UNICODE) || defined(_UNICODE)627# define __itt_sync_create __itt_sync_createW628# define __itt_sync_create_ptr __itt_sync_createW_ptr629#else /* UNICODE */630# define __itt_sync_create __itt_sync_createA631# define __itt_sync_create_ptr __itt_sync_createA_ptr632#endif /* UNICODE */633#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */634void ITTAPI __itt_sync_create (void *addr, const char *objtype, const char *objname, int attribute);635#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */636637/** @cond exclude_from_documentation */638#ifndef INTEL_NO_MACRO_BODY639#ifndef INTEL_NO_ITTNOTIFY_API640#if ITT_PLATFORM==ITT_PLATFORM_WIN641ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute))642ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute))643#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */644ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char* objtype, const char* objname, int attribute))645#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */646#if ITT_PLATFORM==ITT_PLATFORM_WIN647#define __itt_sync_createA ITTNOTIFY_VOID(sync_createA)648#define __itt_sync_createA_ptr ITTNOTIFY_NAME(sync_createA)649#define __itt_sync_createW ITTNOTIFY_VOID(sync_createW)650#define __itt_sync_createW_ptr ITTNOTIFY_NAME(sync_createW)651#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */652#define __itt_sync_create ITTNOTIFY_VOID(sync_create)653#define __itt_sync_create_ptr ITTNOTIFY_NAME(sync_create)654#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */655#else /* INTEL_NO_ITTNOTIFY_API */656#if ITT_PLATFORM==ITT_PLATFORM_WIN657#define __itt_sync_createA(addr, objtype, objname, attribute)658#define __itt_sync_createA_ptr 0659#define __itt_sync_createW(addr, objtype, objname, attribute)660#define __itt_sync_createW_ptr 0661#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */662#define __itt_sync_create(addr, objtype, objname, attribute)663#define __itt_sync_create_ptr 0664#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */665#endif /* INTEL_NO_ITTNOTIFY_API */666#else /* INTEL_NO_MACRO_BODY */667#if ITT_PLATFORM==ITT_PLATFORM_WIN668#define __itt_sync_createA_ptr 0669#define __itt_sync_createW_ptr 0670#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */671#define __itt_sync_create_ptr 0672#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */673#endif /* INTEL_NO_MACRO_BODY */674/** @endcond */675676/**677@brief Rename a synchronization object678679You can use the rename call to assign or reassign a name to a given680synchronization object.681@param[in] addr handle for the synchronization object.682@param[in] name null-terminated object name string.683*/684#if ITT_PLATFORM==ITT_PLATFORM_WIN685void ITTAPI __itt_sync_renameA(void *addr, const char *name);686void ITTAPI __itt_sync_renameW(void *addr, const wchar_t *name);687#if defined(UNICODE) || defined(_UNICODE)688# define __itt_sync_rename __itt_sync_renameW689# define __itt_sync_rename_ptr __itt_sync_renameW_ptr690#else /* UNICODE */691# define __itt_sync_rename __itt_sync_renameA692# define __itt_sync_rename_ptr __itt_sync_renameA_ptr693#endif /* UNICODE */694#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */695void ITTAPI __itt_sync_rename(void *addr, const char *name);696#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */697698/** @cond exclude_from_documentation */699#ifndef INTEL_NO_MACRO_BODY700#ifndef INTEL_NO_ITTNOTIFY_API701#if ITT_PLATFORM==ITT_PLATFORM_WIN702ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name))703ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name))704#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */705ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name))706#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */707#if ITT_PLATFORM==ITT_PLATFORM_WIN708#define __itt_sync_renameA ITTNOTIFY_VOID(sync_renameA)709#define __itt_sync_renameA_ptr ITTNOTIFY_NAME(sync_renameA)710#define __itt_sync_renameW ITTNOTIFY_VOID(sync_renameW)711#define __itt_sync_renameW_ptr ITTNOTIFY_NAME(sync_renameW)712#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */713#define __itt_sync_rename ITTNOTIFY_VOID(sync_rename)714#define __itt_sync_rename_ptr ITTNOTIFY_NAME(sync_rename)715#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */716#else /* INTEL_NO_ITTNOTIFY_API */717#if ITT_PLATFORM==ITT_PLATFORM_WIN718#define __itt_sync_renameA(addr, name)719#define __itt_sync_renameA_ptr 0720#define __itt_sync_renameW(addr, name)721#define __itt_sync_renameW_ptr 0722#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */723#define __itt_sync_rename(addr, name)724#define __itt_sync_rename_ptr 0725#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */726#endif /* INTEL_NO_ITTNOTIFY_API */727#else /* INTEL_NO_MACRO_BODY */728#if ITT_PLATFORM==ITT_PLATFORM_WIN729#define __itt_sync_renameA_ptr 0730#define __itt_sync_renameW_ptr 0731#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */732#define __itt_sync_rename_ptr 0733#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */734#endif /* INTEL_NO_MACRO_BODY */735/** @endcond */736737/**738@brief Destroy a synchronization object.739@param addr Handle for the synchronization object.740*/741void ITTAPI __itt_sync_destroy(void *addr);742743/** @cond exclude_from_documentation */744#ifndef INTEL_NO_MACRO_BODY745#ifndef INTEL_NO_ITTNOTIFY_API746ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr))747#define __itt_sync_destroy ITTNOTIFY_VOID(sync_destroy)748#define __itt_sync_destroy_ptr ITTNOTIFY_NAME(sync_destroy)749#else /* INTEL_NO_ITTNOTIFY_API */750#define __itt_sync_destroy(addr)751#define __itt_sync_destroy_ptr 0752#endif /* INTEL_NO_ITTNOTIFY_API */753#else /* INTEL_NO_MACRO_BODY */754#define __itt_sync_destroy_ptr 0755#endif /* INTEL_NO_MACRO_BODY */756/** @endcond */757758/*****************************************************************//**759* @name group of functions is used for performance measurement tools760*********************************************************************/761/** @{ */762/**763* @brief Enter spin loop on user-defined sync object764*/765void ITTAPI __itt_sync_prepare(void* addr);766767/** @cond exclude_from_documentation */768#ifndef INTEL_NO_MACRO_BODY769#ifndef INTEL_NO_ITTNOTIFY_API770ITT_STUBV(ITTAPI, void, sync_prepare, (void *addr))771#define __itt_sync_prepare ITTNOTIFY_VOID(sync_prepare)772#define __itt_sync_prepare_ptr ITTNOTIFY_NAME(sync_prepare)773#else /* INTEL_NO_ITTNOTIFY_API */774#define __itt_sync_prepare(addr)775#define __itt_sync_prepare_ptr 0776#endif /* INTEL_NO_ITTNOTIFY_API */777#else /* INTEL_NO_MACRO_BODY */778#define __itt_sync_prepare_ptr 0779#endif /* INTEL_NO_MACRO_BODY */780/** @endcond */781782/**783* @brief Quit spin loop without acquiring spin object784*/785void ITTAPI __itt_sync_cancel(void *addr);786787/** @cond exclude_from_documentation */788#ifndef INTEL_NO_MACRO_BODY789#ifndef INTEL_NO_ITTNOTIFY_API790ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr))791#define __itt_sync_cancel ITTNOTIFY_VOID(sync_cancel)792#define __itt_sync_cancel_ptr ITTNOTIFY_NAME(sync_cancel)793#else /* INTEL_NO_ITTNOTIFY_API */794#define __itt_sync_cancel(addr)795#define __itt_sync_cancel_ptr 0796#endif /* INTEL_NO_ITTNOTIFY_API */797#else /* INTEL_NO_MACRO_BODY */798#define __itt_sync_cancel_ptr 0799#endif /* INTEL_NO_MACRO_BODY */800/** @endcond */801802/**803* @brief Successful spin loop completion (sync object acquired)804*/805void ITTAPI __itt_sync_acquired(void *addr);806807/** @cond exclude_from_documentation */808#ifndef INTEL_NO_MACRO_BODY809#ifndef INTEL_NO_ITTNOTIFY_API810ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr))811#define __itt_sync_acquired ITTNOTIFY_VOID(sync_acquired)812#define __itt_sync_acquired_ptr ITTNOTIFY_NAME(sync_acquired)813#else /* INTEL_NO_ITTNOTIFY_API */814#define __itt_sync_acquired(addr)815#define __itt_sync_acquired_ptr 0816#endif /* INTEL_NO_ITTNOTIFY_API */817#else /* INTEL_NO_MACRO_BODY */818#define __itt_sync_acquired_ptr 0819#endif /* INTEL_NO_MACRO_BODY */820/** @endcond */821822/**823* @brief Start sync object releasing code. Is called before the lock release call.824*/825void ITTAPI __itt_sync_releasing(void* addr);826827/** @cond exclude_from_documentation */828#ifndef INTEL_NO_MACRO_BODY829#ifndef INTEL_NO_ITTNOTIFY_API830ITT_STUBV(ITTAPI, void, sync_releasing, (void *addr))831#define __itt_sync_releasing ITTNOTIFY_VOID(sync_releasing)832#define __itt_sync_releasing_ptr ITTNOTIFY_NAME(sync_releasing)833#else /* INTEL_NO_ITTNOTIFY_API */834#define __itt_sync_releasing(addr)835#define __itt_sync_releasing_ptr 0836#endif /* INTEL_NO_ITTNOTIFY_API */837#else /* INTEL_NO_MACRO_BODY */838#define __itt_sync_releasing_ptr 0839#endif /* INTEL_NO_MACRO_BODY */840/** @endcond */841/** @} */842843/** @} sync group */844845/**************************************************************//**846* @name group of functions is used for correctness checking tools847******************************************************************/848/** @{ */849/**850* @ingroup legacy851* @deprecated Legacy API852* @brief Fast synchronization which does no require spinning.853* - This special function is to be used by TBB and OpenMP libraries only when they know854* there is no spin but they need to suppress TC warnings about shared variable modifications.855* - It only has corresponding pointers in static library and does not have corresponding function856* in dynamic library.857* @see void __itt_sync_prepare(void* addr);858*/859void ITTAPI __itt_fsync_prepare(void* addr);860861/** @cond exclude_from_documentation */862#ifndef INTEL_NO_MACRO_BODY863#ifndef INTEL_NO_ITTNOTIFY_API864ITT_STUBV(ITTAPI, void, fsync_prepare, (void *addr))865#define __itt_fsync_prepare ITTNOTIFY_VOID(fsync_prepare)866#define __itt_fsync_prepare_ptr ITTNOTIFY_NAME(fsync_prepare)867#else /* INTEL_NO_ITTNOTIFY_API */868#define __itt_fsync_prepare(addr)869#define __itt_fsync_prepare_ptr 0870#endif /* INTEL_NO_ITTNOTIFY_API */871#else /* INTEL_NO_MACRO_BODY */872#define __itt_fsync_prepare_ptr 0873#endif /* INTEL_NO_MACRO_BODY */874/** @endcond */875876/**877* @ingroup legacy878* @deprecated Legacy API879* @brief Fast synchronization which does no require spinning.880* - This special function is to be used by TBB and OpenMP libraries only when they know881* there is no spin but they need to suppress TC warnings about shared variable modifications.882* - It only has corresponding pointers in static library and does not have corresponding function883* in dynamic library.884* @see void __itt_sync_cancel(void *addr);885*/886void ITTAPI __itt_fsync_cancel(void *addr);887888/** @cond exclude_from_documentation */889#ifndef INTEL_NO_MACRO_BODY890#ifndef INTEL_NO_ITTNOTIFY_API891ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr))892#define __itt_fsync_cancel ITTNOTIFY_VOID(fsync_cancel)893#define __itt_fsync_cancel_ptr ITTNOTIFY_NAME(fsync_cancel)894#else /* INTEL_NO_ITTNOTIFY_API */895#define __itt_fsync_cancel(addr)896#define __itt_fsync_cancel_ptr 0897#endif /* INTEL_NO_ITTNOTIFY_API */898#else /* INTEL_NO_MACRO_BODY */899#define __itt_fsync_cancel_ptr 0900#endif /* INTEL_NO_MACRO_BODY */901/** @endcond */902903/**904* @ingroup legacy905* @deprecated Legacy API906* @brief Fast synchronization which does no require spinning.907* - This special function is to be used by TBB and OpenMP libraries only when they know908* there is no spin but they need to suppress TC warnings about shared variable modifications.909* - It only has corresponding pointers in static library and does not have corresponding function910* in dynamic library.911* @see void __itt_sync_acquired(void *addr);912*/913void ITTAPI __itt_fsync_acquired(void *addr);914915/** @cond exclude_from_documentation */916#ifndef INTEL_NO_MACRO_BODY917#ifndef INTEL_NO_ITTNOTIFY_API918ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr))919#define __itt_fsync_acquired ITTNOTIFY_VOID(fsync_acquired)920#define __itt_fsync_acquired_ptr ITTNOTIFY_NAME(fsync_acquired)921#else /* INTEL_NO_ITTNOTIFY_API */922#define __itt_fsync_acquired(addr)923#define __itt_fsync_acquired_ptr 0924#endif /* INTEL_NO_ITTNOTIFY_API */925#else /* INTEL_NO_MACRO_BODY */926#define __itt_fsync_acquired_ptr 0927#endif /* INTEL_NO_MACRO_BODY */928/** @endcond */929930/**931* @ingroup legacy932* @deprecated Legacy API933* @brief Fast synchronization which does no require spinning.934* - This special function is to be used by TBB and OpenMP libraries only when they know935* there is no spin but they need to suppress TC warnings about shared variable modifications.936* - It only has corresponding pointers in static library and does not have corresponding function937* in dynamic library.938* @see void __itt_sync_releasing(void* addr);939*/940void ITTAPI __itt_fsync_releasing(void* addr);941942/** @cond exclude_from_documentation */943#ifndef INTEL_NO_MACRO_BODY944#ifndef INTEL_NO_ITTNOTIFY_API945ITT_STUBV(ITTAPI, void, fsync_releasing, (void *addr))946#define __itt_fsync_releasing ITTNOTIFY_VOID(fsync_releasing)947#define __itt_fsync_releasing_ptr ITTNOTIFY_NAME(fsync_releasing)948#else /* INTEL_NO_ITTNOTIFY_API */949#define __itt_fsync_releasing(addr)950#define __itt_fsync_releasing_ptr 0951#endif /* INTEL_NO_ITTNOTIFY_API */952#else /* INTEL_NO_MACRO_BODY */953#define __itt_fsync_releasing_ptr 0954#endif /* INTEL_NO_MACRO_BODY */955/** @endcond */956/** @} */957958/**959* @defgroup model Modeling by Intel(R) Parallel Advisor960* @ingroup public961* This is the subset of itt used for modeling by Intel(R) Parallel Advisor.962* This API is called ONLY using annotate.h, by "Annotation" macros963* the user places in their sources during the parallelism modeling steps.964*965* site_begin/end and task_begin/end take the address of handle variables,966* which are writeable by the API. Handles must be 0 initialized prior967* to the first call to begin, or may cause a run-time failure.968* The handles are initialized in a multi-thread safe way by the API if969* the handle is 0. The commonly expected idiom is one static handle to970* identify a site or task. If a site or task of the same name has already971* been started during this collection, the same handle MAY be returned,972* but is not required to be - it is unspecified if data merging is done973* based on name. These routines also take an instance variable. Like974* the lexical instance, these must be 0 initialized. Unlike the lexical975* instance, this is used to track a single dynamic instance.976*977* API used by the Intel(R) Parallel Advisor to describe potential concurrency978* and related activities. User-added source annotations expand to calls979* to these procedures to enable modeling of a hypothetical concurrent980* execution serially.981* @{982*/983#if !defined(_ADVISOR_ANNOTATE_H_) || defined(ANNOTATE_EXPAND_NULL)984985typedef void* __itt_model_site; /*!< @brief handle for lexical site */986typedef void* __itt_model_site_instance; /*!< @brief handle for dynamic instance */987typedef void* __itt_model_task; /*!< @brief handle for lexical site */988typedef void* __itt_model_task_instance; /*!< @brief handle for dynamic instance */989990/**991* @enum __itt_model_disable992* @brief Enumerator for the disable methods993*/994typedef enum {995__itt_model_disable_observation,996__itt_model_disable_collection997} __itt_model_disable;998999#endif /* !_ADVISOR_ANNOTATE_H_ || ANNOTATE_EXPAND_NULL */10001001/**1002* @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support.1003*1004* site_begin/end model a potential concurrency site.1005* site instances may be recursively nested with themselves.1006* site_end exits the most recently started but unended site for the current1007* thread. The handle passed to end may be used to validate structure.1008* Instances of a site encountered on different threads concurrently1009* are considered completely distinct. If the site name for two different1010* lexical sites match, it is unspecified whether they are treated as the1011* same or different for data presentation.1012*/1013void ITTAPI __itt_model_site_begin(__itt_model_site *site, __itt_model_site_instance *instance, const char *name);1014#if ITT_PLATFORM==ITT_PLATFORM_WIN1015void ITTAPI __itt_model_site_beginW(const wchar_t *name);1016#endif1017void ITTAPI __itt_model_site_beginA(const char *name);1018void ITTAPI __itt_model_site_beginAL(const char *name, size_t siteNameLen);1019void ITTAPI __itt_model_site_end (__itt_model_site *site, __itt_model_site_instance *instance);1020void ITTAPI __itt_model_site_end_2(void);10211022/** @cond exclude_from_documentation */1023#ifndef INTEL_NO_MACRO_BODY1024#ifndef INTEL_NO_ITTNOTIFY_API1025ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name))1026#if ITT_PLATFORM==ITT_PLATFORM_WIN1027ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name))1028#endif1029ITT_STUBV(ITTAPI, void, model_site_beginA, (const char *name))1030ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t siteNameLen))1031ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance))1032ITT_STUBV(ITTAPI, void, model_site_end_2, (void))1033#define __itt_model_site_begin ITTNOTIFY_VOID(model_site_begin)1034#define __itt_model_site_begin_ptr ITTNOTIFY_NAME(model_site_begin)1035#if ITT_PLATFORM==ITT_PLATFORM_WIN1036#define __itt_model_site_beginW ITTNOTIFY_VOID(model_site_beginW)1037#define __itt_model_site_beginW_ptr ITTNOTIFY_NAME(model_site_beginW)1038#endif1039#define __itt_model_site_beginA ITTNOTIFY_VOID(model_site_beginA)1040#define __itt_model_site_beginA_ptr ITTNOTIFY_NAME(model_site_beginA)1041#define __itt_model_site_beginAL ITTNOTIFY_VOID(model_site_beginAL)1042#define __itt_model_site_beginAL_ptr ITTNOTIFY_NAME(model_site_beginAL)1043#define __itt_model_site_end ITTNOTIFY_VOID(model_site_end)1044#define __itt_model_site_end_ptr ITTNOTIFY_NAME(model_site_end)1045#define __itt_model_site_end_2 ITTNOTIFY_VOID(model_site_end_2)1046#define __itt_model_site_end_2_ptr ITTNOTIFY_NAME(model_site_end_2)1047#else /* INTEL_NO_ITTNOTIFY_API */1048#define __itt_model_site_begin(site, instance, name)1049#define __itt_model_site_begin_ptr 01050#if ITT_PLATFORM==ITT_PLATFORM_WIN1051#define __itt_model_site_beginW(name)1052#define __itt_model_site_beginW_ptr 01053#endif1054#define __itt_model_site_beginA(name)1055#define __itt_model_site_beginA_ptr 01056#define __itt_model_site_beginAL(name, siteNameLen)1057#define __itt_model_site_beginAL_ptr 01058#define __itt_model_site_end(site, instance)1059#define __itt_model_site_end_ptr 01060#define __itt_model_site_end_2()1061#define __itt_model_site_end_2_ptr 01062#endif /* INTEL_NO_ITTNOTIFY_API */1063#else /* INTEL_NO_MACRO_BODY */1064#define __itt_model_site_begin_ptr 01065#if ITT_PLATFORM==ITT_PLATFORM_WIN1066#define __itt_model_site_beginW_ptr 01067#endif1068#define __itt_model_site_beginA_ptr 01069#define __itt_model_site_beginAL_ptr 01070#define __itt_model_site_end_ptr 01071#define __itt_model_site_end_2_ptr 01072#endif /* INTEL_NO_MACRO_BODY */1073/** @endcond */10741075/**1076* @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support1077*1078* task_begin/end model a potential task, which is contained within the most1079* closely enclosing dynamic site. task_end exits the most recently started1080* but unended task. The handle passed to end may be used to validate1081* structure. It is unspecified if bad dynamic nesting is detected. If it1082* is, it should be encoded in the resulting data collection. The collector1083* should not fail due to construct nesting issues, nor attempt to directly1084* indicate the problem.1085*/1086void ITTAPI __itt_model_task_begin(__itt_model_task *task, __itt_model_task_instance *instance, const char *name);1087#if ITT_PLATFORM==ITT_PLATFORM_WIN1088void ITTAPI __itt_model_task_beginW(const wchar_t *name);1089void ITTAPI __itt_model_iteration_taskW(const wchar_t *name);1090#endif1091void ITTAPI __itt_model_task_beginA(const char *name);1092void ITTAPI __itt_model_task_beginAL(const char *name, size_t taskNameLen);1093void ITTAPI __itt_model_iteration_taskA(const char *name);1094void ITTAPI __itt_model_iteration_taskAL(const char *name, size_t taskNameLen);1095void ITTAPI __itt_model_task_end (__itt_model_task *task, __itt_model_task_instance *instance);1096void ITTAPI __itt_model_task_end_2(void);10971098/** @cond exclude_from_documentation */1099#ifndef INTEL_NO_MACRO_BODY1100#ifndef INTEL_NO_ITTNOTIFY_API1101ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name))1102#if ITT_PLATFORM==ITT_PLATFORM_WIN1103ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name))1104ITT_STUBV(ITTAPI, void, model_iteration_taskW, (const wchar_t *name))1105#endif1106ITT_STUBV(ITTAPI, void, model_task_beginA, (const char *name))1107ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t taskNameLen))1108ITT_STUBV(ITTAPI, void, model_iteration_taskA, (const char *name))1109ITT_STUBV(ITTAPI, void, model_iteration_taskAL, (const char *name, size_t taskNameLen))1110ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance))1111ITT_STUBV(ITTAPI, void, model_task_end_2, (void))1112#define __itt_model_task_begin ITTNOTIFY_VOID(model_task_begin)1113#define __itt_model_task_begin_ptr ITTNOTIFY_NAME(model_task_begin)1114#if ITT_PLATFORM==ITT_PLATFORM_WIN1115#define __itt_model_task_beginW ITTNOTIFY_VOID(model_task_beginW)1116#define __itt_model_task_beginW_ptr ITTNOTIFY_NAME(model_task_beginW)1117#define __itt_model_iteration_taskW ITTNOTIFY_VOID(model_iteration_taskW)1118#define __itt_model_iteration_taskW_ptr ITTNOTIFY_NAME(model_iteration_taskW)1119#endif1120#define __itt_model_task_beginA ITTNOTIFY_VOID(model_task_beginA)1121#define __itt_model_task_beginA_ptr ITTNOTIFY_NAME(model_task_beginA)1122#define __itt_model_task_beginAL ITTNOTIFY_VOID(model_task_beginAL)1123#define __itt_model_task_beginAL_ptr ITTNOTIFY_NAME(model_task_beginAL)1124#define __itt_model_iteration_taskA ITTNOTIFY_VOID(model_iteration_taskA)1125#define __itt_model_iteration_taskA_ptr ITTNOTIFY_NAME(model_iteration_taskA)1126#define __itt_model_iteration_taskAL ITTNOTIFY_VOID(model_iteration_taskAL)1127#define __itt_model_iteration_taskAL_ptr ITTNOTIFY_NAME(model_iteration_taskAL)1128#define __itt_model_task_end ITTNOTIFY_VOID(model_task_end)1129#define __itt_model_task_end_ptr ITTNOTIFY_NAME(model_task_end)1130#define __itt_model_task_end_2 ITTNOTIFY_VOID(model_task_end_2)1131#define __itt_model_task_end_2_ptr ITTNOTIFY_NAME(model_task_end_2)1132#else /* INTEL_NO_ITTNOTIFY_API */1133#define __itt_model_task_begin(task, instance, name)1134#define __itt_model_task_begin_ptr 01135#if ITT_PLATFORM==ITT_PLATFORM_WIN1136#define __itt_model_task_beginW(name)1137#define __itt_model_task_beginW_ptr 01138#endif1139#define __itt_model_task_beginA(name)1140#define __itt_model_task_beginA_ptr 01141#define __itt_model_task_beginAL(name, siteNameLen)1142#define __itt_model_task_beginAL_ptr 01143#define __itt_model_iteration_taskA(name)1144#define __itt_model_iteration_taskA_ptr 01145#define __itt_model_iteration_taskAL(name, siteNameLen)1146#define __itt_model_iteration_taskAL_ptr 01147#define __itt_model_task_end(task, instance)1148#define __itt_model_task_end_ptr 01149#define __itt_model_task_end_2()1150#define __itt_model_task_end_2_ptr 01151#endif /* INTEL_NO_ITTNOTIFY_API */1152#else /* INTEL_NO_MACRO_BODY */1153#define __itt_model_task_begin_ptr 01154#if ITT_PLATFORM==ITT_PLATFORM_WIN1155#define __itt_model_task_beginW_ptr 01156#endif1157#define __itt_model_task_beginA_ptr 01158#define __itt_model_task_beginAL_ptr 01159#define __itt_model_iteration_taskA_ptr 01160#define __itt_model_iteration_taskAL_ptr 01161#define __itt_model_task_end_ptr 01162#define __itt_model_task_end_2_ptr 01163#endif /* INTEL_NO_MACRO_BODY */1164/** @endcond */11651166/**1167* @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support1168*1169* lock_acquire/release model a potential lock for both lockset and1170* performance modeling. Each unique address is modeled as a separate1171* lock, with invalid addresses being valid lock IDs. Specifically:1172* no storage is accessed by the API at the specified address - it is only1173* used for lock identification. Lock acquires may be self-nested and are1174* unlocked by a corresponding number of releases.1175* (These closely correspond to __itt_sync_acquired/__itt_sync_releasing,1176* but may not have identical semantics.)1177*/1178void ITTAPI __itt_model_lock_acquire(void *lock);1179void ITTAPI __itt_model_lock_acquire_2(void *lock);1180void ITTAPI __itt_model_lock_release(void *lock);1181void ITTAPI __itt_model_lock_release_2(void *lock);11821183/** @cond exclude_from_documentation */1184#ifndef INTEL_NO_MACRO_BODY1185#ifndef INTEL_NO_ITTNOTIFY_API1186ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock))1187ITT_STUBV(ITTAPI, void, model_lock_acquire_2, (void *lock))1188ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock))1189ITT_STUBV(ITTAPI, void, model_lock_release_2, (void *lock))1190#define __itt_model_lock_acquire ITTNOTIFY_VOID(model_lock_acquire)1191#define __itt_model_lock_acquire_ptr ITTNOTIFY_NAME(model_lock_acquire)1192#define __itt_model_lock_acquire_2 ITTNOTIFY_VOID(model_lock_acquire_2)1193#define __itt_model_lock_acquire_2_ptr ITTNOTIFY_NAME(model_lock_acquire_2)1194#define __itt_model_lock_release ITTNOTIFY_VOID(model_lock_release)1195#define __itt_model_lock_release_ptr ITTNOTIFY_NAME(model_lock_release)1196#define __itt_model_lock_release_2 ITTNOTIFY_VOID(model_lock_release_2)1197#define __itt_model_lock_release_2_ptr ITTNOTIFY_NAME(model_lock_release_2)1198#else /* INTEL_NO_ITTNOTIFY_API */1199#define __itt_model_lock_acquire(lock)1200#define __itt_model_lock_acquire_ptr 01201#define __itt_model_lock_acquire_2(lock)1202#define __itt_model_lock_acquire_2_ptr 01203#define __itt_model_lock_release(lock)1204#define __itt_model_lock_release_ptr 01205#define __itt_model_lock_release_2(lock)1206#define __itt_model_lock_release_2_ptr 01207#endif /* INTEL_NO_ITTNOTIFY_API */1208#else /* INTEL_NO_MACRO_BODY */1209#define __itt_model_lock_acquire_ptr 01210#define __itt_model_lock_acquire_2_ptr 01211#define __itt_model_lock_release_ptr 01212#define __itt_model_lock_release_2_ptr 01213#endif /* INTEL_NO_MACRO_BODY */1214/** @endcond */12151216/**1217* @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support1218*1219* record_allocation/deallocation describe user-defined memory allocator1220* behavior, which may be required for correctness modeling to understand1221* when storage is not expected to be actually reused across threads.1222*/1223void ITTAPI __itt_model_record_allocation (void *addr, size_t size);1224void ITTAPI __itt_model_record_deallocation(void *addr);12251226/** @cond exclude_from_documentation */1227#ifndef INTEL_NO_MACRO_BODY1228#ifndef INTEL_NO_ITTNOTIFY_API1229ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size))1230ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr))1231#define __itt_model_record_allocation ITTNOTIFY_VOID(model_record_allocation)1232#define __itt_model_record_allocation_ptr ITTNOTIFY_NAME(model_record_allocation)1233#define __itt_model_record_deallocation ITTNOTIFY_VOID(model_record_deallocation)1234#define __itt_model_record_deallocation_ptr ITTNOTIFY_NAME(model_record_deallocation)1235#else /* INTEL_NO_ITTNOTIFY_API */1236#define __itt_model_record_allocation(addr, size)1237#define __itt_model_record_allocation_ptr 01238#define __itt_model_record_deallocation(addr)1239#define __itt_model_record_deallocation_ptr 01240#endif /* INTEL_NO_ITTNOTIFY_API */1241#else /* INTEL_NO_MACRO_BODY */1242#define __itt_model_record_allocation_ptr 01243#define __itt_model_record_deallocation_ptr 01244#endif /* INTEL_NO_MACRO_BODY */1245/** @endcond */12461247/**1248* @brief ANNOTATE_INDUCTION_USES support1249*1250* Note particular storage is inductive through the end of the current site1251*/1252void ITTAPI __itt_model_induction_uses(void* addr, size_t size);12531254/** @cond exclude_from_documentation */1255#ifndef INTEL_NO_MACRO_BODY1256#ifndef INTEL_NO_ITTNOTIFY_API1257ITT_STUBV(ITTAPI, void, model_induction_uses, (void *addr, size_t size))1258#define __itt_model_induction_uses ITTNOTIFY_VOID(model_induction_uses)1259#define __itt_model_induction_uses_ptr ITTNOTIFY_NAME(model_induction_uses)1260#else /* INTEL_NO_ITTNOTIFY_API */1261#define __itt_model_induction_uses(addr, size)1262#define __itt_model_induction_uses_ptr 01263#endif /* INTEL_NO_ITTNOTIFY_API */1264#else /* INTEL_NO_MACRO_BODY */1265#define __itt_model_induction_uses_ptr 01266#endif /* INTEL_NO_MACRO_BODY */1267/** @endcond */12681269/**1270* @brief ANNOTATE_REDUCTION_USES support1271*1272* Note particular storage is used for reduction through the end1273* of the current site1274*/1275void ITTAPI __itt_model_reduction_uses(void* addr, size_t size);12761277/** @cond exclude_from_documentation */1278#ifndef INTEL_NO_MACRO_BODY1279#ifndef INTEL_NO_ITTNOTIFY_API1280ITT_STUBV(ITTAPI, void, model_reduction_uses, (void *addr, size_t size))1281#define __itt_model_reduction_uses ITTNOTIFY_VOID(model_reduction_uses)1282#define __itt_model_reduction_uses_ptr ITTNOTIFY_NAME(model_reduction_uses)1283#else /* INTEL_NO_ITTNOTIFY_API */1284#define __itt_model_reduction_uses(addr, size)1285#define __itt_model_reduction_uses_ptr 01286#endif /* INTEL_NO_ITTNOTIFY_API */1287#else /* INTEL_NO_MACRO_BODY */1288#define __itt_model_reduction_uses_ptr 01289#endif /* INTEL_NO_MACRO_BODY */1290/** @endcond */12911292/**1293* @brief ANNOTATE_OBSERVE_USES support1294*1295* Have correctness modeling record observations about uses of storage1296* through the end of the current site1297*/1298void ITTAPI __itt_model_observe_uses(void* addr, size_t size);12991300/** @cond exclude_from_documentation */1301#ifndef INTEL_NO_MACRO_BODY1302#ifndef INTEL_NO_ITTNOTIFY_API1303ITT_STUBV(ITTAPI, void, model_observe_uses, (void *addr, size_t size))1304#define __itt_model_observe_uses ITTNOTIFY_VOID(model_observe_uses)1305#define __itt_model_observe_uses_ptr ITTNOTIFY_NAME(model_observe_uses)1306#else /* INTEL_NO_ITTNOTIFY_API */1307#define __itt_model_observe_uses(addr, size)1308#define __itt_model_observe_uses_ptr 01309#endif /* INTEL_NO_ITTNOTIFY_API */1310#else /* INTEL_NO_MACRO_BODY */1311#define __itt_model_observe_uses_ptr 01312#endif /* INTEL_NO_MACRO_BODY */1313/** @endcond */13141315/**1316* @brief ANNOTATE_CLEAR_USES support1317*1318* Clear the special handling of a piece of storage related to induction,1319* reduction or observe_uses1320*/1321void ITTAPI __itt_model_clear_uses(void* addr);13221323/** @cond exclude_from_documentation */1324#ifndef INTEL_NO_MACRO_BODY1325#ifndef INTEL_NO_ITTNOTIFY_API1326ITT_STUBV(ITTAPI, void, model_clear_uses, (void *addr))1327#define __itt_model_clear_uses ITTNOTIFY_VOID(model_clear_uses)1328#define __itt_model_clear_uses_ptr ITTNOTIFY_NAME(model_clear_uses)1329#else /* INTEL_NO_ITTNOTIFY_API */1330#define __itt_model_clear_uses(addr)1331#define __itt_model_clear_uses_ptr 01332#endif /* INTEL_NO_ITTNOTIFY_API */1333#else /* INTEL_NO_MACRO_BODY */1334#define __itt_model_clear_uses_ptr 01335#endif /* INTEL_NO_MACRO_BODY */1336/** @endcond */13371338/**1339* @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support1340*1341* disable_push/disable_pop push and pop disabling based on a parameter.1342* Disabling observations stops processing of memory references during1343* correctness modeling, and all annotations that occur in the disabled1344* region. This allows description of code that is expected to be handled1345* specially during conversion to parallelism or that is not recognized1346* by tools (e.g. some kinds of synchronization operations.)1347* This mechanism causes all annotations in the disabled region, other1348* than disable_push and disable_pop, to be ignored. (For example, this1349* might validly be used to disable an entire parallel site and the contained1350* tasks and locking in it for data collection purposes.)1351* The disable for collection is a more expensive operation, but reduces1352* collector overhead significantly. This applies to BOTH correctness data1353* collection and performance data collection. For example, a site1354* containing a task might only enable data collection for the first 101355* iterations. Both performance and correctness data should reflect this,1356* and the program should run as close to full speed as possible when1357* collection is disabled.1358*/1359void ITTAPI __itt_model_disable_push(__itt_model_disable x);1360void ITTAPI __itt_model_disable_pop(void);1361void ITTAPI __itt_model_aggregate_task(size_t x);13621363/** @cond exclude_from_documentation */1364#ifndef INTEL_NO_MACRO_BODY1365#ifndef INTEL_NO_ITTNOTIFY_API1366ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x))1367ITT_STUBV(ITTAPI, void, model_disable_pop, (void))1368ITT_STUBV(ITTAPI, void, model_aggregate_task, (size_t x))1369#define __itt_model_disable_push ITTNOTIFY_VOID(model_disable_push)1370#define __itt_model_disable_push_ptr ITTNOTIFY_NAME(model_disable_push)1371#define __itt_model_disable_pop ITTNOTIFY_VOID(model_disable_pop)1372#define __itt_model_disable_pop_ptr ITTNOTIFY_NAME(model_disable_pop)1373#define __itt_model_aggregate_task ITTNOTIFY_VOID(model_aggregate_task)1374#define __itt_model_aggregate_task_ptr ITTNOTIFY_NAME(model_aggregate_task)1375#else /* INTEL_NO_ITTNOTIFY_API */1376#define __itt_model_disable_push(x)1377#define __itt_model_disable_push_ptr 01378#define __itt_model_disable_pop()1379#define __itt_model_disable_pop_ptr 01380#define __itt_model_aggregate_task(x)1381#define __itt_model_aggregate_task_ptr 01382#endif /* INTEL_NO_ITTNOTIFY_API */1383#else /* INTEL_NO_MACRO_BODY */1384#define __itt_model_disable_push_ptr 01385#define __itt_model_disable_pop_ptr 01386#define __itt_model_aggregate_task_ptr 01387#endif /* INTEL_NO_MACRO_BODY */1388/** @endcond */1389/** @} model group */13901391/**1392* @defgroup heap Heap1393* @ingroup public1394* Heap group1395* @{1396*/13971398typedef void* __itt_heap_function;13991400/**1401* @brief Create an identification for heap function1402* @return non-zero identifier or NULL1403*/1404#if ITT_PLATFORM==ITT_PLATFORM_WIN1405__itt_heap_function ITTAPI __itt_heap_function_createA(const char* name, const char* domain);1406__itt_heap_function ITTAPI __itt_heap_function_createW(const wchar_t* name, const wchar_t* domain);1407#if defined(UNICODE) || defined(_UNICODE)1408# define __itt_heap_function_create __itt_heap_function_createW1409# define __itt_heap_function_create_ptr __itt_heap_function_createW_ptr1410#else1411# define __itt_heap_function_create __itt_heap_function_createA1412# define __itt_heap_function_create_ptr __itt_heap_function_createA_ptr1413#endif /* UNICODE */1414#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1415__itt_heap_function ITTAPI __itt_heap_function_create(const char* name, const char* domain);1416#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */14171418/** @cond exclude_from_documentation */1419#ifndef INTEL_NO_MACRO_BODY1420#ifndef INTEL_NO_ITTNOTIFY_API1421#if ITT_PLATFORM==ITT_PLATFORM_WIN1422ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char* name, const char* domain))1423ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t* name, const wchar_t* domain))1424#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1425ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char* name, const char* domain))1426#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1427#if ITT_PLATFORM==ITT_PLATFORM_WIN1428#define __itt_heap_function_createA ITTNOTIFY_DATA(heap_function_createA)1429#define __itt_heap_function_createA_ptr ITTNOTIFY_NAME(heap_function_createA)1430#define __itt_heap_function_createW ITTNOTIFY_DATA(heap_function_createW)1431#define __itt_heap_function_createW_ptr ITTNOTIFY_NAME(heap_function_createW)1432#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1433#define __itt_heap_function_create ITTNOTIFY_DATA(heap_function_create)1434#define __itt_heap_function_create_ptr ITTNOTIFY_NAME(heap_function_create)1435#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1436#else /* INTEL_NO_ITTNOTIFY_API */1437#if ITT_PLATFORM==ITT_PLATFORM_WIN1438#define __itt_heap_function_createA(name, domain) (__itt_heap_function)01439#define __itt_heap_function_createA_ptr 01440#define __itt_heap_function_createW(name, domain) (__itt_heap_function)01441#define __itt_heap_function_createW_ptr 01442#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1443#define __itt_heap_function_create(name, domain) (__itt_heap_function)01444#define __itt_heap_function_create_ptr 01445#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1446#endif /* INTEL_NO_ITTNOTIFY_API */1447#else /* INTEL_NO_MACRO_BODY */1448#if ITT_PLATFORM==ITT_PLATFORM_WIN1449#define __itt_heap_function_createA_ptr 01450#define __itt_heap_function_createW_ptr 01451#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1452#define __itt_heap_function_create_ptr 01453#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1454#endif /* INTEL_NO_MACRO_BODY */1455/** @endcond */14561457/**1458* @brief Record an allocation begin occurrence.1459*/1460void ITTAPI __itt_heap_allocate_begin(__itt_heap_function h, size_t size, int initialized);14611462/** @cond exclude_from_documentation */1463#ifndef INTEL_NO_MACRO_BODY1464#ifndef INTEL_NO_ITTNOTIFY_API1465ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized))1466#define __itt_heap_allocate_begin ITTNOTIFY_VOID(heap_allocate_begin)1467#define __itt_heap_allocate_begin_ptr ITTNOTIFY_NAME(heap_allocate_begin)1468#else /* INTEL_NO_ITTNOTIFY_API */1469#define __itt_heap_allocate_begin(h, size, initialized)1470#define __itt_heap_allocate_begin_ptr 01471#endif /* INTEL_NO_ITTNOTIFY_API */1472#else /* INTEL_NO_MACRO_BODY */1473#define __itt_heap_allocate_begin_ptr 01474#endif /* INTEL_NO_MACRO_BODY */1475/** @endcond */14761477/**1478* @brief Record an allocation end occurrence.1479*/1480void ITTAPI __itt_heap_allocate_end(__itt_heap_function h, void** addr, size_t size, int initialized);14811482/** @cond exclude_from_documentation */1483#ifndef INTEL_NO_MACRO_BODY1484#ifndef INTEL_NO_ITTNOTIFY_API1485ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized))1486#define __itt_heap_allocate_end ITTNOTIFY_VOID(heap_allocate_end)1487#define __itt_heap_allocate_end_ptr ITTNOTIFY_NAME(heap_allocate_end)1488#else /* INTEL_NO_ITTNOTIFY_API */1489#define __itt_heap_allocate_end(h, addr, size, initialized)1490#define __itt_heap_allocate_end_ptr 01491#endif /* INTEL_NO_ITTNOTIFY_API */1492#else /* INTEL_NO_MACRO_BODY */1493#define __itt_heap_allocate_end_ptr 01494#endif /* INTEL_NO_MACRO_BODY */1495/** @endcond */14961497/**1498* @brief Record an free begin occurrence.1499*/1500void ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr);15011502/** @cond exclude_from_documentation */1503#ifndef INTEL_NO_MACRO_BODY1504#ifndef INTEL_NO_ITTNOTIFY_API1505ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr))1506#define __itt_heap_free_begin ITTNOTIFY_VOID(heap_free_begin)1507#define __itt_heap_free_begin_ptr ITTNOTIFY_NAME(heap_free_begin)1508#else /* INTEL_NO_ITTNOTIFY_API */1509#define __itt_heap_free_begin(h, addr)1510#define __itt_heap_free_begin_ptr 01511#endif /* INTEL_NO_ITTNOTIFY_API */1512#else /* INTEL_NO_MACRO_BODY */1513#define __itt_heap_free_begin_ptr 01514#endif /* INTEL_NO_MACRO_BODY */1515/** @endcond */15161517/**1518* @brief Record an free end occurrence.1519*/1520void ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr);15211522/** @cond exclude_from_documentation */1523#ifndef INTEL_NO_MACRO_BODY1524#ifndef INTEL_NO_ITTNOTIFY_API1525ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr))1526#define __itt_heap_free_end ITTNOTIFY_VOID(heap_free_end)1527#define __itt_heap_free_end_ptr ITTNOTIFY_NAME(heap_free_end)1528#else /* INTEL_NO_ITTNOTIFY_API */1529#define __itt_heap_free_end(h, addr)1530#define __itt_heap_free_end_ptr 01531#endif /* INTEL_NO_ITTNOTIFY_API */1532#else /* INTEL_NO_MACRO_BODY */1533#define __itt_heap_free_end_ptr 01534#endif /* INTEL_NO_MACRO_BODY */1535/** @endcond */15361537/**1538* @brief Record an reallocation begin occurrence.1539*/1540void ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized);15411542/** @cond exclude_from_documentation */1543#ifndef INTEL_NO_MACRO_BODY1544#ifndef INTEL_NO_ITTNOTIFY_API1545ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized))1546#define __itt_heap_reallocate_begin ITTNOTIFY_VOID(heap_reallocate_begin)1547#define __itt_heap_reallocate_begin_ptr ITTNOTIFY_NAME(heap_reallocate_begin)1548#else /* INTEL_NO_ITTNOTIFY_API */1549#define __itt_heap_reallocate_begin(h, addr, new_size, initialized)1550#define __itt_heap_reallocate_begin_ptr 01551#endif /* INTEL_NO_ITTNOTIFY_API */1552#else /* INTEL_NO_MACRO_BODY */1553#define __itt_heap_reallocate_begin_ptr 01554#endif /* INTEL_NO_MACRO_BODY */1555/** @endcond */15561557/**1558* @brief Record an reallocation end occurrence.1559*/1560void ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized);15611562/** @cond exclude_from_documentation */1563#ifndef INTEL_NO_MACRO_BODY1564#ifndef INTEL_NO_ITTNOTIFY_API1565ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized))1566#define __itt_heap_reallocate_end ITTNOTIFY_VOID(heap_reallocate_end)1567#define __itt_heap_reallocate_end_ptr ITTNOTIFY_NAME(heap_reallocate_end)1568#else /* INTEL_NO_ITTNOTIFY_API */1569#define __itt_heap_reallocate_end(h, addr, new_addr, new_size, initialized)1570#define __itt_heap_reallocate_end_ptr 01571#endif /* INTEL_NO_ITTNOTIFY_API */1572#else /* INTEL_NO_MACRO_BODY */1573#define __itt_heap_reallocate_end_ptr 01574#endif /* INTEL_NO_MACRO_BODY */1575/** @endcond */15761577/** @brief internal access begin */1578void ITTAPI __itt_heap_internal_access_begin(void);15791580/** @cond exclude_from_documentation */1581#ifndef INTEL_NO_MACRO_BODY1582#ifndef INTEL_NO_ITTNOTIFY_API1583ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void))1584#define __itt_heap_internal_access_begin ITTNOTIFY_VOID(heap_internal_access_begin)1585#define __itt_heap_internal_access_begin_ptr ITTNOTIFY_NAME(heap_internal_access_begin)1586#else /* INTEL_NO_ITTNOTIFY_API */1587#define __itt_heap_internal_access_begin()1588#define __itt_heap_internal_access_begin_ptr 01589#endif /* INTEL_NO_ITTNOTIFY_API */1590#else /* INTEL_NO_MACRO_BODY */1591#define __itt_heap_internal_access_begin_ptr 01592#endif /* INTEL_NO_MACRO_BODY */1593/** @endcond */15941595/** @brief internal access end */1596void ITTAPI __itt_heap_internal_access_end(void);15971598/** @cond exclude_from_documentation */1599#ifndef INTEL_NO_MACRO_BODY1600#ifndef INTEL_NO_ITTNOTIFY_API1601ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void))1602#define __itt_heap_internal_access_end ITTNOTIFY_VOID(heap_internal_access_end)1603#define __itt_heap_internal_access_end_ptr ITTNOTIFY_NAME(heap_internal_access_end)1604#else /* INTEL_NO_ITTNOTIFY_API */1605#define __itt_heap_internal_access_end()1606#define __itt_heap_internal_access_end_ptr 01607#endif /* INTEL_NO_ITTNOTIFY_API */1608#else /* INTEL_NO_MACRO_BODY */1609#define __itt_heap_internal_access_end_ptr 01610#endif /* INTEL_NO_MACRO_BODY */1611/** @endcond */16121613/** @brief record memory growth begin */1614void ITTAPI __itt_heap_record_memory_growth_begin(void);16151616/** @cond exclude_from_documentation */1617#ifndef INTEL_NO_MACRO_BODY1618#ifndef INTEL_NO_ITTNOTIFY_API1619ITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin, (void))1620#define __itt_heap_record_memory_growth_begin ITTNOTIFY_VOID(heap_record_memory_growth_begin)1621#define __itt_heap_record_memory_growth_begin_ptr ITTNOTIFY_NAME(heap_record_memory_growth_begin)1622#else /* INTEL_NO_ITTNOTIFY_API */1623#define __itt_heap_record_memory_growth_begin()1624#define __itt_heap_record_memory_growth_begin_ptr 01625#endif /* INTEL_NO_ITTNOTIFY_API */1626#else /* INTEL_NO_MACRO_BODY */1627#define __itt_heap_record_memory_growth_begin_ptr 01628#endif /* INTEL_NO_MACRO_BODY */1629/** @endcond */16301631/** @brief record memory growth end */1632void ITTAPI __itt_heap_record_memory_growth_end(void);16331634/** @cond exclude_from_documentation */1635#ifndef INTEL_NO_MACRO_BODY1636#ifndef INTEL_NO_ITTNOTIFY_API1637ITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void))1638#define __itt_heap_record_memory_growth_end ITTNOTIFY_VOID(heap_record_memory_growth_end)1639#define __itt_heap_record_memory_growth_end_ptr ITTNOTIFY_NAME(heap_record_memory_growth_end)1640#else /* INTEL_NO_ITTNOTIFY_API */1641#define __itt_heap_record_memory_growth_end()1642#define __itt_heap_record_memory_growth_end_ptr 01643#endif /* INTEL_NO_ITTNOTIFY_API */1644#else /* INTEL_NO_MACRO_BODY */1645#define __itt_heap_record_memory_growth_end_ptr 01646#endif /* INTEL_NO_MACRO_BODY */1647/** @endcond */16481649/**1650* @brief Specify the type of heap detection/reporting to modify.1651*/1652/**1653* @hideinitializer1654* @brief Report on memory leaks.1655*/1656#define __itt_heap_leaks 0x0000000116571658/**1659* @hideinitializer1660* @brief Report on memory growth.1661*/1662#define __itt_heap_growth 0x00000002166316641665/** @brief heap reset detection */1666void ITTAPI __itt_heap_reset_detection(unsigned int reset_mask);16671668/** @cond exclude_from_documentation */1669#ifndef INTEL_NO_MACRO_BODY1670#ifndef INTEL_NO_ITTNOTIFY_API1671ITT_STUBV(ITTAPI, void, heap_reset_detection, (unsigned int reset_mask))1672#define __itt_heap_reset_detection ITTNOTIFY_VOID(heap_reset_detection)1673#define __itt_heap_reset_detection_ptr ITTNOTIFY_NAME(heap_reset_detection)1674#else /* INTEL_NO_ITTNOTIFY_API */1675#define __itt_heap_reset_detection()1676#define __itt_heap_reset_detection_ptr 01677#endif /* INTEL_NO_ITTNOTIFY_API */1678#else /* INTEL_NO_MACRO_BODY */1679#define __itt_heap_reset_detection_ptr 01680#endif /* INTEL_NO_MACRO_BODY */1681/** @endcond */16821683/** @brief report */1684void ITTAPI __itt_heap_record(unsigned int record_mask);16851686/** @cond exclude_from_documentation */1687#ifndef INTEL_NO_MACRO_BODY1688#ifndef INTEL_NO_ITTNOTIFY_API1689ITT_STUBV(ITTAPI, void, heap_record, (unsigned int record_mask))1690#define __itt_heap_record ITTNOTIFY_VOID(heap_record)1691#define __itt_heap_record_ptr ITTNOTIFY_NAME(heap_record)1692#else /* INTEL_NO_ITTNOTIFY_API */1693#define __itt_heap_record()1694#define __itt_heap_record_ptr 01695#endif /* INTEL_NO_ITTNOTIFY_API */1696#else /* INTEL_NO_MACRO_BODY */1697#define __itt_heap_record_ptr 01698#endif /* INTEL_NO_MACRO_BODY */1699/** @endcond */17001701/** @} heap group */1702/** @endcond */1703/* ========================================================================== */17041705/**1706* @defgroup domains Domains1707* @ingroup public1708* Domains group1709* @{1710*/17111712/** @cond exclude_from_documentation */1713#pragma pack(push, 8)17141715typedef struct ___itt_domain1716{1717volatile int flags; /*!< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime */1718const char* nameA; /*!< Copy of original name in ASCII. */1719#if defined(UNICODE) || defined(_UNICODE)1720const wchar_t* nameW; /*!< Copy of original name in UNICODE. */1721#else /* UNICODE || _UNICODE */1722void* nameW;1723#endif /* UNICODE || _UNICODE */1724int extra1; /*!< Reserved to the runtime */1725void* extra2; /*!< Reserved to the runtime */1726struct ___itt_domain* next;1727} __itt_domain;17281729#pragma pack(pop)1730/** @endcond */17311732/**1733* @ingroup domains1734* @brief Create a domain.1735* Create domain using some domain name: the URI naming style is recommended.1736* Because the set of domains is expected to be static over the application's1737* execution time, there is no mechanism to destroy a domain.1738* Any domain can be accessed by any thread in the process, regardless of1739* which thread created the domain. This call is thread-safe.1740* @param[in] name name of domain1741*/1742#if ITT_PLATFORM==ITT_PLATFORM_WIN1743__itt_domain* ITTAPI __itt_domain_createA(const char *name);1744__itt_domain* ITTAPI __itt_domain_createW(const wchar_t *name);1745#if defined(UNICODE) || defined(_UNICODE)1746# define __itt_domain_create __itt_domain_createW1747# define __itt_domain_create_ptr __itt_domain_createW_ptr1748#else /* UNICODE */1749# define __itt_domain_create __itt_domain_createA1750# define __itt_domain_create_ptr __itt_domain_createA_ptr1751#endif /* UNICODE */1752#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1753__itt_domain* ITTAPI __itt_domain_create(const char *name);1754#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */17551756/** @cond exclude_from_documentation */1757#ifndef INTEL_NO_MACRO_BODY1758#ifndef INTEL_NO_ITTNOTIFY_API1759#if ITT_PLATFORM==ITT_PLATFORM_WIN1760ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name))1761ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name))1762#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1763ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name))1764#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1765#if ITT_PLATFORM==ITT_PLATFORM_WIN1766#define __itt_domain_createA ITTNOTIFY_DATA(domain_createA)1767#define __itt_domain_createA_ptr ITTNOTIFY_NAME(domain_createA)1768#define __itt_domain_createW ITTNOTIFY_DATA(domain_createW)1769#define __itt_domain_createW_ptr ITTNOTIFY_NAME(domain_createW)1770#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1771#define __itt_domain_create ITTNOTIFY_DATA(domain_create)1772#define __itt_domain_create_ptr ITTNOTIFY_NAME(domain_create)1773#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1774#else /* INTEL_NO_ITTNOTIFY_API */1775#if ITT_PLATFORM==ITT_PLATFORM_WIN1776#define __itt_domain_createA(name) (__itt_domain*)01777#define __itt_domain_createA_ptr 01778#define __itt_domain_createW(name) (__itt_domain*)01779#define __itt_domain_createW_ptr 01780#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1781#define __itt_domain_create(name) (__itt_domain*)01782#define __itt_domain_create_ptr 01783#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1784#endif /* INTEL_NO_ITTNOTIFY_API */1785#else /* INTEL_NO_MACRO_BODY */1786#if ITT_PLATFORM==ITT_PLATFORM_WIN1787#define __itt_domain_createA_ptr 01788#define __itt_domain_createW_ptr 01789#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1790#define __itt_domain_create_ptr 01791#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1792#endif /* INTEL_NO_MACRO_BODY */1793/** @endcond */1794/** @} domains group */17951796/**1797* @defgroup ids IDs1798* @ingroup public1799* IDs group1800* @{1801*/18021803/** @cond exclude_from_documentation */1804#pragma pack(push, 8)18051806typedef struct ___itt_id1807{1808unsigned long long d1, d2, d3;1809} __itt_id;18101811#pragma pack(pop)1812/** @endcond */18131814static const __itt_id __itt_null = { 0, 0, 0 };18151816/**1817* @ingroup ids1818* @brief A convenience function is provided to create an ID without domain control.1819* @brief This is a convenience function to initialize an __itt_id structure. This function1820* does not affect the collector runtime in any way. After you make the ID with this1821* function, you still must create it with the __itt_id_create function before using the ID1822* to identify a named entity.1823* @param[in] addr The address of object; high QWORD of the ID value.1824* @param[in] extra The extra data to unique identify object; low QWORD of the ID value.1825*/18261827ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) ITT_INLINE_ATTRIBUTE;1828ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra)1829{1830__itt_id id = __itt_null;1831id.d1 = (unsigned long long)((uintptr_t)addr);1832id.d2 = (unsigned long long)extra;1833id.d3 = (unsigned long long)0; /* Reserved. Must be zero */1834return id;1835}18361837/**1838* @ingroup ids1839* @brief Create an instance of identifier.1840* This establishes the beginning of the lifetime of an instance of1841* the given ID in the trace. Once this lifetime starts, the ID1842* can be used to tag named entity instances in calls such as1843* __itt_task_begin, and to specify relationships among1844* identified named entity instances, using the \ref relations APIs.1845* Instance IDs are not domain specific!1846* @param[in] domain The domain controlling the execution of this call.1847* @param[in] id The ID to create.1848*/1849void ITTAPI __itt_id_create(const __itt_domain *domain, __itt_id id);18501851/** @cond exclude_from_documentation */1852#ifndef INTEL_NO_MACRO_BODY1853#ifndef INTEL_NO_ITTNOTIFY_API1854ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id))1855#define __itt_id_create(d,x) ITTNOTIFY_VOID_D1(id_create,d,x)1856#define __itt_id_create_ptr ITTNOTIFY_NAME(id_create)1857#else /* INTEL_NO_ITTNOTIFY_API */1858#define __itt_id_create(domain,id)1859#define __itt_id_create_ptr 01860#endif /* INTEL_NO_ITTNOTIFY_API */1861#else /* INTEL_NO_MACRO_BODY */1862#define __itt_id_create_ptr 01863#endif /* INTEL_NO_MACRO_BODY */1864/** @endcond */18651866/**1867* @ingroup ids1868* @brief Destroy an instance of identifier.1869* This ends the lifetime of the current instance of the given ID value in the trace.1870* Any relationships that are established after this lifetime ends are invalid.1871* This call must be performed before the given ID value can be reused for a different1872* named entity instance.1873* @param[in] domain The domain controlling the execution of this call.1874* @param[in] id The ID to destroy.1875*/1876void ITTAPI __itt_id_destroy(const __itt_domain *domain, __itt_id id);18771878/** @cond exclude_from_documentation */1879#ifndef INTEL_NO_MACRO_BODY1880#ifndef INTEL_NO_ITTNOTIFY_API1881ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id))1882#define __itt_id_destroy(d,x) ITTNOTIFY_VOID_D1(id_destroy,d,x)1883#define __itt_id_destroy_ptr ITTNOTIFY_NAME(id_destroy)1884#else /* INTEL_NO_ITTNOTIFY_API */1885#define __itt_id_destroy(domain,id)1886#define __itt_id_destroy_ptr 01887#endif /* INTEL_NO_ITTNOTIFY_API */1888#else /* INTEL_NO_MACRO_BODY */1889#define __itt_id_destroy_ptr 01890#endif /* INTEL_NO_MACRO_BODY */1891/** @endcond */1892/** @} ids group */18931894/**1895* @defgroup handless String Handles1896* @ingroup public1897* String Handles group1898* @{1899*/19001901/** @cond exclude_from_documentation */1902#pragma pack(push, 8)19031904typedef struct ___itt_string_handle1905{1906const char* strA; /*!< Copy of original string in ASCII. */1907#if defined(UNICODE) || defined(_UNICODE)1908const wchar_t* strW; /*!< Copy of original string in UNICODE. */1909#else /* UNICODE || _UNICODE */1910void* strW;1911#endif /* UNICODE || _UNICODE */1912int extra1; /*!< Reserved. Must be zero */1913void* extra2; /*!< Reserved. Must be zero */1914struct ___itt_string_handle* next;1915} __itt_string_handle;19161917#pragma pack(pop)1918/** @endcond */19191920/**1921* @ingroup handles1922* @brief Create a string handle.1923* Create and return handle value that can be associated with a string.1924* Consecutive calls to __itt_string_handle_create with the same name1925* return the same value. Because the set of string handles is expected to remain1926* static during the application's execution time, there is no mechanism to destroy a string handle.1927* Any string handle can be accessed by any thread in the process, regardless of which thread created1928* the string handle. This call is thread-safe.1929* @param[in] name The input string1930*/1931#if ITT_PLATFORM==ITT_PLATFORM_WIN1932__itt_string_handle* ITTAPI __itt_string_handle_createA(const char *name);1933__itt_string_handle* ITTAPI __itt_string_handle_createW(const wchar_t *name);1934#if defined(UNICODE) || defined(_UNICODE)1935# define __itt_string_handle_create __itt_string_handle_createW1936# define __itt_string_handle_create_ptr __itt_string_handle_createW_ptr1937#else /* UNICODE */1938# define __itt_string_handle_create __itt_string_handle_createA1939# define __itt_string_handle_create_ptr __itt_string_handle_createA_ptr1940#endif /* UNICODE */1941#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1942__itt_string_handle* ITTAPI __itt_string_handle_create(const char *name);1943#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */19441945/** @cond exclude_from_documentation */1946#ifndef INTEL_NO_MACRO_BODY1947#ifndef INTEL_NO_ITTNOTIFY_API1948#if ITT_PLATFORM==ITT_PLATFORM_WIN1949ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name))1950ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name))1951#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1952ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name))1953#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1954#if ITT_PLATFORM==ITT_PLATFORM_WIN1955#define __itt_string_handle_createA ITTNOTIFY_DATA(string_handle_createA)1956#define __itt_string_handle_createA_ptr ITTNOTIFY_NAME(string_handle_createA)1957#define __itt_string_handle_createW ITTNOTIFY_DATA(string_handle_createW)1958#define __itt_string_handle_createW_ptr ITTNOTIFY_NAME(string_handle_createW)1959#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1960#define __itt_string_handle_create ITTNOTIFY_DATA(string_handle_create)1961#define __itt_string_handle_create_ptr ITTNOTIFY_NAME(string_handle_create)1962#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1963#else /* INTEL_NO_ITTNOTIFY_API */1964#if ITT_PLATFORM==ITT_PLATFORM_WIN1965#define __itt_string_handle_createA(name) (__itt_string_handle*)01966#define __itt_string_handle_createA_ptr 01967#define __itt_string_handle_createW(name) (__itt_string_handle*)01968#define __itt_string_handle_createW_ptr 01969#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1970#define __itt_string_handle_create(name) (__itt_string_handle*)01971#define __itt_string_handle_create_ptr 01972#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1973#endif /* INTEL_NO_ITTNOTIFY_API */1974#else /* INTEL_NO_MACRO_BODY */1975#if ITT_PLATFORM==ITT_PLATFORM_WIN1976#define __itt_string_handle_createA_ptr 01977#define __itt_string_handle_createW_ptr 01978#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1979#define __itt_string_handle_create_ptr 01980#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1981#endif /* INTEL_NO_MACRO_BODY */1982/** @endcond */1983/** @} handles group */19841985/** @cond exclude_from_documentation */1986typedef unsigned long long __itt_timestamp;1987/** @endcond */19881989#define __itt_timestamp_none ((__itt_timestamp)-1LL)19901991/** @cond exclude_from_gpa_documentation */19921993/**1994* @ingroup timestamps1995* @brief Return timestamp corresponding to the current moment.1996* This returns the timestamp in the format that is the most relevant for the current1997* host or platform (RDTSC, QPC, and others). You can use the "<" operator to1998* compare __itt_timestamp values.1999*/2000__itt_timestamp ITTAPI __itt_get_timestamp(void);20012002/** @cond exclude_from_documentation */2003#ifndef INTEL_NO_MACRO_BODY2004#ifndef INTEL_NO_ITTNOTIFY_API2005ITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void))2006#define __itt_get_timestamp ITTNOTIFY_DATA(get_timestamp)2007#define __itt_get_timestamp_ptr ITTNOTIFY_NAME(get_timestamp)2008#else /* INTEL_NO_ITTNOTIFY_API */2009#define __itt_get_timestamp()2010#define __itt_get_timestamp_ptr 02011#endif /* INTEL_NO_ITTNOTIFY_API */2012#else /* INTEL_NO_MACRO_BODY */2013#define __itt_get_timestamp_ptr 02014#endif /* INTEL_NO_MACRO_BODY */2015/** @endcond */2016/** @} timestamps */2017/** @endcond */20182019/** @cond exclude_from_gpa_documentation */20202021/**2022* @defgroup regions Regions2023* @ingroup public2024* Regions group2025* @{2026*/2027/**2028* @ingroup regions2029* @brief Begin of region instance.2030* Successive calls to __itt_region_begin with the same ID are ignored2031* until a call to __itt_region_end with the same ID2032* @param[in] domain The domain for this region instance2033* @param[in] id The instance ID for this region instance. Must not be __itt_null2034* @param[in] parentid The instance ID for the parent of this region instance, or __itt_null2035* @param[in] name The name of this region2036*/2037void ITTAPI __itt_region_begin(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name);20382039/**2040* @ingroup regions2041* @brief End of region instance.2042* The first call to __itt_region_end with a given ID ends the2043* region. Successive calls with the same ID are ignored, as are2044* calls that do not have a matching __itt_region_begin call.2045* @param[in] domain The domain for this region instance2046* @param[in] id The instance ID for this region instance2047*/2048void ITTAPI __itt_region_end(const __itt_domain *domain, __itt_id id);20492050/** @cond exclude_from_documentation */2051#ifndef INTEL_NO_MACRO_BODY2052#ifndef INTEL_NO_ITTNOTIFY_API2053ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))2054ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id))2055#define __itt_region_begin(d,x,y,z) ITTNOTIFY_VOID_D3(region_begin,d,x,y,z)2056#define __itt_region_begin_ptr ITTNOTIFY_NAME(region_begin)2057#define __itt_region_end(d,x) ITTNOTIFY_VOID_D1(region_end,d,x)2058#define __itt_region_end_ptr ITTNOTIFY_NAME(region_end)2059#else /* INTEL_NO_ITTNOTIFY_API */2060#define __itt_region_begin(d,x,y,z)2061#define __itt_region_begin_ptr 02062#define __itt_region_end(d,x)2063#define __itt_region_end_ptr 02064#endif /* INTEL_NO_ITTNOTIFY_API */2065#else /* INTEL_NO_MACRO_BODY */2066#define __itt_region_begin_ptr 02067#define __itt_region_end_ptr 02068#endif /* INTEL_NO_MACRO_BODY */2069/** @endcond */2070/** @} regions group */20712072/**2073* @defgroup frames Frames2074* @ingroup public2075* Frames are similar to regions, but are intended to be easier to use and to implement.2076* In particular:2077* - Frames always represent periods of elapsed time2078* - By default, frames have no nesting relationships2079* @{2080*/20812082/**2083* @ingroup frames2084* @brief Begin a frame instance.2085* Successive calls to __itt_frame_begin with the2086* same ID are ignored until a call to __itt_frame_end with the same ID.2087* @param[in] domain The domain for this frame instance2088* @param[in] id The instance ID for this frame instance or NULL2089*/2090void ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id);20912092/**2093* @ingroup frames2094* @brief End a frame instance.2095* The first call to __itt_frame_end with a given ID2096* ends the frame. Successive calls with the same ID are ignored, as are2097* calls that do not have a matching __itt_frame_begin call.2098* @param[in] domain The domain for this frame instance2099* @param[in] id The instance ID for this frame instance or NULL for current2100*/2101void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id);21022103/**2104* @ingroup frames2105* @brief Submits a frame instance.2106* Successive calls to __itt_frame_begin or __itt_frame_submit with the2107* same ID are ignored until a call to __itt_frame_end or __itt_frame_submit2108* with the same ID.2109* Passing special __itt_timestamp_none value as "end" argument means2110* take the current timestamp as the end timestamp.2111* @param[in] domain The domain for this frame instance2112* @param[in] id The instance ID for this frame instance or NULL2113* @param[in] begin Timestamp of the beginning of the frame2114* @param[in] end Timestamp of the end of the frame2115*/2116void ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id,2117__itt_timestamp begin, __itt_timestamp end);21182119/** @cond exclude_from_documentation */2120#ifndef INTEL_NO_MACRO_BODY2121#ifndef INTEL_NO_ITTNOTIFY_API2122ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id))2123ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id))2124ITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end))2125#define __itt_frame_begin_v3(d,x) ITTNOTIFY_VOID_D1(frame_begin_v3,d,x)2126#define __itt_frame_begin_v3_ptr ITTNOTIFY_NAME(frame_begin_v3)2127#define __itt_frame_end_v3(d,x) ITTNOTIFY_VOID_D1(frame_end_v3,d,x)2128#define __itt_frame_end_v3_ptr ITTNOTIFY_NAME(frame_end_v3)2129#define __itt_frame_submit_v3(d,x,b,e) ITTNOTIFY_VOID_D3(frame_submit_v3,d,x,b,e)2130#define __itt_frame_submit_v3_ptr ITTNOTIFY_NAME(frame_submit_v3)2131#else /* INTEL_NO_ITTNOTIFY_API */2132#define __itt_frame_begin_v3(domain,id)2133#define __itt_frame_begin_v3_ptr 02134#define __itt_frame_end_v3(domain,id)2135#define __itt_frame_end_v3_ptr 02136#define __itt_frame_submit_v3(domain,id,begin,end)2137#define __itt_frame_submit_v3_ptr 02138#endif /* INTEL_NO_ITTNOTIFY_API */2139#else /* INTEL_NO_MACRO_BODY */2140#define __itt_frame_begin_v3_ptr 02141#define __itt_frame_end_v3_ptr 02142#define __itt_frame_submit_v3_ptr 02143#endif /* INTEL_NO_MACRO_BODY */2144/** @endcond */2145/** @} frames group */2146/** @endcond */21472148/**2149* @defgroup taskgroup Task Group2150* @ingroup public2151* Task Group2152* @{2153*/2154/**2155* @ingroup task_groups2156* @brief Denotes a task_group instance.2157* Successive calls to __itt_task_group with the same ID are ignored.2158* @param[in] domain The domain for this task_group instance2159* @param[in] id The instance ID for this task_group instance. Must not be __itt_null.2160* @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null.2161* @param[in] name The name of this task_group2162*/2163void ITTAPI __itt_task_group(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name);21642165/** @cond exclude_from_documentation */2166#ifndef INTEL_NO_MACRO_BODY2167#ifndef INTEL_NO_ITTNOTIFY_API2168ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))2169#define __itt_task_group(d,x,y,z) ITTNOTIFY_VOID_D3(task_group,d,x,y,z)2170#define __itt_task_group_ptr ITTNOTIFY_NAME(task_group)2171#else /* INTEL_NO_ITTNOTIFY_API */2172#define __itt_task_group(d,x,y,z)2173#define __itt_task_group_ptr 02174#endif /* INTEL_NO_ITTNOTIFY_API */2175#else /* INTEL_NO_MACRO_BODY */2176#define __itt_task_group_ptr 02177#endif /* INTEL_NO_MACRO_BODY */2178/** @endcond */2179/** @} taskgroup group */21802181/**2182* @defgroup tasks Tasks2183* @ingroup public2184* A task instance represents a piece of work performed by a particular2185* thread for a period of time. A call to __itt_task_begin creates a2186* task instance. This becomes the current instance for that task on that2187* thread. A following call to __itt_task_end on the same thread ends the2188* instance. There may be multiple simultaneous instances of tasks with the2189* same name on different threads. If an ID is specified, the task instance2190* receives that ID. Nested tasks are allowed.2191*2192* Note: The task is defined by the bracketing of __itt_task_begin and2193* __itt_task_end on the same thread. If some scheduling mechanism causes2194* task switching (the thread executes a different user task) or task2195* switching (the user task switches to a different thread) then this breaks2196* the notion of current instance. Additional API calls are required to2197* deal with that possibility.2198* @{2199*/22002201/**2202* @ingroup tasks2203* @brief Begin a task instance.2204* @param[in] domain The domain for this task2205* @param[in] taskid The instance ID for this task instance, or __itt_null2206* @param[in] parentid The parent instance to which this task instance belongs, or __itt_null2207* @param[in] name The name of this task2208*/2209void ITTAPI __itt_task_begin(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name);22102211/**2212* @ingroup tasks2213* @brief Begin a task instance.2214* @param[in] domain The domain for this task2215* @param[in] taskid The identifier for this task instance (may be 0)2216* @param[in] parentid The parent of this task (may be 0)2217* @param[in] fn The pointer to the function you are tracing2218*/2219void ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void* fn);22202221/**2222* @ingroup tasks2223* @brief End the current task instance.2224* @param[in] domain The domain for this task2225*/2226void ITTAPI __itt_task_end(const __itt_domain *domain);22272228/**2229* @ingroup tasks2230* @brief Begin an overlapped task instance.2231* @param[in] domain The domain for this task.2232* @param[in] taskid The identifier for this task instance, *cannot* be __itt_null.2233* @param[in] parentid The parent of this task, or __itt_null.2234* @param[in] name The name of this task.2235*/2236void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);22372238/**2239* @ingroup tasks2240* @brief End an overlapped task instance.2241* @param[in] domain The domain for this task2242* @param[in] taskid Explicit ID of finished task2243*/2244void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid);22452246/** @cond exclude_from_documentation */2247#ifndef INTEL_NO_MACRO_BODY2248#ifndef INTEL_NO_ITTNOTIFY_API2249ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name))2250ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn))2251ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain))2252ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name))2253ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid))2254#define __itt_task_begin(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin,d,x,y,z)2255#define __itt_task_begin_ptr ITTNOTIFY_NAME(task_begin)2256#define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z)2257#define __itt_task_begin_fn_ptr ITTNOTIFY_NAME(task_begin_fn)2258#define __itt_task_end(d) ITTNOTIFY_VOID_D0(task_end,d)2259#define __itt_task_end_ptr ITTNOTIFY_NAME(task_end)2260#define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z)2261#define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped)2262#define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x)2263#define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped)2264#else /* INTEL_NO_ITTNOTIFY_API */2265#define __itt_task_begin(domain,id,parentid,name)2266#define __itt_task_begin_ptr 02267#define __itt_task_begin_fn(domain,id,parentid,fn)2268#define __itt_task_begin_fn_ptr 02269#define __itt_task_end(domain)2270#define __itt_task_end_ptr 02271#define __itt_task_begin_overlapped(domain,taskid,parentid,name)2272#define __itt_task_begin_overlapped_ptr 02273#define __itt_task_end_overlapped(domain,taskid)2274#define __itt_task_end_overlapped_ptr 02275#endif /* INTEL_NO_ITTNOTIFY_API */2276#else /* INTEL_NO_MACRO_BODY */2277#define __itt_task_begin_ptr 02278#define __itt_task_begin_fn_ptr 02279#define __itt_task_end_ptr 02280#define __itt_task_begin_overlapped_ptr 02281#define __itt_task_end_overlapped_ptr 02282#endif /* INTEL_NO_MACRO_BODY */2283/** @endcond */2284/** @} tasks group */228522862287/**2288* @defgroup markers Markers2289* Markers represent a single discreet event in time. Markers have a scope,2290* described by an enumerated type __itt_scope. Markers are created by2291* the API call __itt_marker. A marker instance can be given an ID for use in2292* adding metadata.2293* @{2294*/22952296/**2297* @brief Describes the scope of an event object in the trace.2298*/2299typedef enum2300{2301__itt_scope_unknown = 0,2302__itt_scope_global,2303__itt_scope_track_group,2304__itt_scope_track,2305__itt_scope_task,2306__itt_scope_marker2307} __itt_scope;23082309/** @cond exclude_from_documentation */2310#define __itt_marker_scope_unknown __itt_scope_unknown2311#define __itt_marker_scope_global __itt_scope_global2312#define __itt_marker_scope_process __itt_scope_track_group2313#define __itt_marker_scope_thread __itt_scope_track2314#define __itt_marker_scope_task __itt_scope_task2315/** @endcond */23162317/**2318* @ingroup markers2319* @brief Create a marker instance2320* @param[in] domain The domain for this marker2321* @param[in] id The instance ID for this marker or __itt_null2322* @param[in] name The name for this marker2323* @param[in] scope The scope for this marker2324*/2325void ITTAPI __itt_marker(const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope);23262327/** @cond exclude_from_documentation */2328#ifndef INTEL_NO_MACRO_BODY2329#ifndef INTEL_NO_ITTNOTIFY_API2330ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope))2331#define __itt_marker(d,x,y,z) ITTNOTIFY_VOID_D3(marker,d,x,y,z)2332#define __itt_marker_ptr ITTNOTIFY_NAME(marker)2333#else /* INTEL_NO_ITTNOTIFY_API */2334#define __itt_marker(domain,id,name,scope)2335#define __itt_marker_ptr 02336#endif /* INTEL_NO_ITTNOTIFY_API */2337#else /* INTEL_NO_MACRO_BODY */2338#define __itt_marker_ptr 02339#endif /* INTEL_NO_MACRO_BODY */2340/** @endcond */2341/** @} markers group */23422343/**2344* @defgroup metadata Metadata2345* The metadata API is used to attach extra information to named2346* entities. Metadata can be attached to an identified named entity by ID,2347* or to the current entity (which is always a task).2348*2349* Conceptually metadata has a type (what kind of metadata), a key (the2350* name of the metadata), and a value (the actual data). The encoding of2351* the value depends on the type of the metadata.2352*2353* The type of metadata is specified by an enumerated type __itt_metdata_type.2354* @{2355*/23562357/**2358* @ingroup parameters2359* @brief describes the type of metadata2360*/2361typedef enum {2362__itt_metadata_unknown = 0,2363__itt_metadata_u64, /**< Unsigned 64-bit integer */2364__itt_metadata_s64, /**< Signed 64-bit integer */2365__itt_metadata_u32, /**< Unsigned 32-bit integer */2366__itt_metadata_s32, /**< Signed 32-bit integer */2367__itt_metadata_u16, /**< Unsigned 16-bit integer */2368__itt_metadata_s16, /**< Signed 16-bit integer */2369__itt_metadata_float, /**< Signed 32-bit floating-point */2370__itt_metadata_double /**< SIgned 64-bit floating-point */2371} __itt_metadata_type;23722373/**2374* @ingroup parameters2375* @brief Add metadata to an instance of a named entity.2376* @param[in] domain The domain controlling the call2377* @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task2378* @param[in] key The name of the metadata2379* @param[in] type The type of the metadata2380* @param[in] count The number of elements of the given type. If count == 0, no metadata will be added.2381* @param[in] data The metadata itself2382*/2383void ITTAPI __itt_metadata_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data);23842385/** @cond exclude_from_documentation */2386#ifndef INTEL_NO_MACRO_BODY2387#ifndef INTEL_NO_ITTNOTIFY_API2388ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data))2389#define __itt_metadata_add(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add,d,x,y,z,a,b)2390#define __itt_metadata_add_ptr ITTNOTIFY_NAME(metadata_add)2391#else /* INTEL_NO_ITTNOTIFY_API */2392#define __itt_metadata_add(d,x,y,z,a,b)2393#define __itt_metadata_add_ptr 02394#endif /* INTEL_NO_ITTNOTIFY_API */2395#else /* INTEL_NO_MACRO_BODY */2396#define __itt_metadata_add_ptr 02397#endif /* INTEL_NO_MACRO_BODY */2398/** @endcond */23992400/**2401* @ingroup parameters2402* @brief Add string metadata to an instance of a named entity.2403* @param[in] domain The domain controlling the call2404* @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task2405* @param[in] key The name of the metadata2406* @param[in] data The metadata itself2407* @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated2408*/2409#if ITT_PLATFORM==ITT_PLATFORM_WIN2410void ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length);2411void ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length);2412#if defined(UNICODE) || defined(_UNICODE)2413# define __itt_metadata_str_add __itt_metadata_str_addW2414# define __itt_metadata_str_add_ptr __itt_metadata_str_addW_ptr2415#else /* UNICODE */2416# define __itt_metadata_str_add __itt_metadata_str_addA2417# define __itt_metadata_str_add_ptr __itt_metadata_str_addA_ptr2418#endif /* UNICODE */2419#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2420void ITTAPI __itt_metadata_str_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length);2421#endif24222423/** @cond exclude_from_documentation */2424#ifndef INTEL_NO_MACRO_BODY2425#ifndef INTEL_NO_ITTNOTIFY_API2426#if ITT_PLATFORM==ITT_PLATFORM_WIN2427ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length))2428ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length))2429#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2430ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length))2431#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2432#if ITT_PLATFORM==ITT_PLATFORM_WIN2433#define __itt_metadata_str_addA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addA,d,x,y,z,a)2434#define __itt_metadata_str_addA_ptr ITTNOTIFY_NAME(metadata_str_addA)2435#define __itt_metadata_str_addW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addW,d,x,y,z,a)2436#define __itt_metadata_str_addW_ptr ITTNOTIFY_NAME(metadata_str_addW)2437#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2438#define __itt_metadata_str_add(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add,d,x,y,z,a)2439#define __itt_metadata_str_add_ptr ITTNOTIFY_NAME(metadata_str_add)2440#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2441#else /* INTEL_NO_ITTNOTIFY_API */2442#if ITT_PLATFORM==ITT_PLATFORM_WIN2443#define __itt_metadata_str_addA(d,x,y,z,a)2444#define __itt_metadata_str_addA_ptr 02445#define __itt_metadata_str_addW(d,x,y,z,a)2446#define __itt_metadata_str_addW_ptr 02447#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2448#define __itt_metadata_str_add(d,x,y,z,a)2449#define __itt_metadata_str_add_ptr 02450#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2451#endif /* INTEL_NO_ITTNOTIFY_API */2452#else /* INTEL_NO_MACRO_BODY */2453#if ITT_PLATFORM==ITT_PLATFORM_WIN2454#define __itt_metadata_str_addA_ptr 02455#define __itt_metadata_str_addW_ptr 02456#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2457#define __itt_metadata_str_add_ptr 02458#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2459#endif /* INTEL_NO_MACRO_BODY */2460/** @endcond */24612462/**2463* @ingroup parameters2464* @brief Add metadata to an instance of a named entity.2465* @param[in] domain The domain controlling the call2466* @param[in] scope The scope of the instance to which the metadata is to be added24672468* @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task24692470* @param[in] key The name of the metadata2471* @param[in] type The type of the metadata2472* @param[in] count The number of elements of the given type. If count == 0, no metadata will be added.2473* @param[in] data The metadata itself2474*/2475void ITTAPI __itt_metadata_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data);24762477/** @cond exclude_from_documentation */2478#ifndef INTEL_NO_MACRO_BODY2479#ifndef INTEL_NO_ITTNOTIFY_API2480ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data))2481#define __itt_metadata_add_with_scope(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add_with_scope,d,x,y,z,a,b)2482#define __itt_metadata_add_with_scope_ptr ITTNOTIFY_NAME(metadata_add_with_scope)2483#else /* INTEL_NO_ITTNOTIFY_API */2484#define __itt_metadata_add_with_scope(d,x,y,z,a,b)2485#define __itt_metadata_add_with_scope_ptr 02486#endif /* INTEL_NO_ITTNOTIFY_API */2487#else /* INTEL_NO_MACRO_BODY */2488#define __itt_metadata_add_with_scope_ptr 02489#endif /* INTEL_NO_MACRO_BODY */2490/** @endcond */24912492/**2493* @ingroup parameters2494* @brief Add string metadata to an instance of a named entity.2495* @param[in] domain The domain controlling the call2496* @param[in] scope The scope of the instance to which the metadata is to be added24972498* @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task24992500* @param[in] key The name of the metadata2501* @param[in] data The metadata itself2502* @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated2503*/2504#if ITT_PLATFORM==ITT_PLATFORM_WIN2505void ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length);2506void ITTAPI __itt_metadata_str_add_with_scopeW(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length);2507#if defined(UNICODE) || defined(_UNICODE)2508# define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeW2509# define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeW_ptr2510#else /* UNICODE */2511# define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeA2512# define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeA_ptr2513#endif /* UNICODE */2514#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2515void ITTAPI __itt_metadata_str_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length);2516#endif25172518/** @cond exclude_from_documentation */2519#ifndef INTEL_NO_MACRO_BODY2520#ifndef INTEL_NO_ITTNOTIFY_API2521#if ITT_PLATFORM==ITT_PLATFORM_WIN2522ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length))2523ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length))2524#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2525ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length))2526#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2527#if ITT_PLATFORM==ITT_PLATFORM_WIN2528#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeA,d,x,y,z,a)2529#define __itt_metadata_str_add_with_scopeA_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeA)2530#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeW,d,x,y,z,a)2531#define __itt_metadata_str_add_with_scopeW_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeW)2532#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2533#define __itt_metadata_str_add_with_scope(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scope,d,x,y,z,a)2534#define __itt_metadata_str_add_with_scope_ptr ITTNOTIFY_NAME(metadata_str_add_with_scope)2535#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2536#else /* INTEL_NO_ITTNOTIFY_API */2537#if ITT_PLATFORM==ITT_PLATFORM_WIN2538#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a)2539#define __itt_metadata_str_add_with_scopeA_ptr 02540#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a)2541#define __itt_metadata_str_add_with_scopeW_ptr 02542#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2543#define __itt_metadata_str_add_with_scope(d,x,y,z,a)2544#define __itt_metadata_str_add_with_scope_ptr 02545#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2546#endif /* INTEL_NO_ITTNOTIFY_API */2547#else /* INTEL_NO_MACRO_BODY */2548#if ITT_PLATFORM==ITT_PLATFORM_WIN2549#define __itt_metadata_str_add_with_scopeA_ptr 02550#define __itt_metadata_str_add_with_scopeW_ptr 02551#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2552#define __itt_metadata_str_add_with_scope_ptr 02553#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2554#endif /* INTEL_NO_MACRO_BODY */2555/** @endcond */25562557/** @} metadata group */25582559/**2560* @defgroup relations Relations2561* Instances of named entities can be explicitly associated with other2562* instances using instance IDs and the relationship API calls.2563*2564* @{2565*/25662567/**2568* @ingroup relations2569* @brief The kind of relation between two instances is specified by the enumerated type __itt_relation.2570* Relations between instances can be added with an API call. The relation2571* API uses instance IDs. Relations can be added before or after the actual2572* instances are created and persist independently of the instances. This2573* is the motivation for having different lifetimes for instance IDs and2574* the actual instances.2575*/2576typedef enum2577{2578__itt_relation_is_unknown = 0,2579__itt_relation_is_dependent_on, /**< "A is dependent on B" means that A cannot start until B completes */2580__itt_relation_is_sibling_of, /**< "A is sibling of B" means that A and B were created as a group */2581__itt_relation_is_parent_of, /**< "A is parent of B" means that A created B */2582__itt_relation_is_continuation_of, /**< "A is continuation of B" means that A assumes the dependencies of B */2583__itt_relation_is_child_of, /**< "A is child of B" means that A was created by B (inverse of is_parent_of) */2584__itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */2585__itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */2586} __itt_relation;25872588/**2589* @ingroup relations2590* @brief Add a relation to the current task instance.2591* The current task instance is the head of the relation.2592* @param[in] domain The domain controlling this call2593* @param[in] relation The kind of relation2594* @param[in] tail The ID for the tail of the relation2595*/2596void ITTAPI __itt_relation_add_to_current(const __itt_domain *domain, __itt_relation relation, __itt_id tail);25972598/**2599* @ingroup relations2600* @brief Add a relation between two instance identifiers.2601* @param[in] domain The domain controlling this call2602* @param[in] head The ID for the head of the relation2603* @param[in] relation The kind of relation2604* @param[in] tail The ID for the tail of the relation2605*/2606void ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail);26072608/** @cond exclude_from_documentation */2609#ifndef INTEL_NO_MACRO_BODY2610#ifndef INTEL_NO_ITTNOTIFY_API2611ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail))2612ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail))2613#define __itt_relation_add_to_current(d,x,y) ITTNOTIFY_VOID_D2(relation_add_to_current,d,x,y)2614#define __itt_relation_add_to_current_ptr ITTNOTIFY_NAME(relation_add_to_current)2615#define __itt_relation_add(d,x,y,z) ITTNOTIFY_VOID_D3(relation_add,d,x,y,z)2616#define __itt_relation_add_ptr ITTNOTIFY_NAME(relation_add)2617#else /* INTEL_NO_ITTNOTIFY_API */2618#define __itt_relation_add_to_current(d,x,y)2619#define __itt_relation_add_to_current_ptr 02620#define __itt_relation_add(d,x,y,z)2621#define __itt_relation_add_ptr 02622#endif /* INTEL_NO_ITTNOTIFY_API */2623#else /* INTEL_NO_MACRO_BODY */2624#define __itt_relation_add_to_current_ptr 02625#define __itt_relation_add_ptr 02626#endif /* INTEL_NO_MACRO_BODY */2627/** @endcond */2628/** @} relations group */26292630/** @cond exclude_from_documentation */2631#pragma pack(push, 8)26322633typedef struct ___itt_clock_info2634{2635unsigned long long clock_freq; /*!< Clock domain frequency */2636unsigned long long clock_base; /*!< Clock domain base timestamp */2637} __itt_clock_info;26382639#pragma pack(pop)2640/** @endcond */26412642/** @cond exclude_from_documentation */2643typedef void (ITTAPI *__itt_get_clock_info_fn)(__itt_clock_info* clock_info, void* data);2644/** @endcond */26452646/** @cond exclude_from_documentation */2647#pragma pack(push, 8)26482649typedef struct ___itt_clock_domain2650{2651__itt_clock_info info; /*!< Most recent clock domain info */2652__itt_get_clock_info_fn fn; /*!< Callback function pointer */2653void* fn_data; /*!< Input argument for the callback function */2654int extra1; /*!< Reserved. Must be zero */2655void* extra2; /*!< Reserved. Must be zero */2656struct ___itt_clock_domain* next;2657} __itt_clock_domain;26582659#pragma pack(pop)2660/** @endcond */26612662/**2663* @ingroup clockdomains2664* @brief Create a clock domain.2665* Certain applications require the capability to trace their application using2666* a clock domain different than the CPU, for instance the instrumentation of events2667* that occur on a GPU.2668* Because the set of domains is expected to be static over the application's execution time,2669* there is no mechanism to destroy a domain.2670* Any domain can be accessed by any thread in the process, regardless of which thread created2671* the domain. This call is thread-safe.2672* @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps2673* @param[in] fn_data Argument for a callback function; may be NULL2674*/2675__itt_clock_domain* ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data);26762677/** @cond exclude_from_documentation */2678#ifndef INTEL_NO_MACRO_BODY2679#ifndef INTEL_NO_ITTNOTIFY_API2680ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data))2681#define __itt_clock_domain_create ITTNOTIFY_DATA(clock_domain_create)2682#define __itt_clock_domain_create_ptr ITTNOTIFY_NAME(clock_domain_create)2683#else /* INTEL_NO_ITTNOTIFY_API */2684#define __itt_clock_domain_create(fn,fn_data) (__itt_clock_domain*)02685#define __itt_clock_domain_create_ptr 02686#endif /* INTEL_NO_ITTNOTIFY_API */2687#else /* INTEL_NO_MACRO_BODY */2688#define __itt_clock_domain_create_ptr 02689#endif /* INTEL_NO_MACRO_BODY */2690/** @endcond */26912692/**2693* @ingroup clockdomains2694* @brief Recalculate clock domains frequences and clock base timestamps.2695*/2696void ITTAPI __itt_clock_domain_reset(void);26972698/** @cond exclude_from_documentation */2699#ifndef INTEL_NO_MACRO_BODY2700#ifndef INTEL_NO_ITTNOTIFY_API2701ITT_STUBV(ITTAPI, void, clock_domain_reset, (void))2702#define __itt_clock_domain_reset ITTNOTIFY_VOID(clock_domain_reset)2703#define __itt_clock_domain_reset_ptr ITTNOTIFY_NAME(clock_domain_reset)2704#else /* INTEL_NO_ITTNOTIFY_API */2705#define __itt_clock_domain_reset()2706#define __itt_clock_domain_reset_ptr 02707#endif /* INTEL_NO_ITTNOTIFY_API */2708#else /* INTEL_NO_MACRO_BODY */2709#define __itt_clock_domain_reset_ptr 02710#endif /* INTEL_NO_MACRO_BODY */2711/** @endcond */27122713/**2714* @ingroup clockdomain2715* @brief Create an instance of identifier. This establishes the beginning of the lifetime of2716* an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to2717* tag named entity instances in calls such as __itt_task_begin, and to specify relationships among2718* identified named entity instances, using the \ref relations APIs.2719* @param[in] domain The domain controlling the execution of this call.2720* @param[in] clock_domain The clock domain controlling the execution of this call.2721* @param[in] timestamp The user defined timestamp.2722* @param[in] id The ID to create.2723*/2724void ITTAPI __itt_id_create_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id);27252726/**2727* @ingroup clockdomain2728* @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the2729* given ID value in the trace. Any relationships that are established after this lifetime ends are2730* invalid. This call must be performed before the given ID value can be reused for a different2731* named entity instance.2732* @param[in] domain The domain controlling the execution of this call.2733* @param[in] clock_domain The clock domain controlling the execution of this call.2734* @param[in] timestamp The user defined timestamp.2735* @param[in] id The ID to destroy.2736*/2737void ITTAPI __itt_id_destroy_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id);27382739/** @cond exclude_from_documentation */2740#ifndef INTEL_NO_MACRO_BODY2741#ifndef INTEL_NO_ITTNOTIFY_API2742ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id))2743ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id))2744#define __itt_id_create_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_create_ex,d,x,y,z)2745#define __itt_id_create_ex_ptr ITTNOTIFY_NAME(id_create_ex)2746#define __itt_id_destroy_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_destroy_ex,d,x,y,z)2747#define __itt_id_destroy_ex_ptr ITTNOTIFY_NAME(id_destroy_ex)2748#else /* INTEL_NO_ITTNOTIFY_API */2749#define __itt_id_create_ex(domain,clock_domain,timestamp,id)2750#define __itt_id_create_ex_ptr 02751#define __itt_id_destroy_ex(domain,clock_domain,timestamp,id)2752#define __itt_id_destroy_ex_ptr 02753#endif /* INTEL_NO_ITTNOTIFY_API */2754#else /* INTEL_NO_MACRO_BODY */2755#define __itt_id_create_ex_ptr 02756#define __itt_id_destroy_ex_ptr 02757#endif /* INTEL_NO_MACRO_BODY */2758/** @endcond */27592760/**2761* @ingroup clockdomain2762* @brief Begin a task instance.2763* @param[in] domain The domain for this task2764* @param[in] clock_domain The clock domain controlling the execution of this call.2765* @param[in] timestamp The user defined timestamp.2766* @param[in] taskid The instance ID for this task instance, or __itt_null2767* @param[in] parentid The parent instance to which this task instance belongs, or __itt_null2768* @param[in] name The name of this task2769*/2770void ITTAPI __itt_task_begin_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);27712772/**2773* @ingroup clockdomain2774* @brief Begin a task instance.2775* @param[in] domain The domain for this task2776* @param[in] clock_domain The clock domain controlling the execution of this call.2777* @param[in] timestamp The user defined timestamp.2778* @param[in] taskid The identifier for this task instance, or __itt_null2779* @param[in] parentid The parent of this task, or __itt_null2780* @param[in] fn The pointer to the function you are tracing2781*/2782void ITTAPI __itt_task_begin_fn_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, void* fn);27832784/**2785* @ingroup clockdomain2786* @brief End the current task instance.2787* @param[in] domain The domain for this task2788* @param[in] clock_domain The clock domain controlling the execution of this call.2789* @param[in] timestamp The user defined timestamp.2790*/2791void ITTAPI __itt_task_end_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp);27922793/** @cond exclude_from_documentation */2794#ifndef INTEL_NO_MACRO_BODY2795#ifndef INTEL_NO_ITTNOTIFY_API2796ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name))2797ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn))2798ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp))2799#define __itt_task_begin_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_ex,d,x,y,z,a,b)2800#define __itt_task_begin_ex_ptr ITTNOTIFY_NAME(task_begin_ex)2801#define __itt_task_begin_fn_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_fn_ex,d,x,y,z,a,b)2802#define __itt_task_begin_fn_ex_ptr ITTNOTIFY_NAME(task_begin_fn_ex)2803#define __itt_task_end_ex(d,x,y) ITTNOTIFY_VOID_D2(task_end_ex,d,x,y)2804#define __itt_task_end_ex_ptr ITTNOTIFY_NAME(task_end_ex)2805#else /* INTEL_NO_ITTNOTIFY_API */2806#define __itt_task_begin_ex(domain,clock_domain,timestamp,id,parentid,name)2807#define __itt_task_begin_ex_ptr 02808#define __itt_task_begin_fn_ex(domain,clock_domain,timestamp,id,parentid,fn)2809#define __itt_task_begin_fn_ex_ptr 02810#define __itt_task_end_ex(domain,clock_domain,timestamp)2811#define __itt_task_end_ex_ptr 02812#endif /* INTEL_NO_ITTNOTIFY_API */2813#else /* INTEL_NO_MACRO_BODY */2814#define __itt_task_begin_ex_ptr 02815#define __itt_task_begin_fn_ex_ptr 02816#define __itt_task_end_ex_ptr 02817#endif /* INTEL_NO_MACRO_BODY */2818/** @endcond */28192820/**2821* @defgroup counters Counters2822* @ingroup public2823* Counters are user-defined objects with a monotonically increasing2824* value. Counter values are 64-bit unsigned integers.2825* Counters have names that can be displayed in2826* the tools.2827* @{2828*/28292830/**2831* @brief opaque structure for counter identification2832*/2833/** @cond exclude_from_documentation */28342835typedef struct ___itt_counter* __itt_counter;28362837/**2838* @brief Create an unsigned 64 bits integer counter with given name/domain2839*2840* After __itt_counter_create() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta),2841* __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)2842* can be used to change the value of the counter, where value_ptr is a pointer to an unsigned 64 bits integer2843*2844* The call is equal to __itt_counter_create_typed(name, domain, __itt_metadata_u64)2845*/2846#if ITT_PLATFORM==ITT_PLATFORM_WIN2847__itt_counter ITTAPI __itt_counter_createA(const char *name, const char *domain);2848__itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain);2849#if defined(UNICODE) || defined(_UNICODE)2850# define __itt_counter_create __itt_counter_createW2851# define __itt_counter_create_ptr __itt_counter_createW_ptr2852#else /* UNICODE */2853# define __itt_counter_create __itt_counter_createA2854# define __itt_counter_create_ptr __itt_counter_createA_ptr2855#endif /* UNICODE */2856#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2857__itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain);2858#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */28592860#ifndef INTEL_NO_MACRO_BODY2861#ifndef INTEL_NO_ITTNOTIFY_API2862#if ITT_PLATFORM==ITT_PLATFORM_WIN2863ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain))2864ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain))2865#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2866ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain))2867#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2868#if ITT_PLATFORM==ITT_PLATFORM_WIN2869#define __itt_counter_createA ITTNOTIFY_DATA(counter_createA)2870#define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA)2871#define __itt_counter_createW ITTNOTIFY_DATA(counter_createW)2872#define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW)2873#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2874#define __itt_counter_create ITTNOTIFY_DATA(counter_create)2875#define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create)2876#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2877#else /* INTEL_NO_ITTNOTIFY_API */2878#if ITT_PLATFORM==ITT_PLATFORM_WIN2879#define __itt_counter_createA(name, domain)2880#define __itt_counter_createA_ptr 02881#define __itt_counter_createW(name, domain)2882#define __itt_counter_createW_ptr 02883#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2884#define __itt_counter_create(name, domain)2885#define __itt_counter_create_ptr 02886#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2887#endif /* INTEL_NO_ITTNOTIFY_API */2888#else /* INTEL_NO_MACRO_BODY */2889#if ITT_PLATFORM==ITT_PLATFORM_WIN2890#define __itt_counter_createA_ptr 02891#define __itt_counter_createW_ptr 02892#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */2893#define __itt_counter_create_ptr 02894#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */2895#endif /* INTEL_NO_MACRO_BODY */2896/** @endcond */28972898/**2899* @brief Increment the unsigned 64 bits integer counter value2900*2901* Calling this function to non-unsigned 64 bits integer counters has no effect2902*/2903void ITTAPI __itt_counter_inc(__itt_counter id);29042905#ifndef INTEL_NO_MACRO_BODY2906#ifndef INTEL_NO_ITTNOTIFY_API2907ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id))2908#define __itt_counter_inc ITTNOTIFY_VOID(counter_inc)2909#define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc)2910#else /* INTEL_NO_ITTNOTIFY_API */2911#define __itt_counter_inc(id)2912#define __itt_counter_inc_ptr 02913#endif /* INTEL_NO_ITTNOTIFY_API */2914#else /* INTEL_NO_MACRO_BODY */2915#define __itt_counter_inc_ptr 02916#endif /* INTEL_NO_MACRO_BODY */2917/** @endcond */2918/**2919* @brief Increment the unsigned 64 bits integer counter value with x2920*2921* Calling this function to non-unsigned 64 bits integer counters has no effect2922*/2923void ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value);29242925#ifndef INTEL_NO_MACRO_BODY2926#ifndef INTEL_NO_ITTNOTIFY_API2927ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value))2928#define __itt_counter_inc_delta ITTNOTIFY_VOID(counter_inc_delta)2929#define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta)2930#else /* INTEL_NO_ITTNOTIFY_API */2931#define __itt_counter_inc_delta(id, value)2932#define __itt_counter_inc_delta_ptr 02933#endif /* INTEL_NO_ITTNOTIFY_API */2934#else /* INTEL_NO_MACRO_BODY */2935#define __itt_counter_inc_delta_ptr 02936#endif /* INTEL_NO_MACRO_BODY */2937/** @endcond */29382939/**2940* @brief Decrement the unsigned 64 bits integer counter value2941*2942* Calling this function to non-unsigned 64 bits integer counters has no effect2943*/2944void ITTAPI __itt_counter_dec(__itt_counter id);29452946#ifndef INTEL_NO_MACRO_BODY2947#ifndef INTEL_NO_ITTNOTIFY_API2948ITT_STUBV(ITTAPI, void, counter_dec, (__itt_counter id))2949#define __itt_counter_dec ITTNOTIFY_VOID(counter_dec)2950#define __itt_counter_dec_ptr ITTNOTIFY_NAME(counter_dec)2951#else /* INTEL_NO_ITTNOTIFY_API */2952#define __itt_counter_dec(id)2953#define __itt_counter_dec_ptr 02954#endif /* INTEL_NO_ITTNOTIFY_API */2955#else /* INTEL_NO_MACRO_BODY */2956#define __itt_counter_dec_ptr 02957#endif /* INTEL_NO_MACRO_BODY */2958/** @endcond */2959/**2960* @brief Decrement the unsigned 64 bits integer counter value with x2961*2962* Calling this function to non-unsigned 64 bits integer counters has no effect2963*/2964void ITTAPI __itt_counter_dec_delta(__itt_counter id, unsigned long long value);29652966#ifndef INTEL_NO_MACRO_BODY2967#ifndef INTEL_NO_ITTNOTIFY_API2968ITT_STUBV(ITTAPI, void, counter_dec_delta, (__itt_counter id, unsigned long long value))2969#define __itt_counter_dec_delta ITTNOTIFY_VOID(counter_dec_delta)2970#define __itt_counter_dec_delta_ptr ITTNOTIFY_NAME(counter_dec_delta)2971#else /* INTEL_NO_ITTNOTIFY_API */2972#define __itt_counter_dec_delta(id, value)2973#define __itt_counter_dec_delta_ptr 02974#endif /* INTEL_NO_ITTNOTIFY_API */2975#else /* INTEL_NO_MACRO_BODY */2976#define __itt_counter_dec_delta_ptr 02977#endif /* INTEL_NO_MACRO_BODY */2978/** @endcond */29792980/**2981* @ingroup counters2982* @brief Increment a counter by one.2983* The first call with a given name creates a counter by that name and sets its2984* value to zero. Successive calls increment the counter value.2985* @param[in] domain The domain controlling the call. Counter names are not domain specific.2986* The domain argument is used only to enable or disable the API calls.2987* @param[in] name The name of the counter2988*/2989void ITTAPI __itt_counter_inc_v3(const __itt_domain *domain, __itt_string_handle *name);29902991/**2992* @ingroup counters2993* @brief Increment a counter by the value specified in delta.2994* @param[in] domain The domain controlling the call. Counter names are not domain specific.2995* The domain argument is used only to enable or disable the API calls.2996* @param[in] name The name of the counter2997* @param[in] delta The amount by which to increment the counter2998*/2999void ITTAPI __itt_counter_inc_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta);30003001#ifndef INTEL_NO_MACRO_BODY3002#ifndef INTEL_NO_ITTNOTIFY_API3003ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name))3004ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta))3005#define __itt_counter_inc_v3(d,x) ITTNOTIFY_VOID_D1(counter_inc_v3,d,x)3006#define __itt_counter_inc_v3_ptr ITTNOTIFY_NAME(counter_inc_v3)3007#define __itt_counter_inc_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_inc_delta_v3,d,x,y)3008#define __itt_counter_inc_delta_v3_ptr ITTNOTIFY_NAME(counter_inc_delta_v3)3009#else /* INTEL_NO_ITTNOTIFY_API */3010#define __itt_counter_inc_v3(domain,name)3011#define __itt_counter_inc_v3_ptr 03012#define __itt_counter_inc_delta_v3(domain,name,delta)3013#define __itt_counter_inc_delta_v3_ptr 03014#endif /* INTEL_NO_ITTNOTIFY_API */3015#else /* INTEL_NO_MACRO_BODY */3016#define __itt_counter_inc_v3_ptr 03017#define __itt_counter_inc_delta_v3_ptr 03018#endif /* INTEL_NO_MACRO_BODY */3019/** @endcond */302030213022/**3023* @ingroup counters3024* @brief Decrement a counter by one.3025* The first call with a given name creates a counter by that name and sets its3026* value to zero. Successive calls decrement the counter value.3027* @param[in] domain The domain controlling the call. Counter names are not domain specific.3028* The domain argument is used only to enable or disable the API calls.3029* @param[in] name The name of the counter3030*/3031void ITTAPI __itt_counter_dec_v3(const __itt_domain *domain, __itt_string_handle *name);30323033/**3034* @ingroup counters3035* @brief Decrement a counter by the value specified in delta.3036* @param[in] domain The domain controlling the call. Counter names are not domain specific.3037* The domain argument is used only to enable or disable the API calls.3038* @param[in] name The name of the counter3039* @param[in] delta The amount by which to decrement the counter3040*/3041void ITTAPI __itt_counter_dec_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta);30423043#ifndef INTEL_NO_MACRO_BODY3044#ifndef INTEL_NO_ITTNOTIFY_API3045ITT_STUBV(ITTAPI, void, counter_dec_v3, (const __itt_domain *domain, __itt_string_handle *name))3046ITT_STUBV(ITTAPI, void, counter_dec_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta))3047#define __itt_counter_dec_v3(d,x) ITTNOTIFY_VOID_D1(counter_dec_v3,d,x)3048#define __itt_counter_dec_v3_ptr ITTNOTIFY_NAME(counter_dec_v3)3049#define __itt_counter_dec_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_dec_delta_v3,d,x,y)3050#define __itt_counter_dec_delta_v3_ptr ITTNOTIFY_NAME(counter_dec_delta_v3)3051#else /* INTEL_NO_ITTNOTIFY_API */3052#define __itt_counter_dec_v3(domain,name)3053#define __itt_counter_dec_v3_ptr 03054#define __itt_counter_dec_delta_v3(domain,name,delta)3055#define __itt_counter_dec_delta_v3_ptr 03056#endif /* INTEL_NO_ITTNOTIFY_API */3057#else /* INTEL_NO_MACRO_BODY */3058#define __itt_counter_dec_v3_ptr 03059#define __itt_counter_dec_delta_v3_ptr 03060#endif /* INTEL_NO_MACRO_BODY */3061/** @endcond */30623063/** @} counters group */306430653066/**3067* @brief Set the counter value3068*/3069void ITTAPI __itt_counter_set_value(__itt_counter id, void *value_ptr);30703071#ifndef INTEL_NO_MACRO_BODY3072#ifndef INTEL_NO_ITTNOTIFY_API3073ITT_STUBV(ITTAPI, void, counter_set_value, (__itt_counter id, void *value_ptr))3074#define __itt_counter_set_value ITTNOTIFY_VOID(counter_set_value)3075#define __itt_counter_set_value_ptr ITTNOTIFY_NAME(counter_set_value)3076#else /* INTEL_NO_ITTNOTIFY_API */3077#define __itt_counter_set_value(id, value_ptr)3078#define __itt_counter_set_value_ptr 03079#endif /* INTEL_NO_ITTNOTIFY_API */3080#else /* INTEL_NO_MACRO_BODY */3081#define __itt_counter_set_value_ptr 03082#endif /* INTEL_NO_MACRO_BODY */3083/** @endcond */30843085/**3086* @brief Set the counter value3087*/3088void ITTAPI __itt_counter_set_value_ex(__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr);30893090/** @cond exclude_from_documentation */3091#ifndef INTEL_NO_MACRO_BODY3092#ifndef INTEL_NO_ITTNOTIFY_API3093ITT_STUBV(ITTAPI, void, counter_set_value_ex, (__itt_counter id, __itt_clock_domain *clock_domain, unsigned long long timestamp, void *value_ptr))3094#define __itt_counter_set_value_ex ITTNOTIFY_VOID(counter_set_value_ex)3095#define __itt_counter_set_value_ex_ptr ITTNOTIFY_NAME(counter_set_value_ex)3096#else /* INTEL_NO_ITTNOTIFY_API */3097#define __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)3098#define __itt_counter_set_value_ex_ptr 03099#endif /* INTEL_NO_ITTNOTIFY_API */3100#else /* INTEL_NO_MACRO_BODY */3101#define __itt_counter_set_value_ex_ptr 03102#endif /* INTEL_NO_MACRO_BODY */3103/** @endcond */31043105/**3106* @brief Create a typed counter with given name/domain3107*3108* After __itt_counter_create_typed() is called, __itt_counter_inc(id), __itt_counter_inc_delta(id, delta),3109* __itt_counter_set_value(id, value_ptr) or __itt_counter_set_value_ex(id, clock_domain, timestamp, value_ptr)3110* can be used to change the value of the counter3111*/3112#if ITT_PLATFORM==ITT_PLATFORM_WIN3113__itt_counter ITTAPI __itt_counter_create_typedA(const char *name, const char *domain, __itt_metadata_type type);3114__itt_counter ITTAPI __itt_counter_create_typedW(const wchar_t *name, const wchar_t *domain, __itt_metadata_type type);3115#if defined(UNICODE) || defined(_UNICODE)3116# define __itt_counter_create_typed __itt_counter_create_typedW3117# define __itt_counter_create_typed_ptr __itt_counter_create_typedW_ptr3118#else /* UNICODE */3119# define __itt_counter_create_typed __itt_counter_create_typedA3120# define __itt_counter_create_typed_ptr __itt_counter_create_typedA_ptr3121#endif /* UNICODE */3122#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3123__itt_counter ITTAPI __itt_counter_create_typed(const char *name, const char *domain, __itt_metadata_type type);3124#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */31253126#ifndef INTEL_NO_MACRO_BODY3127#ifndef INTEL_NO_ITTNOTIFY_API3128#if ITT_PLATFORM==ITT_PLATFORM_WIN3129ITT_STUB(ITTAPI, __itt_counter, counter_create_typedA, (const char *name, const char *domain, __itt_metadata_type type))3130ITT_STUB(ITTAPI, __itt_counter, counter_create_typedW, (const wchar_t *name, const wchar_t *domain, __itt_metadata_type type))3131#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3132ITT_STUB(ITTAPI, __itt_counter, counter_create_typed, (const char *name, const char *domain, __itt_metadata_type type))3133#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3134#if ITT_PLATFORM==ITT_PLATFORM_WIN3135#define __itt_counter_create_typedA ITTNOTIFY_DATA(counter_create_typedA)3136#define __itt_counter_create_typedA_ptr ITTNOTIFY_NAME(counter_create_typedA)3137#define __itt_counter_create_typedW ITTNOTIFY_DATA(counter_create_typedW)3138#define __itt_counter_create_typedW_ptr ITTNOTIFY_NAME(counter_create_typedW)3139#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3140#define __itt_counter_create_typed ITTNOTIFY_DATA(counter_create_typed)3141#define __itt_counter_create_typed_ptr ITTNOTIFY_NAME(counter_create_typed)3142#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3143#else /* INTEL_NO_ITTNOTIFY_API */3144#if ITT_PLATFORM==ITT_PLATFORM_WIN3145#define __itt_counter_create_typedA(name, domain, type)3146#define __itt_counter_create_typedA_ptr 03147#define __itt_counter_create_typedW(name, domain, type)3148#define __itt_counter_create_typedW_ptr 03149#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3150#define __itt_counter_create_typed(name, domain, type)3151#define __itt_counter_create_typed_ptr 03152#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3153#endif /* INTEL_NO_ITTNOTIFY_API */3154#else /* INTEL_NO_MACRO_BODY */3155#if ITT_PLATFORM==ITT_PLATFORM_WIN3156#define __itt_counter_create_typedA_ptr 03157#define __itt_counter_create_typedW_ptr 03158#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3159#define __itt_counter_create_typed_ptr 03160#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3161#endif /* INTEL_NO_MACRO_BODY */3162/** @endcond */31633164/**3165* @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() or3166* __itt_counter_create_typed()3167*/3168void ITTAPI __itt_counter_destroy(__itt_counter id);31693170#ifndef INTEL_NO_MACRO_BODY3171#ifndef INTEL_NO_ITTNOTIFY_API3172ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id))3173#define __itt_counter_destroy ITTNOTIFY_VOID(counter_destroy)3174#define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy)3175#else /* INTEL_NO_ITTNOTIFY_API */3176#define __itt_counter_destroy(id)3177#define __itt_counter_destroy_ptr 03178#endif /* INTEL_NO_ITTNOTIFY_API */3179#else /* INTEL_NO_MACRO_BODY */3180#define __itt_counter_destroy_ptr 03181#endif /* INTEL_NO_MACRO_BODY */3182/** @endcond */3183/** @} counters group */31843185/**3186* @ingroup markers3187* @brief Create a marker instance.3188* @param[in] domain The domain for this marker3189* @param[in] clock_domain The clock domain controlling the execution of this call.3190* @param[in] timestamp The user defined timestamp.3191* @param[in] id The instance ID for this marker, or __itt_null3192* @param[in] name The name for this marker3193* @param[in] scope The scope for this marker3194*/3195void ITTAPI __itt_marker_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope);31963197/** @cond exclude_from_documentation */3198#ifndef INTEL_NO_MACRO_BODY3199#ifndef INTEL_NO_ITTNOTIFY_API3200ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope))3201#define __itt_marker_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(marker_ex,d,x,y,z,a,b)3202#define __itt_marker_ex_ptr ITTNOTIFY_NAME(marker_ex)3203#else /* INTEL_NO_ITTNOTIFY_API */3204#define __itt_marker_ex(domain,clock_domain,timestamp,id,name,scope)3205#define __itt_marker_ex_ptr 03206#endif /* INTEL_NO_ITTNOTIFY_API */3207#else /* INTEL_NO_MACRO_BODY */3208#define __itt_marker_ex_ptr 03209#endif /* INTEL_NO_MACRO_BODY */3210/** @endcond */32113212/**3213* @ingroup clockdomain3214* @brief Add a relation to the current task instance.3215* The current task instance is the head of the relation.3216* @param[in] domain The domain controlling this call3217* @param[in] clock_domain The clock domain controlling the execution of this call.3218* @param[in] timestamp The user defined timestamp.3219* @param[in] relation The kind of relation3220* @param[in] tail The ID for the tail of the relation3221*/3222void ITTAPI __itt_relation_add_to_current_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail);32233224/**3225* @ingroup clockdomain3226* @brief Add a relation between two instance identifiers.3227* @param[in] domain The domain controlling this call3228* @param[in] clock_domain The clock domain controlling the execution of this call.3229* @param[in] timestamp The user defined timestamp.3230* @param[in] head The ID for the head of the relation3231* @param[in] relation The kind of relation3232* @param[in] tail The ID for the tail of the relation3233*/3234void ITTAPI __itt_relation_add_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail);32353236/** @cond exclude_from_documentation */3237#ifndef INTEL_NO_MACRO_BODY3238#ifndef INTEL_NO_ITTNOTIFY_API3239ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail))3240ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail))3241#define __itt_relation_add_to_current_ex(d,x,y,z,a) ITTNOTIFY_VOID_D4(relation_add_to_current_ex,d,x,y,z,a)3242#define __itt_relation_add_to_current_ex_ptr ITTNOTIFY_NAME(relation_add_to_current_ex)3243#define __itt_relation_add_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(relation_add_ex,d,x,y,z,a,b)3244#define __itt_relation_add_ex_ptr ITTNOTIFY_NAME(relation_add_ex)3245#else /* INTEL_NO_ITTNOTIFY_API */3246#define __itt_relation_add_to_current_ex(domain,clock_domain,timestame,relation,tail)3247#define __itt_relation_add_to_current_ex_ptr 03248#define __itt_relation_add_ex(domain,clock_domain,timestamp,head,relation,tail)3249#define __itt_relation_add_ex_ptr 03250#endif /* INTEL_NO_ITTNOTIFY_API */3251#else /* INTEL_NO_MACRO_BODY */3252#define __itt_relation_add_to_current_ex_ptr 03253#define __itt_relation_add_ex_ptr 03254#endif /* INTEL_NO_MACRO_BODY */3255/** @endcond */32563257/** @cond exclude_from_documentation */3258typedef enum ___itt_track_group_type3259{3260__itt_track_group_type_normal = 03261} __itt_track_group_type;3262/** @endcond */32633264/** @cond exclude_from_documentation */3265#pragma pack(push, 8)32663267typedef struct ___itt_track_group3268{3269__itt_string_handle* name; /*!< Name of the track group */3270struct ___itt_track* track; /*!< List of child tracks */3271__itt_track_group_type tgtype; /*!< Type of the track group */3272int extra1; /*!< Reserved. Must be zero */3273void* extra2; /*!< Reserved. Must be zero */3274struct ___itt_track_group* next;3275} __itt_track_group;32763277#pragma pack(pop)3278/** @endcond */32793280/**3281* @brief Placeholder for custom track types. Currently, "normal" custom track3282* is the only available track type.3283*/3284typedef enum ___itt_track_type3285{3286__itt_track_type_normal = 03287#ifdef INTEL_ITTNOTIFY_API_PRIVATE3288, __itt_track_type_queue3289#endif /* INTEL_ITTNOTIFY_API_PRIVATE */3290} __itt_track_type;32913292/** @cond exclude_from_documentation */3293#pragma pack(push, 8)32943295typedef struct ___itt_track3296{3297__itt_string_handle* name; /*!< Name of the track group */3298__itt_track_group* group; /*!< Parent group to a track */3299__itt_track_type ttype; /*!< Type of the track */3300int extra1; /*!< Reserved. Must be zero */3301void* extra2; /*!< Reserved. Must be zero */3302struct ___itt_track* next;3303} __itt_track;33043305#pragma pack(pop)3306/** @endcond */33073308/**3309* @brief Create logical track group.3310*/3311__itt_track_group* ITTAPI __itt_track_group_create(__itt_string_handle* name, __itt_track_group_type track_group_type);33123313/** @cond exclude_from_documentation */3314#ifndef INTEL_NO_MACRO_BODY3315#ifndef INTEL_NO_ITTNOTIFY_API3316ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type))3317#define __itt_track_group_create ITTNOTIFY_DATA(track_group_create)3318#define __itt_track_group_create_ptr ITTNOTIFY_NAME(track_group_create)3319#else /* INTEL_NO_ITTNOTIFY_API */3320#define __itt_track_group_create(name) (__itt_track_group*)03321#define __itt_track_group_create_ptr 03322#endif /* INTEL_NO_ITTNOTIFY_API */3323#else /* INTEL_NO_MACRO_BODY */3324#define __itt_track_group_create_ptr 03325#endif /* INTEL_NO_MACRO_BODY */3326/** @endcond */33273328/**3329* @brief Create logical track.3330*/3331__itt_track* ITTAPI __itt_track_create(__itt_track_group* track_group, __itt_string_handle* name, __itt_track_type track_type);33323333/** @cond exclude_from_documentation */3334#ifndef INTEL_NO_MACRO_BODY3335#ifndef INTEL_NO_ITTNOTIFY_API3336ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type))3337#define __itt_track_create ITTNOTIFY_DATA(track_create)3338#define __itt_track_create_ptr ITTNOTIFY_NAME(track_create)3339#else /* INTEL_NO_ITTNOTIFY_API */3340#define __itt_track_create(track_group,name,track_type) (__itt_track*)03341#define __itt_track_create_ptr 03342#endif /* INTEL_NO_ITTNOTIFY_API */3343#else /* INTEL_NO_MACRO_BODY */3344#define __itt_track_create_ptr 03345#endif /* INTEL_NO_MACRO_BODY */3346/** @endcond */33473348/**3349* @brief Set the logical track.3350*/3351void ITTAPI __itt_set_track(__itt_track* track);33523353/** @cond exclude_from_documentation */3354#ifndef INTEL_NO_MACRO_BODY3355#ifndef INTEL_NO_ITTNOTIFY_API3356ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track))3357#define __itt_set_track ITTNOTIFY_VOID(set_track)3358#define __itt_set_track_ptr ITTNOTIFY_NAME(set_track)3359#else /* INTEL_NO_ITTNOTIFY_API */3360#define __itt_set_track(track)3361#define __itt_set_track_ptr 03362#endif /* INTEL_NO_ITTNOTIFY_API */3363#else /* INTEL_NO_MACRO_BODY */3364#define __itt_set_track_ptr 03365#endif /* INTEL_NO_MACRO_BODY */3366/** @endcond */33673368/* ========================================================================== */3369/** @cond exclude_from_gpa_documentation */3370/**3371* @defgroup events Events3372* @ingroup public3373* Events group3374* @{3375*/3376/** @brief user event type */3377typedef int __itt_event;33783379/**3380* @brief Create an event notification3381* @note name or namelen being null/name and namelen not matching, user event feature not enabled3382* @return non-zero event identifier upon success and __itt_err otherwise3383*/3384#if ITT_PLATFORM==ITT_PLATFORM_WIN3385__itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen);3386__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen);3387#if defined(UNICODE) || defined(_UNICODE)3388# define __itt_event_create __itt_event_createW3389# define __itt_event_create_ptr __itt_event_createW_ptr3390#else3391# define __itt_event_create __itt_event_createA3392# define __itt_event_create_ptr __itt_event_createA_ptr3393#endif /* UNICODE */3394#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3395__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen);3396#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */33973398/** @cond exclude_from_documentation */3399#ifndef INTEL_NO_MACRO_BODY3400#ifndef INTEL_NO_ITTNOTIFY_API3401#if ITT_PLATFORM==ITT_PLATFORM_WIN3402ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen))3403ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen))3404#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3405ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen))3406#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3407#if ITT_PLATFORM==ITT_PLATFORM_WIN3408#define __itt_event_createA ITTNOTIFY_DATA(event_createA)3409#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)3410#define __itt_event_createW ITTNOTIFY_DATA(event_createW)3411#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)3412#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3413#define __itt_event_create ITTNOTIFY_DATA(event_create)3414#define __itt_event_create_ptr ITTNOTIFY_NAME(event_create)3415#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3416#else /* INTEL_NO_ITTNOTIFY_API */3417#if ITT_PLATFORM==ITT_PLATFORM_WIN3418#define __itt_event_createA(name, namelen) (__itt_event)03419#define __itt_event_createA_ptr 03420#define __itt_event_createW(name, namelen) (__itt_event)03421#define __itt_event_createW_ptr 03422#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3423#define __itt_event_create(name, namelen) (__itt_event)03424#define __itt_event_create_ptr 03425#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3426#endif /* INTEL_NO_ITTNOTIFY_API */3427#else /* INTEL_NO_MACRO_BODY */3428#if ITT_PLATFORM==ITT_PLATFORM_WIN3429#define __itt_event_createA_ptr 03430#define __itt_event_createW_ptr 03431#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3432#define __itt_event_create_ptr 03433#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3434#endif /* INTEL_NO_MACRO_BODY */3435/** @endcond */34363437/**3438* @brief Record an event occurrence.3439* @return __itt_err upon failure (invalid event id/user event feature not enabled)3440*/3441int LIBITTAPI __itt_event_start(__itt_event event);34423443/** @cond exclude_from_documentation */3444#ifndef INTEL_NO_MACRO_BODY3445#ifndef INTEL_NO_ITTNOTIFY_API3446ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event))3447#define __itt_event_start ITTNOTIFY_DATA(event_start)3448#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)3449#else /* INTEL_NO_ITTNOTIFY_API */3450#define __itt_event_start(event) (int)03451#define __itt_event_start_ptr 03452#endif /* INTEL_NO_ITTNOTIFY_API */3453#else /* INTEL_NO_MACRO_BODY */3454#define __itt_event_start_ptr 03455#endif /* INTEL_NO_MACRO_BODY */3456/** @endcond */34573458/**3459* @brief Record an event end occurrence.3460* @note It is optional if events do not have durations.3461* @return __itt_err upon failure (invalid event id/user event feature not enabled)3462*/3463int LIBITTAPI __itt_event_end(__itt_event event);34643465/** @cond exclude_from_documentation */3466#ifndef INTEL_NO_MACRO_BODY3467#ifndef INTEL_NO_ITTNOTIFY_API3468ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event))3469#define __itt_event_end ITTNOTIFY_DATA(event_end)3470#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)3471#else /* INTEL_NO_ITTNOTIFY_API */3472#define __itt_event_end(event) (int)03473#define __itt_event_end_ptr 03474#endif /* INTEL_NO_ITTNOTIFY_API */3475#else /* INTEL_NO_MACRO_BODY */3476#define __itt_event_end_ptr 03477#endif /* INTEL_NO_MACRO_BODY */3478/** @endcond */3479/** @} events group */348034813482/**3483* @defgroup arrays Arrays Visualizer3484* @ingroup public3485* Visualize arrays3486* @{3487*/34883489/**3490* @enum __itt_av_data_type3491* @brief Defines types of arrays data (for C/C++ intrinsic types)3492*/3493typedef enum3494{3495__itt_e_first = 0,3496__itt_e_char = 0, /* 1-byte integer */3497__itt_e_uchar, /* 1-byte unsigned integer */3498__itt_e_int16, /* 2-byte integer */3499__itt_e_uint16, /* 2-byte unsigned integer */3500__itt_e_int32, /* 4-byte integer */3501__itt_e_uint32, /* 4-byte unsigned integer */3502__itt_e_int64, /* 8-byte integer */3503__itt_e_uint64, /* 8-byte unsigned integer */3504__itt_e_float, /* 4-byte floating */3505__itt_e_double, /* 8-byte floating */3506__itt_e_last = __itt_e_double3507} __itt_av_data_type;35083509/**3510* @brief Save an array data to a file.3511* Output format is defined by the file extension. The csv and bmp formats are supported (bmp - for 2-dimensional array only).3512* @param[in] data - pointer to the array data3513* @param[in] rank - the rank of the array3514* @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions.3515* The size of dimensions must be equal to the rank3516* @param[in] type - the type of the array, specified as one of the __itt_av_data_type values (for intrinsic types)3517* @param[in] filePath - the file path; the output format is defined by the file extension3518* @param[in] columnOrder - defines how the array is stored in the linear memory.3519* It should be 1 for column-major order (e.g. in FORTRAN) or 0 - for row-major order (e.g. in C).3520*/35213522#if ITT_PLATFORM==ITT_PLATFORM_WIN3523int ITTAPI __itt_av_saveA(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder);3524int ITTAPI __itt_av_saveW(void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder);3525#if defined(UNICODE) || defined(_UNICODE)3526# define __itt_av_save __itt_av_saveW3527# define __itt_av_save_ptr __itt_av_saveW_ptr3528#else /* UNICODE */3529# define __itt_av_save __itt_av_saveA3530# define __itt_av_save_ptr __itt_av_saveA_ptr3531#endif /* UNICODE */3532#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3533int ITTAPI __itt_av_save(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder);3534#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */35353536/** @cond exclude_from_documentation */3537#ifndef INTEL_NO_MACRO_BODY3538#ifndef INTEL_NO_ITTNOTIFY_API3539#if ITT_PLATFORM==ITT_PLATFORM_WIN3540ITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder))3541ITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder))3542#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3543ITT_STUB(ITTAPI, int, av_save, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder))3544#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3545#if ITT_PLATFORM==ITT_PLATFORM_WIN3546#define __itt_av_saveA ITTNOTIFY_DATA(av_saveA)3547#define __itt_av_saveA_ptr ITTNOTIFY_NAME(av_saveA)3548#define __itt_av_saveW ITTNOTIFY_DATA(av_saveW)3549#define __itt_av_saveW_ptr ITTNOTIFY_NAME(av_saveW)3550#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3551#define __itt_av_save ITTNOTIFY_DATA(av_save)3552#define __itt_av_save_ptr ITTNOTIFY_NAME(av_save)3553#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3554#else /* INTEL_NO_ITTNOTIFY_API */3555#if ITT_PLATFORM==ITT_PLATFORM_WIN3556#define __itt_av_saveA(name)3557#define __itt_av_saveA_ptr 03558#define __itt_av_saveW(name)3559#define __itt_av_saveW_ptr 03560#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3561#define __itt_av_save(name)3562#define __itt_av_save_ptr 03563#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3564#endif /* INTEL_NO_ITTNOTIFY_API */3565#else /* INTEL_NO_MACRO_BODY */3566#if ITT_PLATFORM==ITT_PLATFORM_WIN3567#define __itt_av_saveA_ptr 03568#define __itt_av_saveW_ptr 03569#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3570#define __itt_av_save_ptr 03571#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3572#endif /* INTEL_NO_MACRO_BODY */3573/** @endcond */35743575void ITTAPI __itt_enable_attach(void);35763577/** @cond exclude_from_documentation */3578#ifndef INTEL_NO_MACRO_BODY3579#ifndef INTEL_NO_ITTNOTIFY_API3580ITT_STUBV(ITTAPI, void, enable_attach, (void))3581#define __itt_enable_attach ITTNOTIFY_VOID(enable_attach)3582#define __itt_enable_attach_ptr ITTNOTIFY_NAME(enable_attach)3583#else /* INTEL_NO_ITTNOTIFY_API */3584#define __itt_enable_attach()3585#define __itt_enable_attach_ptr 03586#endif /* INTEL_NO_ITTNOTIFY_API */3587#else /* INTEL_NO_MACRO_BODY */3588#define __itt_enable_attach_ptr 03589#endif /* INTEL_NO_MACRO_BODY */3590/** @endcond */35913592/** @cond exclude_from_gpa_documentation */35933594/** @} arrays group */35953596/** @endcond */35973598/**3599* @brief Module load info3600* This API is used to report necessary information in case of module relocation3601* @param[in] start_addr - relocated module start address3602* @param[in] end_addr - relocated module end address3603* @param[in] path - file system path to the module3604*/3605#if ITT_PLATFORM==ITT_PLATFORM_WIN3606void ITTAPI __itt_module_loadA(void *start_addr, void *end_addr, const char *path);3607void ITTAPI __itt_module_loadW(void *start_addr, void *end_addr, const wchar_t *path);3608#if defined(UNICODE) || defined(_UNICODE)3609# define __itt_module_load __itt_module_loadW3610# define __itt_module_load_ptr __itt_module_loadW_ptr3611#else /* UNICODE */3612# define __itt_module_load __itt_module_loadA3613# define __itt_module_load_ptr __itt_module_loadA_ptr3614#endif /* UNICODE */3615#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3616void ITTAPI __itt_module_load(void *start_addr, void *end_addr, const char *path);3617#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */36183619/** @cond exclude_from_documentation */3620#ifndef INTEL_NO_MACRO_BODY3621#ifndef INTEL_NO_ITTNOTIFY_API3622#if ITT_PLATFORM==ITT_PLATFORM_WIN3623ITT_STUB(ITTAPI, void, module_loadA, (void *start_addr, void *end_addr, const char *path))3624ITT_STUB(ITTAPI, void, module_loadW, (void *start_addr, void *end_addr, const wchar_t *path))3625#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3626ITT_STUB(ITTAPI, void, module_load, (void *start_addr, void *end_addr, const char *path))3627#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3628#if ITT_PLATFORM==ITT_PLATFORM_WIN3629#define __itt_module_loadA ITTNOTIFY_VOID(module_loadA)3630#define __itt_module_loadA_ptr ITTNOTIFY_NAME(module_loadA)3631#define __itt_module_loadW ITTNOTIFY_VOID(module_loadW)3632#define __itt_module_loadW_ptr ITTNOTIFY_NAME(module_loadW)3633#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3634#define __itt_module_load ITTNOTIFY_VOID(module_load)3635#define __itt_module_load_ptr ITTNOTIFY_NAME(module_load)3636#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3637#else /* INTEL_NO_ITTNOTIFY_API */3638#if ITT_PLATFORM==ITT_PLATFORM_WIN3639#define __itt_module_loadA(start_addr, end_addr, path)3640#define __itt_module_loadA_ptr 03641#define __itt_module_loadW(start_addr, end_addr, path)3642#define __itt_module_loadW_ptr 03643#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3644#define __itt_module_load(start_addr, end_addr, path)3645#define __itt_module_load_ptr 03646#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3647#endif /* INTEL_NO_ITTNOTIFY_API */3648#else /* INTEL_NO_MACRO_BODY */3649#if ITT_PLATFORM==ITT_PLATFORM_WIN3650#define __itt_module_loadA_ptr 03651#define __itt_module_loadW_ptr 03652#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3653#define __itt_module_load_ptr 03654#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3655#endif /* INTEL_NO_MACRO_BODY */3656/** @endcond */3657365836593660#ifdef __cplusplus3661}3662#endif /* __cplusplus */36633664#endif /* _ITTNOTIFY_H_ */36653666#ifdef INTEL_ITTNOTIFY_API_PRIVATE36673668#ifndef _ITTNOTIFY_PRIVATE_3669#define _ITTNOTIFY_PRIVATE_36703671#ifdef __cplusplus3672extern "C" {3673#endif /* __cplusplus */36743675/**3676* @ingroup clockdomain3677* @brief Begin an overlapped task instance.3678* @param[in] domain The domain for this task3679* @param[in] clock_domain The clock domain controlling the execution of this call.3680* @param[in] timestamp The user defined timestamp.3681* @param[in] taskid The identifier for this task instance, *cannot* be __itt_null.3682* @param[in] parentid The parent of this task, or __itt_null.3683* @param[in] name The name of this task.3684*/3685void ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name);36863687/**3688* @ingroup clockdomain3689* @brief End an overlapped task instance.3690* @param[in] domain The domain for this task3691* @param[in] clock_domain The clock domain controlling the execution of this call.3692* @param[in] timestamp The user defined timestamp.3693* @param[in] taskid Explicit ID of finished task3694*/3695void ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid);36963697/** @cond exclude_from_documentation */3698#ifndef INTEL_NO_MACRO_BODY3699#ifndef INTEL_NO_ITTNOTIFY_API3700ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name))3701ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid))3702#define __itt_task_begin_overlapped_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b)3703#define __itt_task_begin_overlapped_ex_ptr ITTNOTIFY_NAME(task_begin_overlapped_ex)3704#define __itt_task_end_overlapped_ex(d,x,y,z) ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z)3705#define __itt_task_end_overlapped_ex_ptr ITTNOTIFY_NAME(task_end_overlapped_ex)3706#else /* INTEL_NO_ITTNOTIFY_API */3707#define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name)3708#define __itt_task_begin_overlapped_ex_ptr 03709#define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid)3710#define __itt_task_end_overlapped_ex_ptr 03711#endif /* INTEL_NO_ITTNOTIFY_API */3712#else /* INTEL_NO_MACRO_BODY */3713#define __itt_task_begin_overlapped_ex_ptr 03714#define __itt_task_end_overlapped_ptr 03715#define __itt_task_end_overlapped_ex_ptr 03716#endif /* INTEL_NO_MACRO_BODY */3717/** @endcond */37183719/**3720* @defgroup makrs_internal Marks3721* @ingroup internal3722* Marks group3723* @warning Internal API:3724* - It is not shipped to outside of Intel3725* - It is delivered to internal Intel teams using e-mail or SVN access only3726* @{3727*/3728/** @brief user mark type */3729typedef int __itt_mark_type;37303731/**3732* @brief Creates a user mark type with the specified name using char or Unicode string.3733* @param[in] name - name of mark to create3734* @return Returns a handle to the mark type3735*/3736#if ITT_PLATFORM==ITT_PLATFORM_WIN3737__itt_mark_type ITTAPI __itt_mark_createA(const char *name);3738__itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name);3739#if defined(UNICODE) || defined(_UNICODE)3740# define __itt_mark_create __itt_mark_createW3741# define __itt_mark_create_ptr __itt_mark_createW_ptr3742#else /* UNICODE */3743# define __itt_mark_create __itt_mark_createA3744# define __itt_mark_create_ptr __itt_mark_createA_ptr3745#endif /* UNICODE */3746#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3747__itt_mark_type ITTAPI __itt_mark_create(const char *name);3748#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */37493750/** @cond exclude_from_documentation */3751#ifndef INTEL_NO_MACRO_BODY3752#ifndef INTEL_NO_ITTNOTIFY_API3753#if ITT_PLATFORM==ITT_PLATFORM_WIN3754ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name))3755ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name))3756#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3757ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name))3758#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3759#if ITT_PLATFORM==ITT_PLATFORM_WIN3760#define __itt_mark_createA ITTNOTIFY_DATA(mark_createA)3761#define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA)3762#define __itt_mark_createW ITTNOTIFY_DATA(mark_createW)3763#define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW)3764#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3765#define __itt_mark_create ITTNOTIFY_DATA(mark_create)3766#define __itt_mark_create_ptr ITTNOTIFY_NAME(mark_create)3767#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3768#else /* INTEL_NO_ITTNOTIFY_API */3769#if ITT_PLATFORM==ITT_PLATFORM_WIN3770#define __itt_mark_createA(name) (__itt_mark_type)03771#define __itt_mark_createA_ptr 03772#define __itt_mark_createW(name) (__itt_mark_type)03773#define __itt_mark_createW_ptr 03774#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3775#define __itt_mark_create(name) (__itt_mark_type)03776#define __itt_mark_create_ptr 03777#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3778#endif /* INTEL_NO_ITTNOTIFY_API */3779#else /* INTEL_NO_MACRO_BODY */3780#if ITT_PLATFORM==ITT_PLATFORM_WIN3781#define __itt_mark_createA_ptr 03782#define __itt_mark_createW_ptr 03783#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3784#define __itt_mark_create_ptr 03785#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3786#endif /* INTEL_NO_MACRO_BODY */3787/** @endcond */37883789/**3790* @brief Creates a "discrete" user mark type of the specified type and an optional parameter using char or Unicode string.3791*3792* - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign.3793* - The call is "synchronous" - function returns after mark is actually added to results.3794* - This function is useful, for example, to mark different phases of application3795* (beginning of the next mark automatically meand end of current region).3796* - Can be used together with "continuous" marks (see below) at the same collection session3797* @param[in] mt - mark, created by __itt_mark_create(const char* name) function3798* @param[in] parameter - string parameter of mark3799* @return Returns zero value in case of success, non-zero value otherwise.3800*/3801#if ITT_PLATFORM==ITT_PLATFORM_WIN3802int ITTAPI __itt_markA(__itt_mark_type mt, const char *parameter);3803int ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter);3804#if defined(UNICODE) || defined(_UNICODE)3805# define __itt_mark __itt_markW3806# define __itt_mark_ptr __itt_markW_ptr3807#else /* UNICODE */3808# define __itt_mark __itt_markA3809# define __itt_mark_ptr __itt_markA_ptr3810#endif /* UNICODE */3811#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3812int ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter);3813#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */38143815/** @cond exclude_from_documentation */3816#ifndef INTEL_NO_MACRO_BODY3817#ifndef INTEL_NO_ITTNOTIFY_API3818#if ITT_PLATFORM==ITT_PLATFORM_WIN3819ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter))3820ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter))3821#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3822ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter))3823#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3824#if ITT_PLATFORM==ITT_PLATFORM_WIN3825#define __itt_markA ITTNOTIFY_DATA(markA)3826#define __itt_markA_ptr ITTNOTIFY_NAME(markA)3827#define __itt_markW ITTNOTIFY_DATA(markW)3828#define __itt_markW_ptr ITTNOTIFY_NAME(markW)3829#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3830#define __itt_mark ITTNOTIFY_DATA(mark)3831#define __itt_mark_ptr ITTNOTIFY_NAME(mark)3832#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3833#else /* INTEL_NO_ITTNOTIFY_API */3834#if ITT_PLATFORM==ITT_PLATFORM_WIN3835#define __itt_markA(mt, parameter) (int)03836#define __itt_markA_ptr 03837#define __itt_markW(mt, parameter) (int)03838#define __itt_markW_ptr 03839#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3840#define __itt_mark(mt, parameter) (int)03841#define __itt_mark_ptr 03842#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3843#endif /* INTEL_NO_ITTNOTIFY_API */3844#else /* INTEL_NO_MACRO_BODY */3845#if ITT_PLATFORM==ITT_PLATFORM_WIN3846#define __itt_markA_ptr 03847#define __itt_markW_ptr 03848#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3849#define __itt_mark_ptr 03850#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3851#endif /* INTEL_NO_MACRO_BODY */3852/** @endcond */38533854/**3855* @brief Use this if necessary to create a "discrete" user event type (mark) for process3856* rather then for one thread3857* @see int __itt_mark(__itt_mark_type mt, const char* parameter);3858*/3859#if ITT_PLATFORM==ITT_PLATFORM_WIN3860int ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char *parameter);3861int ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter);3862#if defined(UNICODE) || defined(_UNICODE)3863# define __itt_mark_global __itt_mark_globalW3864# define __itt_mark_global_ptr __itt_mark_globalW_ptr3865#else /* UNICODE */3866# define __itt_mark_global __itt_mark_globalA3867# define __itt_mark_global_ptr __itt_mark_globalA_ptr3868#endif /* UNICODE */3869#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3870int ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter);3871#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */38723873/** @cond exclude_from_documentation */3874#ifndef INTEL_NO_MACRO_BODY3875#ifndef INTEL_NO_ITTNOTIFY_API3876#if ITT_PLATFORM==ITT_PLATFORM_WIN3877ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter))3878ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter))3879#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3880ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter))3881#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3882#if ITT_PLATFORM==ITT_PLATFORM_WIN3883#define __itt_mark_globalA ITTNOTIFY_DATA(mark_globalA)3884#define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA)3885#define __itt_mark_globalW ITTNOTIFY_DATA(mark_globalW)3886#define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW)3887#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3888#define __itt_mark_global ITTNOTIFY_DATA(mark_global)3889#define __itt_mark_global_ptr ITTNOTIFY_NAME(mark_global)3890#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3891#else /* INTEL_NO_ITTNOTIFY_API */3892#if ITT_PLATFORM==ITT_PLATFORM_WIN3893#define __itt_mark_globalA(mt, parameter) (int)03894#define __itt_mark_globalA_ptr 03895#define __itt_mark_globalW(mt, parameter) (int)03896#define __itt_mark_globalW_ptr 03897#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3898#define __itt_mark_global(mt, parameter) (int)03899#define __itt_mark_global_ptr 03900#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3901#endif /* INTEL_NO_ITTNOTIFY_API */3902#else /* INTEL_NO_MACRO_BODY */3903#if ITT_PLATFORM==ITT_PLATFORM_WIN3904#define __itt_mark_globalA_ptr 03905#define __itt_mark_globalW_ptr 03906#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */3907#define __itt_mark_global_ptr 03908#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */3909#endif /* INTEL_NO_MACRO_BODY */3910/** @endcond */39113912/**3913* @brief Creates an "end" point for "continuous" mark with specified name.3914*3915* - Returns zero value in case of success, non-zero value otherwise.3916* Also returns non-zero value when preceding "begin" point for the3917* mark with the same name failed to be created or not created.3918* - The mark of "continuous" type is placed to collection results in3919* case of success. It appears in overtime view(s) as a special tick3920* sign (different from "discrete" mark) together with line from3921* corresponding "begin" mark to "end" mark.3922* @note Continuous marks can overlap and be nested inside each other.3923* Discrete mark can be nested inside marked region3924* @param[in] mt - mark, created by __itt_mark_create(const char* name) function3925* @return Returns zero value in case of success, non-zero value otherwise.3926*/3927int ITTAPI __itt_mark_off(__itt_mark_type mt);39283929/** @cond exclude_from_documentation */3930#ifndef INTEL_NO_MACRO_BODY3931#ifndef INTEL_NO_ITTNOTIFY_API3932ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt))3933#define __itt_mark_off ITTNOTIFY_DATA(mark_off)3934#define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off)3935#else /* INTEL_NO_ITTNOTIFY_API */3936#define __itt_mark_off(mt) (int)03937#define __itt_mark_off_ptr 03938#endif /* INTEL_NO_ITTNOTIFY_API */3939#else /* INTEL_NO_MACRO_BODY */3940#define __itt_mark_off_ptr 03941#endif /* INTEL_NO_MACRO_BODY */3942/** @endcond */39433944/**3945* @brief Use this if necessary to create an "end" point for mark of process3946* @see int __itt_mark_off(__itt_mark_type mt);3947*/3948int ITTAPI __itt_mark_global_off(__itt_mark_type mt);39493950/** @cond exclude_from_documentation */3951#ifndef INTEL_NO_MACRO_BODY3952#ifndef INTEL_NO_ITTNOTIFY_API3953ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt))3954#define __itt_mark_global_off ITTNOTIFY_DATA(mark_global_off)3955#define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off)3956#else /* INTEL_NO_ITTNOTIFY_API */3957#define __itt_mark_global_off(mt) (int)03958#define __itt_mark_global_off_ptr 03959#endif /* INTEL_NO_ITTNOTIFY_API */3960#else /* INTEL_NO_MACRO_BODY */3961#define __itt_mark_global_off_ptr 03962#endif /* INTEL_NO_MACRO_BODY */3963/** @endcond */3964/** @} marks group */39653966/**3967* @defgroup counters_internal Counters3968* @ingroup internal3969* Counters group3970* @{3971*/397239733974/**3975* @defgroup stitch Stack Stitching3976* @ingroup internal3977* Stack Stitching group3978* @{3979*/3980/**3981* @brief opaque structure for counter identification3982*/3983typedef struct ___itt_caller *__itt_caller;39843985/**3986* @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to.3987* The function returns a unique identifier which is used to match the cut points with corresponding stitch points.3988*/3989__itt_caller ITTAPI __itt_stack_caller_create(void);39903991/** @cond exclude_from_documentation */3992#ifndef INTEL_NO_MACRO_BODY3993#ifndef INTEL_NO_ITTNOTIFY_API3994ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void))3995#define __itt_stack_caller_create ITTNOTIFY_DATA(stack_caller_create)3996#define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create)3997#else /* INTEL_NO_ITTNOTIFY_API */3998#define __itt_stack_caller_create() (__itt_caller)03999#define __itt_stack_caller_create_ptr 04000#endif /* INTEL_NO_ITTNOTIFY_API */4001#else /* INTEL_NO_MACRO_BODY */4002#define __itt_stack_caller_create_ptr 04003#endif /* INTEL_NO_MACRO_BODY */4004/** @endcond */40054006/**4007* @brief Destroy the inforamtion about stitch point identified by the pointer previously returned by __itt_stack_caller_create()4008*/4009void ITTAPI __itt_stack_caller_destroy(__itt_caller id);40104011/** @cond exclude_from_documentation */4012#ifndef INTEL_NO_MACRO_BODY4013#ifndef INTEL_NO_ITTNOTIFY_API4014ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id))4015#define __itt_stack_caller_destroy ITTNOTIFY_VOID(stack_caller_destroy)4016#define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy)4017#else /* INTEL_NO_ITTNOTIFY_API */4018#define __itt_stack_caller_destroy(id)4019#define __itt_stack_caller_destroy_ptr 04020#endif /* INTEL_NO_ITTNOTIFY_API */4021#else /* INTEL_NO_MACRO_BODY */4022#define __itt_stack_caller_destroy_ptr 04023#endif /* INTEL_NO_MACRO_BODY */4024/** @endcond */40254026/**4027* @brief Sets the cut point. Stack from each event which occurs after this call will be cut4028* at the same stack level the function was called and stitched to the corresponding stitch point.4029*/4030void ITTAPI __itt_stack_callee_enter(__itt_caller id);40314032/** @cond exclude_from_documentation */4033#ifndef INTEL_NO_MACRO_BODY4034#ifndef INTEL_NO_ITTNOTIFY_API4035ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id))4036#define __itt_stack_callee_enter ITTNOTIFY_VOID(stack_callee_enter)4037#define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter)4038#else /* INTEL_NO_ITTNOTIFY_API */4039#define __itt_stack_callee_enter(id)4040#define __itt_stack_callee_enter_ptr 04041#endif /* INTEL_NO_ITTNOTIFY_API */4042#else /* INTEL_NO_MACRO_BODY */4043#define __itt_stack_callee_enter_ptr 04044#endif /* INTEL_NO_MACRO_BODY */4045/** @endcond */40464047/**4048* @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter().4049*/4050void ITTAPI __itt_stack_callee_leave(__itt_caller id);40514052/** @cond exclude_from_documentation */4053#ifndef INTEL_NO_MACRO_BODY4054#ifndef INTEL_NO_ITTNOTIFY_API4055ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id))4056#define __itt_stack_callee_leave ITTNOTIFY_VOID(stack_callee_leave)4057#define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave)4058#else /* INTEL_NO_ITTNOTIFY_API */4059#define __itt_stack_callee_leave(id)4060#define __itt_stack_callee_leave_ptr 04061#endif /* INTEL_NO_ITTNOTIFY_API */4062#else /* INTEL_NO_MACRO_BODY */4063#define __itt_stack_callee_leave_ptr 04064#endif /* INTEL_NO_MACRO_BODY */4065/** @endcond */40664067/** @} stitch group */40684069/* ***************************************************************************************************************************** */40704071#include <stdarg.h>40724073/** @cond exclude_from_documentation */4074typedef enum __itt_error_code4075{4076__itt_error_success = 0, /*!< no error */4077__itt_error_no_module = 1, /*!< module can't be loaded */4078/* %1$s -- library name; win: %2$d -- system error code; unx: %2$s -- system error message. */4079__itt_error_no_symbol = 2, /*!< symbol not found */4080/* %1$s -- library name, %2$s -- symbol name. */4081__itt_error_unknown_group = 3, /*!< unknown group specified */4082/* %1$s -- env var name, %2$s -- group name. */4083__itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */4084/* %1$s -- env var name, %2$d -- system error. */4085__itt_error_env_too_long = 5, /*!< variable value too long */4086/* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */4087__itt_error_system = 6 /*!< pthread_mutexattr_init or pthread_mutex_init failed */4088/* %1$s -- function name, %2$d -- errno. */4089} __itt_error_code;40904091typedef void (__itt_error_handler_t)(__itt_error_code code, va_list);4092__itt_error_handler_t* __itt_set_error_handler(__itt_error_handler_t*);40934094const char* ITTAPI __itt_api_version(void);4095/** @endcond */40964097/** @cond exclude_from_documentation */4098#ifndef INTEL_NO_MACRO_BODY4099#ifndef INTEL_NO_ITTNOTIFY_API4100#define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler)4101void __itt_error_handler(__itt_error_code code, va_list args);4102extern const int ITTNOTIFY_NAME(err);4103#define __itt_err ITTNOTIFY_NAME(err)4104ITT_STUB(ITTAPI, const char*, api_version, (void))4105#define __itt_api_version ITTNOTIFY_DATA(api_version)4106#define __itt_api_version_ptr ITTNOTIFY_NAME(api_version)4107#else /* INTEL_NO_ITTNOTIFY_API */4108#define __itt_api_version() (const char*)04109#define __itt_api_version_ptr 04110#endif /* INTEL_NO_ITTNOTIFY_API */4111#else /* INTEL_NO_MACRO_BODY */4112#define __itt_api_version_ptr 04113#endif /* INTEL_NO_MACRO_BODY */4114/** @endcond */41154116#ifdef __cplusplus4117}4118#endif /* __cplusplus */41194120#endif /* _ITTNOTIFY_PRIVATE_ */41214122#endif /* INTEL_ITTNOTIFY_API_PRIVATE */412341244125