trace_query.c File Reference


Detailed Description

Implements a database system for tracking kernel calls.

#include <string.h>
#include <oski/config.h>
#include <oski/trace.h>
#include <oski/matrix.h>
#include <oski/matmult.h>
#include <oski/a_and_at.h>
#include <oski/ata.h>
#include <oski/trisolve.h>
#include <oski/matpow.h>

Defines

#define GET_ARGS(args, typ, field)   ((const oski_traceargs_##typ##_t *)(args))-> field
 Retrieves a field of a given name from an argument signature of a given base type.

Functions

double oski_EstimateTraceTimeTotal (const oski_trace_t trace, double time_stream)
double oski_EstimateTraceTime (const oski_trace_t trace, double time_stream, oski_id_t kernel_id, const void *args, size_t args_bytes, oski_traceargscmp_funcpt func_compare)
 This implementation allows arbitrary queries on a trace through a user-defined comparison function of type oski_traceargscmp_funcpt.
double oski_CountTraceFlopsPerNz (const oski_trace_t trace, oski_id_t kernel_id, const void *args, size_t args_bytes, oski_traceargscmp_funcpt func_compare)
 This implementation allows arbitrary queries on a trace through a user-defined comparison function of type oski_traceargscmp_funcpt.


Function Documentation

double oski_CountTraceFlopsPerNz const oski_trace_t  trace,
oski_id_t  kernel_id,
const void *  args,
size_t  args_bytes,
oski_traceargscmp_funcpt  func_compare
 

This implementation allows arbitrary queries on a trace through a user-defined comparison function of type oski_traceargscmp_funcpt.

Parameters:
[in] trace Trace on which to compute an estimated running time.
[in] kernel_id Kernel to match, or INVALID_ID to match all kernels.
[in] args Arguments of the given kernel. (Ignored if kernel_id == INVALID_ID.)
[in] args_bytes Size of 'args' in bytes. (Ignored if kernel_id == INVALID_ID.)
[in] func_compare A pointer to a user-defined function $f(a, b)$ to compare two kernel-specific argument lists, $a$ and $b$. If func_compare == NULL, then byte-wise comparisons are used by default. (Ignored if kernel_id == INVALID_ID.)
Returns:
The number of flops needed per matrix non-zero entry to execute all matching kernel records in the trace.

double oski_EstimateTraceTime const oski_trace_t  trace,
double  time_stream,
oski_id_t  kernel_id,
const void *  args,
size_t  args_bytes,
oski_traceargscmp_funcpt  func_compare
 

This implementation allows arbitrary queries on a trace through a user-defined comparison function of type oski_traceargscmp_funcpt.

Parameters:
[in] trace Trace on which to compute an estimated running time.
[in] time_stream The estimated time to stream through the matrix.
[in] kernel_id Kernel to match, or INVALID_ID to match all kernels.
[in] args Arguments of the given kernel. (Ignored if kernel_id == INVALID_ID.)
[in] args_bytes Size of 'args' in bytes. (Ignored if kernel_id == INVALID_ID.)
[in] func_compare A pointer to a user-defined function $f(a, b)$ to compare two kernel-specific argument lists, $a$ and $b$. If func_compare == NULL, then byte-wise comparisons are used by default. (Ignored if kernel_id == INVALID_ID.)
Returns:
The estimated time to execute all matching kernel records in the trace.


Generated on Wed Sep 19 16:41:23 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6