codes-workload-method.h 1.17 KB
Newer Older
1 2 3 4 5 6
/*
 * Copyright (C) 2013 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

Philip Carns's avatar
Philip Carns committed
7 8 9
/* I/O workload generator API to be used by workload generator methods.  
 * It mimics the top level codes-workload.h API, except that there is no 
 * reverse handler.
10 11 12 13 14 15 16 17
 */

#ifndef CODES_WORKLOAD_METHOD_H
#define CODES_WORKLOAD_METHOD_H

#include "ross.h"
#include "codes/codes-workload.h"

18 19 20 21 22 23 24
#define APP_ID_UNSUPPORTED(id, name) \
    if (id != 0) \
        tw_error(TW_LOC,\
                "APP IDs not supported for %s generator, 0 required", name);



25 26 27
struct codes_workload_method
{
    char *method_name; /* name of the generator */
28
    void * (*codes_workload_read_config) (
29 30
            ConfigHandle *handle, char const * section_name,
            char const * annotation, int num_ranks);
31 32 33
    int (*codes_workload_load)(const char* params, int app_id, int rank);
    void (*codes_workload_get_next)(int app_id, int rank, struct codes_workload_op *op);
    int (*codes_workload_get_rank_cnt)(const char* params, int app_id);
34
};
35 36 37 38 39 40 41 42 43 44 45

#endif /* CODES_WORKLOAD_METHOD_H */

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 * End:
 *
 * vim: ft=c ts=8 sts=4 sw=4 expandtab
 */