trace_query.c File Reference

Implements a database system for tracking kernel calls. More...

#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.


Detailed Description

Implements a database system for tracking kernel calls.


Define Documentation

#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.

Referenced by oski_CountTraceFlopsPerNz(), and oski_EstimateTraceTime().


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.

References oski_tracerec_t::args, GET_ARGS, INVALID_TRACE, oski_tracerec_t::kernel_id, MatMult(), MatMultAndMatTransMult(), oski_tracerec_t::num_calls, OSKI_KERNEL_MatMult, OSKI_KERNEL_MatMultAndMatTransMult, OSKI_KERNEL_MatPowMult, OSKI_KERNEL_MatTransMatMult, OSKI_KERNEL_MatTrisolve, oski_MatchesTraceRecord(), simplelist_GetElem(), and simplelist_GetLength().

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.

References oski_tracerec_t::args, GET_ARGS, INVALID_TRACE, oski_tracerec_t::kernel_id, MatMult(), MatMultAndMatTransMult(), oski_tracerec_t::num_calls, OSKI_KERNEL_MatMult, OSKI_KERNEL_MatMultAndMatTransMult, OSKI_KERNEL_MatPowMult, OSKI_KERNEL_MatTransMatMult, OSKI_KERNEL_MatTrisolve, oski_MatchesTraceRecord(), simplelist_GetElem(), simplelist_GetLength(), and oski_tracerec_t::time_elapsed.


Generated on Fri Apr 8 22:35:20 2011 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.5.9