model-net-inspect.h 1.31 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (C) 2013 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

/* This header provides ways for modelnet users to look at the state of the
 * underlying implementations (e.g., torus) */

#ifndef MODEL_NET_INSPECT_H
#define MODEL_NET_INSPECT_H

/* ALL FUNCTIONS
 * anno is the annotation specified in the configuration (NULL -> no
 * annotation), while ignore_annotations is a flag controlling whether
 * annotations are checked for or not - if not, then */

18 19
/** TORUS FUNCTIONS **/

20 21 22 23 24 25 26 27
/* get the dimensions of a torus configuration torus network. n and dims are
 * return paramters */
void model_net_torus_get_dims(
        char const        * anno,
        int                 ignore_annotations,
        int               * n,
        int const * const * dims);

28 29 30 31 32 33 34 35 36 37 38
/* mapping utilities to and from linearized torus node ids */
void model_net_torus_get_dim_id(
        int         flat_id,
        int         ndims,
        const int * dim_lens,
        int       * out_dim_ids);

int model_net_torus_get_flat_id(
        int         ndims,
        const int * dim_lens,
        const int * dim_ids);
39 40 41 42 43 44 45 46 47 48 49 50

#endif /* end of include guard: MODEL_NET_INSPECT_H */

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