1.5.1 (revision 4026)
otf2/OTF2_GeneralDefinitions.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the Score-P software (http://www.score-p.org)
00003  *
00004  * Copyright (c) 2009-2013,
00005  * RWTH Aachen University, Germany
00006  *
00007  * Copyright (c) 2009-2013,
00008  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
00009  *
00010  * Copyright (c) 2009-2014,
00011  * Technische Universitaet Dresden, Germany
00012  *
00013  * Copyright (c) 2009-2013,
00014  * University of Oregon, Eugene, USA
00015  *
00016  * Copyright (c) 2009-2013,
00017  * Forschungszentrum Juelich GmbH, Germany
00018  *
00019  * Copyright (c) 2009-2013,
00020  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
00021  *
00022  * Copyright (c) 2009-2013,
00023  * Technische Universitaet Muenchen, Germany
00024  *
00025  * This software may be modified and distributed under the terms of
00026  * a BSD-style license.  See the COPYING file in the package base
00027  * directory for details.
00028  *
00029  */
00030 
00031 
00032 #ifndef OTF2_GENERAL_DEFINITIONS_H
00033 #define OTF2_GENERAL_DEFINITIONS_H
00034 
00035 
00045 #include <stdint.h>
00046 
00047 
00048 #include <otf2/OTF2_ErrorCodes.h>
00049 
00050 
00051 #ifdef __cplusplus
00052 extern "C" {
00053 #endif /* __cplusplus */
00054 
00055 
00056 /* ___ OTF2 library version information _____________________________________ */
00057 
00058 
00062 #define OTF2_VERSION_MAJOR  1
00063 
00064 #define OTF2_VERSION_MINOR  5
00065 
00066 #define OTF2_VERSION_BUGFIX 1
00067 
00068 #define OTF2_VERSION_SUFFIX ""
00069 
00070 #define OTF2_VERSION        "1.5.1"
00071 
00074 /* ___ Symbols for undefined values _________________________________________ */
00075 
00076 
00080 #define OTF2_UNDEFINED_UINT8  ( ( uint8_t )( ~( ( uint8_t )0u ) ) )
00081 
00082 #define OTF2_UNDEFINED_UINT16 ( ( uint16_t )( ~( ( uint16_t )0u ) ) )
00083 
00084 #define OTF2_UNDEFINED_UINT32 ( ( uint32_t )( ~( ( uint32_t )0u ) ) )
00085 
00086 #define OTF2_UNDEFINED_UINT64 ( ( uint64_t )( ~( ( uint64_t )0u ) ) )
00087 
00091 #define OTF2_UNDEFINED_TYPE OTF2_UNDEFINED_UINT8
00092 
00093 
00095 typedef uint64_t OTF2_TimeStamp;
00097 #define OTF2_UNDEFINED_TIMESTAMP OTF2_UNDEFINED_UINT64
00098 
00099 
00101 typedef uint32_t OTF2_StringRef;
00103 #define OTF2_UNDEFINED_STRING ( ( OTF2_StringRef )OTF2_UNDEFINED_UINT32 )
00104 
00105 
00107 typedef uint32_t OTF2_AttributeRef;
00109 #define OTF2_UNDEFINED_ATTRIBUTE ( ( OTF2_AttributeRef )OTF2_UNDEFINED_UINT32 )
00110 
00111 
00113 typedef uint32_t OTF2_SystemTreeNodeRef;
00115 #define OTF2_UNDEFINED_SYSTEM_TREE_NODE ( ( OTF2_SystemTreeNodeRef )OTF2_UNDEFINED_UINT32 )
00116 
00117 
00119 typedef uint32_t OTF2_LocationGroupRef;
00121 #define OTF2_UNDEFINED_LOCATION_GROUP ( ( OTF2_LocationGroupRef )OTF2_UNDEFINED_UINT32 )
00122 
00123 
00125 typedef uint64_t OTF2_LocationRef;
00127 #define OTF2_UNDEFINED_LOCATION ( ( OTF2_LocationRef )OTF2_UNDEFINED_UINT64 )
00128 
00129 
00131 typedef uint32_t OTF2_RegionRef;
00133 #define OTF2_UNDEFINED_REGION ( ( OTF2_RegionRef )OTF2_UNDEFINED_UINT32 )
00134 
00135 
00137 typedef uint32_t OTF2_CallsiteRef;
00139 #define OTF2_UNDEFINED_CALLSITE ( ( OTF2_CallsiteRef )OTF2_UNDEFINED_UINT32 )
00140 
00141 
00143 typedef uint32_t OTF2_CallpathRef;
00145 #define OTF2_UNDEFINED_CALLPATH ( ( OTF2_CallpathRef )OTF2_UNDEFINED_UINT32 )
00146 
00147 
00149 typedef uint32_t OTF2_GroupRef;
00151 #define OTF2_UNDEFINED_GROUP ( ( OTF2_GroupRef )OTF2_UNDEFINED_UINT32 )
00152 
00153 
00155 typedef uint32_t OTF2_MetricMemberRef;
00157 #define OTF2_UNDEFINED_METRIC_MEMBER ( ( OTF2_MetricMemberRef )OTF2_UNDEFINED_UINT32 )
00158 
00159 
00161 typedef uint32_t OTF2_MetricRef;
00163 #define OTF2_UNDEFINED_METRIC ( ( OTF2_MetricRef )OTF2_UNDEFINED_UINT32 )
00164 
00165 
00167 typedef uint32_t OTF2_CommRef;
00169 #define OTF2_UNDEFINED_COMM ( ( OTF2_CommRef )OTF2_UNDEFINED_UINT32 )
00170 
00171 
00173 typedef uint32_t OTF2_ParameterRef;
00175 #define OTF2_UNDEFINED_PARAMETER ( ( OTF2_ParameterRef )OTF2_UNDEFINED_UINT32 )
00176 
00177 
00179 typedef uint32_t OTF2_RmaWinRef;
00181 #define OTF2_UNDEFINED_RMA_WIN ( ( OTF2_RmaWinRef )OTF2_UNDEFINED_UINT32 )
00182 
00183 
00185 typedef uint32_t OTF2_CartDimensionRef;
00187 #define OTF2_UNDEFINED_CART_DIMENSION ( ( OTF2_CartDimensionRef )OTF2_UNDEFINED_UINT32 )
00188 
00189 
00191 typedef uint32_t OTF2_CartTopologyRef;
00193 #define OTF2_UNDEFINED_CART_TOPOLOGY ( ( OTF2_CartTopologyRef )OTF2_UNDEFINED_UINT32 )
00194 
00195 
00197 typedef uint32_t OTF2_SourceCodeLocationRef;
00199 #define OTF2_UNDEFINED_SOURCE_CODE_LOCATION ( ( OTF2_SourceCodeLocationRef )OTF2_UNDEFINED_UINT32 )
00200 
00201 
00203 typedef uint32_t OTF2_CallingContextRef;
00205 #define OTF2_UNDEFINED_CALLING_CONTEXT ( ( OTF2_CallingContextRef )OTF2_UNDEFINED_UINT32 )
00206 
00207 
00209 typedef uint32_t OTF2_InterruptGeneratorRef;
00211 #define OTF2_UNDEFINED_INTERRUPT_GENERATOR ( ( OTF2_InterruptGeneratorRef )OTF2_UNDEFINED_UINT32 )
00212 
00213 
00214 /* ___ Declarations of opaque OTF2 objects __________________________________ */
00215 
00216 
00218 typedef struct OTF2_EvtReader_struct OTF2_EvtReader;
00219 
00220 
00222 typedef struct OTF2_GlobalEvtReader_struct OTF2_GlobalEvtReader;
00223 
00224 
00226 typedef struct OTF2_DefReader_struct OTF2_DefReader;
00227 
00228 
00230 typedef struct OTF2_GlobalDefReader_struct OTF2_GlobalDefReader;
00231 
00232 
00234 typedef struct OTF2_SnapReader_struct OTF2_SnapReader;
00235 
00236 
00238 typedef struct OTF2_GlobalSnapReader_struct OTF2_GlobalSnapReader;
00239 
00240 
00242 typedef struct OTF2_MarkerReader_struct OTF2_MarkerReader;
00243 
00244 
00245 /* ___ Definitions related to the file interaction __________________________ */
00246 
00247 
00249 #define OTF2_CHUNK_SIZE_MIN ( uint64_t )( 256 * 1024 )
00250 
00251 
00253 #define OTF2_CHUNK_SIZE_MAX ( uint64_t )( 1024 * 1024 * 16 )
00254 
00255 
00258 typedef uint8_t OTF2_FileMode;
00259 
00260 
00262 enum OTF2_FileMode_enum
00263 {
00265     OTF2_FILEMODE_WRITE  = 0,
00267     OTF2_FILEMODE_READ   = 1,
00269     OTF2_FILEMODE_MODIFY = 2
00270 };
00271 
00272 
00275 typedef uint8_t OTF2_Compression;
00276 
00277 
00279 enum OTF2_Compression_enum
00280 {
00282     OTF2_COMPRESSION_UNDEFINED = 0,
00284     OTF2_COMPRESSION_NONE      = 1,
00286     OTF2_COMPRESSION_ZLIB      = 2
00287 };
00288 
00289 
00318 typedef enum OTF2_CallbackCode_enum
00319 {
00321     OTF2_CALLBACK_SUCCESS   = 0,
00322 
00329     OTF2_CALLBACK_INTERRUPT = !OTF2_CALLBACK_SUCCESS,
00330 
00332     OTF2_CALLBACK_ERROR     = !OTF2_CALLBACK_SUCCESS
00333 } OTF2_CallbackCode;
00334 
00335 
00336 /* ___ Definitions related to the memory buffer ______________________________ */
00337 
00338 
00341 typedef uint8_t OTF2_FlushType;
00342 
00343 
00345 enum OTF2_FlushType_enum
00346 {
00348     OTF2_NO_FLUSH = 0,
00350     OTF2_FLUSH    = 1
00351 };
00352 
00353 
00355 typedef uint8_t OTF2_Hint;
00356 
00362 enum OTF2_Hint_enum
00363 {
00377     OTF2_HINT_GLOBAL_READER = 0
00378 };
00379 
00380 
00382 typedef uint8_t OTF2_Boolean;
00383 
00389 enum OTF2_Boolean_enum
00390 {
00393     OTF2_FALSE = 0,
00396     OTF2_TRUE  = !OTF2_FALSE
00397 };
00398 
00399 
00401 typedef uint8_t OTF2_FileType;
00402 
00408 enum OTF2_FileType_enum
00409 {
00412     OTF2_FILETYPE_ANCHOR      = 0,
00415     OTF2_FILETYPE_GLOBAL_DEFS = 1,
00418     OTF2_FILETYPE_LOCAL_DEFS  = 2,
00421     OTF2_FILETYPE_EVENTS      = 3,
00424     OTF2_FILETYPE_SNAPSHOTS   = 4,
00427     OTF2_FILETYPE_THUMBNAIL   = 5,
00430     OTF2_FILETYPE_MARKER      = 6,
00433     OTF2_FILETYPE_SIONRANKMAP = 7
00434 };
00435 
00436 
00438 typedef uint8_t OTF2_FileSubstrate;
00439 
00445 enum OTF2_FileSubstrate_enum
00446 {
00449     OTF2_SUBSTRATE_UNDEFINED = 0,
00452     OTF2_SUBSTRATE_POSIX     = 1,
00456     OTF2_SUBSTRATE_SION      = 2,
00459     OTF2_SUBSTRATE_NONE      = 3
00460 };
00461 
00462 
00464 typedef uint8_t OTF2_MappingType;
00465 
00471 enum OTF2_MappingType_enum
00472 {
00475     OTF2_MAPPING_STRING               = 0,
00478     OTF2_MAPPING_ATTRIBUTE            = 1,
00481     OTF2_MAPPING_LOCATION             = 2,
00484     OTF2_MAPPING_REGION               = 3,
00487     OTF2_MAPPING_GROUP                = 4,
00490     OTF2_MAPPING_METRIC               = 5,
00493     OTF2_MAPPING_COMM                 = 6,
00496     OTF2_MAPPING_PARAMETER            = 7,
00501     OTF2_MAPPING_RMA_WIN              = 8,
00506     OTF2_MAPPING_SOURCE_CODE_LOCATION = 9,
00511     OTF2_MAPPING_CALLING_CONTEXT      = 10,
00516     OTF2_MAPPING_INTERRUPT_GENERATOR  = 11,
00517 
00520     OTF2_MAPPING_MAX                  = 12
00521 };
00522 
00523 
00525 typedef uint8_t OTF2_Type;
00526 
00532 enum OTF2_Type_enum
00533 {
00538     OTF2_TYPE_NONE                 = 0,
00543     OTF2_TYPE_UINT8                = 1,
00548     OTF2_TYPE_UINT16               = 2,
00553     OTF2_TYPE_UINT32               = 3,
00558     OTF2_TYPE_UINT64               = 4,
00563     OTF2_TYPE_INT8                 = 5,
00568     OTF2_TYPE_INT16                = 6,
00573     OTF2_TYPE_INT32                = 7,
00578     OTF2_TYPE_INT64                = 8,
00583     OTF2_TYPE_FLOAT                = 9,
00588     OTF2_TYPE_DOUBLE               = 10,
00593     OTF2_TYPE_STRING               = 11,
00598     OTF2_TYPE_ATTRIBUTE            = 12,
00603     OTF2_TYPE_LOCATION             = 13,
00608     OTF2_TYPE_REGION               = 14,
00613     OTF2_TYPE_GROUP                = 15,
00618     OTF2_TYPE_METRIC               = 16,
00623     OTF2_TYPE_COMM                 = 17,
00628     OTF2_TYPE_PARAMETER            = 18,
00635     OTF2_TYPE_RMA_WIN              = 19,
00642     OTF2_TYPE_SOURCE_CODE_LOCATION = 20,
00649     OTF2_TYPE_CALLING_CONTEXT      = 21,
00656     OTF2_TYPE_INTERRUPT_GENERATOR  = 22
00657 };
00658 
00659 
00661 typedef uint8_t OTF2_Paradigm;
00662 
00669 enum OTF2_Paradigm_enum
00670 {
00673     OTF2_PARADIGM_UNKNOWN            = 0,
00676     OTF2_PARADIGM_USER               = 1,
00679     OTF2_PARADIGM_COMPILER           = 2,
00684     OTF2_PARADIGM_OPENMP             = 3,
00689     OTF2_PARADIGM_MPI                = 4,
00694     OTF2_PARADIGM_CUDA               = 5,
00699     OTF2_PARADIGM_MEASUREMENT_SYSTEM = 6,
00706     OTF2_PARADIGM_PTHREAD            = 7,
00713     OTF2_PARADIGM_HMPP               = 8,
00720     OTF2_PARADIGM_OMPSS              = 9,
00725     OTF2_PARADIGM_HARDWARE           = 10,
00732     OTF2_PARADIGM_GASPI              = 11,
00739     OTF2_PARADIGM_UPC                = 12,
00747     OTF2_PARADIGM_SHMEM              = 13,
00754     OTF2_PARADIGM_WINTHREAD          = 14,
00761     OTF2_PARADIGM_QTTHREAD           = 15,
00768     OTF2_PARADIGM_ACETHREAD          = 16,
00775     OTF2_PARADIGM_TBBTHREAD          = 17,
00782     OTF2_PARADIGM_OPENACC            = 18,
00789     OTF2_PARADIGM_OPENCL             = 19,
00796     OTF2_PARADIGM_MTAPI              = 20,
00801     OTF2_PARADIGM_SAMPLING           = 21
00802 };
00803 
00804 
00806 typedef uint8_t OTF2_ParadigmClass;
00807 
00813 enum OTF2_ParadigmClass_enum
00814 {
00817     OTF2_PARADIGM_CLASS_PROCESS            = 0,
00820     OTF2_PARADIGM_CLASS_THREAD_FORK_JOIN   = 1,
00823     OTF2_PARADIGM_CLASS_THREAD_CREATE_WAIT = 2,
00826     OTF2_PARADIGM_CLASS_ACCELERATOR        = 3
00827 };
00828 
00829 
00831 typedef uint8_t OTF2_ParadigmProperty;
00832 
00838 enum OTF2_ParadigmProperty_enum
00839 {
00845     OTF2_PARADIGM_PROPERTY_COMM_NAME_TEMPLATE    = 0,
00851     OTF2_PARADIGM_PROPERTY_RMA_WIN_NAME_TEMPLATE = 1,
00858     OTF2_PARADIGM_PROPERTY_RMA_ONLY              = 2
00859 };
00860 
00861 
00863 typedef uint8_t OTF2_ThumbnailType;
00864 
00870 enum OTF2_ThumbnailType_enum
00871 {
00874     OTF2_THUMBNAIL_TYPE_REGION     = 0,
00877     OTF2_THUMBNAIL_TYPE_METRIC     = 1,
00880     OTF2_THUMBNAIL_TYPE_ATTRIBUTES = 2
00881 };
00882 
00883 
00884 #ifdef __cplusplus
00885 }
00886 #endif /* __cplusplus */
00887 
00888 
00889 #endif /* !OTF2_GENERAL_DEFINITIONS_H */