Path: blob/master/3rdparty/ittnotify/include/legacy/ittnotify.h
16338 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 _LEGACY_ITTNOTIFY_H_58#define _LEGACY_ITTNOTIFY_H_5960/**61* @file62* @brief Legacy User API functions and types63*/6465/** @cond exclude_from_documentation */66#ifndef ITT_OS_WIN67# define ITT_OS_WIN 168#endif /* ITT_OS_WIN */6970#ifndef ITT_OS_LINUX71# define ITT_OS_LINUX 272#endif /* ITT_OS_LINUX */7374#ifndef ITT_OS_MAC75# define ITT_OS_MAC 376#endif /* ITT_OS_MAC */7778#ifndef ITT_OS_FREEBSD79# define ITT_OS_FREEBSD 480#endif /* ITT_OS_FREEBSD */8182#ifndef ITT_OS83# if defined WIN32 || defined _WIN3284# define ITT_OS ITT_OS_WIN85# elif defined( __APPLE__ ) && defined( __MACH__ )86# define ITT_OS ITT_OS_MAC87# elif defined( __FreeBSD__ )88# define ITT_OS ITT_OS_FREEBSD89# else90# define ITT_OS ITT_OS_LINUX91# endif92#endif /* ITT_OS */9394#ifndef ITT_PLATFORM_WIN95# define ITT_PLATFORM_WIN 196#endif /* ITT_PLATFORM_WIN */9798#ifndef ITT_PLATFORM_POSIX99# define ITT_PLATFORM_POSIX 2100#endif /* ITT_PLATFORM_POSIX */101102#ifndef ITT_PLATFORM_MAC103# define ITT_PLATFORM_MAC 3104#endif /* ITT_PLATFORM_MAC */105106#ifndef ITT_PLATFORM_FREEBSD107# define ITT_PLATFORM_FREEBSD 4108#endif /* ITT_PLATFORM_FREEBSD */109110#ifndef ITT_PLATFORM111# if ITT_OS==ITT_OS_WIN112# define ITT_PLATFORM ITT_PLATFORM_WIN113# elif ITT_OS==ITT_OS_MAC114# define ITT_PLATFORM ITT_PLATFORM_MAC115# elif ITT_OS==ITT_OS_FREEBSD116# define ITT_PLATFORM ITT_PLATFORM_FREEBSD117# else118# define ITT_PLATFORM ITT_PLATFORM_POSIX119# endif120#endif /* ITT_PLATFORM */121122#if defined(_UNICODE) && !defined(UNICODE)123#define UNICODE124#endif125126#include <stddef.h>127#if ITT_PLATFORM==ITT_PLATFORM_WIN128#include <tchar.h>129#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */130#include <stdint.h>131#if defined(UNICODE) || defined(_UNICODE)132#include <wchar.h>133#endif /* UNICODE || _UNICODE */134#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */135136#ifndef ITTAPI_CDECL137# if ITT_PLATFORM==ITT_PLATFORM_WIN138# define ITTAPI_CDECL __cdecl139# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */140# if defined _M_IX86 || defined __i386__141# define ITTAPI_CDECL __attribute__ ((cdecl))142# else /* _M_IX86 || __i386__ */143# define ITTAPI_CDECL /* actual only on x86 platform */144# endif /* _M_IX86 || __i386__ */145# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */146#endif /* ITTAPI_CDECL */147148#ifndef STDCALL149# if ITT_PLATFORM==ITT_PLATFORM_WIN150# define STDCALL __stdcall151# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */152# if defined _M_IX86 || defined __i386__153# define STDCALL __attribute__ ((stdcall))154# else /* _M_IX86 || __i386__ */155# define STDCALL /* supported only on x86 platform */156# endif /* _M_IX86 || __i386__ */157# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */158#endif /* STDCALL */159160#define ITTAPI ITTAPI_CDECL161#define LIBITTAPI ITTAPI_CDECL162163/* TODO: Temporary for compatibility! */164#define ITTAPI_CALL ITTAPI_CDECL165#define LIBITTAPI_CALL ITTAPI_CDECL166167#if ITT_PLATFORM==ITT_PLATFORM_WIN168/* use __forceinline (VC++ specific) */169#define ITT_INLINE __forceinline170#define ITT_INLINE_ATTRIBUTE /* nothing */171#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */172/*173* Generally, functions are not inlined unless optimization is specified.174* For functions declared inline, this attribute inlines the function even175* if no optimization level was specified.176*/177#ifdef __STRICT_ANSI__178#define ITT_INLINE static179#define ITT_INLINE_ATTRIBUTE __attribute__((unused))180#else /* __STRICT_ANSI__ */181#define ITT_INLINE static inline182#define ITT_INLINE_ATTRIBUTE __attribute__((always_inline, unused))183#endif /* __STRICT_ANSI__ */184#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */185/** @endcond */186187/** @cond exclude_from_documentation */188/* Helper macro for joining tokens */189#define ITT_JOIN_AUX(p,n) p##n190#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n)191192#ifdef ITT_MAJOR193#undef ITT_MAJOR194#endif195#ifdef ITT_MINOR196#undef ITT_MINOR197#endif198#define ITT_MAJOR 3199#define ITT_MINOR 0200201/* Standard versioning of a token with major and minor version numbers */202#define ITT_VERSIONIZE(x) \203ITT_JOIN(x, \204ITT_JOIN(_, \205ITT_JOIN(ITT_MAJOR, \206ITT_JOIN(_, ITT_MINOR))))207208#ifndef INTEL_ITTNOTIFY_PREFIX209# define INTEL_ITTNOTIFY_PREFIX __itt_210#endif /* INTEL_ITTNOTIFY_PREFIX */211#ifndef INTEL_ITTNOTIFY_POSTFIX212# define INTEL_ITTNOTIFY_POSTFIX _ptr_213#endif /* INTEL_ITTNOTIFY_POSTFIX */214215#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n)216#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)))217218#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)219#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)220221#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d)222#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x)223#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y)224#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)225#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)226#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)227#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)228#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d)229#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x)230#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y)231#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z)232#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)233#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)234#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)235236#ifdef ITT_STUB237#undef ITT_STUB238#endif239#ifdef ITT_STUBV240#undef ITT_STUBV241#endif242#define ITT_STUBV(api,type,name,args) \243typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \244extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name);245#define ITT_STUB ITT_STUBV246/** @endcond */247248#ifdef __cplusplus249extern "C" {250#endif /* __cplusplus */251252/**253* @defgroup legacy Legacy API254* @{255* @}256*/257258/**259* @defgroup legacy_control Collection Control260* @ingroup legacy261* General behavior: application continues to run, but no profiling information is being collected262*263* Pausing occurs not only for the current thread but for all process as well as spawned processes264* - Intel(R) Parallel Inspector and Intel(R) Inspector XE:265* - Does not analyze or report errors that involve memory access.266* - Other errors are reported as usual. Pausing data collection in267* Intel(R) Parallel Inspector and Intel(R) Inspector XE268* only pauses tracing and analyzing memory access.269* It does not pause tracing or analyzing threading APIs.270* .271* - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE:272* - Does continue to record when new threads are started.273* .274* - Other effects:275* - Possible reduction of runtime overhead.276* .277* @{278*/279#ifndef _ITTNOTIFY_H_280/** @brief Pause collection */281void ITTAPI __itt_pause(void);282/** @brief Resume collection */283void ITTAPI __itt_resume(void);284/** @brief Detach collection */285void ITTAPI __itt_detach(void);286287/** @cond exclude_from_documentation */288#ifndef INTEL_NO_MACRO_BODY289#ifndef INTEL_NO_ITTNOTIFY_API290ITT_STUBV(ITTAPI, void, pause, (void))291ITT_STUBV(ITTAPI, void, resume, (void))292ITT_STUBV(ITTAPI, void, detach, (void))293#define __itt_pause ITTNOTIFY_VOID(pause)294#define __itt_pause_ptr ITTNOTIFY_NAME(pause)295#define __itt_resume ITTNOTIFY_VOID(resume)296#define __itt_resume_ptr ITTNOTIFY_NAME(resume)297#define __itt_detach ITTNOTIFY_VOID(detach)298#define __itt_detach_ptr ITTNOTIFY_NAME(detach)299#else /* INTEL_NO_ITTNOTIFY_API */300#define __itt_pause()301#define __itt_pause_ptr 0302#define __itt_resume()303#define __itt_resume_ptr 0304#define __itt_detach()305#define __itt_detach_ptr 0306#endif /* INTEL_NO_ITTNOTIFY_API */307#else /* INTEL_NO_MACRO_BODY */308#define __itt_pause_ptr 0309#define __itt_resume_ptr 0310#define __itt_detach_ptr 0311#endif /* INTEL_NO_MACRO_BODY */312/** @endcond */313#endif /* _ITTNOTIFY_H_ */314/** @} legacy_control group */315316/**317* @defgroup legacy_threads Threads318* @ingroup legacy319* Threads group320* @warning Legacy API321* @{322*/323/**324* @deprecated Legacy API325* @brief Set name to be associated with thread in analysis GUI.326* @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)327*/328#if ITT_PLATFORM==ITT_PLATFORM_WIN329int LIBITTAPI __itt_thr_name_setA(const char *name, int namelen);330int LIBITTAPI __itt_thr_name_setW(const wchar_t *name, int namelen);331#if defined(UNICODE) || defined(_UNICODE)332# define __itt_thr_name_set __itt_thr_name_setW333# define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr334#else335# define __itt_thr_name_set __itt_thr_name_setA336# define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr337#endif /* UNICODE */338#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */339int LIBITTAPI __itt_thr_name_set(const char *name, int namelen);340#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */341342/** @cond exclude_from_documentation */343#ifndef INTEL_NO_MACRO_BODY344#ifndef INTEL_NO_ITTNOTIFY_API345#if ITT_PLATFORM==ITT_PLATFORM_WIN346ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen))347ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen))348#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */349ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen))350#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */351#if ITT_PLATFORM==ITT_PLATFORM_WIN352#define __itt_thr_name_setA ITTNOTIFY_DATA(thr_name_setA)353#define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA)354#define __itt_thr_name_setW ITTNOTIFY_DATA(thr_name_setW)355#define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW)356#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */357#define __itt_thr_name_set ITTNOTIFY_DATA(thr_name_set)358#define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set)359#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */360#else /* INTEL_NO_ITTNOTIFY_API */361#if ITT_PLATFORM==ITT_PLATFORM_WIN362#define __itt_thr_name_setA(name, namelen)363#define __itt_thr_name_setA_ptr 0364#define __itt_thr_name_setW(name, namelen)365#define __itt_thr_name_setW_ptr 0366#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */367#define __itt_thr_name_set(name, namelen)368#define __itt_thr_name_set_ptr 0369#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */370#endif /* INTEL_NO_ITTNOTIFY_API */371#else /* INTEL_NO_MACRO_BODY */372#if ITT_PLATFORM==ITT_PLATFORM_WIN373#define __itt_thr_name_setA_ptr 0374#define __itt_thr_name_setW_ptr 0375#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */376#define __itt_thr_name_set_ptr 0377#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */378#endif /* INTEL_NO_MACRO_BODY */379/** @endcond */380381/**382* @deprecated Legacy API383* @brief Mark current thread as ignored from this point on, for the duration of its existence.384*/385void LIBITTAPI __itt_thr_ignore(void);386387/** @cond exclude_from_documentation */388#ifndef INTEL_NO_MACRO_BODY389#ifndef INTEL_NO_ITTNOTIFY_API390ITT_STUBV(LIBITTAPI, void, thr_ignore, (void))391#define __itt_thr_ignore ITTNOTIFY_VOID(thr_ignore)392#define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore)393#else /* INTEL_NO_ITTNOTIFY_API */394#define __itt_thr_ignore()395#define __itt_thr_ignore_ptr 0396#endif /* INTEL_NO_ITTNOTIFY_API */397#else /* INTEL_NO_MACRO_BODY */398#define __itt_thr_ignore_ptr 0399#endif /* INTEL_NO_MACRO_BODY */400/** @endcond */401/** @} legacy_threads group */402403/**404* @defgroup legacy_sync Synchronization405* @ingroup legacy406* Synchronization group407* @warning Legacy API408* @{409*/410/**411* @hideinitializer412* @brief possible value of attribute argument for sync object type413*/414#define __itt_attr_barrier 1415416/**417* @hideinitializer418* @brief possible value of attribute argument for sync object type419*/420#define __itt_attr_mutex 2421422/**423* @deprecated Legacy API424* @brief Assign a name to a sync object using char or Unicode string425* @param[in] addr - pointer to the sync object. You should use a real pointer to your object426* to make sure that the values don't clash with other object addresses427* @param[in] objtype - null-terminated object type string. If NULL is passed, the object will428* be assumed to be of generic "User Synchronization" type429* @param[in] objname - null-terminated object name string. If NULL, no name will be assigned430* to the object -- you can use the __itt_sync_rename call later to assign431* the name432* @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the433* exact semantics of how prepare/acquired/releasing calls work.434*/435#if ITT_PLATFORM==ITT_PLATFORM_WIN436void ITTAPI __itt_sync_set_nameA(void *addr, const char *objtype, const char *objname, int attribute);437void ITTAPI __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute);438#if defined(UNICODE) || defined(_UNICODE)439# define __itt_sync_set_name __itt_sync_set_nameW440# define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr441#else /* UNICODE */442# define __itt_sync_set_name __itt_sync_set_nameA443# define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr444#endif /* UNICODE */445#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */446void ITTAPI __itt_sync_set_name(void *addr, const char* objtype, const char* objname, int attribute);447#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */448449/** @cond exclude_from_documentation */450#ifndef INTEL_NO_MACRO_BODY451#ifndef INTEL_NO_ITTNOTIFY_API452#if ITT_PLATFORM==ITT_PLATFORM_WIN453ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute))454ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute))455#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */456ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute))457#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */458#if ITT_PLATFORM==ITT_PLATFORM_WIN459#define __itt_sync_set_nameA ITTNOTIFY_VOID(sync_set_nameA)460#define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA)461#define __itt_sync_set_nameW ITTNOTIFY_VOID(sync_set_nameW)462#define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW)463#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */464#define __itt_sync_set_name ITTNOTIFY_VOID(sync_set_name)465#define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name)466#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */467#else /* INTEL_NO_ITTNOTIFY_API */468#if ITT_PLATFORM==ITT_PLATFORM_WIN469#define __itt_sync_set_nameA(addr, objtype, objname, attribute)470#define __itt_sync_set_nameA_ptr 0471#define __itt_sync_set_nameW(addr, objtype, objname, attribute)472#define __itt_sync_set_nameW_ptr 0473#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */474#define __itt_sync_set_name(addr, objtype, objname, attribute)475#define __itt_sync_set_name_ptr 0476#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */477#endif /* INTEL_NO_ITTNOTIFY_API */478#else /* INTEL_NO_MACRO_BODY */479#if ITT_PLATFORM==ITT_PLATFORM_WIN480#define __itt_sync_set_nameA_ptr 0481#define __itt_sync_set_nameW_ptr 0482#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */483#define __itt_sync_set_name_ptr 0484#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */485#endif /* INTEL_NO_MACRO_BODY */486/** @endcond */487488/**489* @deprecated Legacy API490* @brief Assign a name and type to a sync object using char or Unicode string491* @param[in] addr - pointer to the sync object. You should use a real pointer to your object492* to make sure that the values don't clash with other object addresses493* @param[in] objtype - null-terminated object type string. If NULL is passed, the object will494* be assumed to be of generic "User Synchronization" type495* @param[in] objname - null-terminated object name string. If NULL, no name will be assigned496* to the object -- you can use the __itt_sync_rename call later to assign497* the name498* @param[in] typelen, namelen - a length of string for appropriate objtype and objname parameter499* @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the500* exact semantics of how prepare/acquired/releasing calls work.501* @return __itt_err upon failure (name or namelen being null,name and namelen mismatched)502*/503#if ITT_PLATFORM==ITT_PLATFORM_WIN504int LIBITTAPI __itt_notify_sync_nameA(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute);505int LIBITTAPI __itt_notify_sync_nameW(void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute);506#if defined(UNICODE) || defined(_UNICODE)507# define __itt_notify_sync_name __itt_notify_sync_nameW508#else509# define __itt_notify_sync_name __itt_notify_sync_nameA510#endif511#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */512int LIBITTAPI __itt_notify_sync_name(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute);513#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */514515/** @cond exclude_from_documentation */516#ifndef INTEL_NO_MACRO_BODY517#ifndef INTEL_NO_ITTNOTIFY_API518#if ITT_PLATFORM==ITT_PLATFORM_WIN519ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute))520ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute))521#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */522ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute))523#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */524#if ITT_PLATFORM==ITT_PLATFORM_WIN525#define __itt_notify_sync_nameA ITTNOTIFY_DATA(notify_sync_nameA)526#define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA)527#define __itt_notify_sync_nameW ITTNOTIFY_DATA(notify_sync_nameW)528#define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW)529#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */530#define __itt_notify_sync_name ITTNOTIFY_DATA(notify_sync_name)531#define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name)532#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */533#else /* INTEL_NO_ITTNOTIFY_API */534#if ITT_PLATFORM==ITT_PLATFORM_WIN535#define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, attribute)536#define __itt_notify_sync_nameA_ptr 0537#define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, attribute)538#define __itt_notify_sync_nameW_ptr 0539#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */540#define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, attribute)541#define __itt_notify_sync_name_ptr 0542#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */543#endif /* INTEL_NO_ITTNOTIFY_API */544#else /* INTEL_NO_MACRO_BODY */545#if ITT_PLATFORM==ITT_PLATFORM_WIN546#define __itt_notify_sync_nameA_ptr 0547#define __itt_notify_sync_nameW_ptr 0548#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */549#define __itt_notify_sync_name_ptr 0550#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */551#endif /* INTEL_NO_MACRO_BODY */552/** @endcond */553554/**555* @deprecated Legacy API556* @brief Enter spin loop on user-defined sync object557*/558void LIBITTAPI __itt_notify_sync_prepare(void* addr);559560/** @cond exclude_from_documentation */561#ifndef INTEL_NO_MACRO_BODY562#ifndef INTEL_NO_ITTNOTIFY_API563ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *addr))564#define __itt_notify_sync_prepare ITTNOTIFY_VOID(notify_sync_prepare)565#define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare)566#else /* INTEL_NO_ITTNOTIFY_API */567#define __itt_notify_sync_prepare(addr)568#define __itt_notify_sync_prepare_ptr 0569#endif /* INTEL_NO_ITTNOTIFY_API */570#else /* INTEL_NO_MACRO_BODY */571#define __itt_notify_sync_prepare_ptr 0572#endif /* INTEL_NO_MACRO_BODY */573/** @endcond */574575/**576* @deprecated Legacy API577* @brief Quit spin loop without acquiring spin object578*/579void LIBITTAPI __itt_notify_sync_cancel(void *addr);580581/** @cond exclude_from_documentation */582#ifndef INTEL_NO_MACRO_BODY583#ifndef INTEL_NO_ITTNOTIFY_API584ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *addr))585#define __itt_notify_sync_cancel ITTNOTIFY_VOID(notify_sync_cancel)586#define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel)587#else /* INTEL_NO_ITTNOTIFY_API */588#define __itt_notify_sync_cancel(addr)589#define __itt_notify_sync_cancel_ptr 0590#endif /* INTEL_NO_ITTNOTIFY_API */591#else /* INTEL_NO_MACRO_BODY */592#define __itt_notify_sync_cancel_ptr 0593#endif /* INTEL_NO_MACRO_BODY */594/** @endcond */595596/**597* @deprecated Legacy API598* @brief Successful spin loop completion (sync object acquired)599*/600void LIBITTAPI __itt_notify_sync_acquired(void *addr);601602/** @cond exclude_from_documentation */603#ifndef INTEL_NO_MACRO_BODY604#ifndef INTEL_NO_ITTNOTIFY_API605ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *addr))606#define __itt_notify_sync_acquired ITTNOTIFY_VOID(notify_sync_acquired)607#define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired)608#else /* INTEL_NO_ITTNOTIFY_API */609#define __itt_notify_sync_acquired(addr)610#define __itt_notify_sync_acquired_ptr 0611#endif /* INTEL_NO_ITTNOTIFY_API */612#else /* INTEL_NO_MACRO_BODY */613#define __itt_notify_sync_acquired_ptr 0614#endif /* INTEL_NO_MACRO_BODY */615/** @endcond */616617/**618* @deprecated Legacy API619* @brief Start sync object releasing code. Is called before the lock release call.620*/621void LIBITTAPI __itt_notify_sync_releasing(void* addr);622623/** @cond exclude_from_documentation */624#ifndef INTEL_NO_MACRO_BODY625#ifndef INTEL_NO_ITTNOTIFY_API626ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *addr))627#define __itt_notify_sync_releasing ITTNOTIFY_VOID(notify_sync_releasing)628#define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing)629#else /* INTEL_NO_ITTNOTIFY_API */630#define __itt_notify_sync_releasing(addr)631#define __itt_notify_sync_releasing_ptr 0632#endif /* INTEL_NO_ITTNOTIFY_API */633#else /* INTEL_NO_MACRO_BODY */634#define __itt_notify_sync_releasing_ptr 0635#endif /* INTEL_NO_MACRO_BODY */636/** @endcond */637/** @} legacy_sync group */638639#ifndef _ITTNOTIFY_H_640/**641* @defgroup legacy_events Events642* @ingroup legacy643* Events group644* @{645*/646647/** @brief user event type */648typedef int __itt_event;649650/**651* @brief Create an event notification652* @note name or namelen being null/name and namelen not matching, user event feature not enabled653* @return non-zero event identifier upon success and __itt_err otherwise654*/655#if ITT_PLATFORM==ITT_PLATFORM_WIN656__itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen);657__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen);658#if defined(UNICODE) || defined(_UNICODE)659# define __itt_event_create __itt_event_createW660# define __itt_event_create_ptr __itt_event_createW_ptr661#else662# define __itt_event_create __itt_event_createA663# define __itt_event_create_ptr __itt_event_createA_ptr664#endif /* UNICODE */665#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */666__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen);667#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */668669/** @cond exclude_from_documentation */670#ifndef INTEL_NO_MACRO_BODY671#ifndef INTEL_NO_ITTNOTIFY_API672#if ITT_PLATFORM==ITT_PLATFORM_WIN673ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen))674ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen))675#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */676ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen))677#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */678#if ITT_PLATFORM==ITT_PLATFORM_WIN679#define __itt_event_createA ITTNOTIFY_DATA(event_createA)680#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA)681#define __itt_event_createW ITTNOTIFY_DATA(event_createW)682#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW)683#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */684#define __itt_event_create ITTNOTIFY_DATA(event_create)685#define __itt_event_create_ptr ITTNOTIFY_NAME(event_create)686#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */687#else /* INTEL_NO_ITTNOTIFY_API */688#if ITT_PLATFORM==ITT_PLATFORM_WIN689#define __itt_event_createA(name, namelen) (__itt_event)0690#define __itt_event_createA_ptr 0691#define __itt_event_createW(name, namelen) (__itt_event)0692#define __itt_event_createW_ptr 0693#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */694#define __itt_event_create(name, namelen) (__itt_event)0695#define __itt_event_create_ptr 0696#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */697#endif /* INTEL_NO_ITTNOTIFY_API */698#else /* INTEL_NO_MACRO_BODY */699#if ITT_PLATFORM==ITT_PLATFORM_WIN700#define __itt_event_createA_ptr 0701#define __itt_event_createW_ptr 0702#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */703#define __itt_event_create_ptr 0704#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */705#endif /* INTEL_NO_MACRO_BODY */706/** @endcond */707708/**709* @brief Record an event occurrence.710* @return __itt_err upon failure (invalid event id/user event feature not enabled)711*/712int LIBITTAPI __itt_event_start(__itt_event event);713714/** @cond exclude_from_documentation */715#ifndef INTEL_NO_MACRO_BODY716#ifndef INTEL_NO_ITTNOTIFY_API717ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event))718#define __itt_event_start ITTNOTIFY_DATA(event_start)719#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start)720#else /* INTEL_NO_ITTNOTIFY_API */721#define __itt_event_start(event) (int)0722#define __itt_event_start_ptr 0723#endif /* INTEL_NO_ITTNOTIFY_API */724#else /* INTEL_NO_MACRO_BODY */725#define __itt_event_start_ptr 0726#endif /* INTEL_NO_MACRO_BODY */727/** @endcond */728729/**730* @brief Record an event end occurrence.731* @note It is optional if events do not have durations.732* @return __itt_err upon failure (invalid event id/user event feature not enabled)733*/734int LIBITTAPI __itt_event_end(__itt_event event);735736/** @cond exclude_from_documentation */737#ifndef INTEL_NO_MACRO_BODY738#ifndef INTEL_NO_ITTNOTIFY_API739ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event))740#define __itt_event_end ITTNOTIFY_DATA(event_end)741#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end)742#else /* INTEL_NO_ITTNOTIFY_API */743#define __itt_event_end(event) (int)0744#define __itt_event_end_ptr 0745#endif /* INTEL_NO_ITTNOTIFY_API */746#else /* INTEL_NO_MACRO_BODY */747#define __itt_event_end_ptr 0748#endif /* INTEL_NO_MACRO_BODY */749/** @endcond */750/** @} legacy_events group */751#endif /* _ITTNOTIFY_H_ */752753/**754* @defgroup legacy_memory Memory Accesses755* @ingroup legacy756*/757758/**759* @deprecated Legacy API760* @brief Inform the tool of memory accesses on reading761*/762void LIBITTAPI __itt_memory_read(void *addr, size_t size);763764/** @cond exclude_from_documentation */765#ifndef INTEL_NO_MACRO_BODY766#ifndef INTEL_NO_ITTNOTIFY_API767ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size))768#define __itt_memory_read ITTNOTIFY_VOID(memory_read)769#define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read)770#else /* INTEL_NO_ITTNOTIFY_API */771#define __itt_memory_read(addr, size)772#define __itt_memory_read_ptr 0773#endif /* INTEL_NO_ITTNOTIFY_API */774#else /* INTEL_NO_MACRO_BODY */775#define __itt_memory_read_ptr 0776#endif /* INTEL_NO_MACRO_BODY */777/** @endcond */778779/**780* @deprecated Legacy API781* @brief Inform the tool of memory accesses on writing782*/783void LIBITTAPI __itt_memory_write(void *addr, size_t size);784785/** @cond exclude_from_documentation */786#ifndef INTEL_NO_MACRO_BODY787#ifndef INTEL_NO_ITTNOTIFY_API788ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size))789#define __itt_memory_write ITTNOTIFY_VOID(memory_write)790#define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write)791#else /* INTEL_NO_ITTNOTIFY_API */792#define __itt_memory_write(addr, size)793#define __itt_memory_write_ptr 0794#endif /* INTEL_NO_ITTNOTIFY_API */795#else /* INTEL_NO_MACRO_BODY */796#define __itt_memory_write_ptr 0797#endif /* INTEL_NO_MACRO_BODY */798/** @endcond */799800/**801* @deprecated Legacy API802* @brief Inform the tool of memory accesses on updating803*/804void LIBITTAPI __itt_memory_update(void *address, size_t size);805806/** @cond exclude_from_documentation */807#ifndef INTEL_NO_MACRO_BODY808#ifndef INTEL_NO_ITTNOTIFY_API809ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size))810#define __itt_memory_update ITTNOTIFY_VOID(memory_update)811#define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update)812#else /* INTEL_NO_ITTNOTIFY_API */813#define __itt_memory_update(addr, size)814#define __itt_memory_update_ptr 0815#endif /* INTEL_NO_ITTNOTIFY_API */816#else /* INTEL_NO_MACRO_BODY */817#define __itt_memory_update_ptr 0818#endif /* INTEL_NO_MACRO_BODY */819/** @endcond */820/** @} legacy_memory group */821822/**823* @defgroup legacy_state Thread and Object States824* @ingroup legacy825*/826827/** @brief state type */828typedef int __itt_state_t;829830/** @cond exclude_from_documentation */831typedef enum __itt_obj_state {832__itt_obj_state_err = 0,833__itt_obj_state_clr = 1,834__itt_obj_state_set = 2,835__itt_obj_state_use = 3836} __itt_obj_state_t;837838typedef enum __itt_thr_state {839__itt_thr_state_err = 0,840__itt_thr_state_clr = 1,841__itt_thr_state_set = 2842} __itt_thr_state_t;843844typedef enum __itt_obj_prop {845__itt_obj_prop_watch = 1,846__itt_obj_prop_ignore = 2,847__itt_obj_prop_sharable = 3848} __itt_obj_prop_t;849850typedef enum __itt_thr_prop {851__itt_thr_prop_quiet = 1852} __itt_thr_prop_t;853/** @endcond */854855/**856* @deprecated Legacy API857* @brief managing thread and object states858*/859__itt_state_t LIBITTAPI __itt_state_get(void);860861/** @cond exclude_from_documentation */862#ifndef INTEL_NO_MACRO_BODY863#ifndef INTEL_NO_ITTNOTIFY_API864ITT_STUB(ITTAPI, __itt_state_t, state_get, (void))865#define __itt_state_get ITTNOTIFY_DATA(state_get)866#define __itt_state_get_ptr ITTNOTIFY_NAME(state_get)867#else /* INTEL_NO_ITTNOTIFY_API */868#define __itt_state_get(void) (__itt_state_t)0869#define __itt_state_get_ptr 0870#endif /* INTEL_NO_ITTNOTIFY_API */871#else /* INTEL_NO_MACRO_BODY */872#define __itt_state_get_ptr 0873#endif /* INTEL_NO_MACRO_BODY */874/** @endcond */875876/**877* @deprecated Legacy API878* @brief managing thread and object states879*/880__itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s);881882/** @cond exclude_from_documentation */883#ifndef INTEL_NO_MACRO_BODY884#ifndef INTEL_NO_ITTNOTIFY_API885ITT_STUB(ITTAPI, __itt_state_t, state_set, (__itt_state_t s))886#define __itt_state_set ITTNOTIFY_DATA(state_set)887#define __itt_state_set_ptr ITTNOTIFY_NAME(state_set)888#else /* INTEL_NO_ITTNOTIFY_API */889#define __itt_state_set(s) (__itt_state_t)0890#define __itt_state_set_ptr 0891#endif /* INTEL_NO_ITTNOTIFY_API */892#else /* INTEL_NO_MACRO_BODY */893#define __itt_state_set_ptr 0894#endif /* INTEL_NO_MACRO_BODY */895/** @endcond */896897/**898* @deprecated Legacy API899* @brief managing thread and object modes900*/901__itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p, __itt_thr_state_t s);902903/** @cond exclude_from_documentation */904#ifndef INTEL_NO_MACRO_BODY905#ifndef INTEL_NO_ITTNOTIFY_API906ITT_STUB(ITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s))907#define __itt_thr_mode_set ITTNOTIFY_DATA(thr_mode_set)908#define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set)909#else /* INTEL_NO_ITTNOTIFY_API */910#define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0911#define __itt_thr_mode_set_ptr 0912#endif /* INTEL_NO_ITTNOTIFY_API */913#else /* INTEL_NO_MACRO_BODY */914#define __itt_thr_mode_set_ptr 0915#endif /* INTEL_NO_MACRO_BODY */916/** @endcond */917918/**919* @deprecated Legacy API920* @brief managing thread and object modes921*/922__itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p, __itt_obj_state_t s);923924/** @cond exclude_from_documentation */925#ifndef INTEL_NO_MACRO_BODY926#ifndef INTEL_NO_ITTNOTIFY_API927ITT_STUB(ITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s))928#define __itt_obj_mode_set ITTNOTIFY_DATA(obj_mode_set)929#define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set)930#else /* INTEL_NO_ITTNOTIFY_API */931#define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0932#define __itt_obj_mode_set_ptr 0933#endif /* INTEL_NO_ITTNOTIFY_API */934#else /* INTEL_NO_MACRO_BODY */935#define __itt_obj_mode_set_ptr 0936#endif /* INTEL_NO_MACRO_BODY */937/** @endcond */938/** @} legacy_state group */939940/**941* @defgroup frames Frames942* @ingroup legacy943* Frames group944* @{945*/946/**947* @brief opaque structure for frame identification948*/949typedef struct __itt_frame_t *__itt_frame;950951/**952* @brief Create a global frame with given domain953*/954#if ITT_PLATFORM==ITT_PLATFORM_WIN955__itt_frame ITTAPI __itt_frame_createA(const char *domain);956__itt_frame ITTAPI __itt_frame_createW(const wchar_t *domain);957#if defined(UNICODE) || defined(_UNICODE)958# define __itt_frame_create __itt_frame_createW959# define __itt_frame_create_ptr __itt_frame_createW_ptr960#else /* UNICODE */961# define __itt_frame_create __itt_frame_createA962# define __itt_frame_create_ptr __itt_frame_createA_ptr963#endif /* UNICODE */964#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */965__itt_frame ITTAPI __itt_frame_create(const char *domain);966#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */967968/** @cond exclude_from_documentation */969#ifndef INTEL_NO_MACRO_BODY970#ifndef INTEL_NO_ITTNOTIFY_API971#if ITT_PLATFORM==ITT_PLATFORM_WIN972ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain))973ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain))974#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */975ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain))976#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */977#if ITT_PLATFORM==ITT_PLATFORM_WIN978#define __itt_frame_createA ITTNOTIFY_DATA(frame_createA)979#define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA)980#define __itt_frame_createW ITTNOTIFY_DATA(frame_createW)981#define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW)982#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */983#define __itt_frame_create ITTNOTIFY_DATA(frame_create)984#define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create)985#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */986#else /* INTEL_NO_ITTNOTIFY_API */987#if ITT_PLATFORM==ITT_PLATFORM_WIN988#define __itt_frame_createA(domain)989#define __itt_frame_createA_ptr 0990#define __itt_frame_createW(domain)991#define __itt_frame_createW_ptr 0992#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */993#define __itt_frame_create(domain)994#define __itt_frame_create_ptr 0995#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */996#endif /* INTEL_NO_ITTNOTIFY_API */997#else /* INTEL_NO_MACRO_BODY */998#if ITT_PLATFORM==ITT_PLATFORM_WIN999#define __itt_frame_createA_ptr 01000#define __itt_frame_createW_ptr 01001#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */1002#define __itt_frame_create_ptr 01003#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */1004#endif /* INTEL_NO_MACRO_BODY */1005/** @endcond */10061007/** @brief Record an frame begin occurrence. */1008void ITTAPI __itt_frame_begin(__itt_frame frame);1009/** @brief Record an frame end occurrence. */1010void ITTAPI __itt_frame_end (__itt_frame frame);10111012/** @cond exclude_from_documentation */1013#ifndef INTEL_NO_MACRO_BODY1014#ifndef INTEL_NO_ITTNOTIFY_API1015ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame))1016ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame))1017#define __itt_frame_begin ITTNOTIFY_VOID(frame_begin)1018#define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin)1019#define __itt_frame_end ITTNOTIFY_VOID(frame_end)1020#define __itt_frame_end_ptr ITTNOTIFY_NAME(frame_end)1021#else /* INTEL_NO_ITTNOTIFY_API */1022#define __itt_frame_begin(frame)1023#define __itt_frame_begin_ptr 01024#define __itt_frame_end(frame)1025#define __itt_frame_end_ptr 01026#endif /* INTEL_NO_ITTNOTIFY_API */1027#else /* INTEL_NO_MACRO_BODY */1028#define __itt_frame_begin_ptr 01029#define __itt_frame_end_ptr 01030#endif /* INTEL_NO_MACRO_BODY */1031/** @endcond */1032/** @} frames group */10331034#ifdef __cplusplus1035}1036#endif /* __cplusplus */10371038#endif /* _LEGACY_ITTNOTIFY_H_ */103910401041