/home/aching/Avery/Work.School/Research/pvfs2-lock/s3asim/src/hist_params.h File Reference

#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <syslog.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include "mpi.h"
#include <assert.h>
#include "test.h"

Defines

#define QUERY   0
#define DATABASE   1
#define MAX_SEQUENCE   2

Functions

int read_hist_params (struct test_params_s *test_params_p, int sequence_type)
void print_hist_params (struct test_params_s *test_params_p, int sequence_type)
int generate_rand_hist (int myid, unsigned int *seed_p, int sequence_type, struct work_info_s *work_info_p, struct mpe_events_s *mpe_events_p, struct test_params_s *test_params_p)

Define Documentation

#define DATABASE   1

#define MAX_SEQUENCE   2

#define QUERY   0


Function Documentation

int generate_rand_hist ( int  myid,
unsigned int *  seed_p,
int  sequence_type,
struct work_info_s work_info_p,
struct mpe_events_s mpe_events_p,
struct test_params_s test_params_p 
)

Based on the histogram information provided by either the query or database distributions, generate a sequence size.

Parameters:
myid MPI myid.
seed_p Seed to generate pseudo-random output.
sequence_type Either a QUERY or DATABASE type.
work_info_p Pointer to work information structure.
mpe_events_p Pointer to timing structure.
test_params_p Pointer to test_params.
Returns:
The sequence size, or negative values on error.

void print_hist_params ( struct test_params_s test_params_p,
int  sequence_type 
)

Prints out the histogram information from the test_params structure that has already been parsed from a file for either query or database distributions.

Parameters:
test_params_p Pointer to test_params.
sequence_type Either a QUERY or DATABASE type.

int read_hist_params ( struct test_params_s test_params_p,
int  sequence_type 
)

Reads in histogram information from a file for either query or database distributions.

Parameters:
test_params_p Pointer to test_params.
sequence_type Either a QUERY or DATABASE type.
Returns:
0 on success.


Generated on Sun May 20 13:10:04 2007 for s3asim by  doxygen 1.4.7