3.1-rc3 (revision d9ca08bb)
Typedefs | Functions
OTF2_Thumbnail.h File Reference

This lowest user-visible layer provides write routines to read and write thumbnail data. More...

#include <stdint.h>
#include <otf2/OTF2_GeneralDefinitions.h>

Go to the source code of this file.

Typedefs

typedef struct OTF2_ThumbWriter_struct OTF2_ThumbWriter
 Keeps all necessary information about the thumb writer. See OTF2_ThumbWriter_struct for detailed information.
 
typedef struct OTF2_ThumbReader_struct OTF2_ThumbReader
 Keeps all necessary information about the event reader. See OTF2_ThumbReader_struct for detailed information.
 

Functions

OTF2_ErrorCode OTF2_ThumbReader_GetHeader (OTF2_ThumbReader *reader, char **const name, char **const description, OTF2_ThumbnailType *type, uint32_t *numberOfSamples, uint32_t *numberOfMetrics, uint64_t **refsToDefs)
 Reads a thumbnail header. More...
 
OTF2_ErrorCode OTF2_ThumbReader_ReadSample (OTF2_ThumbReader *reader, uint64_t *baseline, uint32_t numberOfMetrics, uint64_t *metricSamples)
 Reads a thumbnail sample. More...
 
OTF2_ErrorCode OTF2_ThumbWriter_WriteSample (OTF2_ThumbWriter *writer, uint64_t baseline, uint32_t numberOfMetrics, const uint64_t *metricSamples)
 Writes a thumbnail sample. More...
 

Detailed Description

This lowest user-visible layer provides write routines to read and write thumbnail data.

Function Documentation

OTF2_ErrorCode OTF2_ThumbReader_GetHeader ( OTF2_ThumbReader reader,
char **const  name,
char **const  description,
OTF2_ThumbnailType type,
uint32_t *  numberOfSamples,
uint32_t *  numberOfMetrics,
uint64_t **  refsToDefs 
)

Reads a thumbnail header.

A thumbnail header contains some meta information for a thumbnail.

Parameters
readerReader object.
[out]nameName of thumbnail. Allocated with malloc.
[out]descriptionDescription of thumbnail. Allocated with malloc.
[out]typeType of thumbnail.
[out]numberOfSamplesNumber of samples.
[out]numberOfMetricsNumber of metrics.
[out]refsToDefsThe sorted set of references to definitions used in a thumbnail sample. Allocated with malloc. Contains numberOfMetrics entries
Since
Version 1.2
Returns
OTF2_SUCCESS if successful, an error code if an error occurs.
OTF2_ErrorCode OTF2_ThumbReader_ReadSample ( OTF2_ThumbReader reader,
uint64_t *  baseline,
uint32_t  numberOfMetrics,
uint64_t *  metricSamples 
)

Reads a thumbnail sample.

Parameters
readerReader object.
[out]baselineBaseline for this sample. If zero, the baseline is the sum of all metric values in this sample. If OTF2_UNDEFINED_UINT64, no baseline exists.
numberOfMetricsNumber of metric sample values.
[out]metricSamplesMetric sample values.
Since
Version 1.2
Returns
OTF2_SUCCESS if successful, an error code if an error occurs.
OTF2_ErrorCode OTF2_ThumbWriter_WriteSample ( OTF2_ThumbWriter writer,
uint64_t  baseline,
uint32_t  numberOfMetrics,
const uint64_t *  metricSamples 
)

Writes a thumbnail sample.

Parameters
writerWriter object.
baselineBaseline for this sample. If zero, the baseline is the sum of all metric values in this sample. If OTF2_UNDEFINED_UINT64, no baseline exists.
numberOfMetricsNumber of metric sample values.
metricSamplesMetric sample values.
Since
Version 1.2
Returns
OTF2_SUCCESS if successful, an error code if an error occurs.